-
Notifications
You must be signed in to change notification settings - Fork 190
I18n #146
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
I18n #146
Changes from 1 commit
Commits
Show all changes
53 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 9042005
improved the name of language variables and moved the languages manag…
m0rp30 07d3333
Created the .pot and babelrc files and make it.po file with italian t…
m0rp30 e805962
reset levels directory without it translations
m0rp30 c2e0eaf
splited .po files for cards, levels and some one
m0rp30 27db39c
Some modification .po files
m0rp30 4ef05f6
Add *.mo files to gitignore
m0rp30 337d3d3
the internationalization system was completed and the Italian transla…
m0rp30 ba3e4b0
Add template files for generating .po file in other languages
m0rp30 ba53de0
change files .po names
m0rp30 6a4d98a
Merge branch 'git-learning-game:main' into i18n
m0rp30 2616c8b
Adding renamed file .po
m0rp30 9da07de
some traductions
m0rp30 5b28efc
Some translations
m0rp30 8cb71aa
Presets upgrade
m0rp30 e802402
organized the local folder into subfolders containing the various loc…
m0rp30 af776bd
deleted the .po level files and added dir italian levels in dir level…
m0rp30 9caaddc
Some adjustaments
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
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.
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.
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
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 @@ | ||
| extends MenuButton | ||
|
|
||
|
|
||
| func _ready(): | ||
| make_popup_menu() # generate items for popup menu | ||
| get_popup().connect("id_pressed", self, "_on_item_pressed") | ||
| check_current_items() | ||
|
|
||
|
|
||
| func make_popup_menu(): | ||
| for lang in game.languages.values(): | ||
| get_popup().add_check_item(lang) | ||
|
|
||
|
|
||
| func check_current_items(): | ||
| var items_count = get_popup().get_item_count() | ||
| for i in range(items_count): | ||
| var idx = get_popup().get_item_index(i) | ||
| if get_popup().get_item_text(idx) == game.languages[game.os_lang]: | ||
| get_popup().set_item_checked(idx, true) | ||
| else: | ||
| get_popup().set_item_checked(idx, false) | ||
|
|
||
|
|
||
| func _on_item_pressed(id): | ||
| #get_popup().set_item_checked(id, true) | ||
| var lang = get_popup().get_item_text(id) | ||
| for key in game.languages.keys(): | ||
| var value = tr(game.languages[key]) | ||
| if value == lang: | ||
| game.os_lang = key | ||
|
|
||
| check_current_items() | ||
| TranslationServer.set_locale(game.os_lang) |
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
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just wondering: what is the variable
langused for?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry ... my mistake!!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
excuse me i don't have sync last commit in pull request! Now all is sync.