[geeklog-hg] geeklog: Moved hardcoded error message "Unfortunately, an error ...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Thu Jun 11 03:39:55 EDT 2015
changeset 9607:e604168f25ed
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/e604168f25ed
user: Kenji ITO <mystralkk at gmail.com>
date: Thu Jun 11 16:39:22 2015 +0900
description:
Moved hardcoded error message "Unfortunately, an error ..." into language file (feature request #0001797)
diffstat:
language/english.php | 2 ++
language/english_utf-8.php | 2 ++
language/japanese_utf-8.php | 3 ++-
public_html/lib-common.php | 10 ++++++----
4 files changed, 12 insertions(+), 5 deletions(-)
diffs (86 lines):
diff -r 5c6abdcb544a -r e604168f25ed language/english.php
--- a/language/english.php Thu Jun 11 15:36:41 2015 +0900
+++ b/language/english.php Thu Jun 11 16:39:22 2015 +0900
@@ -182,6 +182,8 @@
138 => "Click <a href=\"{$_CONF['site_url']}/usersettings.php\" rel=\"nofollow\">here</a> to disable the advanced editor and use the default editor which does not require JavaScript",
139 => "Click <a href=\"{$_CONF['site_url']}/\" rel=\"nofollow\">here</a> to return to the homepage",
140 => 'Allowed Autotags:',
+ 141 => 'An Error Occurred',
+ 142 => 'Unfortunately, an error has occurred rendering this page. Please try again later.',
'facebook' => 'Login with Facebook',
'twitter' => 'Login with Twitter',
'linkedin' => 'Login with LinkedIn',
diff -r 5c6abdcb544a -r e604168f25ed language/english_utf-8.php
--- a/language/english_utf-8.php Thu Jun 11 15:36:41 2015 +0900
+++ b/language/english_utf-8.php Thu Jun 11 16:39:22 2015 +0900
@@ -182,6 +182,8 @@
138 => "Click <a href=\"{$_CONF['site_url']}/usersettings.php\" rel=\"nofollow\">here</a> to disable the advanced editor and use the default editor which does not require JavaScript",
139 => "Click <a href=\"{$_CONF['site_url']}/\" rel=\"nofollow\">here</a> to return to the homepage",
140 => 'Allowed Autotags:',
+ 141 => 'An Error Occurred',
+ 142 => 'Unfortunately, an error has occurred rendering this page. Please try again later.',
'facebook' => 'Login with Facebook',
'twitter' => 'Login with Twitter',
'linkedin' => 'Login with LinkedIn',
diff -r 5c6abdcb544a -r e604168f25ed language/japanese_utf-8.php
--- a/language/japanese_utf-8.php Thu Jun 11 15:36:41 2015 +0900
+++ b/language/japanese_utf-8.php Thu Jun 11 16:39:22 2015 +0900
@@ -190,6 +190,8 @@
138 => "ã¢ããã³ã¹ãã¨ãã£ã¿ã¼ãç¡å¹ã«ãã¦ãJavaScriptãä¸è¦ãªãã¼ãã«ã¨ãã£ã¿ã¼ãæå¹ã«ããã«ã¯<a href=\"{$_CONF['site_url']}/usersettings.php\" rel=\"nofollow\">ãã¡ã</a>ãã¯ãªãã¯ãã¦ãã ããã",
139 => "ãã¼ã ãã¼ã¸ã¸ã¯<a href=\"{$_CONF['site_url']}/\" rel=\"nofollow\">ãã¡ã</a>ãã¯ãªãã¯",
140 => '使ç¨ã§ããèªåã¿ã°:',
+ 141 => 'ã¨ã©ã¼ãçºçãã¾ãã',
+ 142 => 'ãã®ãã¼ã¸ã表示ããéã«ã¨ã©ã¼ãçºçãã¾ããããã°ãããã¦ãããããä¸åº¦ã試ããã ããã',
'facebook' => 'Facebookã§ãã°ã¤ã³',
'twitter' => 'Twitterã§ãã°ã¤ã³',
'linkedin' => 'LinkedInã§ãã°ã¤ã³',
@@ -2403,5 +2405,4 @@
'hash' => 'ãã®ãã£ã¼ã«ãã«ã¯ããªãã®ä½¿ç¨ãã¦ããPHPã®ãã¼ã¸ã§ã³ã§ãµãã¼ããã¦ããhashé¢æ°ãå
¥åããªããã°ãªãã¾ãã'
);
-
?>
diff -r 5c6abdcb544a -r e604168f25ed public_html/lib-common.php
--- a/public_html/lib-common.php Thu Jun 11 15:36:41 2015 +0900
+++ b/public_html/lib-common.php Thu Jun 11 16:39:22 2015 +0900
@@ -8230,7 +8230,7 @@
*/
function COM_handleError($errno, $errstr, $errfile='', $errline=0, $errcontext='')
{
- global $_CONF, $_USER;
+ global $_CONF, $_USER, $LANG01;
// Handle @ operator
if (error_reporting() == 0) {
@@ -8360,6 +8360,7 @@
header('HTTP/1.1 500 Internal Server Error');
header('Status: 500 Internal Server Error');
+ header('Content-Type: text/html; charset=' . COM_getCharset());
// Does the theme implement an error message html file?
if (!empty($_CONF['path_layout']) &&
@@ -8372,10 +8373,12 @@
include $_CONF['path_layout_default'] . 'errormessage.html';
} else {
// Otherwise, display simple error message
- $title = 'An Error Occurred';
+ $title = $LANG01[141];
+
if (!empty($_CONF['site_name'])) {
$title = $_CONF['site_name'] . ' - ' . $title;
}
+
echo "
<html>
<head>
@@ -8383,8 +8386,7 @@
</head>
<body>
<div style=\"width: 100%; text-align: center;\">
- Unfortunately, an error has occurred rendering this page. Please try
- again later.
+ {$LANG01[142]}
</div>
</body>
</html>
More information about the geeklog-cvs
mailing list