Bug #11081

Adjust check_po to ignore more plural form errors

Added by sajolida 2016-02-08 17:23:21 . Updated 2017-06-28 14:47:21 .

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Internationalization
Target version:
Start date:
2016-02-08
Due date:
% Done:

100%

Feature Branch:
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Deliverable for:

Description

The reason behind commit:c4a0ac1 is still preventing us from fixing Bug #9992.

We should:

  1. Run check_po with i18nspector from both Debian stable and testing/sid on everything we can: at least our main repository, and ideally a few more ones like the Greeter and Installer ones (after reverting the commits that drop PO files due to plural form errors).
  2. Add, to the list of expections, all plural form -related tags that we want to ignore (note that some tags were added/renamed between 0.17 and 0.23, for example; see upstream changelog for details), until the output is clear of false positives.
  3. Make sure the PO files we disabled because of plural form errors (that we now consider as false positives) are integrated back, for example ru.po in Tails Greeter.

Subtasks


Related issues

Related to Tails - Feature #10747: Re-enable the check_PO_master Jenkins job Resolved 2015-12-13
Has duplicate Tails - Bug #9992: Greeter stays in English when Russian is selected Duplicate 2015-08-13

History

#1 Updated by sajolida 2016-02-08 17:23:28

  • Status changed from New to Confirmed

#2 Updated by sajolida 2016-02-08 17:25:02

  • Description updated

#3 Updated by sajolida 2016-02-08 17:25:58

  • has duplicate Bug #9992: Greeter stays in English when Russian is selected added

#4 Updated by intrigeri 2016-02-09 20:33:22

  • Description updated

#5 Updated by intrigeri 2016-02-09 20:34:51

  • Assignee set to sajolida

(You’ve set a target version in a month, so I assume you intend to take care of it yourself.)

#6 Updated by sajolida 2016-02-10 12:58:40

  • Assignee deleted (sajolida)
  • Target version deleted (Tails_2.2)

No.

#7 Updated by intrigeri 2016-02-10 14:02:27

  • Assignee set to sajolida
  • QA Check set to Info Needed

> No.

OK, thanks for clarifying. So I’ll need to ask you more info about the suggested course of action, since in the current state of things I don’t understand it enough to implement it myself (and I guess it won’t be much easier for someone else than me).

> * Update the requirement for the latest i18nspector in unstable. It installs fine on Tails Jessie.

I’ll assume we need i18nspector 0.23 because it adds more precise tags (leading-junk-in-plural-forms and trailing-junk-in-plural-forms) for plural forms.

> * Remove all errors we had about plural forms.

I’m sorry I don’t understand what you mean here => please clarify.

> * Run check_po on everything we can.

OK.

> * Simplify the output accordingly.

I guess this is about adding more plural -forms related i18nspector tags to the list of those we ignore.

> * Make sure the PO files we disabled because of this are integrated back, for example ru.po from Tails Greeter.

OK.

#8 Updated by sajolida 2016-02-12 14:29:55

No problem. I’ll clarify the plan.

>> * Update the requirement for the latest i18nspector in unstable. It installs fine on Tails Jessie.
>
> I’ll assume we need i18nspector 0.23 because it adds more precise tags (leading-junk-in-plural-forms and trailing-junk-in-plural-forms) for plural forms.

I arrived at this after seeing that i18nspector from stable and unstable
return different error codes when run on the faulty ru.po from
greeter:fac5dff.

With the version from stable I get:

W: ru.po: incorrect-unused-plural-forms

With the version from unstable I get:

W: ru.po: unusual-unused-plural-forms
W: ru.po: codomain-error-in-unused-plural-forms

The online doc lists the errors from i18nspector/unstable (it has no
reference to incorrect-unused-plural-forms):

https://i18nspector.readthedocs.org/en/stable/

>> * Remove all errors we had about plural forms.
>
> I’m sorry I don’t understand what you mean here => please clarify.

Seeing that the error codes about plural forms have changes, I thought
we should reevaluate the ones we already have against i18nspector/unstable.

Actually right now we only have no-plural-forms-header-field which is
still in the online documentation, so in the end I guess we shouldn’t
change anything we already have.

>> * Run check_po on everything we can.
>
> OK.
>
>> * Simplify the output accordingly.
>
> I guess this is about adding more plural -forms related i18nspector tags to the list of those we ignore.

Yes. If we stick to the rationale behind tails:c4a0ac1 (“Transifex now
what they are doing regarding plural forms even if i18nspector doesn’t
like them”), then maybe we should ignore all of them. Starting with
unusual-unused-plural-forms and codomain-error-in-unused-plural-forms.

But I haven’t investigated this particular errors enough to know whether
that’s the right thing to do. Or if we should instead report bugs to
Transifex or i18nspector for example.

I guess that’s how far I went…

#9 Updated by sajolida 2016-02-12 14:30:22

  • Assignee deleted (sajolida)
  • QA Check deleted (Info Needed)

#10 Updated by intrigeri 2016-02-13 01:28:23

  • Assignee set to sajolida
  • QA Check set to Info Needed

> The online doc lists the errors from i18nspector/unstable (it has no reference to incorrect-unused-plural-forms):

This seems to confirm the fact that incorrect-unused-plural-forms was renamed to unusual-unused-plural-forms in 0.22, which is documented in the upstream changelog.

Also, the 0.22 changelog entry reads “Improve plural forms codomain checks”, which probably explains why you see a new codomain-error-in-unused-plural-forms error, that is left for us to investigate and see if we want to ignore it.

In any case: I’d much rather support both 0.17 and 0.23. It only requires adding, to the list of expections, whatever i18nspector/unstable tag we want to ignore, which we would have to do anyway if we wanted to support 0.23+ only. This seems cheaper to me than requiring 0.23 everywhere until Tails 3.x is out (I got it that it installs as-is on Jessie now, but it may not be the case in 6 months anymore, and guess who will have to maintain backports? ;)

Or did I miss anything that really warrants requiring i18nspector 0.23, or makes it a cheaper option?

(BTW, just pushed ff06c47 to jenkins-tool repo: [master ff06c47] check_po: also accept incorrect-plural-forms’ new name, i.e. unusual-plural-forms, as a first step in the right direction, regardless of what way we choose to go.)

>>> * Remove all errors we had about plural forms.
>>
>> I’m sorry I don’t understand what you mean here => please clarify.

> Seeing that the error codes about plural forms have changes, I thought we should reevaluate the ones we already have against i18nspector/unstable.

Now I understand. Thanks!

> Yes. If we stick to the rationale behind tails:c4a0ac1 (“Transifex now what they are doing regarding plural forms even if i18nspector doesn’t like them”), then maybe we should ignore all of them. Starting with unusual-unused-plural-forms and codomain-error-in-unused-plural-forms.

Indeed. I guess it’ll be the conclusion after it’s quickly investigated as you suggest:

> But I haven’t investigated this particular errors enough to know whether that’s the right thing to do. Or if we should instead report bugs to Transifex or i18nspector for example.

ACK.

> I guess that’s how far I went…

Thanks a lot!

Now I’d just like a confirmation wrt. the i18nspector/unstable requirement above, and I’ll update the ticket description so that someone else can pick it up from here.

#11 Updated by sajolida 2016-02-14 16:27:03

> Now I’d just like a confirmation wrt. the i18nspector/unstable requirement above

Full confirmation!

#12 Updated by intrigeri 2016-02-19 10:56:28

  • Description updated
  • Assignee deleted (sajolida)
  • QA Check deleted (Info Needed)

#13 Updated by intrigeri 2016-02-29 13:46:02

  • Status changed from Confirmed to In Progress
  • % Done changed from 0 to 10

Done all this (on our main Git repo + Greeter + Installer), except I only used i18nspector from sid, and did not try with the one from Jessie.

#14 Updated by intrigeri 2016-02-29 13:46:09

  • related to Feature #10747: Re-enable the check_PO_master Jenkins job added

#15 Updated by Anonymous 2017-06-28 13:52:15

  • Assignee set to intrigeri

Can you please see what’s still left to be done here? It looks like you fixed what this ticket was about? If not, could you eventually clarify what’s missing? thanks!

#16 Updated by intrigeri 2017-06-28 14:47:21

  • Status changed from In Progress to Resolved
  • Assignee deleted (intrigeri)
  • % Done changed from 10 to 100

I don’t recall seeing any issue about this lately, and since then Stretch is out so my tests (done back then on sid) should work just the same on stable.