From 4cd8943e10d291e4c72f4eba927f867108200d43 Mon Sep 17 00:00:00 2001 From: Romain Failliot Date: Tue, 8 Dec 2020 14:07:26 -0500 Subject: [PATCH] Add .desktop translations in .po files --- data/diffuse.desktop.in | 10 ++++++ data/meson.build | 10 ++++++ meson.build | 1 + po/POTFILES.in | 3 ++ src/meson.build | 15 ++++---- src/usr/share/applications/diffuse.desktop | 36 ------------------- ...io.github.mightycreak.Diffuse.metainfo.xml | 4 +-- 7 files changed, 35 insertions(+), 44 deletions(-) create mode 100644 data/diffuse.desktop.in create mode 100644 data/meson.build delete mode 100644 src/usr/share/applications/diffuse.desktop diff --git a/data/diffuse.desktop.in b/data/diffuse.desktop.in new file mode 100644 index 0000000..81a7132 --- /dev/null +++ b/data/diffuse.desktop.in @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Diffuse Merge Tool +Comment=Graphical tool for merging and comparing text files +Exec=diffuse -s %F +Icon=diffuse +Terminal=false +Type=Application +MimeType=text/plain;text/x-csrc;text/x-chdr; +Categories=Development;GTK; +StartupNotify=true diff --git a/data/meson.build b/data/meson.build new file mode 100644 index 0000000..fa85471 --- /dev/null +++ b/data/meson.build @@ -0,0 +1,10 @@ +desktop_file = 'diffuse.desktop' +i18n.merge_file( + desktop_file, + input: desktop_file + '.in', + output: desktop_file, + po_dir: '../po', + install: true, + install_dir: join_paths(datadir, 'applications'), + type: 'desktop' +) diff --git a/meson.build b/meson.build index a23de6c..3a5589e 100644 --- a/meson.build +++ b/meson.build @@ -23,6 +23,7 @@ pkgdatadir = join_paths(datadir, meson.project_name()) podir = join_paths(meson.source_root(), 'po') subdir('po') +subdir('data') subdir('src') meson.add_install_script('build-scripts/meson-postinstall.py') diff --git a/po/POTFILES.in b/po/POTFILES.in index c57c949..a35e8c6 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,2 +1,5 @@ # List of source files which contain translatable strings. +# Copyright (C) 2020 Romain Failliot + +data/diffuse.desktop.in src/usr/bin/diffuse.py.in diff --git a/src/meson.build b/src/meson.build index 72e8f97..4657bc4 100644 --- a/src/meson.build +++ b/src/meson.build @@ -26,12 +26,15 @@ configure_file( metainfo_file = join_paths(meson.source_root(), 'src/usr/share/metainfo/io.github.mightycreak.Diffuse.metainfo.xml') ascli_exe = find_program('appstreamcli', required: false) if ascli_exe.found() - test('validate metainfo file', - ascli_exe, - args: ['validate', - '--no-net', - '--pedantic', - metainfo_file] + test( + 'validate metainfo file', + ascli_exe, + args: [ + 'validate', + '--no-net', + '--pedantic', + metainfo_file + ] ) endif diff --git a/src/usr/share/applications/diffuse.desktop b/src/usr/share/applications/diffuse.desktop deleted file mode 100644 index d22ac4b..0000000 --- a/src/usr/share/applications/diffuse.desktop +++ /dev/null @@ -1,36 +0,0 @@ -[Desktop Entry] -Name=Diffuse Merge Tool -Name[cs]=Diffuse -Name[de]=Diffuse Mischwerkzeug -Name[es]=Diffuse utillaje de textos -Name[it]=Diffuse - strumento di unione -Name[ja]=Diffuse マージツール -Name[ko]=Diffuse 병합도구 -Name[pl]=Diffuse Narzędzie Scalania -Name[pt]=Diffuse Ferramenta de união -Name[ru]=Diffuse Инструмент Слияния -Name[sv]=Diffuse sammanfogningsverktyg -Name[th]=Diffuse - เครื่องมือผสานแฟ้ม -Name[zh_CN]=Diffuse 比较合并工具 -Name[zh_TW]=Diffuse 比較合併工具 -Comment=Graphical tool for merging and comparing text files -Comment[cs]=Grafický nástroj pro slučování a porovnávání textových souborů -Comment[de]=Werkzeug zum Mischen und Vergleichen von Textdateien -Comment[es]=Un utillaje para juntar y comparar archivos de texto -Comment[it]=Strumento grafico per l'unione e il confronto di file -Comment[ja]=テキストファイルをマージして比較するためのグラフィックツール -Comment[ko]=텍스트 파일을 병합하고 비교하기위한 도구 -Comment[pl]=Graficzne narzędzie do łączenia i porównywania plików tekstowych -Comment[pt]=Ferramenta gráfica para unir e comparar ficheiros de texto -Comment[ru]=Графический инструмент для слияния и сравнения текстовых файлов -Comment[sv]=Grafiskt verktyg för jämförelse och sammanfogning av textfiler -Comment[th]=เครื่องมือแบบกราฟิกสำหรับเปรียบเทียบและผสานแฟ้มข้อความ -Comment[zh_CN]=图形化的比较和合并文本文件的工具 -Comment[zh_TW]=比較與合併文字檔案的圖形化工具 -Exec=diffuse -s %F -Icon=diffuse -Terminal=false -Type=Application -MimeType=text/plain;text/x-csrc;text/x-chdr; -Categories=Development;GTK; -StartupNotify=true diff --git a/src/usr/share/metainfo/io.github.mightycreak.Diffuse.metainfo.xml b/src/usr/share/metainfo/io.github.mightycreak.Diffuse.metainfo.xml index 31d9889..86a598f 100644 --- a/src/usr/share/metainfo/io.github.mightycreak.Diffuse.metainfo.xml +++ b/src/usr/share/metainfo/io.github.mightycreak.Diffuse.metainfo.xml @@ -2,8 +2,8 @@ io.github.mightycreak.Diffuse - Diffuse - Graphical merge tool + Diffuse Merge Tool + Graphical tool for merging and comparing text files

Diffuse is a graphical tool for comparing and merging text files. It can retrieve files for comparison from Bazaar, CVS, Darcs, Git, Mercurial, Monotone, RCS, Subversion, and SVK repositories.