Skip to content

Commit

Permalink
fix: clean up i18n (#9, #14)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchen committed Apr 4, 2021
1 parent a696871 commit 57b5c06
Show file tree
Hide file tree
Showing 13 changed files with 57 additions and 62 deletions.
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,35 +40,39 @@ Spanish (`es`), Italian (`it`), Russian (`ru`), Czech (`cs`), Polish (`pl`)

<details><summary><strong>Click to show the detailed instruction on how to help me translate it</strong></summary>

[Tavern names and location names](https://github.com/arcomage/arcomage-hd/tree/main/src/i18n/taverns) have already been translated by extracting from the original M&M game.

I've [OCR](https://github.com/arcomage/arcomage-hd/tree/main/tools/ocr) (optical character recognition)'d the card names & descriptions in the 5 incomplete languages.

If you speak one of Spanish (`es`), Italian (`it`), Russian (`ru`), Czech (`cs`), Polish (`pl`) and want to help, please:

#### Translate General Strings

In [tools/i18n-temp](https://github.com/arcomage/arcomage-hd/tree/main/tools/i18n-temp) folder, go to "**\<LANGCODE\>.ts**" file, click <kbd>Raw</kbd> button, then <kbd>Ctrl</kbd> + <kbd>S</kbd> to save the file.
In [src/i18n/main/](https://github.com/arcomage/arcomage-hd/tree/main/src/i18n/main) folder, go to "**\<LANGCODE\>.ts**" file, click <kbd>Raw</kbd> button, then <kbd>Ctrl</kbd> + <kbd>S</kbd> to save the file.

Look at [en.ts](https://github.com/arcomage/arcomage-hd/blob/main/src/i18n/en.ts) to know what the strings in English are.
Look at src/i18n/main/[en.ts](https://github.com/arcomage/arcomage-hd/blob/main/src/i18n/main/en.ts) file for the strings in English.

Translate the untranslated lines in **\<LANGCODE\>.ts** file, by changing the string on the right. For example, change `'Your Name': 'Your Name',` to `'Your Name': 'Votre nom',`
Translate the untranslated lines in "[src/i18n/main/](https://github.com/arcomage/arcomage-hd/tree/main/src/i18n/main)**\<LANGCODE\>.ts**" file, by changing the string on the right. For example, change `'Your Name': 'Your Name',` to `'Your Name': 'Votre nom',`

#### Translate Card Names & Descriptions

In [tools/i18n-temp](https://github.com/arcomage/arcomage-hd/tree/main/tools/i18n-temp) folder, go to "**cards.\<LANGCODE\>.ts**" file, click <kbd>Raw</kbd> button, then <kbd>Ctrl</kbd> + <kbd>S</kbd> to save the file.
In [src/i18n/cards/](https://github.com/arcomage/arcomage-hd/tree/main/src/i18n/cards) folder, go to "**\<LANGCODE\>.ts**" file, click <kbd>Raw</kbd> button, then <kbd>Ctrl</kbd> + <kbd>S</kbd> to save the file.

Look at src/i18n/cards/[en.ts](https://github.com/arcomage/arcomage-hd/blob/main/src/i18n/cards/en.ts) file for the strings in English.

Look at [cards.en.ts](https://github.com/arcomage/arcomage-hd/blob/main/src/i18n/cards.en.ts) to know what the strings in English are.
Please also refer to:

Please also refer to [main_en_fixed.png](https://github.com/arcomage/arcomage-hd/blob/main/tools/img-processing/original/main_en_fixed.png) which is an image that includes all cards with text in English, and the same image but of your language in [tools/ocr/original](https://github.com/arcomage/arcomage-hd/tree/main/tools/ocr/original) folder.
* [main_en_fixed.png](https://github.com/arcomage/arcomage-hd/blob/main/tools/img-processing/original/main_en_fixed.png) which is an image that includes all cards with text in English
* The same image but of your language in [tools/ocr/original](https://github.com/arcomage/arcomage-hd/tree/main/tools/ocr/original) folder
* [tools/i18n-temp](https://github.com/arcomage/arcomage-hd/tree/main/tools/i18n-temp)/**cards.\<LANGCODE\>.ts** files are filled with the text I got with OCR (optical character recognition), which could have poor quality, please retranslate it if it's nonsense, or verify and modify it if it's readable

Check and/or translate "**cards.\<LANGCODE\>.ts**" file:
Check and/or translate "[src/i18n/cards/](https://github.com/arcomage/arcomage-hd/tree/main/src/i18n/cards)**<LANGCODE\>.ts**" file:

```
name: '<Translated card name>',
desc: '<Translated card desciption>',
```

Now [tools/i18n-temp](https://github.com/arcomage/arcomage-hd/tree/main/tools/i18n-temp)/**cards.\<LANGCODE\>.ts** files are filled with the text I got with OCR (optical character recognition), which could be of poor quality, please delete and retranslate it if it's nonsense, or verify and modify it if it's readable.

#### Send it to me

Create a pull request if you know how to do it, or just give me the translated text on [GitHub](https://github.com/arcomage/arcomage-hd/issues/9), or on [Reddit](https://www.reddit.com/r/MightAndMagic/comments/mhfx30/arcomage_hd_i_made_a_webbased_opensource_clone_of/), or on [celestialheavens forum](https://www.celestialheavens.com/forum/10/17288), or via email.
Expand Down
2 changes: 1 addition & 1 deletion src/components/screens/Help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const Help = () => {
<strong>{_.i18n('ArcoMage HD')}</strong> - {_.i18n('DESC')}
</p>
{el}
<p>{_.i18n('Below is a brief presentation of the rules:')}</p>
<p>{_.i18n('Game rules:')}</p>
<div>{<MultilineText>{_.i18n('GAMERULES')}</MultilineText>}</div>
</Window>
)
Expand Down
11 changes: 5 additions & 6 deletions src/i18n/main/cs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,15 @@ export const i18n = {

'the GitHub project page': 'the GitHub project page',

'Below is a brief presentation of the rules:':
'Below is a brief presentation of the rules:',
'Game rules:': 'Game rules:',

GAMERULES: `Podmínky vítězství jsou v každém hostinci různé. Stavíš svojí věž a snažíš se zničit věž protivníka nebo se snažíš nashromáždit stanovené množství zdrojů dříve, než to udělá tvůj protivník.
Velká žlutá čísla v sloupcích jsou generátory. Ty určují, kolik nových jednotek jednotlivých zdrojů ti přibude v dalším tahu. Malá černá čísla v sloupcích jsou tvoje zásoby zdrojů. Ty určují, kolik jednotek budeš moci utratit v tomto tahu.
Karty: Každá má svou cenu pro zahrání. Ta je značena v kroužku v pravém dolním rohu karty. Tato hodnota bude odečtena z tvých zdrojů podle barvy karty. Levým kliknutím kartu vynášíš do hry. Pravým kliknutím na kartě ji odhodíš z ruky.
Cihly se generují v červeném generátoru těžby, drahokamy v modrém generátoru magie a příšery v zelené jeskyni.`,

'With no usable or discardable card, your opponent has surrendered':
'With no usable or discardable card, your opponent has surrendered',
'With no usable or discardable card, you have surrendered':
'With no usable or discardable card, you have surrendered',
'With no usable or discardable card, your opponent has surrendered':
'With no usable or discardable card, your opponent has surrendered',
'With no usable or discardable card, you have surrendered':
'With no usable or discardable card, you have surrendered',
}
3 changes: 1 addition & 2 deletions src/i18n/main/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ export const i18n = {

'the GitHub project page': 'die GitHub-Projektseite',

'Below is a brief presentation of the rules:':
'Im Folgenden finden Sie eine kurze Darstellung der Regeln:',
'Game rules:': 'Spielregeln:',

GAMERULES: `Die Siegbedingungen variieren je nach Taverne. Baut Euren Turm, zerstört den Turm des Gegners oder sammelt ausreichend Ressourcen, bevor es Euer Gegner tut.
Die großen gelben Zahlen in einer Spalte stellen die Generatoren dar. Diese Zahlen geben an, wie viele Einheiten einer bestimmten Ressource Euch in der nächsten Runde zur Verfügung stehen. Die kleinen schwarzen Zahlen in einer Spalte geben die Ressourcen selbst an. Sie zeigen, wie viele Einheiten einer Ressource Ihr in dieser Runde verbrauchen könnt.
Expand Down
3 changes: 1 addition & 2 deletions src/i18n/main/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ export const i18n = {

'the GitHub project page': 'the GitHub project page',

'Below is a brief presentation of the rules:':
'Below is a brief presentation of the rules:',
'Game rules:': 'Game rules:',

GAMERULES: `Victory conditions vary per tavern. Build your tower, destroy your opponent's tower, or collect enough resources before your opponent does.
Large yellow numbers in column are the productions. This is how many new units of a particular resource you will receive on your next turn. Small black numbers in column are the resources. This is how many units you have available to spend on your current turn.
Expand Down
11 changes: 5 additions & 6 deletions src/i18n/main/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,15 @@ export const i18n = {

'the GitHub project page': 'the GitHub project page',

'Below is a brief presentation of the rules:':
'Below is a brief presentation of the rules:',
'Game rules:': 'Game rules:',

GAMERULES: `Victory conditions vary per tavern. Build your tower, destroy your opponent's tower, or collect enough resources before your opponent does.
Large yellow numbers in column are the productions. This is how many new units of a particular resource you will receive on your next turn. Small black numbers in column are the resources. This is how many units you have available to spend on your current turn.
Cards: Each have their own cost to play, indicated in a small circle in the lower right corner of the card. The cost will be deducted from your resources according to the color of the card. Left click on a card plays the card. Right click on a card to discard without playing.
Red represents your Quarry Generator which produces your Brick resources, blue represents your Magic Generator which produces Gem resources, green represents your Dungeon generator which produces Recruit resources.`,

'With no usable or discardable card, your opponent has surrendered':
'With no usable or discardable card, your opponent has surrendered',
'With no usable or discardable card, you have surrendered':
'With no usable or discardable card, you have surrendered',
'With no usable or discardable card, your opponent has surrendered':
'With no usable or discardable card, your opponent has surrendered',
'With no usable or discardable card, you have surrendered':
'With no usable or discardable card, you have surrendered',
}
3 changes: 1 addition & 2 deletions src/i18n/main/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ export const i18n = {

'the GitHub project page': 'la page du projet GitHub',

'Below is a brief presentation of the rules:':
'Voici une brève présentation des règles\u00A0:',
'Game rules:': 'Les règles du jeu\u00A0:',

GAMERULES: `Les conditions de victoire diffèrent selon les auberges. Pour remporter la partie, vous devez généralement être le premier à construire votre tour, détruire la tour adverse ou amasser plus de ressources que l’adversaire.
Les chiffres jaunes sont vos productions. Il s’agit du nombre d’unités d’une ressource que vous amassez à chaque tour. Les chiffres noirs sont les ressources elles-mêmes. Il s’agit des unités dont vous disposez et que vous pouvez dépenser.
Expand Down
11 changes: 5 additions & 6 deletions src/i18n/main/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,15 @@ export const i18n = {

'the GitHub project page': 'the GitHub project page',

'Below is a brief presentation of the rules:':
'Below is a brief presentation of the rules:',
'Game rules:': 'Game rules:',

GAMERULES: `Le regole per vincere variano di osteria in osteria. Occorre costruire la propria torre, distruggere la torre dell’avversario, o raccogliere abbastanza risorse prima dell’avversario.
I grandi numeri gialli incolonnati rappresentano i generatori. Si tratta di quante nuove unità di una risorsa particolare riceverete al prossimo turno. I piccoli numeri neri incolonnati sono le risorse. Si tratta di quante unità avete a disposizione durante il turno in corso.
Carte: il costo di ogni carta è indicato nell’angolo destro inferiore della carta. Il costo della carta giocata viene sottratto dalle risorse secondo il colore della carta. Per giocare la carta fare clic sul tasto sinistro. Per scartare senza giocare fare clic sul tasto destro.
il rosso rappresenta il Generatore Pietra, che produce i Mattoni; il blu rappresenta il Generatore Magia, che produce le Gemme; il verde rappresenta il Generatore Zoo, che produce gli Animali.`,

'With no usable or discardable card, your opponent has surrendered':
'With no usable or discardable card, your opponent has surrendered',
'With no usable or discardable card, you have surrendered':
'With no usable or discardable card, you have surrendered',
'With no usable or discardable card, your opponent has surrendered':
'With no usable or discardable card, your opponent has surrendered',
'With no usable or discardable card, you have surrendered':
'With no usable or discardable card, you have surrendered',
}
11 changes: 5 additions & 6 deletions src/i18n/main/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,15 @@ export const i18n = {

'the GitHub project page': 'strona projektu na GitHubie',

'Below is a brief presentation of the rules:':
'Poniżej znajduje się krótka prezentacja zasad:',
'Game rules:': 'Zasady gry:',

GAMERULES: `Warunki zwycięstwa są różne w zależności od miejsca, w którym gracie. Trzeba zbudować własną wieżę, zniszczyć wieżę przeciwnika lub zebrać wystarczająco dużo surowców zanim uczyni to twój przeciwnik.
Duże, żółte liczby w kolumnach to generatory. Od nich zależy ile jednostek danego surowca otrzymasz w następnej kolejce. Małe czarne liczby w kolumnach to surowce. Oznaczają ilość surowca, którą możesz wykorzystać podczas trwającej tury.
Karty: Każda z nich posiada odpowiednią wartość, oznaczoną małym kółkiem w prawym dolnym rogu. Ten koszt zostanie odjęty od posiadanych przez ciebie surowców - w zależności od tego, jakiego koloru jest dana karta. Kliknięcie na karcie lewym przyciskiem myszki spowoduje zagranie karty. Kliknięcie na niej prawym przyciskiem myszy spowoduje odłożenie karty bez zagrania jej.
Czerwony kolor oznacza generator kamieni, w którym powstaje surowiec zwany kamieniem. Kolor niebieski oznacza generator magii produkujący klejnoty, a zielony to generator stworzeń, w którym powstają bestie.`,

'With no usable or discardable card, your opponent has surrendered':
'With no usable or discardable card, your opponent has surrendered',
'With no usable or discardable card, you have surrendered':
'With no usable or discardable card, you have surrendered',
'With no usable or discardable card, your opponent has surrendered':
'Twój przeciwnik poddał się bez użytecznej lub możliwej do odrzucenia karty',
'With no usable or discardable card, you have surrendered':
'Nie posiadając żadnej możliwej do użycia lub odrzucenia karty, poddałeś się',
}
28 changes: 13 additions & 15 deletions src/i18n/main/ru.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
export const i18n = {
tower: 'Башня',
wall: 'Стена',
resource: 'Ресурс', // where is this used? couldn't find
resource: 'Ресурс',

bricks: 'Камень',
bricks: 'Камень',
gems: 'Самоцветы',
recruits: 'Существа',
recruits: 'Существа',

quarry: 'Карьер',
quarry: 'Карьер',
magic: 'Магия',
dungeon: 'Подземелье', // i wonder what kind of recruits you can get in a dungeon ;)
dungeon: 'Подземелье',

discarded: 'сброшена',
'Discard a card': 'Сбросить карту',
Expand All @@ -20,17 +20,16 @@ export const i18n = {

Preferences: 'Настройки',
'Your Name:': 'Ваше имя:',
"Opponent's Name:": "Имя противника:",
'Choose a Tavern (Preset Preferences):':
'Выберите Таверну (набор настроек):',
"Opponent's Name:": 'Имя противника:',
'Choose a Tavern (Preset Preferences):': 'Выберите Таверну (набор настроек):',
Default: 'По умолчанию',
Customized: 'Пользовательская',
'Starting Conditions': 'Стартовые условия',
'Victory Conditions': 'Условия победы',
'Other Preferences': 'Другие настройки',
'Cards in Hand': 'Карт в руке',
'AI Type': 'Тип ИИ', // couldn't find ingame
'Apply & New Game': 'Применить и начать игру', // 7 symbols longer, may want to use just "Начать игру!" instead if the button doesn't stretch
'AI Type': 'Тип ИИ',
'Apply & New Game': 'Применить и начать игру', // or "Начать игру!"
Cancel: 'Отмена',

Language: 'Язык',
Expand All @@ -39,20 +38,19 @@ export const i18n = {
Help: 'Помощь',
'Toggle Full Screen': 'Полноэкранный режим',

ERATHIAN: 'Использовать Эрафийский [%s] (только для латиницы)', //probably not needed in RU locale at all
ERATHIAN: 'Использовать Эрафийский [%s] (только для латиницы)',

'ArcoMage HD': 'Аркомаг HD', // "Аркомаг" name is well known in Russia in its RU version, since just like Gwent (known in Russia as Гвинт), it was first introduced as a minigame inside another game, so they had to translate the name
'ArcoMage HD': 'Аркомаг HD', // "Аркомаг" name is well known in Russia in its RU version, since just like Gwent (known in Russia as Гвинт), it was first introduced as a minigame inside another game, so they had to translate the name

DESC:
"опенсорсная веб-версия игры Arcomage, выпущенной 3DO и New World Computing в 2000 году", //name already mentions it's HD, and "Arcomage" fits perfectly here in english
'опенсорсная веб-версия игры Arcomage, выпущенной 3DO и New World Computing в 2000 году',

'Please go to %s to view more information, star the repo and follow %s there.':
'Чтобы узнать больше, посетите %s, добавьте репозиторий в избранное и подпишитесь на %s.',

'the GitHub project page': 'страницу проекта на GitHub',

'Below is a brief presentation of the rules:':
'Правила игры:', // because full is too long here "Ниже вы можете найти краткое изложение правил:", and pretty pointless too, might even want to shorten it in source lang
'Game rules:': 'Правила игры:',

GAMERULES: `Условия победы зависят от выбранной Таверны. Есть три способа - отстроить свою Башню до определенного уровня, накопить определенное количество ресурсов или уничтожить Башню противника.
Существует три типа ресурсов - Камень, Самоцветы и Существа. Камень добывают в Карьере, Самоцветы создаются Магией, Существ разводят в Подземелье. На каждом источнике ресурсов есть две цифры. Маленькая черная цифра - то, сколько единиц этого ресурса есть у вас в данный момент. Большая желтая - то, сколько единиц этого ресурса вы получите в начале своего следующего хода.
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/main/zh-Hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const i18n = {

'the GitHub project page': 'GitHub项目页面',

'Below is a brief presentation of the rules:': '以下是游戏规则的简要介绍:',
'Game rules:': '以下是游戏规则:',

GAMERULES: `每个旅店玩牌的胜利条件各不相同。反正就是要把自己的城堡造好,摧毁对方的城堡,或者赶在对手之前收集到足够的资源。
黄色的大数字是产量计数器,它代表你们下个回合可以得到的资源的数量。黑色的小数字表示现有资源,也就是本回合你们可以使用的资源数量。
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/main/zh-Hant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const i18n = {

'the GitHub project page': 'GitHub專案頁面',

'Below is a brief presentation of the rules:': '以下是遊戲規則的簡要介紹:',
'Game rules:': '以下是遊戲規則:',

GAMERULES: `每個旅店玩牌的勝利條件各不相同。反正就是要把自己的城堡造好,摧毀對方的城堡,或者趕在對手之前收集到足夠的資源。
黃色的大數字是產量計數器,它代表你們下個回合可以得到的資源的數量。黑色的小數字表示現有資源,也就是本回合你們可以使用的資源數量。
Expand Down
Loading

0 comments on commit 57b5c06

Please sign in to comment.