Gallery Remote:i18n - Gallery Codex
Personal tools

Gallery Remote:i18n

From Gallery Codex

Instructions for translators

First, thank you for considering helping the project by donating time and effort to translate Gallery Remote to a new language or improving an existing translation.

The process for creating or updating Gallery Remote translations is significantly different from that of Gallery (1 and 2) translations. Please read this document carefully.

Setting up Gallery Remote for localization work

Installation

First, you need to install Gallery Remote. Grab a recent build from the download page and install it.

Also install the latest beta patch to make sure the language you intend to work on hasn't already been integrated. You can find help on how to do that in the FAQ.

Configuration

You then need to change a few things to put Gallery Remote in a mode that will make it more comfortable to work on translation.

Find the preferences file and add the following line:

uiLocaleDev=true

New language file

Then go to the img folder in your Gallery Remote folder and create an empty file for your language, with the following naming convention:

  • if the language you intend to work on is a competely new language, the filename will be
GRResources_languagecode.properties
  • if the language you intend to work on is a national modification of an existing base language, the filename will be
GRResources_languagecode_countrycode.properties
In this case you also need to extract the main language from GalleryRemote.jar (the Java SDK must be in your path) and you must have a console in the Gallery Remote installation folder):
jar xfv GalleryRemote.jar com/gallery/GalleryRemote/resources/GRResources.properties
and move it to the img folder.

standardized list of language codes

standardized list of country codes

Capitalization is important: language codes are lowercase, while country codes are uppercase.

Selecting the new language in Gallery Remote

Run Gallery Remote, go in the Preferences dialog. Your new language should be available in the Language selection. You need to restart Gallery Remote for the language to be used in the user interface.

Installing and running the localization application: ResBundleEdit

You can download RedBundleEdit from the Sourceforge project page.

To install it, just put the resulting file in a convenient place on your hard-drive, for example your Gallery Remote folder.

If Java is installed on your machine, running ResBundleEdit is as simple as double-clicking on the JAR file. If that doesn't work, you can open a console or Command Window, set the current directory to the directory you put the JAR in and type java -jar ResBundleEdit.jar.

When it's launched for the first time, ResBundleEdit show the properties files in the folder it was started from. You can change this in the Options dialog, and set the default directory to the img folder inside your Gallery Remote installation.

You should then be able to double-click on GRResources.properties in the list of files on the left.

The resource file will open in the right part of the window. There should be one column for resource keys, then one column for each language file in the folder. Your new language should be a column with nothing in it.

The translation process is just a matter of translating every key and adding the translation to your language. Good luck...

Translation guidelines

  • Start with an empty language file, do not copy the main language file.
    Gallery Remote will automatically default to the text in the main language (English) file if a given key is absent in your language file, and will signal this by appending *** before the English text.
    If you copy text from the English file to your file, you'll make it harder for yourself and the Gallery team to identify which strings have been translated and which have not.
  • Always use ResourceBundleEditor to edit a language file, do not use a standard text editor. Java requires a special encoding for language files.
  • You can ask ResBundleEdit to close those locales that you don't need to work on to have more room for your locale and the default/main/English locale.
  • If a string has text like:
       {0}
       {1, number, integer}
do not translate the text inside the brackets, it will be replaced at runtime by the application.
  • Test your translation often by running Gallery Remote and making sure that your translation makes sense. You have to restart Gallery Remote for it to take new translations into account; translations are not loaded dynamically.

Sending completed translations

When your translation is complete, you can either add it to the Gallery language tracker (preferred), with a title like: [GR] language file for language or send it to me via email (paour AT users DOT sourceforge DOT net).