Changes between Initial Version and Version 1 of Ticket #2649, comment 2


Ignore:
Timestamp:
Oct 17, 2014, 7:34:36 AM (10 years ago)
Author:
historic_bruno

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2649, comment 2

    initial v1  
    22* Translations are performed by either `_()` (mark and translate) or `wxTRANSLATE()` (mark wo/ translate, for static and global variables), so the attached WIP patch adds a `messages.json` that extracts strings from those functions.
    33* wxWidgets loads compiled .mo files, not .po files.
    4 * wxWidgets expects a certain folder structure: `prefix/<lang>/catalogname.mo`, where <lang> is an ISO 639 code (e.g. de, en, fr), and catalogname is something like "atlas" that identifies the set of translations. The documentation isn't really clear on whether e.g. "en_GB" is also a valid path, but it references such codes.
     4* wxWidgets expects a certain folder structure: `prefix/<lang>/catalogname.mo`, where <lang> is an ISO 639 code (e.g. de, en, fr), and catalogname is something like "atlas" that identifies the set of translations. The documentation isn't really clear on whether e.g. "en_GB" is also a valid lang, but it references such codes.
    55* We may need a default "en" or "en_US" translation.
    66* It searches in OS-dependent "standard" locations, `/usr/share/locale` on *nix, `0ad.app/Contents/Resources/*.lproj/` on OS X. However, we can call [http://docs.wxwidgets.org/2.8/wx_wxlocale.html#wxlocaleaddcataloglookuppathprefix wxLocale::AddCatalogLookupPathPrefix] to add our own paths inside the game's install directory. I'm thinking `binaries/data/tools/atlas/l10n` is a decent location, as it's used for other Atlas-only data.