Skip to content

Commit

Permalink
working translation support
Browse files Browse the repository at this point in the history
  • Loading branch information
jardon committed Sep 14, 2024
1 parent 2761357 commit eecec37
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion data/org.vanillaos.Tour.metainfo.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<project_license>GPL-3.0-or-later</project_license>
<description>
<p>No description</p>
</description>
</description>
<translation type="gettext">org.vanillaos.Tour</translation>
</component>
3 changes: 3 additions & 0 deletions vanilla_tour/slide.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions vanilla_tour/vanilla-tour.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eecec37

Please sign in to comment.