Skip to content

Commit

Permalink
feat: new locale [EO] Esperanto (#2253)
Browse files Browse the repository at this point in the history
  • Loading branch information
BoboTiG authored Nov 8, 2024
1 parent d91363e commit c552d51
Show file tree
Hide file tree
Showing 29 changed files with 1,457 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/auto-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- "de"
- "el"
- "en"
- "eo"
- "es"
- "fr"
- "it"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ jobs:
- "ca"
- "da"
- "de"
# - "el"
- "el"
- "en"
- "eo"
- "es"
- "fr"
- "it"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
1. <small>`[DE]`</small> [German](docs/de/README.md)
1. <small>`[EL]`</small> [Greek](docs/el/README.md)
1. <small>`[EN]`</small> [English](docs/en/README.md)
1. <small>`[EO]`</small> [Esperanto](docs/eo/README.md)
1. <small>`[ES]`</small> [Spanish](docs/es/README.md)
1. <small>`[FR]`</small> [French](docs/fr/README.md) ([news](https://www.mobileread.com/forums/showthread.php?t=330223&page=2))
1. <small>`[IT]`</small> [Italian](docs/it/README.md)
Expand Down
20 changes: 20 additions & 0 deletions docs/eo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Esperanto Dictionary For Your eBook Reader

**eBook Reader Dictionaries** is a collaborative project using the vast [Wiktionary](https://da.wiktionary.org/) database to create a full dictionary, updated on a daily basis.

## Interesting Features

- [Kobo] When selecting a plural word, its singular form will be displayed.
- [Kobo] When selecting a conjugated verb, its infinitive version will be displayed. → [ate](screenshot-ate.png)
- [Kobo] When a word is the plural form of another, and also a form of a verb, all versions are displayed. <!-- → [](screenshot-.png) -->
- If a word contains several pronunciations, or genders, all are available. → [board](screenshot-board.png)
- Mathematic formulas are converted to SVG. → [Pythagorean trigonometric identity](screenshot-pythagorean_trigonometric_identity.png)
- Hieroglyphs are supported. → [tjaty](screenshot-tjaty.png)

## Downloads

https://github.com/BoboTiG/ebook-reader-dict/releases/tag/eo

## Installation

Copy the dictionnary inside the `.kobo/custom-dict/` folder on your eBook reader.
Binary file added docs/eo/screenshot-ate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/eo/screenshot-board.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/eo/screenshot-tjaty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions scripts/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"en-labels.py": "wikidict/lang/en/labels.py",
"en-langs.py": "wikidict/lang/en/langs.py",
"en-places.py": "wikidict/lang/en/places.py",
"eo-langs.py": "wikidict/lang/eo/langs.py",
"eo-tags.py": "wikidict/lang/eo/tags.py",
"es-langs.py": "wikidict/lang/es/langs.py",
"es-campos-semanticos.py": "wikidict/lang/es/campos_semanticos.py",
"fr-domain-templates.py": "wikidict/lang/fr/domain_templates.py",
Expand Down
3 changes: 2 additions & 1 deletion scripts/all-namespaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
ids = {6, 14} # File, and Category

results: dict[str, list[str]] = {}
locales = ("ca", "da", "de", "el", "en", "es", "fr", "it", "no", "pt", "ro", "ru", "sv")
# XXX_LOCALES
locales = ("ca", "da", "de", "el", "en", "eo", "es", "fr", "it", "no", "pt", "ro", "ru", "sv")

for locale in locales:
result_discard_last: list[str] = []
Expand Down
18 changes: 18 additions & 0 deletions scripts/eo-langs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from scripts_utils import get_content

text = get_content("https://eo.wiktionary.org/w/index.php?title=%C5%9Cablono:tbllingvoj&action=raw")
text = text.split("############################################################")[1].strip()

langs = {}
for line in text.splitlines():
if not line:
continue
line = line.split(",", 1)[0]
line = line.replace("[[", "").replace("]]", "")
key, value = line.split(" ", 1)
langs[key.strip()] = value.strip()

print("langs = {")
for key, value in sorted(langs.items()):
print(f' "{key}": "{value}",')
print(f"}} # {len(langs):,}")
18 changes: 18 additions & 0 deletions scripts/eo-tags.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import re

from scripts_utils import get_content

text = get_content("https://eo.wiktionary.org/wiki/Modulo:mtagg?action=raw")

# Special treatment
text = text.replace('"ava"..string.char(197,173)', f'"ava{chr(197)}{chr(173)}"')

# Uniformize maps
# contabtt ['ASKI'] = 'askia signo' → contabtt["ASKI"] = "askia signo"
text = re.sub(r"contabtt \['([^']+)'\] = '([^'|]+)'", r'contabtt["\1"] = "\2"', text)

tags = re.findall(r'^\s+contab\w+\s*\["([^"]+)"\]\s*=\s*"([^"|]+)', text, flags=re.MULTILINE)
print("tags = {")
for key, value in sorted(tags):
print(f' "{key}": "{value}",')
print(f"}} # {len(tags):,}")
11 changes: 11 additions & 0 deletions tests/data/eo/Teodoriko.wiki
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
=={{Lingvo|eo}}==
{{Etimologio}}
: El la itala.
==={{Vortospeco|persona nomo|eo}}, {{g|m}}===

{{Ekzemploj}}
:[1] '''''Teodoriko''''', dirita la Granda, estis reĝo de ostrogotoj ekde 474 kaj reĝo de Italujo ekde 493 ĝis 526, dua ĝermana reĝo de Romo.
===={{Tradukoj}}====
# [[Théodoric]], [[Thierry]].
24 changes: 24 additions & 0 deletions tests/data/eo/alkazabo.wiki
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{Vorto de la semajno|45|2011}}{{Vorto de la semajno|45|2012}}{{Vorto de la semajno|45|2013}}

=={{Lingvo|eo}}==

==={{Vortospeco|substantivo|eo}}===
{{Deklinacio-eo}}
{{bildodek|Almeria Alcazaba (fcm).jpg|'''alkazabo''' de Almería}}

{{Deveno}}
: el la [[andalus-araba]] ''[[alqaṣába]]'', kaj tiu ĉi el la klasika [[araba]] ''[[qaṣabah]]'', [[قصبة]]
===={{Signifoj}}====
# {{k|eo|F: historio|arkitekturo|militado}} fortikita konstruaĵaro; [[citadelo]] [[]] [[palaco]] [[de]] [[araba]] [[ĉefo]] en [[Nord-Afriko]] kaj [[Suda-Hispanio]] <ref>[http://vortaro.net/#Alkazabo Alkazabo en vortaro.net]</ref>
===={{Tradukoj}}====
{{trad-eko}}
* franca: {{t|fr|alcazaba|f}}, {{t|fr|citadelle|f}}, casbah
* germana: {{t|de|Alcazaba|f}}, {{t|de|Festung|f}}
{{trad-mezo}}
* hispana: {{t|es|alcazaba|f}}
* itala: {{t|it|alcazaba|f}}, {{t|it|cittadella|f}}
{{trad-fino}}

{{Referencoj}}
4 changes: 4 additions & 0 deletions tests/data/eo/ekamus.wiki
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
=={{Lingvo|eo}}==
==={{Vortospeco|verba formo|eo}}===

{{form-eo}}
40 changes: 40 additions & 0 deletions tests/data/eo/kaskedo.wiki
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
=={{Lingvo|eo}}==
{{8}}
==={{Vortospeco|substantivo|eo}}===
[[Dosiero:Casquette a helice.jpg|thumb|[1] '''''kaskedo''''']]
{{Deklinacio-eo}}

{{Vorterseparo}}
:kasked/o.
===={{Signifoj}}====
:[1] Ĉapo kun viziero, civilvesta aŭ uniforma: ''homoj armitaj en nigraj kaskedetoj{{ref-Grabowski}}; la hotela pordisto levis sian kaskedon.''
{{Ekzemploj}}
:[1] Volis
:la ĝardenisto pajlan ĉapelon,
:la ŝipisto maristan ĉapon,
:la ĵurnalisto kvadratitan ''kaskedon'',
:la ĉambristino puntan kufon,
:la ĝendarmo militistan kepon,
:la ĉampano [[korko]]n,
:la ĝemelo du supersignojn,
:la ĵonglisto tri aŭ kvar...<ref>{{La milito de la ĉapeloj}}</ref>
===={{Tradukoj}}====
{{trad-eko}}
*dana: [1] {{t|da|kasket}} {{g|u}}
*franca: [1] {{t|fr|casquette}} {{g|f}}
{{trad-mezo}}

{{trad-fino}}

{{Referencoj}}
* {{vikipedenlin|kaskedo}}
* {{ref-ReVo|kaskedo}}
* {{ref-PIV}}
* {{ref-Tato|eo}}
* {{ref-Simpla Vortaro|kaskedo}}
{{Fontoj}}
37 changes: 37 additions & 0 deletions tests/data/eo/komputilo.wiki
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{{vikipedio}}

== Esperanto ==
=== Substantivo ===
{{livs|eo|SB|fra=[L:komput(i)]+[I:il]+[U:o]}}
{{Deklinacio-eo}}
{{bildodek|ThinkCentre_S50.jpg}}
{{bildodek|ENIAC-changing_a_tube.jpg|tre granda kaj malnova '''komputilo'''|Raspberry_Pi_4_Model_B_-_Side.jpg|malgranda nova '''komputilo'''}}

===={{Signifoj}}====
# {{k|eo|F: komputado}} [[maŝino]] aŭ [[elektronikaĵo]] kiu kapablas [[kalkuli]], precipe sen intervenoj de homoj, aŭ rapide trakti, stori, kaj preni larĝajn kvantojn de [[datumo]]
{{Sinonimoj}}
''(arkaikaj kaj evitendaj)'' [[komputero]], [[komputoro]], [[komputatoro]]

===={{Tradukoj}}====
{{trad-eko}}
* angla: {{t|en|computer}}
* finna: {{t|fi|tietokone}}
* franca: '''1., 2.''' {{t|fr|calculatrice}} {{g|f}}, {{t|fr|ordinateur}} {{g|m}}
* germana: '''1., 2.''' {{t|de|Computer}} {{g|m}}, {{t|de|Rechner}} {{g|m}}
* hispana: '''1., 2.''' {{t|es|ordenador}} {{g|m}}, {{t|es|computadora}} {{g|f}}, {{t|es|computador}} {{g|m}}
* indonezia: {{t|id|komputer}}
* kroata: '''1., 2.''' {{t|hr|računalo}}, {{t|hr|kompjuter}}
{{trad-mezo}}
* nederlanda: '''1., 2.''' {{t|nl|computer|m}}
* pola: '''1., 2.''' {{t|pl|komputer}} {{g|m}}
* portugala: '''1., 2.''' {{t|pt|computador}} {{g|m}}
* rusa: {{t|ru|компьютер|m}}, {{t|ru|ЭВМ|f}}
* sveda: {{t|sv|dator|u}}
{{trad-fino}}

{{Referencoj}}
* {{ref-PIV}}
* {{ref-Simpla Vortaro|{{PAGENAME}}}}
* {{ref-Majstro|{{PAGENAME}}}}
* {{ref-Tato|eo}}
20 changes: 20 additions & 0 deletions tests/data/eo/latina.wiki
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
=={{Lingvo|eo}}==

{{Etimologio}}
De [[Latino]]

=== Adjektivo ===
#rilata al [[Latino]].
===={{Tradukoj}}====
{{trad-eko}}
* angla: {{t|en|Latin}}
* franca: {{t|fr|latin}}
{{trad-mezo}}
* germana: {{t|de|lateinisch}}
{{trad-fino}}

{{Referencoj}}
* {{ref-Majstro|latina}}
[[Kategorio:Radiko latin']]
55 changes: 55 additions & 0 deletions tests/data/eo/luko.wiki
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
=={{Lingvo|eo}}==
{{8}}
==={{Vortospeco|substantivo|eo}}===

{{Deklinacio-eo}}

{{Deveno}}
:el la germana ''[[Luke]]''
{{Vorterseparo}}
:luk/o.
===={{Signifoj}}====
:Aperturo:
:[1] ordinare vitrita aŭ kradita, en tegmento, plafono aŭ kelo, por enlasi lumon: ''mansarda luko''.
:[2] fermebla per pordo aŭ tabuloj, en la ferdeko de ŝipo, por ebligi penetron en la holdon (pli precize: holdluko).
:[3] fermita per kovrilo el giso, kiu en la strato, sur trotuaro ks ebligas al metiisto malsupreniri en kloakon, aŭ subteran galerion.
{{Sinonimoj}}
:[1] lumluko, bovokulo, vazistaso.
{{Derivaĵoj}}
:[1]
{{Derivaĵoj}}
:[[luketo]]. Malgranda luko en pordo tra kiu oni povas ekvidi la personon, kiu sonoris.
:[[lumluko]]. luko 1.
===={{Tradukoj}}====
{{trad-eko}}
*angla: [1] {{t|en|bull's eye}}, {{t|en|porthole}}, port hole
*franca: [1] {{t|fr|lucarne}} {{g|f}}, {{t|fr|sabord}} {{g|m}}
*germana: [1] {{t|de|Bullauge}} {{g|n}}, {{t|de|Dachfenster}}, {{t|de|Deckenfenster}}, {{t|de|Mansardenfenster}}, {{t|de|Luke}}, {{t|de|Dachluke}}
*malaltgermana: [1] {{t|nds|Bulloog}}
*pola: [1] {{t|pl|bulaj}} {{g|m}}, {{t|pl|iluminator}} {{g|m}}, {{t|pl|świetlik}} {{g|m}}
{{trad-mezo}}
*portugala: [1] {{t|pt|vigia}} {{g|f}}
*hispana: [1] {{t|es|ojo de buey}}, {{t|es|escudilla}}
*sveda: [1] {{t|sv|ventil}}, {{t|sv|oxöga}} (veraltet), {{t|sv|fönsterventil}} {{g|u}}
{{trad-fino}}

{{Referencoj}}
{{vikipedio|luko}}
* {{ref-ReVo|luko}}
* {{ref-PIV}}
* {{ref-Tato|eo}}
* {{ref-Simpla Vortaro|luko}}
{{Fontoj}}

{{Similaĵoj}}
:
[[Kategorio:Dubinda (Esperanto)]]
9 changes: 9 additions & 0 deletions tests/data/eo/♍.wiki
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{character info}}
=={{Lingvo|mul}}==
==={{Vortospeco|signo|mul}}===

===={{Signifoj}}====
# {{k|mul|F: astrologio}} zodiaka signo de [[Virgulino]] (''[[Virgo]]'')
{{nevideblafinodesekcio}}
{{emojibox}}
8 changes: 8 additions & 0 deletions tests/data/eo/💀.wiki
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
== translingva ==
=== Signo ===
{{livs|mul|KK}}
{{signo|des=SKULL}}
{{k|mul|T: BILD.}}

===={{Signifoj}}====
# morto
Loading

0 comments on commit c552d51

Please sign in to comment.