From: Alexander W. <ale...@gm...> - 2010-11-16 03:38:19
|
Short instructions. For add l10n support for plugins need in each plugins include StelLocaleMgr.hpp and marked all UI text strings as translatable (q_("") or N_("")). Example for AngleMeasure: In includes block: #include "StelLocaleMgr.hpp" In plugins info (description) block: StelPluginInfo AngleMeasureStelPluginInterface::getPluginInfo() const { // Allow to load the resources when used as a static plugin Q_INIT_RESOURCE(AngleMeasure); StelPluginInfo info; info.id = "AngleMeasure"; info.displayedName = q_("Angle Measure"); info.authors = q_("Matthew Gates"); info.contact = "http://porpoisehead.net/"; info.description = q_("Provides an angle measurement tool"); return info; } In sources list using q_("") or N_("") for translatable text. And add file names with includes translatable lines in POTFILES.in into po/stellarium folder Notes: 1. Need refactoring painter.drawText lines - example in AngleMeasure plugin 2. Need refactoring HTML text in UI-files - example in Oculars (tab "About" in GUI) -- With best regards, Alexander |