Scratchpad:Translation

General Notes
(more for developers) Please use the translate method from openlp/core/lib/__init__.py, rather than self.trUtf8, because self.trUtf8 is not always able to detect the correct translation context (especially on Windows).

Status

 * 1) Static Translation (In progress)
 * 2) * Framework Done
 * 3) * Correct Translation context (Ongoing)
 * 4) * Open Issues
 * 5) ** Plugin Names are not be translated yet
 * 6) ** Plugin Names in the plugin window (Alt+F7) are not be translated yet
 * 7) ** Names of Bible chapters are not translated yet
 * 8) Dynamic Translation
 * 9) * Framework
 * 10) * Side Effects
 * 11) ** in toolbar.py -> addToolbarButton(...) the list self.icons[] is built with the translated titles, so after language is changes all the content is invalid :-(

Why translation of contexts for each plugin have to be done
some plugin names need different genders: e.g.: "a bible", "une bible" "a song", "un chant" "an alert", "une alerte"

May there are languages which have different word order? ...

Way for imlementation

 * 1) We need to declare additional variables:
 * : The internal name of the plugin
 * 1) * plugin.displayName: The translatable name of the plugin
 * 2) * plugin.itemName: The name of the item this plugin provides (also translatable)
 * 3) * plugin.itemNamePlural: The plural of the item name (translatable).
 * 4) We need to change the calls to addToolbarButton in MediaManagerItem:
 * 5) * Everything should be translatable
 * 6) * unicode(translate('MediaManagerItem', 'Perform an action on %s')) % self.PluginItemName
 * 7) We need to pass in names from the plugin:
 * 8) * internal name, display name, item name, section name
 * 9) * perhaps use a dict?

Example Plugin 3
This is the revised version.