aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--po/LC_MESSAGES/src/locale/en.sh/eo.po40
-rw-r--r--po/LC_MESSAGES/src/locale/en.sh/fr.po40
-rw-r--r--po/LC_MESSAGES/src/locale/en.sh/pt.po40
-rwxr-xr-xpo/extract-strings.sh17
-rwxr-xr-xsrc/git-permalink.in2
-rw-r--r--src/locale/en.sh5
-rw-r--r--src/locale/eo.sh8
-rw-r--r--src/locale/fr.sh8
-rw-r--r--src/locale/pt.sh8
10 files changed, 102 insertions, 68 deletions
diff --git a/Makefile b/Makefile
index 7673662..7e91279 100644
--- a/Makefile
+++ b/Makefile
@@ -40,7 +40,7 @@ all: src/git-permalink src/load-locale-messages.sh src/locale/en.sh $(manpages)
src/locale/en.sh: src/git-permalink.in
- awk '/^# End translatable strings$$/ { exit } { print $$0 }' $? > $@
+ sh po/extract-strings.sh < $? > $@
check: all
diff --git a/po/LC_MESSAGES/src/locale/en.sh/eo.po b/po/LC_MESSAGES/src/locale/en.sh/eo.po
index 62bea31..f20816f 100644
--- a/po/LC_MESSAGES/src/locale/en.sh/eo.po
+++ b/po/LC_MESSAGES/src/locale/en.sh/eo.po
@@ -6,8 +6,8 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
-"POT-Creation-Date: 2021-10-02 22:35-0300\n"
-"PO-Revision-Date: 2021-10-02 22:32-0300\n"
+"POT-Creation-Date: 2021-10-03 12:20-0300\n"
+"PO-Revision-Date: 2021-10-03 12:21-0300\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: eo\n"
@@ -17,12 +17,15 @@ msgstr ""
"X-Generator: Poedit 3.0\n"
#. type: Plain text
-#: src/locale/en.sh:3
-msgid "#!/bin/sh set -eu"
-msgstr "#!/bin/sh set -eu"
+#: src/locale/en.sh:4
+msgid "#!/bin/sh # shellcheck disable=2034 set -eu"
+msgstr ""
+"#!/bin/sh\n"
+"# shellcheck disable=2034\n"
+"set -eu"
#. type: Plain text
-#: src/locale/en.sh:8
+#: src/locale/en.sh:9
#, no-wrap
msgid ""
"MSG_USAGE=\"$(cat <<-'EOF'\n"
@@ -36,7 +39,7 @@ msgstr ""
")\"\n"
#. type: Plain text
-#: src/locale/en.sh:14
+#: src/locale/en.sh:15
#, no-wrap
msgid ""
"MSG_HELP=\"$(cat <<-'EOF'\n"
@@ -52,7 +55,7 @@ msgstr ""
"\t -V, --version presas la versian numeron\n"
#. type: Plain text
-#: src/locale/en.sh:18
+#: src/locale/en.sh:19
#, no-wrap
msgid ""
"\tSee \"man git-permalink\" for more information.\n"
@@ -64,21 +67,21 @@ msgstr ""
")\"\n"
#. type: Plain text
-#: src/locale/en.sh:23
+#: src/locale/en.sh:24
#, no-wrap
msgid ""
-"MSG_MISSING_FILE=\"$(echo <<-'EOF'\n"
+"MSG_MISSING_FILE=\"$(cat <<-'EOF'\n"
"\tMissing FILE argument.\n"
"EOF\n"
")\"\n"
msgstr ""
-"MSG_MISSING_FILE=\"$(echo <<-'EOF'\n"
+"MSG_MISSING_FILE=\"$(cat <<-'EOF'\n"
"\tLa argumento DOSIERO mankas.\n"
"EOF\n"
")\"\n"
#. type: Plain text
-#: src/locale/en.sh:26
+#: src/locale/en.sh:27
#, no-wrap
msgid ""
"MSG_UNSUPPORTED_ORIGIN=\"$(cat <<-'EOF'\n"
@@ -88,7 +91,7 @@ msgstr ""
"\tOrigo ne estas subtenata: %s.\n"
#. type: Plain text
-#: src/locale/en.sh:31
+#: src/locale/en.sh:32
#, no-wrap
msgid ""
"\tAdd a template override to use git-permalink (see\n"
@@ -115,7 +118,10 @@ msgstr ""
"EOF\n"
")\"\n"
-#. type: Plain text
-#: src/locale/en.sh:37
-msgid "#"
-msgstr "#"
+#~ msgid "#!/bin/sh set -eu"
+#~ msgstr ""
+#~ "#!/bin/sh\n"
+#~ "set -eu"
+
+#~ msgid "#"
+#~ msgstr "#"
diff --git a/po/LC_MESSAGES/src/locale/en.sh/fr.po b/po/LC_MESSAGES/src/locale/en.sh/fr.po
index a759494..97b52eb 100644
--- a/po/LC_MESSAGES/src/locale/en.sh/fr.po
+++ b/po/LC_MESSAGES/src/locale/en.sh/fr.po
@@ -6,8 +6,8 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
-"POT-Creation-Date: 2021-10-02 22:35-0300\n"
-"PO-Revision-Date: 2021-10-02 22:35-0300\n"
+"POT-Creation-Date: 2021-10-03 12:20-0300\n"
+"PO-Revision-Date: 2021-10-03 12:20-0300\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
@@ -17,12 +17,15 @@ msgstr ""
"X-Generator: Poedit 3.0\n"
#. type: Plain text
-#: src/locale/en.sh:3
-msgid "#!/bin/sh set -eu"
-msgstr "#!/bin/sh set -eu"
+#: src/locale/en.sh:4
+msgid "#!/bin/sh # shellcheck disable=2034 set -eu"
+msgstr ""
+"#!/bin/sh\n"
+"# shellcheck disable=2034\n"
+"set -eu"
#. type: Plain text
-#: src/locale/en.sh:8
+#: src/locale/en.sh:9
#, no-wrap
msgid ""
"MSG_USAGE=\"$(cat <<-'EOF'\n"
@@ -36,7 +39,7 @@ msgstr ""
")\"\n"
#. type: Plain text
-#: src/locale/en.sh:14
+#: src/locale/en.sh:15
#, no-wrap
msgid ""
"MSG_HELP=\"$(cat <<-'EOF'\n"
@@ -52,7 +55,7 @@ msgstr ""
"\t -V, --version imprime le numeró de version\n"
#. type: Plain text
-#: src/locale/en.sh:18
+#: src/locale/en.sh:19
#, no-wrap
msgid ""
"\tSee \"man git-permalink\" for more information.\n"
@@ -64,21 +67,21 @@ msgstr ""
")\"\n"
#. type: Plain text
-#: src/locale/en.sh:23
+#: src/locale/en.sh:24
#, no-wrap
msgid ""
-"MSG_MISSING_FILE=\"$(echo <<-'EOF'\n"
+"MSG_MISSING_FILE=\"$(cat <<-'EOF'\n"
"\tMissing FILE argument.\n"
"EOF\n"
")\"\n"
msgstr ""
-"MSG_MISSING_FILE=\"$(echo <<-'EOF'\n"
+"MSG_MISSING_FILE=\"$(cat <<-'EOF'\n"
"\tL'argument FICHIER manque.\n"
"EOF\n"
")\"\n"
#. type: Plain text
-#: src/locale/en.sh:26
+#: src/locale/en.sh:27
#, no-wrap
msgid ""
"MSG_UNSUPPORTED_ORIGIN=\"$(cat <<-'EOF'\n"
@@ -88,7 +91,7 @@ msgstr ""
"\tOrigine n'est pas supporté: %s.\n"
#. type: Plain text
-#: src/locale/en.sh:31
+#: src/locale/en.sh:32
#, no-wrap
msgid ""
"\tAdd a template override to use git-permalink (see\n"
@@ -115,7 +118,10 @@ msgstr ""
"EOF\n"
")\"\n"
-#. type: Plain text
-#: src/locale/en.sh:37
-msgid "#"
-msgstr "#"
+#~ msgid "#!/bin/sh set -eu"
+#~ msgstr ""
+#~ "#!/bin/sh\n"
+#~ "set -eu"
+
+#~ msgid "#"
+#~ msgstr "#"
diff --git a/po/LC_MESSAGES/src/locale/en.sh/pt.po b/po/LC_MESSAGES/src/locale/en.sh/pt.po
index 8c792bb..b5d4d84 100644
--- a/po/LC_MESSAGES/src/locale/en.sh/pt.po
+++ b/po/LC_MESSAGES/src/locale/en.sh/pt.po
@@ -6,8 +6,8 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
-"POT-Creation-Date: 2021-10-02 22:29-0300\n"
-"PO-Revision-Date: 2021-10-02 22:49-0300\n"
+"POT-Creation-Date: 2021-10-03 12:20-0300\n"
+"PO-Revision-Date: 2021-10-03 12:20-0300\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: pt\n"
@@ -17,12 +17,15 @@ msgstr ""
"X-Generator: Poedit 3.0\n"
#. type: Plain text
-#: src/locale/en.sh:3
-msgid "#!/bin/sh set -eu"
-msgstr "#!/bin/sh set -eu"
+#: src/locale/en.sh:4
+msgid "#!/bin/sh # shellcheck disable=2034 set -eu"
+msgstr ""
+"#!/bin/sh\n"
+"# shellcheck disable=2034\n"
+"set -eu"
#. type: Plain text
-#: src/locale/en.sh:8
+#: src/locale/en.sh:9
#, no-wrap
msgid ""
"MSG_USAGE=\"$(cat <<-'EOF'\n"
@@ -36,7 +39,7 @@ msgstr ""
")\"\n"
#. type: Plain text
-#: src/locale/en.sh:14
+#: src/locale/en.sh:15
#, no-wrap
msgid ""
"MSG_HELP=\"$(cat <<-'EOF'\n"
@@ -52,7 +55,7 @@ msgstr ""
"\t -V, --version imprime o número da versão\n"
#. type: Plain text
-#: src/locale/en.sh:18
+#: src/locale/en.sh:19
#, no-wrap
msgid ""
"\tSee \"man git-permalink\" for more information.\n"
@@ -64,21 +67,21 @@ msgstr ""
")\"\n"
#. type: Plain text
-#: src/locale/en.sh:23
+#: src/locale/en.sh:24
#, no-wrap
msgid ""
-"MSG_MISSING_FILE=\"$(echo <<-'EOF'\n"
+"MSG_MISSING_FILE=\"$(cat <<-'EOF'\n"
"\tMissing FILE argument.\n"
"EOF\n"
")\"\n"
msgstr ""
-"MSG_MISSING_FILE=\"$(echo <<-'EOF'\n"
+"MSG_MISSING_FILE=\"$(cat <<-'EOF'\n"
"\tFaltando argumento ARQUIVO.\n"
"EOF\n"
")\"\n"
#. type: Plain text
-#: src/locale/en.sh:26
+#: src/locale/en.sh:27
#, no-wrap
msgid ""
"MSG_UNSUPPORTED_ORIGIN=\"$(cat <<-'EOF'\n"
@@ -88,7 +91,7 @@ msgstr ""
"\tOrigem sem suporte: %s.\n"
#. type: Plain text
-#: src/locale/en.sh:31
+#: src/locale/en.sh:32
#, no-wrap
msgid ""
"\tAdd a template override to use git-permalink (see\n"
@@ -115,7 +118,10 @@ msgstr ""
"EOF\n"
")\"\n"
-#. type: Plain text
-#: src/locale/en.sh:37
-msgid "#"
-msgstr "#"
+#~ msgid "#!/bin/sh set -eu"
+#~ msgstr ""
+#~ "#!/bin/sh\n"
+#~ "set -eu"
+
+#~ msgid "#"
+#~ msgstr "#"
diff --git a/po/extract-strings.sh b/po/extract-strings.sh
new file mode 100755
index 0000000..097cdda
--- /dev/null
+++ b/po/extract-strings.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+set -eu
+
+awk '
+/^# End translatable strings$/ { exit }
+
+{ lines[i++] = $0 }
+
+END {
+ for (l = 0; l < i - 2; l++) {
+ if (l == 1) {
+ print "# shellcheck disable=2034"
+ }
+ print lines[l]
+ }
+}
+'
diff --git a/src/git-permalink.in b/src/git-permalink.in
index 205db07..17b7514 100755
--- a/src/git-permalink.in
+++ b/src/git-permalink.in
@@ -16,7 +16,7 @@ MSG_HELP="$(cat <<-'EOF'
EOF
)"
-MSG_MISSING_FILE="$(echo <<-'EOF'
+MSG_MISSING_FILE="$(cat <<-'EOF'
Missing FILE argument.
EOF
)"
diff --git a/src/locale/en.sh b/src/locale/en.sh
index 998bdfe..64dbe48 100644
--- a/src/locale/en.sh
+++ b/src/locale/en.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+# shellcheck disable=2034
set -eu
MSG_USAGE="$(cat <<-'EOF'
@@ -16,7 +17,7 @@ MSG_HELP="$(cat <<-'EOF'
EOF
)"
-MSG_MISSING_FILE="$(echo <<-'EOF'
+MSG_MISSING_FILE="$(cat <<-'EOF'
Missing FILE argument.
EOF
)"
@@ -33,5 +34,3 @@ MSG_OPEN="$(cat <<-'EOF'
Opening %s
EOF
)"
-
-#
diff --git a/src/locale/eo.sh b/src/locale/eo.sh
index f4b92c2..e6c7ca1 100644
--- a/src/locale/eo.sh
+++ b/src/locale/eo.sh
@@ -1,4 +1,6 @@
-#!/bin/sh set -eu
+#!/bin/sh
+# shellcheck disable=2034
+set -eu
MSG_USAGE="$(cat <<-'EOF'
Uzmaniero: git permalink [-phV] DOSIERO [LINIONO]
@@ -15,7 +17,7 @@ MSG_HELP="$(cat <<-'EOF'
EOF
)"
-MSG_MISSING_FILE="$(echo <<-'EOF'
+MSG_MISSING_FILE="$(cat <<-'EOF'
La argumento DOSIERO mankas.
EOF
)"
@@ -32,5 +34,3 @@ MSG_OPEN="$(cat <<-'EOF'
Malfermado de %s
EOF
)"
-
-#
diff --git a/src/locale/fr.sh b/src/locale/fr.sh
index 6cd91bd..11bb792 100644
--- a/src/locale/fr.sh
+++ b/src/locale/fr.sh
@@ -1,4 +1,6 @@
-#!/bin/sh set -eu
+#!/bin/sh
+# shellcheck disable=2034
+set -eu
MSG_USAGE="$(cat <<-'EOF'
Usage: git permalink [-phV] FICHIER [LINENO]
@@ -15,7 +17,7 @@ MSG_HELP="$(cat <<-'EOF'
EOF
)"
-MSG_MISSING_FILE="$(echo <<-'EOF'
+MSG_MISSING_FILE="$(cat <<-'EOF'
L'argument FICHIER manque.
EOF
)"
@@ -32,5 +34,3 @@ MSG_OPEN="$(cat <<-'EOF'
Ouverture de %s
EOF
)"
-
-#
diff --git a/src/locale/pt.sh b/src/locale/pt.sh
index 6d6ed04..df89a55 100644
--- a/src/locale/pt.sh
+++ b/src/locale/pt.sh
@@ -1,4 +1,6 @@
-#!/bin/sh set -eu
+#!/bin/sh
+# shellcheck disable=2034
+set -eu
MSG_USAGE="$(cat <<-'EOF'
Uso: git permalink [-phV] ARQUIVO [NOLINHA]
@@ -15,7 +17,7 @@ MSG_HELP="$(cat <<-'EOF'
EOF
)"
-MSG_MISSING_FILE="$(echo <<-'EOF'
+MSG_MISSING_FILE="$(cat <<-'EOF'
Faltando argumento ARQUIVO.
EOF
)"
@@ -32,5 +34,3 @@ MSG_OPEN="$(cat <<-'EOF'
Abrindo %s
EOF
)"
-
-#