Changeset 22186
- Timestamp:
- 2012/12/28 22:39:21 (11 years ago)
- Location:
- branches/version-2_12-multilang/data
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-multilang/data/Smarty/templates/admin/ownersstore/plugin.tpl
r22130 r22186 34 34 35 35 if(mode === 'disable') { 36 result = window.confirm('<!--{t string="tpl_458" }-->');36 result = window.confirm('<!--{t string="tpl_458" escape="j"}-->'); 37 37 if(result === false) { 38 38 $(event.target).attr("checked", "checked"); 39 39 } 40 40 } else if(mode === 'enable') { 41 result = window.confirm('<!--{t string="tpl_459" }-->');41 result = window.confirm('<!--{t string="tpl_459" escape="j"}-->'); 42 42 if(result === false) { 43 43 $(event.target).attr("checked", ""); … … 55 55 */ 56 56 function remoteException(XMLHttpRequest, textStatus, errorThrown) { 57 alert('<!--{t string="tpl_460" }-->');57 alert('<!--{t string="tpl_460" escape="j"}-->'); 58 58 } 59 59 … … 80 80 */ 81 81 function install() { 82 if (window.confirm('<!--{t string="tpl_461" kaigyo_escape=true}-->')){82 if (window.confirm('<!--{t string="tpl_461" escape="j"}-->')){ 83 83 fnModeSubmit('install','',''); 84 84 } … … 89 89 */ 90 90 function uninstall(plugin_id, plugin_code) { 91 if (window.confirm('<!--{t string="tpl_462" }-->')){91 if (window.confirm('<!--{t string="tpl_462" escape="j"}-->')){ 92 92 fnSetFormValue('plugin_id', plugin_id); 93 93 fnModeSubmit('uninstall', 'plugin_code', plugin_code); … … 99 99 */ 100 100 function update(plugin_id, plugin_code) { 101 if (window.confirm('<!--{t string="tpl_463" }-->')){101 if (window.confirm('<!--{t string="tpl_463" escape="j"}-->')){ 102 102 removeUpdateFile('update_file_' + plugin_id); 103 103 fnSetFormValue('plugin_id', plugin_id); … … 128 128 <h2><!--{t string="tpl_464"}--></h2> 129 129 <table class="form"> 130 <!--{* 案1 *}--> 130 131 <tr> 131 <th><!--{t string="tpl_465"}--></th> 132 <th><!--{t string="tpl_465"}--> <!--{t string="<require>"}--></th> 133 <td> 134 <!--{assign var=key value="plugin_file"}--> 135 <span class="attention"><!--{$arrErr[$key]}--></span> 136 <input type="file" name="<!--{ $key }-->" class="box45" size="43" style="<!--{$arrErr[$key]|sfGetErrorColor}--> <!--{if $arrErr[$key]}--> background-color:<!--{$smarty.const.ERR_COLOR|h}--><!--{/if}-->"> 137 <a class="btn-action" href="javascript:;" onclick="install(); return false;"><span class="btn-next"><!--{t string="tpl_466"}--></span></a> 138 </td> 139 </tr> 140 <!--{* 案2 *}--> 141 <tr> 142 <th><!--{t string="tpl_465"}--> <span class='attention'><!--{t string="require_mark"}--></span></th> 132 143 <td> 133 144 <!--{assign var=key value="plugin_file"}--> -
branches/version-2_12-multilang/data/class/helper/SC_Helper_Locale.php
r22099 r22186 70 70 } 71 71 72 $return = $string; 72 73 // Get string list of specified language. 73 if ($lang_code == 'en') { 74 return $string; 75 } else { 74 if ($lang_code != 'en') { 76 75 $translations = SC_Helper_Locale_Ex::$_instance->get_translations($lang_code, $device_type_id); 77 76 // Whether a string which corresponding with alias is exist. 78 if (isset($translations[$string])) { 79 return $translations[$string]; 80 } 81 else { 82 return $string; 83 } 84 } 77 if (isset($translations[$return])) { 78 $return = $translations[$return]; 79 } 80 } 81 82 $esc_types = $options['escape']; 83 if (is_null($esc_types) && $string[0] !== '<') { 84 $esc_types = 'h'; 85 } 86 foreach (explode(',', $esc_types) as $esc_type) { 87 switch ($esc_type) { 88 case 'h': 89 case 'html': 90 $return = htmlspecialchars($return, ENT_QUOTES); 91 break; 92 93 case 'j': 94 case 'javascript': 95 // escape quotes and backslashes, newlines, etc. 96 $return = strtr($return, array('\\'=>'\\\\',"'"=>"\\'",'"'=>'\\"',"\r"=>'\\r',"\n"=>'\\n','</'=>'<\/')); 97 break; 98 99 case 'nl2br': 100 $return = nl2br($return, true); 101 break; 102 103 case '': 104 case 'none': 105 break; 106 107 case 'htmlall': 108 $return = htmlentities($return, ENT_QUOTES); 109 break; 110 111 case 'u': 112 case 'url': 113 $return = rawurlencode($return); 114 break; 115 116 case 'urlpathinfo': 117 $return = str_replace('%2F','/',rawurlencode($return)); 118 break; 119 120 case 'quotes': 121 // escape unescaped single quotes 122 $return = preg_replace("%(?<!\\\\)'%", "\\'", $return); 123 break; 124 125 case 'hex': 126 // escape every character into hex 127 $text = ''; 128 for ($x=0; $x < strlen($return); $x++) { 129 $text .= '%' . bin2hex($return[$x]); 130 } 131 $return = $text; 132 break; 133 134 case 'hexentity': 135 $text = ''; 136 for ($x=0; $x < strlen($return); $x++) { 137 $text .= '&#x' . bin2hex($return[$x]) . ';'; 138 } 139 $return = $text; 140 break; 141 142 case 'decentity': 143 $text = ''; 144 for ($x=0; $x < strlen($return); $x++) { 145 $text .= '&#' . ord($return[$x]) . ';'; 146 } 147 $return = $text; 148 break; 149 150 case 'mail': 151 // safe way to display e-mail address on a web page 152 $return = str_replace(array('@', '.'),array(' [AT] ', ' [DOT] '), $return); 153 break; 154 155 case 'nonstd': 156 // escape non-standard chars, such as ms document quotes 157 $_res = ''; 158 for($_i = 0, $_len = strlen($return); $_i < $_len; $_i++) { 159 $_ord = ord(substr($return, $_i, 1)); 160 // non-standard char, escape it 161 if($_ord >= 126){ 162 $_res .= '&#' . $_ord . ';'; 163 } 164 else { 165 $_res .= substr($return, $_i, 1); 166 } 167 } 168 $return = $_res; 169 break; 170 171 default: 172 trigger_error('unknown escape type. ' . var_export(func_get_args(), true), E_USER_WARNING); 173 break; 174 } 175 } 176 177 return $return; 85 178 } 86 179 -
branches/version-2_12-multilang/data/locales/ja.po
r22173 r22186 3 3 "Project-Id-Version: EC-CUBE Core\n" 4 4 "POT-Creation-Date: 2012-05-07 13T_39+0900\n" 5 "PO-Revision-Date: 2012-12-2 7 14:19+0900\n"5 "PO-Revision-Date: 2012-12-28 22:26+0900\n" 6 6 "Last-Translator: MATSUDA Terutaka <matsudaterutaka@gmail.com>\n" 7 7 "Language-Team: \n" … … 3532 3532 msgid "SC_Utils_001" 3533 3533 msgstr "" 3534 ">> /install/T_FIELD は、インストール完了後にファイルを削除してくださ" 3535 "い。" 3534 ">> /install/T_FIELD は、インストール完了後にファイルを削除してください。" 3536 3535 3537 3536 msgid "SC_Utils_002" … … 5024 5023 msgid "tpl_462" 5025 5024 msgstr "" 5026 "一度削除したデータは元に戻せません。\\nプラグインを削除しても宜しいですか?" 5025 "一度削除したデータは元に戻せません。\n" 5026 "プラグインを削除しても宜しいですか?" 5027 5027 5028 5028 msgid "tpl_463" … … 5033 5033 5034 5034 msgid "tpl_465" 5035 msgstr "プラグイン <span class='attention'> *</span>"5035 msgstr "プラグイン" 5036 5036 5037 5037 msgid "tpl_466" … … 5878 5878 msgid "pt_suffix" 5879 5879 msgstr "pt" 5880 5881 msgid "<require>" 5882 msgstr "<span class='attention'>*</span>" 5883 5884 msgid "require_mark" 5885 msgstr "*" -
branches/version-2_12-multilang/data/smarty_extends/function.t.php
r22099 r22186 45 45 unset($params['device_type_id']); 46 46 } 47 // エスケープの指定がある場合、オプションに移す 48 if (isset($params['escape'])) { 49 $options['escape'] = $params['escape']; 50 unset($params['escape']); 51 } 47 52 48 53 return t($string, $params, $options);
Note: See TracChangeset
for help on using the changeset viewer.