Skip to content

Normalize Subcommand#9

Merged
WendellXY merged 15 commits intomainfrom
codex/normalize-subcommand
Mar 3, 2026
Merged

Normalize Subcommand#9
WendellXY merged 15 commits intomainfrom
codex/normalize-subcommand

Conversation

@WendellXY
Copy link
Copy Markdown
Collaborator

This pull request introduces a new normalize command to the CLI, enabling normalization and drift detection for localization files across multiple formats. The changes include updates to documentation, CLI command definitions, and the implementation of the normalization workflow. Below are the most important changes:

New Feature: Normalize Command

  • Added a new normalize command to the CLI, supporting Apple .strings, .xcstrings, Android strings.xml, CSV, and TSV formats. The command includes options for drift detection (--check), previewing changes (--dry-run), customizing key styles (--key-style), skipping placeholder normalization (--no-placeholders), and handling multiple inputs with error continuation (--continue-on-error). [1] [2]

Documentation Updates

  • Updated README.md, langcodec-cli/README.md, and CHANGELOG.md to document the new normalize command, its options, supported formats, and workflow constraints (such as single-output for multi-input normalization). [1] [2] [3] [4] [5] [6]

CLI Integration

  • Registered the normalize command in the CLI's main entry point, including argument parsing and option handling. The command is now available alongside existing commands like convert, diff, merge, and edit. [1] [2] [3]

Robust Error Handling and Reporting

  • Implemented error handling for missing files, invalid options, and multi-input/output constraints. The command prints detailed summaries of processed, successful, failed, and changed files, and supports continued processing when errors occur.

Normalization Engine Integration

  • Connected the CLI to the normalization engine, supporting in-place writes or output to a specified file, and reporting whether normalization would change the file (for drift detection and CI use cases).

@WendellXY WendellXY self-assigned this Mar 3, 2026
Copilot AI review requested due to automatic review settings March 3, 2026 05:56
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ca8edd0b9d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread langcodec-cli/src/normalize.rs Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new normalize workflow to the langcodec ecosystem (library + CLI) to normalize localization files across supported formats and enable drift detection for CI.

Changes:

  • Introduces a langcodec::normalize engine with options for placeholder normalization and key-style transformations.
  • Adds a langcodec normalize CLI subcommand with --check, --dry-run, --key-style, --no-placeholders, and --continue-on-error.
  • Expands tests + docs (README/CLI README/CHANGELOG) to cover the new command and behaviors.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
langcodec/src/normalize.rs New normalization engine (key transform, placeholder normalization, stable sorting, change reporting).
langcodec/src/lib.rs Exposes the new normalize module + public API exports.
langcodec/tests/normalize_engine_tests.rs Engine-level tests for idempotency, placeholder normalization, unicode key transforms, and collision rollback.
langcodec-cli/src/normalize.rs Implements CLI normalize workflow: glob expansion, per-file processing, output rules, summaries, and error handling.
langcodec-cli/src/main.rs Registers the new normalize subcommand and wires args into the CLI runner.
langcodec-cli/tests/normalize_cli_tests.rs End-to-end CLI tests for help output, drift detection, dry-run, output constraints, and continue-on-error.
README.md Documents the new normalize command and options at the repo level.
langcodec-cli/README.md Adds CLI-specific normalize usage, examples, and option semantics.
CHANGELOG.md Notes the new normalize command and workflow documentation updates.
.gitignore Adds docs/plans/* and normalizes .vscode entry formatting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread langcodec/src/normalize.rs Outdated
Comment thread langcodec/src/normalize.rs
Comment thread langcodec-cli/src/normalize.rs
Comment thread langcodec-cli/src/normalize.rs Outdated
@WendellXY WendellXY merged commit 64baea2 into main Mar 3, 2026
5 checks passed
@WendellXY WendellXY deleted the codex/normalize-subcommand branch March 3, 2026 06:16
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