Why is VASSAL.properties not called VASSAL_en.properties?

All of the translation files are named VASSAL_XX.properties, where XX is the two-letter ISO code for the language contained in the file, except for the English one, which is just called VASSAL.properties. Is there a reason why the English translation is not called VASSAL_en.properties?

So that English is the fallback language if you run in a Locale for which there is no localized properties file. If VASSAL.properties is renamed it VASSAL_en.properties, then when you tried to startup Vassal in, Greece, say, it will fail with no translation available.

Think of English not as a ‘Translation’, but as the ‘Source’ language.

B.


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

I don’t like this. It treats one translation file as a special case in two
ways (name, default status) when it only needs to be treated in a special
case one way (default status).

We could rename VASSAL.properties to VASSAL_en.properties, and make
VASSAL_en.properties the default instead. This would be functionally the
same, but more uniform.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Except that is not the way the Java i18n system works. That would be a non-standard hack.

Property files are automatically searched for in the class path in the following order:

VASSAL_xx_YY.properties
VASSAL_xx.properties
VASSAL.properties

xx = language code
YY = country code

For a computer set up to use language xy, it doesn’t make sense to show them the en properties file.


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

I still find this weird. I get that they’re doing this heirarchically,
but this approach is always going to leave someone wondering why there
is no properties file explicitly labeled for the default language. I
would feel better if they had done it so that the only thing the root
properties file contained was an indicator of what other properties file
to read as the default.


J.


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

Post generated using Mail2Forum (mail2forum.com)

On Feb 25, 2009, at 4:03 AM, Joel Uckelman wrote:

I suspect that there is an element of backward-compatibility involved
as well.

They wanted software that didn’t have the language-encoded properties
files to still work.

Now perhaps what one could do would be to declare by convention that
one would NEVER write the VASSAL.properties files and instead
automatically copy one of the VASSAL_xx.properties files to that name
when writing out the module.


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

Post generated using Mail2Forum (mail2forum.com)