|
| 1 | +<?php |
| 2 | + |
| 3 | +/** |
| 4 | + * Configuration file for 'yii message/extract' command. |
| 5 | + * |
| 6 | + * This file is automatically generated by 'yii message/config' command. |
| 7 | + * It contains parameters for source code messages extraction. |
| 8 | + * You may modify this file to suit your needs. |
| 9 | + * |
| 10 | + * You can use 'yii message/config-template' command to create |
| 11 | + * template configuration file with detailed description for each parameter. |
| 12 | + */ |
| 13 | +return [ |
| 14 | + // string, required, root directory of all source files |
| 15 | + 'sourcePath' => dirname(__DIR__) . DIRECTORY_SEPARATOR . 'src', |
| 16 | + |
| 17 | + // Root directory containing message translations. |
| 18 | + 'messagePath' => dirname(__DIR__) . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'languages', |
| 19 | + |
| 20 | + // array, required, list of language codes that the extracted messages |
| 21 | + // should be translated to. For example, ['zh-CN', 'de']. |
| 22 | + 'languages' => [ |
| 23 | + 'en', |
| 24 | + 'id', |
| 25 | + ], |
| 26 | + |
| 27 | + // string, the name of the function for translating messages. |
| 28 | + // Defaults to 'Yii::t'. This is used as a mark to find the messages to be |
| 29 | + // translated. You may use a string for single function name or an array for |
| 30 | + // multiple function names. |
| 31 | + 'translator' => 'Yii::t', |
| 32 | + |
| 33 | + // boolean, whether to sort messages by keys when merging new messages |
| 34 | + // with the existing ones. Defaults to false, which means the new (untranslated) |
| 35 | + // messages will be separated from the old (translated) ones. |
| 36 | + 'sort' => true, |
| 37 | + |
| 38 | + // boolean, whether to remove messages that no longer appear in the source code. |
| 39 | + // Defaults to false, which means each of these messages will be enclosed with a pair of '@@' marks. |
| 40 | + 'removeUnused' => true, |
| 41 | + |
| 42 | + // array, list of patterns that specify which files/directories should NOT be processed. |
| 43 | + // If empty or not set, all files/directories will be processed. |
| 44 | + // A path matches a pattern if it contains the pattern string at its end. For example, |
| 45 | + // '/a/b' will match all files and directories ending with '/a/b'; |
| 46 | + // the '*.svn' will match all files and directories whose name ends with '.svn'. |
| 47 | + // and the '.svn' will match all files and directories named exactly '.svn'. |
| 48 | + // Note, the '/' characters in a pattern matches both '/' and '\'. |
| 49 | + // See helpers/FileHelper::findFiles() description for more details on pattern matching rules. |
| 50 | + 'only' => [ |
| 51 | + '*.php', |
| 52 | + ], |
| 53 | + |
| 54 | + // array, list of patterns that specify which files (not directories) should be processed. |
| 55 | + // If empty or not set, all files will be processed. |
| 56 | + // Please refer to "except" for details about the patterns. |
| 57 | + // If a file/directory matches both a pattern in "only" and "except", it will NOT be processed. |
| 58 | + 'except' => [ |
| 59 | + '.svn', |
| 60 | + '.git', |
| 61 | + '.gitignore', |
| 62 | + '.gitkeep', |
| 63 | + '.hgignore', |
| 64 | + '.hgkeep', |
| 65 | + '/languages', |
| 66 | + '/BaseYii.php', |
| 67 | + ], |
| 68 | + |
| 69 | + // 'php' output format is for saving messages to php files. |
| 70 | + 'format' => 'php', |
| 71 | + // boolean, whether the message file should be overwritten with the merged messages |
| 72 | + 'overwrite' => false, |
| 73 | + |
| 74 | + /* |
| 75 | + // 'db' output format is for saving messages to database. |
| 76 | + 'format' => 'db', |
| 77 | + // Connection component to use. Optional. |
| 78 | + 'db' => 'db', |
| 79 | + // Custom source message table. Optional. |
| 80 | + 'sourceMessageTable' => '{{%source_message}}', |
| 81 | + // Custom name for translation message table. Optional. |
| 82 | + 'messageTable' => '{{%message}}', |
| 83 | + */ |
| 84 | + |
| 85 | + /* |
| 86 | + // 'po' output format is for saving messages to gettext po files. |
| 87 | + 'format' => 'po', |
| 88 | + // Root directory containing message translations. |
| 89 | + 'messagePath' => __DIR__ . DIRECTORY_SEPARATOR . 'messages', |
| 90 | + // Name of the file that will be used for translations. |
| 91 | + 'catalog' => 'messages', |
| 92 | + // boolean, whether the message file should be overwritten with the merged messages |
| 93 | + 'overwrite' => true, |
| 94 | + */ |
| 95 | + |
| 96 | + // 'color' => null, |
| 97 | + 'interactive' => true, |
| 98 | + // 'help' => null, |
| 99 | + 'markUnused' => true, |
| 100 | + 'ignoreCategories' => [ |
| 101 | + 'yii', |
| 102 | + ], |
| 103 | + // 'phpFileHeader' => '', |
| 104 | + // 'phpDocBlock' => null, |
| 105 | +]; |
0 commit comments