On Jan 29, 12:33 pm, Peli <
peli0...@googlemail.com> wrote:
> Ok, I started to use Launchpad for the German translations of OI
> About.
https://translations.launchpad.net/openintents/trunk/+pots/aboutapp
>
> I noticed that the languages listed are:
> Colognian, Dutch, German, German, Low, Limburgian, Zazaki
>
> Do you have any idea why such exotic languages are listed by default?
> Could one make this the languages we need, Czech, Dutch, and Polish?
>
> I noticed if I select my preferred language "German" then I only see
> German and Dutch.
These languages are personal. Everybody gets different suggestions. I
see different languages. But actually, the suggestion is quite good,
as German is there for you. And you might also know Colognian. But,
judging by your region, chances are slim you know Polish.
>
> I also noticed that you have strings in strings.xml that are no longer
> used, so I guess it would be good to clean up strings before uploading
> them.
We should clean them up.
>
> Also, it does not make sense to translate all strings, like web links
> or email addresses. Here it would be better to leave the fields empty
> so that the default value from "values" is taken. Maybe one can split
> up strings.xml into strings that need to be translated and strings
> that do not need to be translated.
Yes and no. You might want to send people to different websites based
on language etc. But normally this is not necessary. In that case the
strings should just be constants in the code.
>
> But I think we can invite now other people to start translating OI
> About into other languages using Launchpad.
As soon as the strings for UpdateChecker are also properly imported,
yes. Otherwise some work may go lost.
>
> Can you summarize again in some detail what the current workflow
> should look like?
> How do I upload strings for other projects, and how do I download them
> to include them in the project?
> (I have to admit, I have not set up your scripts yet, which is not so
> easy as I'm on a Windows machine.. I guess I have to use cygwin)
Weekly workflow:
You 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 workflow:
- Create a similar folder/file structure as I have done for AboutApp.
- In res/values/strings.xml add "<string
name="about_translators">translator-credits</string>".
- Setup the variables in the script. "short_lang" And "long_lang": set
to expected translated languages, see above. "launchpad_po_filename"
is the name/prefix of the template. Make this the name of the
subproject folder. This needs to be unique amongst subprojects so
Launchpad can keep translations apart for the subprojects. The other
variables should be correct unless you make some drastic changes or
unless you change the folder structure.
- Run "bash androidxml2po.bash -e". A .pot file is created.
- Continue with the weekly workflow form here on. First time upload is
a longer wait.
- In case you already start with some translated strings.xml's this
gets a little bit more complex. Make a backup and play with it would
be my advice.