Skip to content
Permalink
Browse files

Remove unncessary language support.

  • Loading branch information...
dereuromark committed Apr 23, 2014
1 parent 7e6bc48 commit 0c036f637039a3d45f86f7618981560f859171e6
Showing with 41 additions and 128 deletions.
  1. +0 −51 lib/Cake/Test/Case/Utility/InflectorTest.php
  2. +41 −77 lib/Cake/Utility/Inflector.php
@@ -51,33 +51,9 @@ class InflectorTest extends CakeTestCase {
'o', 'ô' => 'o', 'õ' => 'o', 'ő' => 'o', 'ø' => 'o', 'ș' => 's', 'ț' => 't', 'ù' => 'u', 'ú' => 'u',
'û' => 'u', 'ű' => 'u', 'ý' => 'y', 'þ' => 'th', 'ÿ' => 'y'
),
'el' => array ( /* Greek */
'α' => 'a', 'β' => 'b', 'γ' => 'g', 'δ' => 'd', 'ε' => 'e', 'ζ' => 'z', 'η' => 'h', 'θ' => 'th',
'ι' => 'i', 'κ' => 'k', 'λ' => 'l', 'μ' => 'm', 'ν' => 'n', 'ξ' => 'x', 'ο' => 'o', 'π' => 'p',
'ρ' => 'r', 'σ' => 's', 'τ' => 't', 'υ' => 'y', 'φ' => 'f', 'χ' => 'x', 'ψ' => 'ps', 'ω' => 'w',
'ά' => 'a', 'έ' => 'e', 'ί' => 'i', 'ό' => 'o', 'ύ' => 'y', 'ή' => 'h', 'ώ' => 'w', 'ς' => 's',
'ϊ' => 'i', 'ΰ' => 'y', 'ϋ' => 'y', 'ΐ' => 'i',
'Α' => 'A', 'Β' => 'B', 'Γ' => 'G', 'Δ' => 'D', 'Ε' => 'E', 'Ζ' => 'Z', 'Η' => 'H', 'Θ' => 'TH',
'Ι' => 'I', 'Κ' => 'K', 'Λ' => 'L', 'Μ' => 'M', 'Ν' => 'N', 'Ξ' => 'X', 'Ο' => 'O', 'Π' => 'P',
'Ρ' => 'R', 'Σ' => 'S', 'Τ' => 'T', 'Υ' => 'Y', 'Φ' => 'F', 'Χ' => 'X', 'Ψ' => 'PS', 'Ω' => 'W',
'Ά' => 'A', 'Έ' => 'E', 'Ί' => 'I', 'Ό' => 'O', 'Ύ' => 'Y', 'Ή' => 'H', 'Ώ' => 'W', 'Ϊ' => 'I',
'Ϋ' => 'Y'
),
'tr' => array ( /* Turkish */
'ş' => 's', 'Ş' => 'S', 'ı' => 'i', 'İ' => 'I', 'ç' => 'c', 'Ç' => 'C', 'ğ' => 'g', 'Ğ' => 'G'
),
'ru' => array ( /* Russian */
'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd', 'е' => 'e', 'ё' => 'yo', 'ж' => 'zh',
'з' => 'z', 'и' => 'i', 'й' => 'j', 'к' => 'k', 'л' => 'l', 'м' => 'm', 'н' => 'n', 'о' => 'o',
'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't', 'у' => 'u', 'ф' => 'f', 'х' => 'h', 'ц' => 'c',
'ч' => 'ch', 'ш' => 'sh', 'щ' => 'sh', 'ы' => 'y', 'э' => 'e', 'ю' => 'yu',
'я' => 'ya',
'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G', 'Д' => 'D', 'Е' => 'E', 'Ё' => 'Yo', 'Ж' => 'Zh',
'З' => 'Z', 'И' => 'I', 'Й' => 'J', 'К' => 'K', 'Л' => 'L', 'М' => 'M', 'Н' => 'N', 'О' => 'O',
'П' => 'P', 'Р' => 'R', 'С' => 'S', 'Т' => 'T', 'У' => 'U', 'Ф' => 'F', 'Х' => 'H', 'Ц' => 'C',
'Ч' => 'Ch', 'Ш' => 'Sh', 'Щ' => 'Sh', 'Ы' => 'Y', 'Э' => 'E', 'Ю' => 'Yu',
'Я' => 'Ya',
),
'uk' => array ( /* Ukrainian */
'Є' => 'Ye', 'І' => 'I', 'Ї' => 'Yi', 'Ґ' => 'G', 'є' => 'ye', 'і' => 'i', 'ї' => 'yi', 'ґ' => 'g'
),
@@ -102,33 +78,6 @@ class InflectorTest extends CakeTestCase {
'lt' => array ( /* Lithuanian */
'ą' => 'a', 'č' => 'c', 'ę' => 'e', 'ė' => 'e', 'į' => 'i', 'š' => 's', 'ų' => 'u', 'ū' => 'u', 'ž' => 'z',
'Ą' => 'A', 'Č' => 'C', 'Ę' => 'E', 'Ė' => 'E', 'Į' => 'I', 'Š' => 'S', 'Ų' => 'U', 'Ū' => 'U', 'Ž' => 'Z'
),
'vn' => array ( /* Vietnamese */
'Á' => 'A', 'À' => 'A', '' => 'A', 'Ã' => 'A', '' => 'A', 'Ă' => 'A', '' => 'A', '' => 'A', '' => 'A', '' => 'A', '' => 'A', 'Â' => 'A', '' => 'A', '' => 'A', '' => 'A', '' => 'A', '' => 'A',
'á' => 'a', 'à' => 'a', '' => 'a', 'ã' => 'a', '' => 'a', 'ă' => 'a', '' => 'a', '' => 'a', '' => 'a', '' => 'a', '' => 'a', 'â' => 'a', '' => 'a', '' => 'a', '' => 'a', '' => 'a', '' => 'a',
'É' => 'E', 'È' => 'E', '' => 'E', '' => 'E', '' => 'E', 'Ê' => 'E', '' => 'E', '' => 'E', '' => 'E', '' => 'E', '' => 'E',
'é' => 'e', 'è' => 'e', '' => 'e', '' => 'e', '' => 'e', 'ê' => 'e', 'ế' => 'e', '' => 'e', '' => 'e', '' => 'e', '' => 'e',
'Í' => 'I', 'Ì' => 'I', '' => 'I', 'Ĩ' => 'I', '' => 'I', 'í' => 'i', 'ì' => 'i', '' => 'i', 'ĩ' => 'i', '' => 'i',
'Ó' => 'O', 'Ò' => 'O', '' => 'O', 'Õ' => 'O', '' => 'O', 'Ô' => 'O', '' => 'O', '' => 'O', '' => 'O', '' => 'O', '' => 'O', 'Ơ' => 'O', '' => 'O', '' => 'O', '' => 'O', '' => 'O', '' => 'O',
'ó' => 'o', 'ò' => 'o', '' => 'o', 'õ' => 'o', '' => 'o', 'ô' => 'o', '' => 'o', '' => 'o', '' => 'o', '' => 'o', '' => 'o', 'ơ' => 'o', '' => 'o', '' => 'o', '' => 'o', '' => 'o', '' => 'o',
'Ú' => 'U', 'Ù' => 'U', '' => 'U', 'Ũ' => 'U', '' => 'U', 'Ư' => 'U', '' => 'U', '' => 'U', '' => 'U', '' => 'U', '' => 'U',
'ú' => 'u', 'ù' => 'u', '' => 'u', 'ũ' => 'u', '' => 'u', 'ư' => 'u', '' => 'u', '' => 'u', '' => 'u', '' => 'u', '' => 'u',
'Ý' => 'Y', '' => 'Y', '' => 'Y', '' => 'Y', '' => 'Y', 'ý' => 'y', '' => 'y', '' => 'y', '' => 'y', '' => 'y',
'Đ' => 'D', 'đ' => 'd'
),
'ar' => array ( /* Arabic */
'أ' => 'a', 'ب' => 'b', 'ت' => 't', 'ث' => 'th', 'ج' => 'g', 'ح' => 'h', 'خ' => 'kh', 'د' => 'd',
'ذ' => 'th', 'ر' => 'r', 'ز' => 'z', 'س' => 's', 'ش' => 'sh', 'ص' => 's', 'ض' => 'd', 'ط' => 't',
'ظ' => 'th', 'ع' => 'aa', 'غ' => 'gh', 'ف' => 'f', 'ق' => 'k', 'ك' => 'k', 'ل' => 'l', 'م' => 'm',
'ن' => 'n', 'ه' => 'h', 'و' => 'o', 'ي' => 'y'
),
'sr' => array ( /* Serbian */
'ђ' => 'dj', 'ј' => 'j', 'љ' => 'lj', 'њ' => 'nj', 'ћ' => 'c', 'џ' => 'dz',
'Ђ' => 'Dj', 'Ј' => 'j', 'Љ' => 'Lj', 'Њ' => 'Nj', 'Ћ' => 'C', 'Џ' => 'Dz',
),
'az' => array ( /* Azerbaijani */
'ç' => 'c', 'ə' => 'e', 'ğ' => 'g', 'ı' => 'i', 'ş' => 's',
'Ç' => 'C', 'Ə' => 'E', 'Ğ' => 'G', 'İ' => 'I', 'Ş' => 'S',
)
);
@@ -176,99 +176,63 @@ class Inflector {
* @var array
*/
protected static $_transliteration = array(
'/À|Á|Â|Ã|Å|Ǻ|Ā|Ă|Ą|Ǎ|Α|Ά|А|Ả|Ạ|Ắ|Ằ|Ẳ|Ẵ|Ặ|Ấ|Ầ|Ẩ|Ẫ|Ậ/' => 'A',
'/À|Á|Â|Ã|Å|Ǻ|Ā|Ă|Ą|Ǎ/' => 'A',
'/Æ|Ǽ/' => 'AE',
'/Ä/' => 'Ae',
'/Β|Б/' => 'B',
'/Ç|Ć|Ĉ|Ċ|Č|Ц|Ћ/' => 'C',
'/Ч/' => 'Ch',
'/Ð|Ď|Đ|Δ|Д/' => 'D',
'/Ђ/' => 'Dj',
'/Џ/' => 'Dz',
'/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě|Ε|Έ|Е|Э|Ẻ|Ẽ|Ẹ|Ế|Ề|Ể|Ễ|Ệ|Ə/' => 'E',
'/Φ|Ф/' => 'F',
'/Ĝ|Ğ|Ġ|Ģ|Γ|Г|Ґ/' => 'G',
'/Ĥ|Ħ|Η|Ή|Х/' => 'H',
'/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ|Ι|Ί|Ϊ|И|І|Ỉ|Ị/' => 'I',
'/Ç|Ć|Ĉ|Ċ|Č/' => 'C',
'/Ð|Ď|Đ/' => 'D',
'/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě/' => 'E',
'/Ĝ|Ğ|Ġ|Ģ|Ґ/' => 'G',
'/Ĥ|Ħ/' => 'H',
'/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ|І/' => 'I',
'/IJ/' => 'IJ',
'/Ĵ|Й/' => 'J',
'/Ķ|Κ|К/' => 'K',
'/Ĺ|Ļ|Ľ|Ŀ|Ł|Λ|Л/' => 'L',
'/Љ/' => 'Lj',
'/Μ|М/' => 'M',
'/Ñ|Ń|Ņ|Ň|Ν|Н/' => 'N',
'/Њ/' => 'Nj',
'/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ|Ο|Ό|О|Ỏ|Ọ|Ố|Ồ|Ổ|Ỗ|Ộ|Ớ|Ờ|Ở|Ỡ|Ợ/' => 'O',
'/Ĵ/' => 'J',
'/Ķ/' => 'K',
'/Ĺ|Ļ|Ľ|Ŀ|Ł/' => 'L',
'/Ñ|Ń|Ņ|Ň/' => 'N',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ǎ|ª/' => 'a',
'/ä|æ|ǽ/' => 'ae',
'/β|б|ب/' => 'b',
'/ç|ć|ĉ|ċ|č|ц/ћ' => 'c',
'/ч/' => 'ch',
'/ð|ď|đ|δ|д|د|ض/' => 'd',
'/ђ/' => 'dj',
'/џ/' => 'dz',
'/è|é|ê|ë|ē|ĕ|ė|ę|ě|ε|έ|е|э|ẻ|ẽ|ẹ|ế|ề|ể|ễ|ệ|ə/' => 'e',
'/ƒ|φ|ф|ف/' => 'f',
'/ĝ|ğ|ġ|ģ|γ|г|ґ|ج/' => 'g',
'/غ/' => 'gh',
'/ĥ|ħ|η|ή|х|ح|ه/' => 'h',
'/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı|ι|ί|ϊ|ΐ|и|і|ỉ|ị/' => 'i',
'/ç|ć|ĉ|ċ|č/' => 'c',
'/ð|ď|đ/' => 'd',
'/è|é|ê|ë|ē|ĕ|ė|ę|ě/' => 'e',
'/ƒ/' => 'f',
'/ĝ|ğ|ġ|ģ|ґ/' => 'g',
'/ĥ|ħ/' => 'h',
'/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı|і/' => 'i',
'/ij/' => 'ij',
'/ĵ|й|ј|Ј/' => 'j',
'/ķ|κ|к|ق|ك/' => 'k',
'/خ/' => 'kh',
'/ĺ|ļ|ľ|ŀ|ł|λ|л|ل/' => 'l',
'/љ/' => 'lj',
'/μ|м|م/' => 'm',
'/ñ|ń|ņ|ň|ʼn|ν|н|ن/' => 'n',
'/њ/' => 'nj',
'/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º|ο|ό|о|ỏ|ọ|ố|ồ|ổ|ỗ|ộ|ớ|ờ|ở|ỡ|ợ|و/' => 'o',
'/ĵ/' => 'j',
'/ķ/' => 'k',
'/ĺ|ļ|ľ|ŀ|ł/' => 'l',
'/ñ|ń|ņ|ň|ʼn/' => 'n',
'/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º/' => 'o',
'/ö|œ/' => 'oe',
'/π|п/' => 'p',
'/ψ/' => 'ps',
'/ŕ|ŗ|ř|ρ|р|ر/' => 'r',
'/ś|ŝ|ş|ș|š|ſ|σ|ς|с|س|ص/' => 's',
'/ш|щ|ش/' => 'sh',
'/ŕ|ŗ|ř/' => 'r',
'/ś|ŝ|ş|ș|š|ſ/' => 's',
'/ß/' => 'ss',
'/ţ|ț|ť|ŧ|τ|т|ت|ط/' => 't',
'/þ|θ|ث|ذ|ظ/' => 'th',
'/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ|у|ủ|ụ|ứ|ừ|ử|ữ|ự/' => 'u',
'/ţ|ț|ť|ŧ/' => 't',
'/þ/' => 'th',
'/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ/' => 'u',
'/ü/' => 'ue',
'/в/' => 'v',
'/ŵ|ω|ώ/' => 'w',
'/ξ|χ/' => 'x',
'/ý|ÿ|ŷ|υ|ύ|ΰ|ϋ|ы|ỳ|ỷ|ỹ|ỵ|ي/' => 'y',
'/я/' => 'ya',
'/ŵ/' => 'w',
'/ý|ÿ|ŷ/' => 'y',
'/є/' => 'ye',
'/ї/' => 'yi',
'/ё/' => 'yo',
'/ю/' => 'yu',
'/ź|ż|ž|ζ|з|ز/' => 'z',
'/ж/' => 'zh',
'/ź|ż|ž/' => 'z',
);
/**

0 comments on commit 0c036f6

Please sign in to comment.
You can’t perform that action at this time.