From cb48cb6cfc97a8037069f76f2085570613116ee9 Mon Sep 17 00:00:00 2001 From: Rodrigo Tobar Date: Sun, 10 Jul 2022 23:01:52 +0800 Subject: [PATCH 1/2] =?UTF-8?q?A=C3=B1ade=20nuevo=20script=20para=20ordena?= =?UTF-8?q?r=20l=C3=ADneas=20de=20texto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit El ordenamiento se hace usando el colaje de cadenas de texto del locale actual, y sobre stdin, haciendo la herramienta lo más flexible posible. Signed-off-by: Rodrigo Tobar --- requirements.txt | 1 + scripts/sort.py | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 scripts/sort.py diff --git a/requirements.txt b/requirements.txt index 7103dd2bdc..895e98302e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ pip==21.1 Sphinx==3.2.1 blurb +PyICU polib pospell>=1.1 potodo diff --git a/scripts/sort.py b/scripts/sort.py new file mode 100644 index 0000000000..98739a3f7f --- /dev/null +++ b/scripts/sort.py @@ -0,0 +1,8 @@ +import sys + +import icu + + +collator = icu.Collator.createInstance(icu.Locale()) +sorted_entries = sorted(sys.stdin, key=collator.getSortKey) +print("".join(sorted_entries), end='') From c68037eb9838482bedccfe884fea72a0eb62a63a Mon Sep 17 00:00:00 2001 From: Rodrigo Tobar Date: Sun, 10 Jul 2022 23:03:01 +0800 Subject: [PATCH 2/2] Agrega paso a CI para chequear orden en TRANSLATORS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cuando nueva gente se agregue a sí misma a la lista de autores en TRANSLATORS, este nuevo paso en GitHub actions corroborará que el archivo TRANSLATORS sigue estando ordenado alfabéticamente, y generará un error de no ser éste el caso. Signed-off-by: Rodrigo Tobar --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ce3f782041..f7bc273a5c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,11 +22,14 @@ jobs: - name: Instalar dependencias run: | sudo apt-get update - sudo apt-get install -y hunspell hunspell-es gettext + sudo apt-get install -y hunspell hunspell-es gettext language-pack-es python -m pip install -r requirements.txt pip list pospell --version powrap --version + - name: TRANSLATORS + run: | + diff -Naur TRANSLATORS <(LANG=es python scripts/sort.py < TRANSLATORS) - name: Powrap run: powrap --check --quiet **/*.po - name: Pospell