Permalink
Browse files

Add more traduction

  • Loading branch information...
1 parent 08aa729 commit 2251b2c8a135d3198539208202c8ae6e0034c489 @iam-merlin iam-merlin committed Aug 14, 2012
@@ -37,16 +37,16 @@ public function afterFilter() {
public function delete($id) {
if(!$this->isAdmin($this->Auth->user('id'))) {
- $this->Session->setFlash('You do not have permission to access that..', 'error');
+ $this->Session->setFlash(__('You do not have permission to access that..',true), 'error');
$this->redirect('/');
}
$this->Post->delete($id);
- $this->Session->setFlash('Post Deleted', 'error');
+ $this->Session->setFlash(__('Post deleted',true), 'error');
$this->redirect('/');
}
public function ask() {
- $this->set('title_for_layout', 'Ask a question!');
+ $this->set('title_for_layout', __('Ask a question',true));
if(!empty($this->data)) {
@@ -123,7 +123,7 @@ public function answer($public_key) {
$this->set('answer', $this->data['Post']['content']);
$this->Email->from = 'Answerman <answers@' . $_SERVER['SERVER_NAME'] . '>';
$this->Email->to = $user['User']['email'];
- $this->Email->subject = 'Your question has been answered!';
+ $this->Email->subject = __('Your question has been answered!',true);
$this->Email->template = 'notification';
$this->Email->sendAs = 'both';
$this->Email->send();
@@ -154,7 +154,7 @@ public function __validatePost($data, $redirectUrl, $reCaptcha = false) {
if($reCaptcha == true) {
if(!$this->Recaptcha->valid($data['reCAPTCHA'])) {
$data['Post']['content'] = $this->Markdownify->parseString($data['Post']['content']);
- $recaptchaErrors = array('recaptcha' => 'Invalid reCAPTCHA entered.');
+ $recaptchaErrors = array('recaptcha' => __('Invalid reCAPTCHA entered.',true));
$errors = array(
'errors' => $recaptchaErrors,
'data' => $data
@@ -404,7 +404,7 @@ public function view($public_key) {
* If so redirect.
*/
if($question['Post']['flags'] >= $flag_check['Setting']['value'] && $this->Setting->repCheck($this->Auth->user('id'), 'rep_edit')) {
- $this->Session->setFlash('The question you are trying to view no longer exists.', 'error');
+ $this->Session->setFlash(__('The question you are trying to view no longer exists.',true), 'error');
$this->redirect('/');
}
@@ -444,7 +444,7 @@ public function edit($public_key) {
$redirect = $this->Post->findById($redirect['Post']['related_id']);
}
if($question['Post']['user_id'] != $this->Auth->user('id') && !$this->isAdmin($this->Auth->user('id')) && !$this->Setting->repCheck($this->Auth->user('id'), 'rep_edit')) {
- $this->Session->setFlash('That is not your question to edit, and you need more reputation!', 'error');
+ $this->Session->setFlash(__('That is not your question to edit, and you need more reputation!',true), 'error');
$this->redirect('/questions/' . $redirect['Post']['public_key'] . '/' . $redirect['Post']['url_title']);
}
if(!empty($question['Post']['title'])) {
@@ -539,15 +539,15 @@ public function display($type='recent', $page=1) {
$keywords = array('hot', 'week', 'month', 'recent', 'solved', 'unanswered');
if(($search == 'no') && (!in_array($type, $keywords))) {
- $this->Session->setFlash('Invalid search type.', 'error');
+ $this->Session->setFlash(__('Invalid search type.',true), 'error');
$this->redirect('/');
}
if(empty($questions)) {
if(isset($type['needle'])) {
- $this->Session->setFlash('No results for "' . $type['needle'] . '"!', 'error');
+ $this->Session->setFlash(__('No results for',true) . ' "' . $type['needle'] . '"!', 'error');
}else {
- $this->Session->setFlash('No results for "' . $type . '"!', 'error');
+ $this->Session->setFlash(__('No results for',true) . ' "' . $type . '"!', 'error');
}
if($this->Post->find('count') > 0) {
$this->redirect('/');
@@ -579,7 +579,7 @@ public function markCorrect($public_key) {
* Check to make sure the Post is an answer
*/
if($answer['Post']['type'] != 'answer') {
- $this->Session->setFlash('What are you trying to do?', 'error');
+ $this->Session->setFlash(__('What are you trying to do?',true), 'error');
$this->redirect('/');
}
@@ -588,7 +588,7 @@ public function markCorrect($public_key) {
* Check to make sure the logged in user is authorized to edit this Post
*/
if($question['Post']['user_id'] != $this->Auth->user('id')) {
- $this->Session->setFlash('You are not allowed to edit that.');
+ $this->Session->setFlash(__('You are not allowed to edit that.',true));
$this->redirect('/questions/' . $question['Post']['public_key'] . '/' . $question['Post']['url_title']);
}
@@ -628,18 +628,18 @@ public function markCorrect($public_key) {
public function flag($public_key) {
$redirect = $this->Post->correctRedirect($public_key);
if(!$this->Auth->user('id')) {
- $this->Session->setFlash('You need to be logged in to do that!', 'error');
+ $this->Session->setFlash(__('You need to be logged in to do that!',true), 'error');
$this->redirect('/questions/' . $redirect['Post']['public_key'] . '/' . $redirect['Post']['url_title']);
}elseif(!$this->Setting->repCheck($this->Auth->user('id'), 'rep_flag')) {
- $this->Session->setFlash('You need more reputation to do that.', 'error');
+ $this->Session->setFlash(__('You need more reputation to do that.',true), 'error');
$this->redirect('/questions/' . $redirect['Post']['public_key'] . '/' . $redirect['Post']['url_title']);
}else{
$flag = $this->Vote->throwFlag($this->Auth->user('id'), $public_key);
if($flag == 'exists') {
- $this->Session->setFlash('You have already flagged that.', 'error');
+ $this->Session->setFlash(__('You have already flagged that.',true), 'error');
$this->redirect('/questions/' . $redirect['Post']['public_key'] . '/' . $redirect['Post']['url_title']);
}elseif($flag == 'success') {
- $this->Session->setFlash('Post flagged.', 'error');
+ $this->Session->setFlash(__('Post flagged.',true), 'error');
$this->redirect('/questions/' . $redirect['Post']['public_key'] . '/' . $redirect['Post']['url_title']);
}
}
View
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2012-05-09 05:47+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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
@@ -14,6 +14,68 @@ msgstr ""
"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 ""
+
+#: /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 ""
@@ -22,88 +84,136 @@ msgstr ""
msgid "register"
msgstr ""
-#: /views/layouts/default.ctp:66;213
+#: /views/layouts/default.ctp:66;217
msgid "about"
msgstr ""
-#: /views/layouts/default.ctp:74;97
+#: /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: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 ""
-#: /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 ""
-
-#: /views/layouts/default.ctp:188
+#: /views/layouts/default.ctp:189
#: /views/posts/view.ctp:55;237
msgid "edit"
msgstr ""
-#: /views/layouts/default.ctp:189
+#: /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 ""
+
+#: /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 ""
+
+#: /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"
@@ -141,3 +251,7 @@ msgstr ""
msgid "Debug setting does not allow access to this url."
msgstr ""
+#: /views/posts/view.ctp:312
+msgid "Answer"
+msgstr ""
+
Binary file not shown.
Oops, something went wrong.

0 comments on commit 2251b2c

Please sign in to comment.