diff --git a/app/config/sql/coordino.sql b/app/config/sql/coordino.sql index c9d4b4e..c2c1c00 100644 --- a/app/config/sql/coordino.sql +++ b/app/config/sql/coordino.sql @@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS `badges` ( `user_id` int(12) NOT NULL, `image` varchar(100) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -- Dumping data for table `badges` @@ -29,7 +29,7 @@ CREATE TABLE IF NOT EXISTS `bugs` ( `status` enum('open','closed','invalid') NOT NULL DEFAULT 'open', `submitted` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -- Dumping data for table `bugs` @@ -50,7 +50,7 @@ CREATE TABLE IF NOT EXISTS `comments` ( `votes` smallint(5) NOT NULL, `user_id` int(10) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -- Dumping data for table `comments` @@ -70,7 +70,7 @@ CREATE TABLE IF NOT EXISTS `histories` ( `user_id` int(25) NOT NULL, `timestamp` int(25) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; -- -- Dumping data for table `histories` @@ -104,7 +104,7 @@ CREATE TABLE IF NOT EXISTS `posts` ( `notify` tinyint(1) NOT NULL, PRIMARY KEY (`id`), FULLTEXT KEY `title` (`title`,`content`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; -- -- Dumping data for table `posts` @@ -138,7 +138,7 @@ CREATE TABLE IF NOT EXISTS `posts_revs` ( `tags` text NOT NULL, `flags` smallint(3) DEFAULT NULL, PRIMARY KEY (`version_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; -- -- Dumping data for table `posts_revs` @@ -156,7 +156,7 @@ INSERT INTO `posts_revs` (`version_id`, `version_created`, `id`, `type`, `relate CREATE TABLE IF NOT EXISTS `post_tags` ( `post_id` int(255) NOT NULL, `tag_id` int(255) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `post_tags` @@ -179,7 +179,7 @@ CREATE TABLE IF NOT EXISTS `settings` ( `autoload` smallint(1) NOT NULL DEFAULT '0', `description` text NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ; -- -- Dumping data for table `settings` @@ -209,7 +209,7 @@ CREATE TABLE IF NOT EXISTS `tags` ( `tag` varchar(255) NOT NULL, `slug` varchar(255) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; -- -- Dumping data for table `tags` @@ -246,7 +246,7 @@ CREATE TABLE IF NOT EXISTS `users` ( `question_count` int(12) NOT NULL, `image` varchar(255) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; -- -- Dumping data for table `users` @@ -268,7 +268,7 @@ CREATE TABLE IF NOT EXISTS `votes` ( `timestamp` int(100) NOT NULL, `type` enum('up','down','flag') NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -- Dumping data for table `votes` @@ -289,7 +289,7 @@ CREATE TABLE IF NOT EXISTS `widgets` ( `content` text NOT NULL, `global` smallint(1) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; -- -- Dumping data for table `widgets` diff --git a/app/locale/jap/LC_MESSAGES/default.mo b/app/locale/jap/LC_MESSAGES/default.mo index b5672dc..2dae0ca 100644 Binary files a/app/locale/jap/LC_MESSAGES/default.mo and b/app/locale/jap/LC_MESSAGES/default.mo differ diff --git a/app/locale/jap/LC_MESSAGES/default.po b/app/locale/jap/LC_MESSAGES/default.po index a347f2c..8e1425d 100644 --- a/app/locale/jap/LC_MESSAGES/default.po +++ b/app/locale/jap/LC_MESSAGES/default.po @@ -1,19 +1,78 @@ # LANGUAGE translation of CakePHP Application -# Copyright YEAR NAME +# Copyright 2014 NAME # msgid "" msgstr "" -"Project-Id-Version: Coordino\n" -"POT-Creation-Date: 2012-05-09 05:47+0200\n" -"PO-Revision-Date: 2012-07-31 22:15+0900\n" -"Last-Translator: 毒眼鏡 \n" -"Language-Team: Eoko \n" +"Project-Id-Version: PROJECT VERSION\n" +"POT-Creation-Date: 2012-08-14 12:01+0200\n" +"PO-Revision-Date: 2014-05-15 16:53+0900\n" +"Last-Translator: \n" +"Language-Team: Japanese\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n>1;\n" -"X-Poedit-SourceCharset: utf-8\n" -"Language: fr_FR\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: /controllers/posts_controller.php:40 +msgid "You do not have permission to access that.." +msgstr "あなたは次のものに対するアクセス権限をもっていません..." + +#: /controllers/posts_controller.php:44 +msgid "Post deleted" +msgstr "投稿を削除しました" + +#: /controllers/posts_controller.php:49 /views/layouts/default.ctp:162 +#: /views/posts/ask.ctp:68;116 +msgid "Ask a question" +msgstr "質問をする" + +#: /controllers/posts_controller.php:126 +msgid "Your question has been answered!" +msgstr "質問に回答がありました!" + +#: /controllers/posts_controller.php:157 +msgid "Invalid reCAPTCHA entered." +msgstr "入力した reCAPTCHA が誤っています" + +#: /controllers/posts_controller.php:407 +msgid "The question you are trying to view no longer exists." +msgstr "" + +#: /controllers/posts_controller.php:447 +msgid "That is not your question to edit, and you need more reputation!" +msgstr "" + +#: /controllers/posts_controller.php:542 +msgid "Invalid search type." +msgstr "" + +#: /controllers/posts_controller.php:548;550 +msgid "No results for" +msgstr "" + +#: /controllers/posts_controller.php:582 +msgid "What are you trying to do?" +msgstr "" + +#: /controllers/posts_controller.php:591 +msgid "You are not allowed to edit that." +msgstr "" + +#: /controllers/posts_controller.php:631 +msgid "You need to be logged in to do that!" +msgstr "" + +#: /controllers/posts_controller.php:634 +msgid "You need more reputation to do that." +msgstr "" + +#: /controllers/posts_controller.php:639 +msgid "You have already flagged that." +msgstr "" + +#: /controllers/posts_controller.php:642 +msgid "Post flagged." +msgstr "" #: /views/layouts/default.ctp:49 msgid "login" @@ -23,86 +82,130 @@ msgstr "ログイン" msgid "register" msgstr "新規登録" -#: /views/layouts/default.ctp:66;213 +#: /views/layouts/default.ctp:66;217 msgid "about" msgstr "about" -#: /views/layouts/default.ctp:74;97 +#: /views/layouts/default.ctp:74;98 msgid "settings" msgstr "設定" -#: /views/layouts/default.ctp:81 +#: /views/layouts/default.ctp:81 /views/layouts/install.ctp:14 msgid "change language" msgstr "言語の変更" -#: /views/layouts/default.ctp:83 +#: /views/layouts/default.ctp:83 /views/layouts/install.ctp:16 msgid "english" msgstr "英語" -#: /views/layouts/default.ctp:84 +#: /views/layouts/default.ctp:84 /views/layouts/install.ctp:17 msgid "french" msgstr "フランス語" -#: /views/layouts/default.ctp:90 +#: /views/layouts/default.ctp:85 +msgid "chinese" +msgstr "中国語" + +#: /views/layouts/default.ctp:91 msgid "admin" msgstr "管理" -#: /views/layouts/default.ctp:104 +#: /views/layouts/default.ctp:105 msgid "Flagged Posts" msgstr "お気に入り" -#: /views/layouts/default.ctp:111 +#: /views/layouts/default.ctp:112 msgid "User Management" -msgstr "ユーザー管理" +msgstr "ユーザ管理" -#: /views/layouts/default.ctp:118 +#: /views/layouts/default.ctp:119 msgid "Blacklist" msgstr "ブラックリスト" -#: /views/layouts/default.ctp:125 +#: /views/layouts/default.ctp:126 msgid "Remote Settings" msgstr "リモート設定" -#: /views/layouts/default.ctp:137 +#: /views/layouts/default.ctp:138 msgid "logout" msgstr "ログアウト" -#: /views/layouts/default.ctp:152 +#: /views/layouts/default.ctp:153 msgid "Questions" msgstr "質問" -#: /views/layouts/default.ctp:154 +#: /views/layouts/default.ctp:155 /views/posts/ask.ctp:90 msgid "Tags" msgstr "タグ" -#: /views/layouts/default.ctp:155 +#: /views/layouts/default.ctp:156 msgid "Unsolved" msgstr "未解決" -#: /views/layouts/default.ctp:156 +#: /views/layouts/default.ctp:157 msgid "Users" -msgstr "ユーザー" - -#: /views/layouts/default.ctp:161;211 -msgid "ask a question" -msgstr "質問する" +msgstr "ユーザ" -#: /views/layouts/default.ctp:188 /views/posts/view.ctp:55;237 +#: /views/layouts/default.ctp:189 /views/posts/view.ctp:55;237 msgid "edit" msgstr "編集" -#: /views/layouts/default.ctp:189 /views/posts/view.ctp:62 +#: /views/layouts/default.ctp:190 /views/posts/view.ctp:62 msgid "del" msgstr "削除" -#: /views/layouts/default.ctp:199 +#: /views/layouts/default.ctp:200 msgid "add widgets to this page" msgstr "このページにウィジェットを追加" -#: /views/layouts/default.ctp:210 +#: /views/layouts/default.ctp:212 msgid "home" msgstr "ホーム" +#: /views/layouts/default.ctp:214 +msgid "ask a question" +msgstr "質問をする" + +#: /views/posts/ask.ctp:60 +msgid "Titles must be at least 10 characters long." +msgstr "タイトルは10文字以上" + +#: /views/posts/ask.ctp:62;79 +msgid "What is your question about?" +msgstr "何について質問しますか?" + +#: /views/posts/ask.ctp:76 +msgid "Title" +msgstr "タイトル" + +#: /views/posts/ask.ctp:92 +msgid "Combine multiple words into single-words." +msgstr "質問のキーワードとなる単語をタグとして列挙してください" + +#: /views/posts/ask.ctp:95 +msgid "Who Are You?" +msgstr "" + +#: /views/posts/ask.ctp:96 +msgid "Have an account already?" +msgstr "アカウントを持っていますか?" + +#: /views/posts/ask.ctp:96 +msgid "Login before answering!" +msgstr "回答を行う前にログインしてください" + +#: /views/posts/ask.ctp:97 +msgid "Name" +msgstr "名前" + +#: /views/posts/ask.ctp:103 +msgid "Email" +msgstr "Eメール" + +#: /views/posts/ask.ctp:112 +msgid "Notify me when my question is answered." +msgstr "回答があった場合に知らせる" + #: /views/posts/display.ctp:8 /views/posts/view.ctp:154 msgid "answer" msgid_plural "answers" @@ -121,17 +224,16 @@ msgstr "お気に入り" #: /views/posts/view.ctp:146 msgid "add comment" -msgstr "コメントする" +msgstr "コメントを追加" #: /views/posts/view.ctp:288 msgid "your answer" -msgstr "回答" +msgstr "あなたの回答" #: /views/users/login.ctp:2 msgid "" "You are currently an anonymous user. Login below to sign into your account" -msgstr "" -"あなたは現在匿名ユーザーです。ログイン、もしくはサインインしてください。" +msgstr "あなたは現在匿名ユーザです。ログイン、もしくはサインインしてください。" #: /views/users/user_settings.ctp:2 msgid "Profile Image" @@ -139,7 +241,8 @@ msgstr "プロフィール画像" #: /webroot/test.php:99 msgid "Debug setting does not allow access to this url." -msgstr "debugが有効の場合、このurlへのアクセスは許可されていません。" +msgstr "Debugが有効の場合、このurlへのアクセスは許可されていません。" -#~ msgid "ask a Question" -#~ msgstr "poser une question" +#: /views/posts/view.ctp:312 +msgid "Answer" +msgstr "回答" diff --git a/app/locale/jap/LC_MESSAGES/default.pot b/app/locale/jap/LC_MESSAGES/default.pot index 8dc6644..34ed6a4 100644 --- a/app/locale/jap/LC_MESSAGES/default.pot +++ b/app/locale/jap/LC_MESSAGES/default.pot @@ -5,24 +5,253 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" -"POT-Creation-Date: 2012-05-09 03:18+0200\n" +"POT-Creation-Date: 2012-08-14 12:01+0200\n" "PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n" -"Last-Translator: NAME \n" +"Last-Translator: OSAKANA TARO \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" +#: /controllers/posts_controller.php:40 +msgid "You do not have permission to access that.." +msgstr "あなたは次のものに対するアクセス権限をもっていません..." + +#: /controllers/posts_controller.php:44 +msgid "Post deleted" +msgstr "投稿を削除しました" + +#: /controllers/posts_controller.php:49 +#: /views/layouts/default.ctp:162 +#: /views/posts/ask.ctp:68;116 +msgid "Ask a question" +msgstr "質問をする" + +#: /controllers/posts_controller.php:126 +msgid "Your question has been answered!" +msgstr "質問に回答がありました!" + +#: /controllers/posts_controller.php:157 +msgid "Invalid reCAPTCHA entered." +msgstr "入力した reCAPTCHA が誤っています" + +#: /controllers/posts_controller.php:407 +msgid "The question you are trying to view no longer exists." +msgstr "" + +#: /controllers/posts_controller.php:447 +msgid "That is not your question to edit, and you need more reputation!" +msgstr "" + +#: /controllers/posts_controller.php:542 +msgid "Invalid search type." +msgstr "" + +#: /controllers/posts_controller.php:548;550 +msgid "No results for" +msgstr "" + +#: /controllers/posts_controller.php:582 +msgid "What are you trying to do?" +msgstr "" + +#: /controllers/posts_controller.php:591 +msgid "You are not allowed to edit that." +msgstr "" + +#: /controllers/posts_controller.php:631 +msgid "You need to be logged in to do that!" +msgstr "" + +#: /controllers/posts_controller.php:634 +msgid "You need more reputation to do that." +msgstr "" + +#: /controllers/posts_controller.php:639 +msgid "You have already flagged that." +msgstr "" + +#: /controllers/posts_controller.php:642 +msgid "Post flagged." +msgstr "" + +#: /views/layouts/default.ctp:49 +msgid "login" +msgstr "ログイン" + +#: /views/layouts/default.ctp:58 +msgid "register" +msgstr "新規登録" + +#: /views/layouts/default.ctp:66;217 +msgid "about" +msgstr "about" + +#: /views/layouts/default.ctp:74;98 +msgid "settings" +msgstr "設定" + +#: /views/layouts/default.ctp:81 +#: /views/layouts/install.ctp:14 +msgid "change language" +msgstr "言語の変更" + +#: /views/layouts/default.ctp:83 +#: /views/layouts/install.ctp:16 +msgid "english" +msgstr "英語" + +#: /views/layouts/default.ctp:84 +#: /views/layouts/install.ctp:17 +msgid "french" +msgstr "フランス語" + +#: /views/layouts/default.ctp:85 +msgid "chinese" +msgstr "中国語" + +#: /views/layouts/default.ctp:91 +msgid "admin" +msgstr "管理" + +#: /views/layouts/default.ctp:105 +msgid "Flagged Posts" +msgstr "お気に入り" + +#: /views/layouts/default.ctp:112 +msgid "User Management" +msgstr "ユーザ管理" + +#: /views/layouts/default.ctp:119 +msgid "Blacklist" +msgstr "ブラックリスト" + +#: /views/layouts/default.ctp:126 +msgid "Remote Settings" +msgstr "リモート設定" + +#: /views/layouts/default.ctp:138 +msgid "logout" +msgstr "ログアウト" + +#: /views/layouts/default.ctp:153 +msgid "Questions" +msgstr "質問" + +#: /views/layouts/default.ctp:155 +#: /views/posts/ask.ctp:90 +msgid "Tags" +msgstr "タグ" + +#: /views/layouts/default.ctp:156 +msgid "Unsolved" +msgstr "未解決" + +#: /views/layouts/default.ctp:157 +msgid "Users" +msgstr "ユーザ" + +#: /views/layouts/default.ctp:189 +#: /views/posts/view.ctp:55;237 +msgid "edit" +msgstr "編集" + +#: /views/layouts/default.ctp:190 +#: /views/posts/view.ctp:62 +msgid "del" +msgstr "削除" + +#: /views/layouts/default.ctp:200 +msgid "add widgets to this page" +msgstr "このページにウィジェットを追加" + +#: /views/layouts/default.ctp:212 +msgid "home" +msgstr "ホーム" + +#: /views/layouts/default.ctp:214 +msgid "ask a question" +msgstr "質問をする" + +#: /views/posts/ask.ctp:60 +msgid "Titles must be at least 10 characters long." +msgstr "タイトルは10文字以上" + +#: /views/posts/ask.ctp:62;79 +msgid "What is your question about?" +msgstr "何について質問しますか?" + +#: /views/posts/ask.ctp:76 +msgid "Title" +msgstr "タイトル" + +#: /views/posts/ask.ctp:92 +msgid "Combine multiple words into single-words." +msgstr "質問のキーワードとなる単語をタグとして列挙してください" + +#: /views/posts/ask.ctp:95 +msgid "Who Are You?" +msgstr "" + +#: /views/posts/ask.ctp:96 +msgid "Have an account already?" +msgstr "アカウントを持っていますか?" + +#: /views/posts/ask.ctp:96 +msgid "Login before answering!" +msgstr "回答を行う前にログインしてください" + +#: /views/posts/ask.ctp:97 +msgid "Name" +msgstr "名前" + +#: /views/posts/ask.ctp:103 +msgid "Email" +msgstr "Eメール" + +#: /views/posts/ask.ctp:112 +msgid "Notify me when my question is answered." +msgstr "回答があった場合に知らせる" + +#: /views/posts/display.ctp:8 +#: /views/posts/view.ctp:154 +msgid "answer" +msgid_plural "answers" +msgstr[0] "回答" +msgstr[1] "回答" + +#: /views/posts/display.ctp:12 +msgid "view" +msgid_plural "views" +msgstr[0] "閲覧" +msgstr[1] "閲覧" + +#: /views/posts/view.ctp:47 +msgid "flag" +msgstr "お気に入り" + +#: /views/posts/view.ctp:146 +msgid "add comment" +msgstr "コメントを追加" + +#: /views/posts/view.ctp:288 +msgid "your answer" +msgstr "あなたの回答" + #: /views/users/login.ctp:2 msgid "You are currently an anonymous user. Login below to sign into your account" -msgstr "" +msgstr "あなたは現在匿名ユーザです。ログイン、もしくはサインインしてください。" #: /views/users/user_settings.ctp:2 msgid "Profile Image" -msgstr "" +msgstr "プロフィール画像" #: /webroot/test.php:99 msgid "Debug setting does not allow access to this url." -msgstr "" +msgstr "Debugが有効の場合、このurlへのアクセスは許可されていません。" + +#: /views/posts/view.ctp:312 +msgid "Answer" +msgstr "回答" diff --git a/app/models/post.php b/app/models/post.php index 5d8aff2..75a6030 100644 --- a/app/models/post.php +++ b/app/models/post.php @@ -51,7 +51,11 @@ class Post extends AppModel { ); public function niceUrl($url) { - return preg_replace("/[^0-9a-zA-Z-]/", "", str_replace(' ', '-', $url)); + $niceurl_tmp = preg_replace("/[^0-9a-zA-Z-]/", "", str_replace(' ', '-', $url)); + if(strlen($niceurl_tmp)<=0) { + $niceurl_tmp = preg_replace("/[^0-9a-zA-Z-]/", "", str_replace(' ', '-', md5($url))); + } + return $niceurl_tmp; } public function monsterSearch($type, $page, $search) { @@ -357,4 +361,4 @@ public function correctRedirect($public_key) { return $post; } } -?> \ No newline at end of file +?> diff --git a/app/views/layouts/default.ctp b/app/views/layouts/default.ctp index 85f8d5c..d883b2e 100755 --- a/app/views/layouts/default.ctp +++ b/app/views/layouts/default.ctp @@ -83,6 +83,7 @@
  • link(__('english',true),'/lang/eng')?>
  • link(__('french',true),'/lang/fre')?>
  • link(__('chinese',true),'/lang/chi')?>
  • +
  • link(__('japanese',true),'/lang/jap')?>
  • check('Auth.User.id') && $session->read('Auth.User.permission') != '') { ?> @@ -227,4 +228,4 @@ - \ No newline at end of file +