i18npool/qa/cppunit/test_breakiterator.cxx | 12 +++++++++++- i18npool/source/breakiterator/data/dict_word_hu.txt | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-)
New commits: commit bf46bb82fa3e56f72a481edc05873355a89ccddc Author: László Németh <[email protected]> AuthorDate: Fri Dec 26 09:51:34 2025 +0100 Commit: Adolfo Jayme Barrientos <[email protected]> CommitDate: Mon Dec 29 10:29:37 2025 +0100 tdf#162514 i18npool: fix Hungarian ordinal numbers with affix Restores Hungarian break iterator by recognizing ordinal numbers with affixes, e.g. "50.-et" etc. (to spell checking bad forms, like "50.-at"). Regression from commit 44699b3de37f07090ac6fee1cd97aa76036e9700 "tdf#49885 BreakIterator rule upgrades". Follow-up to commit f4fe6df6aa92573368c3fa0edb9fd03e64d9d059 "tdf#162514 i18npool: Handle abbreviations in dictionary breakiterator" and commit 167bbe31c0620d6ca1c4640a81f2e759f8f65e6a "tdf#162514 i18npool: apply fix for Hungarian abbreviations, too". Change-Id: I6b6ea363a509a9d8af8330330f78cc23c210d107 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196225 Tested-by: Jenkins Reviewed-by: László Németh <[email protected]> (cherry picked from commit 09b5b77e0242170149aa7abbd2ed1c4ff4d9f5b3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196243 Reviewed-by: Xisco Fauli <[email protected]> (cherry picked from commit aca0543d65aa46c45d82487f061f479fdb5cf3a7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196265 Reviewed-by: Adolfo Jayme Barrientos <[email protected]> diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx index 5e443bec8fdc..ae2e5af4e5e9 100644 --- a/i18npool/qa/cppunit/test_breakiterator.cxx +++ b/i18npool/qa/cppunit/test_breakiterator.cxx @@ -1844,7 +1844,7 @@ void TestBreakIterator::testDictWordAbbreviationHU() for (const auto& rLocale : aLocale) { - auto aTest = u"Pl. stb. dr.-ral Mo.-gal"_ustr; + auto aTest = u"Pl. stb. dr.-ral Mo.-gal 50-et 50.-et"_ustr; i18n::Boundary aBounds = m_xBreak->getWordBoundary(aTest, 1, rLocale, i18n::WordType::DICTIONARY_WORD, false); @@ -1865,6 +1865,16 @@ void TestBreakIterator::testDictWordAbbreviationHU() = m_xBreak->getWordBoundary(aTest, 17, rLocale, i18n::WordType::DICTIONARY_WORD, false); CPPUNIT_ASSERT_EQUAL(sal_Int32(17), aBounds.startPos); CPPUNIT_ASSERT_EQUAL(sal_Int32(24), aBounds.endPos); + + aBounds + = m_xBreak->getWordBoundary(aTest, 25, rLocale, i18n::WordType::DICTIONARY_WORD, false); + CPPUNIT_ASSERT_EQUAL(sal_Int32(25), aBounds.startPos); + CPPUNIT_ASSERT_EQUAL(sal_Int32(30), aBounds.endPos); + + aBounds + = m_xBreak->getWordBoundary(aTest, 31, rLocale, i18n::WordType::DICTIONARY_WORD, false); + CPPUNIT_ASSERT_EQUAL(sal_Int32(31), aBounds.startPos); + CPPUNIT_ASSERT_EQUAL(sal_Int32(37), aBounds.endPos); } } diff --git a/i18npool/source/breakiterator/data/dict_word_hu.txt b/i18npool/source/breakiterator/data/dict_word_hu.txt index df28b2fbd679..a4e916992d0e 100644 --- a/i18npool/source/breakiterator/data/dict_word_hu.txt +++ b/i18npool/source/breakiterator/data/dict_word_hu.txt @@ -168,7 +168,7 @@ $Ideographic $ExFm* {400}; # ### tdf#162514: For spell checking, abbreviations may end with a period. # ($ALetterPlus | $Hebrew_Letter) $ExFm* ($ALetterPlus | $Hebrew_Letter); -($ALetterPlus | $Hebrew_Letter) $ExFm* ($ALetterPlus | $Hebrew_Letter) ($PostPeriod)?; +($ALetterPlus | $Hebrew_Letter | $Numeric) $ExFm* ($ALetterPlus | $Hebrew_Letter) ($PostPeriod)?; ### END CUSTOMIZATION @@ -178,7 +178,7 @@ $Ideographic $ExFm* {400}; # ### tdf#162514: For spell checking, abbreviations may end with a period. # ($ALetterPlus | $Hebrew_Letter) $ExFm* ($MidLetter | $MidNumLet | $Single_Quote) $ExFm* ($ALetterPlus | $Hebrew_Letter) {200}; -($ALetterPlus | $Hebrew_Letter) $ExFm* ($MidLetter | $MidNumLet | $Single_Quote) $ExFm* ($ALetterPlus | $Hebrew_Letter) ($PostPeriod)? {200}; +($ALetterPlus | $Hebrew_Letter | $Numeric) $ExFm* ($MidLetter | $MidNumLet | $Single_Quote) $ExFm* ($ALetterPlus | $Hebrew_Letter) ($PostPeriod)? {200}; ### END CUSTOMIZATION
