diff --git a/gtk/po/snes9x-gtk.pot b/gtk/po/snes9x-gtk.pot index b3a7f988..38d6a727 100644 --- a/gtk/po/snes9x-gtk.pot +++ b/gtk/po/snes9x-gtk.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-03-21 15:34-0500\n" +"POT-Creation-Date: 2023-03-21 17:30-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,6 +17,34 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" +#: src/gtk_binding.cpp:248 +msgid "Unknown" +msgstr "" + +#: src/gtk_binding.cpp:257 +msgid "Keyboard {}{}{}{}" +msgstr "" + +#: src/gtk_binding.cpp:267 +msgid "Axis {} {} {}%" +msgstr "" + +#: src/gtk_binding.cpp:272 +msgid "Button {}" +msgstr "" + +#: src/gtk_binding.cpp:274 +msgid "Joystick {} {}" +msgstr "" + +#: src/gtk_binding.cpp:278 +msgid "Unset" +msgstr "" + +#: src/gtk_preferences.cpp:21 +msgid "Same location as current game" +msgstr "" + #: src/snes9x.ui:9 msgid "About Snes9x" msgstr "" diff --git a/gtk/src/gtk_binding.cpp b/gtk/src/gtk_binding.cpp index d3c82da0..1418479e 100644 --- a/gtk/src/gtk_binding.cpp +++ b/gtk/src/gtk_binding.cpp @@ -236,8 +236,8 @@ std::string Binding::to_string(bool translate) { std::string str; -#undef _ -#define _(String) translate ? gettext(String) : (String) +#undef maybegettext +#define maybegettext(String) translate ? gettext(String) : (String) if (is_key()) { @@ -245,7 +245,7 @@ std::string Binding::to_string(bool translate) char *keyval_name = gdk_keyval_name(keyval); if (keyval_name == nullptr) - str = _("Unknown"); + str = maybegettext("Unknown"); else str = keyval_name; @@ -254,7 +254,7 @@ std::string Binding::to_string(bool translate) if (c == '_') c = ' '; - str = fmt::format(_("Keyboard {}{}{}{}"), + str = fmt::format(maybegettext("Keyboard {}{}{}{}"), (value & BINDING_SHIFT) ? "Shift+" : "", (value & BINDING_CTRL) ? "Ctrl+" : "", (value & BINDING_ALT) ? "Alt+" : "", @@ -264,18 +264,18 @@ std::string Binding::to_string(bool translate) else if (is_joy()) { if ((get_key()) >= 512) - str = fmt::format(_("Axis {} {} {}%"), + str = fmt::format(maybegettext("Axis {} {} {}%"), get_axis(), is_positive() ? "+" : "-", get_threshold()); else - str = fmt::format(_("Button {}"), get_key()); + str = fmt::format(maybegettext("Button {}"), get_key()); - str = fmt::format(_("Joystick {} {}"), get_device(), str); + str = fmt::format(maybegettext("Joystick {} {}"), get_device(), str); } else - str = _("Unset"); + str = maybegettext("Unset"); return str; } diff --git a/gtk/src/gtk_preferences.cpp b/gtk/src/gtk_preferences.cpp index 221f13fd..83f37f53 100644 --- a/gtk/src/gtk_preferences.cpp +++ b/gtk/src/gtk_preferences.cpp @@ -18,7 +18,7 @@ #include "gfx.h" #include "display.h" -#define SAME_AS_GAME _("Same location as current game") +#define SAME_AS_GAME gettext("Same location as current game") static Snes9xPreferences *preferences = nullptr;