Kettu-projekti

Localisation instructions

Localisation of tests

What comes to tests the localisation of them is very translation like. Any of the text editors can be used to edit them for example notepad or a context. The beginning of the material that is to be localised is given in the beginning of the file and marked with "// -LOCALIZATION STARTS-". The names of the variables that are situated to the left from =-mark are not to be touched. Only the writing on the right side of the =- mark and inside the " "- and ' '-marks can be localised. The numeral data should not be changed either. Localisation ends when it meets the text "// -LOCALIZATION ENDS-". Material to be localised is inside those marks and all the variables concerning programming have been transferred away from this section. It is however important to notice to change only the text that is inside either ""- or ''-marks. HTML-tags are not to be touched because they are there as examples of errors and suggestions.

For example:

this.spacerSuggest_1='<spacer> element should have an empty alt attribute. For example: <spacer alt="" />';

Therefore the spacer-tags shown on the example above should not be touched. You should also pay attention not to remove the "extra" spaces because those may be crucial when it comes to spelling.

After the text has been translated the file is ready to be used and it can be added straight away to the extension. After this has been done the errors and suggestions that the test gives are in the translated language. You should place the translated tests in a separate folder according to the language for example.

Localisation of the user interface (GUI)

The user interface is easy to localise. The locales of different languages can be found from the extension\chrome\locale\ folder. en-US is there as already as a default locale. To localise a new language you just need to add the folder of the language in question. For example if you would like to localise Finnish, all you have to do is add the folder fi-FI. The folder en-US contains the foxability.dtd file, which should be copied to fi-FI. After this foxability.dtd can be opened for example in notepad (or any other text editor you want). The texts for translation can again be found inside the ""-marks.

Some parts shall remain untouched. The dtd-file in question defines the shortcut keys of the program. These are usually marked with the text "Acceskey", for example <!ENTITY main.fileAccesskey "F"> . You should not touch these sections because they change the shortcut keys.

With extensions Firefox will use the same language as the user has in his browser/operating system. Therefore if you have an operating system in English, Firefox will try to read the documents from the folder en-US. This way the user will always be able to use their own language. If you want this feature to be unautomatic there is a possibility to program a function in to the application that allows the user to define which language they want to use.

Different errors and answers in the user interface are in many situations written directly to the sourcecode. There is no easy way to localise them. It requires that somebody who understands programming finds the notifications, which are written directly to the code, and makes them easier to localise. One solution could be for example to read the error notifications and other messages from the document located in the extension\chrome\locale\xx-xx\ folder. This way the localisation would be made easier also for future purposes.