itom-project / itom

itom core repository
https://itom-project.github.io/
Other
13 stars 5 forks source link

Can locale be system dependent? #285

Closed twip-os closed 2 months ago

twip-os commented 2 months ago

In the "language" tab of the properties, the locale for number and date representation can be set to a specific language. If no language was set, it is loaded from the operating systems settings. I would like to ask if its possible to change the behaviour of the language tab.

  1. When the "Apply" is clicked in the property dialog and "Operating System" is selected, the settings are stored to the .ini-file. But in my case, the numberStringConversionStandard is set to "C" even if my Operating System is german. So with a new user, I see numbers formatted in german but if I klick on apply in the property dialog, I get it formatted in english after the next restart, even if I changed nothing.

  2. Would it be possible to also get the language from the Operating System if desired?

I am on vacation for two weeks from wendesday on so don't be surprised if I'm not answering over this time.

Cheers, Thomas

magro11 commented 2 months ago

Dear Thomas, I guess that your observation was due to a bug in the code. I made a commit (see above), that possibly fixes this bug. Please check it. If fixed, then please close this issue.

The problem was as follows:

  1. If no entry was found in itom.ini, itom used the current standard from the operating system for numbers and date
  2. If somebody opens the language property page, "operating system" has been chosen per default, however when Apply was clicked, "C-style" was written to the setting file (which is usually interpreted as US-style. This was an error. Now: operating system is written to the setting file, which comes to the same result than point 1.

Cheers Marc

twip-os commented 2 months ago

Hello Marc,

thank you for the fast fix. I can confirm that it works as expected now.

I'm sorry, I wasn't clear on 2. I meant if it would be possible, to also make the language for text and not only the number style operating system dependent.

Cheers Thomas

magro11 commented 2 months ago

Ah OK, now I understood point 2. Yes, we could add an automatic language option, such that the language will be chosen from the operating system. I just have to guess about a fallback if the language is not available. Probably the standard language English. I think that I will add this possibility soon. Cheers Marc

magro11 commented 2 months ago

Hi Thomas, I added an operating-system dependent choice of the language in the pull request #287 .

Could you check this?

twip-os commented 2 months ago

Hi Marc,

I checked the commit and it works fine. Does exactly what we needed. Thank you very much.

Cheers Thomas