Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 29d216b

Browse filesBrowse files
authored
Chequea orden en TRANSLATORS (#1830)
* Añade nuevo script para ordenar líneas de texto 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 <rtobar@icrar.org> * Agrega paso a CI para chequear orden en TRANSLATORS 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 <rtobar@icrar.org>
1 parent bbfed35 commit 29d216b
Copy full SHA for 29d216b

File tree

Expand file treeCollapse file tree

3 files changed

+13
-1
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+13
-1
lines changed

‎.github/workflows/main.yml

Copy file name to clipboardExpand all lines: .github/workflows/main.yml
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ jobs:
2222
- name: Instalar dependencias
2323
run: |
2424
sudo apt-get update
25-
sudo apt-get install -y hunspell hunspell-es gettext
25+
sudo apt-get install -y hunspell hunspell-es gettext language-pack-es
2626
python -m pip install -r requirements.txt
2727
pip list
2828
pospell --version
2929
powrap --version
30+
- name: TRANSLATORS
31+
run: |
32+
diff -Naur TRANSLATORS <(LANG=es python scripts/sort.py < TRANSLATORS)
3033
- name: Powrap
3134
run: powrap --check --quiet **/*.po
3235
- name: Pospell

‎requirements.txt

Copy file name to clipboardExpand all lines: requirements.txt
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
pip==21.1
22
Sphinx==3.2.1
33
blurb
4+
PyICU
45
polib
56
pospell>=1.1
67
potodo

‎scripts/sort.py

Copy file name to clipboard
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import sys
2+
3+
import icu
4+
5+
6+
collator = icu.Collator.createInstance(icu.Locale())
7+
sorted_entries = sorted(sys.stdin, key=collator.getSortKey)
8+
print("".join(sorted_entries), end='')

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.