Translate

Konrad Twardowski

Patches

Requirements

  • Makagiga [SDK]
  • [Java] JDK
  • Gettext Utilities
  • A Gettext catalog (.po file) editor:
    • Poedit (cross-platform)
    • Lokalize (KDE 4)
    • or any text editor with UTF-8 support

Application Translation using Makagiga SDK (preferred)

Create a new Project

  1. Run Makagiga SDK
  2. Click New Project... and set the following properties:
    • Plugin Type: Localization
    • Name - you can include both translated and English name. Example: Traduzione italiana / Italian translation
    • Don't forget to select the Language Translation option
    • Internal Name - English name is preferred in this case. Example: italiantranslation
    • Package Name - Example: your.unique.packagename.italiantranslation

Translate the English messages

  1. Run "ant i18nnew" to create "po/NEW_TRANSLATION_RENAME_THIS_FILE.po"
  2. Rename "po/NEW_TRANSLATION_RENAME_THIS_FILE.po" to "po/LANGUAGE_CODE.po", where LANGUAGE_CODE is a two-letter ISO Language Code (example: po/it.po)
  3. Translate the "po/LANGUAGE_CODE.po" file

Run and test the new Project

  1. Type "ant run" to compile plugin and launch Makagiga
    • Now Makagiga should use and display your language translation
    • You may need to set "MAKAGIGA_LANG=LANGUAGE_CODE" environment variable to force language/locale change (example Linux command: MAKAGIGA_LANG=it ant run)

Icon (optional)

  1. Download a free flag icon from http://findicons.com/ or http://www.iconarchive.com/
    • The icon size should be 48x48 or 32x32
    • The icon format must be PNG
    • Include icon copyright notice in the LICENSE.txt file if necessary
  2. Copy your icon to the project folder as "icon.png" (you can replace existing file)

Packaging

Run "ant dist" to build a new *.mgplugin package file that can be later installed by users. Done.

Application Translation using Makagiga Source (existing translations)

  1. Download and unzip Makagiga source - makagiga-source-VERSION.zip
  2. Run ant i18n to compile/merge translations
  3. Run "ant compile run" to compile and launch Makagiga to test the translation

Special Text Elements

Argument Elements

{0}, {1}, etc. - each {n} string will be replaced at runtime with an applicable value. For example, "Page {0} of {1}" string may be displayed as "Page 2 of 10".

HTML Tags

  • B - display text using bold font
  • BR - new line; like \n
  • CODE - display text using monospace font

Note: Use tags only if the original text contains HTML elements.

Plugin Translation

Internal Plugins

Plugin names and descriptions are located in the plugin.properties files. Example:

String.name[fr]=...

External Plugins

plugin.properties of external plugin (e.g. Journal) can be found in the Makagiga SVN repository.

More Stuff (optional)

Tips

Tip of the day messages are located in the src/org/makagiga/resources/tips (source package). Use en.xml as a template file.

Valid XML entities:

  • & = &
  • &lt; = <
  • &gt; = >
  • &apos; = '
  • &quot; = "

All other entities (e.g. &eacute;) are invalid in plain XML (for example, use UTF-8 "é" instead of "&eacute;").

Terminology

Word Definition
Action Text+Icon+Keyboard shortcut (e.g. Quit Ctrl+Shift+Q menu item)
Address Web page address, URL location
Article RSS Article/Item
Browser Internet Browser (e.g. Firefox)
Cell A rectangle element at row/column in a table (e.g. High priority in To-Do document)
Console See menu -> Tools -> [Console]
Designer A sidebar panel with additional functions
Desktop, Workspace A tab with Widgets
Document, Editor, Tab A document opened in a tab (e.g. Notepad or To-Do list)
Enclosure RSS enclosure; link to external URL (e.g. MP3 podcast)
Feed RSS Feed
Item List/Tree element, Table row, file, folder, etc.
Note See Note Widget
OpenSearch An OpenSearch plugin
Orientation Paper orientation in Print Preview dialog
Port A port number
Profile Makagiga Profile. See "Command Line"
Proxy A Proxy server. See also: Port
Script e.g. code written in JavaScript
Spelling Used by the spell checker plugin
Star/Starred A small, yellow star icon
System Tray Also known as "notification area"
Tab A GUI element, not Tab-key
Tags A space-separated list of words. See: menu -> Tags
Task To-Do task (summary, date, priority, etc.)
The quick brown fox jumps over the lazy dog See http://en.wikipedia.org/wiki/The_quick_brown_fox_jumps_over_the_lazy_dog
Todo, To-Do To-Do list, To-Do plugin
Transparent A transparent image with no background color
Type e.g. file type/kind
URL e.g. http://example.com or local file (file:///foo)
Variable See [Console]
View e.g. menu bar -> View, a view preferences like color or font
Viewer e.g. read only RTF Viewer plugin

See Also


Related

Wiki: Console
Wiki: Java
Wiki: SDK