Skip to content

Add Chinese Num To Word - #37

Open
HCO168 wants to merge 7 commits into
Ballasi:masterfrom
HCO168:Chinese
Open

Add Chinese Num To Word#37
HCO168 wants to merge 7 commits into
Ballasi:masterfrom
HCO168:Chinese

Conversation

@HCO168

@HCO168 HCO168 commented Nov 9, 2025

Copy link
Copy Markdown

No description provided.

@Laifsyn

Laifsyn commented Nov 23, 2025

Copy link
Copy Markdown

Heyo. it might be needed to submit a commit where you remove the .idea/** files to avoid bloating the repo, as well as adding them to .gitignore

Comment thread src/lang/lang.rs
.iter()
.find(|v| ["〇", "circle", "Circle", "yuan"].contains(&v.as_str()))
.is_some();
let prefer_yishi = preferences

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yuan might overlap or conflict a possible preference of (kuai) and (yuan) since in Guangdong could be used in colloquial context[1].

Granted, all this is written chinese, so it's up for debate whether you want to write a number in their colloquial representation)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I will make those changes.

@Laifsyn

Laifsyn commented Nov 30, 2025

Copy link
Copy Markdown

Somethings to consider:

  1. Document the preferences in src\num2words.rs, Num2Word::prefer method.
  2. Make usage of Rust's rustfmt via cargo fmt.
  3. Resolve Rust's clippy lints (maybe via cargo check).
  4. Because you're making use of methods that are only used in tests, the unused lint is getting triggered. So in case you look to keep them for w/e reason, you can add the #[cfg_attr(not(test), expect(unused))] // Currently used only on tests right above the method to silence the lint until you find a usage outside of tests (or actually use them).

IDEs LSPs like VSCode's rust-analyzer usually makes point 2 and 3 easier to solve.

@HCO168

HCO168 commented Jan 23, 2026

Copy link
Copy Markdown
Author

The problems are fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants