Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update unicode cldr #678

Merged
merged 3 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
314 changes: 313 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* Add unicode prime symbols to math mode. (prime, double prime, triple prime, quadruple prime)
* Fix to work on wlroots>=0.17.1 (Sway 1.9) [#664](https://github.com/Riey/kime/issues/664)
* Add wayland zwp_input_method_v1 support **[@Jhyub]**
* Update Unicode CLDR version to 45 [#674](https://github.com/Riey/kime/issues/674)

## 3.0.2

Expand Down
2 changes: 1 addition & 1 deletion src/engine/core/tests/emoji.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn thinking() {
test_input(&[
(EMOJI, "🏻(light skin tone)🏼(medium-light skin tone)🏽(medium skin tone)🏾(medium-dark skin tone)🏿(dark skin tone)", ""),
(Key::normal(T), "t🏻(light skin tone)🏼(medium-light skin tone)🏽(medium skin tone)🏾(medium-dark skin tone)🏿(dark skin tone)", ""),
(Key::normal(H), "th😁(beaming face with smiling eyes)😂(face with tears of joy)🤣(rolling on the floor laughing)😃(grinning face with big eyes)😄(grinning face with smiling eyes)", ""),
(Key::normal(H), "th😃(grinning face with big eyes)😄(grinning face with smiling eyes)😁(beaming face with smiling eyes)😅(grinning face with sweat)🤣(rolling on the floor laughing)", ""),
(Key::normal(I), "thi🤔(thinking face)🕧(twelve-thirty)🕜(one-thirty)🕝(two-thirty)🕞(three-thirty)", ""),
(Key::normal(N), "thin🤔(thinking face)", ""),
(Key::normal(K), "think🤔(thinking face)", ""),
Expand Down
3 changes: 2 additions & 1 deletion src/engine/dict/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ license = "GPL-3.0-or-later"
[build-dependencies]
serde = {version = "1.0.118", features = ["derive"]}
serde_json = "1.0"
itertools = "0.10.0"
itertools = "0.13.0"
quick-xml = { version = "0.27.1", features = ["encoding"] }
unic = "0.9.0"
5 changes: 5 additions & 0 deletions src/engine/dict/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use std::{
mem,
path::PathBuf,
};
use unic::emoji::char::is_emoji;

#[derive(Default, Debug, Clone, Copy)]
struct HanjaEntry {
Expand Down Expand Up @@ -203,6 +204,10 @@ fn main() {
)
.unwrap();
for entry in load_unicode_annotations().unwrap() {
if !entry.cp.chars().any(|c| is_emoji(c)) {
continue;
}

writeln!(
out,
"UnicodeAnnotation {{ codepoint: \"{}\", tts: \"{}\" }},",
Expand Down
Loading
Loading