Transifex error with plurals

AI-generated summary

Transifex Error with Plurals

yaron reported an issue with Transifex’s error checking when translating plural strings in Hebrew. The problem arises when the parameter %{count} is not present in certain cases, triggering an error.

gerhard suggested including the number of months in all cases or rewriting the strings to avoid the issue. However, yaron believes that changing the translation check from “error” to “warning” would be a better solution.

gerhard explained that the current setup helps maintain translation quality and is reluctant to switch to a warning. Instead, he offered to temporarily disable the check and re-enable it after setting the translations.

yaron asked about permanent solutions and suggested consulting Transifex’s support forum. gerhard requested the translated strings, which yaron provided for months and years in Hebrew.

gerhard confirmed that the translations have been set for js.dates.medium_with_ago.x_months and js.dates.medium_with_ago.x_years.

Hey, I have a problem with error checking in Transifex. I have the following strings:

  • X month ago
  • X months ago

Which in Hebrew become 4 cases:

  • Lifney Hodesh
  • Lifney Hodshayim
  • Lifney X Hodashim
  • Lifney X Hodashim

Since the parameter does not appear in the first two cases, I am getting an error. I can include the parameter anyway, but it will look odd.

1 Like

Is there any chance you can make it work with including the number of months in all 4 cases? Maybe rewrite it a little bit to make it look less weird? Is this the only translation where it doesn’t make sense to include the %{count} in all 4 texts?

I’m reluctant to change that translation check from “error” to “warning” since it helps a lot with translation quality. I could temporarily disable the check, set the translations and re-enable it again if you tell me the 4 translations.

I can but it’ll look weird, why do you think changing it to warning is a problem?

Basically this check should be set to warning unless you’re using C which in this case you should enable the error because changing the parameters may break the build.

We had lots of problems with invalid translations in the past because translators messed up placeholders. That lead to broken builds and lots of support requests and I really don’t want to switch this back to warning.

Unfortunately there’s only one check (“Variable substitution specifiers (like “%{var}”) are preserved in the translations.”), otherwise I’d exclude the %{count} variable from this check.

The following offer still stands:

Of course that won’t work if this problem affects lots of translations.

2 Likes

So, do we need to schedule or is there an option for a permanent solutions?
Transifex has a support forum, we can ask there if you think this should be solved in another way.

Please post the 4 translated strings I’ll take care of it. No need to schedule anything. I’ll see if we can find a better solution in the future.

Months

Singular: One month ago
Two: Two months ago
Few: %{count} months ago
Many: %{count} months ago

Years

Singular: One year ago
Two: Two years ago
Few: %{count} years ago
Many: %{count} years ago

Thank you!

2 Likes

Done. js.dates.medium_with_ago.x_months and js.dates.medium_with_ago.x_years have been translated.

2 Likes