Merge branch 'transifex'
This commit is contained in:
commit
cbd449dcd0
6
.tx/config
Normal file
6
.tx/config
Normal file
@ -0,0 +1,6 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
[isso.js]
|
||||
file_filter = .tx/js/<lang>
|
||||
source_lang = en
|
||||
type = KEYVALUEJSON
|
13
bin/tx-pull
Executable file
13
bin/tx-pull
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
set -g TRANSIFEX ".tx/js/"
|
||||
set -g JS "isso/js/app/i18n/%s.js"
|
||||
|
||||
# fetch latest translations to .tx/<ressource>/<lang>
|
||||
tx pull -a
|
||||
|
||||
for lang in (ls $TRANSIFEX)
|
||||
printf "define(" > (printf $JS $lang)
|
||||
cat .tx/js/$lang >> (printf $JS $lang)
|
||||
printf ");\n" >> (printf $JS $lang)
|
||||
end
|
34
bin/tx-push
Executable file
34
bin/tx-push
Executable file
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
set TRANSIFEX "https://www.transifex.com/api/2"
|
||||
|
||||
if [ (count $argv) -ne 1 ]
|
||||
echo "tx-push FILE"
|
||||
exit 2
|
||||
end
|
||||
|
||||
if [ ! -f ~/.transifexrc ]
|
||||
echo "no ~/.transifexrc found"
|
||||
exit 1
|
||||
end
|
||||
|
||||
set user (cat ~/.transifexrc | grep -E "^username" | awk -F " ?= ?" '{ print $2 }')
|
||||
set pass (cat ~/.transifexrc | grep -E "^password" | awk -F " ?= ?" '{ print $2 }')
|
||||
|
||||
set lang (echo $argv | cut -d / -f 5 | cut -d . -f 1)
|
||||
set trans (mktemp -t tx)
|
||||
|
||||
if [ $lang = "en" ]
|
||||
set url "$TRANSIFEX/project/isso/resource/js/content/"
|
||||
else
|
||||
set url "$TRANSIFEX/project/isso/resource/js/translation/$lang/"
|
||||
end
|
||||
|
||||
printf '{"content":' > $trans
|
||||
cat $argv \
|
||||
| sed "s,^define(,,g;\$ s,);,,g" \
|
||||
| python -c 'import json,sys; print json.dumps(sys.stdin.read())' \
|
||||
>> $trans
|
||||
printf '}' >> $trans
|
||||
|
||||
curl -L -u $user:$pass -XPUT $url -H "Content-Type: application/json" -d @$trans
|
@ -30,6 +30,20 @@ Report issues
|
||||
- **Isso-related issues** – Copy and paste traceback into a ticket and provide
|
||||
some details of your usage.
|
||||
|
||||
Translations
|
||||
------------
|
||||
|
||||
Isso supports multiple languages and it is fairly easy to add new translations.
|
||||
You can either use the `english translation file`__ or use Transifex_. Contact
|
||||
me on IRC (@posativ) if you want to be the main contributor for a language.
|
||||
|
||||
You may notice some "weird" newlines in translations -- that's the separator
|
||||
for pluralforms_ in the templating engine.
|
||||
|
||||
.. __: https://github.com/posativ/isso/blob/master/isso/js/app/i18n/en.js
|
||||
.. _Transifex: https://www.transifex.com/projects/p/isso/
|
||||
.. _pluralforms: http://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html?id=l10n/pluralforms
|
||||
|
||||
Where I need help.
|
||||
------------------
|
||||
|
||||
|
@ -1,12 +1,10 @@
|
||||
define({
|
||||
"postbox-text" : "Kommentar hier eintippen (mindestens 3 Zeichen)",
|
||||
"postbox-author" : "Name (optional)",
|
||||
"postbox-email" : "Email (optional)",
|
||||
"postbox-text": "Kommentar hier eintippen (mindestens 3 Zeichen)",
|
||||
"postbox-author": "Name (optional)",
|
||||
"postbox-email": "Email (optional)",
|
||||
"postbox-submit": "Abschicken",
|
||||
|
||||
"num-comments": "1 Kommentar\n{{ n }} Kommentare",
|
||||
"no-comments": "Keine Kommentare bis jetzt",
|
||||
|
||||
"comment-reply": "Antworten",
|
||||
"comment-edit": "Bearbeiten",
|
||||
"comment-save": "Speichern",
|
||||
@ -17,7 +15,6 @@ define({
|
||||
"comment-deleted": "Kommentar gelöscht.",
|
||||
"comment-queued": "Kommentar muss noch freigeschaltet werden.",
|
||||
"comment-anonymous": "Anonym",
|
||||
|
||||
"date-now": "eben jetzt",
|
||||
"date-minute": "vor einer Minute\nvor {{ n }} Minuten",
|
||||
"date-hour": "vor einer Stunde\nvor {{ n }} Stunden",
|
||||
|
@ -3,10 +3,8 @@ define({
|
||||
"postbox-author": "Nom (optionel)",
|
||||
"postbox-email": "Courriel (optionel)",
|
||||
"postbox-submit": "Soumettre",
|
||||
|
||||
"num-comments": "Un commentaire\n{{ n }} commentaires",
|
||||
"no-comments": "Aucun commentaire pour l'instant",
|
||||
|
||||
"comment-reply": "Répondre",
|
||||
"comment-edit": "Éditer",
|
||||
"comment-save": "Enregistrer",
|
||||
@ -17,7 +15,6 @@ define({
|
||||
"comment-deleted": "Commentaire supprimé.",
|
||||
"comment-queued": "Commentaire en attente de modération.",
|
||||
"comment-anonymous": "Anonyme",
|
||||
|
||||
"date-now": "À l'instant'",
|
||||
"date-minute": "Il y a une minute \n{{ n }} minutes",
|
||||
"date-hour": "Il y a une heure\n{{ n }} heures ",
|
||||
|
@ -3,10 +3,8 @@ define({
|
||||
"postbox-author": "Nome (opzionale)",
|
||||
"postbox-email": "E-mail (opzionale)",
|
||||
"postbox-submit": "Invia",
|
||||
|
||||
"num-comments": "Un Commento\n{{ n }} Commenti",
|
||||
"no-comments": "Ancora Nessun Commento",
|
||||
|
||||
"comment-reply": "Rispondi",
|
||||
"comment-edit": "Modifica",
|
||||
"comment-save": "Salva",
|
||||
@ -17,7 +15,6 @@ define({
|
||||
"comment-deleted": "Commento eliminato.",
|
||||
"comment-queued": "Commento in coda per moderazione.",
|
||||
"comment-anonymous": "Anonimo",
|
||||
|
||||
"date-now": "poco fa",
|
||||
"date-minute": "un minuto fa\n{{ n }} minuti fa",
|
||||
"date-hour": "un ora fa\n{{ n }} ore fa",
|
||||
|
@ -1,12 +1,10 @@
|
||||
define({
|
||||
"postbox-text" : "Комментировать здесь (миниум 3 символа)",
|
||||
"postbox-author" : "Имя (необязательно)",
|
||||
"postbox-email" : "Email (необязательно)",
|
||||
"postbox-text": "Комментировать здесь (миниум 3 символа)",
|
||||
"postbox-author": "Имя (необязательно)",
|
||||
"postbox-email": "Email (необязательно)",
|
||||
"postbox-submit": "Отправить",
|
||||
|
||||
"num-comments": "1 Комментарий\n{{ n }} Комментарии",
|
||||
"no-comments": "Нет Комментарев",
|
||||
|
||||
"comment-reply": "Ответить",
|
||||
"comment-edit": "Правка",
|
||||
"comment-save": "Сохранить",
|
||||
@ -17,7 +15,6 @@ define({
|
||||
"comment-deleted": "Удалить комментарий",
|
||||
"comment-queued": "Комментарий должен быть разблокирован",
|
||||
"comment-anonymous": "Аномимый",
|
||||
|
||||
"date-now": "Сейчас",
|
||||
"date-minute": "Минут назад\n{{ n }} минут",
|
||||
"date-hour": "Час назад\n{{ n }} часов",
|
||||
|
Loading…
Reference in New Issue
Block a user