diff --git a/data/net.daase.journable.appdata.xml.in b/data/net.daase.journable.appdata.xml.in index 95673cada656907d74fe746261291e8869976733..3f2b340d2f0caea1322a12929c8f2b5dfae7fe55 100644 --- a/data/net.daase.journable.appdata.xml.in +++ b/data/net.daase.journable.appdata.xml.in @@ -4,7 +4,7 @@ Journable CC0-1.0 GPL-3.0-or-later - Björn Daase + Björn Daase A simple bullet journal CC0-1.0 GPL-3.0+ diff --git a/po/POTFILES b/po/POTFILES index e55c9ca0710d2093e3d249dd7ca8cf34d9a2d3f1..03d8e60bab966fda513112e9a9cd597453eea583 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -1,7 +1,6 @@ data/net.daase.journable.desktop.in data/net.daase.journable.appdata.xml.in data/net.daase.journable.gschema.xml -src/window.ui +src/ui/window.ui src/main.py src/window.py - diff --git a/src/journable.in b/src/journable.in index 1a68aa3dd062bcd7c7b1f1e675c645ad778c2f6e..067bb4916b39ae7414576483050cf28840a3023d 100755 --- a/src/journable.in +++ b/src/journable.in @@ -21,6 +21,7 @@ import os import sys import signal import gettext +import locale VERSION = '@VERSION@' pkgdatadir = '@pkgdatadir@' @@ -29,6 +30,8 @@ localedir = '@localedir@' sys.path.insert(1, pkgdatadir) signal.signal(signal.SIGINT, signal.SIG_DFL) gettext.install('journable', localedir) +locale.bindtextdomain('journable', localedir) +locale.textdomain('journable') if __name__ == '__main__': import gi diff --git a/src/window.py b/src/window.py index 2b28ce07798af9579046b39af114174ce3d3b5bd..36eaae0fe3798452a5e1075e53dae8348266c072 100644 --- a/src/window.py +++ b/src/window.py @@ -67,7 +67,7 @@ class JournableWindow(Gtk.ApplicationWindow): self.is_unsaved_file = True self.has_unsaved_changes = False self.current_journal_path = None - self.current_journal_basename = 'Untitled' + self.current_journal_basename = _('Untitled') self.update_header_bar_information() def update_file_information(self, journal_file_path): @@ -93,12 +93,12 @@ class JournableWindow(Gtk.ApplicationWindow): def add_filters(self, file_chooser): filter_json = Gtk.FileFilter() - filter_json.set_name('JSON files') + filter_json.set_name(_('JSON files')) filter_json.add_mime_type('application/json') file_chooser.add_filter(filter_json) filter_all = Gtk.FileFilter() - filter_all.set_name('All files') + filter_all.set_name(_('All files')) filter_all.add_pattern('*') file_chooser.add_filter(filter_all) @@ -203,10 +203,10 @@ class JournableWindow(Gtk.ApplicationWindow): if not self.has_unsaved_changes: file_chooser = Gtk.FileChooserNative.new( - 'Choose a file', + _('Choose a file'), self, Gtk.FileChooserAction.OPEN, - '_Open', + _('_Open'), '_Cancel' ) self.add_filters(file_chooser) @@ -225,7 +225,7 @@ class JournableWindow(Gtk.ApplicationWindow): 'Save as', self, Gtk.FileChooserAction.SAVE, - '_Save', + _('_Save'), '_cancel' ) self.add_filters(file_chooser)