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

Internationalizing WBWWB and adding German translation #2

Merged
merged 5 commits into from
Nov 22, 2016

Conversation

stefanlesser
Copy link

This moves all strings used within the game, which are not baked into graphics assets, to a central location, adds the capability for having multiple translations, and adds a German translation.

All strings are referred to with a key. All text is stored in a string table. I added two string tables (_en for English and _de for German).

To switch the language of the game, change which dictionary the variable textStrings (in source file textStrings.js) points to.

@stefanlesser
Copy link
Author

The next step would be to translate the graphics assets. I've added all the text in assets I could find to the string table, too (including a German translation for them). I don't know how difficult it is to change some or all of the text in graphic assets to being displayed as rendered text instead — that would make it easier to add other languages without adding more assets, and translations can easily be added to the textStrings.js source file. It also makes text render sharper on high-resolution displays.

The alternative is to add a mechanism that loads localized assets based on the language. I assume that's quicker to implement in the short term, but less flexible in the long term.

I'm happy to help with either direction — let me know which path you'd like to take.

"areTheyYelling" : "(ya gotta catch 'em *yelling* at others)" ,
"nerdsNow" : "what are these nerds doing now" ,
"schockedPeep" : "why's this peep shocked?" ,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think "peep" can be used in the singular. At least I've never heard of "a peep". Normally, we say "peeps". I'd say "dude" for the singular.

"areTheyYelling" : "(erwische sie, *w\xE4hrend sie sich gegenseitig anschreien)" ,
"nerdsNow" : "Was machen diese Nerds jetzt?" ,
"schockedPeep" : "Warum ist er geschockt?" ,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have context for this one - you sure it's not "schockiert"? Or do they mean the same thing?

@stefanlesser
Copy link
Author

I've experimented with replacing the text baked into assets with text loaded programmatically from the strings table. For now just in the preload scene:
stefanlesser/wbwwb@i18n...stefanlesser:assets2text

Seems manageable. It looks a little weird, because the text fields rendered over the text in the asset don't match perfectly, but it's very close.

@ncase ncase merged commit f75544e into ncase:master Nov 22, 2016
@ncase
Copy link
Owner

ncase commented Nov 22, 2016

Thank you again @stefanlesser for taking the time & effort to help with this! :)

mupsycho pushed a commit to mupsylab/game-wbwwb that referenced this pull request Jul 19, 2022
更改 "misattributed" 的翻译
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants