You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
3.5KB

  1. <?php
  2. return [
  3. // string, required, root directory of all source files
  4. 'sourcePath' => __DIR__ . DIRECTORY_SEPARATOR . '..',
  5. // array, required, list of language codes that the extracted messages
  6. // should be translated to. For example, ['zh-CN', 'de'].
  7. 'languages' => ['de'],
  8. // string, the name of the function for translating messages.
  9. // Defaults to 'Yii::t'. This is used as a mark to find the messages to be
  10. // translated. You may use a string for single function name or an array for
  11. // multiple function names.
  12. 'translator' => 'Yii::t',
  13. // boolean, whether to sort messages by keys when merging new messages
  14. // with the existing ones. Defaults to false, which means the new (untranslated)
  15. // messages will be separated from the old (translated) ones.
  16. 'sort' => false,
  17. // boolean, whether to remove messages that no longer appear in the source code.
  18. // Defaults to false, which means these messages will NOT be removed.
  19. 'removeUnused' => false,
  20. // boolean, whether to mark messages that no longer appear in the source code.
  21. // Defaults to true, which means each of these messages will be enclosed with a pair of '@@' marks.
  22. 'markUnused' => true,
  23. // array, list of patterns that specify which files (not directories) should be processed.
  24. // If empty or not set, all files will be processed.
  25. // Please refer to "except" for details about the patterns.
  26. 'only' => ['*.php'],
  27. // array, list of patterns that specify which files/directories should NOT be processed.
  28. // If empty or not set, all files/directories will be processed.
  29. // A path matches a pattern if it contains the pattern string at its end. For example,
  30. // '/a/b' will match all files and directories ending with '/a/b';
  31. // the '*.svn' will match all files and directories whose name ends with '.svn'.
  32. // and the '.svn' will match all files and directories named exactly '.svn'.
  33. // Note, the '/' characters in a pattern matches both '/' and '\'.
  34. // See helpers/FileHelper::findFiles() description for more details on pattern matching rules.
  35. // If a file/directory matches both a pattern in "only" and "except", it will NOT be processed.
  36. 'except' => [
  37. '.svn',
  38. '.git',
  39. '.gitignore',
  40. '.gitkeep',
  41. '.hgignore',
  42. '.hgkeep',
  43. '/messages',
  44. ],
  45. // 'php' output format is for saving messages to php files.
  46. 'format' => 'php',
  47. // Root directory containing message translations.
  48. 'messagePath' => __DIR__,
  49. // boolean, whether the message file should be overwritten with the merged messages
  50. 'overwrite' => true,
  51. /*
  52. // Message categories to ignore
  53. 'ignoreCategories' => [
  54. 'yii',
  55. ],
  56. */
  57. /*
  58. // 'db' output format is for saving messages to database.
  59. 'format' => 'db',
  60. // Connection component to use. Optional.
  61. 'db' => 'db',
  62. // Custom source message table. Optional.
  63. // 'sourceMessageTable' => '{{%source_message}}',
  64. // Custom name for translation message table. Optional.
  65. // 'messageTable' => '{{%message}}',
  66. */
  67. /*
  68. // 'po' output format is for saving messages to gettext po files.
  69. 'format' => 'po',
  70. // Root directory containing message translations.
  71. 'messagePath' => __DIR__ . DIRECTORY_SEPARATOR . 'messages',
  72. // Name of the file that will be used for translations.
  73. 'catalog' => 'messages',
  74. // boolean, whether the message file should be overwritten with the merged messages
  75. 'overwrite' => true,
  76. */
  77. ];