Closed giovannetti-eric closed 2 months ago
We've also run into this at Ghost - the commit above is the revert back to v8.8.0
@karellm Is this issue a bug, or an intentional breaking change? We've had to pause all updates to i18next-parser due to this
Such a problem also appeared. Any progress?
Also bumped into this issue.
Same issue. I had to downgrade to 8.8.0 Is there a breaking tweak to config necessary? Changelog did not mention anything.
To follow up, I use a monorepo. This is what my i18next-parser.config.js looks like
module.exports = {
contextSeparator: '_',
createOldCatalogs: false,
defaultNamespace: 'translation',
defaultValue: (locale, namespace, key) => {
if (locale === 'en-US') {
return key;
}
return '__NOT_TRANSLATED__';
},
indentation: 2,
keepRemoved: false
keySeparator: false,
lexers: {
js: ['JavascriptLexer'],
ts: ['JavascriptLexer'],
jsx: ['JsxLexer'],
tsx: ['JsxLexer'],
default: ['JavascriptLexer'],
},
lineEnding: 'auto',
locales: ['en-US', 'nl-NL'],
namespaceSeparator: false,
output: '../../locales/$LOCALE.json',
pluralSeparator: '____',
input: '../*/src/**/*.{js,ts,jsx,tsx}',
sort: false,
skipDefaultValues: false,
useKeysAsDefaultValue: false,
verbose: false,
failOnWarnings: false,
customValueTemplate: null,
};
It's not intentional but have limited time to look at it currently. If someone can open a PR that would be greatly appreciated.
This seems to be working again in 8.13.0 @giovannetti-eric I would give this another go
This seems to be working again in 8.13.0 @giovannetti-eric I would give this another go
I kept having the same problem with 8.13.0
, will still be using 8.8.0
I have not tested the 8.13.0
but the 9.0.0
seems to work as intended.
💥 Regression Report
I'm using NextJS, with Turborepo
My file structure is like:
My configuration file:
Before 8.9.0, running
i18next -c ./i18next-parser.app.config.js
was parsing all related files in apps and packages folders. Now, only files intoi18n
folder are parsed.Last working version
Worked up to version: 8.8.0
Stopped working in version: 8.9.0
Expected behavior
The
input
parameter should allow me to parse files outside the configuration file folder.Your Environment