I just extracted a translation template file (.pot) for the module Revisioning (6.x-2.7), it is attached. I continued to work with it and when saving the translation I get an error about a duplicate message definition. Looking at the template I can confirm that in line 325 and 375 there is a duplicate msgid 'Delete'.

I can only assume that the error depends on the one string being in a singular/plural combination.

The error is the same if I extract a translation file (.po)

CommentFileSizeAuthor
revisioning.pot9.09 KBFrankT

Comments

gábor hojtsy’s picture

Uhm, well, I don't know how to overcome this. We need identification for both the singular and plural variant, and it can indeed happen that the singular variant is the same as some other string in the same .po file. While the simple I'd not say that the "Delete" string is appropriate in that singular case, I have not seen the UI, so it might as well be. The best short term fix would be IMHO to get the module maintainer fix that string to be something like "Delete revision" in the singular version to couple the plurals "Delete all @count revisions".

FrankT’s picture

Of course we can solve it by changing one source string, I will open another issue for that.

But I thought and think the root cause should be solved (if it is not a once in a lifetime problem).

gábor hojtsy’s picture

Its probably not a once in a lifetime problem, but I have not seen this issue in years, so it is certainly very rare. Because the single string needs to stay as-is and the singular version of the plural combination should also be translatable as-is, they would clash.

FrankT’s picture

Priority: Normal » Minor

You may decide how to go on with this. Due to the possible workaround I set the priority to minor.

mikran’s picture

Issue summary: View changes
Priority: Minor » Normal
Related issues: +#1729952: Translations of display collide with other translations

Same issue can be found from views #1729952: Translations of display collide with other translations

includes/admin.inc
821:  $displays = empty($displays) ? t('None') : format_plural(count($displays), 'Display', 'Displays') . ': ' . '<em>' . implode(', ', $displays) . '</em>';
3186:  $header = array(t('Display'), t('Weight'), t('Remove'));

This string outputs errors right after catalog is downloaded from localize.drupal.org and opened in Poeditor.

gábor hojtsy’s picture

Yeah, so Drupal itself does not consider a single source string and the singular string of a singular+plural pair conflicting if they are the same. The GNU gettext tools do consider this an issue. I think the root of the reason is the singular/plural system is designed for counted items not general one vs. many distinctions but one vs. two vs. three, etc. depending on the plural formula. Languages that have multiple formulas for different numbers may not use the same word when you say "12 displays" vs. when you say "Displays:" and then list 12 displays. The way the cited code uses format_plural, it tries to devise a single word in singular or plural form which may be a good approximation but may not be correct. I think we have not seen this problem much exactly because we stuck to the numeric plurality that this was designed for.

kingdutch’s picture

Version: 6.x-3.0 » 8.x-1.x-dev

Moving this dormant issue to the latest POTX version as it's still a problem there.

Unfortunately in a change on 2019-09-29 the gettext tools have made this an error condition in the msguniq executable as well. This means that there is no longer a workaround for this issue available with up to date gettext tools.