Hello,
I installed a fresh Drupal 5.1, enabled all modules and the latest development version from potx. Using potx, I extracted the pot files for a few core modules. I also extracted the po templates from http://drupal.org/project/drupal-pot in a separate directories. After comparing a few files from each directory, I've found that are differences between those two, although there shouldn't be any. For example:
$ msgcmp --use-untranslated aggregator-module.po aggregator-module-new.po aggregator-module-new.po:60: this message is used but not defined... aggregator-module.po:83: ...but this definition is similar aggregator-module-new.po:72: this message is used but not defined in aggregator-module.po aggregator-module-new.po:76: this message is used but not defined in aggregator-module.po aggregator-module-new.po:84: this message is used but not defined... aggregator-module.po:75: ...but this definition is similar aggregator-module-new.po:88: this message is used but not defined... aggregator-module.po:55: ...but this definition is similar aggregator-module-new.po:96: this message is used but not defined in aggregator-module.po aggregator-module-new.po:104: this message is used but not defined in aggregator-module.po aggregator-module-new.po:116: this message is used but not defined in aggregator-module.po aggregator-module-new.po:120: this message is used but not defined in aggregator-module.po aggregator-module-new.po:172: this message is used but not defined... aggregator-module.po:303: ...but this definition is similar aggregator-module-new.po:184: this message is used but not defined in aggregator-module.po aggregator-module-new.po:188: this message is used but not defined in aggregator-module.po aggregator-module-new.po:192: this message is used but not defined in aggregator-module.po aggregator-module-new.po:196: this message is used but not defined in aggregator-module.po aggregator-module-new.po:220: this message is used but not defined in aggregator-module.po aggregator-module-new.po:232: this message is used but not defined... aggregator-module.po:315: ...but this definition is similar aggregator-module-new.po:332: this message is used but not defined in aggregator-module.po aggregator-module-new.po:336: this message is used but not defined in aggregator-module.po aggregator-module-new.po:340: this message is used but not defined in aggregator-module.po aggregator-module-new.po:348: this message is used but not defined in aggregator-module.po aggregator-module-new.po:392: this message is used but not defined in aggregator-module.po msgcmp: found 21 fatal errors
aggregator-module.po is from drupal-pot and aggregator-module-new.po is the one extracted from potx. Obviously, there are a lot of extra messages in the potx generated file. I also noticed that there is an extra general.pot file from drupal-pot, which probably contains strings missing from the other modules of drupal-pot. drupal-pot also lacks color-module.pot.
What is the rationale behind this practice? What should I do if I wanted to translate the UI? Should I use drupal-pot or potx?
Vasileios Lourdas wrote:
Hello,
I installed a fresh Drupal 5.1, enabled all modules and the latest development version from potx. Using potx, I extracted the pot files for a few core modules. I also extracted the po templates from http://drupal.org/project/drupal-pot in a separate directories. After comparing a few files from each directory, I've found that are differences between those two, although there shouldn't be any. For example:
$ msgcmp --use-untranslated aggregator-module.po aggregator-module-new.po aggregator-module-new.po:60: this message is used but not defined... aggregator-module.po:83: ...but this definition is similar aggregator-module-new.po:72: this message is used but not defined in aggregator-module.po aggregator-module-new.po:76: this message is used but not defined in aggregator-module.po aggregator-module-new.po:84: this message is used but not defined... aggregator-module.po:75: ...but this definition is similar aggregator-module-new.po:88: this message is used but not defined... aggregator-module.po:55: ...but this definition is similar aggregator-module-new.po:96: this message is used but not defined in aggregator-module.po aggregator-module-new.po:104: this message is used but not defined in aggregator-module.po aggregator-module-new.po:116: this message is used but not defined in aggregator-module.po aggregator-module-new.po:120: this message is used but not defined in aggregator-module.po aggregator-module-new.po:172: this message is used but not defined... aggregator-module.po:303: ...but this definition is similar aggregator-module-new.po:184: this message is used but not defined in aggregator-module.po aggregator-module-new.po:188: this message is used but not defined in aggregator-module.po aggregator-module-new.po:192: this message is used but not defined in aggregator-module.po aggregator-module-new.po:196: this message is used but not defined in aggregator-module.po aggregator-module-new.po:220: this message is used but not defined in aggregator-module.po aggregator-module-new.po:232: this message is used but not defined... aggregator-module.po:315: ...but this definition is similar aggregator-module-new.po:332: this message is used but not defined in aggregator-module.po aggregator-module-new.po:336: this message is used but not defined in aggregator-module.po aggregator-module-new.po:340: this message is used but not defined in aggregator-module.po aggregator-module-new.po:348: this message is used but not defined in aggregator-module.po aggregator-module-new.po:392: this message is used but not defined in aggregator-module.po msgcmp: found 21 fatal errors
This is unfortunately not really helpful. We don't see what are the differences, only that there are differences. A diff would be much better.
$ diff -u aggregator-module.po aggregator-module-new.po
aggregator-module.po is from drupal-pot and aggregator-module-new.po is the one extracted from potx. Obviously, there are a lot of extra messages in the potx generated file. I also noticed that there is an extra general.pot file from drupal-pot, which probably contains strings missing from the other modules of drupal-pot. drupal-pot also lacks color-module.pot.
What is the rationale behind this practice? What should I do if I wanted to translate the UI? Should I use drupal-pot or potx?
It could very well be that the drupal-pot templates are for an older/newer Drupal version, then what you run your extractor on. The last update to drupal-pot was for the 5.1 release, so running potx on the 5.1 release code could result in comparable templates. I'd suggest you do this if you would like to see whether there are real differences.
Gabor
On Sunday 08 July 2007 17:49:20 Gabor Hojtsy wrote:
This is unfortunately not really helpful. We don't see what are the differences, only that there are differences. A diff would be much better.
$ diff -u aggregator-module.po aggregator-module-new.po
I stripped the comments from both files. aggregator-module.pot.1 is aggregator-module.pot and aggregator-module.pot.2 is aggregator-module-new.po. Here it is (sorry for the long listing):
--- aggregator-module.pot.1 2007-07-08 18:56:36.478195032 +0300 +++ aggregator-module.pot.2 2007-07-08 18:56:46.714633399 +0300 @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" -"POT-Creation-Date: 2007-01-30 12:39+0100\n" +"POT-Creation-Date: 2007-07-08 18:45+0300\n" "PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n" "Last-Translator: NAME EMAIL@ADDRESS\n" "Language-Team: LANGUAGE EMAIL@ADDRESS\n" @@ -37,27 +37,54 @@ msgid "Add feed" msgstr ""
+msgid "Add category" +msgstr "" + msgid "Remove items" msgstr ""
msgid "Update items" msgstr ""
+msgid "List" +msgstr "" + +msgid "Settings" +msgstr "" + msgid "Sources" msgstr ""
+msgid "Categories" +msgstr "" + +msgid "RSS feed" +msgstr "" + msgid "OPML feed" msgstr ""
+msgid "View" +msgstr "" + msgid "Categorize" msgstr ""
+msgid "Configure" +msgstr "" + msgid "Edit feed" msgstr ""
msgid "Edit category" msgstr ""
+msgid "none" +msgstr "" + +msgid "Allowed HTML tags" +msgstr "" + msgid "The list of tags which are allowed in feeds, i.e., which will not be removed by Drupal." msgstr ""
@@ -94,12 +121,27 @@ msgid "Number of news items in block" msgstr ""
+msgid "more" +msgstr "" + msgid "View this feed's recent news." msgstr ""
msgid "View this category's recent news." msgstr ""
+msgid "Title" +msgstr "" + +msgid "Description" +msgstr "" + +msgid "Submit" +msgstr "" + +msgid "Delete" +msgstr "" + msgid "A category named %category already exists. Please enter a unique title." msgstr ""
@@ -115,12 +157,18 @@ msgid "Category %category added." msgstr ""
+msgid "view" +msgstr "" + msgid "The category %category has been added." msgstr ""
msgid "The name of the feed; typically the name of the web site you syndicate content from." msgstr ""
+msgid "URL" +msgstr "" + msgid "The fully-qualified URL of the feed." msgstr ""
@@ -193,9 +241,21 @@ msgid "Next update" msgstr ""
+msgid "Operations" +msgstr "" + +msgid "@time ago" +msgstr "" + +msgid "never" +msgstr "" + msgid "%time left" msgstr ""
+msgid "edit" +msgstr "" + msgid "remove items" msgstr ""
@@ -226,6 +286,9 @@ msgid "in category" msgstr ""
+msgid "read more" +msgstr "" + msgid "aggregated feeds" msgstr ""
@@ -258,3 +321,11 @@ msgid "access news feeds" msgstr ""
+msgid "Aggregator" +msgstr "" + +msgid "Aggregates syndicated content (RSS, RDF, and Atom feeds)." +msgstr "" + +msgid "Core - optional" +msgstr ""
It could very well be that the drupal-pot templates are for an older/newer Drupal version, then what you run your extractor on. The last update to drupal-pot was for the 5.1 release, so running potx on the 5.1 release code could result in comparable templates. I'd suggest you do this if you would like to see whether there are real differences.
Gabor
I used the latest drupal-pot-5.x-1.x-dev.tar.gz from http://drupal.org/project/drupal-pot. Isn't that the correct po templates?
I try to be helpful as I can...
Vasileios Lourdas wrote:
On Sunday 08 July 2007 17:49:20 Gabor Hojtsy wrote:
This is unfortunately not really helpful. We don't see what are the differences, only that there are differences. A diff would be much better.
$ diff -u aggregator-module.po aggregator-module-new.po
I stripped the comments from both files. aggregator-module.pot.1 is aggregator-module.pot and aggregator-module.pot.2 is aggregator-module-new.po. Here it is (sorry for the long listing):
All the strings that seemingly appear in this file are common strings, so they should be in general.po. A few examples:
+msgid "Title" +msgstr ""
+msgid "Description" +msgstr ""
+msgid "Submit" +msgstr ""
+msgid "Delete" +msgstr ""
It could very well be that the drupal-pot templates are for an older/newer Drupal version, then what you run your extractor on. The last update to drupal-pot was for the 5.1 release, so running potx on the 5.1 release code could result in comparable templates. I'd suggest you do this if you would like to see whether there are real differences.
I used the latest drupal-pot-5.x-1.x-dev.tar.gz from http://drupal.org/project/drupal-pot. Isn't that the correct po templates?
Yes, they are Drupal 5.1 templates as I have noted. Until Drupal 5.2 is not released these are the latest stable strings.
I try to be helpful as I can...
Thanks! As far as I see you hit the "potx is more tailored for the contributed modules by default" sympthom. Check:
$ php potx-cli.php --help
It will give you information about what to do if you generate templates for core source files. The potx-cli script is by default configured to generate strings for contributed modules, as we ship templates in the mentioned package for core translations. You need to use the extra mode parameter with potx-cli to generate proper templates for Drupal core.
Gabor