mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Updated to reflect the new pootle backend process. This can almost all be automated when the time comes and when we are sure we won't have major issues with pootle/translation updates/etc.
svn:r15320
This commit is contained in:
parent
efeea9f6de
commit
3240cb3f64
@ -1,117 +1,139 @@
|
|||||||
## Instructions for helping translate text for Vidalia and TorButton
|
## Instructions for helping translate text for Vidalia, TorButton and TorCheck
|
||||||
## ( More translation information for Tor related apps will accumulate here )
|
## ( More translation information for Tor related apps will accumulate here )
|
||||||
|
|
||||||
You'll need an account on launchpad[0] and you'll want to request access.
|
Our translations are handled in one of two places. The Tor Translation Portal
|
||||||
Access will need to be granted by either Matt or Jacob.
|
handles all of the translations for Vidalia, Torbutton and TorCheck. The Tor
|
||||||
|
website itself is currently handled by hand translations using subversion.
|
||||||
|
|
||||||
Uploading new translations is quite simple. First you'll need to checkout
|
All three of the above projects check in their respective .po files into the following subversion urls:
|
||||||
the source to Vidalia. Then you'll want to change into the i18n directory:
|
|
||||||
|
|
||||||
cd vidalia/src/vidalia/i18n;
|
https://tor-svn.freehaven.net/svn/translation/trunk/projects/torbutton
|
||||||
|
https://tor-svn.freehaven.net/svn/translation/trunk/projects/torcheck
|
||||||
|
https://tor-svn.freehaven.net/svn/translation/trunk/projects/vidalia
|
||||||
|
|
||||||
Now you'll run the proper commands[1] to convert from the native QT .ts format.
|
The current pootle configuration is checked into subversion as well:
|
||||||
This is because of a known issues in Rosetta, the software that drives
|
|
||||||
Launchpad. You can read more about this bug here:
|
|
||||||
https://bugs.launchpad.net/rosetta/+bug/68959
|
|
||||||
|
|
||||||
Because Rosetta doesn't support .ts files, you'll want to convert the .ts
|
https://tor-svn.freehaven.net/svn/translation/trunk/pootle
|
||||||
format into gnugettext .po files. Do so like so:
|
|
||||||
|
|
||||||
for file in `ls -1|grep .ts$|cut -f1 -d.`;
|
|
||||||
do
|
|
||||||
echo "Attempting to convert" $file.ts;
|
|
||||||
ts2po --input=$file.ts --output=$file.po;
|
|
||||||
done
|
|
||||||
|
|
||||||
This is pretty straight forward but also error prone. You'll want to check for
|
|
||||||
proper formatting of the .po files like so:
|
|
||||||
|
|
||||||
for file in `ls -1|grep .po$`
|
|
||||||
do
|
|
||||||
msgfmt -c $file;
|
|
||||||
done
|
|
||||||
|
|
||||||
You have to remove all duplicate strings and all errors before uploading:
|
|
||||||
|
|
||||||
for file in `ls -1|grep .po$|cut -f1 -d.`
|
TorCheck uses our translation portal to accept translations. Users use the portal to check in their changes.
|
||||||
do
|
To make use of the translations that users have commited to the translations/
|
||||||
msguniq -o $file.po $file-uniq.po;
|
subversion module, you'll need to ensure that you have a current checked out
|
||||||
|
copy of TorCheck:
|
||||||
|
|
||||||
|
cd check/trunk/i18n/
|
||||||
|
check/trunk/i18n$ svn up
|
||||||
|
|
||||||
|
You should see something like the following:
|
||||||
|
|
||||||
|
Fetching external item into 'pootle'
|
||||||
|
External at revision 15300.
|
||||||
|
|
||||||
|
At revision 15300.
|
||||||
|
|
||||||
|
Now if you had changes, you'd simply want to move the newly updated .po files
|
||||||
|
into the current stable directory. Moving the .po files from
|
||||||
|
'check/trunk/i18n/pootle/' into 'check/trunk/i18n' properly naming the files
|
||||||
|
for their respective locale.
|
||||||
|
|
||||||
|
Here's an example of how to move all of the current pootle translations into
|
||||||
|
the svn trunk area of TorCheck:
|
||||||
|
|
||||||
|
cd check/trunk/i18n/
|
||||||
|
for locale in `ls -1 pootle/|grep -v template`;
|
||||||
|
do
|
||||||
|
mv -v pootle/$locale/TorCheck_$locale.po TorCheck_$locale.po;
|
||||||
done
|
done
|
||||||
|
|
||||||
Ensure that the .po files are valid, possibly by compiling them into .mo files:
|
Now check the differences (ensure the output looks reasonable):
|
||||||
|
|
||||||
|
svn diff
|
||||||
|
|
||||||
for file in `ls -1|grep .po$|cut -f1 -d.`
|
Ensure that msgfmt has no errors:
|
||||||
do
|
|
||||||
msgfmt -o $file.mo $file.po;
|
|
||||||
file $file.mo;
|
|
||||||
done
|
|
||||||
|
|
||||||
If you're able to make proper .mo files and you have no errors, you're probably
|
msgfmt -C *.po
|
||||||
ready to upload the .po files for translation. A proper .mo file may look like:
|
|
||||||
|
|
||||||
"GNU message catalog (little endian), revision 0, 11 messages"
|
And finally check in the changes:
|
||||||
|
|
||||||
Once you have the current selection of .po files, you'll want to make a .tgz:
|
svn commit
|
||||||
|
|
||||||
tar -cvzf vidalia.tar.gz *.po;
|
Torbutton uses our translation portal to accept translations. Users use the portal to check in their changes.
|
||||||
|
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
|
||||||
|
copy of Torbutton:
|
||||||
|
|
||||||
|
cd torbutton/trans_tools
|
||||||
|
torbutton/trans_tools$ svn up
|
||||||
|
|
||||||
Now you're ready to upload 'vidalia.tar.gz' by visiting translation upload
|
You should see something like the following:
|
||||||
area of launchpad:
|
|
||||||
|
|
||||||
https://translations.launchpad.net/vidalia/trunk/+translations-upload
|
Fetching external item into 'pootle'
|
||||||
|
External at revision 15300.
|
||||||
|
|
||||||
Once you've performed your upload, you will have to wait for admin approval.
|
At revision 15300.
|
||||||
After approval, translators will be able to download the files and translate.
|
|
||||||
|
Now if you had changes, you need to convert from .po and move the newly updated mozilla files
|
||||||
|
into the current stable locale directory. First convert them with the
|
||||||
|
'mkmoz.sh' script and then moving the proper mozilla files from
|
||||||
|
'torbutton/trans_tools/moz/' into 'torbutton/src/chrome/locale/' directory
|
||||||
|
while properly naming the files for their respective locale.
|
||||||
|
|
||||||
When the files are ready to be put back into Vidalia's trunk repository, visit:
|
Here's an example of how to move all of the current pootle translations into
|
||||||
|
the svn trunk area of Torbutton:
|
||||||
|
|
||||||
https://translations.launchpad.net/vidalia/trunk/+export
|
cd torbutton/trans_tools
|
||||||
|
./mkmoz.sh
|
||||||
|
for locale in `ls -1 moz/`;
|
||||||
|
do
|
||||||
|
mv -v moz/$locale/*.{rdf,dtd,properties} ../src/chrome/locale/$locale/;
|
||||||
|
done
|
||||||
|
|
||||||
Download the files in the .po format by following the instructions on the above
|
Now check the differences (ensure the output looks reasonable):
|
||||||
page. You should see something like:
|
|
||||||
|
svn diff
|
||||||
|
|
||||||
"When these translations have been exported, a message will be sent
|
And finally check in the changes:
|
||||||
to your-launchpad-email@yourdoma.example. This message will tell you
|
|
||||||
where you can download your file."
|
|
||||||
|
|
||||||
Once you have the .po files, you'll want to make .ts files from them. To reverse
|
svn commit
|
||||||
the process and send .ts files to Matt, you'll want to do the following:
|
|
||||||
|
|
||||||
for file in `ls -1|grep .po$|cut -f1 -d.`;
|
XXX: Update this to make it correct :XXX
|
||||||
do
|
|
||||||
echo "Attempting to convert" $file.po;
|
|
||||||
po2ts --input=$file.po --output=$file.ts;
|
|
||||||
done
|
|
||||||
|
|
||||||
----------------------------------------------------------------------------
|
Vidalia uses our translation portal to accept translations. Users use the
|
||||||
|
portal to check in their changes. 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
|
||||||
|
copy of Vidalia:
|
||||||
|
|
||||||
|
cd vidalia/src/vidalia/i18n/
|
||||||
|
vidalia/src/vidalia/i18n/$ svn up
|
||||||
|
|
||||||
If you're interested in helping to translate Torbutton, it uses Babelzilla[2].
|
You should see something like the following:
|
||||||
You'll need a login to Babelzilla just as you do with Launchpad. Once logged
|
|
||||||
in visit the following page for progress information and downloads of templates:
|
|
||||||
|
|
||||||
http://www.babelzilla.org/index.php?option=com_wts&Itemid=88&extension=3510&type=lang
|
Fetching external item into 'pootle'
|
||||||
|
Updated external to revision 15319.
|
||||||
|
|
||||||
All information about locales can be viewed at the above url. Click on
|
Updated to revision 2744.
|
||||||
different languages to see their respective statistics. Explore.
|
|
||||||
|
|
||||||
To download all locale strings with missing transations in their original
|
Now if you had changes, you need to convert from .po and move the newly updated .ts files
|
||||||
form, you can visit this url:
|
into the current stable locale directory. First convert them with the
|
||||||
|
'mkts.sh' script and then moving the proper .ts files from
|
||||||
|
'vidalia/src/vidalia/i18n/ts/' into 'vidalia/src/vidalia/i18n/' directory
|
||||||
|
while properly naming the files for their respective locale.
|
||||||
|
|
||||||
http://www.babelzilla.org/index.php?option=com_wts&Itemid=88&type=downloadtar&extension=3510
|
Here's an example of how to move all of the current pootle translations into
|
||||||
|
the svn trunk area of Torbutton:
|
||||||
|
|
||||||
To download all locale strings with missing translations as an empty string,
|
cd vidalia/src/vidalia/i18n/
|
||||||
you can visit this url:
|
./mkts.sh
|
||||||
|
for locale in `ls -1 ts/`;
|
||||||
|
do
|
||||||
|
mv -v ts/$locale/vidalia_$locale.ts vidalia_$locale.ts;
|
||||||
|
done
|
||||||
|
|
||||||
http://www.babelzilla.org/index.php?option=com_wts&Itemid=88&type=downloadempty&extension=3510
|
Now check the differences (ensure the output looks reasonable):
|
||||||
|
|
||||||
|
svn diff
|
||||||
|
|
||||||
If you plan to translate using Babelzilla often, you'll want to email
|
And finally check in the changes:
|
||||||
tor-translation@torproject.org and discuss your desires. Sadly, there is a
|
|
||||||
fixed number of translators allowed per project. To read more about Babelzilla
|
|
||||||
please read their Q&A section:
|
|
||||||
|
|
||||||
http://www.babelzilla.org/index.php?option=com_content&task=category§ionid=3&id=7&Itemid=25
|
svn commit
|
||||||
|
|
||||||
[0] https://www.launchpad.net/
|
|
||||||
[1] These tools can be found in the Debian package 'translate-toolkit'
|
|
||||||
[2] http://www.babelzilla.org/
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user