1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 07:36:39 +02:00

Add some helper methods to CommandSource for translation.

This commit is contained in:
Sadie Powell
2026-04-26 18:07:56 +01:00
parent 7eb710a009
commit e2dc77641a
21 changed files with 74 additions and 51 deletions
+3 -3
View File
@@ -340,8 +340,8 @@ void ExampleWrapper::SendTo(CommandSource &source)
header = false;
}
const auto *trans_example = Language::Translate(source.nc, entry.example.c_str());
const auto *trans_description = Language::Translate(source.nc, entry.description.c_str());
const auto *trans_example = source.Translate(entry.example);
const auto *trans_description = source.Translate(entry.description);
if (flexible)
{
source.Reply("\002%s%s%s\002: %s", source.command.c_str(), *trans_example ? " " : "",
@@ -381,7 +381,7 @@ void HelpWrapper::SendTo(CommandSource &source)
for (const auto &[entry_name, entry_desc] : entries)
{
const auto *trans_desc = Language::Translate(source.nc, entry_desc.c_str());
const auto *trans_desc = source.Translate(entry_desc);
if (flexible)
{
source.Reply("\002%s\002: %s", entry_name.c_str(), trans_desc);