Closed (fixed)
Project:
German translation
Version:
master
Component:
PO files
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Feb 2009 at 12:36 UTC
Updated:
11 Mar 2019 at 20:27 UTC
Jump to comment: Most recent
Comments
Comment #1
KirstenLangholz commentedHaving the same problem here - any help?!
Comment #2
salvisIn what context do you have this problem?
We have
http://www.gnu.org/software/hello/manual/gettext/Plural-forms.html does not show the parentheses, but I've never seen problems with this. OTOH, I haven't seen the plural feature being used in the German translation either...
BTW, the formula in the French translation is different, but it also has the parentheses.
Comment #3
tjt756 commentedI'm having the same problem, if anyone figures this out please let us know. For me it happened when i installed the translation overview module and localization client module. i already had i18n installed and enabled.
Thanks,
TJ
Comment #4
salvisSo, which one is it, translation overview module or localization client module?
Comment #5
KirstenLangholz commentedOkay,
I set up the the website with the German language file already in it from drupal.de. All worked fine. Then I addes quite some modules and exported the de.po file and opened it in Poedit. I translated the missing strings.
At one point, I assume there was a plural form hidden, Poedit showed me an error message each time I tried to safe the de.po file on my hdd.
I opened it in notebook and fount out that the plural option was missing. I checked some of the module translations and found the following plural formula that I then added to the de.po file so that it looks like this in the end:
The I turned
into
and translated them with notebook and saved it. Then I could work with Poedit again without any errors. But each time one msgid_plural is added and not handled as described above, the error message shows up again and the translated de.po cannot be imported anymore.
I hope this explains it better to those who can help.
Comment #6
kkaefer commenteddrupal.de is not a site associated with the Drupal project or the German translation.
Comment #7
KirstenLangholz commentedOkay, set up the original Drupal 6.12 here from the site integrated German from within, added modules, exported de.po file worked on it and same error ... so now?!
Comment #8
salvis@KirstenLangholz: Your plural form in #5 is definitely wrong. INTEGER and EXPRESSION need to be replace with the language-specific values.
See #2 above.
Comment #9
Abilnet commentedI'm facing the same error when adding more languages at:
admin/settings/language/addSo far, adding other languages seems to work without errors, but when adding German, I'll get:
The translation file de.po contains an error: the plural formula could not be parsed.(I have a fresh, default D6.13 installation)
Comment #10
salvisAbilnet: What's the Plural-Forms entry in you de.po file?
Comment #11
Abilnet commented@salvis: I have no idea... I was just playing around to study how to configure a multilingual site, and happened to recognise the error in German language and decided to report. Sorry I can't help more (I'm not a coder)
Comment #12
kkaefer commentedAbilnet, can you please describe the steps you performed to install the German language pack? If you downloaded a specific file, please open the .po file and look at the Plural-forms: line in the header.
Comment #13
Abilnet commented@kkaefer: Actually, I did not download anything. Just went through the steps mentioned above at #9
I was adding more languages at:
admin/settings/language/addOther languages I tested, worked without any problems, but when adding German language, I got an error:
The translation file de.po contains an error: the plural formula could not be parsed.EDIT:
For more testing, I deleted the German language at:
admin/settings/languageThen extracted the German language pack from Drupal.org
Then adding German again at:
admin/settings/language/addResult: Exactly the same error:
The translation file de.po contains an error: the plural formula could not be parsed."de.po" at:
profiles/default/translationsis including:
"Plural-Forms: nplurals=2; plural=(n != 1);\n"Comment #14
hass commentedI have never seen this issue with one of the core files. If a module *.de.po file is broken - simply configure the
nplurals=2; plural=(n != 1);for the broken translation file and also commit a fixed version of the file to CVS for the next release of the module. Aside - finding the broken file is really hard with many modules... it's a good rule to name them [module].de.po... this really helps much to find the broken file.Comment #15
salvisIndeed, I just found de.po in Content Access 6.x-1.1 to be broken and produce that error: #369942: The translation file de.po contains an error: the plural formula could not be parsed.
If you have German activated and get this error when you enable a module, then it's obvious who's the culprit. However, if you have a site with many contrib modules installed, and one day you enable German and you get this error, then there's no way to know which de.po is causing the error.
Naming the translation files [module].de.po (as hass suggests) would surely help, but very few contrib modules do that; I didn't even know it was allowed. IMO, Drupal not including the full file path in the error message is a core bug that should be fixed...
Comment #17
clashar commentedI have the same error now, when I tried to add German language to other languages.
i18n and other different modules were installed before.
It's strange that 1 year after previous posts the problem still exists.
Comment #18
transmitter commentedI ran into the same problem when using Aegir and putting an exported de.po file in my installation profile.
I double checked "Plural-Forms: nplurals=2; plural=(n != 1);\n" - that's correct and I can save the file with POedit.
Still .. I can't use my installation profile along with the German language.
Where else could the line:
The translation file de.po contains an error: the plural formula could not be parsed.
come from?
I only have one po file, exported from website A where I got all my features from that I want to use for a website B with the installation profile.
Comment #19
Thomas_Zahreddin commentedi recommend the use of
http://drupal.org/project/l10n_pconfig
then the plural formula from the imported file is ignored, and a reasonable default for most languages is set.
how to fix a broken file - is described in this issue.
(sorry jumping so late on this, just for documentation)
Comment #20
joachim namyslo