feat: Added Ukrainian language hyphenation support (#646)
## Summary * **What is the goal of this PR?** Add proper hyphenation support for the Ukrainian language. * **What changes are included?** - Added Ukrainian hyphenation rules/dictionary ## Additional Context --- ### AI Usage Did you use AI tools to help write this code? _**NO**_
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
#include "generated/hyph-fr.trie.h"
|
#include "generated/hyph-fr.trie.h"
|
||||||
#include "generated/hyph-it.trie.h"
|
#include "generated/hyph-it.trie.h"
|
||||||
#include "generated/hyph-ru.trie.h"
|
#include "generated/hyph-ru.trie.h"
|
||||||
|
#include "generated/hyph-uk.trie.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@@ -20,8 +21,9 @@ LanguageHyphenator germanHyphenator(de_patterns, isLatinLetter, toLowerLatin);
|
|||||||
LanguageHyphenator russianHyphenator(ru_patterns, isCyrillicLetter, toLowerCyrillic);
|
LanguageHyphenator russianHyphenator(ru_patterns, isCyrillicLetter, toLowerCyrillic);
|
||||||
LanguageHyphenator spanishHyphenator(es_patterns, isLatinLetter, toLowerLatin);
|
LanguageHyphenator spanishHyphenator(es_patterns, isLatinLetter, toLowerLatin);
|
||||||
LanguageHyphenator italianHyphenator(it_patterns, isLatinLetter, toLowerLatin);
|
LanguageHyphenator italianHyphenator(it_patterns, isLatinLetter, toLowerLatin);
|
||||||
|
LanguageHyphenator ukrainianHyphenator(uk_patterns, isCyrillicLetter, toLowerCyrillic);
|
||||||
|
|
||||||
using EntryArray = std::array<LanguageEntry, 6>;
|
using EntryArray = std::array<LanguageEntry, 7>;
|
||||||
|
|
||||||
const EntryArray& entries() {
|
const EntryArray& entries() {
|
||||||
static const EntryArray kEntries = {{{"english", "en", &englishHyphenator},
|
static const EntryArray kEntries = {{{"english", "en", &englishHyphenator},
|
||||||
@@ -29,7 +31,8 @@ const EntryArray& entries() {
|
|||||||
{"german", "de", &germanHyphenator},
|
{"german", "de", &germanHyphenator},
|
||||||
{"russian", "ru", &russianHyphenator},
|
{"russian", "ru", &russianHyphenator},
|
||||||
{"spanish", "es", &spanishHyphenator},
|
{"spanish", "es", &spanishHyphenator},
|
||||||
{"italian", "it", &italianHyphenator}}};
|
{"italian", "it", &italianHyphenator},
|
||||||
|
{"ukrainian", "uk", &ukrainianHyphenator}}};
|
||||||
return kEntries;
|
return kEntries;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
1347
lib/Epub/Epub/hyphenation/generated/hyph-uk.trie.h
Normal file
1347
lib/Epub/Epub/hyphenation/generated/hyph-uk.trie.h
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user