Code Duplication    Length = 13-13 lines in 2 locations

languages/classes/LanguageIu.php 1 location

@@ 171-183 (lines=13) @@
168
	 *
169
	 * @return string
170
	 */
171
	function translate( $text, $toVariant ) {
172
		// If $text is empty or only includes spaces, do nothing
173
		// Otherwise translate it
174
		if ( trim( $text ) ) {
175
			$this->loadTables();
176
			// To syllabics, first translate uppercase to lowercase Latin
177
			if ( $toVariant == 'ike-cans' ) {
178
				$text = $this->mTables['lowercase']->replace( $text );
179
			}
180
			$text = $this->mTables[$toVariant]->replace( $text );
181
		}
182
		return $text;
183
	}
184
}
185
186
/**

languages/classes/LanguageShi.php 1 location

@@ 147-159 (lines=13) @@
144
	 *
145
	 * @return string
146
	 */
147
	function translate( $text, $toVariant ) {
148
		// If $text is empty or only includes spaces, do nothing
149
		// Otherwise translate it
150
		if ( trim( $text ) ) {
151
			$this->loadTables();
152
			// To Tifinagh, first translate uppercase to lowercase Latin
153
			if ( $toVariant == 'shi-tfng' ) {
154
				$text = $this->mTables['lowercase']->replace( $text );
155
			}
156
			$text = $this->mTables[$toVariant]->replace( $text );
157
		}
158
		return $text;
159
	}
160
}
161
162
/**