Skip to content

Commit

Permalink
[hu_Hung] tdf#148672 fix transliteration with parentheses
Browse files Browse the repository at this point in the history
Fix transliteration of words with hyphens sent by LibreOffice
in the form of prefix and zero, etc. "(word) 0", "[word] 0",
"(word 0", "word) 0" etc.
  • Loading branch information
laszlonemeth committed Nov 3, 2022
1 parent f8c2e98 commit ee27941
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions data/hu_Hung.sor
Expand Up @@ -2,6 +2,10 @@

# Transliterate numbers and words

# parentheses
"([\(\[\{])(.*)([]\)\}]) 0$" \1$2\3
"([\(\[\{])(.*) 0$" \1$2
"(.*)([]\)\}]) 0$" $1\2
# convert words with traditional or foreign "i" written as "y"
# e.g. Áprily, Champs-Élysées, Élysée-palota, Dolly, Folly, Hollywood, jolly, intercity, Kisfaludy ...
"^(Áp​?ri​?l|Champs-Él|[cC]i​?t|Do​?lák-Sa​?l|[dfhjDFHJ]ol​?l|Él|Fesz​?t|[gG]rizz​?l|Ha​?rasz​?t|Hat​?va​?n|Husz​?t|[iI]n​?ter​?ci​?t|Jé​?ke​?l|Kis​?fa​?lu​?d|Ku​?ko​?r​?el​?l|Mo​?ho​?l|Mind​?szen​?t|Nosz​?t|[pP]en​n|Pes​?t|Re​?gu​?l|So​?n|Szi​?l|Szte​?va​?no​?vi​?t|Vö​?rös​?mar​?t|[zZ][lł]ot)y(.*) 0$" $1𐳐$2
Expand Down
9 changes: 9 additions & 0 deletions test/hu_Hung.in
Expand Up @@ -17,6 +17,15 @@ pontosvessző;
„𐳐𐳇𐳋𐳯𐳟𐳒𐳉𐳖”?
„𐳐𐳇𐳋𐳯𐳟𐳒𐳉𐳖”,
„𐳐𐳇𐳋𐳯𐳟𐳒𐳉𐳖”;
(parentheses) 0
[parentheses] 0
{parentheses} 0
(parenthesis 0
parenthesis) 0
[parenthesis 0
parenthesis] 0
{parenthesis 0
parenthesis} 0
Händel 0
Molière 0
IQ 0
Expand Down
9 changes: 9 additions & 0 deletions test/hu_Hung.out
Expand Up @@ -17,6 +17,15 @@
⹂𐳐𐳇𐳋𐳯𐳟𐳒𐳉𐳖‟⸮
⹂𐳐𐳇𐳋𐳯𐳟𐳒𐳉𐳖‟⹁
⹂𐳐𐳇𐳋𐳯𐳟𐳒𐳉𐳖‟⁏
(𐳠𐳀𐳢𐳉𐳙𐳦𐳏𐳉𐳤𐳉𐳤)
[𐳠𐳀𐳢𐳉𐳙𐳦𐳏𐳉𐳤𐳉𐳤]
{𐳠𐳀𐳢𐳉𐳙𐳦𐳏𐳉𐳤𐳉𐳤}
(𐳠𐳀𐳢𐳉𐳙𐳦𐳏𐳉𐳤𐳐𐳤
𐳠𐳀𐳢𐳉𐳙𐳦𐳏𐳉𐳤𐳐𐳤)
[𐳠𐳀𐳢𐳉𐳙𐳦𐳏𐳉𐳤𐳐𐳤
𐳠𐳀𐳢𐳉𐳙𐳦𐳏𐳉𐳤𐳐𐳤]
{𐳠𐳀𐳢𐳉𐳙𐳦𐳏𐳉𐳤𐳐𐳤
𐳠𐳀𐳢𐳉𐳙𐳦𐳏𐳉𐳤𐳐𐳤}
𐲏𐳋𐳙𐳇𐳉𐳖
Molière
IQ
Expand Down

0 comments on commit ee27941

Please sign in to comment.