feat: Added Ukrainian language hyphenation support (#646)

* **What is the goal of this PR?**
  Add proper hyphenation support for the Ukrainian language.

* **What changes are included?**
  - Added Ukrainian hyphenation rules/dictionary

---

Did you use AI tools to help write this code? _**NO**_
This commit is contained in:
saslv
2026-02-19 11:56:05 +02:00
committed by cottongin
parent 426a978e44
commit b5c48af3b2
2 changed files with 1356 additions and 0 deletions

View File

@@ -22,6 +22,9 @@
#ifndef OMIT_HYPH_RU #ifndef OMIT_HYPH_RU
#include "generated/hyph-ru.trie.h" #include "generated/hyph-ru.trie.h"
#endif #endif
#ifndef OMIT_HYPH_UK
#include "generated/hyph-uk.trie.h"
#endif
namespace { namespace {
@@ -44,6 +47,9 @@ LanguageHyphenator spanishHyphenator(es_patterns, isLatinLetter, toLowerLatin);
#ifndef OMIT_HYPH_IT #ifndef OMIT_HYPH_IT
LanguageHyphenator italianHyphenator(it_patterns, isLatinLetter, toLowerLatin); LanguageHyphenator italianHyphenator(it_patterns, isLatinLetter, toLowerLatin);
#endif #endif
#ifndef OMIT_HYPH_UK
LanguageHyphenator ukrainianHyphenator(uk_patterns, isCyrillicLetter, toLowerCyrillic);
#endif
const LanguageEntryView entries() { const LanguageEntryView entries() {
static const std::vector<LanguageEntry> kEntries = { static const std::vector<LanguageEntry> kEntries = {
@@ -64,6 +70,9 @@ const LanguageEntryView entries() {
#endif #endif
#ifndef OMIT_HYPH_IT #ifndef OMIT_HYPH_IT
{"italian", "it", &italianHyphenator}, {"italian", "it", &italianHyphenator},
#endif
#ifndef OMIT_HYPH_UK
{"ukrainian", "uk", &ukrainianHyphenator},
#endif #endif
}; };
static const LanguageEntryView view{kEntries.data(), kEntries.size()}; static const LanguageEntryView view{kEntries.data(), kEntries.size()};

File diff suppressed because it is too large Load Diff