From f30ec8b64fd8695bcd3cc4491fc1c5cc6f472321 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Tue, 8 Jul 2014 14:35:25 -0500
Subject: [PATCH] i18n: Fix several lint errors

Also, the final version of the system will not require the `gettext`
extension for PHP
---
 include/staff/system.inc.php     | 4 ----
 setup/cli/modules/i18n.php       | 1 +
 setup/inc/install-prereq.inc.php | 2 --
 setup/test/tests/stubs.php       | 6 ++++++
 4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/include/staff/system.inc.php b/include/staff/system.inc.php
index e583f3391..89f3bd498 100644
--- a/include/staff/system.inc.php
+++ b/include/staff/system.inc.php
@@ -43,10 +43,6 @@ $commit = GIT_VERSION != '$git' ? GIT_VERSION : (
                     echo extension_loaded('json')?'check':'warning-sign'; ?>"></i></td>
                 <td>json</td>
                 <td><?php echo __('Improves performance creating and processing JSON'); ?></td></tr>
-            <tr><td><i class="icon icon-<?php
-                    echo extension_loaded('gettext')?'check':'warning-sign'; ?>"></i></td>
-                <td>gettext</td>
-                <td><?php echo __('Improves performance for non US-English configurations'); ?></td></tr>
             <tr><td><i class="icon icon-<?php
                     echo extension_loaded('mbstring')?'check':'warning-sign'; ?>"></i></td>
                 <td>mbstring</td>
diff --git a/setup/cli/modules/i18n.php b/setup/cli/modules/i18n.php
index 7f77d8622..78183885e 100644
--- a/setup/cli/modules/i18n.php
+++ b/setup/cli/modules/i18n.php
@@ -199,6 +199,7 @@ class i18n_Compiler extends Module {
         }
 
         // Add in translation of javascript strings
+        $phrases = array();
         if ($mo && ($js = $this->__getAllJsPhrases())) {
             $mo = unserialize($mo);
             foreach ($js as $c) {
diff --git a/setup/inc/install-prereq.inc.php b/setup/inc/install-prereq.inc.php
index 5a31366f2..54a0421a6 100644
--- a/setup/inc/install-prereq.inc.php
+++ b/setup/inc/install-prereq.inc.php
@@ -32,8 +32,6 @@ if(!defined('SETUPINC')) die('Kwaheri!');
                     echo __('(for HTML email processing)');?></li>
                 <li class="<?php echo extension_loaded('json')?'yes':'no'; ?>">PHP JSON <?php echo __('extension');?> <?php
                     echo __('(faster performance)');?></li>
-                <li class="<?php echo extension_loaded('gettext')?'yes':'no'; ?>">Gettext <?php echo __('extension');?> &mdash; <?php
-                    echo __('used for translations');?> <?php echo __('(faster performance)');?></li>
                 <li class="<?php echo extension_loaded('mbstring')?'yes':'no'; ?>">Mbstring <?php echo __('extension');?> &mdash; <?php
                     echo __('recommended for all installations');?></li>
                 <li class="<?php echo extension_loaded('phar')?'yes':'no'; ?>">Phar <?php echo __('extension');?> &mdash; <?php
diff --git a/setup/test/tests/stubs.php b/setup/test/tests/stubs.php
index 4cb1e9bcc..72f0744d5 100644
--- a/setup/test/tests/stubs.php
+++ b/setup/test/tests/stubs.php
@@ -93,6 +93,8 @@ class DateTimeZone {
 class Phar {
     static function isValidPharFilename() {}
     function setStub() {}
+    function startBuffering() {}
+    function stopBuffering() {}
 }
 
 class ZipArchive {
@@ -106,4 +108,8 @@ class finfo {
     function file() {}
     function buffer() {}
 }
+
+class Locale {
+    function getDisplayName() {}
+}
 ?>
-- 
GitLab