TranslationsPlease visit the OpenIntents translation project at Launchpad to help with translations. Information for developersTranslated resources of the Android respositoryAndroid source: http://android.git.kernel.org/ Other resources- SwitchLocale: Small Windows .bat scripts to switch the locale in the emulator with a double click of the file.
- To switch the locale manually, do
adb shell "echo de-DE > /data/locale; stop; sleep 5; start" Sun Solaris Style Guides for various languages. How to convert strings.xml to .po/.pot filesFirst of all, get the androidxml2po.bash script. Weekly workflowYou have changed some code (including some strings): - Run "bash androidxml2po.bash -e". This updates the .pot and .po files.
- Create a tgz containing the .pot and .po file(s) in "./translations_aboutapp" (I include this last relative path in the tarball but I have yet to find out if this is really necessary). It's important that the files retain their name ("aboutapp") because this should match with the existing templates on Launchpad (or at least, I think so). Also don't ruin the encoding or the unix linebreaks.
- Upload the tarball on Launchpad. To see the upload you need to go to exact series first. So on "https://translations.launchpad.net/openintents" there is no "Upload translations" link but if you click on "OpenIntents Series: trunk" then there is.
- Wait a few days max. and you will get an email when done.
More strings have been translated on Launchpad: - Request "Download translations" on Launchpad (PO format).
- Wait a few hours for an email with a download link.
- Get the tarball and unpack the files into "./translations_aboutapp" (make sure they overwrite). Ofcourse the files that were there before should have been committed (sent to Launchpad and imported there) before you download new ones from launchpad.
- (If translations for a new language were made, you need to add the language in the script: In short_lang the labels from the .po files ("nl", "zh_CN"), in long_lang the labels from the res/values folders ("nl-rNL", "zh-rCN").)
- Make sure that in "translator-credits" all lines with translator names end with a ";" (or a "; ").
- Run "bash androidxml2po.bash -i". This updates all the strings.xml's.
Setup workflowWindows and CygwinTo set up the scripts on a Windows machine, you will need: - Get Cygwin
- Make sure that you install the following packages for Cygwin:
- gettext
- gettext-devel (for msgfmt and msgmerge)
- python
- python-libxml2
- Download xml2po, for example through the Gnome-Doc-Utils
- Make xml2po run from any directory. There may be a more clever way it, but I did it in the following way:
- Copy the folder xml2po from Gnome-Doc-Utils into your home directory, so that the script can be found in ~/xml2po/xml2po.py
- Create a new file called "xml2po" (without any file extension) with the following content:
#!/bin/bash
python ~/xml2po/xml2po.py "$@" and put it into /bin (C:\cygwin\bin) Launch "Cygwin Bash Shell" Now you should be able to call 'xml2po' from any directory. Follow the instructions above. More resourceshttp://groups.google.com/group/openintents/browse_frm/thread/84d7b059d0b15390
|
Hi, I've been trying to do this with an android project but I'm stuck.
Then I downloaded that pot file and place it on /translations but when I run ./androidxml2po.bash -e it prints: Exporting .xml to .pot and nothing happens.
I also tried to open poedit and create a file from a pot file. I translated a couple of strings and run ./androidxml2po.bash -e again. Exporting .xml to .pot Exporting .xml to updated .po for es Making temporary folder: .tmp.. Merging translations for smspopup-es: 0 translated messages, 170 untranslated messages.
What am I doing wrong? Thanks for reading.
Please look at http://groups.google.com/group/openintents/browse_frm/thread/e67d0edce196f29c# for the discussion.