-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add language option in settings menu #1990
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
|
This is not correctly rebased (see the |
|
Oops, missed that! EDIT: Can I just delete the |
|
Don't you test your code after rebasing? You should... |
|
Please don't open new pull requests when rebasing. |
|
@PilzAdam Sorry, didn't test it. |
ffbed93 to
e733c05
Compare
|
Okay, perfectly rebased. Thanks, @SmallJoker! |
|
Okay, merge conflicts again. :( |
builtin/mainmenu/tab_settings.lua
Outdated
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.
Space
|
If you rebase this could be good for merge. I agree with this change but i need to test it after rebase |
|
Okay, updated to fit new 0.4.12's layout. PS: @SmallJoker please rebase this! |
a6d554a to
d7f2a2b
Compare
|
Thanks, @SmallJoker for the rebase! Also, please update the translation (aka EDIT: Found an error: |
|
+1 to idea. A check box in the top right may be better, just white text until you click it. |
|
@rubenwardy Sorry, what do you mean:
|
|
Okay, @rubenwardy |
|
I am opposed to this feature unless it allows the user to select “System language” as well (which just clears the |
|
@Wuzzy, of course that will still be the case.
|
|
Good. :-) |
|
@Wuzzy2, another good idea! |
|
@Wuzzy2 @rubenwardy |
d7f2a2b to
71fd338
Compare
builtin/mainmenu/tab_settings.lua
Outdated
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.
This doesn't account for things like the LANG env var which init_gettext does.
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.
@ShadowNinja How to account things like the LANG env var?
EDIT: answered by @rubenwardy by using os.getenv()
makes the default selected language is based on LANG enviroment variable
|
Okay, @ShadowNinja |
|
Is it possible that os.getevn("LANG") returns nil? |
|
@rubenwardy Haven't tested. Should I add |
No, this code does not even work. :P If you meant |
|
Then, should I add local LANG_env = os.getenv("LANG")
if LANG_env == nil or LANG_env == "" then
LANG_env = "en"
end |
|
Wuzzy, that was obviously a typo. I read the documentation today when the You might be able to do: (pseudo code) Instead of an if statement, but I've never tried three in a row like that. |
|
I am not sure if it is so simple by just reading For example, on my system, |
|
Its better to restart game when language changed instead of showing a message. |
|
|
@PilzAdam You can close this. |
|
006ef5b |
|
Okay, Off-topic: But, I a little bit don't like the tree-like settings, How about more dialog? ... and some presets? |

Rebase of #1937