aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-01-15 20:47:18 -0300
committerEuAndreh <eu@euandre.org>2022-01-15 20:55:51 -0300
commit31a7db5bf25c411c61ded0e9de8bc65e9cd2611e (patch)
treefd7c5e94449592ce72ca0870eb104387fb21c9f9
parentMakefile: Remove makefile.svg (diff)
downloadgit-permalink-31a7db5bf25c411c61ded0e9de8bc65e9cd2611e.tar.gz
git-permalink-31a7db5bf25c411c61ded0e9de8bc65e9cd2611e.tar.xz
Translate and ship strings in src/locale/*.txt
-rw-r--r--.gitignore2
-rw-r--r--Makefile37
-rwxr-xr-xaux/workflow/l10n.sh2
-rw-r--r--po/LC_MESSAGES/src/locale/HELP.en.txt/eo.po32
-rw-r--r--po/LC_MESSAGES/src/locale/HELP.en.txt/fr.po32
-rw-r--r--po/LC_MESSAGES/src/locale/HELP.en.txt/pt.po32
-rw-r--r--po/LC_MESSAGES/src/locale/MISSING_FILE.en.txt/eo.po22
-rw-r--r--po/LC_MESSAGES/src/locale/MISSING_FILE.en.txt/fr.po22
-rw-r--r--po/LC_MESSAGES/src/locale/MISSING_FILE.en.txt/pt.po22
-rw-r--r--po/LC_MESSAGES/src/locale/OPEN.en.txt/eo.po22
-rw-r--r--po/LC_MESSAGES/src/locale/OPEN.en.txt/fr.po22
-rw-r--r--po/LC_MESSAGES/src/locale/OPEN.en.txt/pt.po22
-rw-r--r--po/LC_MESSAGES/src/locale/UNSUPPORTED_ORIGIN.en.txt/eo.po29
-rw-r--r--po/LC_MESSAGES/src/locale/UNSUPPORTED_ORIGIN.en.txt/fr.po29
-rw-r--r--po/LC_MESSAGES/src/locale/UNSUPPORTED_ORIGIN.en.txt/pt.po29
-rw-r--r--po/LC_MESSAGES/src/locale/USAGE.en.txt/eo.po22
-rw-r--r--po/LC_MESSAGES/src/locale/USAGE.en.txt/fr.po22
-rw-r--r--po/LC_MESSAGES/src/locale/USAGE.en.txt/pt.po22
-rw-r--r--po/LC_MESSAGES/src/locale/en.sh/eo.po127
-rw-r--r--po/LC_MESSAGES/src/locale/en.sh/fr.po127
-rw-r--r--po/LC_MESSAGES/src/locale/en.sh/pt.po127
-rwxr-xr-xpo/extract-strings.sh17
-rwxr-xr-xsrc/git-permalink.in42
-rw-r--r--src/locale/HELP.en.txt6
-rw-r--r--src/locale/HELP.eo.txt6
-rw-r--r--src/locale/HELP.fr.txt6
-rw-r--r--src/locale/HELP.pt.txt6
-rw-r--r--src/locale/MISSING_FILE.en.txt1
-rw-r--r--src/locale/MISSING_FILE.eo.txt1
-rw-r--r--src/locale/MISSING_FILE.fr.txt1
-rw-r--r--src/locale/MISSING_FILE.pt.txt1
-rw-r--r--src/locale/OPEN.en.txt1
-rw-r--r--src/locale/OPEN.eo.txt1
-rw-r--r--src/locale/OPEN.fr.txt1
-rw-r--r--src/locale/OPEN.pt.txt1
-rw-r--r--src/locale/UNSUPPORTED_ORIGIN.en.txt4
-rw-r--r--src/locale/UNSUPPORTED_ORIGIN.eo.txt4
-rw-r--r--src/locale/UNSUPPORTED_ORIGIN.fr.txt4
-rw-r--r--src/locale/UNSUPPORTED_ORIGIN.pt.txt4
-rw-r--r--src/locale/USAGE.en.txt1
-rw-r--r--src/locale/USAGE.eo.txt1
-rw-r--r--src/locale/USAGE.fr.txt1
-rw-r--r--src/locale/USAGE.pt.txt1
-rw-r--r--src/locale/en.sh36
-rw-r--r--src/locale/eo.sh36
-rw-r--r--src/locale/fr.sh36
-rw-r--r--src/locale/load-messages.sh.in (renamed from src/load-locale-messages.sh.in)6
-rw-r--r--src/locale/pt.sh36
48 files changed, 503 insertions, 561 deletions
diff --git a/.gitignore b/.gitignore
index e954801..075b5da 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,7 @@
/public/
/tmp/
/src/git-permalink
-/src/load-locale-messages.sh
+/src/locale/*.sh
*.mo
*.po~
/tests/remotes/
diff --git a/Makefile b/Makefile
index aeade09..6f0d37d 100644
--- a/Makefile
+++ b/Makefile
@@ -35,12 +35,22 @@ manpages.in = $(manpages.en.in) \
doc/git-permalink.eo.1.in
manpages = $(manpages.in:.in=)
+locale-files.sh = \
+ src/locale/en.sh \
+ src/locale/pt.sh \
+ src/locale/fr.sh \
+ src/locale/eo.sh
-all: src/git-permalink src/load-locale-messages.sh src/locale/en.sh $(manpages)
+all: src/git-permalink src/locale/load-messages.sh \
+ $(locale-files.sh) $(manpages)
-src/locale/en.sh: src/git-permalink.in
- sh po/extract-strings.sh < $? > $@
+
+src/locale/template.sh: src/git-permalink
+ env GIT_PERMALINK_DUMP_TRANSLATABLE_STRINGS=1 ./src/git-permalink > $@
+
+$(locale-files.sh): src/locale/template.sh
+ sed "s/@LANG@/`basename $@ .sh`/g" < src/locale/template.sh > $@
check: all
@@ -51,7 +61,8 @@ clean:
rm -rf \
public/ $(manpages) README.*.md CHANGELOG.*.md messages.mo \
tests/destdirs/ tests/prefix/ tests/remotes/ \
- src/git-permalink src/load-locale-messages.sh
+ src/git-permalink src/locale/load-messages.sh \
+ src/locale/template.sh $(locale-files.sh)
install: all
mkdir -p \
@@ -59,20 +70,21 @@ install: all
$(DESTDIR)$(LIBEXECDIR)/$(NAME) \
$(DESTDIR)$(LOCALEDIR)
cp src/$(NAME) $(DESTDIR)$(BINDIR)
- cp src/load-locale-messages.sh $(DESTDIR)$(LIBEXECDIR)/$(NAME)
+ cp src/locale/load-messages.sh $(DESTDIR)$(LIBEXECDIR)/$(NAME)
for l in $(TRANSLATIONS) en $(CONTRIBLANGS); do \
- mkdir -p $(DESTDIR)$(LOCALEDIR)/$$l/LC_MESSAGES; \
- cp src/locale/$$l.sh \
- $(DESTDIR)$(LOCALEDIR)/$$l/LC_MESSAGES/$(NAME).sh; \
+ mkdir -p $(DESTDIR)$(LOCALEDIR)/$$l/LC_MESSAGES/$(NAME); \
+ cp \
+ src/locale/$$l.sh src/locale/*.$$l.txt \
+ $(DESTDIR)$(LOCALEDIR)/$$l/LC_MESSAGES/$(NAME); \
done
sh doc/manpages.sh -ip $(DESTDIR)$(MANDIR) $(manpages)
uninstall:
rm -f \
$(DESTDIR)$(BINDIR)/$(NAME) \
- $(DESTDIR)$(LIBEXECDIR)/$(NAME)/load-locale-messages.sh
+ $(DESTDIR)$(LIBEXECDIR)/$(NAME)/load-messages.sh
for l in $(TRANSLATIONS) en $(CONTRIBLANGS); do \
- rm -f $(DESTDIR)$(LOCALEDIR)/$$l/LC_MESSAGES/$(NAME).sh; \
+ rm -f $(DESTDIR)$(LOCALEDIR)/$$l/LC_MESSAGES/$(NAME)/*; \
done
sh doc/manpages.sh -up $(DESTDIR)$(MANDIR) $(manpages)
@@ -101,8 +113,9 @@ README.en.md: README.md
CHANGELOG.en.md: CHANGELOG.md
ln -fs $? $@
-l10n-gen: README.en.md CHANGELOG.en.md $(manpages.en.in) src/locale/en.sh
- sh aux/workflow/l10n.sh -l '$(TRANSLATIONS)' -L '$(CONTRIBLANGS)' $?
+l10n-gen: README.en.md CHANGELOG.en.md $(manpages.en.in)
+ sh aux/workflow/l10n.sh -l '$(TRANSLATIONS)' -L '$(CONTRIBLANGS)' $? \
+ src/locale/*.en.txt
public: l10n-gen all TODOs.md $(manpages) public/makefile.svg
sh aux/workflow/public.sh -l '$(TRANSLATIONS) $(CONTRIBLANGS) en' \
diff --git a/aux/workflow/l10n.sh b/aux/workflow/l10n.sh
index 15486aa..d3dc9df 100755
--- a/aux/workflow/l10n.sh
+++ b/aux/workflow/l10n.sh
@@ -51,7 +51,7 @@ for from_f in "$@"; do
po2md --pofiles "$pofile" --save "$to_f" \
--quiet --wrapwidth 999 < "$from_f"
;;
- *.en.msg|*/en.sh)
+ *.en.msg|*.en.txt)
po4a-updatepo -f text -m "$from_f" -p "$pofile"
po4a-translate -f text -m "$from_f" \
-p "$pofile" -l "$to_f" -k 0 -v >&2
diff --git a/po/LC_MESSAGES/src/locale/HELP.en.txt/eo.po b/po/LC_MESSAGES/src/locale/HELP.en.txt/eo.po
new file mode 100644
index 0000000..221bfa8
--- /dev/null
+++ b/po/LC_MESSAGES/src/locale/HELP.en.txt/eo.po
@@ -0,0 +1,32 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2022-01-15 20:37-0300\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"
+
+#. type: Plain text
+#: src/locale/HELP.en.txt:5
+#, no-wrap
+msgid ""
+"Options:\n"
+" -p only print the link, don't try to open it\n"
+" -h, --help show this help message\n"
+" -V, --version print the version number\n"
+msgstr ""
+
+#. type: Plain text
+#: src/locale/HELP.en.txt:6
+msgid "See \"man git-permalink\" for more information."
+msgstr ""
diff --git a/po/LC_MESSAGES/src/locale/HELP.en.txt/fr.po b/po/LC_MESSAGES/src/locale/HELP.en.txt/fr.po
new file mode 100644
index 0000000..221bfa8
--- /dev/null
+++ b/po/LC_MESSAGES/src/locale/HELP.en.txt/fr.po
@@ -0,0 +1,32 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2022-01-15 20:37-0300\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"
+
+#. type: Plain text
+#: src/locale/HELP.en.txt:5
+#, no-wrap
+msgid ""
+"Options:\n"
+" -p only print the link, don't try to open it\n"
+" -h, --help show this help message\n"
+" -V, --version print the version number\n"
+msgstr ""
+
+#. type: Plain text
+#: src/locale/HELP.en.txt:6
+msgid "See \"man git-permalink\" for more information."
+msgstr ""
diff --git a/po/LC_MESSAGES/src/locale/HELP.en.txt/pt.po b/po/LC_MESSAGES/src/locale/HELP.en.txt/pt.po
new file mode 100644
index 0000000..221bfa8
--- /dev/null
+++ b/po/LC_MESSAGES/src/locale/HELP.en.txt/pt.po
@@ -0,0 +1,32 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2022-01-15 20:37-0300\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"
+
+#. type: Plain text
+#: src/locale/HELP.en.txt:5
+#, no-wrap
+msgid ""
+"Options:\n"
+" -p only print the link, don't try to open it\n"
+" -h, --help show this help message\n"
+" -V, --version print the version number\n"
+msgstr ""
+
+#. type: Plain text
+#: src/locale/HELP.en.txt:6
+msgid "See \"man git-permalink\" for more information."
+msgstr ""
diff --git a/po/LC_MESSAGES/src/locale/MISSING_FILE.en.txt/eo.po b/po/LC_MESSAGES/src/locale/MISSING_FILE.en.txt/eo.po
new file mode 100644
index 0000000..1daae5e
--- /dev/null
+++ b/po/LC_MESSAGES/src/locale/MISSING_FILE.en.txt/eo.po
@@ -0,0 +1,22 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2022-01-15 20:37-0300\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"
+
+#. type: Plain text
+#: src/locale/MISSING_FILE.en.txt:1
+msgid "Missing FILE argument."
+msgstr ""
diff --git a/po/LC_MESSAGES/src/locale/MISSING_FILE.en.txt/fr.po b/po/LC_MESSAGES/src/locale/MISSING_FILE.en.txt/fr.po
new file mode 100644
index 0000000..1daae5e
--- /dev/null
+++ b/po/LC_MESSAGES/src/locale/MISSING_FILE.en.txt/fr.po
@@ -0,0 +1,22 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2022-01-15 20:37-0300\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"
+
+#. type: Plain text
+#: src/locale/MISSING_FILE.en.txt:1
+msgid "Missing FILE argument."
+msgstr ""
diff --git a/po/LC_MESSAGES/src/locale/MISSING_FILE.en.txt/pt.po b/po/LC_MESSAGES/src/locale/MISSING_FILE.en.txt/pt.po
new file mode 100644
index 0000000..1daae5e
--- /dev/null
+++ b/po/LC_MESSAGES/src/locale/MISSING_FILE.en.txt/pt.po
@@ -0,0 +1,22 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2022-01-15 20:37-0300\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"
+
+#. type: Plain text
+#: src/locale/MISSING_FILE.en.txt:1
+msgid "Missing FILE argument."
+msgstr ""
diff --git a/po/LC_MESSAGES/src/locale/OPEN.en.txt/eo.po b/po/LC_MESSAGES/src/locale/OPEN.en.txt/eo.po
new file mode 100644
index 0000000..8a3e3c0
--- /dev/null
+++ b/po/LC_MESSAGES/src/locale/OPEN.en.txt/eo.po
@@ -0,0 +1,22 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2022-01-15 20:37-0300\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"
+
+#. type: Plain text
+#: src/locale/OPEN.en.txt:1
+msgid "Opening %s"
+msgstr ""
diff --git a/po/LC_MESSAGES/src/locale/OPEN.en.txt/fr.po b/po/LC_MESSAGES/src/locale/OPEN.en.txt/fr.po
new file mode 100644
index 0000000..8a3e3c0
--- /dev/null
+++ b/po/LC_MESSAGES/src/locale/OPEN.en.txt/fr.po
@@ -0,0 +1,22 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2022-01-15 20:37-0300\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"
+
+#. type: Plain text
+#: src/locale/OPEN.en.txt:1
+msgid "Opening %s"
+msgstr ""
diff --git a/po/LC_MESSAGES/src/locale/OPEN.en.txt/pt.po b/po/LC_MESSAGES/src/locale/OPEN.en.txt/pt.po
new file mode 100644
index 0000000..8a3e3c0
--- /dev/null
+++ b/po/LC_MESSAGES/src/locale/OPEN.en.txt/pt.po
@@ -0,0 +1,22 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2022-01-15 20:37-0300\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"
+
+#. type: Plain text
+#: src/locale/OPEN.en.txt:1
+msgid "Opening %s"
+msgstr ""
diff --git a/po/LC_MESSAGES/src/locale/UNSUPPORTED_ORIGIN.en.txt/eo.po b/po/LC_MESSAGES/src/locale/UNSUPPORTED_ORIGIN.en.txt/eo.po
new file mode 100644
index 0000000..f9e8f40
--- /dev/null
+++ b/po/LC_MESSAGES/src/locale/UNSUPPORTED_ORIGIN.en.txt/eo.po
@@ -0,0 +1,29 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2022-01-15 20:37-0300\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"
+
+#. type: Plain text
+#: src/locale/UNSUPPORTED_ORIGIN.en.txt:2
+msgid "Unsupported origin: %s."
+msgstr ""
+
+#. type: Plain text
+#: src/locale/UNSUPPORTED_ORIGIN.en.txt:4
+msgid ""
+"Add a template override to use git-permalink (see \"man git-permalink\" for "
+"instructions)."
+msgstr ""
diff --git a/po/LC_MESSAGES/src/locale/UNSUPPORTED_ORIGIN.en.txt/fr.po b/po/LC_MESSAGES/src/locale/UNSUPPORTED_ORIGIN.en.txt/fr.po
new file mode 100644
index 0000000..f9e8f40
--- /dev/null
+++ b/po/LC_MESSAGES/src/locale/UNSUPPORTED_ORIGIN.en.txt/fr.po
@@ -0,0 +1,29 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2022-01-15 20:37-0300\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"
+
+#. type: Plain text
+#: src/locale/UNSUPPORTED_ORIGIN.en.txt:2
+msgid "Unsupported origin: %s."
+msgstr ""
+
+#. type: Plain text
+#: src/locale/UNSUPPORTED_ORIGIN.en.txt:4
+msgid ""
+"Add a template override to use git-permalink (see \"man git-permalink\" for "
+"instructions)."
+msgstr ""
diff --git a/po/LC_MESSAGES/src/locale/UNSUPPORTED_ORIGIN.en.txt/pt.po b/po/LC_MESSAGES/src/locale/UNSUPPORTED_ORIGIN.en.txt/pt.po
new file mode 100644
index 0000000..f9e8f40
--- /dev/null
+++ b/po/LC_MESSAGES/src/locale/UNSUPPORTED_ORIGIN.en.txt/pt.po
@@ -0,0 +1,29 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2022-01-15 20:37-0300\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"
+
+#. type: Plain text
+#: src/locale/UNSUPPORTED_ORIGIN.en.txt:2
+msgid "Unsupported origin: %s."
+msgstr ""
+
+#. type: Plain text
+#: src/locale/UNSUPPORTED_ORIGIN.en.txt:4
+msgid ""
+"Add a template override to use git-permalink (see \"man git-permalink\" for "
+"instructions)."
+msgstr ""
diff --git a/po/LC_MESSAGES/src/locale/USAGE.en.txt/eo.po b/po/LC_MESSAGES/src/locale/USAGE.en.txt/eo.po
new file mode 100644
index 0000000..d314022
--- /dev/null
+++ b/po/LC_MESSAGES/src/locale/USAGE.en.txt/eo.po
@@ -0,0 +1,22 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2022-01-15 20:37-0300\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"
+
+#. type: Plain text
+#: src/locale/USAGE.en.txt:1
+msgid "Usage: git permalink [-phV] FILE [LINENO]"
+msgstr ""
diff --git a/po/LC_MESSAGES/src/locale/USAGE.en.txt/fr.po b/po/LC_MESSAGES/src/locale/USAGE.en.txt/fr.po
new file mode 100644
index 0000000..d314022
--- /dev/null
+++ b/po/LC_MESSAGES/src/locale/USAGE.en.txt/fr.po
@@ -0,0 +1,22 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2022-01-15 20:37-0300\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"
+
+#. type: Plain text
+#: src/locale/USAGE.en.txt:1
+msgid "Usage: git permalink [-phV] FILE [LINENO]"
+msgstr ""
diff --git a/po/LC_MESSAGES/src/locale/USAGE.en.txt/pt.po b/po/LC_MESSAGES/src/locale/USAGE.en.txt/pt.po
new file mode 100644
index 0000000..d314022
--- /dev/null
+++ b/po/LC_MESSAGES/src/locale/USAGE.en.txt/pt.po
@@ -0,0 +1,22 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2022-01-15 20:37-0300\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"
+
+#. type: Plain text
+#: src/locale/USAGE.en.txt:1
+msgid "Usage: git permalink [-phV] FILE [LINENO]"
+msgstr ""
diff --git a/po/LC_MESSAGES/src/locale/en.sh/eo.po b/po/LC_MESSAGES/src/locale/en.sh/eo.po
deleted file mode 100644
index f20816f..0000000
--- a/po/LC_MESSAGES/src/locale/en.sh/eo.po
+++ /dev/null
@@ -1,127 +0,0 @@
-# SOME DESCRIPTIVE TITLE
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: \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"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 3.0\n"
-
-#. type: Plain text
-#: 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:9
-#, no-wrap
-msgid ""
-"MSG_USAGE=\"$(cat <<-'EOF'\n"
-"\tUsage: git permalink [-phV] FILE [LINENO]\n"
-"EOF\n"
-")\"\n"
-msgstr ""
-"MSG_USAGE=\"$(cat <<-'EOF'\n"
-"\tUzmaniero: git permalink [-phV] DOSIERO [LINIONO]\n"
-"EOF\n"
-")\"\n"
-
-#. type: Plain text
-#: src/locale/en.sh:15
-#, no-wrap
-msgid ""
-"MSG_HELP=\"$(cat <<-'EOF'\n"
-"\tOptions:\n"
-"\t -p only print the link, don't try to open it\n"
-"\t -h, --help show this help message\n"
-"\t -V, --version print the version number\n"
-msgstr ""
-"MSG_HELP=\"$(cat <<-'EOF'\n"
-"\tEbloj:\n"
-"\t -p nur presas la ligon, ne provas malgermi ĝin\n"
-"\t -h, --help montras ĉi tiun helpmesaĝon\n"
-"\t -V, --version presas la versian numeron\n"
-
-#. type: Plain text
-#: src/locale/en.sh:19
-#, no-wrap
-msgid ""
-"\tSee \"man git-permalink\" for more information.\n"
-"EOF\n"
-")\"\n"
-msgstr ""
-"\tVidu \"man git-permalink\" por pliaj informoj.\n"
-"EOF\n"
-")\"\n"
-
-#. type: Plain text
-#: src/locale/en.sh:24
-#, no-wrap
-msgid ""
-"MSG_MISSING_FILE=\"$(cat <<-'EOF'\n"
-"\tMissing FILE argument.\n"
-"EOF\n"
-")\"\n"
-msgstr ""
-"MSG_MISSING_FILE=\"$(cat <<-'EOF'\n"
-"\tLa argumento DOSIERO mankas.\n"
-"EOF\n"
-")\"\n"
-
-#. type: Plain text
-#: src/locale/en.sh:27
-#, no-wrap
-msgid ""
-"MSG_UNSUPPORTED_ORIGIN=\"$(cat <<-'EOF'\n"
-"\tUnsupported origin: %s.\n"
-msgstr ""
-"MSG_UNSUPPORTED_ORIGIN=\"$(cat <<-'EOF'\n"
-"\tOrigo ne estas subtenata: %s.\n"
-
-#. type: Plain text
-#: src/locale/en.sh:32
-#, no-wrap
-msgid ""
-"\tAdd a template override to use git-permalink (see\n"
-"\t\"man git-permalink\" for instructions).\n"
-"EOF\n"
-")\"\n"
-msgstr ""
-"\tAldonu anstataŭan ŝablonon por uzi git-permalink (vidu\n"
-"\t\"man git-permalink\" por instrukcioj).\n"
-"EOF\n"
-")\"\n"
-
-#. type: Plain text
-#: src/locale/en.sh:36
-#, no-wrap
-msgid ""
-"MSG_OPEN=\"$(cat <<-'EOF'\n"
-"\tOpening %s\n"
-"EOF\n"
-")\"\n"
-msgstr ""
-"MSG_OPEN=\"$(cat <<-'EOF'\n"
-"\tMalfermado de %s\n"
-"EOF\n"
-")\"\n"
-
-#~ 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
deleted file mode 100644
index 97b52eb..0000000
--- a/po/LC_MESSAGES/src/locale/en.sh/fr.po
+++ /dev/null
@@ -1,127 +0,0 @@
-# SOME DESCRIPTIVE TITLE
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: \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"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 3.0\n"
-
-#. type: Plain text
-#: 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:9
-#, no-wrap
-msgid ""
-"MSG_USAGE=\"$(cat <<-'EOF'\n"
-"\tUsage: git permalink [-phV] FILE [LINENO]\n"
-"EOF\n"
-")\"\n"
-msgstr ""
-"MSG_USAGE=\"$(cat <<-'EOF'\n"
-"\tUsage: git permalink [-phV] FICHIER [LINENO]\n"
-"EOF\n"
-")\"\n"
-
-#. type: Plain text
-#: src/locale/en.sh:15
-#, no-wrap
-msgid ""
-"MSG_HELP=\"$(cat <<-'EOF'\n"
-"\tOptions:\n"
-"\t -p only print the link, don't try to open it\n"
-"\t -h, --help show this help message\n"
-"\t -V, --version print the version number\n"
-msgstr ""
-"MSG_HELP=\"$(cat <<-'EOF'\n"
-"\tOptions:\n"
-"\t -p seulement imprimez le lien, n'essayez pas de l'ouvrir\n"
-"\t -h, --help afficher ce message d'aide\n"
-"\t -V, --version imprime le numeró de version\n"
-
-#. type: Plain text
-#: src/locale/en.sh:19
-#, no-wrap
-msgid ""
-"\tSee \"man git-permalink\" for more information.\n"
-"EOF\n"
-")\"\n"
-msgstr ""
-"\tVoir \"man git-permalink\" pour plus d'informations.\n"
-"EOF\n"
-")\"\n"
-
-#. type: Plain text
-#: src/locale/en.sh:24
-#, no-wrap
-msgid ""
-"MSG_MISSING_FILE=\"$(cat <<-'EOF'\n"
-"\tMissing FILE argument.\n"
-"EOF\n"
-")\"\n"
-msgstr ""
-"MSG_MISSING_FILE=\"$(cat <<-'EOF'\n"
-"\tL'argument FICHIER manque.\n"
-"EOF\n"
-")\"\n"
-
-#. type: Plain text
-#: src/locale/en.sh:27
-#, no-wrap
-msgid ""
-"MSG_UNSUPPORTED_ORIGIN=\"$(cat <<-'EOF'\n"
-"\tUnsupported origin: %s.\n"
-msgstr ""
-"MSG_UNSUPPORTED_ORIGIN=\"$(cat <<-'EOF'\n"
-"\tOrigine n'est pas supporté: %s.\n"
-
-#. type: Plain text
-#: src/locale/en.sh:32
-#, no-wrap
-msgid ""
-"\tAdd a template override to use git-permalink (see\n"
-"\t\"man git-permalink\" for instructions).\n"
-"EOF\n"
-")\"\n"
-msgstr ""
-"\tAjouter un modèle de remplacement pour utilisér git-permalink (regarde\n"
-"\t\"man git-permalink\" pour les instructions).\n"
-"EOF\n"
-")\"\n"
-
-#. type: Plain text
-#: src/locale/en.sh:36
-#, no-wrap
-msgid ""
-"MSG_OPEN=\"$(cat <<-'EOF'\n"
-"\tOpening %s\n"
-"EOF\n"
-")\"\n"
-msgstr ""
-"MSG_OPEN=\"$(cat <<-'EOF'\n"
-"\tOuverture de %s\n"
-"EOF\n"
-")\"\n"
-
-#~ 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
deleted file mode 100644
index b5d4d84..0000000
--- a/po/LC_MESSAGES/src/locale/en.sh/pt.po
+++ /dev/null
@@ -1,127 +0,0 @@
-# SOME DESCRIPTIVE TITLE
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: \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"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 3.0\n"
-
-#. type: Plain text
-#: 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:9
-#, no-wrap
-msgid ""
-"MSG_USAGE=\"$(cat <<-'EOF'\n"
-"\tUsage: git permalink [-phV] FILE [LINENO]\n"
-"EOF\n"
-")\"\n"
-msgstr ""
-"MSG_USAGE=\"$(cat <<-'EOF'\n"
-"\tUso: git permalink [-phV] ARQUIVO [NOLINHA]\n"
-"EOF\n"
-")\"\n"
-
-#. type: Plain text
-#: src/locale/en.sh:15
-#, no-wrap
-msgid ""
-"MSG_HELP=\"$(cat <<-'EOF'\n"
-"\tOptions:\n"
-"\t -p only print the link, don't try to open it\n"
-"\t -h, --help show this help message\n"
-"\t -V, --version print the version number\n"
-msgstr ""
-"MSG_HELP=\"$(cat <<-'EOF'\n"
-"\tOpções:\n"
-"\t -p somente imprime o link, não tenta abrí-lo\n"
-"\t -h, --help mostra esta mensagem de ajuda\n"
-"\t -V, --version imprime o número da versão\n"
-
-#. type: Plain text
-#: src/locale/en.sh:19
-#, no-wrap
-msgid ""
-"\tSee \"man git-permalink\" for more information.\n"
-"EOF\n"
-")\"\n"
-msgstr ""
-"\tVeja \"man git-permalink\" para mais informações.\n"
-"EOF\n"
-")\"\n"
-
-#. type: Plain text
-#: src/locale/en.sh:24
-#, no-wrap
-msgid ""
-"MSG_MISSING_FILE=\"$(cat <<-'EOF'\n"
-"\tMissing FILE argument.\n"
-"EOF\n"
-")\"\n"
-msgstr ""
-"MSG_MISSING_FILE=\"$(cat <<-'EOF'\n"
-"\tFaltando argumento ARQUIVO.\n"
-"EOF\n"
-")\"\n"
-
-#. type: Plain text
-#: src/locale/en.sh:27
-#, no-wrap
-msgid ""
-"MSG_UNSUPPORTED_ORIGIN=\"$(cat <<-'EOF'\n"
-"\tUnsupported origin: %s.\n"
-msgstr ""
-"MSG_UNSUPPORTED_ORIGIN=\"$(cat <<-'EOF'\n"
-"\tOrigem sem suporte: %s.\n"
-
-#. type: Plain text
-#: src/locale/en.sh:32
-#, no-wrap
-msgid ""
-"\tAdd a template override to use git-permalink (see\n"
-"\t\"man git-permalink\" for instructions).\n"
-"EOF\n"
-")\"\n"
-msgstr ""
-"\tAdiciona um modelo de substituição para usar no git-permalink (veja\n"
-"\t\"man git-permalink.\" para mais instruções).\n"
-"EOF\n"
-")\"\n"
-
-#. type: Plain text
-#: src/locale/en.sh:36
-#, no-wrap
-msgid ""
-"MSG_OPEN=\"$(cat <<-'EOF'\n"
-"\tOpening %s\n"
-"EOF\n"
-")\"\n"
-msgstr ""
-"MSG_OPEN=\"$(cat <<-'EOF'\n"
-"\tAbrindo %s\n"
-"EOF\n"
-")\"\n"
-
-#~ 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
deleted file mode 100755
index 097cdda..0000000
--- a/po/extract-strings.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/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 94697a3..a8e6477 100755
--- a/src/git-permalink.in
+++ b/src/git-permalink.in
@@ -1,10 +1,17 @@
#!/bin/sh
set -eu
+MSGS=''
+add_msg() {
+ MSGS="$MSGS $1"
+}
+
+
MSG_USAGE="$(cat <<-'EOF'
Usage: git permalink [-phV] FILE [LINENO]
EOF
)"
+add_msg USAGE
MSG_HELP="$(cat <<-'EOF'
Options:
@@ -15,11 +22,13 @@ MSG_HELP="$(cat <<-'EOF'
See "man git-permalink" for more information.
EOF
)"
+add_msg HELP
MSG_MISSING_FILE="$(cat <<-'EOF'
Missing FILE argument.
EOF
)"
+add_msg MISSING_FILE
MSG_UNSUPPORTED_ORIGIN="$(cat <<-'EOF'
Unsupported origin: %s.
@@ -28,22 +37,49 @@ MSG_UNSUPPORTED_ORIGIN="$(cat <<-'EOF'
"man git-permalink" for instructions).
EOF
)"
+add_msg UNSUPPORTED_ORIGIN
MSG_OPEN="$(cat <<-'EOF'
Opening %s
EOF
)"
+add_msg OPEN
#
# End translatable strings
#
-if [ -r '@LIBEXECDIR@/@NAME@/load-locale-messages.sh' ]; then
- . '@LIBEXECDIR@/@NAME@/load-locale-messages.sh'
+
+dump_translatable_strings() {
+ for msg in $MSGS; do
+ eval "echo \"\$MSG_$msg\"" > src/locale/"$msg".en.txt
+ done
+
+ cat <<-'EOF'
+ #!/bin/sh
+ # shellcheck disable=2034
+ set -eu
+
+ EOF
+ for msg in $MSGS; do
+ printf 'MSG_%s="$(cat @LOCALEDIR@/@LANG@/LC_MESSAGES/@NAME@/%s.@LANG@.txt)"\n' \
+ "$msg" "$msg"
+ done
+}
+
+if [ -n "${GIT_PERMALINK_DUMP_TRANSLATABLE_STRINGS:-}" ]; then
+ dump_translatable_strings
+ exit
+fi
+
+
+if [ -r '@LIBEXECDIR@/@NAME@/load-messages.sh' ]; then
+ . '@LIBEXECDIR@/@NAME@/load-messages.sh'
fi
+
#
# Documentation functions
#
@@ -61,6 +97,7 @@ version() {
}
+
#
# Core functions
#
@@ -190,6 +227,7 @@ guess_permalink() {
}
+
#
# Main
#
diff --git a/src/locale/HELP.en.txt b/src/locale/HELP.en.txt
new file mode 100644
index 0000000..bfa3b69
--- /dev/null
+++ b/src/locale/HELP.en.txt
@@ -0,0 +1,6 @@
+Options:
+ -p only print the link, don't try to open it
+ -h, --help show this help message
+ -V, --version print the version number
+
+See "man git-permalink" for more information.
diff --git a/src/locale/HELP.eo.txt b/src/locale/HELP.eo.txt
new file mode 100644
index 0000000..bfa3b69
--- /dev/null
+++ b/src/locale/HELP.eo.txt
@@ -0,0 +1,6 @@
+Options:
+ -p only print the link, don't try to open it
+ -h, --help show this help message
+ -V, --version print the version number
+
+See "man git-permalink" for more information.
diff --git a/src/locale/HELP.fr.txt b/src/locale/HELP.fr.txt
new file mode 100644
index 0000000..bfa3b69
--- /dev/null
+++ b/src/locale/HELP.fr.txt
@@ -0,0 +1,6 @@
+Options:
+ -p only print the link, don't try to open it
+ -h, --help show this help message
+ -V, --version print the version number
+
+See "man git-permalink" for more information.
diff --git a/src/locale/HELP.pt.txt b/src/locale/HELP.pt.txt
new file mode 100644
index 0000000..bfa3b69
--- /dev/null
+++ b/src/locale/HELP.pt.txt
@@ -0,0 +1,6 @@
+Options:
+ -p only print the link, don't try to open it
+ -h, --help show this help message
+ -V, --version print the version number
+
+See "man git-permalink" for more information.
diff --git a/src/locale/MISSING_FILE.en.txt b/src/locale/MISSING_FILE.en.txt
new file mode 100644
index 0000000..0d4ca1c
--- /dev/null
+++ b/src/locale/MISSING_FILE.en.txt
@@ -0,0 +1 @@
+Missing FILE argument.
diff --git a/src/locale/MISSING_FILE.eo.txt b/src/locale/MISSING_FILE.eo.txt
new file mode 100644
index 0000000..0d4ca1c
--- /dev/null
+++ b/src/locale/MISSING_FILE.eo.txt
@@ -0,0 +1 @@
+Missing FILE argument.
diff --git a/src/locale/MISSING_FILE.fr.txt b/src/locale/MISSING_FILE.fr.txt
new file mode 100644
index 0000000..0d4ca1c
--- /dev/null
+++ b/src/locale/MISSING_FILE.fr.txt
@@ -0,0 +1 @@
+Missing FILE argument.
diff --git a/src/locale/MISSING_FILE.pt.txt b/src/locale/MISSING_FILE.pt.txt
new file mode 100644
index 0000000..0d4ca1c
--- /dev/null
+++ b/src/locale/MISSING_FILE.pt.txt
@@ -0,0 +1 @@
+Missing FILE argument.
diff --git a/src/locale/OPEN.en.txt b/src/locale/OPEN.en.txt
new file mode 100644
index 0000000..68ea78b
--- /dev/null
+++ b/src/locale/OPEN.en.txt
@@ -0,0 +1 @@
+Opening %s
diff --git a/src/locale/OPEN.eo.txt b/src/locale/OPEN.eo.txt
new file mode 100644
index 0000000..68ea78b
--- /dev/null
+++ b/src/locale/OPEN.eo.txt
@@ -0,0 +1 @@
+Opening %s
diff --git a/src/locale/OPEN.fr.txt b/src/locale/OPEN.fr.txt
new file mode 100644
index 0000000..68ea78b
--- /dev/null
+++ b/src/locale/OPEN.fr.txt
@@ -0,0 +1 @@
+Opening %s
diff --git a/src/locale/OPEN.pt.txt b/src/locale/OPEN.pt.txt
new file mode 100644
index 0000000..68ea78b
--- /dev/null
+++ b/src/locale/OPEN.pt.txt
@@ -0,0 +1 @@
+Opening %s
diff --git a/src/locale/UNSUPPORTED_ORIGIN.en.txt b/src/locale/UNSUPPORTED_ORIGIN.en.txt
new file mode 100644
index 0000000..4075e2c
--- /dev/null
+++ b/src/locale/UNSUPPORTED_ORIGIN.en.txt
@@ -0,0 +1,4 @@
+Unsupported origin: %s.
+
+Add a template override to use git-permalink (see
+"man git-permalink" for instructions).
diff --git a/src/locale/UNSUPPORTED_ORIGIN.eo.txt b/src/locale/UNSUPPORTED_ORIGIN.eo.txt
new file mode 100644
index 0000000..693d26c
--- /dev/null
+++ b/src/locale/UNSUPPORTED_ORIGIN.eo.txt
@@ -0,0 +1,4 @@
+Unsupported origin: %s.
+
+Add a template override to use git-permalink (see "man git-permalink" for
+instructions).
diff --git a/src/locale/UNSUPPORTED_ORIGIN.fr.txt b/src/locale/UNSUPPORTED_ORIGIN.fr.txt
new file mode 100644
index 0000000..693d26c
--- /dev/null
+++ b/src/locale/UNSUPPORTED_ORIGIN.fr.txt
@@ -0,0 +1,4 @@
+Unsupported origin: %s.
+
+Add a template override to use git-permalink (see "man git-permalink" for
+instructions).
diff --git a/src/locale/UNSUPPORTED_ORIGIN.pt.txt b/src/locale/UNSUPPORTED_ORIGIN.pt.txt
new file mode 100644
index 0000000..693d26c
--- /dev/null
+++ b/src/locale/UNSUPPORTED_ORIGIN.pt.txt
@@ -0,0 +1,4 @@
+Unsupported origin: %s.
+
+Add a template override to use git-permalink (see "man git-permalink" for
+instructions).
diff --git a/src/locale/USAGE.en.txt b/src/locale/USAGE.en.txt
new file mode 100644
index 0000000..ce54a39
--- /dev/null
+++ b/src/locale/USAGE.en.txt
@@ -0,0 +1 @@
+Usage: git permalink [-phV] FILE [LINENO]
diff --git a/src/locale/USAGE.eo.txt b/src/locale/USAGE.eo.txt
new file mode 100644
index 0000000..052a466
--- /dev/null
+++ b/src/locale/USAGE.eo.txt
@@ -0,0 +1 @@
+Usage: git permalink [-phV] FILE [LINENO]
diff --git a/src/locale/USAGE.fr.txt b/src/locale/USAGE.fr.txt
new file mode 100644
index 0000000..052a466
--- /dev/null
+++ b/src/locale/USAGE.fr.txt
@@ -0,0 +1 @@
+Usage: git permalink [-phV] FILE [LINENO]
diff --git a/src/locale/USAGE.pt.txt b/src/locale/USAGE.pt.txt
new file mode 100644
index 0000000..052a466
--- /dev/null
+++ b/src/locale/USAGE.pt.txt
@@ -0,0 +1 @@
+Usage: git permalink [-phV] FILE [LINENO]
diff --git a/src/locale/en.sh b/src/locale/en.sh
deleted file mode 100644
index 64dbe48..0000000
--- a/src/locale/en.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-# shellcheck disable=2034
-set -eu
-
-MSG_USAGE="$(cat <<-'EOF'
- Usage: git permalink [-phV] FILE [LINENO]
-EOF
-)"
-
-MSG_HELP="$(cat <<-'EOF'
- Options:
- -p only print the link, don't try to open it
- -h, --help show this help message
- -V, --version print the version number
-
- See "man git-permalink" for more information.
-EOF
-)"
-
-MSG_MISSING_FILE="$(cat <<-'EOF'
- Missing FILE argument.
-EOF
-)"
-
-MSG_UNSUPPORTED_ORIGIN="$(cat <<-'EOF'
- Unsupported origin: %s.
-
- Add a template override to use git-permalink (see
- "man git-permalink" for instructions).
-EOF
-)"
-
-MSG_OPEN="$(cat <<-'EOF'
- Opening %s
-EOF
-)"
diff --git a/src/locale/eo.sh b/src/locale/eo.sh
deleted file mode 100644
index e6c7ca1..0000000
--- a/src/locale/eo.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-# shellcheck disable=2034
-set -eu
-
-MSG_USAGE="$(cat <<-'EOF'
- Uzmaniero: git permalink [-phV] DOSIERO [LINIONO]
-EOF
-)"
-
-MSG_HELP="$(cat <<-'EOF'
- Ebloj:
- -p nur presas la ligon, ne provas malgermi ĝin
- -h, --help montras ĉi tiun helpmesaĝon
- -V, --version presas la versian numeron
-
- Vidu "man git-permalink" por pliaj informoj.
-EOF
-)"
-
-MSG_MISSING_FILE="$(cat <<-'EOF'
- La argumento DOSIERO mankas.
-EOF
-)"
-
-MSG_UNSUPPORTED_ORIGIN="$(cat <<-'EOF'
- Origo ne estas subtenata: %s.
-
- Aldonu anstataŭan ŝablonon por uzi git-permalink (vidu
- "man git-permalink" por instrukcioj).
-EOF
-)"
-
-MSG_OPEN="$(cat <<-'EOF'
- Malfermado de %s
-EOF
-)"
diff --git a/src/locale/fr.sh b/src/locale/fr.sh
deleted file mode 100644
index 11bb792..0000000
--- a/src/locale/fr.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-# shellcheck disable=2034
-set -eu
-
-MSG_USAGE="$(cat <<-'EOF'
- Usage: git permalink [-phV] FICHIER [LINENO]
-EOF
-)"
-
-MSG_HELP="$(cat <<-'EOF'
- Options:
- -p seulement imprimez le lien, n'essayez pas de l'ouvrir
- -h, --help afficher ce message d'aide
- -V, --version imprime le numeró de version
-
- Voir "man git-permalink" pour plus d'informations.
-EOF
-)"
-
-MSG_MISSING_FILE="$(cat <<-'EOF'
- L'argument FICHIER manque.
-EOF
-)"
-
-MSG_UNSUPPORTED_ORIGIN="$(cat <<-'EOF'
- Origine n'est pas supporté: %s.
-
- Ajouter un modèle de remplacement pour utilisér git-permalink (regarde
- "man git-permalink" pour les instructions).
-EOF
-)"
-
-MSG_OPEN="$(cat <<-'EOF'
- Ouverture de %s
-EOF
-)"
diff --git a/src/load-locale-messages.sh.in b/src/locale/load-messages.sh.in
index e21c784..6a3ffef 100644
--- a/src/load-locale-messages.sh.in
+++ b/src/locale/load-messages.sh.in
@@ -6,14 +6,14 @@ get_lang() {
# optional
locale 2>/dev/null |
grep ^LC_MESSAGES |
- cut -d. -f1 |
- cut -d\" -f2 |
+ cut -d. -f1 |
+ cut -d\" -f2 |
cut -d= -f2
}
locpath() {
lang="$1"
- printf '@LOCALEDIR@/%s/LC_MESSAGES/@NAME@.sh' "$lang"
+ printf '@LOCALEDIR@/%s/LC_MESSAGES/@NAME@/%s.sh' "$lang" "$lang"
}
ll_CC="$(get_lang)"
diff --git a/src/locale/pt.sh b/src/locale/pt.sh
deleted file mode 100644
index df89a55..0000000
--- a/src/locale/pt.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-# shellcheck disable=2034
-set -eu
-
-MSG_USAGE="$(cat <<-'EOF'
- Uso: git permalink [-phV] ARQUIVO [NOLINHA]
-EOF
-)"
-
-MSG_HELP="$(cat <<-'EOF'
- Opções:
- -p somente imprime o link, não tenta abrí-lo
- -h, --help mostra esta mensagem de ajuda
- -V, --version imprime o número da versão
-
- Veja "man git-permalink" para mais informações.
-EOF
-)"
-
-MSG_MISSING_FILE="$(cat <<-'EOF'
- Faltando argumento ARQUIVO.
-EOF
-)"
-
-MSG_UNSUPPORTED_ORIGIN="$(cat <<-'EOF'
- Origem sem suporte: %s.
-
- Adiciona um modelo de substituição para usar no git-permalink (veja
- "man git-permalink." para mais instruções).
-EOF
-)"
-
-MSG_OPEN="$(cat <<-'EOF'
- Abrindo %s
-EOF
-)"