iRIC Internationalization Manual

Overview

iRIC support multiple languages. Language setting can be changed with the following menu.

[Option] –> [Preferences…]

When you change language setting, you have to restart iRIC to apply the setting.

This document describes the procedure to prepare translation dictionaries of iRIC.

Dictionary files you need to prepare are shown in Table 1.

Dictionary files

Extension

Description

Solver

GUI

*.ts

XML text file
This file contains the translated texts used in iRIC.

x

x

*.qm

Binary file
This file is created from “*.ts” by “lrelease.exe”.
“lrelease.exe” is a executable program which is
included in Qt SDK. Refer to Appendix for detail.

x

You can find the translation file(*.ts) for iRIC GUI at the following URL:

The files with name “iRIC_xx_XX.ts” are the files to translate. They are the files created from dictionary files for each libraries by merging.

The languages currently supported in iRIC, and the file names of translation files for each language are shown in Table 2.

Languages currently supported

Language

File name

Arabic

iRIC_ar_EG.ts

Basque

iRIC_eu_ES.ts

Bosnian

iRIC_bs_BA.ts

Bulgarian

iRIC_bg_BG.ts

Catalan

iRIC_ca_ES.ts

Chinese (China)

iRIC_zh_CN.ts

Chinese (Taiwan)

iRIC_zh_TW.ts

Czech

iRIC_cs_CZ.ts

Danish

iRIC_da_DK.ts

Dutch

iRIC_nl_NL.ts

Estonian

iRIC_et_EE.ts

Finnish

iRIC_fi_FI.ts

French

iRIC_fr_FR.ts

German

iRIC_de_DE.ts

Galician

iRIC_gl_ES.ts

Greek

iRIC_el_GR.ts

Hindi

iRIC_hi_IN.ts

Hungarian

iRIC_hu_HU.ts

Icelandic

iRIC_is_IS.ts

Indonesian

iRIC_id_ID.ts

Italian

iRIC_it_IT.ts

Japanese

iRIC_ja_JP.ts

Korean

iRIC_ko_KR.ts

Latvian

iRIC_lv_LV.ts

Lithuanian

iRIC_lt_LT.ts

Norwegian

iRIC_nb_NO.ts

Polish

iRIC_pl_PL.ts

Portuguese (Brazil)

iRIC_pt_BR.ts

Portuguese (Portugal)

iRIC_pt_PT.ts

Romanian

iRIC_ro_RO.ts

Russian

iRIC_ru_RU.ts

Slovenian

iRIC_sl_SI.ts

Spanish

iRIC_es_ES.ts

Swedish

iRIC_sv_SE.ts

Thai

iRIC_th_TH.ts

Turkish

iRIC_tr_TR.ts

Ukrainian

iRIC_uk_UA.ts

GUI translation

Step 1

Find the translation file (*.ts) you want to edit, which you can find at the following URL:

Step 2

Open the translation file with text editor and add translations for each English word. Please refer to List 1 and List 2.

*.ts before editing
<message>
  <source>Animation ToolBar</source>
  <translation type="unfinished"></translation>
</message>
*.ts after editing
<message>
  <source>Animation ToolBar</source>
  <translation>アニメーションツールバー</translation>
</message>

What you should do is as follows:

  1. Delete “type=unfinished”

  2. Add translated text between <translation> and </translation>

  3. Save the file

Step 3

Compile “*.ts” file using “lrelease.exe”

You should install Qt SDK to get lrelease.exe. See Appendix for detail.

  1. Launch “Qt 5.15.2 (MSVC 2019 64-bit)” from menu below:

    [Windows Start Menu] –> [Qt]

  2. Move to the folder which contains “*.ts” file.

  3. Execute the following command.

lrelease.exe (dictionary file name)

After you execute the command, you’ll see that *.qm is created in the same folder.

Step 4

You can check the translated text in the iRIC GUI by the following steps:

  1. Remove all dictionary files in (iRIC install folder)/guis/prepost/languages

  2. Copy the *.qm file you’ve compiled with Step 3 to the folder above.

  3. Switch the language from the menu Option -> Preference

  4. Restart iRIC GUI

Solver translation

Step 1

Create or update the translation file (*.ts) for the solver you want to prepare translation.

  1. Select [Option] –> [Create/Update Translation Files] in iRIC GUI menu. Refer to Figure 1.

  2. Click the next button on the dialog in Figure 2.

  3. Select Solver and Languages you want to prepare translation on the dialog in Figure 3. Click the Next button.

  4. Click the Finish button. The path you’ll get translation file (*.ts) is shown on the dialog, as in Figure 4.

_images/tr_menu.png

“Create/Update Translation Files” menu

_images/tr_wizard_introduction.png

Introduction page

_images/tr_wizard_select.png

Select Program and Languages page

_images/tr_wizard_confirm.png

Confirm the result page

Step 2

Open the translation file with text editor and add translations for each English word. Please refer List 3 and List 4.

*.ts before editing
<message>
   <source>Boundary Condition</source>
   <translation></translation>
</message>
*.ts after editing
<message>
  <source>Boundary Condition</source>
  <translation>境界条件</translation>
</message>

What you should do is as follows:

  1. Add translated text between <translation> and </translation>

  2. Save the file

Step 3

You can see the translated text in the iRIC software when you restart the iRIC and starts a project for the solver you prepared translation file.

Information for internationalization volunteers

Thank you for your coorporation to iRIC internationalization.

In this page, we introduce information for volunteer translators.

  • iRIC GUI translation

  • Solver translation

iRIC GUI translation

You can translate iRIC GUI with the four steps below:

  1. Create github account.

  2. Fork iRIC GUI repository.

  3. Edit dictionary to add translation.

  4. Send pull request.

Create github account

Please access github from the following URL.

https://github.com/

On the page you can input Username, Email, and Password to sign up.

Fork iRIC GUI repository

After you’ve created github account and signed in, please visit the following URL:

https://github.com/i-RIC/prepost-gui

You will have “Fork” button on the top right of the screen. Please click the button, to fork the repository.

After some time passes, you will be at URL like below:

https://github.com/(your_account_id)/prepost-gui

Edit dictionary to add translation.

Now you can edit the dictionary file.

If you are familier with github, you can clone the repository to create local copy, edit files, and push the modification to the repository.

If you are new to github, the easiest way is to edit the file on web browser.

All the dictionary files are saved in “languages” folder, so please access that folder, and click on the file you want to edit.

Then, please click on the pencil icon with popup “Edit this file”, to start editing.

List 5 and List 6 shows an example of code before and after editing.

*.ts before editing
<message>
  <location filename="../main/animationcontroller.cpp" line="48"/>
  <source>Animation ToolBar</source>
  <translation type="unfinished"></translation>
</message>
*.ts after editing
<message>
  <location filename="../main/animationcontroller.cpp" line="48"/>
  <source>Animation ToolBar</source>
  <translation>アニメーションツールバー</translation>
</message>

What you should do is as follows:

  1. Delete “type=unfinished”

  2. Add translated text between <translation> and </translation>

Send pull request

When you finished editing the file, check on the “Create a new branch for this commit and start a pull request”.

The default name for your new branch will be “(your-account-id)-patch-1”, so edit it to make it easier to know what it does, for example “solverconsole-es-translation”.

Now please visit the following URL.

https://github.com/i-RIC/prepost-gui

Then you’ll see “Compare & pull request” button, so please click it. “Open a pull request” page will be shown, so please click on “Create pull request” button. If you want to, you can add comments to the pull request.

Conguratulation! You’ve finished editing the dictionary of iRIC.

iRIC developers will review the changes you made, and if there is no problem, it will be merged, and the modification you’ve made will be applied to the next release.

Solver translation

Dictionaries for solvers are independent from those for iRIC GUI.

For example, messages and captions shown on “Calculation Condition” dialog is specific to solvers, so the messages are included in solver translation dictionary.

You can translate solver with the three steps below:

  1. Create dictionary file.

  2. Edit dictionary to add translation.

  3. Upload dictionary to iRIC forum page

Create dictionary file

Create or update the translation file (*.ts) for the solver you want to prepare translation.

  1. Select [Option] –> [Create/Update Translation Files] in iRIC GUI menu. Refer to Figure 5.

  2. Click the next button on the dialog in Figure 6.

  3. Select Solver and Languages you want to prepare translation on the dialog in Figure 7. Click the Next button.

  4. Click the Finish button. The path you’ll get translation file (*.ts) is shown on the dialog, as in Figure 8.

_images/tr_menu.png

“Create/Update Translation Files” menu

_images/tr_wizard_introduction.png

Introduction page

_images/tr_wizard_select.png

Select Program and Languages page

_images/tr_wizard_confirm.png

Confirm the result page

Edit dictionary to add translation

Open the translation file with text editor and add translations for each English word. Please refer List 7 and List 8.

*.ts before editing
<message>
   <source>Boundary Condition</source>
   <translation></translation>
</message>
*.ts after editing
<message>
  <source>Boundary Condition</source>
  <translation>境界条件</translation>
</message>

What you should do is as follows:

  1. Add translated text between <translation> and </translation>

  2. Save the file

Upload dictionary to iRIC forum page

Please upload the dictionary to iRIC forum page, from the URL below:

https://i-ric.org/en/new-forum/

Please input Subject like “Spanish dictionary proposal”, Select Category for the solver name, and please attach the dictionary file you’ve edited. Then, click on “Submit” button to send the file.

Conguratulation! You’ve finished editing the dictionary of solver.

Solver developers will review the changes you made, and if there is no problem, it will be merged, and the modification you’ve made will be applied to the next release.

Appendix: Installilng Qt SDK

You can download the Qt SDK installer from following url:

https://www.qt.io/download-open-source

  1. Click on “Download the Qt Online Installer”. It is at almost the bottom of the page.

  2. Click on “Qt Online Installer for Windows” link.

Then, you’ll get qt-unified-windows-x64-4.5.2-online.exe (Maybe the version number is different).

Now, launch the installer by double-clicking.

  1. In Figure 9, click on “Next” button. If you are connecting internet where you need proxy setting, Please press “Setting” button before you proceed, to setup proxy setting.

  2. In Figure 10, click on “Skip” button. If you already have Qt account, or want to create a new Qt Account, You can fill in “Login” or “Sign-up” form.

  3. In Figure 11, click on “Next” button. Downloading meta data about files to install will start. This will take some time.

  4. In Figure 12, enter the directory where you want to install Qt, and click on “Next” button.

  5. In Figure 13, check on Qt / Qt 5.5 / msvc2013 64-bit, and click on “Next” button.

  6. In Figure 14, read the license, check on “I have read and agree to the terms contained in the license agreements”, and click on “Next” button.

  7. In Figure 15, click on “Next” button.

  8. In Figure 16, click on “Install” button.

_images/qt_installer1.png

Qt Installer welcome page

_images/qt_installer2.png

Qt Account page

_images/qt_installer3.png

Qt Installer setup page

_images/qt_installer4.png

Qt Install folder select page

_images/qt_installer5.png

Component select page

_images/qt_installer6.png

License agreement page

_images/qt_installer7.png

Start menu shortcut page

_images/qt_installer8.png

Install ready page