This question has been flagged
8 Replies
2368 Views

Hi, Anybody knows how to deal with this issue posted in github. I posted it on github, got answered, but I still don't know how to fix it. Anybody helps?

Have a look at this first. 

\https://github.com/odoo/odoo/issues/50968

Avatar
Discard
Author

Many Thanks for reply.

I am trying to find the translation term related to the message from your answer, but can't find it.

Tried search in the file in \https://github.com/odoo/odoo/tree/12.0/addons/l10n_cn_standard/i18n_extra

But nothing found. Now I am lost.

If I understand you correctly, you mean the call to _get_payment_chatter_link is working fine, but you are not able to find the string from the listed code in the translation file. Is my understanding correct ?

Hi Jianshun: I have updated my earlier response to address the clarification made by you. Hope it helps.

Author

Thank you sir. You help a lot. Will continue to find the problem.

Check whether the call to self.payment_id._get_payment_chatter_link() is returning a value. The string has 4 placeholders (%s). The 1st 3 placeholders are already there. The 4th placeholder uses the value from self.payment_id._get_payment_chatter_link().

Author Best Answer

#. module: payment
#: code:addons/payment/models/payment_acquirer.py:679
#, python-format msgid ""
"The transaction %s with %s for %s has been confirmed. The related payment is"
" posted: %s"
msgstr " %s 与 %s 的交易 %s 已确认。 相关付款已过帐: %s"


Is the extra sign (") at the 2nd last line: 
" posted: %s", Caused the problem?

Avatar
Discard
Author

Here is the code from english pot file,

#. module: payment

#: code:addons/payment/models/payment_acquirer.py:679

#, python-format

msgid "The transaction %s with %s for %s has been confirmed. The related payment is posted: %s"

msgstr ""

Best Answer

Hi Jiashun:

Based on your description, Pedro's reply and the code posted by you, you may want to check whether the call to self.payment_id._get_payment_chatter_link() is returning some value or not.

The translation in this portion of the code is expecting 4 values (%s) to be passed to it.

message = _('The transaction %s with %s for %s has been confirmed. The related payment is posted: %s')

EDIT:

The translation files are in the payment module and are located in the following folder:

https://github.com/odoo/odoo/blob/12.0/addons/payment/i18n/

The terms are defined for the Chinese and Korean languages in the following files.

https://github.com/odoo/odoo/blob/12.0/addons/payment/i18n/zh_CN.po#L1733
https://github.com/odoo/odoo/blob/12.0/addons/payment/i18n/ko.po#L1741

Avatar
Discard