Using Mozilla Translator: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 104: Line 104:
  hg clone http://hg.mozilla.org/l10n-central/es-ES/
  hg clone http://hg.mozilla.org/l10n-central/es-ES/


This command will create a [locale] folder in your ~/[product][version]/ directory.


== Setting up MT configuration ==
== Setting up MT structure ==
 
So, check if you have this folders in your user directory:
 
'''/home/[user]/bin/''' → there should be at least this two scripts: run-mt.sh and update-hg-mozilla.sh
            '''/MT/'''
                '''|[product]/[version]/''' → empty
    '''/[product][version]/'''
                '''|hg.frenchmozilla.fr''' → folders like: browser, mail, suite, security, toolkit...
                '''|[locale]''' → the same as above: browser, mail, suite...
 
Now it depends of what are you going to translate, but PLEASE, maintain a clean environment. This means that you should have different product SEPARATELLY on each folder. Do not share the same folder for Firefox and Thunderbird. It could be risky and the ghost of your keyboard will appear!
 
=== Firefox ===
 
Open a new terminal and type (you should change the [version] tag):
 
mkdir -p MT/firefox/[version]/mozilla/extensions ; mkdir -p MT/firefox/[version]/mozilla/other-licenses/branding
 
Now, we are going to create the symlinks to the en-US files, edit [user] and [version]:
 
'''!!!! Check 2nd point again'''
 
ln -s /home/[user]/firefox[version]/hg.frenchmozilla.fr/browser /home/[user]/MT/firefox/[version]/mozilla
ln -s /home/[user]/firefox[version]/hg.frenchmozilla.fr/extensions/reporter /home/[user]/MT/firefox/[version]/mozilla/extensions
ln -s /home/[user]/firefox[version]/hg.frenchmozilla.fr/other-licenses/branding/firefox /home/[user]/MT/firefox/[version]/mozilla/other-licenses/branding/firefox
 
Done, and check there were no errors. If so, we have our en-US tree done for MT, we are going to move to our [locale] folder.
 
mkdir -p MT/firefox/[version]/l10n/[locale]/extensions/reporter ; mkdir -p MT/firefox/[version]/l10n/[locale]/other-licenses/branding
 
And now the symlinks as above:
 
ln -s /home/[user]/firefox[version]/[locale]/browser /home/[user]/MT/firefox/[version]/l10n/[locale]
ln -s /home/[user]/firefox[version]/[locale]/extensions/reporter /home/[user]/MT/firefox/[version]/l10n/[locale]/extensions
ln -s /home/[user]/firefox[version]/[locale]/other-licenses/branding/firefox /home/[user]/MT/firefox/[version]/l10n/[locale]/other-licenses/branding/firefox
 
Now, we have the perfect tree. And we need to set up Mozilla Translator
 
=== Thunderbird ===
 
[TBD, but it looks like Firefox]
 
=== Toolkit ===
 
[TBD, but it looks like Firefox]
 
== Setting up Mozilla Translator ==
 
Close all terminals and folders. Clean your workspace. Please, close all, see your perfect desktop. You will see the easy (I mean the best ;) ) way to translate any Mozilla Product based on hg.
 
Open a terminal. And type (changing [product] and [version] for the values set up early):
 
run-mt.sh [product] [version]
 
Maybe,
 
run-mt.sh firefox 3.1
 
This command will open Mozilla Translator using the contents in ''~/MT/firefox/3.1''
 
[[Image:Mozilla-Translator.png]]
 
Is this nice, isn't it?
 
Click on File > Setup, go to Import/Export and Check the ''Replace en-US directories name by ab-CD on exporting/writing''. Click Ok and it's done.
 
Click on File > Manage products and then in Add
 
Enter the name of the product. Firefox 3.1 for example
 
Fields:
 
Import original: mozilla
Import translation: l10n
Export translation: l10n
 
[[Image:Mozilla-Translator-Edit-product.png]]
 
Click Ok and exit the window. Now click on File > Update product and then in Ok
 
[[Image:Mozilla-Translator-Update-product.png]]
 
You will be prompted about the field you want to see when you are editing. For me, the most useful are (control and click):
File, Key, Text: Original, Text: Translated, Status, Comment and Fuzzy.
 
PUT YOUR LOCALE! For example es-ES. And click Ok.
 
You will see all the strings in your product. Could be 80 (Fennec) or maybe 8000 (Toolkit)
 
Now we need to import the existing translation, so Import > Import translation from CVS, click Ok, our locale should be filled automagically, and click Ok.
 
AND IT DOESN'T WORK!!!!
 
Now you need to change some things about the export path. Go to the Chrome view with Edit > Chrome view. In the left you will see the "Root" folder that contains a "Firefox 3.1" (or the name of your product). Open it, then open Platform neutral. You will see the different folder we created few minutes ago.
 
Click on one of them, and at right, click on Information. Put the same name in the field ''On Export CVS, export to''.
 
Do the same with the rest of the directories (but not with the subdirectories of ''browser'', ''other-licenses''...! )
 
[[Image:Mozilla-Translator-Edit-Export-CVS-folders.png]]
 
Now you are prepared to translate and export your work. Ctrl+Shift+A will show you all the problems that MT has encountered: unstranslated strings, different endings... And maybe you will see a window like that (not the same!):
 
[[Image:Mozilla-Translator-All-problematic-strings.png]]
 
When you are done, File > Save Glossary and then Export > Export CVS translation. Click Ok to the next two windows, and... it's done!! You have your local repository updated!! But it's not the final, you need to upload the changes to the l10n-central repository.


[[Category:L10n]]
[[Category:L10n]]
Confirmed users
120

edits

Navigation menu