<html><body><p>Bug reported<br><br><a href="https://bugs.launchpad.net/horizon/+bug/1532092">https://bugs.launchpad.net/horizon/+bug/1532092</a><br><br>Best regards<br>Ying Chun Guo (Daisy)<br><br><br><tt>Akihiro Motoki <amotoki@gmail.com> wrote on 2016/01/07 19:28:59:<br><br>> From: Akihiro Motoki <amotoki@gmail.com></tt><br><tt>> To: Ying Chun Guo/China/IBM@IBMCN</tt><br><tt>> Cc: "openstack-i18n@lists.openstack.org" <Openstack-i18n@lists.openstack.org></tt><br><tt>> Date: 2016/01/07 19:30</tt><br><tt>> Subject: Re: [Openstack-i18n] Czech translation error</tt><br><tt>> <br>> I am not sure it is a bug of the source string. It works as the <br>> source language.<br>> The similar example is shown in the gettext documentation I quoted in<br>> the first mail.<br>> <br>> Apart from the warning you mentioned, after we change msgstr[0] to contain %s<br>> in a translation, the error disappears.<br>> IMHO, it is a bug of GNU gettext.<br>> <br>> On the other hand, I agree it is less confusing if the source string<br>> contains %s.<br>> Feel free to file a bug to horizon with a background.<br>> <br>> Akihiro<br>> <br>> 2016-01-07 18:19 GMT+09:00 Ying Chun Guo <guoyingc@cn.ibm.com>:<br>> > Hi, Akihiro<br>> ><br>> > It is a bug in the source code, isn't it ?<br>> > I don't see the translations are wrong.<br>> ><br>> > msgid is "Instance launched."<br>> > We cannot simply add %s to msgstr[0].<br>> > Zanata will report a warning: Unexpected variable: %s<br>> ><br>> > I think the source string "Instance launched." should add %s firstly.<br>> > "Instance launched." should be changed to "Instance %s launched."<br>> > And then, the translation msgstr[0] should add %s correspondingly.<br>> ><br>> > Best regards<br>> > Ying Chun Guo (Daisy)<br>> ><br>> ><br>> > Akihiro Motoki <amotoki@gmail.com> wrote on 2016/01/07 01:44:42:<br>> ><br>> >> From: Akihiro Motoki <amotoki@gmail.com><br>> >> To: "openstack-i18n@lists.openstack.org"<br>> >> <Openstack-i18n@lists.openstack.org><br>> >> Date: 2016/01/07 01:46<br>> >> Subject: [Openstack-i18n] Czech translation error<br>> ><br>> >><br>> >> Hi Czech language team and i18n Zanata admin,<br>> >><br>> >> Horizon translation import is broken due to Czech translation.<br>> >> This blocks all translation imports of horizon.<br>> >> Could you fix it?<br>> >><br>> >> <a href="https://review.openstack.org/#/c/259677">https://review.openstack.org/#/c/259677</a><br>> >><br>> >> The error is like this:<br>> >> <a href="http://logs.openstack.org/77/259677/15/check/gate-horizon-dsvm-">http://logs.openstack.org/77/259677/15/check/gate-horizon-dsvm-</a><br>> >> integration/e5ed03e/logs/devstacklog.txt.gz#_2016-01-02_17_55_04_608<br>> >> 2016-01-02 17:55:04.608 | CommandError: Execution of msgfmt failed:<br>> >> /opt/stack/new/horizon/openstack_dashboard/locale/cs/LC_MESSAGES/<br>> >> djangojs.po:655:<br>> >> number of format specifications in 'msgid_plural' and 'msgstr[0]' does<br>> >> not match<br>> >> 2016-01-02 17:55:04.608 | msgfmt: found 1 fatal error<br>> >><br>> >> The error point is:<br>> >> <a href="https://review.openstack.org/#/c/259677/15/openstack_dashboard/">https://review.openstack.org/#/c/259677/15/openstack_dashboard/</a><br>> >> locale/cs/LC_MESSAGES/djangojs.po<br>> >><br>> >> I think we need to add %s to msgstr[0] to avoid msgfmt error.<br>> >><br>> >> #, python-format<br>> >> msgid "Instance launched."<br>> >> msgid_plural "%s instances launched."<br>> >> msgstr[0] "Instance spuštěna.<br>> >> msgstr[1] "Spuštěny %s instance."<br>> >> msgstr[2] "Spuštěno %s instancí."<br>> >><br>> >><br>> >> BTW, I am not sure this is valid according to GNU gettext documentation<br>> >> [1],<br>> >> but msgfmt actually does not support this form.<br>> >> In the example of [1], msgid does not contain %s but all msgstr[n] contain<br>> >> %s.<br>> >> Although there is no explicit description, %s must be contained in all<br>> >> msgstr[n].<br>> >> To avoid confusion, it is better to contain %s in 'msgid' (singular<br>> >> form) as well.<br>> >><br>> >> [1] <a href="https://www.gnu.org/software/gettext/manual/html_node/">https://www.gnu.org/software/gettext/manual/html_node/</a><br>> >> Translating-plural-forms.html<br>> >><br>> >><br>> >> Akihiro<br>> >><br>> >> _______________________________________________<br>> >> Openstack-i18n mailing list<br>> >> Openstack-i18n@lists.openstack.org<br>> >> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-i18n">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-i18n</a><br>> ><br>> <br></tt><BR>
</body></html>