5.2 KiB
5.2 KiB
🌍 TRANSLATION TESTING GUIDE
Quick Test Instructions
1. Launch Game
npm start
2. Test Language Switching
Main Menu Test:
- Click the 🌍 Globe button (bottom-right corner)
- Select each language:
- 🇸🇮 Slovenščina (Slovenian)
- 🇬🇧 English
- 🇩🇪 Deutsch (German)
- 🇮🇹 Italiano (Italian)
- 🇨🇳 中文 (Chinese)
- Verify the menu text changes
In-Game Settings Test:
- Start a new game
- Press ESC to open pause menu
- Click ⚙️ Settings
- Click 🌍 LANGUAGE / JEZIK section
- Test switching between all 5 languages
- Verify UI updates immediately
3. Translation Coverage Test
Test these UI elements in each language:
| Key | SLO | EN | DE | IT | CN |
|---|---|---|---|---|---|
ui.inventory |
Inventar | Inventory | Inventar | Inventario | 库存 |
ui.crafting |
Izdelovanje | Crafting | Handwerk | Artigianato | 制作 |
ui.health |
Zdravje | Health | Gesundheit | Salute | 健康 |
ui.hunger |
Lakota | Hunger | Hunger | Fame | 饥饿 |
ui.oxygen |
Kisik | Oxygen | Sauerstoff | Ossigeno | 氧气 |
ui.day |
Dan | Day | Tag | Giorno | 天数 |
ui.season |
Letni čas | Season | Jahreszeit | Stagione | 季节 |
Items:
| Key | SLO | EN | DE | IT | CN |
|---|---|---|---|---|---|
item.wood |
Les | Wood | Holz | Legno | 木材 |
item.stone |
Kamen | Stone | Stein | Pietra | 石头 |
item.seeds |
Semena | Seeds | Samen | Semi | 种子 |
item.wheat |
Pšenica | Wheat | Weizen | Grano | 小麦 |
item.corn |
Koruza | Corn | Mais | Mais | 玉米 |
Actions:
| Key | SLO | EN | DE | IT | CN |
|---|---|---|---|---|---|
action.plant |
Posadi | Plant | Pflanzen | Pianta | 种植 |
action.harvest |
Požanji | Harvest | Ernten | Raccogli | 收获 |
action.craft |
Izdelaj | Craft | Herstellen | Crea | 制作 |
action.build |
Zgradi | Build | Bauen | Costruisci | 建造 |
Seasons:
| Key | SLO | EN | DE | IT | CN |
|---|---|---|---|---|---|
season.spring |
Pomlad | Spring | Frühling | Primavera | 春天 |
season.summer |
Poletje | Summer | Sommer | Estate | 夏天 |
season.autumn |
Jesen | Autumn | Herbst | Autunno | 秋天 |
season.winter |
Zima | Winter | Winter | Inverno | 冬天 |
Messages:
| Key | SLO | EN | DE | IT | CN |
|---|---|---|---|---|---|
msg.demo_end |
Demo končan! Hvala za igranje. | Demo Ended! Thanks for playing. | Demo beendet! Danke fürs Spielen. | Demo terminata! Grazie per aver giocato. | 演示结束!感谢游玩。 |
msg.freezing |
❄️ Zmrzuješ! | ❄️ Freezing! | ❄️ Du erfrierst! | ❄️ Stai congelando! | ❄️ 你在冻僵! |
msg.overheating |
🔥 Pregrevanje! | 🔥 Overheating! | 🔥 Überhitzung! | 🔥 Surriscaldamento! | 🔥 过热! |
4. Console Test
Open browser console (F12) and test:
// Test translation function
window.i18n.setLanguage('de');
console.log(window.i18n.t('ui.inventory')); // Should print: "Inventar"
window.i18n.setLanguage('it');
console.log(window.i18n.t('action.harvest')); // Should print: "Raccogli"
window.i18n.setLanguage('cn');
console.log(window.i18n.t('season.spring')); // Should print: "春天"
// Test fallback to English
window.i18n.setLanguage('de');
console.log(window.i18n.t('nonexistent.key', 'Fallback')); // Should print: "Fallback"
5. Persistence Test
- Select Deutsch (German)
- Close the game completely
- Restart the game
- Verify the game starts in German (saved in localStorage)
✅ Expected Results
- ✅ All 5 languages display correctly
- ✅ Language selection persists after restart
- ✅ UI updates immediately when language changes
- ✅ No missing translations (all keys have values)
- ✅ Fallback to English works for undefined keys
- ✅ Chinese characters render properly (中文)
- ✅ German umlauts render properly (ä, ö, ü, ß)
- ✅ Italian accents render properly (à, è, ì, ò, ù)
🐛 Known Limitations
- ⚠️ Only 20 translation keys currently defined
- ⚠️ Many UI elements still hardcoded in English
- ⚠️ NPC dialogue not yet translated
- ⚠️ Tutorial text not yet translated
📋 Next Steps for Full Localization
-
Expand Translation Keys (Priority: High)
- Add menu buttons (NEW GAME, LOAD, SETTINGS, EXIT)
- Add pause menu (RESUME, SAVE, QUIT)
- Add crafting UI labels
- Add building names
- Add NPC names and dialogue
-
Add More Languages (Priority: Medium)
- 🇫🇷 French (Français)
- 🇪🇸 Spanish (Español)
- 🇷🇺 Russian (Русский)
- 🇯🇵 Japanese (日本語)
- 🇰🇷 Korean (한국어)
-
Create External JSON Files (Priority: Low)
- Move translations to
assets/localization/folder - Easier for translators to contribute
- Smaller code file size
- Move translations to
-
Add Translation Tool (Priority: Low)
- Script to check for missing keys
- Auto-generate translation template
- Validate all languages have same keys
Last Updated: 12.12.2025
Status: ✅ 5 Languages Complete (20 keys each)
Coverage: ~5% of total UI (estimated 400+ keys needed)