common project localization: move out all updating strings

- finish localizing boostrapper/runner/action_runner
This commit is contained in:
yuyoyuppe
2020-10-22 19:02:59 +03:00
committed by Andrey Nekrasov
parent 5629e8068b
commit f33b3c771a
18 changed files with 427 additions and 181 deletions

View File

@@ -33,8 +33,7 @@ using winrt::Windows::UI::Notifications::ToastNotificationManager;
namespace fs = std::filesystem;
// This namespace contains strings that SHOULD NOT be localized
namespace
namespace // Strings in this namespace should not be localized
{
constexpr std::wstring_view TASK_NAME = L"PowerToysBackgroundNotificationsHandler";
constexpr std::wstring_view TASK_ENTRYPOINT = L"PowerToysNotifications.BackgroundHandler";
@@ -45,11 +44,6 @@ namespace
constexpr std::wstring_view DEFAULT_TOAST_GROUP = L"PowerToysToastTag";
}
namespace localized_strings
{
constexpr std::wstring_view SNOOZE_BUTTON = L"Snooze";
}
static DWORD loop_thread_id()
{
static const DWORD thread_id = GetCurrentThreadId();
@@ -365,7 +359,7 @@ void notifications::show_toast_with_activations(std::wstring message,
toast_xml += '"';
}
toast_xml += LR"( content=")";
toast_xml += localized_strings::SNOOZE_BUTTON;
toast_xml += b.snooze_button_title;
toast_xml += LR"(" />)";
} },
actions[i]);