mirror of
https://github.com/Jetsparrow/karmabot.git
synced 2026-01-21 09:06:09 +03:00
Add joke belarusian locale + add locale notes
This commit is contained in:
parent
09d2ce7bb6
commit
fadd970c5d
@ -57,7 +57,8 @@ namespace JetKarmaBot.Commands
|
|||||||
|
|
||||||
Client.SendTextMessageAsync(
|
Client.SendTextMessageAsync(
|
||||||
args.Message.Chat.Id,
|
args.Message.Chat.Id,
|
||||||
currentLocale["jetkarmabot.changelocale.justchanged"],
|
(currentLocale.HasNote ? currentLocale["jetkarmabot.changelocale.beforenote"] + currentLocale.Note + "\n" : "")
|
||||||
|
+ currentLocale["jetkarmabot.changelocale.justchanged"],
|
||||||
replyToMessageId: args.Message.MessageId);
|
replyToMessageId: args.Message.MessageId);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -105,15 +105,20 @@ namespace JetKarmaBot
|
|||||||
private Dictionary<string, string> locale;
|
private Dictionary<string, string> locale;
|
||||||
private string localeName;
|
private string localeName;
|
||||||
private string[] commonNames;
|
private string[] commonNames;
|
||||||
|
private string note;
|
||||||
|
|
||||||
public Locale(JObject locale, string localeName)
|
public Locale(JObject locale, string localeName)
|
||||||
{
|
{
|
||||||
this.locale = locale.Property("strings").Value.ToObject<Dictionary<string, string>>();
|
this.locale = locale.Property("strings").Value.ToObject<Dictionary<string, string>>();
|
||||||
this.localeName = localeName;
|
this.localeName = localeName;
|
||||||
this.commonNames = locale.Property("names").Value.ToObject<string[]>();
|
this.commonNames = locale.Property("names").Value.ToObject<string[]>();
|
||||||
|
if (locale.ContainsKey("note")) this.note = locale.Property("note").Value.ToObject<string>();
|
||||||
}
|
}
|
||||||
public string[] CommonNames => commonNames;
|
public string[] CommonNames => commonNames;
|
||||||
public string Name => localeName;
|
public string Name => localeName;
|
||||||
|
public bool HasNote => note != null;
|
||||||
|
|
||||||
|
public string Note => note;
|
||||||
public string this[string name] => locale.ContainsKey(name) ? locale[name] : "unknown";
|
public string this[string name] => locale.ContainsKey(name) ? locale[name] : "unknown";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -19,6 +19,7 @@
|
|||||||
"jetkarmabot.changelocale.justchanged": "Так дакладна.",
|
"jetkarmabot.changelocale.justchanged": "Так дакладна.",
|
||||||
"jetkarmabot.changelocale.getlocale": "Я зараз кажу па-беларускай.",
|
"jetkarmabot.changelocale.getlocale": "Я зараз кажу па-беларускай.",
|
||||||
"jetkarmabot.changelocale.listalltext": "Я ведаю:",
|
"jetkarmabot.changelocale.listalltext": "Я ведаю:",
|
||||||
"jetkarmabot.changelocale.errorall": "Мне б хацелася гаварыць на ўсіх мовах у той жа самы час, але з-за абмежаванняў сусвету, мне гэта не дазваляецца."
|
"jetkarmabot.changelocale.errorall": "Мне б хацелася гаварыць на ўсіх мовах у той жа самы час, але з-за абмежаванняў сусвету, мне гэта не дазваляецца.",
|
||||||
|
"jetkarmabot.changelocale.beforenote": "Увага: "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -18,6 +18,7 @@
|
|||||||
"jetkarmabot.changelocale.justchanged": "Roger that.",
|
"jetkarmabot.changelocale.justchanged": "Roger that.",
|
||||||
"jetkarmabot.changelocale.getlocale": "I'm currently speaking English.",
|
"jetkarmabot.changelocale.getlocale": "I'm currently speaking English.",
|
||||||
"jetkarmabot.changelocale.listalltext": "I know:",
|
"jetkarmabot.changelocale.listalltext": "I know:",
|
||||||
"jetkarmabot.changelocale.errorall": "I would like to speak all languages at once, but because of the rules of the universe, I am not allowed to do that."
|
"jetkarmabot.changelocale.errorall": "I would like to speak all languages at once, but because of the rules of the universe, I am not allowed to do that.",
|
||||||
|
"jetkarmabot.changelocale.beforenote": "Warning: "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -18,6 +18,7 @@
|
|||||||
"jetkarmabot.changelocale.justchanged": "Так точно.",
|
"jetkarmabot.changelocale.justchanged": "Так точно.",
|
||||||
"jetkarmabot.changelocale.getlocale": "Я сейчас говорю по-русски.",
|
"jetkarmabot.changelocale.getlocale": "Я сейчас говорю по-русски.",
|
||||||
"jetkarmabot.changelocale.listalltext": "Я знаю:",
|
"jetkarmabot.changelocale.listalltext": "Я знаю:",
|
||||||
"jetkarmabot.changelocale.errorall": "Мне бы хотелось говорить на всех языках в то же самое время, но из-за ограничений вселенной, мне это не позволяется."
|
"jetkarmabot.changelocale.errorall": "Мне бы хотелось говорить на всех языках в то же самое время, но из-за ограничений вселенной, мне это не позволяется.",
|
||||||
|
"jetkarmabot.changelocale.beforenote": "Внимание: "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user