From ed26fdd806e24dbe22bb0f1de280cf7840c1e83b Mon Sep 17 00:00:00 2001 From: Joshua Ogunyinka Date: Mon, 10 Jan 2022 12:37:54 +0400 Subject: [PATCH] Add missing language strings in other uncategorized sections --- data/strings/en.ini | 8 ++++++++ src/app/cmd/flatten_layers.cpp | 3 ++- src/app/commands/cmd_keyboard_shortcuts.cpp | 4 ++-- src/app/console.cpp | 5 +++-- src/app/ui/news_listbox.cpp | 7 +++++-- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/data/strings/en.ini b/data/strings/en.ini index a8cf44ec4..fcbdd6361 100644 --- a/data/strings/en.ini +++ b/data/strings/en.ini @@ -594,6 +594,7 @@ toggle_breakpoint = Toggle Breakpoint stacktrace = Stacktrace console = Console locals = Locals +cancel = Cancel [document_tab_popup_menu] duplicate_view = Duplicate &View @@ -1025,6 +1026,8 @@ header_action = Action header_key = Key header_context = Context zoom = Zoom +add = Add +default_action = (Default Action) scroll_vertically = Scroll Vertically scroll_horizontally = Scroll Horizontally fg_color = Color: Foreground Palette Entry @@ -1111,6 +1114,7 @@ saturation = Saturation color = Color luminosity = Luminosity no_layer = No Layer +flattened = Flattened [load_palette] title = Load Palette @@ -1328,6 +1332,10 @@ name = Name: tileset = Tileset: default_new_layer_name = New Layer +[news_listbox] +more = More... +problem_loading = Problems loading news. Please retry. + [enter_license] title = Enter License default_message = If you need a license key, go to diff --git a/src/app/cmd/flatten_layers.cpp b/src/app/cmd/flatten_layers.cpp index c281b722d..936a5b04f 100644 --- a/src/app/cmd/flatten_layers.cpp +++ b/src/app/cmd/flatten_layers.cpp @@ -20,6 +20,7 @@ #include "app/cmd/set_layer_name.h" #include "app/cmd/unlink_cel.h" #include "app/doc.h" +#include "app/i18n/strings.h" #include "app/restore_visible_layers.h" #include "doc/algorithm/shrink_bounds.h" #include "doc/cel.h" @@ -81,7 +82,7 @@ void FlattenLayers::onExecute() // Create a new transparent layer to flatten everything onto it. flatLayer = new LayerImage(sprite); ASSERT(flatLayer->isVisible()); - flatLayer->setName("Flattened"); + flatLayer->setName(Strings::layer_properties_flattened()); newFlatLayer = true; bgcolor = sprite->transparentColor(); } diff --git a/src/app/commands/cmd_keyboard_shortcuts.cpp b/src/app/commands/cmd_keyboard_shortcuts.cpp index a13efb2c5..ac811e64b 100644 --- a/src/app/commands/cmd_keyboard_shortcuts.cpp +++ b/src/app/commands/cmd_keyboard_shortcuts.cpp @@ -447,7 +447,7 @@ private: m_addButton->setBgColor(gfx::ColorNone); m_addButton->setBounds(itemBounds); - m_addButton->setText("Add"); + m_addButton->setText(Strings::keyboard_shortcuts_add()); invalidate(); } @@ -481,7 +481,7 @@ private: std::string getAccelText(const Accelerator& accel) const { if (m_key && m_key->type() == KeyType::WheelAction && accel.isEmpty()) { - return "(Default Action)"; + return Strings::keyboard_shortcuts_default_action(); } else { return accel.toString(); diff --git a/src/app/console.cpp b/src/app/console.cpp index 051d3fb94..bf7eefd85 100644 --- a/src/app/console.cpp +++ b/src/app/console.cpp @@ -13,6 +13,7 @@ #include "app/app.h" #include "app/context.h" +#include "app/i18n/strings.h" #include "app/modules/gui.h" #include "app/ui/main_window.h" #include "app/ui/status_bar.h" @@ -35,9 +36,9 @@ Console::ConsoleWindow* Console::m_console = nullptr; class Console::ConsoleWindow final : public Window { public: - ConsoleWindow() : Window(Window::WithTitleBar, "Console"), + ConsoleWindow() : Window(Window::WithTitleBar, Strings::debugger_console()), m_textbox("", WORDWRAP), - m_button("Cancel") { + m_button(Strings::debugger_cancel()) { TRACE_CON("CON: ConsoleWindow this=", this); m_button.Click.connect([this]{ closeWindow(&m_button); }); diff --git a/src/app/ui/news_listbox.cpp b/src/app/ui/news_listbox.cpp index 0f6ccbb97..0d95941a2 100644 --- a/src/app/ui/news_listbox.cpp +++ b/src/app/ui/news_listbox.cpp @@ -12,6 +12,7 @@ #include "app/ui/news_listbox.h" #include "app/app.h" +#include "app/i18n/strings.h" #include "app/pref/preferences.h" #include "app/res/http_loader.h" #include "app/ui/skin/skin_theme.h" @@ -168,7 +169,8 @@ private: class ProblemsItem : public NewsItem { public: - ProblemsItem() : NewsItem("", "Problems loading news. Retry.", "") { + ProblemsItem() + : NewsItem("", Strings::news_listbox_problem_loading(), "") { } protected: @@ -306,7 +308,8 @@ void NewsListBox::parseFile(const std::string& filename) .FirstChild("channel") .FirstChild("link").ToElement(); if (linkXml && linkXml->GetText()) - addChild(new NewsItem(linkXml->GetText(), "More...", "")); + addChild( + new NewsItem(linkXml->GetText(), Strings::news_listbox_more(), "")); if (view) view->updateView();