Commit 56c83894 authored by Cédric Bellegarde's avatar Cédric Bellegarde

Fix translations

parent a9685a91
......@@ -16,31 +16,50 @@ gnome.compile_resources(
)
)
message('Compiling schemas')
gnome.compile_schemas()
# Installing the schema file
install_data(
project_id + '.gschema.xml',
install_dir: 'share/glib-2.0/schemas'
)
message('Making a .desktop file')
# Merging the translations with the desktop file
i18n.merge_file(
output: project_id + '.desktop',
input: project_id + '.desktop.in',
po_dir: '../subprojects/po',
po_dir: join_paths(meson.source_root(), 'po'),
type: 'desktop',
install: true,
install_dir: join_paths(get_option('datadir'), 'applications')
install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'applications')
)
message('Preparing appdata')
# Validating the desktop file
desktop_file_validate = find_program('desktop-file-validate', required:false)
if desktop_file_validate.found()
test (
'Validate desktop file',
desktop_file_validate,
args: join_paths(meson.current_build_dir (), project_id + '.desktop')
)
endif
# Merging the translations with the appdata file
i18n.merge_file(
output: project_id + '.appdata.xml',
input: project_id + '.appdata.xml.in',
po_dir: '../subprojects/po',
po_dir: join_paths(meson.source_root(), 'po'),
install: true,
install_dir: join_paths(get_option('datadir'), 'appdata')
install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'metainfo')
)
# Validating the appdata file
appstreamcli = find_program(['appstreamcli', 'appstream-util'], required: false)
if appstreamcli.found()
test (
'Validate appdata file',
appstreamcli,
args: ['validate', join_paths(meson.current_build_dir (), project_id + '.appdata.xml')]
)
endif
message('Making a list of icons')
subdir('icons')
......@@ -30,10 +30,13 @@ function generate_po()
do
xgettext --from-code=UTF-8 -j $file -o lollypop.pot
done
for language in *.po
>LINGUAS
for po in *.po
do
msgmerge -N $language lollypop.pot > /tmp/$$language_new.po
mv /tmp/$$language_new.po $language
msgmerge -N $po lollypop.pot > /tmp/$$language_new.po
mv /tmp/$$language_new.po $po
language=${po%.po}
echo $language >>LINGUAS
done
}
......
Subproject commit 2380efcd55eb86a6a02bdb28c5f97747ee423df3
Subproject commit 7c277ee8c7eadbe06e2f9dfcd24a4ea5a537b584
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