i18next.config.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. Copyright (C) 2025 QuantumNous
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU Affero General Public License as
  5. published by the Free Software Foundation, either version 3 of the
  6. License, or (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU Affero General Public License for more details.
  11. You should have received a copy of the GNU Affero General Public License
  12. along with this program. If not, see <https://www.gnu.org/licenses/>.
  13. For commercial licensing, please contact [email protected]
  14. */
  15. import { defineConfig } from 'i18next-cli';
  16. /** @type {import('i18next-cli').I18nextToolkitConfig} */
  17. export default defineConfig({
  18. locales: ['zh', 'en', 'fr', 'ru', 'ja', 'vi'],
  19. extract: {
  20. input: ['src/**/*.{js,jsx,ts,tsx}'],
  21. ignore: ['src/i18n/**/*'],
  22. output: 'src/i18n/locales/{{language}}.json',
  23. ignoredAttributes: [
  24. 'accept',
  25. 'align',
  26. 'aria-label',
  27. 'autoComplete',
  28. 'className',
  29. 'clipRule',
  30. 'color',
  31. 'crossOrigin',
  32. 'data-index',
  33. 'data-name',
  34. 'data-testid',
  35. 'data-type',
  36. 'defaultActiveKey',
  37. 'direction',
  38. 'editorType',
  39. 'field',
  40. 'fill',
  41. 'fillRule',
  42. 'height',
  43. 'hoverStyle',
  44. 'htmlType',
  45. 'id',
  46. 'itemKey',
  47. 'key',
  48. 'keyPrefix',
  49. 'layout',
  50. 'margin',
  51. 'maxHeight',
  52. 'mode',
  53. 'name',
  54. 'overflow',
  55. 'placement',
  56. 'position',
  57. 'rel',
  58. 'role',
  59. 'rowKey',
  60. 'searchPosition',
  61. 'selectedStyle',
  62. 'shape',
  63. 'size',
  64. 'style',
  65. 'theme',
  66. 'trigger',
  67. 'uploadTrigger',
  68. 'validateStatus',
  69. 'value',
  70. 'viewBox',
  71. 'width',
  72. ],
  73. sort: true,
  74. disablePlurals: false,
  75. removeUnusedKeys: false,
  76. nsSeparator: false,
  77. keySeparator: false,
  78. mergeNamespaces: true,
  79. },
  80. });