Index: trunk/phase3/languages/LanguageConverter.php |
— | — | @@ -1013,11 +1013,15 @@ |
1014 | 1014 | // [2] => '' |
1015 | 1015 | // ) |
1016 | 1016 | $varsep_pattern = '/' . $markup['varsep'] . '\s*' . '(?='; |
1017 | | - foreach( $variants as $variant ) |
1018 | | - $varsep_pattern .= $variant . '\s*' . $markup['codesep'] . '|'; |
| 1017 | + foreach( $variants as $variant ) { |
| 1018 | + $varsep_pattern .= $variant . '\s*' . $markup['codesep'] . '|'; // zh-hans:xxx;zh-hant:yyy |
| 1019 | + $varsep_pattern .= '[^;]*?' . $markup['unidsep'] . '\s*' . $variant |
| 1020 | + . '\s*' . $markup['codesep'] . '|'; // xxx=>zh-hans:yyy; xxx=>zh-hant:zzz |
| 1021 | + } |
1019 | 1022 | $varsep_pattern .= '\s*$)/'; |
1020 | 1023 | |
1021 | 1024 | $choice = preg_split($varsep_pattern, $rules); |
| 1025 | + |
1022 | 1026 | foreach( $choice as $c ) { |
1023 | 1027 | $v = explode($markup['codesep'], $c, 2); |
1024 | 1028 | if( count($v) != 2 ) |