Add April Fools easter egg

This commit is contained in:
JustArchi
2021-03-29 21:42:42 +02:00
parent 1f7a2c21d9
commit 1c1c292082
2 changed files with 13 additions and 0 deletions

View File

@@ -244,12 +244,24 @@ namespace ArchiSteamFarm {
ASF.ArchiLogger.LogGenericError(Strings.ErrorInvalidCurrentCulture);
}
} else {
// April Fools easter egg
DateTime now = DateTime.Now;
if ((now.Month == 4) && (now.Day == 1)) {
try {
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.CreateSpecificCulture("qps-ploc");
} catch (Exception e) {
ASF.ArchiLogger.LogGenericDebuggingException(e);
}
}
}
// Skip translation progress for English and invariant (such as "C") cultures
switch (CultureInfo.CurrentUICulture.TwoLetterISOLanguageName) {
case "en":
case "iv":
case "qps":
return true;
}

View File

@@ -4,6 +4,7 @@
"source": "/ArchiSteamFarm/Localization/Strings.resx",
"translation": "/ArchiSteamFarm/Localization/Strings.%locale%.resx",
"translation_replace": {
".en-LOL.resx": ".qps-ploc.resx",
".sr-CS.resx": ".sr-Latn.resx"
}
},