diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2024-07-13 20:55:31 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2024-07-13 20:55:31 +0200 |
| commit | 3bb4bfe64683c9e68b7e89672ba5db59a0bd4ef6 (patch) | |
| tree | 5c1b7b831429335ff4701ded7b07884b6269e6c8 | |
| parent | c1f5e128f215260ef9bc02e4efafa5a5073cb309 (diff) | |
| download | turns-3bb4bfe64683c9e68b7e89672ba5db59a0bd4ef6.tar.xz turns-3bb4bfe64683c9e68b7e89672ba5db59a0bd4ef6.zip | |
app/ui: add 'mark as defeated' tooltip
| -rw-r--r-- | app/src/widgets/participant_list_row.cpp | 3 | ||||
| -rw-r--r-- | lang/include/turns/lang/messages.hpp | 1 | ||||
| -rw-r--r-- | lang/po/tooltips/de.po | 5 | ||||
| -rw-r--r-- | lang/po/tooltips/en_US.po | 5 | ||||
| -rw-r--r-- | lang/tests/tooltips.cpp | 3 | ||||
| -rw-r--r-- | res/widgets/participant_list_row.ui | 1 |
6 files changed, 14 insertions, 4 deletions
diff --git a/app/src/widgets/participant_list_row.cpp b/app/src/widgets/participant_list_row.cpp index 3be31b3..fd17157 100644 --- a/app/src/widgets/participant_list_row.cpp +++ b/app/src/widgets/participant_list_row.cpp @@ -2,6 +2,7 @@ #include <print> +#include <glibmm/i18n.h> #include <glibmm/ustring.h> namespace turns::app::widgets @@ -20,6 +21,8 @@ namespace turns::app::widgets m_subtitle = get_widget<Gtk::Label>("subtitle"); m_title = get_widget<Gtk::EditableLabel>("title"); m_toggle_defeated = get_widget<Gtk::ToggleButton>("toggle_defeated"); + + m_toggle_defeated->set_tooltip_text(_("Mark as defeated")); } auto participant_list_row::set_subtitle(Glib::ustring const & value) -> void diff --git a/lang/include/turns/lang/messages.hpp b/lang/include/turns/lang/messages.hpp index c7073cf..0b16648 100644 --- a/lang/include/turns/lang/messages.hpp +++ b/lang/include/turns/lang/messages.hpp @@ -18,6 +18,7 @@ namespace turns::lang { auto constexpr static add_a_participant = "Add a participant"; auto constexpr static main_menu = "Main Menu"; + auto constexpr static mark_as_defeated = "Mark as defeated"; } // namespace tooltips } // namespace turns::lang diff --git a/lang/po/tooltips/de.po b/lang/po/tooltips/de.po index 4a93bee..6804ea6 100644 --- a/lang/po/tooltips/de.po +++ b/lang/po/tooltips/de.po @@ -2,4 +2,7 @@ msgid "Add a participant" msgstr "Teilnehmer hinzufügen" msgid "Main Menu" -msgstr "Hauptmenü"
\ No newline at end of file +msgstr "Hauptmenü" + +msgid "Mark as defeated" +msgstr "Als besiegt markieren"
\ No newline at end of file diff --git a/lang/po/tooltips/en_US.po b/lang/po/tooltips/en_US.po index 3b83fa3..c22d541 100644 --- a/lang/po/tooltips/en_US.po +++ b/lang/po/tooltips/en_US.po @@ -2,4 +2,7 @@ msgid "Add a participant" msgstr "Add a participant" msgid "Main Menu" -msgstr "Main Menu"
\ No newline at end of file +msgstr "Main Menu" + +msgid "Mark as defeated" +msgstr "Mark as defeated"
\ No newline at end of file diff --git a/lang/tests/tooltips.cpp b/lang/tests/tooltips.cpp index 63831c5..8274487 100644 --- a/lang/tests/tooltips.cpp +++ b/lang/tests/tooltips.cpp @@ -16,7 +16,8 @@ namespace turns::lang::tests // clang-format off auto message = GENERATE( tooltips::add_a_participant, - tooltips::main_menu + tooltips::main_menu, + tooltips::mark_as_defeated ); auto locale = GENERATE( diff --git a/res/widgets/participant_list_row.ui b/res/widgets/participant_list_row.ui index fca9f22..e78f79b 100644 --- a/res/widgets/participant_list_row.ui +++ b/res/widgets/participant_list_row.ui @@ -1,6 +1,5 @@ <?xml version='1.0' encoding='UTF-8'?> <!-- Created with Cambalache 0.90.4 --> -<!--Adapted from: https://gitlab.gnome.org/GNOME/libadwaita--> <interface> <!-- interface-name participant_list_item.ui --> <requires lib="gtk" version="4.14"/> |
