Welcome Guest ( Log In | Register )


 
Reply to this topicStart new topic
> How to test your locale once translated, Steps, tips and three images
Goofy
post Feb 18 2006, 10:36
Post #1


Advanced Member
Group Icon

Group: Super Mod
Posts: 8.425
Joined: 30-July 05
From: GoofyLand
Member No.: 13


Extension Developer: Yes
Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran...
Translator for French (fr)
My OS Gnu/Linux
Translation Credits to Goofy



NB! Goofy eventually made a more colourful and longer version of this HowTo,
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 smile.gif).

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:
  1. Download the extension (link in the WTS or in the forum topic).
  2. Download your locale folder (zipped in tar.gz) from your language page (link at the top)
  3. 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.


  4. 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

  5. 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>

  6. 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.


  7. 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.

  8. … 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 smile.gif

--

Useful programs for doing these modifications

Text editors:
Geany
Notepad++

Archive managers:
7-Zip
PeaZip

--

This post has been edited by Lakrits: Feb 27 2013, 19:33
Reason for edit: Extended the HowTo with images and provided some additional text.


--------------------
Think Global, Make Locales!


Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
Go to the top of the page
 
+Quote Post
AlleyKat
post Feb 18 2006, 14:07
Post #2


[da-DK] Moderator
***

Group: BabelZillian Mods
Posts: 271
Joined: 8-February 06
From: Odense, Denmark
Member No.: 665


Extension Developer: No
Translator for Danish (da)
Translation Credits to AlleyKat (nick) / Finn S. Sørensen (real name).
Website: http://phpbb2.dk
Member of http://mozilladanmark.dk - the danish Mozilla translation & support site.




Nice guide Goofy; I thought I'd add mine.

Basic here is Windows (XP).
I hate working in explorer, so I'll use TotalCommander* as an alternative example, and I also here assume that it's set up with an editor that can handle the files.
Characterset can be an issue; for UTF-8 files I use the free TC plugin and file viewer/editor SynPlus. For all other files I use the free Context editor.
*) TC isn't opensource or freeware, but you can use it with a nag screen.

I'll be using Peekko chat as the example in the following.


1) Download the extension and the locale .gz files.


2) Locate the .xpi in TC:
user posted image


3) Simply Enter or Ctrl-Enter your way into the file (it's automatically treated as a packed archive):
user posted image


4) If you've set TC to use your favorite editor, simply locate the chrome.manifest and/or install.rdf file(s) and press F4 on it(/them). TC will ask if you want to unpack and edit, answer Yes. In Peekko we only need to change the first. Here's the manifest file:
user posted image


5) Copy and add a line with your own localization:
user posted image


6) Save and close the editor. TC will detect this, and ask if it should replace the file in the archive with the edited file, answer Yes.


7) Now we just need to put in the translation itself. Locate the locale folder in the xpi, and open your locale.tar.gz in the other window in TC:

user posted image

Drag&drop or press F5 to copy the localized folder into the xpi locale folder. Done!

Many plugins have a .jar file with the plugin itself in the chrome-folder - in Total Commander you just press Ctrl-PgDn on the jar file; TC handles the two layers of packed files fine and will just ask you if it should update the .jar file when you leave it again. Ofcourse, answer Yes.


8) Back out of the .xpi and drag it into (t.ex.) Firefox' Extensions window to install. Restart. Test away.


I don't know if this will be useful for anyone, but I hope so.



And my questions:

*) Who am I to ask when I have problems - here in Help, the plugin author or in my own locale group? I have problems testing my own Web Developer translation and am in doubt on some files in Tabbrowser Preferences...

*) Are there any helpful plugins about changing profiles etc. - I've lost my bookmarks and settings before and use both BackupFox, manual backups and bookmark exports, but it's still bothersome to do each time, any 'easy' solutions? biggrin.gif


Yep, born lazy and will remain so...

[ edit ] added comment on jar files in xpi's, althou this is pretty well covered in Goofy's Guide
Go to the top of the page
 
+Quote Post
Goofy
post Feb 18 2006, 14:33
Post #3


Advanced Member
Group Icon

Group: Super Mod
Posts: 8.425
Joined: 30-July 05
From: GoofyLand
Member No.: 13


Extension Developer: Yes
Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran...
Translator for French (fr)
My OS Gnu/Linux
Translation Credits to Goofy



smile.gif Thanks for this precious and colorful alternate howto .
For your questions :
1. It seems the best place to ask for problems is the "national" forum section but it can be as well in the extension forum without problem I think

2. I personnaly use Mozbackup from time to time but it is true it is annoying to do it each time...


--------------------
Think Global, Make Locales!


Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
Go to the top of the page
 
+Quote Post
arno.
post May 16 2006, 21:14
Post #4


Member
**

Group: Members
Posts: 29
Joined: 31-July 05
Member No.: 38
Extension Developer: Yes
Extensions: Clines
Translator for [No translator]



I just found an alternative way to do :

- download the extension
- install it
- close firefox
- download the locale
- unzip tar.gz file
- find your profile folder. inside it, find a folder named extensions. Inside it, find the folder corresponding to the extension you're translating. Inside it, find chrome.manifest
- open it with a text editor, and add one line of locale. But instead of putting for example :
locale clines fr jar:chrome/clines.jar!/locale/clines/fr/
put
locale clines fr file:///tmp/translation/clines/fr/
assuming you have put the locale in /tmp/translation/clines/fr/

That way, you'll won't have to unzip or rezip the .xpi file.

PS : may be for windows path of file:///tmp/translation/clines/fr/ is expressed slightly different, I don't known.
Go to the top of the page
 
+Quote Post
Goofy
post May 16 2006, 21:20
Post #5


Advanced Member
Group Icon

Group: Super Mod
Posts: 8.425
Joined: 30-July 05
From: GoofyLand
Member No.: 13


Extension Developer: Yes
Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran...
Translator for French (fr)
My OS Gnu/Linux
Translation Credits to Goofy



biggrin.gif Thanks for this tricky tip, dear arno.
I will test it asap !


--------------------
Think Global, Make Locales!


Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
Go to the top of the page
 
+Quote Post
MorZilla
post Oct 1 2006, 21:14
Post #6


[es-AR] Coordinator
***

Group: BabelZillian Mods
Posts: 126
Joined: 26-August 05
From: Merlo (Buenos Aires, Argentina)
Member No.: 127
Extension Developer: Yes
Extensions: Ñandú (former EditorZilla)
Translator for Spanish (es-AR / Argentina)



I just want to say something: The title of this page is enclosed by "<b>" tags: "<b>How to test...</b>"


--------------------
Boca means Passion
Boca means Love
Boca means Champion

IPB Image
Go to the top of the page
 
+Quote Post
Goofy
post Oct 1 2006, 23:05
Post #7


Advanced Member
Group Icon

Group: Super Mod
Posts: 8.425
Joined: 30-July 05
From: GoofyLand
Member No.: 13


Extension Developer: Yes
Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran...
Translator for French (fr)
My OS Gnu/Linux
Translation Credits to Goofy



QUOTE(MorZilla @ Oct 1 2006, 22:14) [snapback]19582[/snapback]

I just want to say something: The title of this page is enclosed by "<b>" tags: "<b>How to test...</b>"


Good catch smile.gif I just changed the tags, do you feel better ? tongue.gif


--------------------
Think Global, Make Locales!


Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
Go to the top of the page
 
+Quote Post
kennith
post Oct 15 2006, 08:56
Post #8


Advanced Member
***

Group: Members
Posts: 78
Joined: 12-October 06
Member No.: 2.583


Extension Developer: No
Extensions: I only provide translations for extensions
Translator for Chinese (zh-TW / Traditional)



I am also use arno's method, but have some difference and tips

1a Download the extension
1b Download the test locale.gz
2 Install it
3 Close firefox
4 Reopen firefox and let it generate folder
5 Close firefox again
6 Find your profile folder. inside it, find a folder named extensions
7 Inside it, find chrome.manifest
8 Open it with a text editor(I use EmEditor), and add one line of locale.(just copy and replace the language-code, 2 of them)
9 Open (WinRAR) both [extensions].jar and [test locale].gz and drag the locale into [extensions].jar\locale
10 Done
9v2(If there's no jar inside, just extract the locale out the the locale folder of the extensions)

Q1 Where is profile folder?
tips1: C:\Documents and Settings\current username\Application Data\Mozilla\Firefox\Profiles\xxxxxxxx.default\

Q2 How to find the installed folder?
tips2: sort the extensions folder with created date, the first one should be last installed one.

tips3: if you always need to translate and test extensions, make a shortcut of extensions to desktop biggrin.gif

Hope this can help some people.



--------------------
IPB Image
Go to the top of the page
 
+Quote Post
Goofy
post Oct 15 2006, 09:19
Post #9


Advanced Member
Group Icon

Group: Super Mod
Posts: 8.425
Joined: 30-July 05
From: GoofyLand
Member No.: 13


Extension Developer: Yes
Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran...
Translator for French (fr)
My OS Gnu/Linux
Translation Credits to Goofy



Thanks for this new set of steps and tips smile.gif

GoofyNote : to spot the new-installed extension specific folder, there is a very handy tool, called Extension Manager Extended, that has this feature : open the target extension folder on a click. Can be used to drag and drop the locale to be tested in the desired folder. wink.gif





--------------------
Think Global, Make Locales!


Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
Go to the top of the page
 
+Quote Post
Krcko
post Oct 15 2006, 19:40
Post #10


[hr-HR] Coordinator
***

Group: BabelZillian Mods
Posts: 267
Joined: 10-May 06
From: Croatia
Member No.: 1.393


Extension Developer: No
Translator for Croatian (please consider using hr instead)



QUOTE(Goofy @ Oct 15 2006, 10:19) [snapback]20281[/snapback]

GoofyNote : to spot the new-installed extension specific folder, there is a very handy tool, called Extension Manager Extended, that has this feature : open the target extension folder on a click.


MR Tech Local Install also has similar feature wink.gif

IPB Image


--------------------
Proud to be BabelZillan!
Go to the top of the page
 
+Quote Post
Goofy
post Oct 15 2006, 20:31
Post #11


Advanced Member
Group Icon

Group: Super Mod
Posts: 8.425
Joined: 30-July 05
From: GoofyLand
Member No.: 13


Extension Developer: Yes
Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran...
Translator for French (fr)
My OS Gnu/Linux
Translation Credits to Goofy



smile.gif Ah yes it is true, but personally, I don't like this extension's concept of "everything in one" (full of other features that are quite useless for me). Just my 2 eurocents.


--------------------
Think Global, Make Locales!


Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
Go to the top of the page
 
+Quote Post
fantasou
post Mar 1 2008, 13:39
Post #12


Member
**

Group: Members
Posts: 10
Joined: 29-February 08
Member No.: 7.585
Extension Developer: No



hi...im new...

i fully translated in Greek the Birthday Reminder Extension but I cant test

i do everything but i cant rezip them to xpi...

help plz any1?
Go to the top of the page
 
+Quote Post
Goofy
post Mar 1 2008, 14:16
Post #13


Advanced Member
Group Icon

Group: Super Mod
Posts: 8.425
Joined: 30-July 05
From: GoofyLand
Member No.: 13


Extension Developer: Yes
Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran...
Translator for French (fr)
My OS Gnu/Linux
Translation Credits to Goofy



QUOTE (fantasou @ Mar 1 2008, 13:39) *
hi...im new...

i fully translated in Greek the Birthday Reminder Extension but I cant test

i do everything but i cant rezip them to xpi...

help plz any1?

welcomeani.gif To rezip you need a software. I personnaly use 7zip which is quite useful.
One you have inserted your el-GR locale inside the locale folder, and added the proper line in the chrome.manifest, you must gather all the files in one .xpi file again then test.

[EDIT] I have updated the howto here
http://www.babelzilla.org/content/view/150/25/
with a full image guide and el-GR as an example. Please have a look smile.gif


--------------------
Think Global, Make Locales!


Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
Go to the top of the page
 
+Quote Post
fantasou
post Mar 1 2008, 18:33
Post #14


Member
**

Group: Members
Posts: 10
Joined: 29-February 08
Member No.: 7.585
Extension Developer: No



thank you vm

ill try it ASAP

edit:ok..now what do i do?
Go to the top of the page
 
+Quote Post
Goofy
post Mar 1 2008, 16:43
Post #15


Advanced Member
Group Icon

Group: Super Mod
Posts: 8.425
Joined: 30-July 05
From: GoofyLand
Member No.: 13


Extension Developer: Yes
Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran...
Translator for French (fr)
My OS Gnu/Linux
Translation Credits to Goofy



QUOTE (fantasou @ Mar 1 2008, 18:33) *
thank you vm

ill try it ASAP

edit:ok..now what do i do?


you have just to give a test to the extension, see if every Greek message is displayed correctly, check if there is any translation to fix, some possible typo...
When everything is OK then push the status on "released" and the dev is automatically warned by mail that your locale is available.


--------------------
Think Global, Make Locales!


Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
Go to the top of the page
 
+Quote Post
fantasou
post Mar 1 2008, 17:13
Post #16


Member
**

Group: Members
Posts: 10
Joined: 29-February 08
Member No.: 7.585
Extension Developer: No



problem!

when i try to install it on thunderbird, i take a "Not correct installation pack" or something like that...any ideas?
Go to the top of the page
 
+Quote Post
lois
post Jul 23 2008, 16:27
Post #17


Member
**

Group: Members
Posts: 22
Joined: 18-July 08
Member No.: 9.470
Extension Developer: No
Translator for Galician (gl-ES)
Translation Credits to Lois



QUOTE (Goofy @ Feb 18 2006, 09:36) *
There is no possibility to rebuild automatically the xpi with your locale throughout the WTS, up to now. So if you want to test your locale you can do this :

1. Download the extension (link in the WTS or in the forum topic)

2. Download your locale folder (zipped in tar.gz) from your language page (link at the top)

3. Unzip the xpi (7zip is good for you) and add one locale line in the install.rdf and/or chrome.manifest file. You have just to copy-paste the en-US line and modify the letters according to your own langugae

4. Insert your xx-XX locale folder in the "general" locale folder

5. Re-zip everything in proper order

... 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 smile.gif


I've translated PDF Download into galician language, I'm testing it but after installation the extension looks like frozen, no icons, no context menu, no tools menu.

HELP!! please.gif
Go to the top of the page
 
+Quote Post
lois
post Jul 30 2008, 14:55
Post #18


Member
**

Group: Members
Posts: 22
Joined: 18-July 08
Member No.: 9.470
Extension Developer: No
Translator for Galician (gl-ES)
Translation Credits to Lois



QUOTE (lois @ Jul 23 2008, 15:27) *
I've translated PDF Download into galician language, I'm testing it but after installation the extension looks like frozen, no icons, no context menu, no tools menu.

HELP!! please.gif


Well, ready. The problem was in the alphabetical ordering of the chrome.manifest file.
Go to the top of the page
 
+Quote Post
Lakrits
post Feb 24 2013, 18:44
Post #19


Daredevil Test Pilot
Group Icon

Group: Admin
Posts: 891
Joined: 18-June 09
From: Uppsala, Sweden
Member No.: 12.983


Extension Developer: No
Translator for Swedish (sv-SE)
My OS Windows
Translation Credits to Mikael Hiort af Ornäs



(Just an info post …)

Topic updated

The HowTo (first post in this topic) has been updated and slightly revamped.

Other HowTos, provided by kind-hearted users, are well worth reading as well.
However, if you are one of those users, please consider updating the image
links (or the images, if that is easier smile.gif).

/Lakrits
Acting Pseudo-Goofy ;)


--------------------
"[…] och han talar med bönder på böndernas sätt
men med lärde män på latin." – Erik Axel Karlfeldt

Lakrits
BabelZilla admin
Moderator for the Swedish BabelZilla forum section
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 1st November 2014 - 07:43
Bridged By IpbWiki: Integration Of Invision Power Board and MediaWiki © GlobalSoft