mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Update translation doc with info on two options for new
string creation workflow. It is unclear at this point which of the two are the lesser evil, so both are included. svn:r19037
This commit is contained in:
parent
7d0dfb7597
commit
d27cff4aa5
@ -27,6 +27,8 @@ The current pootle configuration is checked into subversion as well:
|
|||||||
|
|
||||||
https://tor-svn.freehaven.net/svn/translation/trunk/pootle
|
https://tor-svn.freehaven.net/svn/translation/trunk/pootle
|
||||||
|
|
||||||
|
---------------------------- TorCheck -------------------------------
|
||||||
|
|
||||||
TorCheck uses our translation portal to accept translations. Users use
|
TorCheck uses our translation portal to accept translations. Users use
|
||||||
the portal to check in their changes. To make use of the translations
|
the portal to check in their changes. To make use of the translations
|
||||||
that users have commited to the translations/ subversion module, you'll
|
that users have commited to the translations/ subversion module, you'll
|
||||||
@ -68,8 +70,11 @@ And finally check in the changes:
|
|||||||
|
|
||||||
svn commit
|
svn commit
|
||||||
|
|
||||||
|
---------------------------- Torbutton -------------------------------
|
||||||
|
|
||||||
Torbutton uses our translation portal to accept translations. Users use
|
Torbutton uses our translation portal to accept translations. Users use
|
||||||
the portal to check in their changes.
|
the portal to check in their changes.
|
||||||
|
|
||||||
To make use of the translations that users have commited to the translations/
|
To make use of the translations that users have commited to the translations/
|
||||||
subversion module, you'll need to ensure that you have a current checked out
|
subversion module, you'll need to ensure that you have a current checked out
|
||||||
copy of Torbutton:
|
copy of Torbutton:
|
||||||
@ -87,7 +92,7 @@ You should see something like the following:
|
|||||||
Now if you had changes, you need to convert from .po and move
|
Now if you had changes, you need to convert from .po and move
|
||||||
the newly updated mozilla files into the current stable locale
|
the newly updated mozilla files into the current stable locale
|
||||||
directory. First convert them with the 'mkmoz.sh' script and then
|
directory. First convert them with the 'mkmoz.sh' script and then
|
||||||
moving the proper mozilla files from 'torbutton/trans_tools/moz/' into
|
move the proper mozilla files from 'torbutton/trans_tools/moz/' into
|
||||||
'torbutton/src/chrome/locale/' directory while properly naming the files
|
'torbutton/src/chrome/locale/' directory while properly naming the files
|
||||||
for their respective locale.
|
for their respective locale.
|
||||||
|
|
||||||
@ -98,7 +103,7 @@ the svn trunk area of Torbutton:
|
|||||||
./mkmoz.sh
|
./mkmoz.sh
|
||||||
for locale in `ls -1 moz/`;
|
for locale in `ls -1 moz/`;
|
||||||
do
|
do
|
||||||
mv -v moz/$locale/*.{rdf,dtd,properties} ../src/chrome/locale/$locale/;
|
mv -v moz/$locale/*.{dtd,properties} ../src/chrome/locale/$locale/;
|
||||||
done
|
done
|
||||||
|
|
||||||
Now check the differences (ensure the output looks reasonable):
|
Now check the differences (ensure the output looks reasonable):
|
||||||
@ -109,6 +114,65 @@ And finally check in the changes:
|
|||||||
|
|
||||||
svn commit
|
svn commit
|
||||||
|
|
||||||
|
|
||||||
|
If you make changes to strings in Torbutton, you need to rebuild the
|
||||||
|
templates in torbutton/trans_tools/pootle/templates. This is done via:
|
||||||
|
|
||||||
|
moz2po -P -i torbutton/src/chrome/locale/en/ -o torbutton/trans_tools/templates/
|
||||||
|
|
||||||
|
You now have two options:
|
||||||
|
|
||||||
|
Option 1 (The Pootle Web UI Way):
|
||||||
|
|
||||||
|
View then commit the changes to the template with:
|
||||||
|
|
||||||
|
svn diff torbutton/trans_tools/templates/
|
||||||
|
svn commit torbutton/trans_tools/templates/
|
||||||
|
|
||||||
|
Then poke Jake to 'svn up' on the Pootle side. If you do this enough
|
||||||
|
times, he may give you a button to click to update templates in Pootle,
|
||||||
|
or maybe even an account on the Pootle server. Persistence is a virtue.
|
||||||
|
|
||||||
|
You then need to go to the Pootle website and click the checkbox next to
|
||||||
|
every language on:
|
||||||
|
https://translation.torproject.org/projects/torbutton/admin.html
|
||||||
|
and then click "Update Languages" at the bottom.
|
||||||
|
|
||||||
|
You then need to go to each language and go to "Editing Options" and click
|
||||||
|
"Commit" for each one.
|
||||||
|
|
||||||
|
You then need to 'svn up' locally, and follow the procedure above for
|
||||||
|
rebuilding your .dtd and .properties files.
|
||||||
|
|
||||||
|
Yes, this sucks. :/
|
||||||
|
|
||||||
|
Option 2 (Use your own msgmerge: YMMV, may change .po flags and formatting):
|
||||||
|
|
||||||
|
Run msgmerge yourself for each language:
|
||||||
|
|
||||||
|
cd torbutton/trans_tools
|
||||||
|
for i in `ls -1 pootle`
|
||||||
|
do
|
||||||
|
msgmerge -U ./pootle/$i/torbutton.dtd.po ./pootle/templates/torbutton.dtd.pot
|
||||||
|
msgmerge -U ./pootle/$i/torbutton.properties.po ./pootle/templates/torbutton.properties.pot
|
||||||
|
done
|
||||||
|
svn diff pootle
|
||||||
|
svn commit pootle
|
||||||
|
|
||||||
|
Then poke Jake to 'svn up' on the Pootle side. If you do this enough times,
|
||||||
|
he may give you a button on Pootle, or maybe even an account on the Pootle
|
||||||
|
server. Persistence is a virtue.
|
||||||
|
|
||||||
|
You may notice that some .po file flags and string formatting have changed
|
||||||
|
with this method, depending on your gettext version. It is unclear if this
|
||||||
|
is a problem. Please update this doc if you hit a landmine and everything
|
||||||
|
breaks :)
|
||||||
|
|
||||||
|
After this process is done, you then need to regenerate the mozilla
|
||||||
|
.dtd and .properties files as specified above.
|
||||||
|
|
||||||
|
---------------------------- Vidalia -------------------------------
|
||||||
|
|
||||||
Vidalia uses our translation portal to accept translations. Users use the
|
Vidalia uses our translation portal to accept translations. Users use the
|
||||||
portal to check in their changes. No conversion or moving is required other
|
portal to check in their changes. No conversion or moving is required other
|
||||||
than normal pootle usage.
|
than normal pootle usage.
|
||||||
|
Loading…
Reference in New Issue
Block a user