Hello, I wanted to translate Vassal into a language not available in the app. When I run Vassal with the command “–translate” it displays an error window. After closing the error window, I have no texts, just empty fields. Where is the “.properties” file?
Please post the contents of the errorLog after you’ve had that message.
What language are you trying to translate?
I want to translate Vassal into Polish. I tested the translation functions some time ago on one of the earlier versions of Vassal. Everything worked fine then.
Error Log
2022-10-07 16:03:22,184 [10580-main] INFO VASSAL.launch.StartUp - Starting
2022-10-07 16:03:22,199 [10580-main] INFO VASSAL.launch.StartUp - OS Windows 10 10.0 amd64
2022-10-07 16:03:22,199 [10580-main] INFO VASSAL.launch.StartUp - Java version 18.0.1
2022-10-07 16:03:22,199 [10580-main] INFO VASSAL.launch.StartUp - Java home C:\Program Files\VASSAL-3.6.7\jre
2022-10-07 16:03:22,199 [10580-main] INFO VASSAL.launch.StartUp - VASSAL version 3.6.7
2022-10-07 16:03:22,438 [10580-AWT-EventQueue-0] INFO VASSAL.launch.ModuleManager - Manager
2022-10-07 16:04:46,583 [10580-AWT-EventQueue-0] INFO VASSAL.launch.ModuleManagerWindow - Exiting
2022-10-07 16:05:12,886 [8664-AWT-EventQueue-0] ERROR VASSAL.tools.ProblemDialog -
java.io.FileNotFoundException: VASSAL.properties not found
at VASSAL.i18n.VassalTranslation.(VassalTranslation.java:50)
at VASSAL.i18n.TranslateVassalWindow.(TranslateVassalWindow.java:62)
at VASSAL.launch.ModuleManager.lambda$main$0(ModuleManager.java:135)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
It looks like there’s some sort of path problem. We’re looking into it.
Try the fix_i18n_path build from our development builds archive. Does that fix the problem for you?
Yes, it works! During the first test, I translated about 20 random lines of text, but only one line was saved in the file. On the second try, everything that I translated was saved in the file. As the translation progresses, I will check if it is a single incident or a line of translation that causes the problem.
Translation using the built-in module is almost complete. Some small error causes that the phrase “Quick Start”, even though it is translated by me, is displayed in English anyway.
Another thing is I can’t see lines from the module editor. Is it a bug or the editor elements can’t be translated?
There’s never been any facility for doing translations of the Editor keys, but you can translate them manually if you want.
The properties files are in vassal-app/src/main/resources/VASSAL/i18n/
in our repo. The English values for the Editor are in Editor.properties
, and everything is otherwise parallel to the keys for Player and MM.
For Polish, you’d need to create an Editor_pl.properties
file.
Cool! I will translate the editor section and send it to the support email.
I’ve made a pull request containing your Polish translation. Expect it to be in the 3.6.8 release in a day or two. Thanks!
Wait, how do you use “-translate” to open VASSAL? I wanted to translate it into Chinese but I got stuck on enabling the “-translate” step
I assume you are running VASSAL on Windows or MacOSX and therefore are used to clicking on the “VASSAL” icon to run VASSAL.
To pass an option to VASSAL, the easiest thing to do is to open a terminal of some kind. How that’s done depend on your platform.
Windows:
Let us assume that VASSAL is installed in C:\Program Files\VASSAL
.
Next, we need to open a terminal. The default terminal on Windows is the “DOS command prompt”. To run that, press Windows-key+R (⊞+R) and type cmd
in the dialog followed by enter. A window with black background and white test will appear with a prompt that looks like
C:\Users\yourname>
At this prompt you can enter commands. Change directory to where VASSAL is installed
C:\Users\yourname> cd C:\Program Files\VASSAL
C:\Program Files\VASSAL>
You are now in the installation directory of VASSAL. To see the files in that directory type dir
(directory listing)
C:\Program Files\VASSAL> dir
...
One of the files you will see there is VASSAL.exe
- the actual program that gets executed.
Now execute that program with the --translate
option
C:\Program Files\VASSAL> VASSAL.exe --translate
MacOSX
Typically, VASSAL will be installed in /Applications/VASSAL.app
, but an alternative could be /home/user/Applications/VASSAL.app
To open a terminal open Finder and select double-click Applications on the left hand side. In that directory, find the sub-directory Utilties and open that folder. In the Utilities folder, find the application Terminal and double-click that.
A new window will open with white background and black text will open, with a prompt like
hostname:~ username$
This is your terminal prompt to enter commands into (~
means your home directory). Go to the installation directory of VASSAL
hostname:~ username$ cd /Applications/VASSAL.app/Contents/MacOS
hostname:MacOS username$
You are now in the installation directory of VASSAL. To see which files are there, run the command ls
(listing)
hostname:MacOS username$ ls
VASSAL.sh jre
As you can see, there’s a shell script called VASSAL.sh
which is the script that is actually being run. Now run that script passing the --translate
option
hostname:MacOS username$ ./VASSAL.sh --translate
Linux and similar
OK, I guess most Linux users know how to run a program passing options - but for the completeness of it and for the ChromeOS users, here goes.
Open up a terminal - I guess you know how to do that.
Assuming VASSAL is installed in /opt/vassal/current
, do
$ cd /opt/vassal/current
$ ./VASSAL.sh --translate
Other uses
Now that you know how to start VASSAL with option, you can use that in various ways
-
Start VASSAL and load a module
VASSAL -l ModuleFile.vmod VASSAL.sh -l `pwd`/ModuleFile.vmod # For Linux and MacOSX
-
Start VASSAL and edit a module
VASSAL -e ModuleFile.vmod VASSAL.sh -e `pwd`/ModuleFile.vmod # For Linux and MacOSX
-
See which command line options are available
VASSAL -h VASSAL.sh --help # For Linux and MacOSX
Yours,
Christian