i18next-parser.config.ts 889 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. // i18next-parser.config.ts
  2. import { getLanguages } from './src/lib/i18n/index.ts';
  3. const getLangCodes = async () => {
  4. const languages = await getLanguages();
  5. return languages.map((l) => l.code);
  6. };
  7. export default {
  8. contextSeparator: '_',
  9. createOldCatalogs: false,
  10. defaultNamespace: 'translation',
  11. defaultValue: '',
  12. indentation: 2,
  13. keepRemoved: false,
  14. keySeparator: false,
  15. lexers: {
  16. svelte: ['JavascriptLexer'],
  17. js: ['JavascriptLexer'],
  18. ts: ['JavascriptLexer'],
  19. default: ['JavascriptLexer']
  20. },
  21. lineEnding: 'auto',
  22. locales: await getLangCodes(),
  23. namespaceSeparator: false,
  24. output: 'src/lib/i18n/locales/$LOCALE/$NAMESPACE.json',
  25. pluralSeparator: '_',
  26. input: 'src/**/*.{js,svelte}',
  27. sort: true,
  28. verbose: true,
  29. failOnWarnings: false,
  30. failOnUpdate: false,
  31. customValueTemplate: null,
  32. resetDefaultValueLocale: null,
  33. i18nextOptions: null,
  34. yamlOptions: null
  35. };