Skip to content

Add language combobox to the Preferences menu#187

Merged
MKleusberg merged 4 commits into
masterfrom
unknown repository
Jan 25, 2015
Merged

Add language combobox to the Preferences menu#187
MKleusberg merged 4 commits into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Jan 19, 2015

Copy link
Copy Markdown

In addition, the new tab that I created also holds the "default location" option as suggested by @MKleusberg.

I've also renamed the Chinese translation file because the program was not finding it (see QTranslator::load() for the patterns used when looking for translation files).

@rp-

rp- commented Jan 19, 2015

Copy link
Copy Markdown
Contributor

Seems to work quite good, just a question as I'm not really into the code here. Can we have also an combobox entry to "revert" back to the system locale detected language?

@ghost

ghost commented Jan 19, 2015

Copy link
Copy Markdown
Author

Hmm the initial code had a "System Language" entry, but I removed it for some reason I cannot recall now. But I'll put it back, I think it makes sense to have it.

@ghost ghost closed this Jan 19, 2015
@ghost ghost reopened this Jan 19, 2015
@ghost

ghost commented Jan 19, 2015

Copy link
Copy Markdown
Author

(closed by accident) 😁

@ghost

ghost commented Jan 19, 2015

Copy link
Copy Markdown
Author

Oh, I remember the doubts I had when I removed this option.
Tell me what you think:
I thought about two cases, one where the user's locale has a corresponding translation and the other where it doesn't.

For the first case, supposing that the language is German, I thought that it would be more informative to just show "German" selected instead of "System Language", because there's a German translation and the application would be in German. For the second case, I thought that showing "English" right away instead of "System Language" would also be more informative because it indicates clearly that there's no translation in the user's language and that it has defaulted to English.

And the language names will always be in English. This was meant to prevent cases where the users couldn't find their languages because the program somehow started in a strange language (perhaps it would be better to show the name of the languages in the native version?).

(BTW, I have to add some comments to the code about this).

@rp-

rp- commented Jan 21, 2015

Copy link
Copy Markdown
Contributor

Ok, kinda makes sense to me, just wanted to have something to go back to the default language.

I would go with the native version. You wouldn't select it if you don't understand it.

@justinclift

Copy link
Copy Markdown
Member

Interesting stuff. I guess we'll find out how well it fits real world usage... by getting people to use it, then lets tweak from there if needed? 😄

@justinclift justinclift added the enhancement Feature requests. label Jan 21, 2015
@justinclift justinclift added this to the 3.5 - Space Pizza Express milestone Jan 21, 2015
The behavior remains basically as before: when first launched
the application will try to load a translation for the user's
locale, and if one cannot be found it defaults to English.
The difference is that now this is remembered so that upon
further launches the program will go straight to the matching
locale.

See issue #182.
This allows the file to be included in the language box
(Qt wasn't recognizing the "cn" suffix as a valid locale).
This allows the languages to be loaded when the user is
running the app from another directory (e.g. when the app
is run from an exported path).
@ghost

ghost commented Jan 21, 2015

Copy link
Copy Markdown
Author

@rp- I reverted the changes but unfortunately using the native version turned out to be a no can do. That would break compatibility as the methods were introduced in Qt 4.8.

That's right, @justinclift, the user is the ultimate tester I guess 😄

@MKleusberg

Copy link
Copy Markdown
Member

I agree with @justinclift to get this to real world usage and, besides, the code quality is very good - so I really don't see any objections not to merge this :) Nice work, @Samir-Aguiar 👍 If you're interested in doing more coding work you're absolutely welcome to - if you should need any assistance or inspiration on which areas to work on, feel free to ask us any time!

Regarding the default language option: Maybe a compromise would be to keep the list as it is, but append the string ' (system language)' to the list entry corresponding to the detected system language, or the string ' (fallback language)' to the list item for the English language when there is no translation available for the system language. Maybe one could even move this marked item to the top of the list or so to make it even clearer.

MKleusberg added a commit that referenced this pull request Jan 25, 2015
Add language combobox to the Preferences menu
@MKleusberg MKleusberg merged commit d6b887d into sqlitebrowser:master Jan 25, 2015
@justinclift

Copy link
Copy Markdown
Member

@MKleusberg Ahh yeah, those sound like good ways to indicate when a language is the system one, fall back one, and that kind of thing. 😄

@ghost

ghost commented Jan 26, 2015

Copy link
Copy Markdown
Author

Thanks @MKleusberg!
Yeah, I plan to open some other pull requests soon 😄 I was looking at the issues to see what needed to be done, but if you've got some suggestion just let me know 😀

And appending those strings is a great idea -- I'll do some tests later.

@MKleusberg

Copy link
Copy Markdown
Member

@Samir-Aguiar Awesome 😄 I'll just open new issues with suggestions as soon as I remember them. But pick any issue you like to work on :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Feature requests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants