Here's the new vidalia.pot file based on all the changes that we have done.
The idea is to check if I get the translation process right.
The uploaded file was generated like this:
cd $VIDALIA_TRUNK/src
lupdate -recursive * -ts /tmp/vidalia.ts
./src/vidalia/tools/ts2po/ts2po -i /tmp/vidalia.ts -o vidalia/i18n/po/templates/vidalia.pot
Then edit by hand the Plural-Forms line to match this:
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
"%metrics-lib 3.0.0==4 ? 2 : 3);\n"
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items
0
Link issues together to show that they're related.
Learn more.
The uploaded file was generated like this:
cd $VIDALIA_TRUNK/src
lupdate -recursive * -ts /tmp/vidalia.ts
./src/vidalia/tools/ts2po/ts2po -i /tmp/vidalia.ts -o vidalia/i18n/po/templates/vidalia.pot
See src/tools/ts2po/ts2po.cpp and src/tools/ts2po_config.h.in. Summary: those fields don't really matter. Pootle always just filled them in anyway whenever somebody actually contributed to a translation. Plus, those fields don't even exist in Qt .ts files, which is what is used to generate .po files. Sure, they could possibly be carried over from a previous .po if one exists, but there's not much point in doing so.
The "Plural-Forms" field does matter. Transifex, our new translation portal, requires this field to be filled out when updating a (or uploading a new) .pot file on the server. Transifex will fill out the other fields automatically.
My understanding is that the appropriate Plural-Forms line can vary between languages, which is why I had always let Pootle fill in the correct value for it. It looks like you're trying to hardcode a single Plural-Forms line for every language. Is it your claim that this line is correct for every language?
Yes, it is correct that the Plural-Forms line can vary between languages, and Transifex will set the correct value for each language when generating the .po files. I am not sure where vidalia.pot got its current Plural-Forms line from (and it doesn't seem to match any known languages either).
The .pot files for the website does not have a Plural-Forms line at all, so I suggest that we do the following: We can either remove the Plural-Forms line from the .pot files completely, or we can add the correct entry for the English language and let Transifex do its magic for other languages.
Turns out that Transifex does not bother with the Plural-Forms line in .pot files. As stated previously, Transifex will set the correct value for each language when updating the .po files.
The "Plural-Forms" field does matter. Transifex, our new translation portal, requires this field to be filled out when updating a (or uploading a new) .pot file on the server.
Turns out that Transifex does not bother with the Plural-Forms line in .pot files.
If the latter of your two beliefs is actually correct, then I vote for leaving the Plural-Forms line out entirely. I don't see any reason to do otherwise.
Either way, i18n-update updates all .po files, when it should only update the .pot files and Transifex takes care of the rest (Runa confirmed this a couple of days ago).
The fix will involve just removing one of the calls to vidalia_update_po in i18n/CMakeLists.txt for what I can see. Matt: what do you think?
Either way, i18n-update updates all .po files, when it should only update the .pot files and Transifex takes care of the rest (Runa confirmed this a couple of days ago).
The fix will involve just removing one of the calls to vidalia_update_po in i18n/CMakeLists.txt for what I can see. Matt: what do you think?
If we do that, when do the .po files in the repository get updated? Would a particular .po file get updated only when someone commits an updated translation for it? The number of mostly/entirely untranslated .po files lingering about in the source tree is already pretty ridiculous. Having them exist in various states of outdatedness doesn't seem like an improvement.
If we do what chiiph suggests, .po files in the repository will only get updated when someone commits an updated translation for it.
At the moment, that is whenever I remember to run the command that pulls down new and updated translations from Transifex. I am hoping that we will have a cron job (#2643 (moved)) to do this (and do it more often) soon.
Note that if you update the .po files manually, you will also have to push them up to the Transifex server. This can be done in two ways: (1) let me know that you have updated the .po files and I will do it for you, (2) create a user on https://www.transifex.net/, install the transifex-client and let me know so that I can add you as an administrator and you can push files yourself.
Either way, i18n-update updates all .po files, when it should only update the .pot files and Transifex takes care of the rest (Runa confirmed this a couple of days ago).
The fix will involve just removing one of the calls to vidalia_update_po in i18n/CMakeLists.txt for what I can see. Matt: what do you think?
If we do that, when do the .po files in the repository get updated? Would a particular .po file get updated only when someone commits an updated translation for it? The number of mostly/entirely untranslated .po files lingering about in the source tree is already pretty ridiculous. Having them exist in various states of outdatedness doesn't seem like an improvement.
It is an improvement in the sense that each part takes care of separate things (Vidalia of the .pot files, Transifex/Runa of the .po files), and we don't fall into a situation where everyone touches everything. The .po files are going to be updated every time we run make i18n-update and when a new translation is uploaded to Transifex, so I don't think let the .po files be handled by Transifex/Runa is a bad idea.
It is an improvement in the sense that each part takes care of separate things (Vidalia of the .pot files, Transifex/Runa of the .po files), and we don't fall into a situation where everyone touches everything.
...except the variously out-of-date .po files still live in my source tree. Runa said she can push updates to the .po files into Transifex anyway, so that's what we'll stick with.