-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from uros-5/i18n
Added starting point for 18n
- Loading branch information
Showing
20 changed files
with
195 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,11 +10,6 @@ | |
</template> | ||
|
||
<script setup lang="ts"> | ||
defineProps<{ | ||
w: string; | ||
b: string; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"header": { | ||
"currentGames": "Current games", | ||
"tournaments": "Tournaments", | ||
"login": "log in", | ||
"sound": "Sound", | ||
"background": "Background", | ||
"boardSettings": "Board Settings", | ||
"light": "Light", | ||
"dark": "Dark" | ||
}, | ||
"home": { | ||
"introduction": "Introduction", | ||
"lobbyTable": { | ||
"player": "Player", | ||
"rating": "Rating", | ||
"time": "Time", | ||
"variant": "Variant" | ||
}, | ||
"variant": "Variant", | ||
"minutesPerSide": "Minutes per side", | ||
"incrementInSeconds": "Increment in seconds", | ||
"donate": "Donate", | ||
"players": "players", | ||
"gamesInPlay": "games in play", | ||
"latestUpdated": "Latest updated" | ||
}, | ||
"tv": { | ||
"empty": "There are no available games at the moment." | ||
}, | ||
"tournaments": { | ||
"empty": "There are no available tournaments at the moment." | ||
}, | ||
"userProfile": { | ||
"games": "Games", | ||
"gamesWithYou": "Games with you", | ||
"rated": "Rated", | ||
"imported": "Imported", | ||
"moves": "moves" | ||
}, | ||
"game": { | ||
"analysisBoard": "Analysis Board", | ||
"Selection": "Selection", | ||
"Deploy": "Deploy", | ||
"Fight": "Fight", | ||
"shop": { | ||
"credit": "Credit", | ||
"Confirm": "Confirm" | ||
} | ||
}, | ||
"chat": { | ||
"chatRoom": "Chat room", | ||
"signInToChat": "Sign in to chat", | ||
"oldGames": "Chat disabled for old games" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export default defineI18nConfig(() => ({ | ||
legacy: false, | ||
locale: 'en', | ||
messages: { | ||
en: {credit: "Credit"}, | ||
sr: {credit: "crREdit"} | ||
// en: en(), | ||
// fr: fr() | ||
} | ||
})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import json | ||
import os | ||
|
||
with open("en.json", "r") as real: | ||
real = json.loads(real.read()) | ||
newer = {} | ||
for key in real.keys(): | ||
print(key + "\n") | ||
obj = {} | ||
for key2 in real[key]: | ||
if "str" in str(type(key2)): | ||
new_input = input(f"{key2}>>>") | ||
obj[key2] = str(new_input) | ||
else: | ||
obj[key][key2] = {} | ||
for key3 in real[key][key2]: | ||
new_input = input(f"{key3}>>>") | ||
obj[key][key2] = str(new_input) | ||
newer[key] = obj | ||
with open("lang.json", "w") as real2: | ||
converted = json.dumps(newer) | ||
real2.write(converted) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"header": { | ||
"currentGames": "Тренутни мечеви", | ||
"tournaments": "Турнири", | ||
"login": "Пријави се", | ||
"sound": "Звук", | ||
"background": "Позадина", | ||
"boardSettings": "Подешавање табле", | ||
"light": "Светлија", | ||
"dark": "Мрачнија" | ||
}, | ||
"lobbyTable": { | ||
"player": "Играч", | ||
"rating": "Рејтинг", | ||
"time": "Време", | ||
"variant": "Варијанта" | ||
}, | ||
"home": { | ||
"introduction": "Увод", | ||
"variant": "Варијанта", | ||
"minutesPerSide": "Минути", | ||
"incrementInSeconds": "Додатак у секундама", | ||
"donate": "Донирај", | ||
"players": "Играчи", | ||
"gamesInPlay": "мечева у току", | ||
"latestUpdated": "Најновије вести" | ||
}, | ||
"tv": { | ||
"empty": "Тренутно нема активних мечева." | ||
}, | ||
"tournaments": { | ||
"empty": "Тренутно нема активних турнира." | ||
}, | ||
"userProfile": { | ||
"games": "Мечеви", | ||
"gamesWithYou": "Мечеви са тобом", | ||
"rated": "Оцењене", | ||
"imported": "Уведене", | ||
"moves": "потеза" | ||
}, | ||
"game": { | ||
"analysisBoard": "Анализа меча", | ||
"Selection": "Селекција", | ||
"Deploy": "Поставка", | ||
"Fight": "Меч" | ||
}, | ||
"shop": { | ||
"credit": "Кредит", | ||
"Confirm": "Потврди" | ||
}, | ||
"chat": { | ||
"chatRoom": "Ћаскање", | ||
"signInToChat": "Пријави се да би ћаскао.", | ||
"oldGames": "оступно за готове партије." | ||
} | ||
} |
Oops, something went wrong.