-
Notifications
You must be signed in to change notification settings - Fork 190
Added the localization mechanism for levels and cards #129
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
Closed
Closed
Changes from 29 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
9431266
Upgrade gitignore
m0rp30 2c27542
Add split description in italia and english and add directory it in l…
m0rp30 705cc84
Add italian localizations and mechanism for card, levels and buttons …
m0rp30 50ee071
finished the mechanism for setting the language
m0rp30 d7b40c5
add org file in gitignore
m0rp30 14e753a
add emacs backup files
m0rp30 331f08b
traductions of the levels
m0rp30 6857781
some levels translated
m0rp30 5488edc
some traductions
m0rp30 1dcde88
cards localization adjustament
m0rp30 f98922c
now is right the card_draw
m0rp30 9057421
some traductions
m0rp30 086922d
add some localizations and levels traductions
m0rp30 216db5c
Code refactor and adding, in the README file, the instructions to add…
m0rp30 2f1ff72
README file adjustaments
m0rp30 6fb0f72
README file some adjustaments
m0rp30 9db0d09
README file some adjustaments
m0rp30 b54abd2
README file now its ok :)
m0rp30 f8530a5
some adjustaments and code refactor
m0rp30 42ebe9e
export configurations file
m0rp30 b9fc323
Adding another line for the explanation of localization mechanism
m0rp30 6e0661b
Some levels translations
m0rp30 91ad509
localization: refining italian translation. part 1
morrolinux 942dff7
Merge pull request #1 from morrolinux/main
m0rp30 93b2a72
refining italian translation part 2
morrolinux ab6dcd8
Merge branch 'm0rp30:main' into main
morrolinux e57dfca
various bugfixes
morrolinux 6328fe7
Merge branch 'main' of github.com:morrolinux/oh-my-git
morrolinux 1bf845c
Merge pull request #2 from morrolinux/main
m0rp30 d8e649d
Update scenes/repository.gd
m0rp30 d218658
Update scenes/node.gd
m0rp30 169a497
Update scenes/level_select.gd
m0rp30 659d48a
Update scenes/title.gd
m0rp30 3c26150
Update scenes/title.gd
m0rp30 dae7d04
Update resources/localizations.csv
m0rp30 71183f0
Update README.md
m0rp30 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -2,3 +2,6 @@ | |
| /cache/ | ||
| /dependencies/ | ||
| /build/ | ||
| *~ | ||
| *.org | ||
| #*# | ||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -75,6 +75,31 @@ A level can consist of multiple repositories. To have more than one, you can use | |
|
|
||
| At this stage, we're still exploring ourselves which kind of levels would be fun! So feel free to try new things: basic introductions with a little story? Really hard puzzles? Levels where you have to find information? Levels where you need to fix a problem? Levels with three remotes? | ||
|
|
||
| ## Add localizations | ||
| 1. Add the localization text into the section "description" in the file ./resource/cards.json | ||
| ``` | ||
| Example: | ||
| "description": { | ||
| "en_EN": "Drag this card into the empty space above to initialize the time machine!", | ||
| "it_IT": "Trascina questa carta nell'area vuota sopra per inizializzare la macchina del tempo", | ||
| "es_ES": "Arrastre esta tarjeta al área en blanco de arriba para inicializar la máquina del tiempo" | ||
| } | ||
| ``` | ||
| 2. Add, into the directory **levels**, the directory with the levels do you want to adding (es. ./levels/fr_FR/LIVELLI ) | ||
| 3. Add, the localization into the dictionary game.langs (es. `var langs = {0: "en_EN", 1: "it_IT", 2: "es_ES"}` the first and default localization it must be en_EN | ||
| 4. Add column of specific locale and relative traductions for avery keys in the file ./resource/localization.csv | ||
| ``` | ||
| Example: | ||
|
|
||
| keys,en,it,es | ||
| LEVELS,Livels,Livelli,niveles | ||
| QUIT,Quit,Esci,Salir | ||
| BACK,Back,Indietro,Espalda | ||
|
|
||
| ``` | ||
|
|
||
| If one or more localizations in the descriptions of cards are missing and levels require that card, the game crashes! | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this the way we want the game to behave? what about setting a default language & automatically appending a hint, e.g. "[tr]", to notice that it still needs translation. |
||
|
|
||
| ## Contribute code! | ||
|
|
||
| To open the game in the [Godot editor](https://godotengine.org), run `godot project.godot`. You can then run the game using *F5*. | ||
|
|
||
This file contains hidden or 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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,34 @@ | ||
| [remap] | ||
|
|
||
| importer="texture" | ||
| type="StreamTexture" | ||
| path="res://.import/settings_32x32.png-1ec947b33410cb1f2231e893c0d26b43.stex" | ||
| metadata={ | ||
| "vram_texture": false | ||
| } | ||
|
|
||
| [deps] | ||
|
|
||
| source_file="res://images/settings_32x32.png" | ||
| dest_files=[ "res://.import/settings_32x32.png-1ec947b33410cb1f2231e893c0d26b43.stex" ] | ||
|
|
||
| [params] | ||
|
|
||
| compress/mode=0 | ||
| compress/lossy_quality=0.7 | ||
| compress/hdr_mode=0 | ||
| compress/bptc_ldr=0 | ||
| compress/normal_map=0 | ||
| flags/repeat=0 | ||
| flags/filter=true | ||
| flags/mipmaps=false | ||
| flags/anisotropic=false | ||
| flags/srgb=2 | ||
| process/fix_alpha_border=true | ||
| process/premult_alpha=false | ||
| process/HDR_as_SRGB=false | ||
| process/invert_color=false | ||
| stream=false | ||
| size_limit=0 | ||
| detect_3d=true | ||
| svg/scale=1.0 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or 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,43 @@ | ||
| title = Strada di mattoni gialli | ||
| cards = checkout commit-auto reset-hard bisect-start bisect-good bisect-bad | ||
|
|
||
| [description] | ||
|
|
||
| (Perpiacere rimpicciolisci un pochino usando la rotella del mouse! :D) | ||
|
|
||
| Oh no! Hai perso la tua chiave da qualche parte durante il giorno! | ||
|
|
||
| Sicuro, certo potresti guardare in ogni singolo commit nella speranza di trovarlo - ma c'è un modo migliore: la tua macchina del tempo ha un modo integrato per trovare velocemente il punto nel tempo dove le cose sono andate male! | ||
|
|
||
| Per prima cosa, gioca la carta "bisec start". Quindi, vai ad un commit in cui non hai la chiave e gioca la carta "bisect bad". Allo stesso modo vai velocemente in un commit dove hai la chiave *in tascca* e gioca la carta "bisect goofìd". | ||
|
|
||
| Dopo aver trovato l'ultimo commit valido reimposta la branch principale su di esso. Cosa è successo alla chiave dopo che l'hai persa? | ||
|
|
||
| [setup] | ||
|
|
||
| echo "Hai ancora la tua chiave." > you | ||
|
|
||
| for i in {1..30}; do | ||
| if test $i -eq 12; then | ||
| echo "La tua tasca è vuota." > you | ||
| echo "E' per terra." > key | ||
| fi | ||
| if test $i -eq 13; then | ||
| echo "Tiene una chiave nel becco." > bird | ||
| rm key | ||
| fi | ||
| if test $i -eq 14; then | ||
| rm bird | ||
| fi | ||
| git add . | ||
| git commit --allow-empty -m "$i" | ||
| done | ||
|
|
||
| [win] | ||
|
|
||
| # Trova l'ultimo commit buono | ||
| test "$(git log --pretty=%s main | head -1)" -eq 11 | ||
|
|
||
| [congrats] | ||
|
|
||
| Molto bene! :) L'unico problema è che adesso devi tornare a casa camminando, dinuovo... |
This file contains hidden or 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 @@ | ||
| bisect |
This file contains hidden or 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,44 @@ | ||
| title = Creare ramificazioni | ||
| cards = checkout commit-auto branch branch-delete reset-hard | ||
|
|
||
| [description] | ||
|
|
||
| Vieni invitato a due feste! In una di queste, suona il tuo gruppo preferito e l'altra è la festa del tuo miglio amico. Dove andrai? Non preoccuparti - come agente del viaggio nel tempo, puoi andare ad entrambe le feste! | ||
|
|
||
| Per rendere più facile dire quale sia la linea temporale, puoi creare portali temporali! (Chiamiamoli "rami-branchs") | ||
|
|
||
| [cli] | ||
|
|
||
| Anche viaggiare tra differenti rami temporali è davvero facile usando la linea di comando! Hai un ramo chiamato "birthday", puoi digitare `git checkout birthday` per arrivarci. | ||
|
|
||
| [setup] | ||
|
|
||
| echo "Incarta il regalo di compleanno e prendi il biglietto del concerto." > you | ||
| git add . | ||
| git commit -m "Preparazione serale" | ||
| echo "Vai alla festa di compleanno!" >> you | ||
| git add . | ||
| git commit -m "Vai al compleanno" | ||
|
|
||
| git checkout HEAD~1 | ||
| echo "Vai al concerto!" > you | ||
| git add . | ||
| git commit -m "Vai al concerto" | ||
|
|
||
| git checkout HEAD~1 | ||
|
|
||
| git branch -D main | ||
|
|
||
| [win] | ||
|
|
||
| # Crea un ramo chiamato 'birthday' questo punta alla linea temporale del compleanno | ||
| git show birthday | grep 'birthday' | ||
|
|
||
| # Crea un ramo chiamato 'concert' questo punta alla linea temporale del compleanno | ||
| git show concert | grep 'concert' | ||
|
|
||
| [congrats] | ||
|
|
||
| Adesso tu puoi viaggiare tra quie rami facilmente (usando `git checkout`) - Prova! | ||
|
|
||
| Il tuo amico è felice che tu sia andato alla sua festa di compleanno e anche tu sei contento del biglietto del concerto firmato. Yay! |
This file contains hidden or 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,47 @@ | ||
| title = Cancellare rami | ||
| cards = checkout commit-auto reset-hard branch-delete | ||
|
|
||
| [description] | ||
|
|
||
| La vita è piena di pericolim, vero? Anche quando cammini a scuola2, sembra che ci siano molti rischi! | ||
|
|
||
| Questo Lunedì è particolarmente brutto.Sei arrivato a scuola ma ci sono delle line temporali che tu non vuoi tenere in giro | ||
|
|
||
| [setup] | ||
|
|
||
| echo Esci di casa e ti incammini verso la scuola. > you | ||
| git add . | ||
| git commit -m "Buon giorno!" | ||
|
|
||
| echo Cammini nel lato destro della strada. >> you | ||
| git commit -am "Lato destro" | ||
|
|
||
| echo Salti in un tombino nel marciapiede e arrivi in orario a scuola. >> you | ||
| git commit -am "Salto" | ||
|
|
||
| git checkout HEAD^ -b friend | ||
| echo "All'improvviso cadi in una pozzanghera puzzolente e vieni mangiato da degli alligatori." >> you | ||
| git commit -am "Un nuovo amico" | ||
|
|
||
| git checkout HEAD~2 -b music | ||
| echo Cammini nel lato sinistro della strada. >> you | ||
| git commit -am "Lato sinistro" | ||
|
|
||
| echo Siccome sei in ritardo, inizi a corre ma qualcuno lanci un pianoforte dalla finestra e ti schiacci. >> you | ||
| git commit -am "Bei suoni" | ||
|
|
||
| git checkout HEAD^ -b ice-cream | ||
| echo Non sei preoccupato e cammini lentamente. Prendi anche un gelato per strada. Arrivi troppo tardi a scuola, il tuo insegnante è arrabbiato e vieni espulso da scuola. >> you | ||
| git commit -am "Yum" | ||
|
|
||
| git branch -M main leap | ||
| git checkout leap^^ | ||
|
|
||
| [win] | ||
|
|
||
| # Trova i rami cattivi e cancellali. Tieni solo il migliore. | ||
| test "$(git show-ref --heads | cut -f2 -d' ')" = "$(echo refs/heads/leap)" | ||
|
|
||
| [congrats] | ||
|
|
||
| Ripensandoci preferisci la linea temporale del gelato? :) |
This file contains hidden or 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,43 @@ | ||
| title = Muoversi attraverso il tempo | ||
| cards = checkout commit-auto | ||
|
|
||
| [description] | ||
|
|
||
| La scatole gialle sono un punto fisso nel tempo, possiamo chiamarli "commits"! Puoi viaggiare tra loro usando la carta "checkout"! (Provala!) | ||
|
|
||
| Puoi scoprire cosa è successo qui? Quindi, durante ultimo commit, modifica i files per risolvere il problema ed invia un nuovo commit! | ||
|
|
||
| [cli] | ||
|
|
||
| Guarda uno specifico commit, digita `git checkout` uno spazio e premi il tasto destro sopra il commit che vuoi! | ||
|
|
||
| Questo inserirà l'identificatore unico del commit! | ||
|
|
||
| [setup] | ||
|
|
||
| echo "Questo salvadanaio appartiene alla sorella maggiore. | ||
| Contiene 10 monete." > piggy_bank | ||
| git add . | ||
| git commit -m "L'inizio" | ||
|
|
||
| echo "Una giovane donna con capelli, ricci, marroni." > little_sister | ||
| git add . | ||
| git commit -m "La sorella piccola è arrivata" | ||
|
|
||
| echo "Ha 10 monete." >> little_sister | ||
| echo "Questo salvadanaio appartiene alla sorella maggiore. | ||
| E' vuoto." > piggy_bank | ||
| git add . | ||
| git commit -m "La sorella piccola ha fatto qualcosa" | ||
|
|
||
| git checkout HEAD^^ | ||
| git branch -df main | ||
|
|
||
| [win] | ||
|
|
||
| # Ripristina il salvadanaio della sorella. | ||
| { git show HEAD:piggy_bank | grep "10 monete"; } && { git show HEAD:little_sister | grep -v "10 monete"; } && { git rev-parse HEAD^^^; } | ||
|
|
||
| [congrats] | ||
|
|
||
| Stupendo! Adesso hai preso famiglirità con la macchina del tempo, vediamo situazioni più complicate... |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.