Commit e89b0947 authored by GabMus's avatar GabMus

working on desktop file translation

parent acc0dd6c
......@@ -13,16 +13,27 @@ app_id_aspath = '/'.join([
desktop_conf = configuration_data()
desktop_conf.set('bindir', join_paths(prefix, bindir))
desktop_conf.set('prettyname', prettyname)
desktop_conf.set('description', description)
# .desktop comment now hardcoded for better i18n support
#desktop_conf.set('description', description)
desktop_conf.set('appid', app_id)
desktop_conf.set('projectname', meson.project_name())
desktop_file = configure_file(
input: app_id + '.desktop.in',
output: app_id + '.desktop.i18n.in',
#install: true,
#install_dir: join_paths(datadir, 'applications'),
configuration: desktop_conf
)
i18n.merge_file(
app_id + '.desktop',
input: app_id + '.desktop.i18n.in',
output: app_id + '.desktop',
po_dir: '../po',
install: true,
install_dir: join_paths(datadir, 'applications'),
configuration: desktop_conf
type: 'desktop'
)
message('Looking for dependencies')
......
[Desktop Entry]
Name=@prettyname@
Comment=@description@
Comment=Wallpaper manager with multimonitor support
Exec=@bindir@/@projectname@ %U
Icon=@appid@
Terminal=false
Type=Application
StartupNotify=true
MimeType=
#MimeType=
Categories=Utility;GTK;GNOME;
Keywords=wallpaper;background;monitor;
Actions=set-random-wallpapers
......
......@@ -4,7 +4,7 @@ project('hydrapaper',
license: 'GPL3'
)
description = 'Wallpaper manager with multimonitor support for GNOME'
description = 'Wallpaper manager with multimonitor support'
prettyname = 'HydraPaper'
prettylicense = 'GPL-3.0+'
......@@ -22,7 +22,7 @@ contributors = '\n'.join([
'Alex Hunt (huntie) <hello@alexhunt.io>'
])
# i18n = import('i18n')
i18n = import('i18n')
python = import('python3')
gnome = import('gnome')
prefix = get_option('prefix') # should be /usr
......
data/org.gabmus.hydrapaper.desktop.in
data/ui/choose_folder_dialog.glade
data/ui/headerbar.glade
data/ui/menu.xml
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-07-14 12:54+0200\n"
"POT-Creation-Date: 2019-07-15 09:42+0200\n"
"PO-Revision-Date: 2019-07-13 13:17+0200\n"
"Last-Translator: Gabriele Musco <emaildigabry@gmail.com>\n"
"Language-Team: Italian\n"
......@@ -147,3 +147,19 @@ msgstr "Aggiungi"
#: ../data/ui/wallpapers_folders_view.glade:73
msgid "Remove"
msgstr "Rimuovi"
#: ../data/org.gabmus.hydrapaper.desktop.in:3
msgid "@prettyname@"
msgstr ""
#: ../data/org.gabmus.hydrapaper.desktop.in:4
msgid "Wallpaper manager with multimonitor support"
msgstr "Gestore di sfondi con supporto per multi monitor"
#: ../data/org.gabmus.hydrapaper.desktop.in:6
msgid "@appid@"
msgstr ""
#: ../data/org.gabmus.hydrapaper.desktop.in:12
msgid "wallpaper;background;monitor;"
msgstr "sfondi;monitor;"
i18n = import('i18n')
message('Update translations')
i18n.gettext(meson.project_name(),
preset: 'glib'
......
......@@ -3,7 +3,8 @@
rm *.pot
find ../hydrapaper -iname "*.py" | xargs xgettext --from-code=UTF-8 --output=hydrapaper-python.pot
find ../data/ui -iname "*.glade" -or -iname "*.xml" | xargs xgettext --from-code=UTF-8 --output=hydrapaper-glade.pot -L Glade
msgcat --use-first hydrapaper-python.pot hydrapaper-glade.pot > hydrapaper.pot
find ../data/ -iname "*.desktop.in" | xargs xgettext --from-code=UTF-8 --output=hydrapaper-desktop.pot -L Desktop
msgcat --use-first hydrapaper-python.pot hydrapaper-glade.pot hydrapaper-desktop.pot > hydrapaper.pot
version=$(fgrep "version: " ../meson.build | grep -v "meson" | grep -o "'.*'" | sed "s/'//g")
echo $version
sed 's/#: //g;s/:[0-9]*//g;s/\.\.\///g' <(fgrep "#: " hydrapaper.pot) | sort | uniq > POTFILES.in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment