Add configuration so sites can customize which calls, files, and functions to ignore

Created on 4 September 2020, over 4 years ago
Updated 26 April 2023, over 1 year ago

Problem/Motivation

We want to exclude more strings than potx excludes by default. We'd like to ignore all strings used for logging and administrative pages (these are always in English). We want to exclude sending these out for translation to save time and money with translators. We currently have to manually remove these from our exports.

We can catch most strings with pattern matching. While the code currently supports pattern matching of files, the pattern is hard coded. We can easily make this configurable. We can make even more extensible by keeping track of the function we are in, so that we can exclude strings in those functions. For example, we never want to export strings from baseFieldDefinitions().

We can also add configuration options to just exclude some things, like the watchdog() or perm() checks.

Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

🇺🇸United States douggreen Winchester, VA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024