From ee279414dea4d333e225ed7c327d362f536da991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20N=C3=A9meth?= Date: Thu, 3 Nov 2022 22:04:52 +0100 Subject: [PATCH] [hu_Hung] tdf#148672 fix transliteration with parentheses 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. --- data/hu_Hung.sor | 4 ++++ test/hu_Hung.in | 9 +++++++++ test/hu_Hung.out | 9 +++++++++ 3 files changed, 22 insertions(+) diff --git a/data/hu_Hung.sor b/data/hu_Hung.sor index 2ea056c..7df95f1 100644 --- a/data/hu_Hung.sor +++ b/data/hu_Hung.sor @@ -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 diff --git a/test/hu_Hung.in b/test/hu_Hung.in index 2cccde0..b9324e2 100644 --- a/test/hu_Hung.in +++ b/test/hu_Hung.in @@ -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 diff --git a/test/hu_Hung.out b/test/hu_Hung.out index a3d559d..3ddd6dd 100644 --- a/test/hu_Hung.out +++ b/test/hu_Hung.out @@ -17,6 +17,15 @@ ⹂𐳐𐳇𐳋𐳯𐳟𐳒𐳉𐳖‟⸮ ⹂𐳐𐳇𐳋𐳯𐳟𐳒𐳉𐳖‟⹁ ⹂𐳐𐳇𐳋𐳯𐳟𐳒𐳉𐳖‟⁏ +(𐳠𐳀𐳢𐳉𐳙𐳦𐳏𐳉𐳤𐳉𐳤) +[𐳠𐳀𐳢𐳉𐳙𐳦𐳏𐳉𐳤𐳉𐳤] +{𐳠𐳀𐳢𐳉𐳙𐳦𐳏𐳉𐳤𐳉𐳤} +(𐳠𐳀𐳢𐳉𐳙𐳦𐳏𐳉𐳤𐳐𐳤 +𐳠𐳀𐳢𐳉𐳙𐳦𐳏𐳉𐳤𐳐𐳤) +[𐳠𐳀𐳢𐳉𐳙𐳦𐳏𐳉𐳤𐳐𐳤 +𐳠𐳀𐳢𐳉𐳙𐳦𐳏𐳉𐳤𐳐𐳤] +{𐳠𐳀𐳢𐳉𐳙𐳦𐳏𐳉𐳤𐳐𐳤 +𐳠𐳀𐳢𐳉𐳙𐳦𐳏𐳉𐳤𐳐𐳤} 𐲏𐳋𐳙𐳇𐳉𐳖 Molière IQ