diff --git a/data/meson.build b/data/meson.build index eff22da..22f53c1 100644 --- a/data/meson.build +++ b/data/meson.build @@ -20,10 +20,22 @@ gnome.compile_resources('piper', 'piper.gresource.xml', install: true, install_dir: pkgdatadir) -install_data('org.freedesktop.Piper.desktop', install_dir: desktopdir) install_data('org.freedesktop.Piper.svg', install_dir: icondir) -appdata = configure_file(input: 'org.freedesktop.Piper.appdata.xml.in', - output: 'org.freedesktop.Piper.appdata.xml', - configuration: conf, - install_dir: metainfodir) +i18n.merge_file(input: 'org.freedesktop.Piper.desktop.in', + output: 'org.freedesktop.Piper.desktop', + type: 'desktop', + po_dir: podir, + install: true, + install_dir: desktopdir) + +appdata = configure_file(input: 'org.freedesktop.Piper.appdata.xml.in.in', + output: 'org.freedesktop.Piper.appdata.xml.in', + configuration: conf) + +i18n.merge_file(input: appdata, + output: 'org.freedesktop.Piper.appdata.xml', + type: 'xml', + po_dir: podir, + install: true, + install_dir: metainfodir) diff --git a/data/org.freedesktop.Piper.appdata.xml.in b/data/org.freedesktop.Piper.appdata.xml.in.in similarity index 100% rename from data/org.freedesktop.Piper.appdata.xml.in rename to data/org.freedesktop.Piper.appdata.xml.in.in diff --git a/data/org.freedesktop.Piper.desktop b/data/org.freedesktop.Piper.desktop deleted file mode 100644 index b7af78a..0000000 --- a/data/org.freedesktop.Piper.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=Piper -Comment=Configurable mouse configuration utility -Exec=piper -Icon=org.freedesktop.Piper -Type=Application -StartupNotify=true -Categories=GTK;GNOME;Utility; -Keywords=gaming;configuration;mouse;mice; diff --git a/data/org.freedesktop.Piper.desktop.in b/data/org.freedesktop.Piper.desktop.in new file mode 100644 index 0000000..c96dfc1 --- /dev/null +++ b/data/org.freedesktop.Piper.desktop.in @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=Piper +Comment=Configurable mouse configuration utility +Exec=piper +# Translators: Do NOT translate or transliterate this text (this is an icon file name)! +Icon=org.freedesktop.Piper +Type=Application +StartupNotify=true +Categories=GTK;GNOME;Utility; +# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! +Keywords=gaming;configuration;mouse;mice; diff --git a/meson.build b/meson.build index 5cee5b9..7c0d2ed 100644 --- a/meson.build +++ b/meson.build @@ -45,6 +45,9 @@ datadir = join_paths(prefix, get_option('datadir')) localedir = join_paths(prefix, get_option('localedir')) pkgdatadir = join_paths(datadir, meson.project_name()) bindir = join_paths(prefix, get_option('bindir')) +podir = join_paths(meson.source_root(), 'po') + +i18n = import('i18n') subdir('data') subdir('po') diff --git a/po/POTFILES b/po/POTFILES index b1344f2..6e4f80c 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -1,3 +1,6 @@ +data/org.freedesktop.Piper.desktop.in +data/org.freedesktop.Piper.appdata.xml.in.in + piper/__init__.py piper/application.py piper/buttondialog.py diff --git a/po/meson.build b/po/meson.build index 058ff8f..e6d92db 100644 --- a/po/meson.build +++ b/po/meson.build @@ -1,3 +1 @@ -i18n = import('i18n') - i18n.gettext('piper', preset: 'glib')