i18next.config.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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 support@quantumnous.com
  14. */
  15. import { defineConfig } from 'i18next-cli';
  16. /** @type {import('i18next-cli').I18nextToolkitConfig} */
  17. export default defineConfig({
  18. locales: [
  19. "zh",
  20. "en",
  21. "fr"
  22. ],
  23. extract: {
  24. input: [
  25. "src/**/*.{js,jsx,ts,tsx}"
  26. ],
  27. ignore: [
  28. "src/i18n/**/*"
  29. ],
  30. output: "src/i18n/locales/{{language}}.json",
  31. ignoredAttributes: [
  32. "data-testid",
  33. "aria-label",
  34. "role",
  35. "className",
  36. "id",
  37. "key",
  38. "shape",
  39. "color",
  40. "size",
  41. "theme",
  42. "position",
  43. "layout",
  44. "margin",
  45. "trigger",
  46. "itemKey",
  47. "defaultActiveKey",
  48. "field",
  49. "value",
  50. "rel",
  51. "name",
  52. "validateStatus",
  53. "direction",
  54. "clipRule",
  55. "fillRule",
  56. "viewBox",
  57. "editorType",
  58. "autoComplete",
  59. "fill",
  60. "searchPosition",
  61. "uploadTrigger",
  62. "accept",
  63. "uploadTrigger",
  64. "placement",
  65. "rowKey",
  66. "style",
  67. "align",
  68. "crossOrigin",
  69. "field",
  70. "data-name",
  71. "data-index",
  72. "data-type",
  73. "height",
  74. "width",
  75. "overflow",
  76. "keyPrefix",
  77. "htmlType",
  78. "mode",
  79. "maxHeight",
  80. "hoverStyle",
  81. "selectedStyle"
  82. ],
  83. sort: true,
  84. disablePlurals: true,
  85. removeUnusedKeys: true,
  86. nsSeparator: false,
  87. keySeparator: false,
  88. mergeNamespaces: true
  89. }
  90. });