summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/include/messages.hpp8
-rw-r--r--gui/src/participant_row.cpp2
-rw-r--r--gui/tests/messages.cpp82
3 files changed, 46 insertions, 46 deletions
diff --git a/gui/include/messages.hpp b/gui/include/messages.hpp
index 9b8c315..b47cdc9 100644
--- a/gui/include/messages.hpp
+++ b/gui/include/messages.hpp
@@ -3,10 +3,10 @@
* SPDX-License-Identifier: LGPL-2.1-only
*/
-#ifndef TURNS_MESSAGES_HPP
-#define TURNS_MESSAGES_HPP
+#ifndef TURNS_GUI_MESSAGES_HPP
+#define TURNS_GUI_MESSAGES_HPP
-namespace Turns::messages
+namespace Turns::gui::message
{
auto constexpr static add_participant = "Add participant";
auto constexpr static cancel = "Cancel";
@@ -49,6 +49,6 @@ namespace Turns::messages
auto constexpr static successfully_saved_format = "Successfully saved '{}'";
auto constexpr static turns = "Turns";
auto constexpr static turns_files = "Turns Files";
-} // namespace Turns::messages
+} // namespace Turns::gui::message
#endif \ No newline at end of file
diff --git a/gui/src/participant_row.cpp b/gui/src/participant_row.cpp
index 01cf1ed..52f0b69 100644
--- a/gui/src/participant_row.cpp
+++ b/gui/src/participant_row.cpp
@@ -97,7 +97,7 @@ namespace Turns::gui
Glib::Binding::bind_property(participant->property_priority(),
m_subtitle->property_label(),
Glib::Binding::Flags::SYNC_CREATE,
- [](auto n) { return std::vformat(_(messages::priority_number), std::make_format_args(n)); });
+ [](auto n) { return std::vformat(_(message::priority_number), std::make_format_args(n)); });
Glib::Binding::bind_property(participant->property_disposition(),
m_toggle_defeated->property_css_classes(),
diff --git a/gui/tests/messages.cpp b/gui/tests/messages.cpp
index c1d2f7e..d0280af 100644
--- a/gui/tests/messages.cpp
+++ b/gui/tests/messages.cpp
@@ -14,7 +14,7 @@
#include <format>
#include <string>
-namespace Turns::messages
+namespace Turns::gui::tests
{
TEST_CASE("Translated messages")
@@ -24,48 +24,48 @@ namespace Turns::messages
SECTION(std::format("Locale '{}'", locale))
{
- auto message = GENERATE(add_participant,
- cancel,
- clear,
- delete_participant,
- disposition,
- disposition_colors,
- edit_participant,
- end_turn_order,
- finish,
- flow,
- friendly,
- hostile,
- main_menu,
- mark_as_defeated,
+ auto message = GENERATE(message::add_participant,
+ message::cancel,
+ message::clear,
+ message::delete_participant,
+ message::disposition,
+ message::disposition_colors,
+ message::edit_participant,
+ message::end_turn_order,
+ message::finish,
+ message::flow,
+ message::friendly,
+ message::hostile,
+ message::main_menu,
+ message::mark_as_defeated,
// a better solution is required to test the following entry:
// name,
- new_turn_order_file_name,
- next_participant,
- no_active_turn_order,
- open,
- preferences,
- preferences_mnemonic,
- previous_participant,
- priority,
- priority_number,
- question_clear_turn_order,
- quit,
- reset,
- save,
- save_as,
- saving_failed_format,
- secret,
- skip_defeated,
- start_turn_order,
- stop,
- stop_and_clear,
- stop_turn_order,
- successfully_opened_format,
- successfully_saved_format,
- round_number,
- turns,
- turns_files);
+ message::new_turn_order_file_name,
+ message::next_participant,
+ message::no_active_turn_order,
+ message::open,
+ message::preferences,
+ message::preferences_mnemonic,
+ message::previous_participant,
+ message::priority,
+ message::priority_number,
+ message::question_clear_turn_order,
+ message::quit,
+ message::reset,
+ message::save,
+ message::save_as,
+ message::saving_failed_format,
+ message::secret,
+ message::skip_defeated,
+ message::start_turn_order,
+ message::stop,
+ message::stop_and_clear,
+ message::stop_turn_order,
+ message::successfully_opened_format,
+ message::successfully_saved_format,
+ message::round_number,
+ message::turns,
+ message::turns_files);
SECTION(std::format("has a translation for '{}'", message))
{