Skip to content

Conversation

@krzyzak
Copy link

@krzyzak krzyzak commented Jan 31, 2025

Adds support for custom translation exceptions via configuration. Users can now specify additional strings that should be exempt from translation requirements, alongside the default NO_TRANSLATION_NEEDED list. This is useful for:

  • Brand names
  • Custom HTML entities
  • Project-specific terms
  • Any strings that shouldn't trigger translation warnings

Usage example:

linters:
  HardCodedString:
    ignored_words:
      - MyBrand
      - "§"

@krzyzak
Copy link
Author

krzyzak commented Jan 31, 2025

I have signed the CLA!

@krzyzak krzyzak force-pushed the add-ignored-words-to-hardcoded-string-linter branch from ee29308 to 32985b4 Compare January 31, 2025 14:38
@gravitystorm
Copy link
Contributor

This would be great to see merged.

I'm a maintainer over at OpenStreetMap and I would like to use this to add · to our list of ignored entities.

gravitystorm added a commit to gravitystorm/openstreetmap-website that referenced this pull request Jan 7, 2026
The implementation uses a customised linter, to add `·` to the
list of punctuation that doesn't need translating.

We can remove our customised linter when this list becomes a config option,
see Shopify/erb_lint#397
snehaljadhav7317 pushed a commit to snehaljadhav7317/openstreetmap-website that referenced this pull request Jan 17, 2026
The implementation uses a customised linter, to add `·` to the
list of punctuation that doesn't need translating.

We can remove our customised linter when this list becomes a config option,
see Shopify/erb_lint#397
snehaljadhav7317 pushed a commit to snehaljadhav7317/openstreetmap-website that referenced this pull request Jan 17, 2026
The implementation uses a customised linter, to add `·` to the
list of punctuation that doesn't need translating.

We can remove our customised linter when this list becomes a config option,
see Shopify/erb_lint#397
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