<div class="socmaildefaultfont" dir="ltr" style="font-family:Arial;font-size:10.5pt" ><div dir="ltr" >I don't think these kinds of structural edits are available through the Zanata UI (I'm not expert and welcome any correction)</div>
<div dir="ltr" > </div>
<div dir="ltr" >I don't have a script to automatically do the updates but I did outline my plan in the bug description. To repeat here:</div>
<div dir="ltr" ><p id="yui_3_10_3_1_1443033112934_2527" >cd openstack_<wbr>dashboard/<wbr>locale/<wbr>ru/LC_MESSAGES<br>cp django.po django.po-tmp<br>grep -v msgstr.2. django.po-tmp > django.po<br>sed -i s/msgstr.<wbr>3./msgstr[<wbr>2]/ django.po</p>
<p>and edit the plurality function to be<br>"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"<br>"%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"</p></div>
<div dir="ltr" ><div>was my plan to fix the openstack_dashboard ... django.po file. This is the only one that results in bad behavior in Horizon today.</div>
<div> </div>
<div>However, since this is such a difficult process I think we should update all 4 Russian PO file while we are doing this:</div>
<div>openstack_dashboard/horizon and django.po/djangojs.po for each part.</div>
<div> </div>
<div>Daisy - I'm happy to help work through this, including testing out our proposed files in Horizon. Do you want to schedule a time and coordinate this through openstack-i18n or some meeting IRC channel?</div>
<div><br>Doug</div>
<div> </div>
<blockquote data-history-content-modified="1" style="border-left:solid #aaaaaa 2px; margin-left:5px; padding-left:5px; direction:ltr" >----- Original message -----<br>From: Ying Chun Guo/China/IBM<br>To: Douglas Fish/Rochester/IBM@IBMUS@IBMAU<br>Cc: ilyaalekseyev@acm.org, openstack-i18n@lists.openstack.org<br>Subject: Re: [Openstack-i18n] Would like Zanata branch to correct 1494819<br>Date: Wed, Sep 23, 2015 11:25 AM<br> <br><font size="2" >Thank you for looking into it, Illya.</font><br><font size="2" >I think we need to fix it, although the manually process might be a little complex.</font><br><br><font size="2" >I'm going to:</font><br><font size="2" >1. Create a new version in Zanata</font><br><font size="2" >2. Mark master as read only</font><br><font size="2" >2. Pull the source files and the translation files.</font><br><font size="2" >3. Change the </font><tt><font face="" size="3" >pluralities</font></tt><font size="2" > settings in Russian translation files.</font><br><font size="2" >4. Upload the source files and translation files to the new version.</font><br><font size="2" >5. Check if the all things are right, change master version name to "master-old", </font><br><font size="2" >and then change the new version name to "master"</font><br><br><font size="2" >How do you want to update these </font><tt><font face="" size="3" >pluralities </font></tt><font size="2" >then? By program ? Or manually ?</font><br><font size="2" >Is it possible to make the changes through Zanata UI, other than uploading po files ?</font><br><br><font size="2" >Best regards<br>Ying Chun Guo (Daisy)</font><br><br><br><tt><font face="" size="3" >Douglas Fish/Rochester/IBM wrote on 09/23/2015 04:38:19 AM:<br><br>> From: Douglas Fish/Rochester/IBM@IBMUS</font></tt><br><tt><font face="" size="3" >> To: ilyaalekseyev@acm.org</font></tt><br><tt><font face="" size="3" >> Cc: guoyingc@cn.ibm.com, openstack-i18n@lists.openstack.org</font></tt><br><tt><font face="" size="3" >> Date: 09/23/2015 04:38 AM</font></tt><br><tt><font face="" size="3" >> Subject: Re: [Openstack-i18n] Would like Zanata branch to correct 1494819</font></tt><br><tt><font face="" size="3" >> <br>> Hi Ilya,</font></tt><br><tt><font face="" size="3" >> </font></tt><br><tt><font face="" size="3" >> Thanks for looking at this! Unfortunately having 4 pluralities<br>> confuses Horizon. I've tested out stripping one of the pluralities<br>> and restoring the expected Plural-forms definition (just like the<br>> one you linked) and it works great.</font></tt><br><tt><font face="" size="3" >> </font></tt><br><tt><font face="" size="3" >> I had hoped to just repair the PO files in this way and upload the<br>> corrected translations to Zanata.</font></tt><br><tt><font face="" size="3" >> </font></tt><br><tt><font face="" size="3" >> Unfortunately, I understand from Daisy's research that once a<br>> language/project has been created in Zanata in this way we cannot<br>> just upload a PO file with corrected pluralities . More<br>> investigation will be needed to understand the process to fix this.</font></tt><br><tt><font face="" size="3" >> <br>> Doug </font></tt><br><tt><font face="" size="3" >> </font></tt><br><tt><font face="" size="3" >> </font></tt><br><tt><font face="" size="3" >> ----- Original message -----<br>> From: Ilya Alekseyev <ilyaalekseyev@acm.org><br>> Sent by: ilya@phpcoder.ru<br>> To: Douglas Fish/Rochester/IBM@IBMUS<br>> Cc: Ying Chun Guo <guoyingc@cn.ibm.com>, "openstack-<br>> i18n@lists.openstack.org" <openstack-i18n@lists.openstack.org><br>> Subject: Re: [Openstack-i18n] Would like Zanata branch to correct 1494819<br>> Date: Tue, Sep 22, 2015 2:39 PM<br>> </font></tt><br><tt><font face="" size="3" >> Hi Doug and Daisy! </font></tt><br><tt><font face="" size="3" >> </font></tt><br><tt><font face="" size="3" >> Looks like we have wrong pluralities in current release:</font></tt><br><tt><font face="" size="3" >> in <a href="https://github.com/openstack/horizon/blob/master/" target="_blank" >https://github.com/openstack/horizon/blob/master/</a><br>> openstack_dashboard/locale/ru/LC_MESSAGES/django.po</font></tt><br><tt><font face="" size="3" >> </font></tt><br><tt><font face="" size="3" >> we have: </font></tt><br><tt><font face="" size="3" >> "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"</font></tt><br><tt><font face="" size="3" >> "%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n"</font></tt><br><tt><font face="" size="3" >> "%100>=11 && n%100<=14)? 2 : 3);\n"</font></tt><br><tt><font face="" size="3" >> </font></tt><br><tt><font face="" size="3" >> but in previuos releses we have:</font></tt><br><tt><font face="" size="3" >> "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%<br>> 10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"</font></tt><br><tt><font face="" size="3" >> </font></tt><br><tt><font face="" size="3" >> Last one is right for Russian.</font></tt><br><tt><font face="" size="3" >> </font></tt><br><tt><font face="" size="3" >> We can make translation in Zanata for 4 pluralities, but it can give<br>> in some cases bugs with wrong plural forms.</font></tt><br><tt><font face="" size="3" >> </font></tt><br><tt><font face="" size="3" >> Kind regards,</font></tt><br><tt><font face="" size="3" >> Ilya Alekseyev.</font></tt><br><tt><font face="" size="3" >> </font></tt><br><tt><font face="" size="3" >> 2015-09-22 14:22 GMT+03:00 Douglas Fish <drfish@us.ibm.com>: </font></tt><br><tt><font face="" size="3" >> Hi Daisy,</font></tt><br><tt><font face="" size="3" >> </font></tt><br><tt><font face="" size="3" >> I am certain this issue is caused by plural forms. The issue with<br>> missing menus is seen with the current 4 plural form translations;<br>> when I correct the PO file to have 3 forms Horizon properly displaysthe menus.</font></tt><br><tt><font face="" size="3" >> <br>> Doug </font></tt><br><tt><font face="" size="3" >> </font></tt><br><tt><font face="" size="3" >> </font></tt><br><tt><font face="" size="3" >> ----- Original message -----<br>> From: Ying Chun Guo/China/IBM<br>> To: Douglas Fish/Rochester/IBM@IBMUS@IBMAU<br>> Cc: openstack-i18n@lists.openstack.org<br>> Subject: Re: [Openstack-i18n] Would like Zanata branch to correct 1494819<br>> Date: Tue, Sep 22, 2015 12:49 AM<br>> <br>> Hi, Doug<br>><br>> We need to consider it carefully.<br>><br>> After working with Zanata dev team, I got to understand:<br>><br>> 1. Zanata has its own plural forms. If po file has its own plural<br>> form, Zanata will use that.<br>> Otherwise, Zanata will use its own plural form. Pluralforms in Zanata:<br>> nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 &&<br>> (n%100<10 || n%100>=20) ? 1 : 2).<br>> So it looks like that OpenStack po files overrode the pluralforms in Zanata.<br>><br>> 2. Zanata currently don't allow update of plural forms once the<br>> document has been uploaded to Zanata.<br>> Even with deletion of that source document and re-upload (in the<br>> same project-version, same doc name and same path),<br>> Zanata will still reuse the old pluralform.<br>><br>> 3. If we want to update the pluralforms, we will need to do it in<br>> new project-version<br>> (don't use copy-from previous version function).<br>><br>> I think we need to carefully design the steps to change pluralforms<br>> of Russian.<br>> At first, I want to confirm with you, are you sure this issue is<br>> caused by plural forms?<br>><br>> Best regards<br>> Ying Chun Guo (Daisy)<br>><br>><br>> Douglas Fish/Rochester/IBM wrote on 2015/09/18 23:38:22:<br>><br>> > From: Douglas Fish/Rochester/IBM@IBMUS<br>> > To: guoyingc@cn.ibm.com<br>> > Cc: openstack-i18n@lists.openstack.org<br>> > Date: 2015/09/18 23:38<br>> > Subject: Re: [Openstack-i18n] Would like Zanata branch to correct 1494819<br>> > <br>> > Hi Daisy,<br>> > <br>> > Yes, I understand - I don't think I can even propose my branch<br>> > unless I am added as a translator by the Russian team.<br>> > <br>> > My proposal would include removing one plural form for<br>> > 4 messages in horizon django.po<br>> > 1 message in horizon djangojs.po<br>> > 144 messages in openstack_dashboard django.po<br>> > 0 messages in openstack_dashboard djangojs.po<br>> > plus the pluralization specification would be updated in all 4 files.<br>> > <br>> > Doug<br>> > <br>> > ----- Original message -----<br>> > From: Ying Chun Guo <guoyingc@cn.ibm.com><br>> > To: Douglas Fish/Rochester/IBM@IBMUS<br>> > Cc: openstack-i18n@lists.openstack.org<br>> > Subject: Re: [Openstack-i18n] Would like Zanata branch to correct 1494819<br>> > Date: Fri, Sep 18, 2015 3:25 AM<br>> > <br>> > Are there a lot of changes in your proposed po files ?<br>> > I'm still waiting for Russian team's response.<br>> ><br>> > Best regards<br>> > Ying Chun Guo (Daisy)<br>> ><br>> ><br>> > "Douglas Fish" <drfish@us.ibm.com> wrote on 09/18/2015 05:37:07 AM:<br>> ><br>> > > From: "Douglas Fish" <drfish@us.ibm.com><br>> > > To: openstack-i18n@lists.openstack.org<br>> > > Date: 09/18/2015 05:38 AM<br>> > > Subject: [Openstack-i18n] Would like Zanata branch to correct 1494819<br>> > > </font></tt><br><tt><font face="" size="3" >> > > Hi translation friends,<br>> > ><br>> > > I'd like to contribute 4 PO files for the Horizon Russian<br>> > > translation to correct the issue<br>> > > <a href="https://bugs.launchpad.net/openstack-i18n/+bug/1494819" target="_blank" >https://bugs.launchpad.net/openstack-i18n/+bug/1494819</a><br>> > ><br>> > > These uploads won't contain any new translations, but instead will<br>> > > be an adjustment to the PO files so they have 3 pluralities, which<br>> > is standard<br>> > > <a href="http://localization-guide.readthedocs.org/en/latest/l10n/pluralforms.html" target="_blank" >http://localization-guide.readthedocs.org/en/latest/l10n/pluralforms.html</a><br>> > ><br>> > > Specifically, I plan to remove the msgstr[2] translation from the<br>> > > files (because msgstr[2] is blank for many cases), rename the msgstr<br>> > > [3] translation to msgstr[2] and adjust the plurality specification to<br>> > > nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 &&<br>> > > (n%100<10 || n%100>=20) ? 1 : 2);<br>> > ><br>> > > As discussed in the team meeting <a href="http://eavesdrop.openstack.org/" target="_blank" >http://eavesdrop.openstack.org/</a><br>> > > meetings/openstack_i18n_meeting/2015/openstack_i18n_meeting.<br>> > > 2015-09-17-13.00.log.html<br>> > > please create a Zanata branch so I can propose these corrections<br>> for review.<br>> > ><br>> > > Thanks!<br>> > ><br>> > > Doug</font></tt><br><tt><font face="" size="3" >> > > _______________________________________________<br>> > > Openstack-i18n mailing list<br>> > > Openstack-i18n@lists.openstack.org<br>> > > <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-i18n" target="_blank" >http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-i18n</a></font></tt><br><tt><font face="" size="3" >> <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" target="_blank" >http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-i18n</a><br>> </font></tt></blockquote></div></div><BR>