|
TranslationsMisfit Model 3D has basic support for internationalization. This support includes:
All translations are provided by users of Misfit Model 3D. If you are interested in creating a translation for a specific language, contact me and I will help you get started. LimitsThe length of some model text strings are limited to a fixed size in bytes. The length of those strings in UTF-8 characters depends on how many bytes each character requires. Standard ASCII characters (0-127) only require one byte (so those strings can be the same length as the number of bytes). Other characters (such as hiragana) are up to three bytes each, so strings would be limited to the number of bytes divided by the character size in bytes (two or three). Some text length limits are included in the table below.
Note that these limits are on the model file format. Text that is longer than these limits may appear to work until the model is saved. When the model is saved the text will be truncated. Also note that some model file formats may not properly handle UTF-8 characters. Starting a New TranslationMisfit Model 3D uses Qt for i18n support. There are two translation files. One is Qt-specific text (for file dialog boxes, message windows, etc). The other is MM3D-specific text (menu items, status bar messages, errors, etc). Some Qt-specific or MM3D-specific translations already exist. For a complete user interface translation, MM3D needs both the Qt translation text and the MM3D translation text. The i18n files are in the source distribution in the i18n directory. Files beginning with "qt_" are Qt-specific text. Files beginning with "mm3d_" are MM3D-specifc text. The file names end with the language code (en for English, de for German, fr for French). The files with a .ts extension are the source files. These are text documents in XML format. The text encoding is UTF-8. The files with a .qm extension are binary files that are loaded by Qt. There is a Qt program to convert the .ts text translation file into a .qm file that MM3D can use. To start a new translation, make a copy of mm3d_ref.ts and qt_untranslated.ts (if the qt version does not already exist) and rename them as mm3d_lg.ts and qt_lg.ts, where "lg" is the language code (fr=french, es=spanish, it=italian, ja=japanese, yi=yiddish, you get the idea...). Use Qt Linguist to edit the .ts files and create translations. A guide for getting started is here: http://doc.trolltech.com/4.1/linguist-translators.html. When you are ready to test a translation file, you can run Qt's lrelease program to convert a .ts file into a .qm file. MM3D will read .qm files from the current directory. Alternately you can copy the files into the installation translation directory (by default this is /usr/local/share/mm3d/i18n on Linux and ProgramFiles\MisfitModel3d\i18n on Windows). If your language file does not appear to be read by mm3d, try setting the LANG environment variable (for example, for spanish you would set LANG=es and have qt_es.qm and mm3d_es.qm files in the current directory). Once you have a usable translation file, send the .ts files to me so I can include it in the next build. If you translated both the MM3D text as well as the Qt text, be sure to send me both .ts files. As new versions are released, new text will be added that needs to be translated. If you need to merge the new text into your .ts file you can email the .ts file and I can merge the new text in, then send the .ts file back to you. |