Edgewall Software

Changes between Version 70 and Version 71 of TracL10N


Ignore:
Timestamp:
Nov 28, 2008, 8:14:39 PM (15 years ago)
Author:
Christian Boos
Comment:

extracted historical TracL10N/DesignNotes

Legend:

Unmodified
Added
Removed
Modified
  • TracL10N

    v70 v71  
    107107
    108108=== Open issues ===
    109  - i18n infrastructure for Trac plugins
     109 - i18n infrastructure for Trac plugins (#7497)
    110110 - translation of wiki pages (#1513) and help pages (TracDev/Proposals/NewHelp)
    111111 - translation of text within Javascript source code
     
    113113
    114114----
    115 == The following is historical information ==
    116 
    117 === Wiki ===
    118 
    119  * We need an easy way to translate wiki pages. It should help and '''encourage''' people to translate a particular page into their native language.
    120  * It should be possible to quickly switch between different versions of the same page. May be we should give the possibility to compare different versions on one page.
    121  * We have to give the way to set the prefered language.
    122  * There should be a way to quickly check if the translation is current with respect to the original version. The original version may not always be in english, so there should be a way to know which one is the original.
    123 
    124 === Interface ===
    125 
    126 For the project to be localized, the actual interface would have to be translated as well.  How difficult would it be to translate the interface to say, Japanese?
    127 
    128 If possible it should be a user preference, which may require some additional changes.  Ideally a single Trac site should be able to serve users in many countries.  The interface should be translated and there should be support for translation of custom fields and plug-in's as well as wiki pages.
    129 
    130 If possible it may be best if one could come up with an array of the most important terms derived from the wiki pages described below to be used in auto translating the interface.
    131 
    132 == Other Implementations ==
    133 
    134 How does other software (especially wiki-software) deal with the problem of L10N?
    135 This section is devoted to describing and linking existing solutions.
    136 
    137 === Wikipedia ===
    138 
    139 The famous [http://www.wikipedia.org Wikipedia] has a huge collection of translations.
    140 How do they do it?
    141 
    142 === Drupal ===
    143 The Drupal CMS [http://www.drupal.org] has a nice translation unit for its backend. It uses .po-files that can be edit and translated with the poedit [http://www.poedit.net/] software.
    144 
    145 === Zope ===
    146 Zope also uses gettext-catalogs for translation. All basic functionality is provided by the packages  [http://svn.zope.org/Zope3/trunk/src/zope/i18n/ zope.i18n] (language-negotiation, formats for time, date, translation of msgids with languagefallback) and [http://svn.zope.org/Zope3/trunk/src/zope/i18nmessageid/ zope.i18nmessageid]. It also has [http://svn.zope.org/Zope3/trunk/src/zope/i18n/locales/ code to use LDML-files] (Locale Data Markup Language).
    147 
    148 The template-language provides some special attibutes (e.g. i18n:domain, i18n:translate).
    149 Translation in python-code works like this (from [http://svn.zope.org/Zope3/trunk/src/zope/i18nmessageid/messages.txt?rev=65911&view=log])
    150 
    151 {{{
    152 In this example, we create a message factory and assign it to _.  By
    153 convention, we use _ as the name of our factory to be compatible with
    154 translatable string extraction tools such as xgettext.  We then call _
    155 with a string that needs to be translatable:
    156 
    157   >>> from zope.i18nmessageid import MessageFactory, Message
    158   >>> _ = MessageFactory("futurama")
    159   >>> robot = _(u"robot-message", u"${name} is a robot.")
    160 }}}
    161 
    162 robot looks like a unicode-string and will be translated depending on the negotiated language and the available message-catalogs.
     115See also: [[TitleIndex(TracL10N/)]]