matronator / GlobalCollapse

Browser-based MMORPG based around the COVID pandemic. PWA supported.
https://global-collapse.com
MIT License
42 stars 19 forks source link

Move all text from templates to locale file #1

Open matronator opened 4 years ago

matronator commented 4 years ago

Lot of the UI text in the game is hardcoded in the template files (due to my laziness and poor planning ahead) and should be replaced with link to the locale file here.

So for example you'd change this:

app/modules/Front/templates/Default/default.latte

...
<ul class="uk-list uk-list-divider uk-margin-remove">
    <li>Level</li>
    <li>Money</li>
    <li>Energy</li>
</ul>
...

To this:

app/modules/Front/templates/Default/default.latte

...
<ul class="uk-list uk-list-divider uk-margin-remove">
    <li>{_general.stats.level.title}</li>
    <li>{_general.stats.money.title}</li>
    <li>{_general.stats.energy.title}</li>
</ul>
...

app/lang/general.en_US.neon

...
stats:
    level:
        title: 'Level'
    money:
        title: 'Money'
    energy:
        title: 'Energy'
...

If you want to help out with that, please search the locale file (CTRL+F / CMD+F) if there isn't an entry for the same phrase already before creating new entry to prevent duplicates.

No need to create an entry in the cs_CZ locale file as well, that can be translated later. Right now, the priority is English.

Yarblen commented 2 years ago

Interested in a german version?

matronator commented 2 years ago

Sure, that'd be great if you're up to it! :)

Yarblen commented 2 years ago

Ok, will you open a new path for german and I will translate the code. Tell me what I have to so.

Yarblen commented 2 years ago

Took a copy and working on it.

matronator commented 2 years ago

@Yarblen So sorry I didn't reply, some stuff came up and then I forgot. So you figured it out then?

matronator commented 2 years ago

If you need any help with it, just let me know.