i18n: make remaining user-facing CLI error messages translatable#460
Open
AngryDavee wants to merge 1 commit into
Open
i18n: make remaining user-facing CLI error messages translatable#460AngryDavee wants to merge 1 commit into
AngryDavee wants to merge 1 commit into
Conversation
Wraps the two remaining user-facing error-context strings that surface in CLI output (components/chain.rs and components/json_rpc.rs) in the fl! Fluent framework, and adds the corresponding entries to i18n/en-US/zallet.ftl. Leaves .expect() panic messages and JSON-RPC errors untranslated, per the exclusions noted in the issue. Refs zcash#321
2301105 to
0c36cb6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Small contribution toward #321 (ensure all CLI messages are translatable).
I audited the CLI output for untranslated user-facing strings. Most are already wrapped in
fl!. The remaining user-facing strings I found are two error contexts that reach the user through theErrorDisplayimpl inerror.rs:components/chain.rs:"ChainState indexer is not running"components/json_rpc.rs:"Only one RPC bind address is supported (for now)"This PR wraps both via
crate::fl!and adds the corresponding entries toi18n/en-US/zallet.ftl(a new## Chain errorssection, anderr-init-single-rpc-bindalongside the other init errors).Per the exclusions in #321, I deliberately left untranslated:
.expect()panic messages (internal invariants)Verified locally with
cargo build -p zallet.Happy to adjust scope per your intent for the issue (for example, if the
(for now)bind-address message is intentionally left untranslated as a temporary limitation, I can drop that one).Refs #321