Skip to content

build: Enforce complete translations in CI checks#140

Merged
Moustachauve merged 1 commit intodevfrom
enforce-missing-translations-6991151126945993938
Mar 23, 2026
Merged

build: Enforce complete translations in CI checks#140
Moustachauve merged 1 commit intodevfrom
enforce-missing-translations-6991151126945993938

Conversation

@Moustachauve
Copy link
Owner

Description

This Pull Request modifies the project's build configuration to enforce complete internationalization coverage on all pull requests.

By marking the Android Lint rule MissingTranslation as a fatal error, any PR that adds a new string resource but fails to provide equivalent translations for all supported languages will now cause the existing GitHub Actions check to fail. This directly addresses the goal of notifying users when they need to provide all language translations.

Changes

  • app/build.gradle.kts: Added lint { fatal += "MissingTranslation" } to the android block.

Testing

  • Verified locally that running ./gradlew lintDebug on a codebase with a missing translation properly fails the build with a descriptive error.
  • Verified unit tests still pass successfully.

PR created automatically by Jules for task 6991151126945993938 started by @Moustachauve

Configured the `MissingTranslation` lint rule as a `fatal` error in the `app/build.gradle.kts`. This change hooks into the existing `lint` job in the `.github/workflows/check.yml` workflow.

Any Pull Request that adds or removes strings without updating all corresponding language translations (`de`, `fr`, `zh`) will now automatically fail the CI build.

Co-authored-by: Moustachauve <2206577+Moustachauve@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the project's continuous integration process by introducing a stricter check for internationalization. By elevating the MissingTranslation lint rule to a fatal error, the system will now automatically prevent the merging of code that lacks complete translations across all supported languages, thereby improving the overall quality and consistency of the application's localization.

Highlights

  • Enforced complete translations: The build configuration has been updated to make the MissingTranslation Android Lint rule a fatal error. This ensures that any new string resources added without corresponding translations for all supported languages will cause the CI check to fail.
  • CI integration: This change directly integrates into the existing GitHub Actions workflow, preventing pull requests with incomplete internationalization from being merged.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to enforce complete translations by making the MissingTranslation lint check fatal. While this is a good goal, the current implementation will likely break the build on the main branch due to existing untranslated strings. I've suggested using a lint baseline to apply this rule only to new changes, preventing disruption while still achieving the intended enforcement for future pull requests.

Comment on lines +78 to +80
lint {
fatal += "MissingTranslation"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

This change will make the build fail immediately on your main branch because there are existing missing translations. For example, app/src/main/res/values/strings.xml contains a TODO for widget texts that are likely not translated yet.

To enforce this rule only for new changes, you should use a lint baseline. This will ignore existing issues and only report new ones. The project already uses this approach for detekt.

You can add the baseline to your lint configuration. After that, run ./gradlew :app:lint to generate the lint-baseline.xml file and commit it to your repository.

    lint {
        fatal += "MissingTranslation"
        baseline = file("lint-baseline.xml")
    }

@Moustachauve Moustachauve added the chore For changes that are mostly maintenance work. label Mar 23, 2026
@Moustachauve Moustachauve merged commit 7da852b into dev Mar 23, 2026
2 of 3 checks passed
@Moustachauve Moustachauve deleted the enforce-missing-translations-6991151126945993938 branch March 23, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore For changes that are mostly maintenance work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant