Using gettext with menu! section! macro #357
-
Hi I currently have this menu: menu! {
primary_menu: {
section! {
"_Preferences" => PreferencesAction,
"_Keyboard" => ShortcutsAction,
"_About PixelRust GTK" => AboutAction,
}
}
} How do I make it that I can translate the item names? |
Beta Was this translation helpful? Give feedback.
Answered by
AaronErhardt
Nov 26, 2022
Replies: 1 comment 7 replies
-
I'm not sure how to tell GTK to use gettext, but the macro should roughly generate the following code for the first action: gio::MenuItem::new(Some("_Preferences"), Some(&PreferencesAction::action_name())); Before fixing or improving the macro we first have to figure out how to tell GTK to translate the strings in regular Rust code. This might also be a question for the gtk-rs matrix channel. |
Beta Was this translation helpful? Give feedback.
7 replies
Answer selected by
MTRNord
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not sure how to tell GTK to use gettext, but the macro should roughly generate the following code for the first action:
Before fixing or improving the macro we first have to figure out how to tell GTK to translate the strings in regular Rust code. This might also be a question for the gtk-rs matrix channel.