command-line language setting ignores first character of argument
When you want to use the -LANGUAGE parameter to set the language via command-line, the patcher will only use a substring of the supplied argument, because there is a substring call inside. So you need to write -LANGUAGE -GERMAN or -LANGUAGE _GERMAN, which is very counter-intuitive, especially when you are used to command-line tools under linux. :)
So I wonder, if there is some hidden purpose in the substring call (see below, SUMGUI line 511) that I miss?
index = arguments.indexOf("-LANGUAGE");
if (index != -1) {
String lang = arguments.get(index + 1).substring(1);
for (Language l : Language.values()) {
if (lang.equalsIgnoreCase(l.toString())) {
SPGlobal.language = l;
break;
}
}
}
Comments (5)
-
repo owner -
repo owner - changed status to resolved
Done in my dev repo. Will be in 2.2.0.7.
-
repo owner - changed status to open
Realized my fix would break SUM setting language on patchers that used old versions of skyproc. Will have to kludge together support for both.
-
reporter If
#25is implemented, this issue should have a really low importance and only affect a handful of nerds (a wrong language-setting in the ini causes CTDs at startup, so this value should be reliable) -
repo owner - changed status to resolved
Added ugly double check for old skyproc/SUM versions.
- Log in to comment
That was an odd decision on Leviathan's part. He did use -Language -theLanguage when passing arguments in SUM. I removed the need for the extra - and changed SUM as well for the next version.