-
-
Notifications
You must be signed in to change notification settings - Fork 431
Closed
Labels
Description
Description
- Since fix: use makePathRegexSafe with globSyncΒ #2242 , the paths in
includesare transformed bymakePathRegexSafe, which escapes(){}[\]^$+characters. This behavior no longer aligns with the documentation:
includeandexclude: these patterns specify which files to include or exclude during the extraction process. They are passed to minimatch for pattern matching.
https://lingui.dev/ref/conf#catalogs
I think the fix should be either updating the docs to mention these unsupported characters, or using glob's escape character \ to properly escape the special characters instead.
Verifications
Reproduction Steps
This config used to work before
{
sourceLocale: 'en',
locales: ['en', 'es'],
catalogs: [
{
path: 'i18n/locales/{locale}/messages',
include: ['**/*.{ts,tsx}'], // <------------- this
exclude: ['**/node_modules/**'],
},
],
}Expected Behavior
Now running lingui extract generates empty catalogs
Catalog statistics for i18n/locales/{locale}/messages:
βββββββββββββββ¬ββββββββββββββ¬ββββββββββ
β Language β Total count β Missing β
βββββββββββββββΌββββββββββββββΌββββββββββ€
β en (source) β 0 β - β
β es β 0 β 0 β
βββββββββββββββ΄ββββββββββββββ΄ββββββββββ
Macro Support
Not using macro
Lingui Version
5.5.1
Babel Version
No response
Framework
No response
Reactions are currently unavailable