Default to English; other ONB defaults

This commit is contained in:
ONBcode 2024-04-10 10:53:10 -03:00
parent 3ab98c440e
commit 248d19ca95
2 changed files with 24 additions and 22 deletions

View File

@ -313,7 +313,7 @@ int APIENTRY WinMain(HINSTANCE hInstance,
lang.get().addLangResource(L"Extraspråk", lpath); lang.get().addLangResource(L"Extraspråk", lpath);
} }
wstring defLang = gEvent->getPropertyString("Language", L"Svenska"); wstring defLang = gEvent->getPropertyString("Language", L"English");
defaultCodePage = gEvent->getPropertyInt("CodePage", 1252); defaultCodePage = gEvent->getPropertyInt("CodePage", 1252);
@ -329,7 +329,7 @@ int APIENTRY WinMain(HINSTANCE hInstance,
lang.get().loadLangResource(defLang); lang.get().loadLangResource(defLang);
} }
catch (std::exception &) { catch (std::exception &) {
lang.get().loadLangResource(L"Svenska"); lang.get().loadLangResource(L"English");
} }
try { try {

View File

@ -119,9 +119,9 @@ oEvent::oEvent(gdioutput &gdi):oBase(0), gdibase(gdi)
tCurrencyFactor = 1; tCurrencyFactor = 1;
tCurrencySymbol = L"kr"; tCurrencySymbol = L"$";
tCurrencySeparator = L","; tCurrencySeparator = L".";
tCurrencyPreSymbol = false; tCurrencyPreSymbol = true;
tClubDataRevision = -1; tClubDataRevision = -1;
@ -148,7 +148,7 @@ oEvent::oEvent(gdioutput &gdi):oBase(0), gdibase(gdi)
isConnectedToServer = false; isConnectedToServer = false;
hasPendingDBConnection = false; hasPendingDBConnection = false;
currentNameMode = FirstLast; currentNameMode = LastFirst;
nextTimeLineEvent = 0; nextTimeLineEvent = 0;
//These object must be initialized on creation of any oObject, //These object must be initialized on creation of any oObject,
@ -448,7 +448,7 @@ oEvent::~oEvent()
} }
void oEvent::initProperties() { void oEvent::initProperties() {
setProperty("Language", getPropertyString("Language", L"103")); setProperty("Language", getPropertyString("Language", L"English"));
setProperty("Interactive", getPropertyString("Interactive", L"1")); setProperty("Interactive", getPropertyString("Interactive", L"1"));
setProperty("Database", getPropertyString("Database", L"1")); setProperty("Database", getPropertyString("Database", L"1"));
@ -460,7 +460,7 @@ void oEvent::initProperties() {
getPropertyInt("UseDirectSocket", true); getPropertyInt("UseDirectSocket", true);
getPropertyInt("UseEventorUTC", 0); getPropertyInt("UseEventorUTC", 0);
getPropertyInt("UseHourFormat", 1); getPropertyInt("UseHourFormat", 1);
getPropertyInt("NameMode", FirstLast); getPropertyInt("NameMode", LastFirst);
} }
void oEvent::listProperties(bool userProps, vector< pair<string, PropertyType> > &propNames) const { void oEvent::listProperties(bool userProps, vector< pair<string, PropertyType> > &propNames) const {
@ -3895,9 +3895,9 @@ void oEvent::clear()
nextTimeLineEvent = 0; nextTimeLineEvent = 0;
tCurrencyFactor = 1; tCurrencyFactor = 1;
tCurrencySymbol = L"kr"; tCurrencySymbol = L"$";
tCurrencySeparator = L","; tCurrencySeparator = L".";
tCurrencyPreSymbol = false; tCurrencyPreSymbol = true;
readPunchHash.clear(); readPunchHash.clear();
@ -3914,7 +3914,7 @@ void oEvent::clear()
MeOSUtil::useHourFormat = getPropertyInt("UseHourFormat", 1) != 0; MeOSUtil::useHourFormat = getPropertyInt("UseHourFormat", 1) != 0;
currentNameMode = (NameMode) getPropertyInt("NameMode", FirstLast); currentNameMode = (NameMode) getPropertyInt("NameMode", LastFirst);
hasWarnedModifiedExtId = false; hasWarnedModifiedExtId = false;
@ -3978,10 +3978,10 @@ void oEvent::loadDefaults() {
getDI().setString("EMail", getPropertyString("EMail", L"")); getDI().setString("EMail", getPropertyString("EMail", L""));
getDI().setString("Homepage", getPropertyString("Homepage", L"")); getDI().setString("Homepage", getPropertyString("Homepage", L""));
getDI().setInt("CardFee", getPropertyInt("CardFee", 25)); getDI().setInt("CardFee", getPropertyInt("CardFee", 4));
getDI().setInt("EliteFee", getPropertyInt("EliteFee", 130)); getDI().setInt("EliteFee", getPropertyInt("EliteFee", 15));
getDI().setInt("EntryFee", getPropertyInt("EntryFee", 90)); getDI().setInt("EntryFee", getPropertyInt("EntryFee", 15));
getDI().setInt("YouthFee", getPropertyInt("YouthFee", 50)); getDI().setInt("YouthFee", getPropertyInt("YouthFee", 10));
getDI().setInt("SeniorAge", getPropertyInt("SeniorAge", 0)); getDI().setInt("SeniorAge", getPropertyInt("SeniorAge", 0));
getDI().setInt("YouthAge", getPropertyInt("YouthAge", 16)); getDI().setInt("YouthAge", getPropertyInt("YouthAge", 16));
@ -3989,10 +3989,10 @@ void oEvent::loadDefaults() {
getDI().setString("Account", getPropertyString("Account", L"")); getDI().setString("Account", getPropertyString("Account", L""));
getDI().setString("LateEntryFactor", getPropertyString("LateEntryFactor", L"50 %")); getDI().setString("LateEntryFactor", getPropertyString("LateEntryFactor", L"50 %"));
getDI().setString("CurrencySymbol", getPropertyString("CurrencySymbol", L"kr")); getDI().setString("CurrencySymbol", getPropertyString("CurrencySymbol", L"$"));
getDI().setString("CurrencySeparator", getPropertyString("CurrencySeparator", L".")); getDI().setString("CurrencySeparator", getPropertyString("CurrencySeparator", L"."));
getDI().setInt("CurrencyFactor", getPropertyInt("CurrencyFactor", 1)); getDI().setInt("CurrencyFactor", getPropertyInt("CurrencyFactor", 1));
getDI().setInt("CurrencyPreSymbol", getPropertyInt("CurrencyPreSymbol", 0)); getDI().setInt("CurrencyPreSymbol", getPropertyInt("CurrencyPreSymbol", 1));
getDI().setString("PayModes", getPropertyString("PayModes", L"")); getDI().setString("PayModes", getPropertyString("PayModes", L""));
setCurrency(-1, L"", L"", 0); setCurrency(-1, L"", L"", 0);
@ -6179,10 +6179,12 @@ int oEvent::interpretCurrency(const wstring &c) const {
} }
int oEvent::interpretCurrency(double val, const wstring &cur) { int oEvent::interpretCurrency(double val, const wstring &cur) {
if (_wcsicmp(L"sek", cur.c_str()) == 0) if ( (_wcsicmp(L"cad", cur.c_str()) == 0) || (_wcsicmp(L"usd", cur.c_str()) == 0) )
setCurrency(1, L"kr", L",", false); setCurrency(1, L"$", L".", true);
else if (_wcsicmp(L"eur", cur.c_str()) == 0) else if (_wcsicmp(L"sek", cur.c_str()) == 0)
setCurrency(100, L"", L".", false);//WCS setCurrency(1, L"kr", L",", false);
else if (_wcsicmp(L"eur", cur.c_str()) == 0)
setCurrency(100, L"", L".", false);//WCS
return int(floor(val * tCurrencyFactor+0.5)); return int(floor(val * tCurrencyFactor+0.5));
} }