From 8c35b1d642285b77cf1b382f47b13f83c4e8938c Mon Sep 17 00:00:00 2001 From: Oneric Date: Sat, 22 Apr 2023 04:03:41 +0200 Subject: [PATCH] Integrate appdata.xml into meson build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It used to be genrated and installed by the old custom build system, but apparently got lost in switching to meson. Rename to .in.in instead of .template.in, since i18n otherwise gets utterly confused failing to recognise the file type and both erroring out with "no ITS rules found" during merge_file and failing to extract any translatable strings. Also drop underscores which were previously processed by intltool. This doesn't yet automatically replace the release version and date in the appdata file, but neither did the old build. Note: while this slightly improves the situation, meson’s aegisub-pot target is still missing many strings. make_pot.sh should be used. --- packages/desktop/aegisub.appdata.xml.in.in | 61 +++++++++++++++++++ .../desktop/aegisub.appdata.xml.template.in | 58 ------------------ packages/meson.build | 10 +++ po/POTFILES | 1 + po/make_pot.sh | 2 +- 5 files changed, 73 insertions(+), 59 deletions(-) create mode 100644 packages/desktop/aegisub.appdata.xml.in.in delete mode 100644 packages/desktop/aegisub.appdata.xml.template.in diff --git a/packages/desktop/aegisub.appdata.xml.in.in b/packages/desktop/aegisub.appdata.xml.in.in new file mode 100644 index 000000000..b802bcfbb --- /dev/null +++ b/packages/desktop/aegisub.appdata.xml.in.in @@ -0,0 +1,61 @@ + + + aegisub.desktop + CC0-1.0 + BSD-3-Clause AND MIT AND MPL-1.1 + Aegisub + A free, cross-platform open source tool for creating and modifying subtitles + +

Aegisub is a free, cross-platform open source tool for creating and modifying subtitles. Aegisub makes it quick and easy to time subtitles to audio, and features many powerful tools for styling them, including a built-in real-time video preview.

+

Aegisub was originally created as a tool to make typesetting, particularly in anime fansubs, a less painful experience. At the time of the start of the project, many other programs that supported the Advanced Substation Alpha format lacked (and in many cases, still lack; development on several competing programs have since been dropped for various reasons completely unrelated to Aegisub) many vital functions, or were too buggy and/or unreliable to be really useful.

+

Since then, Aegisub has grown into a fully fledged, highly customizable subtitle editor. It features a lot of convenient tools to help you with timing, typesetting, editing and translating subtitles, as well as a powerful scripting environment called Automation (originally mostly intended for creating karaoke effects, Automation can now be used much else, including creating macros and various other convenient tools).

+

Some highlights of Aegisub:

+
    +
  • Simple and intuitive yet powerful interface for editing subtitles
  • +
  • Support for many formats and character sets
  • +
  • Powerful video mode
  • +
  • Visual typesetting tools
  • +
  • Intuitive and customizable audio timing mode
  • +
  • Fully scriptable through the Automation module
  • +
+
+ + aegisub.desktop + + HiDpiIcon + HighContrast + UserDocs + + + + Typesetting + https://aegisub.org/img/screenshots/unix/typesetting.png + + + Audio video + https://aegisub.org/img/screenshots/unix/audio-video.png + + + Audio timing + https://aegisub.org/img/screenshots/unix/audio-timing.png + + + Aegisub Group + https://github.com/Aegisub/Aegisub/issues + https://aegisub.org/docs/latest/faq + https://aegisub.org/docs/latest + https://aegisub.org + https://github.com/Aegisub/Aegisub + + mild + + aegisub + + aegisub + + + + + +
diff --git a/packages/desktop/aegisub.appdata.xml.template.in b/packages/desktop/aegisub.appdata.xml.template.in deleted file mode 100644 index d67a7b1eb..000000000 --- a/packages/desktop/aegisub.appdata.xml.template.in +++ /dev/null @@ -1,58 +0,0 @@ - - - aegisub.desktop - CC0-1.0 - BSD-3-Clause AND MIT AND MPL-1.1 - <_name>Aegisub - <_summary>A free, cross-platform open source tool for creating and modifying subtitles - - <_p>Aegisub is a free, cross-platform open source tool for creating and modifying subtitles. Aegisub makes it quick and easy to time subtitles to audio, and features many powerful tools for styling them, including a built-in real-time video preview. - <_p>Aegisub was originally created as a tool to make typesetting, particularly in anime fansubs, a less painful experience. At the time of the start of the project, many other programs that supported the Advanced Substation Alpha format lacked (and in many cases, still lack; development on several competing programs have since been dropped for various reasons completely unrelated to Aegisub) many vital functions, or were too buggy and/or unreliable to be really useful. - <_p>Since then, Aegisub has grown into a fully fledged, highly customizable subtitle editor. It features a lot of convenient tools to help you with timing, typesetting, editing and translating subtitles, as well as a powerful scripting environment called Automation (originally mostly intended for creating karaoke effects, Automation can now be used much else, including creating macros and various other convenient tools). - <_p>Some highlights of Aegisub: -
    - <_li>Simple and intuitive yet powerful interface for editing subtitles - <_li>Support for many formats and character sets - <_li>Powerful video mode - <_li>Visual typesetting tools - <_li>Intuitive and customizable audio timing mode - <_li>Fully scriptable through the Automation module -
-
- aegisub.desktop - - HiDpiIcon - HighContrast - UserDocs - - - - <_caption>Typesetting - https://aegisub.org/img/screenshots/unix/typesetting.png - - - <_caption>Audio video - https://aegisub.org/img/screenshots/unix/audio-video.png - - - <_caption>Audio timing - https://aegisub.org/img/screenshots/unix/audio-timing.png - - - Aegisub Group - https://github.com/Aegisub/Aegisub/issues - https://aegisub.org/docs/latest/faq - https://aegisub.org/docs/latest - https://aegisub.org - https://github.com/Aegisub/Aegisub - - mild - - aegisub - - aegisub - - - - -
diff --git a/packages/meson.build b/packages/meson.build index 82976fbb2..98d22d483 100644 --- a/packages/meson.build +++ b/packages/meson.build @@ -30,6 +30,16 @@ else install: true, install_dir: datadir / 'applications') + appdata_template = configure_file(input: 'desktop/aegisub.appdata.xml.in.in', + output: 'aegisub.desktop.appdata.xml.in', + configuration: conf_pkg) + i18n.merge_file(input: appdata_template, + output: 'aegisub.appdata.xml', + type: 'xml', + po_dir: '../po', + install: true, + install_dir: datadir / 'metainfo') + aegisub_logos = ['16x16.png', '22x22.png', '24x24.png', '32x32.png', '48x48.png', '64x64.png', 'scalable.svg'] foreach s: aegisub_logos diff --git a/po/POTFILES b/po/POTFILES index 10f071b25..4efc8bb03 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -1,4 +1,5 @@ packages/desktop/aegisub.desktop.in.in +packages/desktop/aegisub.appdata.xml.in.in src/ass_style.cpp src/audio_box.cpp diff --git a/po/make_pot.sh b/po/make_pot.sh index dd4f01cfb..e91fb98d1 100755 --- a/po/make_pot.sh +++ b/po/make_pot.sh @@ -48,7 +48,7 @@ done if which xmlstarlet >/dev/null 2>&1 && which jq >/dev/null 2>&1; then for i in 'name' 'summary' 'p' 'li' 'caption'; do - xmlstarlet sel -t -v "//_$i" ../packages/desktop/aegisub.appdata.xml.template.in | jq -R . + xmlstarlet sel -t -v "//$i" ../packages/desktop/aegisub.appdata.xml.in.in | jq -R . done | nl -v0 -w1 -s'|' | sed -re 's/^/aegisub.appdata.xml|/' | maybe_append fi