PrayTimes.org

Add-on Translation Guide

From Pray Times

(Difference between revisions)
m (Prepare files)
 
(19 intermediate revisions not shown)
Line 1: Line 1:
-
This is a quick guide on how to translate Pray Times! Firefox add-on.
+
This is a quick guide on how to translate Pray Times! Firefox add-on into your language.
-
== Preparing Environment ==
+
== Set Up the Environment ==
-
=== Copy files ===
+
=== Install add-on ===
-
Download the addon [http://praytimes.org/addon/files/praytimes1.2 zip file] and extract it in a directory on your local drive. We refer to this directory as [addon-dir] in the following.
+
* Install Pray Times! onto your Firefox browser from [http://praytimes.org/addon/files/azan.xpi this link].
 +
* Also install [https://addons.mozilla.org/en-US/firefox/addon/1333 Quick Locale Switcher] to easily switch between languages.
-
=== Make a new Firefox profile ===
+
=== Open add-on folder ===
-
Use the following steps to create a new Firefox profile for the translation work (it is assumed that your operating system is Windows):
+
* Find your Firefox profile folder, as described in [http://support.mozilla.com/en-US/kb/Profiles#How_to_find_your_profile this page].
-
 
+
* Open [profile-folder]/extensions/azan-times@hamid.net/. We call this folder [addon-folder].
-
* Open [addon-dir]/dev folder
+
-
* Double-click on <code>my-firefox.bat</code>
+
-
* 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. Choose a folder in a safe place on your local drive. 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 <code>my-firefox.bat</code> 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 <code>azan-times@hamid.net</code> from [addon-dir]/dev to [profile-dir]/extensions.
+
-
* Open the file using notepad and replace its first list with [addon-dir].
+
-
* Close your Firefox and reopen it using <code>my-firefox.bat</code>.
+
-
 
+
-
=== Choose Locale ===
+
-
 
+
-
If you are using a [http://www.mozilla.com/en-US/firefox/all.html localized version of Firefox] (instead of the English one), then skip this step. Otherwise, do the following:
+
-
 
+
-
* Install [https://addons.mozilla.org/en-US/firefox/addon/1333 Quick Locale Switcher] add-on onto your browser.
+
-
* From the addon options menu, change the browser default language to your own language.
+
-
 
+
-
== Translation ==
+
-
 
+
-
The translation process is pretty easy. You only need to translate expressions in two files.
+
=== Prepare files ===
=== Prepare files ===
-
* Open [addon-dir]/chrome/chrome/locale.
+
* Goto [addon-folder]/chrome/locale/, make a copy of the folder <code>en-US</code> and rename it to your language id, say <code>fr</code>. (You can find your language id from [https://wiki.mozilla.org/L10n:Teams this list].)
-
* Make a copy of the folder en-US and rename it to your language id. (You may find your language id using [https://addons.mozilla.org/en-US/firefox/addon/1333 Quick Locale Switcher] add-on.)
+
* Open <code>chrome.manifest</code> file in the [addon-folder] and add a line like this into the file:<br/><code> locale  praytimes  fr  chrome/locale/fr/</code> <br/>where <code>fr</code> must be replaced by your language id.
 +
* Open <code>options.js</code> in the [addon-folder]/chrome/locale/ folder and add a line like this to the languages array, filled with your language information: <br/><code> {id: 'fr', name: 'French', lname: 'Français'}</code>
-
=== Start Translation ===
+
== Start Translation ==
-
The translation process is pretty easy. You only need to translate expressions in two files.
+
=== Translate ===
-
* Open [addon-dir]/chrome/chrome/locale/[your-language-id].
+
* Open [addon-folder]/chrome/locale/[your-language-id]/.
-
* Open two files <code>praytimes.dtd</code> and <code>common.properties</code> with a text editor like notepad.
+
* Open the two files <code>praytimes.dtd</code> and <code>common.properties</code> using a text editor like Notepad. (Note: your editor should be able to store files in UTF-8 format.)
* Start translating expressions in the above two files.
* Start translating expressions in the above two files.
-
Note that your editor should be able to store files in UTF-8 format.
+
=== Hints ===
 +
 
 +
* Always pick the shortest possible translation, in particular for expressions in the main display pad and its tooltip.
 +
* For general terms like OK, Cancel, Options, etc., please use the translations used in the [http://www.mozilla.com/en-US/firefox/all.html localized versions of Firefox].
 +
* For technical terms like Time Zone, Daylight Saving, etc. you can extensively use [http://en.wikipedia.org/ Wikipedia] in your language.
 +
* Taking a look at other Prayer Times websites and application in your language would be also helpful.
=== View changes ===
=== View changes ===
-
The changes you make to dialogue windows (including Options, About, and Comments dialogues) can be viewed immediately. Changes to the main menu and the display panel in the status bar
+
Changes made to the dialogue windows (including Options, About, and Comments dialogues) can be viewed immediately. Changes to the main menu and the display pad needs a browser restart (you can use [https://addons.mozilla.org/en-US/firefox/addon/7434/ Extension Developer add-on] to reload all chromes without restart).
-
needs a browser restart (you can use [https://addons.mozilla.org/en-US/firefox/addon/7434/ this add-on] to reload all chromes without restart).
+
== Submit Your Translation ==
== Submit Your Translation ==
-
After your translation is complete, please send the two files <code>praytimes.dtd</code> and <code>common.properties</code> to the developer.
+
After your translation is complete, please send the two files <code>praytimes.dtd</code> and <code>common.properties</code> to the developer, along with your complete name and your url to be included in the [[Add-on:_Credits|credits page]]. Thank you!
[[Category:Add-on]]
[[Category:Add-on]]

Latest revision as of 22:13, 24 May 2009

This is a quick guide on how to translate Pray Times! Firefox add-on into your language.

Contents

Set Up the Environment

Install add-on

Open add-on folder

  • Find your Firefox profile folder, as described in this page.
  • Open [profile-folder]/extensions/azan-times@hamid.net/. We call this folder [addon-folder].

Prepare files

  • Goto [addon-folder]/chrome/locale/, make a copy of the folder en-US and rename it to your language id, say fr. (You can find your language id from this list.)
  • Open chrome.manifest file in the [addon-folder] and add a line like this into the file:
    locale praytimes fr chrome/locale/fr/
    where fr must be replaced by your language id.
  • Open options.js in the [addon-folder]/chrome/locale/ folder and add a line like this to the languages array, filled with your language information:
    {id: 'fr', name: 'French', lname: 'Français'}

Start Translation

Translate

  • Open [addon-folder]/chrome/locale/[your-language-id]/.
  • Open the two files praytimes.dtd and common.properties using a text editor like Notepad. (Note: your editor should be able to store files in UTF-8 format.)
  • Start translating expressions in the above two files.

Hints

  • Always pick the shortest possible translation, in particular for expressions in the main display pad and its tooltip.
  • For general terms like OK, Cancel, Options, etc., please use the translations used in the localized versions of Firefox.
  • For technical terms like Time Zone, Daylight Saving, etc. you can extensively use Wikipedia in your language.
  • Taking a look at other Prayer Times websites and application in your language would be also helpful.

View changes

Changes made to the dialogue windows (including Options, About, and Comments dialogues) can be viewed immediately. Changes to the main menu and the display pad needs a browser restart (you can use Extension Developer add-on to reload all chromes without restart).

Submit Your Translation

After your translation is complete, please send the two files praytimes.dtd and common.properties to the developer, along with your complete name and your url to be included in the credits page. Thank you!

Personal tools