Skip to content
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

[SOCIS 2019 GUI Improvements]Tranlate settings page to German. #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yjwudi
Copy link

@yjwudi yjwudi commented Apr 11, 2019

Hi,
I am Yingjie Liu, a master student from China. I am interested in the project “GUI Improvements” of esa-socis 2019. This pull request is about "Localization".
I added a button "German" in the settings page. User clicks the button, the settings page will turn to German.
pic1
pic2
Please review and test this pull request. There is no need to merge it, because "Localization" should be down by using a QCombobox and add many other language options for user to select, and every ui page should be changed.
If there are any suggestions for this pull request, feel free to let me know. And I will write a detailed plan in proposal about "GUI Improvements" as soon as possible.

@cardinot
Copy link
Member

cardinot commented Apr 15, 2019

Thanks for that @yjwudi
It's a good proof of concept, but some work should be done to make it work for any language.

A few things to consider:

  1. For this project, it'd be also important to support translation in the core module (e.g., warning messages).
  2. Instead of having multiple ts files for each widget, the whole module should have a single ts file for each language, i.e., src/gui/res/translations/gui_<lang>.ts (for the gui module) and src/core/res/translations/core_<lang>.ts (for the core module)
  3. We should keep the qApp calls in the main classes. In this way, we should have a MainApp::loadTranslation(const QString& filename) which would be responsible to load the translations and emit a signal to let the other modules aware of the change.
  4. The .qm files should be auto-generated while compiling the software (use the Qt5LinguistTools macros in the CMake script) and not embedded in the repository. Thus, the res/translations folder would just have the .ts files.
  5. The installTranslator function does not overwrite the current language, but appends the file to the list to be used for translations. Thus, before installing a new language, we should remove the previous one (except if the previous lang was english, i.e., the base language)
  6. When the user opens Evoplex for the first time, it should try to use the same language used in the system.
  7. Evoplex should remember user preferences. Thus, if the user sets the language, it should be saved in the .conf file (QSettings).

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants