Development:Languages: Difference between revisions
From MoodleDocs
David Mudrak (talk | contribs) m (→Goals) |
David Mudrak (talk | contribs) mNo edit summary |
||
Line 13: | Line 13: | ||
# '''String files are not branched'''. We must keep all strings from all branches in place for backwards compatibility and we are unable to easily clean up language packs. Some say the branching and merging is too big toast for our translators. | # '''String files are not branched'''. We must keep all strings from all branches in place for backwards compatibility and we are unable to easily clean up language packs. Some say the branching and merging is too big toast for our translators. | ||
# '''Plural forms'''. We are unable to handle plurals at all. For example, handling [http://www.gnu.org/software/hello/manual/gettext/Plural-forms.html plural forms in gettext] is traditional, well tested and robust way. MDL-12433 by Sam Marshal shows alternative approach based on logical expressions. | # '''Plural forms, gender forms and other grammar'''. We are unable to handle plurals at all. For example, handling [http://www.gnu.org/software/hello/manual/gettext/Plural-forms.html plural forms in gettext] is traditional, well tested and robust way. MDL-12433 by Sam Marshal shows alternative approach based on logical expressions. | ||
# '''Strings can't be modified'''. It is difficult to notify translators that some string was modified (expanded, fixed, changed). The current work around it the policy of adding another string with the same suffixed name (like 'license2'). Would be nice if such strings were tagged/highlighted in the translation UI. | # '''Strings can't be modified'''. It is difficult to notify translators that some string was modified (expanded, fixed, changed). The current work around it the policy of adding another string with the same suffixed name (like 'license2'). Would be nice if such strings were tagged/highlighted in the translation UI. | ||
# '''We do not use standard formats'''. Translators can't use specialized tools for translation (PO/gettext editors, community translation portals). Also, I am not aware of any benchmarking showing the performance differences between out native $string[] format compared to, for example, standard .po format. | # '''We do not use standard formats'''. Translators can't use specialized tools for translation (PO/gettext editors, community translation portals). Also, I am not aware of any benchmarking showing the performance differences between out native $string[] format compared to, for example, standard .po format. | ||
Line 37: | Line 37: | ||
This is the list of projects, resources and tools being explored | This is the list of projects, resources and tools being explored | ||
* [http://search.cpan.org/~ferreira/Locale-Maketext-1.13_82/lib/Locale/Maketext/TPJ13.pod Great CPAN article about software localization] | * [http://search.cpan.org/~ferreira/Locale-Maketext-1.13_82/lib/Locale/Maketext/TPJ13.pod Great CPAN article about software localization]. Plain string based lexicon is not enough. Strings can be translated by functions only. "A phrase is a function; a phrasebook is a bunch of functions." | ||
* [http://en.wikipedia.org/wiki/XLIFF XLIFF] - XML Localization Interchange File Format | * [http://en.wikipedia.org/wiki/XLIFF XLIFF] - XML Localization Interchange File Format | ||
* [http://translate.sourceforge.net/wiki/virtaal/index Virtaal] - promising, we could have XLIFF <-> .php conversion | * [http://translate.sourceforge.net/wiki/virtaal/index Virtaal] - promising, we could have XLIFF <-> .php conversion |
Revision as of 22:38, 20 November 2009
Template:Infobox Project Template:Moodle 2.0
This is an initial proposal of changes to the language strings processing in Moodle.
Current issues
- String files are not branched. We must keep all strings from all branches in place for backwards compatibility and we are unable to easily clean up language packs. Some say the branching and merging is too big toast for our translators.
- Plural forms, gender forms and other grammar. We are unable to handle plurals at all. For example, handling plural forms in gettext is traditional, well tested and robust way. MDL-12433 by Sam Marshal shows alternative approach based on logical expressions.
- Strings can't be modified. It is difficult to notify translators that some string was modified (expanded, fixed, changed). The current work around it the policy of adding another string with the same suffixed name (like 'license2'). Would be nice if such strings were tagged/highlighted in the translation UI.
- We do not use standard formats. Translators can't use specialized tools for translation (PO/gettext editors, community translation portals). Also, I am not aware of any benchmarking showing the performance differences between out native $string[] format compared to, for example, standard .po format.
- More syntax checks are required so the translators do not brake Moodle functionality (see MDL-12433)
Goals
- Do not reinvent the wheel. Keep "do one thing and do it well" principle. Keep it simple and stupid.
- Make simple things easy and hard things possible
- ...
Use cases
- Developers add new strings to the core
- Translators translate untranslated core strings and publish their work
- Admins want to locally modify the language pack
- Contributors add new string to the contributed code
- Translators translate untranslated contrib strings and publish their work
- ...
Research
This is the list of projects, resources and tools being explored
- Great CPAN article about software localization. Plain string based lexicon is not enough. Strings can be translated by functions only. "A phrase is a function; a phrasebook is a bunch of functions."
- XLIFF - XML Localization Interchange File Format
- Virtaal - promising, we could have XLIFF <-> .php conversion
- Launchpad - translation portal used by Ubuntu and many other projects. Would require BSD licensing, therefore IMO not suitable as we could not import our current GPL'ed translation. Seems to be pretty slow during the process.
- [Plural forms in gettext
- Zend_Translate reference guide
- MDL-12433 - Sam Marshal's proposal