Fix a couple of non-cleared key issues in hidden services
[tor/rransom.git] / doc / translations.txt
blob874abe1bc1bfeec001ccea44dfb25f20a7f7a334
1 ##      Instructions for helping translate text for Vidalia, TorButton
2 ##      and TorCheck
3 ##  ( More translation information for Tor related apps will accumulate here )
5 Our translations are handled in one of two places. The Tor Translation Portal
6 handles all of the translations for Vidalia, Torbutton and TorCheck. The Tor
7 website itself is currently handled by hand translations using subversion.
9 -------------------------------------------------------------------------
11 For the Tor website, you'll need a Tor SVN account.
12 If you do not have one and you need one, please run this command with your
13 desired username in place of 'USERNAME':
14     htdigest -c passwd.tmp "Tor subversion repository" USERNAME
15 and send us the contents of passwd.tmp.
17 -------------------------------------------------------------------------
19 For the Portal-based projects, all three check in their respective .po
20 files into the following subversion urls:
22     https://tor-svn.freehaven.net/svn/translation/trunk/projects/torbutton
23     https://tor-svn.freehaven.net/svn/translation/trunk/projects/torcheck
24     https://svn.vidalia-project.net/svn/vidalia/trunk/src/vidalia/i18n/
26 The current pootle configuration is checked into subversion as well:
28     https://tor-svn.freehaven.net/svn/translation/trunk/pootle
30 ---------------------------- TorCheck -------------------------------
32 TorCheck uses our translation portal to accept translations. Users use
33 the portal to check in their changes.  To make use of the translations
34 that users have commited to the translations/ subversion module, you'll
35 need to ensure that you have a current checked out copy of TorCheck:
37     cd check/trunk/i18n/
38     check/trunk/i18n$ svn up
40 You should see something like the following:
42     Fetching external item into 'pootle'
43     External at revision 15300.
45     At revision 15300.
47 Now if you had changes, you'd simply want to move the newly updated .po files
48 into the current stable directory.  Moving the .po files from
49 'check/trunk/i18n/pootle/' into 'check/trunk/i18n' properly naming the files
50 for their respective locale.
52 Here's an example of how to move all of the current pootle translations into
53 the svn trunk area of TorCheck:
55     cd check/trunk/i18n/
56     for locale in `ls -1 pootle/|grep -v template`;
57     do
58     mv -v pootle/$locale/TorCheck_$locale.po TorCheck_$locale.po;
59     done
61 Now check the differences (ensure the output looks reasonable):
63     svn diff
65 Ensure that msgfmt has no errors:
67     msgfmt -C *.po
69 And finally check in the changes:
71     svn commit
73 ---------------------------- Torbutton -------------------------------
75 Torbutton uses our translation portal to accept translations. Users use
76 the portal to check in their changes.
78 To make use of the translations that users have commited to the translations/
79 subversion module, you'll need to ensure that you have a current checked out
80 copy of Torbutton:
82     cd torbutton/trans_tools
83     torbutton/trans_tools$ svn up
85 You should see something like the following:
87     Fetching external item into 'pootle'
88     External at revision 15300.
90     At revision 15300.
92 Now if you had changes, you need to convert from .po and move
93 the newly updated mozilla files into the current stable locale
94 directory. First convert them with the 'mkmoz.sh' script and then
95 move the proper mozilla files from 'torbutton/trans_tools/moz/' into
96 'torbutton/src/chrome/locale/' directory while properly naming the files
97 for their respective locale.
99 Here's an example of how to move all of the current pootle translations into
100 the svn trunk area of Torbutton:
102     cd torbutton/trans_tools
103     ./mkmoz.sh
104     for locale in `ls -1 moz/`;
105     do
106        mv -v moz/$locale/*.{dtd,properties} ../src/chrome/locale/$locale/;
107     done
109 Now check the differences (ensure the output looks reasonable):
111     svn diff
113 And finally check in the changes:
115     svn commit
118 If you make changes to strings in Torbutton, you need to rebuild the 
119 templates in torbutton/trans_tools/pootle/templates. This is done via:
121     moz2po -P -i torbutton/src/chrome/locale/en/ -o torbutton/trans_tools/templates/
123 You now have two options:
125 Option 1 (The Pootle Web UI Way):
127 View then commit the changes to the template with:
129     svn diff torbutton/trans_tools/templates/ 
130     svn commit torbutton/trans_tools/templates/
132 Then poke Jake to 'svn up' on the Pootle side. If you do this enough
133 times, he may give you a button to click to update templates in Pootle,
134 or maybe even an account on the Pootle server. Persistence is a virtue.
136 You then need to go to the Pootle website and click the checkbox next to
137 every language on:
138 https://translation.torproject.org/projects/torbutton/admin.html
139 and then click "Update Languages" at the bottom.
141 You then need to go to each language and go to "Editing Options" and click 
142 "Commit" for each one. 
144 You then need to 'svn up' locally, and follow the procedure above for
145 rebuilding your .dtd and .properties files.
147 Yes, this sucks. :/
149 Option 2 (Use your own msgmerge: YMMV, may change .po flags and formatting):
151 Run msgmerge yourself for each language:
153     cd torbutton/trans_tools
154     for i in `ls -1 pootle`
155     do
156        msgmerge -U ./pootle/$i/torbutton.dtd.po ./pootle/templates/torbutton.dtd.pot
157        msgmerge -U ./pootle/$i/torbutton.properties.po ./pootle/templates/torbutton.properties.pot
158     done
159     svn diff pootle
160     svn commit pootle
162 Then poke Jake to 'svn up' on the Pootle side. If you do this enough times, 
163 he may give you a button on Pootle, or maybe even an account on the Pootle 
164 server. Persistence is a virtue.
166 You may notice that some .po file flags and string formatting have changed 
167 with this method, depending on your gettext version. It is unclear if this 
168 is a problem. Please update this doc if you hit a landmine and everything 
169 breaks :)
171 After this process is done, you then need to regenerate the mozilla
172 .dtd and .properties files as specified above.
174 ---------------------------- Vidalia -------------------------------
176 Vidalia uses our translation portal to accept translations. Users use the
177 portal to check in their changes. No conversion or moving is required other
178 than normal pootle usage.