Skip to content

Commit 23025ce

Browse files
committed
[RO] Fix head sections matching
1 parent 6d5df41 commit 23025ce

File tree

3 files changed

+35
-44
lines changed

3 files changed

+35
-44
lines changed

tests/data/ro/frumoși.wiki

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/test_ro.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ def setup_lua_ctx() -> None:
7777
["fie", "fost", "sunt"],
7878
),
7979
("frumoasă", ["/fru'mo̯a.sə/"], [], {}, ["frumos"], []),
80-
("frumoși", ["[fruˈmoʃʲ]"], [], {}, ["frumos"], []),
8180
(
8281
"Lama",
8382
[],

wikidict/lang/ro/__init__.py

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -18,42 +18,43 @@
1818
section_sublevels = (3,)
1919
head_sections = ("{{limba|ron}}", "{{limba|ro}}", "{{limba|conv}}")
2020
etyl_section = ("{{etimologie}}",)
21+
core_sections = (
22+
"abr",
23+
"abreviere",
24+
"adjectiv",
25+
"adjective",
26+
"adverb",
27+
"articol",
28+
"conjuncție",
29+
"cuvânt compus",
30+
"expr",
31+
"expresie",
32+
"interjecție",
33+
"locuțiune adjectivală",
34+
"locuțiune adverbială",
35+
"locuțiune",
36+
"numeral colectiv",
37+
"numeral",
38+
"nume propriu",
39+
"nume taxonomic",
40+
"participiu",
41+
"prefix",
42+
"prepoziție",
43+
"pronume",
44+
"substantiv",
45+
"sufix",
46+
"simbol",
47+
"unități",
48+
"verb auxiliar",
49+
"verb copulativ",
50+
"verb predicativ",
51+
"verb tranzitiv",
52+
"verb",
53+
)
2154
sections = (
2255
*etyl_section,
23-
"{{abr}",
24-
"{{abreviere}",
25-
"{{adjectiv}",
26-
"{{adjective}",
27-
"{{adverb}",
28-
"{{articol}",
29-
"{{conjuncție}",
30-
"{{cuvânt compus}",
31-
"{{expr}",
32-
"{{expresie}",
33-
"{{expresie|ro",
34-
"{{interjecție}",
35-
"{{locuțiune adjectivală}",
36-
"{{locuțiune adverbială}",
37-
"{{locuțiune}",
38-
"{{numeral colectiv}",
39-
"{{numeral}",
40-
"{{nume propriu}",
41-
"{{nume propriu|ro",
42-
"{{nume taxonomic|conv}",
43-
"{{participiu}",
44-
"{{prefix}",
45-
"{{prepoziție}",
46-
"{{pronume}",
47-
"{{pronume|ro",
48-
"{{substantiv}",
49-
"{{sufix}",
50-
"{{simbol|conv}",
51-
"{{unități}",
52-
"{{verb auxiliar}",
53-
"{{verb copulativ}",
54-
"{{verb predicativ}",
55-
"{{verb tranzitiv}",
56-
"{{verb}",
56+
*[f"{{{{{section}}}" for section in core_sections],
57+
*[f"{{{{{section}|" for section in core_sections],
5758
)
5859

5960
variant_titles = tuple(section for section in sections if section not in etyl_section)

0 commit comments

Comments
 (0)