Module translation broken

Hi Rodney,

Do you have time to have a look at the Module Translation code? You’ve made some changes that I can’t quite get my head around and it seems to have partially broken the module translation.

The static initializer in Resources is checking to see if the user’s locale is one of the five supported languages and forcing it back to English if it is not. Also, the support for Country specific translations doesn’t seem to be supported.

This is fine for the Vassal translation phase, but it is causing problems when the Module translation phase starts up. It means you can’t have a module translation that is not one of the 5 Vassal languages, and you can’t have country specific translations.

Regards,
Brent.

Sure. I will take a look.

rk

Post generated using Mail2Forum (mail2forum.com)

Should be fixed in trunk@3196.

rk

Post generated using Mail2Forum (mail2forum.com)

Hi Rodney,

It’s better. It picks up a spanish VASSAL properties file in my home dir and offers spanish as a language preference on the ‘jump right in’ screen. (I don’t know Spanish, just using it as an example)

But the workflow doesn’t really make sense for module translations where the language is not one of the ‘Big 5’.

  1. Imagine I have a Spanish computer and start playing vassal with no Spanish VASSAL translation. Everything is in English, Ok I cope with that.

My friend sends me an English module that has a Spanish translation.

What do I expect to happen? Well, since my XP locality is set to Spanish, I would expect to load up the module and see the Spanish translation.

What actually happens? I load up the Spanish module and I see English??? I have to then go to Edit Preferences, change my preferred language from English to Spanish (which was not on the list before loading the module), save the preferences, quit out of Vassal, restart Vassal, play the module.

If my Locality is language X/country Y and I load a module that includes a translation for X or X/Y, then the translation process should be automatic and transparent, regardless of what the preferred current language is. I have already specified my preference in the XP Regional control panel, why do I have to tell Vassal as well?

  1. Country specific module translations does not seem to work either. Try creating a new module with a Spanish/Spain translation instead of a Spanish/ translation. It does not get picked.

It looks like you are only generating and saving Language level locales into the preferences, Resouces locale and setting them as the Java locale, so this line

countryBundle = languageBundle + “_” + Resources.getLocale().getCountry();

in Localization() can never load a country bundle.

Regards,
Brent.


Brent Easton
Analyst/Programmer
University of Western Sydney
Email: b.easton@uws.edu.au


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Yeah, it’s not great, but I couldn’t think of a better way. The basic problem is when do you take the language from the preferences and when do you take it from the user’s default locale?

rk

Post generated using Mail2Forum (mail2forum.com)

The problem is that the locale in the preferences is constrained to be one of the languages for which there is a Vassal translation. That’s fine, but modules can have any language translation in them at all.

I think that if a module is loaded that has a translation that matches the users actual default locale (ie control panel setting), then if that language is not already in the language preference list, it should be automatically added (which happens now) and made the current preference setting (which is the bit missing). The user can always change it back on the preference setting if they don’t like it.

So you really have two language ‘preferences’ - Vassal language and Module language which are independent. They can’t really be controlled by a single preference setting. You may want to use Italian as your Vassal language, but Spanish for any modules that incluse a Spanish translation. I don’t think you can do that at the momemnt, because if you change your language to Spanish, then Vassal will appear in English because there is no Spanish Vassal translation.

Brent.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)