From f8d61d957d4a2d086f4b97f2e3d7d19d0bb35f13 Mon Sep 17 00:00:00 2001 From: Vika Date: Sun, 1 Sep 2024 18:10:26 +0300 Subject: Mesonify build This took a while and had me scratching my head often. But I managed to combine the best parts of Crane and Meson together, allowing me to have blazing fast Nix builds. This also adds initial scaffolding for gettext and other cool things. --- po/LINGUAS | 0 po/POTFILES.in | 18 ++++++++++++++++++ po/meson.build | 1 + 3 files changed, 19 insertions(+) create mode 100644 po/LINGUAS create mode 100644 po/POTFILES.in create mode 100644 po/meson.build (limited to 'po') diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 0000000..e69de29 diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..d7868d7 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,18 @@ +data/xyz.vikanezrimaya.kittybox.Bowl.desktop.in.in + +### Below are rust files containing translatable strings. +### +### It's better to use `xtr` instead of `xgettext` for those. +### (Rust gettext!() macro is equivalent to format!() but isn't recognized as a keyword) +# src/lib.rs +# src/components/post_editor.rs +# src/components/signin.rs +# src/components/smart_summary.rs +### +### To properly use `xtr`, do: +### +### $ xtr -o /dev/stdout src/lib.rs | cat >> po/bowl.pot +### +### because xtr truncates the file descriptor it writes to. +### +### Perhaps it would be better to produce a proper workflow for regenerating this .pot file. \ No newline at end of file diff --git a/po/meson.build b/po/meson.build new file mode 100644 index 0000000..6a87565 --- /dev/null +++ b/po/meson.build @@ -0,0 +1 @@ +i18n.gettext(gettext_package, preset: 'glib') \ No newline at end of file -- cgit 1.4.1