[OpenStack-I18n] Question on Zanata error: Save FAILED: id 379354?

Ian Y. Choi ianyrchoi at gmail.com
Fri Sep 16 10:11:00 UTC 2016


Hello,

During dealing with the following issue in the below e-mail,
when I select 'Plural' form and try to save my translation, Zanata gives 
an error like:
"Save FAILED: id 379354, messages: Project or version is read-only".

(Screenshot: 
https://www.dropbox.com/s/xso2gwjswb9she4/Zanata-save_FAILED.png?dl=0 )

For singular form, it works fine.
Can't I select plural forms for Korean?

And strangely, when I try to use the new alpha editor, I cannot select 
'Plural Form'.
Am I might not able to find to select 'Plural Form' in the new alpha 
editor? :)


With many thanks,

/Ian

Ian Y. Choi wrote on 9/16/2016 6:57 PM:
> Hello,
>
> Recently, thanks to the help from Andreas, I am investigating on a 
> broken job
> for the translation import of Horizon project [1].
> The actual error message is
> : openstack_dashboard/locale/ko_KR/LC_MESSAGES/django.po:8273: a 
> format specification for argument 'req' doesn't exist in 'msgstr[0]'
>
> And then I have found that this error was from a string in horizon - 
> openstack_dashboard [2]
>
>             error_message = ungettext_lazy(
>                 'The requested instance cannot be launched as you only '
>                 'have %(avail)i of your quota available. ',
>                 'The requested %(req)i instances cannot be launched as 
> you '
>                 'only have %(avail)i of your quota available.',
>                 count)
>             params = {'req': count,
>                       'avail': available_count}
>
> In i18n translation infrastructure, only one of two (for singular and 
> plural) strings should be
> selected, translated, saved, and finally imported back to Horizon 
> project as [1].
> However, the first string only used "%(avail)i" string variable,
> and the second string used both "%(req)i" and "%(avail)i" string 
> variables.
>
> Since one Korean translator selected the first string, there will be 
> no "%(req)i" in Korean po file, which generates such an error.
> So my suggestion is to use the same string variables for both two 
> strings when we use ungettext_lazy function.
>
> Is it a bug from Horizon? Would it be other issues when we change like
> : from 'The requested instance cannot be launched as you only ' to 
> 'The requested %(req)i instance cannot be launched as you only '?
>
>
> [1] 
> http://logs.openstack.org/periodic/horizon-propose-translation-update/c038aab/console.html#_2016-09-16_07_37_22_312092
> [2] 
> http://git.openstack.org/cgit/openstack/horizon/tree/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py#n214
>
>
> With many thanks,
>
> /Ian





More information about the OpenStack-I18n mailing list