Localizing the OS and its applications adds much to the usability and
experience of non-English speaking users, maybe even making AROS usable for
them in the first place. The procedure for localizing the OS is basically the
same as for the site, but differs in its details. As with the website, even a
basic translation suffices, encompassing the Workbench and its
applications/utilities. These make a good start/base for further localization.
You can later always progress to the extra OS applications and contributed
files.
AROS, like AmigaOS, offers the option of storing an application's text-strings
in a separate file, allowing easy and efficient localization. The catalog
files for AROS are located mostly within the main code repository, which is
different from the website repository. In this case you can either perform a
complete Git clone, or browse the Git repository trough your browser and
download specific files.
The OS repository can be accessed by browser using this link
https://github.com/aros-development-team/AROS allowing you get one or two files
efficiently. A complete Git clone needs to be performed by:
git clone https://github.com/aros-development-team/AROS.git
Note the Git clone is quite large (200MB) and thus takes some time to
complete. Don't get intimidated by the size of the repository: you only need
to focus on a fraction of these files, fortunately. Now the work can begin. If
ever confused, don't hesitate to ask for help on AROS-exec or the ML.
Language definitions and fonts
First, you should check for your country in Locale/Countries and language
definition file in Locale/Languages. Most languages are added already. If
you can't find anything like <your_language>.c there, then you'll have to
create it.
Try to avoid the special characters in the name of the file, this can help
prevent problems with some non-utf programs (remember, AROS is meant to be
portable). You can look for the most complete lang.c file and copy it to
your_lang.c. Then, open the file in your text editor and translate all the
text strings you need. This includes usual units, like days, months, currency
etc. You can find tables with descriptions of chars in these files (collation
tables); you can skip them for the first time. After compiling, your locale
must appear in list of locales of Locale Pref.
What's next? If your language uses non-ISO fonts, you'll need them. Search on
the Internet for open-sourced AmigaOS bitmap or True Type Fonts, which can be
included to the system. Put them to the /Fonts or /Fonts/Truetype and fix the
mmakefile (be careful with mmakefiles!)
Creating CT files
Now comes the actual translating work. Localizing in AROS is similar to
localizing the AmigaOS. This means you can find some *.cd and *.ct files
along with the code (usually in Catalog drawer). <name>.cd files contain
catalog definitions and shouldn't be touched unless you have changed the
program itself. The CT files contain all the translated strings, and are the
object of your work. Browse the Git Tree for these files and translate them:
find the most recent <name>.ct file (look for version and date in header),
copy to <your_lang>.ct (much easier to translate than from <lang>.cd file) and
edit it. Try to put the words in correct times, which will require you to
check where they are used. It's important to keep placeholders, like %s,
%d, etc., or the application will crash later.
To aid you with this copy and rename work, there is the CLI/Terminal
application Flexcat. It can generate *.ct files automatically
from *.cd files for your language. It's useful in the sense that it also
keeps the original text as comments (for checking) and creates empty lines
for your translations. It also offers compiling options needed for testing
catalogs, which will be covered later.
The source code of Flexcat can be found in the Git repository in AROS/tools
but needs to be compiled for either AmigaOS or Linux. You can also check
Aminet or ask the Developer ML.
Using Flexcat
Before generating CT files, put Flexcat in the search path of your OS.
(e.g. on AROS/AmigaOS in the "C:" drawer). Now browse to the location
with Shell/Terminal and issue Flexcat to create a CT file from the original CD
file using the following command:
FlexCat <application>.cd NEWCTFILE=deutsch.ct
This will get you a ready-for translation deutsch.ct file. Often the version
information is not taken over; copy this manually from the original file.
Translate its contents and when done, commit the file to the repository.
A special notion about updating older catalog files - this can also be done
efficiently with Flexcat using the following command:
FlexCat <application>.cd deutsch.ct NEWCTFILE=deutsch.ct
This will keep all the old strings and insert new additions where found. The
Flexcat documentation has additional information.
Again, perform spellchecks and re-read texts as mentioned. Testing is
possible by several methods: (1) submit them to the Git server and wait for
the next nightly build. Or (2), more immediate, you can compile the locales
yourself using Flexcat, then copy them to the AROS locale drawer and check
with the involved application. Compiling the catalog files with Flexcat is
done with the following statement:
FlexCat <application>.cd <yourlanguage>.ct CATALOG <File>.catalog
Look in locale:languages for the name of your language. The catalog filename
is usually the name of your application. Choose the same name as existing
catalogs for the application. Besides verifying correct text-use it is also
recommended to test translations on smaller screen sizes to see if the text
is still legible.
Note
Don't commit the catalogs to the Git repository. They are automatically generated
by the build system.