nvaccess/nvda

Bug report: When using poedit to translate NVDA Simplified Chinese and save, the following string has an error

Closed this issue · 13 comments

Steps to reproduce:

First use the local compilation environment to generate nvda.pot, and use .pot to generate zh_CN.po.
Then translate the following string and save it, the following error message appears:
msgid "{symbol} as in {description}"
msgstr "{description} "
1 problem was found in the translation. The entries with errors are marked in red in the list. The error details will be displayed when you select such an entry. The file has been saved safely.
Using the locally generated .po translation file will not cause the above error.

Actual behavior:

After using poedit to translate {symbol} as in {description} and {number} {candidate} The string has an error.

Expected behavior:

The following error message does not appear:
1 problem was found in the translation. The entries with errors are marked in red in
the list. The error details will be displayed when you select such an entry. The file has
been saved safely.

System configuration

NVDA installed/portable/running from source:

install version
and
portable version

NVDA version:

nvda_snapshot_alpha-20026

Windows version:

Windows [version 10.0.19041.207]

Name and version of other software in use when reproducing the issue:

poedit 2.4.2

Other information about your system:

none

Other questions

Does the issue still occur after restarting your computer?

yes

Have you tried any other versions of NVDA? If so, please report their behaviors.

none

If addons are disabled, is your problem still occuring?

yes

Did you try to run the COM registry fixing tool in NVDA menu / tools?

Not within the scope of this tool
The problem mainly appears in the svn nvda.po file.
nvda.po updated with .pot generated by visual studio does not show the above error message.
Here are the two comparison files with errorswithout errors
thanks

Is this not fixed now? cc: @JulienCochuyt I remember there was a recent PR related to this but I am not sure.

@Adriani90 wrote:

Is this not fixed now? cc: @JulienCochuyt I remember there was a recent PR related to this but I am not sure.

I don't know. The only possibly related PR I could find is #11057, but it has not been merged and closed by @dingpengyu.

@dingpengyu can you also reproduce this when translating directly in the translation system by checking out the files from Asembla with SVN checkout? Or are you having this problem only when building the .po file with gettext in the source folder of NVDA?

@dingpengyu can you also reproduce this when translating directly in the translation system by checking out the files from Asembla with SVN checkout? Or are you having this problem only when building the .po file with gettext in the source folder of NVDA?

Yes, my translation in svn can reproduce this problem
The .po generated using visual studio does not have the svn po error.

hello all
Is there an update on the current issue?
thanks

Hello @dingpengyu

I am not sur to really understand what is the problem. But some details are missing in description of this issue:

  1. In the steps to reproduce:

    use .pot to generate zh_CN.po.

    How do you generate this? Do you use poEdit? Please add details.

    Then translate the following string and save it,

    Which string? I guess it is "{symbol} as in {description}" but please confirm.
    Which string do you put in the translation field?

  2. Actual result
    Where can you see the error message

  3. Expected result
    Please indicate what you expect. I guess simply no error. Correct?

Also, I have had a look at the SVN repo and can seen the following in zh_CN\nvda.po:

#. Translators: a message announcing a candidate's character and description.
#, python-brace-format
msgid "{symbol} as in {description}"
msgstr "{description} "

The {symbol} token is missing in the description, hence the error.

Did I miss something?

Hello @dingpengyu

I am not sur to really understand what is the problem. But some details are missing in description of this issue:

  1. In the steps to reproduce:

    use .pot to generate zh_CN.po.

    How do you generate this? Do you use poEdit? Please add details.

    Then translate the following string and save it,

    Which string? I guess it is "{symbol} as in {description}" but please confirm.
    Which string do you put in the translation field?

  2. Actual result
    Where can you see the error message

  3. Expected result
    Please indicate what you expect. I guess simply no error. Correct?

Also, I have had a look at the SVN repo and can seen the following in zh_CN\nvda.po:

#. Translators: a message announcing a candidate's character and description.
#, python-brace-format
msgid "{symbol} as in {description}"
msgstr "{description} "

The {symbol} token is missing in the description, hence the error.

Did I miss something?

Hi @xingkong0113 your last message here only quoted @CyrilleB79, can you please try to answer the questions. We really need more information to move forward.

Hi @xingkong0113 your last message here only quoted @CyrilleB79, can you please try to answer the questions. We really need more information to move forward.

The problem is that I found that the .po file generated using scons pot is different from the .po file generated by the svn script. The .po file generated with vs does not report an error when saving the string {symbol} as in {description}.
The svn .po will report an error in the poedit editor when saving.
Here are the similarities and differences between the two .po files:
The same point:
#. Translators: A mode that allows typing in the actual 'native' characters for an east-Asian input method language currently selected, rather than alpha numeric (Roman/English) characters.
msgid "Native input"
msgstr "本地输入"
Different points:
#. Translators: A mode that allows typing in the actual 'native' characters for an east-Asian input method language currently selected, rather than alpha numeric (Roman/English) characters.
#: NVDAHelper.py:301
msgid "Native input"
msgstr "本地输入"

How to reproduce the problem: First translate the {symbol} as in {description} string in /zh_CN/nvda.po in svn, then save it and poedit will report an error.
Next, translate the {symbol} as in {description} string using the .po file generated by the local build environment and save it. poedit will not report errors at this point.