From c33d0836ebeceddccae84aab6c24be7dfa1cbf97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Dr=C4=85g?= Date: Fri, 10 Aug 2018 00:32:57 +0200 Subject: [PATCH] app: Translate the app name --- podcasts-gtk/src/app.rs | 6 ++++-- podcasts-gtk/src/widgets/aboutdialog.rs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/podcasts-gtk/src/app.rs b/podcasts-gtk/src/app.rs index 6dec880..3e179d5 100644 --- a/podcasts-gtk/src/app.rs +++ b/podcasts-gtk/src/app.rs @@ -25,6 +25,8 @@ use std::env; use std::rc::Rc; use std::sync::Arc; +use i18n::i18n; + pub(crate) const APP_ID: &str = "org.gnome.Podcasts"; include!(concat!(env!("OUT_DIR"), "/build_globals.rs")); @@ -84,7 +86,7 @@ impl App { let (sender, receiver) = unbounded(); let window = gtk::ApplicationWindow::new(application); - window.set_title("Podcasts"); + window.set_title(&i18n("Podcasts")); let weak_s = settings.downgrade(); let weak_app = application.downgrade(); @@ -349,7 +351,7 @@ impl App { }); // Weird magic I copy-pasted that sets the Application Name in the Shell. - glib::set_application_name("Podcasts"); + glib::set_application_name(&i18n("Podcasts")); glib::set_prgname(Some("gnome-podcasts")); gtk::Window::set_default_icon_name(APP_ID); let args: Vec = env::args().collect(); diff --git a/podcasts-gtk/src/widgets/aboutdialog.rs b/podcasts-gtk/src/widgets/aboutdialog.rs index c022175..a1bda53 100644 --- a/podcasts-gtk/src/widgets/aboutdialog.rs +++ b/podcasts-gtk/src/widgets/aboutdialog.rs @@ -30,7 +30,7 @@ pub(crate) fn about_dialog(window: >k::ApplicationWindow) { // TODO: make it show it fetches the commit hash from which it was built // and the version number is kept in sync automaticly dialog.set_version("0.4.4"); - dialog.set_program_name("Podcasts"); + dialog.set_program_name(&i18n("Podcasts")); // TODO: Need a wiki page first. // dialog.set_website("https://wiki.gnome.org/Design/Apps/Potential/Podcasts"); // dialog.set_website_label("Learn more about GNOME Podcasts");