Hi Czech language team and i18n Zanata admin, Horizon translation import is broken due to Czech translation. This blocks all translation imports of horizon. Could you fix it? https://review.openstack.org/#/c/259677 The error is like this: http://logs.openstack.org/77/259677/15/check/gate-horizon-dsvm-integration/e... 2016-01-02 17:55:04.608 | CommandError: Execution of msgfmt failed: /opt/stack/new/horizon/openstack_dashboard/locale/cs/LC_MESSAGES/djangojs.po:655: number of format specifications in 'msgid_plural' and 'msgstr[0]' does not match 2016-01-02 17:55:04.608 | msgfmt: found 1 fatal error The error point is: https://review.openstack.org/#/c/259677/15/openstack_dashboard/locale/cs/LC_... I think we need to add %s to msgstr[0] to avoid msgfmt error. #, python-format msgid "Instance launched." msgid_plural "%s instances launched." msgstr[0] "Instance spuštěna. msgstr[1] "Spuštěny %s instance." msgstr[2] "Spuštěno %s instancí." BTW, I am not sure this is valid according to GNU gettext documentation [1], but msgfmt actually does not support this form. In the example of [1], msgid does not contain %s but all msgstr[n] contain %s. Although there is no explicit description, %s must be contained in all msgstr[n]. To avoid confusion, it is better to contain %s in 'msgid' (singular form) as well. [1] https://www.gnu.org/software/gettext/manual/html_node/Translating-plural-for... Akihiro
Hi, Akihiro It is a bug in the source code, isn't it ? I don't see the translations are wrong. msgid is "Instance launched." We cannot simply add %s to msgstr[0]. Zanata will report a warning: Unexpected variable: %s I think the source string "Instance launched." should add %s firstly. "Instance launched." should be changed to "Instance %s launched." And then, the translation msgstr[0] should add %s correspondingly. Best regards Ying Chun Guo (Daisy) Akihiro Motoki <amotoki@gmail.com> wrote on 2016/01/07 01:44:42:
From: Akihiro Motoki <amotoki@gmail.com> To: "openstack-i18n@lists.openstack.org" <Openstack-i18n@lists.openstack.org> Date: 2016/01/07 01:46 Subject: [Openstack-i18n] Czech translation error
Hi Czech language team and i18n Zanata admin,
Horizon translation import is broken due to Czech translation. This blocks all translation imports of horizon. Could you fix it?
https://review.openstack.org/#/c/259677
The error is like this: http://logs.openstack.org/77/259677/15/check/gate-horizon-dsvm- integration/e5ed03e/logs/devstacklog.txt.gz#_2016-01-02_17_55_04_608 2016-01-02 17:55:04.608 | CommandError: Execution of msgfmt failed: /opt/stack/new/horizon/openstack_dashboard/locale/cs/LC_MESSAGES/ djangojs.po:655: number of format specifications in 'msgid_plural' and 'msgstr[0]' does not match 2016-01-02 17:55:04.608 | msgfmt: found 1 fatal error
The error point is: https://review.openstack.org/#/c/259677/15/openstack_dashboard/ locale/cs/LC_MESSAGES/djangojs.po
I think we need to add %s to msgstr[0] to avoid msgfmt error.
#, python-format msgid "Instance launched." msgid_plural "%s instances launched." msgstr[0] "Instance spuštěna. msgstr[1] "Spuštěny %s instance." msgstr[2] "Spuštěno %s instancí."
BTW, I am not sure this is valid according to GNU gettext documentation [1], but msgfmt actually does not support this form. In the example of [1], msgid does not contain %s but all msgstr[n] contain %s. Although there is no explicit description, %s must be contained in all msgstr[n]. To avoid confusion, it is better to contain %s in 'msgid' (singular form) as well.
[1] https://www.gnu.org/software/gettext/manual/html_node/ Translating-plural-forms.html
Akihiro
_______________________________________________ Openstack-i18n mailing list Openstack-i18n@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-i18n
On Thu, Jan 7, 2016 at 7:19 PM, Ying Chun Guo <guoyingc@cn.ibm.com> wrote:
is "Instance launched." We cannot simply add %s to msgstr[0]. Zanata will report a warning: Unexpected variable: %s
+1 To Daisy. The warning appears because of the source string does not contain the variable '%s'. Keep in mind that's just warning, it does not prevent you from saving the translations. But displaying the translation might cause issue since there's no variable in the source. --------------------------------------------- Alex Eng Globalisation Tools Engineering DID: +61 3514 8262 <callto:+61+3514+8262> Mobile: +614 2335 3457 <callto:+614+2335+3457> Red Hat, Asia-Pacific Pty Ltd Level 1, 193 North Quay Brisbane 4000 Office: +61 7 3514 8100 <callto:+61+7+3514+8100> Fax: +61 7 3514 8199 <callto:+61+7+3514+8199> Website: www.redhat.com
On 01/07/2016 09:31 PM, Alex Eng wrote:
On Thu, Jan 7, 2016 at 7:19 PM, Ying Chun Guo <guoyingc@cn.ibm.com <mailto:guoyingc@cn.ibm.com>> wrote:
is "Instance launched." We cannot simply add %s to msgstr[0]. Zanata will report a warning: Unexpected variable: %s
+1 To Daisy.
The warning appears because of the source string does not contain the variable '%s'.
Keep in mind that's just warning, it does not prevent you from saving the translations. But displaying the translation might cause issue since there's no variable in the source.
Note that it's msgfmt that fails parsing this in https://review.openstack.org/#/c/259677 - see: http://logs.openstack.org/77/259677/20/check/gate-horizon-dsvm-integration/8... Andreas
---------------------------------------------
Alex Eng Globalisation Tools Engineering DID:+61 3514 8262 <callto:+61+3514+8262> Mobile:+614 2335 3457 <callto:+614+2335+3457>
Red Hat, Asia-Pacific Pty Ltd Level 1, 193 North Quay Brisbane 4000 Office:+61 7 3514 8100 <callto:+61+7+3514+8100> Fax:+61 7 3514 8199 <callto:+61+7+3514+8199> Website:www.redhat.com <http://www.redhat.com/>
_______________________________________________ Openstack-i18n mailing list Openstack-i18n@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-i18n
-- Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
Thanks Andreas! So it appears msgfmt is validating the same thing. In this case, correction in source string is needed (include %s) before translation can be done. --------------------------------------------- Alex Eng Globalisation Tools Engineering DID: +61 3514 8262 <callto:+61+3514+8262> Mobile: +614 2335 3457 <callto:+614+2335+3457> Red Hat, Asia-Pacific Pty Ltd Level 1, 193 North Quay Brisbane 4000 Office: +61 7 3514 8100 <callto:+61+7+3514+8100> Fax: +61 7 3514 8199 <callto:+61+7+3514+8199> Website: www.redhat.com On Fri, Jan 8, 2016 at 6:51 AM, Andreas Jaeger <aj@suse.com> wrote:
On 01/07/2016 09:31 PM, Alex Eng wrote:
On Thu, Jan 7, 2016 at 7:19 PM, Ying Chun Guo <guoyingc@cn.ibm.com <mailto:guoyingc@cn.ibm.com>> wrote:
is "Instance launched." We cannot simply add %s to msgstr[0]. Zanata will report a warning: Unexpected variable: %s
+1 To Daisy.
The warning appears because of the source string does not contain the variable '%s'.
Keep in mind that's just warning, it does not prevent you from saving the translations. But displaying the translation might cause issue since there's no variable in the source.
Note that it's msgfmt that fails parsing this in https://review.openstack.org/#/c/259677 - see:
http://logs.openstack.org/77/259677/20/check/gate-horizon-dsvm-integration/8...
Andreas
---------------------------------------------
Alex Eng Globalisation Tools Engineering DID:+61 3514 8262 <callto:+61+3514+8262> Mobile:+614 2335 3457 <callto:+614+2335+3457>
Red Hat, Asia-Pacific Pty Ltd Level 1, 193 North Quay Brisbane 4000 Office:+61 7 3514 8100 <callto:+61+7+3514+8100> Fax:+61 7 3514 8199 <callto:+61+7+3514+8199> Website:www.redhat.com <http://www.redhat.com/>
_______________________________________________ Openstack-i18n mailing list Openstack-i18n@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-i18n
-- Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
_______________________________________________ Openstack-i18n mailing list Openstack-i18n@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-i18n
participants (4)
-
Akihiro Motoki
-
Alex Eng
-
Andreas Jaeger
-
Ying Chun Guo