Differences between revisions 5 and 17 (spanning 12 versions)
Revision 5 as of 2006-11-11 18:01:55
Size: 1868
Editor: grooz
Comment:
Revision 17 as of 2012-10-25 20:59:07
Size: 2129
Editor: mpm
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
<<Include(A:dev)>>
<<Include(A:historic)>>
<<Include(A:style)>>

This page concerns translating the web interface, please see TranslatingMercurial for how to translate the rest of Mercurial.
Line 4: Line 10:
 * detect appropriate locale for output
* create translations
 * store changelog and other relevant pieces in UTF8
 * detect appropriate locale for output (./)
 * store changelog and other relevant pieces in UTF8 (./)
Line 8: Line 13:
 * create translations (./) (see TranslatingMercurial)
Line 16: Line 22:
 * find locales on UNIX
 * make gettext calls once we know the locale
 * convert changelog data from a known locale to UTF8 for storage, see ChangelogEncodedPlan for details
 * find locales on UNIX (./)
 * make gettext calls once we know the locale (./)
 * convert changelog data from a known locale to UTF8 for storage (see ChangelogEncodingPlan) (./)
 * handle locale braindamage on Windows (see CharacterEncodingOnWindows) (./)
Line 27: Line 34:
 * finding the correct locale on Windows
Line 57: Line 63:
CategoryNewFeatures

Note:

This page is primarily intended for developers of Mercurial.

Note:

This page is no longer relevant but is kept for historical purposes.

{i} This page does not meet our wiki style guidelines. Please help improve this page by cleaning up its formatting.

This page concerns translating the web interface, please see TranslatingMercurial for how to translate the rest of Mercurial.

Things that need to be done

  • make output strings go through gettext (./)

  • detect appropriate locale for output (./)

  • store changelog and other relevant pieces in UTF8 (./)

  • make hgweb translatable
  • create translations (./) (see TranslatingMercurial)

How to proceed

There are some unknowns here and some difficult pieces. They're getting in the way of forward progress. Thus, we should do the simple things that we know need doing incrementally and defer the hard parts.

Things we know how to do:

  • wrap all messages for gettext (./)

  • find locales on UNIX (./)

  • make gettext calls once we know the locale (./)

  • convert changelog data from a known locale to UTF8 for storage (see ChangelogEncodingPlan) (./)

  • handle locale braindamage on Windows (see CharacterEncodingOnWindows) (./)

Things that are a bit harder:

  • make hgweb translatable
  • actually doing a translation

Things we're not sure about:

  • dealing with filesystem locales, especially on Windows

Things that are not our problem:

  • any sort of translation of repository data aside from changelogs

Some simplifying assumptions

Let's assume for now that:

  • all filenames are already UTF8
  • all existing changelog messages are UTF8 as well

Thoughts on making hgweb templates translatable

This has a few parts:

  • marking template strings as translatable
  • scanning the templates to find the translatable strings
  • doing translations in the template engine

The first step is to come up with a syntax for marking strings as translatable. Thus, we need a new markup format. Something like this ought to suffice:

<b>{{this is a translatable string}}</b>

So an initial approach is to teach hgweb about this syntax (and initially pass strings out unchanged), then go mark some strings as translatable so that the scanning piece can be done.


InternationalizationPlan (last edited 2012-10-25 20:59:07 by mpm)