Shopify / Shopify/theme-tools

Require `other` for pluralized entries in translation files

Open
#452 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:theme-check enhancement good first issue
Dominant language
TypeScript
Stars
234
Forks
92
Avg merge
1d 3h
Merged PRs (30d)
6

Description

As of writing, pluralization keys have no requirements – as long as they're present, the linter won't complete.

theme-lint has a rule to enforce other in the default locale: https://github.com/Shopify/theme-lint/blob/239d40432ad20e50f1e7e90bd618e58cdfe09690/linters/i18n.js#L199-L201 -- maybe we can do something similar in MatchingTranslations, but make it possible to opt-out with a parameter on the check?

See: https://github.com/Shopify/theme-check/pull/49#discussion_r536366580

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 by reading MatchingTranslations and the referenced theme-lint i18n rule to compare how pluralized entries are checked. Identify the existing check’s call sites and verification coverage, then define the opt-out parameter and confirm that entries require other by default while opted-out checks retain their existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
localization
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.