From eecec37ebc359e0fb30c71b26e31dbe59d77a0ed Mon Sep 17 00:00:00 2001 From: Jarred Wilson Date: Sat, 14 Sep 2024 18:42:54 +0000 Subject: [PATCH] working translation support --- data/org.vanillaos.Tour.metainfo.xml.in | 2 +- vanilla_tour/slide.py | 3 +++ vanilla_tour/vanilla-tour.in | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/data/org.vanillaos.Tour.metainfo.xml.in b/data/org.vanillaos.Tour.metainfo.xml.in index c97714d..9e60178 100644 --- a/data/org.vanillaos.Tour.metainfo.xml.in +++ b/data/org.vanillaos.Tour.metainfo.xml.in @@ -5,6 +5,6 @@ GPL-3.0-or-later

No description

-
+ org.vanillaos.Tour diff --git a/vanilla_tour/slide.py b/vanilla_tour/slide.py index 857e944..f7d91ee 100644 --- a/vanilla_tour/slide.py +++ b/vanilla_tour/slide.py @@ -19,8 +19,11 @@ from gi.repository import Adw, Gtk, GLib import webbrowser +import gettext from gettext import gettext as _ +gettext.textdomain("vanilla-tour") + @Gtk.Template(resource_path="/org/vanillaos/Tour/blp/slide.ui") class Slide(Adw.Bin): __gtype_name__ = "Slide" diff --git a/vanilla_tour/vanilla-tour.in b/vanilla_tour/vanilla-tour.in index d5c9095..aa59c91 100755 --- a/vanilla_tour/vanilla-tour.in +++ b/vanilla_tour/vanilla-tour.in @@ -31,9 +31,9 @@ localedir = '@localedir@' sys.path.insert(1, pkgdatadir) signal.signal(signal.SIGINT, signal.SIG_DFL) -locale.bindtextdomain('tour', localedir) -locale.textdomain('tour') -gettext.install('tour', localedir) +locale.bindtextdomain('vanilla-tour', localedir) +locale.textdomain('vanilla-tour') +gettext.install('vanilla-tour', localedir) if __name__ == '__main__': import gi