-
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
Conversation
… the localizations of levels and cards
localization: refining italian translation. part 1
localization: refine italian translation. part 2
schokotets
left a comment
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.
Thank you so much @m0rp30 for your contribution and extensive translation! It really helps improving the project by making it accessible to a larger audience.
I've noticed a few inconsistencies considering naming of functions and explicitly/implicitly translating strings. See the pull request #129 thread for a more general discussion about the modalities and structure of translation.
resources/localizations.csv
Outdated
| LEVELS,Livels,Livelli | ||
| QUIT,Quit,Esci | ||
| BACK,Back,Indietro | ||
| RELOAD,Reload,Ricarica | ||
| MUSIC,Toggle Music,Musica | ||
| NEXT_LEVEL,Next Level,Prossimo Livello | ||
| GIT_MESSAGE,"Hi! It seems that you don't have Git installed yet! |
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.
would we want to add quotation marks around the values here for consistency's sake?
later in the file, there are quotation marks around each value, yet not each key.
| ``` | ||
|
|
||
| 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 comment
The 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.
|
|
||
| var notification = preload("res://scenes/notification.tscn").instance() | ||
| notification.text = text | ||
| notification.text = tr(text) |
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.
Do we want to implicitly translate the given text, looking for strings in the translation?
Note that Godot seems to translate implicity: the tr function only converts the argument if found: Docs
Or would we, instead, prefer having two methods:
- one that notifies the given string
- one that notifies by key
|
By the way, we could also consider translating the game's credits - they're located in three different spots: |
|
Thanks again @m0rp30 for your contribution! It's valuable to have a working implementation -- this moves the project in the right direction and helps the discussion on how to implement i18n. I've discussed technical details and the modalities of i18n with @blinry. We noticed that, in this project, there are two main aspects of translation:
Below is a list on what we agreed on & provide the reasons. This is not a final stance, rather a draft up for discussion.
What are your thoughts on this, @m0rp30 ? Are you interested in continuing to work on this pull request, or would you like to hand it off to others? Will reference this discussion in #18 |
Co-authored-by: schokotets <[email protected]>
Co-authored-by: schokotets <[email protected]>
Co-authored-by: schokotets <[email protected]>
Co-authored-by: schokotets <[email protected]>
Co-authored-by: schokotets <[email protected]>
Co-authored-by: schokotets <[email protected]>
Co-authored-by: schokotets <[email protected]>
@schokotets i'm very happy to this !!! The free time isn't to much but i try to do this |
|
Amazing, I'm glad to hear that! Feel free to ask questions in this pull
request thread, for example, when you realize that what we suggested might
be better done another way.
…On Wed, 17 Aug 2022, 10:26 Luca Canali, ***@***.***> wrote:
Thanks again @m0rp30 <https://github.com/m0rp30> for your contribution!
It's valuable to have a working implementation -- this moves the project in
the right direction and helps the discussion on how to implement i18n.
I've discussed technical details and the modalities of i18n with @blinry
<https://github.com/blinry>. We noticed that, in this project, there are
two main aspects of translation:
- *non-level translation:* general translation of button texts etc. (
resources/localizations.csv )
- *level translation:* translating level texts. could be more
extensive, with localized file names, specialized commands,
culture-appropriate storylines.
Below is a list on what we agreed on & provide the reasons. This is not a
final stance, rather a draft up for discussion.
1. split up the non-level translation file
- problem: having multiple languages on the same line will hinder
concurrent translation into multiple languages because of merge conflicts
- solution: using multiple files for different languages to minimize
conflicts.
1. use existing tooling for i18n (at least for non-level translation)
- problem: telling progress on different language's translation status
- problem: requiring bare text editors to translate would be a barrier
to non-technical people interested in helping translation
- solution: use GNU gettext <https://www.gnu.org/software/gettext/>
tooling
- Godot already supports gettext file format
<https://docs.godotengine.org/en/3.5/tutorials/i18n/localization_using_gettext.html>
- afaict gettext can automatically extract strings from code,
providing context (e.g. line numbers) for the strings in the .po files
1. refactoring the structure of per-level translation
- problem: having high-level folders per language allows different
level structures per locale, which hinders and complicates development that
modifies e.g. the sequence of levels
- solution: differentiate by-locale on a lower layer, e.g. create a
folder per level part & per-locale files differentiated by suffix
1. consistency
- use ISO language strings (e.g. en_US instead of en_EN) everywhere
the locale is referenced
What are your thoughts on this, @m0rp30 <https://github.com/m0rp30> ? Are
you interested in continuing to work on this pull request, or would you
like to hand it off to others?
Will reference this discussion in #18
<#18>
I'm very happy to this !!! The free time isn't to much but i try to do this
—
Reply to this email directly, view it on GitHub
<#129 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADF3NFJHPK6EIRK3CQTP2Q3VZSO47ANCNFSM5EYX2NDQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
|
Add new pull request with new mechanism |
|
discussion continues in pr #146 |
I make the localization mechanism for levels and cards and i add the italian localization, that is the instructions to add cards and leves localizatoin.
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"
}
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!