Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsgiehl <stefan@piwik.org>2015-09-30 21:53:13 +0300
committersgiehl <stefan@piwik.org>2015-09-30 21:53:13 +0300
commit40afd5b4d4ddca2dded6ce2bd6327830ca580567 (patch)
treedddcf04edbc83b1985ebe9c8f1d56d456a7cb119 /plugins/LanguagesManager/Commands/CreatePull.php
parent7bd71513ede7a02a6697373cc2f0514c2013118a (diff)
fixes bug in automatic translation update
- languages with splitted language codes (e.g. pt-br, zh-cn, ...) were not included in the pull request description - added TranslatorName to dev language to avoid notices when using the TranslationManager API in development mode
Diffstat (limited to 'plugins/LanguagesManager/Commands/CreatePull.php')
-rw-r--r--plugins/LanguagesManager/Commands/CreatePull.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/LanguagesManager/Commands/CreatePull.php b/plugins/LanguagesManager/Commands/CreatePull.php
index 95a57e591f..e9c16ccf0c 100644
--- a/plugins/LanguagesManager/Commands/CreatePull.php
+++ b/plugins/LanguagesManager/Commands/CreatePull.php
@@ -113,7 +113,7 @@ class CreatePull extends TranslationBase
$stats = shell_exec('git diff --numstat HEAD');
- preg_match_all('/([0-9]+)\t([0-9]+)\t[a-zA-Z\/]*lang\/([a-z]{2,3})\.json/', $stats, $lineChanges);
+ preg_match_all('/([0-9]+)\t([0-9]+)\t[a-zA-Z\/]*lang\/([a-z]{2,3}(?:-[a-z]{2,3})?)\.json/', $stats, $lineChanges);
$addedLinesSum = 0;
if (!empty($lineChanges[1])) {
@@ -126,8 +126,8 @@ class CreatePull extends TranslationBase
@$linesSumByLang[$lineChanges[3][$i]] += $lineChanges[1][$i];
}
- preg_match_all('/M [a-zA-Z\/]*lang\/([a-z]{2,3})\.json/', $changes, $modifiedFiles);
- preg_match_all('/A [a-zA-Z\/]*lang\/([a-z]{2,3})\.json/', $changes, $addedFiles);
+ preg_match_all('/M [a-zA-Z\/]*lang\/([a-z]{2,3}(?:-[a-z]{2,3})?)\.json/', $changes, $modifiedFiles);
+ preg_match_all('/A [a-zA-Z\/]*lang\/([a-z]{2,3}(?:-[a-z]{2,3})?)\.json/', $changes, $addedFiles);
$messages = array();