WIP: rework of localized strings, instead of generic LocStr, LocStr is now a struct which contains both the key, and the values which should be put into the value's placeholders. strs' properties are now methods which take values as arguments, and properties if they don't

This commit is contained in:
Kwoth
2021-07-26 20:08:02 +02:00
parent 9d375dccee
commit 0115d35247
46 changed files with 176 additions and 273 deletions

View File

@@ -33,23 +33,8 @@ namespace NadekoBot.Modules
protected string GetText(string key) =>
Strings.GetText(key, _cultureInfo);
protected string GetText(in LocStr0 key) =>
Strings.GetText(key, _cultureInfo);
protected string GetText(in LocStr1 key, object obj1) =>
Strings.GetText(key, _cultureInfo, obj1);
protected string GetText(in LocStr2 key, object obj1, object obj2) =>
Strings.GetText(key, _cultureInfo, obj1, obj2);
protected string GetText(in LocStr3 key, object obj1, object obj2, object obj3) =>
Strings.GetText(key, _cultureInfo, obj1, obj2, obj3);
protected string GetText(in LocStr4 key, object obj1, object obj2, object obj3, object obj4) =>
Strings.GetText(key, _cultureInfo, obj1, obj2, obj3, obj4);
protected string GetText(in LocStr5 key, object obj1, object obj2, object obj3, object obj4, object obj5) =>
Strings.GetText(key, _cultureInfo, obj1, obj2, obj3, obj4, obj5);
protected string GetText(in LocStr data) =>
Strings.GetText(data, _cultureInfo);
protected string GetText(string key, params object[] args) =>
Strings.GetText(key, _cultureInfo, args);