mirror of
https://github.com/grafana/grafana.git
synced 2026-02-18 18:20:52 -05:00
I18n: Stricter collator for the string extraction (#117875)
Stricter collator
This commit is contained in:
parent
88d87f4346
commit
b0ce27d38f
8 changed files with 56 additions and 8 deletions
|
|
@ -1,6 +1,12 @@
|
|||
import { defineConfig } from 'i18next-cli';
|
||||
import pluginJson from './plugin.json';
|
||||
|
||||
const collator = new Intl.Collator('en-US', {
|
||||
sensitivity: 'variant',
|
||||
ignorePunctuation: false,
|
||||
numeric: false,
|
||||
});
|
||||
|
||||
export default defineConfig({
|
||||
locales: pluginJson.languages,
|
||||
extract: {
|
||||
|
|
@ -10,6 +16,6 @@ export default defineConfig({
|
|||
functions: ['t', '*.t'],
|
||||
transComponents: ['Trans'],
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
sort: (a, b) => a.key.localeCompare(b.key, 'en-US'),
|
||||
sort: (a, b) => collator.compare(a.key, b.key),
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
import { defineConfig } from 'i18next-cli';
|
||||
import pluginJson from './plugin.json';
|
||||
|
||||
const collator = new Intl.Collator('en-US', {
|
||||
sensitivity: 'variant',
|
||||
ignorePunctuation: false,
|
||||
numeric: false,
|
||||
});
|
||||
|
||||
export default defineConfig({
|
||||
locales: pluginJson.languages,
|
||||
extract: {
|
||||
|
|
@ -10,6 +16,6 @@ export default defineConfig({
|
|||
functions: ['t', '*.t'],
|
||||
transComponents: ['Trans'],
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
sort: (a, b) => a.key.localeCompare(b.key, 'en-US'),
|
||||
sort: (a, b) => collator.compare(a.key, b.key),
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
import { defineConfig } from 'i18next-cli';
|
||||
import pluginJson from './plugin.json';
|
||||
|
||||
const collator = new Intl.Collator('en-US', {
|
||||
sensitivity: 'variant',
|
||||
ignorePunctuation: false,
|
||||
numeric: false,
|
||||
});
|
||||
|
||||
export default defineConfig({
|
||||
locales: pluginJson.languages,
|
||||
extract: {
|
||||
|
|
@ -10,6 +16,6 @@ export default defineConfig({
|
|||
functions: ['t', '*.t'],
|
||||
transComponents: ['Trans'],
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
sort: (a, b) => a.key.localeCompare(b.key, 'en-US'),
|
||||
sort: (a, b) => collator.compare(a.key, b.key),
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
import { defineConfig } from 'i18next-cli';
|
||||
|
||||
const collator = new Intl.Collator('en-US', {
|
||||
sensitivity: 'variant',
|
||||
ignorePunctuation: false,
|
||||
numeric: false,
|
||||
});
|
||||
|
||||
export default defineConfig({
|
||||
locales: ['en-US'], // Only en-US is updated - Crowdin will PR with other languages
|
||||
extract: {
|
||||
|
|
@ -9,6 +15,6 @@ export default defineConfig({
|
|||
functions: ['t', '*.t'],
|
||||
transComponents: ['Trans'],
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
sort: (a, b) => a.key.localeCompare(b.key, 'en-US'),
|
||||
sort: (a, b) => collator.compare(a.key, b.key),
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
import { defineConfig } from 'i18next-cli';
|
||||
|
||||
const collator = new Intl.Collator('en-US', {
|
||||
sensitivity: 'variant',
|
||||
ignorePunctuation: false,
|
||||
numeric: false,
|
||||
});
|
||||
|
||||
export default defineConfig({
|
||||
locales: ['en-US'], // Only en-US is updated - Crowdin will PR with other languages
|
||||
extract: {
|
||||
|
|
@ -9,6 +15,6 @@ export default defineConfig({
|
|||
functions: ['t', '*.t'],
|
||||
transComponents: ['Trans'],
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
sort: (a, b) => a.key.localeCompare(b.key, 'en-US'),
|
||||
sort: (a, b) => collator.compare(a.key, b.key),
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
import { defineConfig } from 'i18next-cli';
|
||||
|
||||
const collator = new Intl.Collator('en-US', {
|
||||
sensitivity: 'variant',
|
||||
ignorePunctuation: false,
|
||||
numeric: false,
|
||||
});
|
||||
|
||||
export default defineConfig({
|
||||
locales: ['en-US'], // Only en-US is updated - Crowdin will PR with other languages
|
||||
extract: {
|
||||
|
|
@ -9,6 +15,6 @@ export default defineConfig({
|
|||
functions: ['t', '*.t'],
|
||||
transComponents: ['Trans'],
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
sort: (a, b) => a.key.localeCompare(b.key, 'en-US'),
|
||||
sort: (a, b) => collator.compare(a.key, b.key),
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
import { defineConfig } from 'i18next-cli';
|
||||
|
||||
const collator = new Intl.Collator('en-US', {
|
||||
sensitivity: 'variant',
|
||||
ignorePunctuation: false,
|
||||
numeric: false,
|
||||
});
|
||||
|
||||
export default defineConfig({
|
||||
locales: ['en-US'], // Only en-US is updated - Crowdin will PR with other languages
|
||||
extract: {
|
||||
|
|
@ -9,6 +15,6 @@ export default defineConfig({
|
|||
functions: ['t', '*.t'],
|
||||
transComponents: ['Trans'],
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
sort: (a, b) => a.key.localeCompare(b.key, 'en-US'),
|
||||
sort: (a, b) => collator.compare(a.key, b.key),
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
import { defineConfig } from 'i18next-cli';
|
||||
|
||||
const collator = new Intl.Collator('en-US', {
|
||||
sensitivity: 'variant',
|
||||
ignorePunctuation: false,
|
||||
numeric: false,
|
||||
});
|
||||
|
||||
export default defineConfig({
|
||||
locales: ['en-US'], // Only en-US is updated - Crowdin will PR with other languages
|
||||
extract: {
|
||||
|
|
@ -9,6 +15,6 @@ export default defineConfig({
|
|||
functions: ['t', '*.t'],
|
||||
transComponents: ['Trans'],
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
sort: (a, b) => a.key.localeCompare(b.key, 'en-US'),
|
||||
sort: (a, b) => collator.compare(a.key, b.key),
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue