Merge "Stop doing $that = $this in Tests"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 10 Feb 2016 08:55:03 +0000 (08:55 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 10 Feb 2016 08:55:03 +0000 (08:55 +0000)
includes/libs/ReplacementArray.php
languages/data/Names.php
languages/messages/MessagesLki.php [new file with mode: 0644]

index ea50a85..02762f3 100644 (file)
  */
 
 /**
- * Replacement array for FSS with fallback to strtr()
- * Supports lazy initialisation of FSS resource
+ * Wrapper around strtr() that holds replacements
  */
 class ReplacementArray {
        private $data = false;
-       private $fss = false;
 
        /**
         * Create an object with the specified replacement array
         * The array should have the same form as the replacement array for strtr()
         * @param array $data
         */
-       public function __construct( $data = array() ) {
+       public function __construct( $data = [] ) {
                $this->data = $data;
        }
 
@@ -42,17 +40,12 @@ class ReplacementArray {
                return array( 'data' );
        }
 
-       public function __wakeup() {
-               $this->fss = false;
-       }
-
        /**
         * Set the whole replacement array at once
         * @param array $data
         */
        public function setArray( $data ) {
                $this->data = $data;
-               $this->fss = false;
        }
 
        /**
@@ -69,7 +62,6 @@ class ReplacementArray {
         */
        public function setPair( $from, $to ) {
                $this->data[$from] = $to;
-               $this->fss = false;
        }
 
        /**
@@ -77,7 +69,6 @@ class ReplacementArray {
         */
        public function mergeArray( $data ) {
                $this->data = $data + $this->data;
-               $this->fss = false;
        }
 
        /**
@@ -85,7 +76,6 @@ class ReplacementArray {
         */
        public function merge( ReplacementArray $other ) {
                $this->data = $other->data + $this->data;
-               $this->fss = false;
        }
 
        /**
@@ -93,7 +83,6 @@ class ReplacementArray {
         */
        public function removePair( $from ) {
                unset( $this->data[$from] );
-               $this->fss = false;
        }
 
        /**
@@ -103,7 +92,6 @@ class ReplacementArray {
                foreach ( $data as $from => $to ) {
                        $this->removePair( $from );
                }
-               $this->fss = false;
        }
 
        /**
@@ -111,18 +99,6 @@ class ReplacementArray {
         * @return string
         */
        public function replace( $subject ) {
-               if (
-                       function_exists( 'fss_prep_replace' ) &&
-                       version_compare( PHP_VERSION, '5.5.0' ) < 0
-               ) {
-                       if ( $this->fss === false ) {
-                               $this->fss = fss_prep_replace( $this->data );
-                       }
-                       $result = fss_exec_replace( $this->fss, $subject );
-               } else {
-                       $result = strtr( $subject, $this->data );
-               }
-
-               return $result;
+               return strtr( $subject, $this->data );
        }
 }
index 3a929ac..c2d3ee1 100644 (file)
@@ -260,6 +260,7 @@ class Names {
                'li' => 'Limburgs',     # Limburgian
                'lij' => 'Ligure',      # Ligurian
                'liv' => 'Līvõ kēļ',        # Livonian
+               'lki' => 'لەکی‎', # Laki
                'lmo' => 'lumbaart',    # Lombard
                'ln' => 'lingála',             # Lingala
                'lo' => 'ລາວ',    # Laotian
diff --git a/languages/messages/MessagesLki.php b/languages/messages/MessagesLki.php
new file mode 100644 (file)
index 0000000..10d06e5
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+/** Laki
+ *
+ * To improve a translation please visit https://translatewiki.net
+ *
+ * @ingroup Language
+ * @file
+ *
+ */
+
+$fallback = 'fa';
+
+$rtl = true;