Skip to content

Commit a077414

Browse files
committed
change removeUnusedKeys to false
When I regenerated the translation data, some usable translation data disappeared. Some data seemed incompatible with the new display, and some data, despite being in use, didn't appear to be detected by i18next-scanner. Therefore, it became necessary to set this setting to `false`.
1 parent a3e9a58 commit a077414

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

client/i18next-scanner.config.cjs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,16 @@ module.exports = {
7777
],
7878
options: {
7979
debug: true,
80-
removeUnusedKeys: true,
80+
/**
81+
* For example, the return value of a `TabTitle` element is
82+
* subject to translation, but it is removed because it cannot
83+
* be detected by i18next-scanner.
84+
*
85+
* The relevant section will be displayed as a warning when
86+
* `npm run translate` is executed, and resolving the warning
87+
* will restore it to `true`.
88+
*/
89+
removeUnusedKeys: false,
8190
func: {
8291
list: ['i18next.t', 'i18n.t', 't'],
8392
extensions: ['.js', '.jsx'] // not .ts or .tsx since we use i18next-scanner-typescript!
@@ -147,5 +156,4 @@ module.exports = {
147156
done();
148157
}
149158
),
150-
151159
};

0 commit comments

Comments
 (0)