From c00d56ac208887cb411065a760d7513b51a4959d Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Wed, 30 Jul 2014 08:07:11 -0500 Subject: [PATCH] i18n: Do not translate 'b' in __($a['b']) --- include/class.config.php | 2 +- setup/cli/modules/i18n.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/class.config.php b/include/class.config.php index ba261e8b4..a01ff15bd 100644 --- a/include/class.config.php +++ b/include/class.config.php @@ -445,7 +445,7 @@ class OsticketConfig extends Config { $modes = static::allTopicSortModes(); if (!isset($modes[$mode])) throw new InvalidArgumentException(sprintf( - __('%s: Unsupport help topic sort mode'), $mode)); + '%s: Unsupported help topic sort mode', $mode)); $this->update('help_topic_sort_mode', $mode); } diff --git a/setup/cli/modules/i18n.php b/setup/cli/modules/i18n.php index e4084500d..a863e5349 100644 --- a/setup/cli/modules/i18n.php +++ b/setup/cli/modules/i18n.php @@ -240,7 +240,8 @@ class i18n_Compiler extends Module { #'Translated' => #'Approved' => 'Id' => 'lang:' . $lang, - 'Version' => strtotime($po_header['PO-Revision-Date']), + 'Last-Revision' => $po_header['PO-Revision-Date'], + 'Version' => strtotime($po_header['PO-Revision-Date']) / 10000, ); $phar->addFromString( 'MANIFEST.php', @@ -315,6 +316,9 @@ class i18n_Compiler extends Module { case '.': $string['constant'] = false; break; + case '[': + // Not intended to be translated — array index + return null; default: return array($string, $T); } @@ -348,6 +352,7 @@ class i18n_Compiler extends Module { $args['comments'] = array_merge( @$args['comments'] ?: array(), $string['comments']); + // Handle the terminating token from ::__read_next_string() switch ($T[0]) { case ')': return $args; -- GitLab