maptool
maptool copied to clipboard
Localization setting does not work in 1.8
Describe the bug I set the application to English in the Preferences and restart, but much of the UI is still in Danish (my Windows locale). The Danish translation is not complete, hence "much of the UI ... "
To Reproduce Steps to reproduce the behavior:
- Go to 'Preferences'
- Click on 'Startup'
- Set language to something other than default locale and restart application.
- Start application and observe that default locale is still in effect.
Expected behavior The configured locale should be observed.
Screenshots If applicable, add screenshots to help explain your problem.
MapTool Info
- Version: 1.8
- Install: New/Upgrade (Side-by-side install with 1.7).
Desktop (please complete the following information):
- OS: Windows 10 Home
- Version 2004 (Build 19041.450)
Additional context
==== MapTool Information ====
MapTool Version: 1.8.0-beta.2
MapTool Home...: C:\Users\thoma\.maptool-rptools
MapTool Install: C:\Users\thoma\AppData\Local\MapTool 1.8\app
Max mem avail..: 3 GB
Max mem used...: 503 MB
Custom Property: -DMAPTOOL_DATADIR=.maptool-rptools
==== Java Information ====
Java Home......: C:\Users\thoma\AppData\Local\MapTool 1.8\runtime
Java Vendor....: Azul Systems, Inc.
Java Version...: 14.0.2
Java Parameters:
-Djava.library.path=C:\Users\thoma\AppData\Local\MapTool 1.8\app;C:\Users\thoma\AppData\Local\MapTool 1.8
-Djava.launcher.path=C:\Users\thoma\AppData\Local\MapTool 1.8
-Dsentry.environment=Production
-Dfile.encoding=UTF-8
--add-opens=javafx.web/javafx.scene.web=ALL-UNNAMED
--add-opens=javafx.web/com.sun.webkit=ALL-UNNAMED
-XX:+ShowCodeDetailsInExceptionMessages
-Xss8M
==== OS Information ====
OS Name........: Windows 10
OS Version.....: 10.0
OS Architecture: amd64
Processor......: AMD64 Family 23 Model 1 Stepping 1, AuthenticAMD
PATH...........: C:\Users\thoma\AppData\Local\MapTool 1.8\app;C:\Users\thoma\AppData\Local\MapTool 1.8
Number of Procs: 4
==== User Information ====
User Name: thoma
User Home: C:\Users\thoma
User Dir.: C:\Users\thoma\AppData\Local\MapTool 1.8
==== Network Interfaces ====
Display Name..: Software Loopback Interface 1
Interface Name: lo
Address...: 127.0.0.1
Address...: 0:0:0:0:0:0:0:1
Display Name..: Realtek PCIe GbE Family Controller
Interface Name: eth4
Address...: 192.168.0.150
Host Address...: 192.168.0.150
Default Gateway: 192.168.0.1
==== Locale Information ====
Country.: Denmark
Language: Danish
Locale..: Danish (Denmark)
Variant.:
==== Encoding Information ====
Default Locale: da_DK
Default Charset: UTF-8
file.encoding: UTF-8
sun.jnu.encoding: Cp1252
Default Encoding: UTF8
==== Display Information ====
Number of Displays: 1
Display 1: 1920x1080(32)
==== Internet Gateway Devices ====
No IGDs Found!
Did you get any other prompts after changing the language and restarting MT?
You should be able to force English short term by editing the config file (MapTool.cfg
) in the install directory under app.
Change the language line to: -Duser.language=en
Make sure the maptool.cfg file in your home dir under .maptool-rptools\config\
has the same setting.
For the record, I was able to change it to Spanish and then French via preferences but when I tried to change it back to English I got a warning that the config file under app was in use by another process on startup.
Ok, this is a bit strange, although I am pretty sure those nice big brains that maintain the code can figure it out 😀 If I change the language to French, everything seems to translate nicely. If I change it to English, some stuff, like the main menu are in Danish. The problem is, of course, that the Danish translation is nowhere finished, so I have no idea what is English because the localization works, and what is English because it has not been translated yet.
So, I am pretty sure that there is an issue when translating between default language (English) and current culture (Danish in my case). Languages that are neither works fine. I think I have seen this before somewhere else, but I cannot remember for the life of me ;)
If it is any help at all, there is no language line in neither MapTool.cfg file btw. I am assuming the -Duser.language goes into JavaOptions?
That worked btw ;)
Yes, it goes under [JavaOptions]
. Without the entry the defaults to your locale. You can put the line in specify the locale you want.
@Phergus IIRC the original code for this "removed" the language code if it was set to the "default" of english. But of course, removing the line then makes it default to your default language of course.
I thought i removed that behavior but there could still be some logic that "no choice" == english == no jvm parameter?
If we don't we probably need a "OS setting" in there as well as english and the "OS Setting" (or some better name) would remove the JVM option all together?
Hm. Looks like the same issue as #2179
Changes from the switch to the new packager has resulted in changes to how the startup config for the 1.8 release is handled. Changes to locale will need to be made manually initially. Moving to 1.9 release.
Note that with 1.8.3+ that you can't set the language via preferences but must modify the config file directly. If the move to Java 16 for MT 1.9 allows us to once again modify the config file this can be revisited.
Just for reference:
Startup Config for MT 1.8.* and 1.9.0
Locate the MapTool.cfg
file under the app
directory in your MapTool install directory. The following are examples. You shouldn't need to change any of them excepting language for those in different locales.
Under [JavaOptions]
you can add/set the following:
-Xmx4G
- set max heap to 4G
-Xms1G
- set min heap to 1G
-Xss10M
- set stack size to 10M
-Dsun.java2d.d3d=false
- disable Direct3D. Set to true
to disable.
-Dsun.java2d.opengl=true
- enable OpenGL. Default is false
.
-Djavafx.macosx.embedded=false
- initialize AWT before JFX (MacOS only). Default is false
.
-Duser.language=en
- set MT local to English. Without this line MT will default to the users locale as set in the operating system.
As the change to Java 16 packager didn't improve things deferring this till after MT 1.9.0.
This is still an issue as of 1.11.4. Thought I'd let you know :) If it is not solvable, then I would suggest that the section explaining on the Startup tab, should be expanded with maybe a couple of examples.