Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status of plural translations #2666

Closed
gravitystorm opened this issue Jun 24, 2020 · 11 comments
Closed

Status of plural translations #2666

gravitystorm opened this issue Jun 24, 2020 · 11 comments

Comments

@gravitystorm
Copy link
Collaborator

We recently had a plural translation that was missing the "other" key, which caused errors in production. We now run tests to make sure that every translation has the "other" key.

However, there are still some wrinkles to be ironed out, and I'm not sure what the status is of these:

  • @translatewiki commits directly to master, so we end up with a failing test in master and then other pull requests (like Document the step of building translations when installing #2664) end up failing too.
  • It's not clear to me if @translatewiki are updating their system to prevent missing "other" keys in plural translations, or if that has been done already.
  • It's also not clear to me what the situtation is for e.g. Polish translators, where for integers we only need the one/few/many keys (other is used for decimals, afaik). Will translatewiki automatically duplicate the "many" key into "other" when they push? Or will translators have to manually duplicate it? Or should we be building a list of such situations and ignoring the missing other key for specific languages in our tests?
@tomhughes
Copy link
Member

As far as I know Polish is the language where it's an issue and I'm not really interested in making a special case for it, especially as you'd have to consider whether any of the translations allowed non-integer values.

On top of that if you don't require other then you have to require all the other keys instead, as it will back to other if one of those is missing and you will still get an error rather than it falling back to english.

@Nikerabbit
Copy link
Contributor

  1. If you'd like we can start sending pull requests instead. Basically we need a branch with force push rights, and our scripts will automatically create a pull request for each commit, or update the open pull request if it is not merged yet.
  2. We have deployed validators that prevent new translations without all defined plural forms.
  3. I filed a task which proposes a new syntax to signal repetition of forms. It is not scheduled yet. Feedback is welcome (I can relay there if you leave it here). We are also soon deploying a quick fix which will fill the key other with latest available translation (in the canonical order of plural keywords) that is provided.

@tomhughes
Copy link
Member

@Nikerabbit there's a handful of legacy ones (a2620bd) that I keep having to remove - could you flush those on the TW side or something to force retranslation?

@Nikerabbit
Copy link
Contributor

Nikerabbit commented Jun 24, 2020

See above, in the next export after the deployment of the quick fix, those should have other form present.

@gravitystorm
Copy link
Collaborator Author

gravitystorm commented Jul 1, 2020

  1. If you'd like we can start sending pull requests instead. Basically we need a branch with force push rights, and our scripts will automatically create a pull request for each commit, or update the open pull request if it is not merged yet.

Do we have the ability to make a PR that gets merged automatically if all the tests pass?

@gravitystorm
Copy link
Collaborator Author

I mean, I like the idea of creating a PR so that we don't commit things directly to master without running the tests, but at the same time, I'm not offering to keep on top of all the additional PRs given that things run smoothly 99% of the time. So if we can run the tests, and then commit if they pass, that would work for me.

@tomhughes
Copy link
Member

We can probably write an action to automate it.

@maro-21
Copy link

maro-21 commented Jul 5, 2020

It's also not clear to me what the situtation is for e.g. Polish translators, where for integers we only need the one/few/many keys (other is used for decimals, afaik). Will translatewiki automatically duplicate the "many" key into "other" when they push? Or will translators have to manually duplicate it? Or should we be building a list of such situations and ignoring the missing other key for specific languages in our tests?

I've recently added other key to all pluralizable Polish translations. So there's no need to worry about it. I had to add it because without it the translations wouldn't appear, although this key isn't necessary because the argument of a function is always an integer and other is used for decimal numbers.

But there is some problem with Translatewiki - you've changed the text of copyright information, but Translatewiki doesn't inform about it like it used to in the past.

The information about outdated translation is visible when I enter this translation, but it's not it the section "Outdated".

@Nikerabbit
Copy link
Contributor

The information about outdated translation is visible when I enter this translation, but it's not it the section "Outdated".

Thanks for notifying about this issue. We have corrected it manually and investigating the the cause.

@gravitystorm
Copy link
Collaborator Author

Everything has been working smoothly recently, and so I'm reluctant to make unnecessary work.

If you'd like we can start sending pull requests instead. Basically we need a branch with force push rights, and our scripts will automatically create a pull request for each commit, or update the open pull request if it is not merged yet.

... and ...

We can probably write an action to automate it.

... would be my preferred approach, if we ever need to change things in the future.

@maro-21
Copy link

maro-21 commented Apr 1, 2023

2. We have deployed validators that prevent new translations without all defined plural forms.

See #3997

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants