which he published in the Help topic "How to test my locale once translation is done?".
The original HowTo below is somewhat shorter (but not entirely without pictures ).
Lakrits
--
Currently, it is not possible to automatically rebuild the XPI with your locale via the WTS. So if you want to test your locale you can amend an existing XPI of the add-on menually:
- Download the extension (link in the WTS or in the forum topic).
- Download your locale folder (zipped in tar.gz) from your language page (link at the top)
- Unzip the XPI (7-Zip or PeaZip will do the job; links at the bottom of the post) by first renaming it from filename.xpi to filename.zip, and then unpacking the ZIP file.
- Add one locale line in the chrome.manifest file (most common) and/or the install.rdf file (use a text editor, e.g. Notepad++ or Geany, and open the files as any ordinary text file; links at the bottom of the post). You have just to copy-paste the en-US line and modify the language code letters according to your own language. Example for chrome.manifest:CODE[…]
locale myaddon en-US jar:chrome/my-addon.jar!/locale/en-US/
locale myaddon ar jar:chrome/my-addon.jar!/locale/ar/
locale myaddon bg jar:chrome/my-addon.jar!/locale/bg/
locale myaddon ca jar:chrome/my-addon.jar!/locale/ca/
to
[…]
locale myaddon en-US jar:chrome/my-addon.jar!/locale/en-US/
locale myaddon ar jar:chrome/my-addon.jar!/locale/ar/
locale myaddon bg jar:chrome/my-addon.jar!/locale/bg/
locale myaddon ca jar:chrome/my-addon.jar!/locale/ca/
locale myaddon sv-SE jar:chrome/my-addon.jar!/locale/sv-SE/ <-- your inserted line - Check the maxVersion variable in the install.rdf file, and change its value to a number (absolute or relative, e.g. 22.0b3, 21.0.2, 21.0.* or 21.*, etc.) higher than or equal to your version number of Firefox, Thunderbird or any other program your are testing the add-on on. Example:CODE(If you e.g. use Firefox version 20.0.1)
[…]
<em:targetApplication>
<Description>
<!-- firefox -->
<em:id>{an-alphanumeric-series}</em:id>
<em:minVersion>3.5</em:minVersion>
<em:maxVersion>4.0b9pre</em:maxVersion> <-- change this value
</Description>
</em:targetApplication>
to
[…]
<em:targetApplication>
<Description>
<!-- firefox -->
<em:id>{an-alphanumeric-series}</em:id>
<em:minVersion>3.5</em:minVersion>
<em:maxVersion>20.*</em:maxVersion> <-- now it should work for your FF version
</Description>
</em:targetApplication> - Insert your xx or xx-YY locale folder in the "general" locale folder, often-most in (add-on folder)\chrome\locale.
If the chrome folder contains a JAR file, just unpack that like you did the XPI file, i.e. rename the JAR from filename.jar to filename.zip and unpack as a ZIP archive. - Re-zip everything in proper order:
a) Repack the contents of the unpacked JAR folder (not the folder you unpacked it to) into a ZIP archive, and rename it from filename.zip to filename.jar.
b) Delete the unpacked, amended folder (if it's kept it may cause disruptions).
c) Pack the files and folders (not the folder you unpacked them to) of the main add-on folder into a ZIP archive. Then rename it from filename.zip to filename.xpi.
d) If you want to keep the original XPI file, just add "_test" to the folder name and "_test.zip" to the archive when you're repacking the add-on. - … and now you can test (on a clean new profile, it is safer)
If one of these steps is difficult for you, just ask on a forum topic, someone will help
--
Useful programs for doing these modifications
Text editors:
Geany
Notepad++
Archive managers:
7-Zip
PeaZip
--
Edited by Lakrits, 27 February 2013 - 07:33 PM.
Extended the HowTo with images and provided some additional text.