From 8b0388f8a5782939e215751fe273031ed1d1487f Mon Sep 17 00:00:00 2001 From: Matias De lellis Date: Sat, 2 Nov 2019 21:09:44 -0300 Subject: [PATCH] Use transifex to translations --- .gitignore | 4 +++- .tx/config | 10 ++++++++++ Makefile | 25 +++++++++++++++++++++++++ l10n/es.js | 19 ++++++++++--------- l10n/es.json | 17 +++++++++-------- 5 files changed, 57 insertions(+), 18 deletions(-) create mode 100644 .tx/config diff --git a/.gitignore b/.gitignore index a951c91..1dd7fba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ build js/templates.js node_modules -vendor \ No newline at end of file +vendor +translationfiles/ +translationtool.phar \ No newline at end of file diff --git a/.tx/config b/.tx/config new file mode 100644 index 0000000..438682e --- /dev/null +++ b/.tx/config @@ -0,0 +1,10 @@ +[main] +host = https://www.transifex.com + +[quicknotes.quicknotes-pot] +file_filter = translationfiles//quicknotes.po +minimum_perc = 0 +source_file = translationfiles/templates/quicknotes.pot +source_lang = en +type = PO + diff --git a/Makefile b/Makefile index d5780a7..9123d62 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,31 @@ cert_dir=$(HOME)/.nextcloud/certificates all: build build: deps +# L10N Rules + +l10n-update-pot: + php translationtool.phar create-pot-files + +l10n-transifex-pull: + tx pull -s -a + +l10n-transifex-push: + tx push -s -t + +l10n-transifex-apply: + php translationtool.phar convert-po-files + +l10n-clean: + rm -rf translationfiles + rm -f translationtool.phar + +l10n-deps: + @echo "Checking transifex client." + tx --version + @echo "Downloading translationtool.phar" + wget https://github.com/nextcloud/docker-ci/raw/master/translations/translationtool/translationtool.phar -O translationtool.phar + + # general deps: mkdir -p vendor diff --git a/l10n/es.js b/l10n/es.js index 4c8b5df..e50fba4 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -1,16 +1,17 @@ OC.L10N.register( "quicknotes", { - "Quick notes" : "Notas rapidas", - "Nothing here. Take your quick notes." : "Nada aquí. Toma tus notas rapidas.", + "Quick notes" : "Notas rápidas", + "Cancel" : "Cancelar", + "Save" : "Guardar", + "Looking for your notes" : "Buscando tus notas", + "Nothing here. Take your first quick notes" : "Nada aquí. Toma tus primeras notas rápidas", + "Are you sure you want to delete the note?" : "¿Seguro que quieres eliminar la nota?", + "Delete note" : "Eliminar nota", "New note" : "Nueva nota", "All notes" : "Todas las notas", - "Shared with you" : "Compartido contigo", - "Shared with others" : "Compartido con otros", "Colors" : "Colores", "Notes" : "Notas", - "Share" : "Compartir", - "Cancel" : "Cancelar", - "Save" : "Guardar" -} -); + "Quick notes with a basic rich text" : "Notas rápidas con un texto enriquecido básico" +}, +"nplurals=2; plural=(n != 1);"); diff --git a/l10n/es.json b/l10n/es.json index 198337d..8548888 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -1,14 +1,15 @@ { "translations": { - "Quick notes" : "Notas rapidas", - "Nothing here. Take your quick notes." : "Nada aquí. Toma tus notas rapidas.", + "Quick notes" : "Notas rápidas", + "Cancel" : "Cancelar", + "Save" : "Guardar", + "Looking for your notes" : "Buscando tus notas", + "Nothing here. Take your first quick notes" : "Nada aquí. Toma tus primeras notas rápidas", + "Are you sure you want to delete the note?" : "¿Seguro que quieres eliminar la nota?", + "Delete note" : "Eliminar nota", "New note" : "Nueva nota", "All notes" : "Todas las notas", - "Shared with you" : "Compartido contigo", - "Shared with others" : "Compartido con otros", "Colors" : "Colores", "Notes" : "Notas", - "Share" : "Compartir", - "Cancel" : "Cancelar", - "Save" : "Guardar" -} + "Quick notes with a basic rich text" : "Notas rápidas con un texto enriquecido básico" +},"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file