[geeklog-hg] geeklog: Configuration Tooltips can be localized now (bug #0001308)
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sun Apr 7 10:23:07 EDT 2013
changeset 9038:e79475e28a4a
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/e79475e28a4a
user: Kenji ITO <mystralkk at gmail.com>
date: Sun Apr 07 23:20:11 2013 +0900
description:
Configuration Tooltips can be localized now (bug #0001308)
diffstat:
language/english.php | 5 ++++
language/english_utf-8.php | 5 ++++
language/japanese_utf-8.php | 5 ++++
plugins/calendar/functions.inc | 4 +-
public_html/admin/plugins/calendar/index.php | 2 +-
public_html/admin/story.php | 2 +-
public_html/javascript/admin.configuration.js | 6 ++--
public_html/javascript/datepicker.js | 2 +-
system/classes/scripts.class.php | 29 +++++++++++++++++++++++++-
9 files changed, 50 insertions(+), 10 deletions(-)
diffs (178 lines):
diff -r eaf35384fc39 -r e79475e28a4a language/english.php
--- a/language/english.php Fri Apr 05 20:02:16 2013 +0900
+++ b/language/english.php Sun Apr 07 23:20:11 2013 +0900
@@ -1333,6 +1333,11 @@
113 => 'Your account has been created successfully. {site_url}',
114 => 'Your re-synch with your remote account has failed but your other account information has been successfully saved.',
115 => 'Remote service has been disabled.',
+ 116 => 'Loading...',
+ 117 => 'Help page is not found.',
+ 118 => 'Click to select a date',
+ 119 => 'More..',
+ 120 => 'Send this?',
400 => 'Not all required fields have been passed validation', // Error codes in the 400 range reserved for CUSTOM membership
401 => 'Please enter Fullname'
);
diff -r eaf35384fc39 -r e79475e28a4a language/english_utf-8.php
--- a/language/english_utf-8.php Fri Apr 05 20:02:16 2013 +0900
+++ b/language/english_utf-8.php Sun Apr 07 23:20:11 2013 +0900
@@ -1333,6 +1333,11 @@
113 => 'Your account has been created successfully. {site_url}',
114 => 'Your re-synch with your remote account has failed but your other account information has been successfully saved.',
115 => 'Remote service has been disabled.',
+ 116 => 'Loading...',
+ 117 => 'Help page is not found.',
+ 118 => 'Click to select a date',
+ 119 => 'More..',
+ 120 => 'Send this?',
400 => 'Not all required fields have been passed validation', // Error codes in the 400 range reserved for CUSTOM membership
401 => 'Please enter Fullname'
);
diff -r eaf35384fc39 -r e79475e28a4a language/japanese_utf-8.php
--- a/language/japanese_utf-8.php Fri Apr 05 20:02:16 2013 +0900
+++ b/language/japanese_utf-8.php Sun Apr 07 23:20:11 2013 +0900
@@ -1336,6 +1336,11 @@
113 => 'ã¢ã«ã¦ã³ããTwitterçµç±ã§ä½æãã¾ããã {site_url}',
114 => 'ãªã¢ã¼ãã¢ã«ã¦ã³ãã®ååæã«å¤±æãã¾ããããä»ã®ã¢ã«ã¦ã³ãæ
å ±ãä¿åãã¾ããã',
115 => 'ãªã¢ã¼ããµã¼ãã¹ã¯ç¡å¹ã¨ãªãã¾ããã',
+ 116 => 'èªã¿è¾¼ã¿ä¸...',
+ 117 => 'ãã«ããè¦ã¤ããã¾ããã',
+ 118 => 'ã¯ãªãã¯ãã¦æ¥ä»ãé¸æãã¦ãã ãã',
+ 119 => 'More..',
+ 120 => 'ãã®é
ç®ãéä¿¡ãã¾ãã?',
400 => 'æ¤è¨¼ã«éã£ã¦ããªãå¿
é ã®ãã£ã¼ã«ããããã¾ãã',
401 => 'æ°åãå
¥åãã¦ãã ããã'
);
diff -r eaf35384fc39 -r e79475e28a4a plugins/calendar/functions.inc
--- a/plugins/calendar/functions.inc Fri Apr 05 20:02:16 2013 +0900
+++ b/plugins/calendar/functions.inc Sun Apr 07 23:20:11 2013 +0900
@@ -681,7 +681,7 @@
*/
function plugin_submit_calendar($mode = 'master')
{
- global $_CONF, $_CA_CONF, $LANG_CAL_1, $LANG12, $_SCRIPTS;
+ global $_CONF, $_CA_CONF, $LANG_CAL_1, $LANG12, $MESSAGE, $_SCRIPTS;
if (isset($_POST['calendar_type'])) {
$mode = $_POST['calendar_type'];
@@ -739,7 +739,7 @@
$_SCRIPTS->setJavaScriptFile('datepicker', '/javascript/datepicker.js');
$langCode = COM_getLangIso639Code();
- $toolTip = 'Click and select a date'; // Should be translated
+ $toolTip = $MESSAGE[118];
$imgUrl = $_CONF['site_url'] . '/images/calendar.png';
$_SCRIPTS->setJavaScript(
diff -r eaf35384fc39 -r e79475e28a4a public_html/admin/plugins/calendar/index.php
--- a/public_html/admin/plugins/calendar/index.php Fri Apr 05 20:02:16 2013 +0900
+++ b/public_html/admin/plugins/calendar/index.php Sun Apr 07 23:20:11 2013 +0900
@@ -84,7 +84,7 @@
$_SCRIPTS->setJavaScriptFile('datepicker', '/javascript/datepicker.js');
$langCode = COM_getLangIso639Code();
- $toolTip = 'Click and select a date'; // Should be translated
+ $toolTip = $MESSAGE[118];
$imgUrl = $_CONF['site_url'] . '/images/calendar.png';
$_SCRIPTS->setJavaScript(
diff -r eaf35384fc39 -r e79475e28a4a public_html/admin/story.php
--- a/public_html/admin/story.php Fri Apr 05 20:02:16 2013 +0900
+++ b/public_html/admin/story.php Sun Apr 07 23:20:11 2013 +0900
@@ -729,7 +729,7 @@
$_SCRIPTS->setJavaScriptFile('datepicker', '/javascript/datepicker.js');
$langCode = COM_getLangIso639Code();
- $toolTip = 'Click and select a date'; // Should be translated
+ $toolTip = $MESSAGE[118];
$imgUrl = $_CONF['site_url'] . '/images/calendar.png';
$_SCRIPTS->setJavaScript(
diff -r eaf35384fc39 -r e79475e28a4a public_html/javascript/admin.configuration.js
--- a/public_html/javascript/admin.configuration.js Fri Apr 05 20:02:16 2013 +0900
+++ b/public_html/javascript/admin.configuration.js Sun Apr 07 23:20:11 2013 +0900
@@ -172,7 +172,7 @@
var tooltipHideTimer = null;
var tooltipContainer = $(
'<div id="tooltip-container">' +
-// '<div id="tootip-loading"><img src="'+ imgSpinner +'" /> Loading...</div>' +
+// '<div id="tootip-loading"><img src="'+ imgSpinner +'" />' + geeklog.lang.tooltip_loading + '</div>' +
'<div id="tooltip-header"></div>' +
'<div id="tooltip-content"></div>' +
'<div id="tooltip-tip"></div>' +
@@ -227,7 +227,7 @@
);
} else {
$('#tooltip-content').html(
- '<span>Help page is not found.</span>'
+ '<span>' . geeklog.lang.tooltip_not_found + '</span>'
)
}
});
@@ -524,7 +524,7 @@
}
dropDownShown = true;
- geeklog.admin.configuration.addTab(tabs, '#tab-dropdown', 'More..', idxAfter);
+ geeklog.admin.configuration.addTab(tabs, '#tab-dropdown', geeklog.lang.tabs_more, idxAfter);
dropDownTabIdx = idxAfter;
}
diff -r eaf35384fc39 -r e79475e28a4a public_html/javascript/datepicker.js
--- a/public_html/javascript/datepicker.js Fri Apr 05 20:02:16 2013 +0900
+++ b/public_html/javascript/datepicker.js Sun Apr 07 23:20:11 2013 +0900
@@ -113,7 +113,7 @@
}
langCode = langCode || 'en';
- toolTip = toolTip || 'Click to select a date';
+ toolTip = toolTip || geeklog.lang.tooltip_select_date;
// Fixes language code for jQuery UI
langCode = this.fixLangCode(langCode);
diff -r eaf35384fc39 -r e79475e28a4a system/classes/scripts.class.php
--- a/system/classes/scripts.class.php Fri Apr 05 20:02:16 2013 +0900
+++ b/system/classes/scripts.class.php Sun Apr 07 23:20:11 2013 +0900
@@ -408,7 +408,7 @@
*/
public function getHeader() {
- global $_CONF;
+ global $_CONF, $MESSAGE;
$this->header_set = true;
@@ -427,7 +427,32 @@
}
}
- // Set JavaScript (do this before file incase variables are needed)
+ // Set JavaScript (do this before file in case variables are needed)
+ $iso639Code = COM_getLangIso639Code();
+ $headercode .= <<<EOD
+<script type="text/javascript">
+var geeklog = {
+ doc: document,
+ site_url: "{$_CONF['site_url']}",
+ layout_url: "{$_CONF['layout_url']}",
+ lang: {
+ iso639Code: "{$iso639Code}",
+ tooltip_loading: "{$MESSAGE[116]}",
+ tooltip_not_found: "{$MESSAGE[117]}",
+ tooltip_select_date: "{$MESSAGE[118]}",
+ tabs_more: "{$MESSAGE[119]}",
+ confirm_delete: "{$MESSAGE[76]}",
+ confirm_send: "{$MESSAGE[120]}"
+ },
+ win: window,
+ $: function (id) {
+ return this.doc.getElementById(id);
+ }
+};
+</script>';
+
+EOD;
+
if (isset($this->scripts['header'])) {
foreach ($this->scripts['header'] as $script) {
$headercode .= $script . LB;
More information about the geeklog-cvs
mailing list