diff options
author | EuAndreh <eu@euandre.org> | 2022-01-15 20:47:18 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-01-15 20:55:51 -0300 |
commit | 31a7db5bf25c411c61ded0e9de8bc65e9cd2611e (patch) | |
tree | fd7c5e94449592ce72ca0870eb104387fb21c9f9 /src/locale | |
parent | Makefile: Remove makefile.svg (diff) | |
download | git-permalink-31a7db5bf25c411c61ded0e9de8bc65e9cd2611e.tar.gz git-permalink-31a7db5bf25c411c61ded0e9de8bc65e9cd2611e.tar.xz |
Translate and ship strings in src/locale/*.txt
Diffstat (limited to 'src/locale')
-rw-r--r-- | src/locale/HELP.en.txt | 6 | ||||
-rw-r--r-- | src/locale/HELP.eo.txt | 6 | ||||
-rw-r--r-- | src/locale/HELP.fr.txt | 6 | ||||
-rw-r--r-- | src/locale/HELP.pt.txt | 6 | ||||
-rw-r--r-- | src/locale/MISSING_FILE.en.txt | 1 | ||||
-rw-r--r-- | src/locale/MISSING_FILE.eo.txt | 1 | ||||
-rw-r--r-- | src/locale/MISSING_FILE.fr.txt | 1 | ||||
-rw-r--r-- | src/locale/MISSING_FILE.pt.txt | 1 | ||||
-rw-r--r-- | src/locale/OPEN.en.txt | 1 | ||||
-rw-r--r-- | src/locale/OPEN.eo.txt | 1 | ||||
-rw-r--r-- | src/locale/OPEN.fr.txt | 1 | ||||
-rw-r--r-- | src/locale/OPEN.pt.txt | 1 | ||||
-rw-r--r-- | src/locale/UNSUPPORTED_ORIGIN.en.txt | 4 | ||||
-rw-r--r-- | src/locale/UNSUPPORTED_ORIGIN.eo.txt | 4 | ||||
-rw-r--r-- | src/locale/UNSUPPORTED_ORIGIN.fr.txt | 4 | ||||
-rw-r--r-- | src/locale/UNSUPPORTED_ORIGIN.pt.txt | 4 | ||||
-rw-r--r-- | src/locale/USAGE.en.txt | 1 | ||||
-rw-r--r-- | src/locale/USAGE.eo.txt | 1 | ||||
-rw-r--r-- | src/locale/USAGE.fr.txt | 1 | ||||
-rw-r--r-- | src/locale/USAGE.pt.txt | 1 | ||||
-rw-r--r-- | src/locale/en.sh | 36 | ||||
-rw-r--r-- | src/locale/eo.sh | 36 | ||||
-rw-r--r-- | src/locale/fr.sh | 36 | ||||
-rw-r--r-- | src/locale/load-messages.sh.in | 35 | ||||
-rw-r--r-- | src/locale/pt.sh | 36 |
25 files changed, 87 insertions, 144 deletions
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/locale/load-messages.sh.in b/src/locale/load-messages.sh.in new file mode 100644 index 0000000..6a3ffef --- /dev/null +++ b/src/locale/load-messages.sh.in @@ -0,0 +1,35 @@ +#!/bin/sh +set -eu + +get_lang() { + # LC_MESSAGES="ll_CC.CODESET@modifier" -> ll_CC, where quotes are + # optional + locale 2>/dev/null | + grep ^LC_MESSAGES | + cut -d. -f1 | + cut -d\" -f2 | + cut -d= -f2 +} + +locpath() { + lang="$1" + printf '@LOCALEDIR@/%s/LC_MESSAGES/@NAME@/%s.sh' "$lang" "$lang" +} + +ll_CC="$(get_lang)" +ll="$(echo "$ll_CC" | cut -d_ -f1)" + +if [ -r "$(locpath "$ll")" ]; then + # shellcheck source=/dev/null + . "$(locpath "$ll")" +fi + +if [ -r "$(locpath "$ll_CC")" ]; then + # shellcheck source=/dev/null + . "$(locpath "$ll_CC")" +fi + +# locale hierarchy: +# 1. the language+country specific message +# 2. the language specific message +# 3. the default fallback value 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 -)" |