Calendar:Localization: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
m (Sunbird:Localization moved to Calendar:Localization: l10n is for more than Sunbird)
No edit summary
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Translating releases following after Sunbird 0.3a2: ==
<small>[[Calendar:Home_Page|<< Back to Calendar Home Page]]</small>


Sunbird is moving towards providing the same means of translation being defined for Firefox, Thunderbird, and other Mozilla applications in general. The two main bugs tracking this are [http://bugzilla.mozilla.org/show_bug.cgi?id=281935 281935] and [http://bugzilla.mozilla.org/show_bug.cgi?id=267981 267981]. We hope to have this ready as soon as possible so translators can begin their work. The procedure would be to follow the instructions found at
Localization, or ''l10n'' for short, is the process of translating and otherwise adapting a piece of software for a specific language and culture. Localization should not be confused with internationalization (i18n), which refers to the infrastructure to support different culture interaction between a user and the software.
[[Firefox:1.5 Localization]] when building Sunbird. That means that we will have a "calendar" directory added to the directories already on /l10n/ab-CD.


== Translating Sunbird 0.2/0.3a2: ==
For example: In English, words are written from left to right. In Arabic, the reverse is true. Words are written from right to left. Therefore, not only must someone ''localize'' a piece of software by translating all the menus and dialogs displayed to the user, but someone must ''internationalize'' the software by enabling it to display text in either a left to right, or right to left fashion (often referred to as bi-directional, or ''bi-di'' support), depending on the language.


The most practical ways to translate Sunbird 0.2/0.3a2 have proven to be the following which are based on the idea of replacing the en-US files:
=Status of l10n=
Thanks to the work of Mozilla contributors and the [http://www.mozilla.org/projects/l10n/ Mozilla Localization Project], there is a centralized location and format for storing locales: the /l10n repository. All Calendar products (Lightning and Sunbird) are using /l10n.


* If the language of your choice is NOT being shipped with Sunbird 0.2/0.3a2, you have to provide a calendar-ab-CD.jar file that includes the locale files of your language for calendar. Once you have that file inside the chrome directory along-side other calendar.jar files you can proceed with the next step.
=How to build a non-English Sunbird=
With locales moved to /l10n, building Sunbird in a locale other than English is easy. First, visit the [http://lxr.mozilla.org/mozilla/source/calendar/locales/all-locales list of available locales] to find the locale code you wish to build with. Note that due to the standarization put in place by /l10n, some locales may have been shortened from their "ab-CD" format to simply be "ab". Be sure to check the list to see if this applies to you.


* If the language of your choice is being already shipped with Sunbird 0.2/0.3a2, to start using it in that language all you need to do is to follow the instructions [[Sunbird:language-switch|here]]. If you repackage the Sunbird directory with the modified chrome.rdf file you should have a Sunbird dist in that language. '''Important note''': Doing so will just get you a translation of the calendar UI only. Parts that belong to the toolkit like the password manager will still be English. If you want to go further in translating those parts too you have to translate the en-US.jar file as well as en-win.jar, en-unix.jar and en-mac.jar and modify chrome.rdf in the same manner you did to replace the en-US files for calendar but this hasn't been tested so you have to overcome the problems you may encounter on your own. In that case, please do share your experience for the benefit of others.
Next, add the following lines to your .mozconfig, substituting your preferred locale code for the "ab-CD" in the example:


See also the [[Calendar:Translation]] page here.
ac_add_options --enable-ui-locale=ab-CD
mk_add_options MOZ_CO_LOCALES=ab-CD


== Help Wanted ==
Now build as normal. That's it!
Altogether we apologize if things are not straightforward the way they are but that's due to our limited resources.
 
Hopefully the next versions of Sunbird will come with the same convenient way of translation provided for other Mozilla
=How to build a language pack=
applications and will start appearing among the list of [http://www.mozilla.org/projects/l10n#projects MLP covered projects].
Language packs, or ''langpacks'' for short, allow users to install additional locales into the application without having to download and keep a second full copy of the app.
We can certainly use all the help you can offer to make that happen.
 
1. Login to CVS and get the initial Makefile, client.mk, and the Sunbird mozconfig file. The example below assumes you're connecting to the CVS server anonymously.
 
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot login
# type the password anonymous
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk mozilla/calendar/sunbird/config/mozconfig
cd mozilla
 
2. Create a .mozconfig file inside the mozilla directory. You'll want to specify the locales to check out of l10n CVS, and that you're building calendar. An example .mozconfig file that will check out the French (fr) and German (de) locales follows.
 
. $topsrcdir/calendar/sunbird/config/mozconfig
mk_add_options MOZ_CO_LOCALES=fr,de
 
3. Check out the source code. The first line in our .mozconfig tells make to read Sunbird's mozconfig before processing the other lines in ours. Since we specified the additional locales, they'll be checked out of CVS for us as well.
 
make -f client.mk checkout
 
4. Run the configure script to generate Makefiles in the localization directories.
 
./configure
 
5. Building a langpack requires nsinstall. We'll need to build it. Go into the mozilla/config directory and make it. You'll get some errors, which you can promptly ignore.
 
cd config
make
 
6. Go into the mozilla/calendar/locales directory, and make the langpack target for the locale you wish.
 
cd ../calendar/locales
make langpack-fr
<!--
or, to create an installer, use the installers target
 
make installers-fr
-->
 
=Getting l10n-relevant localization=
Localizers of Lightning and Sunbird should read the Calendar development newsgroup (mozilla.dev.apps.calendar) and the Localization newsgroup (mozilla.dev.l10n) to stay informed of recent Calendar-related developments.
 
In addition they should watch the '''calendar-l10n@mozilla.bugs''' mail address in [[https://bugzilla.mozilla.org bugzilla.mozilla.org]] to stay current on bugs that might affect localizers, especially late in a release cycle.
 
=Information for localizers/translators=
Please make yourself familiar with the MLP's [[L10n:Home_Page|wiki]], which lists the teams currently localizing Firefox and Thunderbird. Most documentation regarding how to contribute a localization or update an already existing one now applies to Sunbird as well.
 
In addition, some now outdated information on how to translate older Sunbird releases can be found at [[Calendar:Translation]]. While much has changed since that document was written, certain core concepts such as using UTF-8, and how to use Mozilla Translator have not.
 
[[category:calendar|Localization]][[Category:L10n]]

Latest revision as of 16:41, 1 May 2012

<< Back to Calendar Home Page

Localization, or l10n for short, is the process of translating and otherwise adapting a piece of software for a specific language and culture. Localization should not be confused with internationalization (i18n), which refers to the infrastructure to support different culture interaction between a user and the software.

For example: In English, words are written from left to right. In Arabic, the reverse is true. Words are written from right to left. Therefore, not only must someone localize a piece of software by translating all the menus and dialogs displayed to the user, but someone must internationalize the software by enabling it to display text in either a left to right, or right to left fashion (often referred to as bi-directional, or bi-di support), depending on the language.

Status of l10n

Thanks to the work of Mozilla contributors and the Mozilla Localization Project, there is a centralized location and format for storing locales: the /l10n repository. All Calendar products (Lightning and Sunbird) are using /l10n.

How to build a non-English Sunbird

With locales moved to /l10n, building Sunbird in a locale other than English is easy. First, visit the list of available locales to find the locale code you wish to build with. Note that due to the standarization put in place by /l10n, some locales may have been shortened from their "ab-CD" format to simply be "ab". Be sure to check the list to see if this applies to you.

Next, add the following lines to your .mozconfig, substituting your preferred locale code for the "ab-CD" in the example:

ac_add_options --enable-ui-locale=ab-CD
mk_add_options MOZ_CO_LOCALES=ab-CD

Now build as normal. That's it!

How to build a language pack

Language packs, or langpacks for short, allow users to install additional locales into the application without having to download and keep a second full copy of the app.

1. Login to CVS and get the initial Makefile, client.mk, and the Sunbird mozconfig file. The example below assumes you're connecting to the CVS server anonymously.

cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot login
# type the password anonymous
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk mozilla/calendar/sunbird/config/mozconfig
cd mozilla

2. Create a .mozconfig file inside the mozilla directory. You'll want to specify the locales to check out of l10n CVS, and that you're building calendar. An example .mozconfig file that will check out the French (fr) and German (de) locales follows.

. $topsrcdir/calendar/sunbird/config/mozconfig
mk_add_options MOZ_CO_LOCALES=fr,de

3. Check out the source code. The first line in our .mozconfig tells make to read Sunbird's mozconfig before processing the other lines in ours. Since we specified the additional locales, they'll be checked out of CVS for us as well.

make -f client.mk checkout

4. Run the configure script to generate Makefiles in the localization directories.

./configure

5. Building a langpack requires nsinstall. We'll need to build it. Go into the mozilla/config directory and make it. You'll get some errors, which you can promptly ignore.

cd config
make

6. Go into the mozilla/calendar/locales directory, and make the langpack target for the locale you wish.

cd ../calendar/locales
make langpack-fr

Getting l10n-relevant localization

Localizers of Lightning and Sunbird should read the Calendar development newsgroup (mozilla.dev.apps.calendar) and the Localization newsgroup (mozilla.dev.l10n) to stay informed of recent Calendar-related developments.

In addition they should watch the calendar-l10n@mozilla.bugs mail address in [bugzilla.mozilla.org] to stay current on bugs that might affect localizers, especially late in a release cycle.

Information for localizers/translators

Please make yourself familiar with the MLP's wiki, which lists the teams currently localizing Firefox and Thunderbird. Most documentation regarding how to contribute a localization or update an already existing one now applies to Sunbird as well.

In addition, some now outdated information on how to translate older Sunbird releases can be found at Calendar:Translation. While much has changed since that document was written, certain core concepts such as using UTF-8, and how to use Mozilla Translator have not.