lingui / lingui/js-lingui

Support ignoring missing translations for additional locales in compile --strict

Open
#2,516 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5.9k
Forks
457
Avg merge
1d 23h
Merged PRs (30d)
16

Description

Problem Description

We use a generated locale like longest-LOCALE for UI stress-testing.

lingui compile --strict already ignores missing translations for pseudoLocale, but it still fails for other generated locales like longest-LOCALE.

Example:

export default defineConfig({
  locales: ["en-US", "longest-LOCALE", "pseudo-LOCALE"],
  sourceLocale: "en-US",
  pseudoLocale: "pseudo-LOCALE",
})

Proposed Solution

Would it make sense to support something like:

export default defineConfig({
  locales: ["en-US", "longest-LOCALE", "pseudo-LOCALE"],
  sourceLocale: "en-US",
  pseudoLocale: "pseudo-LOCALE",
  ignoreMissing: ["longest-LOCALE"],
})

This would let compile --strict stay strict for real locales, while skipping missing-translation errors for generated ones.

Additional Context

My main question is whether longest-LOCALE should be treated as:

  • another generated locale similar to pseudoLocale
  • or just a locale excluded from strict missing checks via something like ignoreMissing

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the compile --strict handling and the existing pseudoLocale behavior described in the issue. Determine whether additional generated locales should use a new ignoreMissing configuration or share the pseudo-locale treatment. Done means strict compilation still reports missing translations for real locales while skipping the configured generated locale.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, internationalization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.