Add-on Translation Guide
From Pray Times
This is a simple guide for translating Pray Times Firefox add-on.
Contents |
Preparing Environment
Copy files
Download the addon zip file from here and extract it in a directory on your local drive. We refer to this directory by [addon-dir] in the rest.
Make a new Firefox profile
Do the following steps to create a new Firefox profile for the translation work (we assume that you are using Windows):
- Open [addon-dir]/dev folder
- Double-click on firefox-praytimes.bat
- The Firefox profile dialog appears. Click on 'Create Profile..'
- Skip the first page of the wizard.
- In the second page, change profile name to 'praytimes' and press on 'Choose Folder...' to set a folder for the profile. Note that this folder should not be removed or changed later on. We call this folder [profile-dir].
- Press Finish on the dialog box and then press Exit.
The praytimes Firefox profile is now created. You can double-click on firefox-praytimes.bat to open Firefox with this new profile.
Install Pray Times!
To add Pray Times to the newly created Firefox profile, do the following steps:
- Copy a file named azan-times@hamid.net file from [addon-dir]/dev to [profile-dir]/extensions.
- Open the file using an editor and replace its first list with [addon-dir].
- Restart your Firefox. (Nte: use firefox-praytimes.bat to reopen the browser.)
You will see Pray Times! icon on the status bar. Click on it to choose your location and method of calculation. The Pray Times starts working.
Start Translation
The translation process is pretty easy. You only need to translate expressions in two files.
Prepare language files
- Open [addon-dir]/chrome/chrome/locale.
- If there is a folder with your language id (like fr-Fr for french) then simply go to the next section (Translate files).
- Otherwise, make a copy of the folder en-US and rename it to your language id. (Note: if you are not sure about your language id, please contact me.)
- Open [addon-dir]/chrome/chrome/content/options.js and add an entry to the languages array with your language id and description.
Translate files
- Open [addon-dir]/chrome/chrome/locale/[your-language-id].
- Open two files common.properties and praytimes.dtd with a text editor like notepad.
- Start translating expressions in the above two files.
Note that your editor should be able to store files in UTF-8 format.