Conversation
Implement complete i18n infrastructure with auto-detection of user locale: - Add rust-i18n v3 and sys-locale crates - Create i18n.rs module with locale detection and message rendering - Add 7 language YAML files: English, Chinese (zh-CN), German, Japanese, Korean, Hindi, Spanish - Extend Signal struct with msg_key/msg_params for localization (serde-skipped) - Implement SignalBuilder pattern for constructing signals with both English descriptions (for JSON) and localized messages - Update all 10 detector modules to use new SignalBuilder API - Localize all human-readable output: verdicts, headers, error messages, signal descriptions - Ensure JSON output remains in English for machine readability - Add --lang CLI flag for manual locale override - Fix integration tests with locale-dependent string assertions This enables users to see detection results in their preferred language while maintaining backward compatibility with JSON output. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Convert module doc comment in i18n.rs to inner doc comment (//!) to avoid empty-line-after-doc-comments lint - Remove unnecessary & on format!() and .to_string() calls passed to impl Into<String> params in audio_spectral.rs, exif.rs, png_text.rs, wav_metadata.rs (needless_borrows_for_generic_args) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
Implement complete internationalization (i18n) support for the
aicCLI tool with automatic system locale detection. Users can now see detection results in their preferred language: English, Chinese (Simplified), German, Japanese, Korean, Hindi, or Spanish.Key Changes
rust-i18nv3 andsys-localecrates for compile-time locale loading and runtime locale detectioni18n.rsmodule with locale detection, initialization, and message rendering utilitiesSignalstruct withmsg_keyandmsg_paramsfields (serde-skipped) to enable dual rendering: English descriptions for JSON output, localized messages for human outputSignalBuilderpattern for constructing signals with both English and localized text--langCLI flag for manual locale overrideTest Results
All 58 tests pass:
🤖 Generated with Claude Code