Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n support in menus, German l10n (incomplete) #283

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hikari-no-yume
Copy link
Contributor

This adds basic internationalisation (i18n) support, by adding a _(string) function to look up localised strings in the current language. These strings are loaded from GGON .lang files.

It then adds use of _() to GG2's menus, but not its in-game text just yet, and a preliminary German localisation strings file for those localisable areas.

Since German requires non-ASCII characters, this is branched off from the Windows-1252 support pull request, which is a prerequisite.

This isn't the be considered complete and mergeable just yet, since it's only covering the menus for now, and I haven't got round to the necessary changes in width of some of them to accommodate German's verbosity. Also, my German's probably riddled with errors.

Note that in order to review .lang files, you'll need to view them in the Windows-1252 encoding that Gang Garrison 2 uses. I suggest clicking "View", then "Raw", then changing your browser's encoding settings for that page (in Firefox: View > Text Encoding).

@Medo42
Copy link
Owner

Medo42 commented Jul 9, 2015

I object to the script name.

Andrea Faulds notifications@github.com schrieb am Do., 09.07.2015, 3:00:

This adds basic internationalisation (i18n) support, by adding a _(string)
function to look up localised strings in the current language. These
strings are loaded from GGON .lang files.

It then adds use of _() to GG2's menus, but not its in-game text just
yet, and a preliminary German localisation strings file for those
localisable areas.

Since German requires non-ASCII characters, the Windows-1252 support pull
request #282 is a
prerequisite.

This isn't the be considered complete and mergeable just yet, since it's
only covering the menus for now. Also, my German's probably riddled with
errors.

Note that in order to review .lang files, you'll need to view them in the
Windows-1252 encoding that Gang Garrison 2 uses. I suggest clicking "View",
then "Raw", then changing your browser's encoding settings for that page

(in Firefox: View > Text Encoding).

You can view, comment on, or merge this pull request online at:

#283
Commit Summary

  • Add Windows-1252 characters to gg2Font
  • Add i18n support to menus, and German menu l10n

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#283.

@hikari-no-yume
Copy link
Contributor Author

You might think it's far too short. But, this is actually the standard abbreviation used for GNU's gettext, so it seemed fitting.

@Medo42
Copy link
Owner

Medo42 commented Jul 9, 2015

I guess I'd have to figure out how widely used this is.

Andrea Faulds notifications@github.com schrieb am Do., 09.07.2015, 17:24:

You might think it's far too short. But, this is actually the standard
abbreviation used for GNU's gettext, so it seemed fitting.


Reply to this email directly or view it on GitHub
#283 (comment)
.

@hikari-no-yume
Copy link
Contributor Author

@hikari-no-yume
Copy link
Contributor Author

A problem with using IETF language tags ("en", "de-DE" etc.) is we'd have to map them to names somehow. The only practical way I can see would be to parse every .lang file we can see, but then if one of them is malformed, trying to switch language will crash GG2 (parse error).

A better idea is probably just to have a free-form language name, and encourage native-language naming. So "British English.lang", "Deutsch.lang", "nihongo.lang", "español.lang", "hangug-eo.lang", etc. That's user-friendly and means we don't have to look at file contents to list files.

@hikari-no-yume
Copy link
Contributor Author

Actually I probably won't finish this for a while, but it's a start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants