Skip to content
Snippets Groups Projects
Unverified Commit 8e41d7b1 authored by Peter Rotich's avatar Peter Rotich Committed by GitHub
Browse files

Merge pull request #3196 from greezybacon/issue/i18n-phar-branch-build

i18n: Fix build language packs for the 1.10.x branch
parents 89f8c65b d6471cd9
No related branches found
No related tags found
No related merge requests found
...@@ -79,10 +79,9 @@ class i18n_Compiler extends Module { ...@@ -79,10 +79,9 @@ class i18n_Compiler extends Module {
self::$crowdin_api_url); self::$crowdin_api_url);
$args += array('key' => $this->key); $args += array('key' => $this->key);
foreach ($args as &$a) if ($branch = $this->getOption('branch', false))
$a = urlencode($a); $args += array('branch' => $branch);
unset($a); $url .= '?' . Http::build_query($args);
$url .= '?' . Format::array_implode('=', '&', $args);
return $this->_http_get($url); return $this->_http_get($url);
} }
...@@ -189,7 +188,7 @@ class i18n_Compiler extends Module { ...@@ -189,7 +188,7 @@ class i18n_Compiler extends Module {
$contents = $zip->getFromIndex($i); $contents = $zip->getFromIndex($i);
if (!$contents) if (!$contents)
continue; continue;
if (fnmatch('*/messages*.po', $info['name']) !== false) { if (strpos($info['name'], '/messages.po') !== false) {
$po_file = $contents; $po_file = $contents;
// Don't add the PO file as-is to the PHAR file // Don't add the PO file as-is to the PHAR file
continue; continue;
...@@ -222,10 +221,10 @@ class i18n_Compiler extends Module { ...@@ -222,10 +221,10 @@ class i18n_Compiler extends Module {
$this->stderr->write($lang . ": Unable to fetch Redactor language file\n"); $this->stderr->write($lang . ": Unable to fetch Redactor language file\n");
// JQuery UI Datepicker // JQuery UI Datepicker
// http://jquery-ui.googlecode.com/svn/tags/latest/ui/i18n/jquery.ui.datepicker-de.js // https://github.com/jquery/jquery-ui/tree/master/ui/i18n
foreach ($langs as $l) { foreach ($langs as $l) {
list($code, $js) = $this->_http_get( list($code, $js) = $this->_http_get(
'http://jquery-ui.googlecode.com/svn/tags/latest/ui/i18n/jquery.ui.datepicker-' 'https://raw.githubusercontent.com/jquery/jquery-ui/master/ui/i18n/datepicker-'
.str_replace('_','-',$l).'.js'); .str_replace('_','-',$l).'.js');
// If locale-specific version is not available, use the base // If locale-specific version is not available, use the base
// language version (de if de_CH is not available) // language version (de if de_CH is not available)
...@@ -673,7 +672,7 @@ class i18n_Compiler extends Module { ...@@ -673,7 +672,7 @@ class i18n_Compiler extends Module {
$this->stdout->write(sprintf( $this->stdout->write(sprintf(
"'%s' (%s) and '%s' (%s)\n", "'%s' (%s) and '%s' (%s)\n",
$orig, $usage, $other_orig, $other_usage $orig, $usage, $other_orig, $other_usage
)); ));
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment