aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/load-locale-messages.sh.in33
-rw-r--r--src/locale/eo.sh20
-rw-r--r--src/locale/fr.sh20
-rw-r--r--src/locale/pt.sh20
4 files changed, 93 insertions, 0 deletions
diff --git a/src/load-locale-messages.sh.in b/src/load-locale-messages.sh.in
new file mode 100644
index 0000000..4840e0f
--- /dev/null
+++ b/src/load-locale-messages.sh.in
@@ -0,0 +1,33 @@
+#!/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@.sh' "$lang"
+}
+
+ll_CC="$(get_lang)"
+ll="$(echo "$ll_CC" | cut -d_ -f1)"
+
+if [ -r "$(locpath "$ll")" ]; then
+ . "$(locpath "$ll")"
+fi
+
+if [ -r "$(locpath "$ll_CC")" ]; then
+ . "$(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/eo.sh b/src/locale/eo.sh
new file mode 100644
index 0000000..6e77ec9
--- /dev/null
+++ b/src/locale/eo.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+set -eu
+
+MSG_USAGE='Uzmaniero: git permalink [-phV] DOSIERO [LINIONO]'
+
+MSG_HELP='Ebloj:
+ -p nur presas la ligon, ne provas malfermi ĝin
+ -h, --help montras ĉi tiun helpmesaĝon
+ -V, --version presas la versian numeron
+
+Vidu "man git-permalink" por pliaj informoj.'
+
+MSG_MISSING_FILE="La argumento DOSIERO mankas."
+
+MSG_UNSUPPORTED_ORIGIN='Origo ne estas subtenata: %s.
+
+Aldoni anstataŭan ŝablonon por uzi git-permalink (vidu
+"man git-permalink.1" por instrukcioj).'
+
+MSG_OPEN='Malfermado de %s'
diff --git a/src/locale/fr.sh b/src/locale/fr.sh
new file mode 100644
index 0000000..455912f
--- /dev/null
+++ b/src/locale/fr.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+set -eu
+
+MSG_USAGE='Usage: git permalink [-phV] FICHIER [LINENO]'
+
+MSG_HELP='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.'
+
+MSG_MISSING_FILE="L'argument FICHIER manque."
+
+MSG_UNSUPPORTED_ORIGIN='Origine n'"'"'es pas supporté: %s.
+
+Ajouter un modèle de remplacement pour utilisér git-permalink (regarde
+"man git-permalink.1" pour les instructions).'
+
+MSG_OPEN='Ouverture de %s'
diff --git a/src/locale/pt.sh b/src/locale/pt.sh
new file mode 100644
index 0000000..e0ae89d
--- /dev/null
+++ b/src/locale/pt.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+set -eu
+
+MSG_USAGE='Uso: git permalink [-phV] ARQUIVO [NOLINHA]'
+
+MSG_HELP='Opções:
+ -p somemente imprime o link, não tenta abrí-lo
+ -h, --help mostra esta mensagem de ajuda
+ -V, --version imprime o número de versão
+
+Veja "man git-permalink" para mais informações.'
+
+MSG_MISSING_FILE="Faltando argumento ARQUIVO."
+
+MSG_UNSUPPORTED_ORIGIN='Origem sem suporte: %s.
+
+Adicione um modelo de substituição para usar o git-permalink (veja
+"man git-permalink.1" para mais instruções).'
+
+MSG_OPEN='Abrindo %s'