File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ class Transliterator
20
20
'ё ' => 'yo ' ,
21
21
'э ' => 'ye ' ,
22
22
'ю ' => 'yu ' ,
23
+ 'я ' => 'ya ' ,
23
24
'х ' => 'kh ' ,
24
25
'ж ' => 'zh ' ,
25
26
'а ' => 'a ' ,
@@ -102,8 +103,8 @@ public static function encode($str, $fromLang)
102
103
return $ str ;
103
104
}
104
105
105
- $ s = '[^[\]]+(?=]) ' ;
106
- $ t = '<(.|\n)*?> ' ;
106
+ $ s = '/ [^[\]]+(?=])/ ' ;
107
+ $ t = '/ <(.|\n)*?>/ ' ;
107
108
preg_match_all ($ s , $ str , $ orig , PREG_PATTERN_ORDER );
108
109
preg_match_all ($ t , $ str , $ tags , PREG_PATTERN_ORDER );
109
110
@@ -132,12 +133,12 @@ public static function decode($str, $toLang)
132
133
}
133
134
$ str = substr ($ str , 4 );
134
135
135
- $ s = '[^[\]]+(?=]) ' ;
136
- $ t = '<(.|\n)*?> ' ;
136
+ $ s = '/ [^[\]]+(?=])/ ' ;
137
+ $ t = '/ <(.|\n)*?>/ ' ;
137
138
preg_match_all ($ s , $ str , $ orig , PREG_PATTERN_ORDER );
138
139
preg_match_all ($ t , $ str , $ tags , PREG_PATTERN_ORDER );
139
140
140
- $ str = self ::transliterate ($ str , $ toLang );
141
+ $ str = self ::transliterate ($ str , $ toLang, true );
141
142
142
143
if (!empty ($ orig [0 ])) {
143
144
self ::restoreTechnicalData ($ str , $ s , $ orig );
You can’t perform that action at this time.
0 commit comments