[Svn-src-all:3265] [version-2_12-multilang 22166] #1995 プロトタイプを追加
adachi
admin @ mail.ec-cube.net
2012年 12月 27日 (木) 10:32:48 JST
Subversion committed to /home/svn/open 22166
http://svn.ec-cube.net/open_trac/changeset/22166
┌────────────────────────────┐
│更新者 : adachi │
│更新日時: 2012-12-27 10:32:48 +0900 (木, 27 12月 2012)│
└────────────────────────────┘
Log:
--------------------------------------------------------
#1995 プロトタイプを追加
Changed: [U:修正,A:追加,D:削除]
--------------------------------------------------------
U branches/version-2_12-multilang/data/Smarty/templates/default/site_frame.tpl
U branches/version-2_12-multilang/data/Smarty/templates/sphone/site_frame.tpl
A branches/version-2_12-multilang/html/js/locale.js
A branches/version-2_12-multilang/html/js/locales/
A branches/version-2_12-multilang/html/js/locales/en.js
A branches/version-2_12-multilang/html/js/locales/ja.js
変更: branches/version-2_12-multilang/data/Smarty/templates/default/site_frame.tpl
===================================================================
--- branches/version-2_12-multilang/data/Smarty/templates/default/site_frame.tpl 2012-12-27 00:57:50 UTC (rev 22165)
+++ branches/version-2_12-multilang/data/Smarty/templates/default/site_frame.tpl 2012-12-27 01:32:48 UTC (rev 22166)
@@ -28,6 +28,8 @@
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="stylesheet" href="<!--{$TPL_URLPATH}-->css/import.css" type="text/css" media="all" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="<!--{$smarty.const.HTTP_URL}-->rss/<!--{$smarty.const.DIR_INDEX_PATH}-->" />
+<script type="text/javascript" src="<!--{$smarty.const.ROOT_URLPATH}-->js/locales/<!--{$smarty.const.LANG_CODE}-->.js"></script>
+<script type="text/javascript" src="<!--{$smarty.const.ROOT_URLPATH}-->js/locale.js"></script>
<!--{if $tpl_page_category == "abouts"}-->
<!--{if ($smarty.server.HTTPS != "") && ($smarty.server.HTTPS != "off")}-->
<script type="text/javascript" src="https://maps-api-ssl.google.com/maps/api/js?sensor=false"></script>
@@ -55,9 +57,15 @@
<script type="text/javascript">//<![CDATA[
<!--{$tpl_javascript}-->
+
$(function(){
+ cube_i18n.lang_code = '<!--{$smarty.const.LANG_CODE}-->';
+ cube_i18n.root_path = '<!--{$smarty.const.ROOT_URLPATH}-->';
+ //cube_i18n.load();
+
<!--{$tpl_onload}-->
});
+
//]]></script>
<!--{* ▼Head COLUMN*}-->
変更: branches/version-2_12-multilang/data/Smarty/templates/sphone/site_frame.tpl
===================================================================
--- branches/version-2_12-multilang/data/Smarty/templates/sphone/site_frame.tpl 2012-12-27 00:57:50 UTC (rev 22165)
+++ branches/version-2_12-multilang/data/Smarty/templates/sphone/site_frame.tpl 2012-12-27 01:32:48 UTC (rev 22166)
@@ -30,7 +30,8 @@
<meta name="format-detection" content="telephone=no">
<!--{* 共通CSS *}-->
<link rel="stylesheet" media="only screen" href="<!--{$TPL_URLPATH}-->css/import.css" />
-
+ <script type="text/javascript" src="<!--{$smarty.const.ROOT_URLPATH}-->js/locales/<!--{$smarty.const.LANG_CODE}-->.js"></script>
+ <script type="text/javascript" src="<!--{$smarty.const.ROOT_URLPATH}-->js/locale.js"></script>
<!--{if $tpl_page_category == "abouts"}-->
<!--{if ($smarty.server.HTTPS != "") && ($smarty.server.HTTPS != "off")}-->
<script src="https://maps-api-ssl.google.com/maps/api/js?sensor=false"></script>
追加: branches/version-2_12-multilang/html/js/locale.js
===================================================================
--- branches/version-2_12-multilang/html/js/locale.js (rev 0)
+++ branches/version-2_12-multilang/html/js/locale.js 2012-12-27 01:32:48 UTC (rev 22166)
@@ -0,0 +1,62 @@
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+function fnT() {
+ var msgid = '';
+
+ if (arguments.length == 0) {
+ throw new Error('invalid arguments.');
+ }
+
+ // message id only.
+ if (arguments.length == 1) {
+ msgid = arguments[0];
+ if (cube_locale_messages[msgid]) {
+ return cube_locale_messages[msgid];
+ }
+ return msgid;
+ }
+
+ // formated message
+ if (arguments.length > 1) {
+ msgid = arguments[0];
+ if (cube_locale_messages[msgid]) {
+ var message = cube_locale_messages[msgid];
+ for (var i = 1; i < arguments.length; i++) {
+ var reg = new RegExp("\\{" + (i - 1) + "\\}", "g");
+ if (arguments[i] == null) {
+ message = message.replace(reg, "null");
+ } else {
+ try {
+ message = message.replace(reg, arguments[i].toString());
+ } catch (e) {
+ message = message.replace(reg, "[object]");
+ }
+ }
+ }
+ return message;
+ }
+ return msgid;
+ }
+ return msgid;
+}
+
追加: branches/version-2_12-multilang/html/js/locales/en.js
===================================================================
--- branches/version-2_12-multilang/html/js/locales/en.js (rev 0)
+++ branches/version-2_12-multilang/html/js/locales/en.js 2012-12-27 01:32:48 UTC (rev 22166)
@@ -0,0 +1,64 @@
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+var cube_locale_messages = {
+ // js/site.js
+ 'j_001': '郵便番号を正しく入力して下さい。',
+ 'j_002': '選択したカテゴリとカテゴリ内のすべてのカテゴリを削除します',
+ 'j_003': '一度削除したデータは、元に戻せません。\n削除しても宜しいですか?',
+ 'j_004': '一度削除したデータは、元に戻せません。\n削除しても宜しいですか?\n\n※ 在庫数は手動で戻してください。',
+ 'j_005': '登録しても宜しいですか',
+ 'j_006': '検索結果をすべて削除しても宜しいですか',
+ 'j_007': '一度削除したデータは、元に戻せません。\n削除しても宜しいですか?',
+ 'j_008': '登録しても宜しいですか',
+ 'j_009': '登録しても宜しいですか',
+ 'j_010': 'メールアドレス/パスワードを入力して下さい。',
+ 'j_011': '縮小',
+ 'j_012': '拡大',
+ // js/products.js
+ 'j_013': '申し訳ございませんが、只今品切れ中です。',
+ // user_data/packages/admin/js/admin.js
+ 'j_014': '必須項目を入力して下さい。',
+ 'j_015': '内容を登録しても宜しいでしょうか',
+ 'j_016': '登録内容を削除しても宜しいでしょうか',
+ 'j_017': 'カテゴリを登録しても宜しいでしょうか',
+ 'j_018': '親カテゴリは選択できません',
+ 'j_019': '登録内容を削除しても宜しいでしょうか',
+ 'j_020': 'この内容で登録しても宜しいでしょうか',
+ 'j_021': '削除しても宜しいでしょうか',
+ 'j_022': '登録内容を削除しても宜しいでしょうか',
+ 'j_023': 'カテゴリを登録しても宜しいでしょうか',
+ 'j_024': '親カテゴリは選択できません',
+ 'j_025': '登録内容を削除しても宜しいでしょうか',
+ 'j_026': 'この内容で登録しても宜しいでしょうか',
+ 'j_027': '削除しても宜しいでしょうか',
+ 'j_028': '既に登録されているメールアドレスです。\nメルマガの種類が変更されます。宜しいですか?',
+ 'j_029': '<FONT Color="#FFFF99"> << 表示 </FONT>',
+ 'j_030': ' <FONT Color="#FFFF99"> >> 非表示 </FONT>',
+ // user_data/packages/admin/js/breadcrumbs.js
+ 'j_031': '<span>ホーム</span>',
+ // user_data/packages/sphone/js/barbutton
+ 'j_032': 'TOPへ',
+ // user_data/packages/sphone/js/favorite.js
+ 'j_033': 'お気に入りに登録しました',
+ 'j_034': '<p>お気に入り登録済み</p>',
+ 'j_035': 'お気に入りの登録に失敗しました'
+};
追加: branches/version-2_12-multilang/html/js/locales/ja.js
===================================================================
--- branches/version-2_12-multilang/html/js/locales/ja.js (rev 0)
+++ branches/version-2_12-multilang/html/js/locales/ja.js 2012-12-27 01:32:48 UTC (rev 22166)
@@ -0,0 +1,64 @@
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+var cube_locale_messages = {
+ // js/site.js
+ 'j_001': '郵便番号を正しく入力して下さい。',
+ 'j_002': '選択したカテゴリとカテゴリ内のすべてのカテゴリを削除します',
+ 'j_003': '一度削除したデータは、元に戻せません。\n削除しても宜しいですか?',
+ 'j_004': '一度削除したデータは、元に戻せません。\n削除しても宜しいですか?\n\n※ 在庫数は手動で戻してください。',
+ 'j_005': '登録しても宜しいですか',
+ 'j_006': '検索結果をすべて削除しても宜しいですか',
+ 'j_007': '一度削除したデータは、元に戻せません。\n削除しても宜しいですか?',
+ 'j_008': '登録しても宜しいですか',
+ 'j_009': '登録しても宜しいですか',
+ 'j_010': 'メールアドレス/パスワードを入力して下さい。',
+ 'j_011': '縮小',
+ 'j_012': '拡大',
+ // js/products.js
+ 'j_013': '申し訳ございませんが、只今品切れ中です。',
+ // user_data/packages/admin/js/admin.js
+ 'j_014': '必須項目を入力して下さい。',
+ 'j_015': '内容を登録しても宜しいでしょうか',
+ 'j_016': '登録内容を削除しても宜しいでしょうか',
+ 'j_017': 'カテゴリを登録しても宜しいでしょうか',
+ 'j_018': '親カテゴリは選択できません',
+ 'j_019': '登録内容を削除しても宜しいでしょうか',
+ 'j_020': 'この内容で登録しても宜しいでしょうか',
+ 'j_021': '削除しても宜しいでしょうか',
+ 'j_022': '登録内容を削除しても宜しいでしょうか',
+ 'j_023': 'カテゴリを登録しても宜しいでしょうか',
+ 'j_024': '親カテゴリは選択できません',
+ 'j_025': '登録内容を削除しても宜しいでしょうか',
+ 'j_026': 'この内容で登録しても宜しいでしょうか',
+ 'j_027': '削除しても宜しいでしょうか',
+ 'j_028': '既に登録されているメールアドレスです。\nメルマガの種類が変更されます。宜しいですか?',
+ 'j_029': '<FONT Color="#FFFF99"> << 表示 </FONT>',
+ 'j_030': ' <FONT Color="#FFFF99"> >> 非表示 </FONT>',
+ // user_data/packages/admin/js/breadcrumbs.js
+ 'j_031': '<span>ホーム</span>',
+ // user_data/packages/sphone/js/barbutton
+ 'j_032': 'TOPへ',
+ // user_data/packages/sphone/js/favorite.js
+ 'j_033': 'お気に入りに登録しました',
+ 'j_034': '<p>お気に入り登録済み</p>',
+ 'j_035': 'お気に入りの登録に失敗しました'
+};
Svn-src-all メーリングリストの案内