feat: create tooltip text for some widgets, and make more strings translatable

This commit is contained in:
tfuxu 2022-10-01 18:01:15 +02:00
parent 279dd5b905
commit c0d8f759d3
5 changed files with 19 additions and 10 deletions

View file

@ -33,6 +33,7 @@ template GradiencePresetRow : Adw.ExpanderRow {
[action]
Button star_button {
valign: center;
tooltip-text: _("Add as a Favourite");
styles [
"flat",
]
@ -79,7 +80,7 @@ template GradiencePresetRow : Adw.ExpanderRow {
valign: center;
popover: pop_actions;
icon-name: "view-more-symbolic";
tooltip-text: _("More Options");
styles [
"flat",
]

View file

@ -21,6 +21,7 @@ template GradiencePresetWindow : Adw.Window {
Button import_button {
styles ["suggested-action"]
label: _("Import");
tooltip-text: _("Import a Preset File");
clicked => on_import_button_clicked();
}

View file

@ -21,6 +21,7 @@ template GradienceMainWindow : Adw.ApplicationWindow {
Button apply-button {
styles ["suggested-action"]
label: _("Apply");
tooltip-text: _("Apply Preset");
action-name: "app.apply_color_scheme";
}
// [start]
@ -37,6 +38,7 @@ template GradienceMainWindow : Adw.ApplicationWindow {
[end]
Gtk.MenuButton {
tooltip-text: _("Main Menu");
icon-name: "open-menu-symbolic";
menu-model: main-menu;
}
@ -45,6 +47,7 @@ template GradienceMainWindow : Adw.ApplicationWindow {
MenuButton presets-dropdown {
menu-model: presets-menu;
label: _("Presets");
tooltip-text: _("Presets Menu");
icon-name: "palette-symbolic";
}
@ -57,16 +60,13 @@ template GradienceMainWindow : Adw.ApplicationWindow {
}
}
[end]
MenuButton errors-button {
styles ["raised", "error"]
tooltip-text: _("CSS Errors");
icon-name: "dialog-warning-symbolic";
popover: errors-popover;
}
}
Gtk.Box {
@ -82,7 +82,6 @@ template GradienceMainWindow : Adw.ApplicationWindow {
icon-name: "larger-brush-symbolic";
child: Adw.PreferencesPage content { };
}
Adw.ViewStackPage {
@ -98,9 +97,7 @@ template GradienceMainWindow : Adw.ApplicationWindow {
title: _("Advanced");
icon-name: "settings-symbolic";
child: Adw.PreferencesPage content_plugins { };
}
}
@ -121,6 +118,7 @@ menu main-menu {
label: _("Restore Applied Color Scheme");
action: "app.restore_color_scheme";
}
item {
label: _("Reset Applied Color Scheme");
action: "app.reset_color_scheme";
@ -131,6 +129,7 @@ menu main-menu {
label: _("Preferences");
action: "app.preferences";
}
item {
label: _("About Gradience");
action: "app.about";
@ -144,10 +143,12 @@ menu preview-menu {
label: _("Adwaita Demo");
action: "app.show_adwaita_demo";
}
item {
label: _("GTK4 Demo");
action: "app.show_gtk4_demo";
}
item {
label: _("GTK4 Widget Factory");
action: "app.show_gtk4_widget_factory";
@ -158,23 +159,27 @@ menu preview-menu {
menu presets-menu {
section {
label: _("Built-In Presets");
item {
label: "Adwaita";
action: "app.load_preset";
target: "adwaita";
}
item {
label: "Adwaita Dark";
action: "app.load_preset";
target: "adwaita-dark";
}
item {
label: "Pretty Purple";
action: "app.load_preset";
target: "pretty-purple";
}
item {
label: "Manage Presets";
label: _("Manage Presets");
action: "app.manage_presets";
}
}

View file

@ -250,7 +250,7 @@ class GradienceApplication(Adw.Application):
custom_menu_section.append_item(menu_item)
else:
menu_item = Gio.MenuItem()
menu_item.set_label("No presets found")
menu_item.set_label(_("No presets found"))
custom_menu_section.append_item(menu_item)
except KeyError:

View file

@ -5,11 +5,13 @@ data/ui/app_type_dialog.blp
data/ui/builtin_preset_row.blp
data/ui/custom_css_group.blp
data/ui/explore_preset_row.blp
data/ui/no_plugin_pref.blp
data/ui/option.blp
data/ui/plugin_row.blp
data/ui/preferences.blp
data/ui/preset_row.blp
data/ui/presets_manager_window.blp
data/ui/share_window.blp
data/ui/welcome.blp
data/ui/window.blp
gradience/modules/css.py