From 1b08bfcaf99ab96653684222665318ce8a3945ee Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Sat, 11 Jul 2020 13:04:39 +0200 Subject: [PATCH 1/2] Use one dictionary per file We had a lot of conflict using a shared `dict` file for all the PRs. We are using a simpler approach now where we create a dictionary file per .po translated to avoid this conflicts. When calling pospell, we concatenate all these files together and use the result to call pospell properly. --- .overrides/faq.rst | 12 ++++++++++++ .travis.yml | 3 ++- Makefile | 3 ++- dictionaries/library_decimal.txt | 0 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 dictionaries/library_decimal.txt diff --git a/.overrides/faq.rst b/.overrides/faq.rst index 66a5cdcf24..6c12abc355 100644 --- a/.overrides/faq.rst +++ b/.overrides/faq.rst @@ -61,6 +61,18 @@ Estamos trabajando para unificar el uso de un mismo set de diccionarios de espa pero por el momento el chequeo que hacemos es con los diccionarios es_AR y es_ES. +¿Cómo agrego una palabra al diccionario? +---------------------------------------- + +Si ``pospell`` falla diciendo que no conoce una palabra, pero estamos seguros que esa palabra está bien escrita, +debemos agregarla al diccionario que ``pospell`` usa internamente para comprobar las palabras. + +Para eso debes editar (o crear, si no existe) el archivo ``.txt`` dentro del direcorio ``dictionaries`` +y agregar esa palabra al final de este archivo. +Nota que debes reemplazar ```` por el nombre del archivo que estés traduciendo. +Por ejemplo, si estás traduciendo ``library/decimal.po``, debes editar/crear el archivos ``dictionaries/library_decimal.txt``. + + ¿Cómo puedo configurar git para manejar correctamente los finales de línea en Windows? -------------------------------------------------------------------------------------- diff --git a/.travis.yml b/.travis.yml index 9ce8012632..03d82837ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,8 @@ install: - powrap --version script: - powrap --check --quiet **/*.po - - pospell -p dict -l es_AR -l es_ES **/*.po + - cat dict dictionaries/*.txt > dict.txt + - pospell -p dict.txt -l es_AR -l es_ES **/*.po - make build branches: only: diff --git a/Makefile b/Makefile index 96a1da6d8b..5e757d1e9b 100644 --- a/Makefile +++ b/Makefile @@ -89,7 +89,8 @@ progress: venv .PHONY: spell spell: venv - $(VENV)/bin/pospell -p dict -l es_ES **/*.po + cat dict dictionaries/*.txt > dict.txt + $(VENV)/bin/pospell -p dict.txt -l es_ES **/*.po .PHONY: wrap diff --git a/dictionaries/library_decimal.txt b/dictionaries/library_decimal.txt new file mode 100644 index 0000000000..e69de29bb2 From 63d3de80d6de6cb1bdb11f7366a721c759e2bef9 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Sat, 11 Jul 2020 20:28:55 +0200 Subject: [PATCH 2/2] Add dict.txt to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index c1e21a97c0..b9e07464df 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ Doc/CONTRIBUTING.rst Doc/translation-memory.rst Doc/upgrade-python-version.rst locales/ +dict.txt # Byte-compiled / optimized / DLL files __pycache__/