]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
examples: Don't fail build if rxgettext is not installed.
authorBruno Haible <bruno@clisp.org>
Mon, 23 Dec 2024 20:37:36 +0000 (21:37 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 23 Dec 2024 20:38:14 +0000 (21:38 +0100)
* gettext-tools/examples/po/xsmallpot.sh: Ignore a 'make' failure in the
hello-ruby example.
* gettext-tools/examples/po/hello-ruby.pot: New generated file.

gettext-tools/examples/po/hello-ruby.pot [new file with mode: 0644]
gettext-tools/examples/po/xsmallpot.sh

diff --git a/gettext-tools/examples/po/hello-ruby.pot b/gettext-tools/examples/po/hello-ruby.pot
new file mode 100644 (file)
index 0000000..da5f8dc
--- /dev/null
@@ -0,0 +1,27 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Yoyodyne, Inc.
+# This file is distributed under the same license as the hello-ruby package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: hello-ruby 0\n"
+"Report-Msgid-Bugs-To: bug-gettext@gnu.org\n"
+"POT-Creation-Date: 2024-12-19 22:56+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: hello-ruby/hello.rb:7
+msgid "Hello, world!"
+msgstr ""
+
+#: hello-ruby/hello.rb:8
+#, ruby-format
+msgid "This program is running as process number %{pid}."
+msgstr ""
index 3af9ed7f7c67c209ae67aa5105279e09670fbe22..ed5e642b445fbd84feb8c4d7df9ca78849436c59 100755 (executable)
@@ -73,10 +73,22 @@ EOF
     ;;
 esac
 cd po
-make $potfile
-sed -e "/^#:/ {
+if make $potfile; then
+  sed -e "/^#:/ {
 s, \\([^ ]\\), $directory/\\1,g
 }" < $potfile > "$abs_srcdir"/$potfile
+else
+  case $directory in
+    hello-ruby)
+      # Creating hello-ruby.pot fails if 'rxgettext' is not installed.
+      # To work around it, we are putting hello-ruby.pot under version control.
+      ;;
+    *)
+      echo "Failed to create $potfile." 1>&2
+      exit 1
+      ;;
+  esac
+fi
 cd ..
 cd ..
 rm -rf tmp-$directory