src/PHPDish/Bundle/PaymentBundle/Twig/WalletExtension.php
public function translateWalletHistoryStatus(WalletHistoryInterface $history)
    {
        switch ($history->getStatus()) {
            case PaymentInterface::STATUS_OK:
                if ($history->isIncome()) {
                    $text = $this->translator->trans('payment.status.have_received');
                } elseif ($history->getType() === PaymentInterface::TYPE_WITHDRAW) {
                    $text = $this->translator->trans('payment.status.have_tansfer');
                } else {
                    $text = $this->translator->trans('payment.status.paid');
                }
                break;
            case PaymentInterface::STATUS_WAITING:
                if ($history->getType() === PaymentInterface::TYPE_WITHDRAW) {
                    $text = $this->translator->trans('payment.status.processing');
                } else {
                    $text = $this->translator->trans('payment.status.unpaid');
                }
                break;
            case PaymentInterface::STATUS_CLOSED:
                $text = $this->translator->trans('payment.status.closed');
                break;
            default:
                $text = $this->translator->trans('payment.status.unknown');
        }
        return $text;
    }
public function translateWalletHistoryStatus(WalletHistoryInterface $history)
    {
        switch ($history->getStatus()) {
            case PaymentInterface::STATUS_OK:
                if ($history->isIncome()) {
                    $text = $this->translator->trans('payment.status.have_received');
                } elseif ($history->getType() === PaymentInterface::TYPE_WITHDRAW) {
                    $text = $this->translator->trans('payment.status.have_tansfer');
                } else {
                    $text = $this->translator->trans('payment.status.paid');
                }
                break;
            case PaymentInterface::STATUS_WAITING:
                if ($history->getType() === PaymentInterface::TYPE_WITHDRAW) {
                    $text = $this->translator->trans('payment.status.processing');
                } else {
                    $text = $this->translator->trans('payment.status.unpaid');
                }
                break;
            case PaymentInterface::STATUS_CLOSED:
                $text = $this->translator->trans('payment.status.closed');
                break;
            default:
                $text = $this->translator->trans('payment.status.unknown');
        }
        return $text;
    }
翻译钱包历史状态
@param WalletHistoryInterface $history
@return string