chore: ignore and remove compiled .mo translation files - #243
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe build script compiles ChangesTranslation Packaging
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Comment |
2684abd to
5151ea5
Compare
5151ea5 to
07a1575
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@rog-control-center/build.rs`:
- Around line 26-49: Update the msgfmt command handling in build.rs so both
execution errors and non-zero exit statuses return an error from the build
script instead of only emitting cargo warnings; preserve successful compilation
and ensure the surrounding build flow stops when msgfmt fails.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 22023e30-4f20-4666-9f47-ead91816f48d
📒 Files selected for processing (12)
.gitignoreMakefilerog-control-center/build.rsrog-control-center/translations/az/LC_MESSAGES/rog-control-center.morog-control-center/translations/en/LC_MESSAGES/rog-control-center.morog-control-center/translations/fr/LC_MESSAGES/rog-control-center.morog-control-center/translations/it/LC_MESSAGES/rog-control-center.morog-control-center/translations/pt_BR/LC_MESSAGES/rog-control-center.morog-control-center/translations/ru/LC_MESSAGES/rog-control-center.morog-control-center/translations/tr/LC_MESSAGES/rog-control-center.morog-control-center/translations/uk_UA/LC_MESSAGES/rog-control-center.morog-control-center/translations/zh_CN/LC_MESSAGES/rog-control-center.mo
📜 Review details
🔇 Additional comments (4)
rog-control-center/build.rs (2)
1-25: LGTM!
51-58: LGTM!.gitignore (1)
30-30: LGTM!Makefile (1)
104-104: 🗄️ Data Integrity & IntegrationMake translation generation an explicit installation prerequisite.
This recipe copies only existing
.mofiles. Add the actual translation-generation target as a prerequisite ofinstall-data-rog_gui, including formake -j install, and fail if expected files are absent. Do not depend onrog-control-center/build.rsunless it creates the.mofiles.
3a1992a to
a184225
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Makefile`:
- Line 104: Update the Makefile uninstall recipe to remove the installed
rog-control-center.mo translation catalog from $(datarootdir)/locale, matching
the destination used by the translation install command.
In `@rog-control-center/build.rs`:
- Around line 19-25: Update the catalog-generation flow around po_file and
mo_file so that when rog-control-center.po is absent, any existing
LC_MESSAGES/rog-control-center.mo is removed. Preserve the current creation and
update behavior when the PO source exists, and ensure stale generated catalogs
are not left for installation.
- Line 13: Update the build script’s translation watch configuration around
translations_dir so generated LC_MESSAGES/*.mo files are not watched. Restrict
Cargo’s rerun-if-changed inputs to source translation files such as .po files,
or place generated outputs outside the watched directory while preserving the
existing msgfmt and Slint compilation behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 3975d67f-6d4c-45e1-abec-6f885797a9e4
📒 Files selected for processing (2)
Makefilerog-control-center/build.rs
📜 Review details
🔇 Additional comments (3)
rog-control-center/build.rs (2)
1-12: LGTM!Also applies to: 15-18, 26-45
47-54: LGTM!Makefile (1)
104-104: 🗄️ Data Integrity & IntegrationConfirm the translation build dependency for this installation rule. If
msgfmtgenerates the installed.mofiles in this revision, add the translation target and its.poinputs as prerequisites.
a184225 to
6fb1663
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@rog-control-center/build.rs`:
- Around line 13-22: Update compile_translations to add a stable
rerun-if-changed trigger for the translation source directory or locale input
set, while retaining per-file .po tracking. Ensure build.rs reruns when locales
are added or generated .mo catalogs are removed, without recursively watching
LC_MESSAGES/*.mo or any other generated catalogs.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: e2492d48-3130-4094-8343-613f8a21820b
📒 Files selected for processing (2)
Makefilerog-control-center/build.rs
📜 Review details
🔇 Additional comments (3)
rog-control-center/build.rs (2)
1-12: LGTM!
25-45: LGTM!Also applies to: 48-67
Makefile (1)
104-104: LGTM!
6fb1663 to
1f9ef1f
Compare
|
Closed as superseeded by #252 |
Description
This PR adds
*.moto.gitignoreto ignore all compiled gettext translation binary files across the entire repository, and untracks 9 pre-compiled.mofiles inrog-control-center/translations/.Fixes # N/A
Rationale
.mofiles are binary Machine Object files compiled from human-readable.posource files during localization or build steps. Storing binary outputs in Git creates unnecessary repository bloat and produces noisy diffs on every localization update..mofiles ensures build targets generate localization binaries transiently without polluting git status.Tested Hardware & Environment
Verification and testing:
cargo fmt --all -- --check)cargo clippy --all -- -D warnings/cargo check --all-targets)cargo test --all)cargo cranky)