Browse Source

site/api fully translated. lib is next

Nathaniel van Diepen 10 years ago
parent
commit
af7eb1756f
2 changed files with 254 additions and 37 deletions
  1. 227 10
      lang/en_CA.po
  2. 27 27
      site/api/index.php

+ 227 - 10
lang/en_CA.po

@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: Omninet Control panel\n"
-"POT-Creation-Date: 2014-02-20 11:04-0700\n"
-"PO-Revision-Date: 2014-02-20 11:04-0700\n"
+"POT-Creation-Date: 2014-02-20 13:23-0700\n"
+"PO-Revision-Date: 2014-02-20 13:23-0700\n"
 "Last-Translator: \n"
 "Language-Team: Omnimaga <[email protected]>\n"
 "Language: en_CA\n"
@@ -14,18 +14,239 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Poedit-SearchPath-0: ..\n"
 
-#: ../site/api/index.php:311
-msgid "Failed to update setting"
+#: ../site/api/index.php:18
+msgid "Missing username and/or password"
 msgstr ""
 
-#: ../site/api/index.php:311
-msgid "with value"
+#: ../site/api/index.php:19
+msgid "Missing user type"
+msgstr ""
+
+#: ../site/api/index.php:28
+msgid "No token set"
+msgstr ""
+
+#: ../site/api/index.php:40 ../site/api/index.php:73 ../site/api/index.php:101
+#: ../site/api/index.php:150 ../site/api/index.php:164
+#: ../site/api/index.php:226 ../site/api/index.php:241
+#: ../site/api/index.php:249
+msgid "You have been logged out"
+msgstr ""
+
+#: ../site/api/index.php:69
+msgid "Cannot fetch memos"
+msgstr ""
+
+#: ../site/api/index.php:97
+msgid "Cannot fetch news"
+msgstr ""
+
+#: ../site/api/index.php:113
+msgid "Voice"
+msgstr ""
+
+#: ../site/api/index.php:114
+msgid "Automatic voice"
+msgstr ""
+
+#: ../site/api/index.php:115
+msgid "Halfop"
+msgstr ""
+
+#: ../site/api/index.php:116
+msgid "Automatic Halfop"
+msgstr ""
+
+#: ../site/api/index.php:117
+msgid "Op"
+msgstr ""
+
+#: ../site/api/index.php:118
+msgid "Automatic Op"
+msgstr ""
+
+#: ../site/api/index.php:119
+msgid "Admin"
+msgstr ""
+
+#: ../site/api/index.php:120
+msgid "Owner"
+msgstr ""
+
+#: ../site/api/index.php:121
+msgid "Set"
+msgstr ""
+
+#: ../site/api/index.php:122
+msgid "Invite/Getkey"
+msgstr ""
+
+#: ../site/api/index.php:123
+msgid "Kick/Ban"
+msgstr ""
+
+#: ../site/api/index.php:124
+msgid "Recover/Clear"
+msgstr ""
+
+#: ../site/api/index.php:125
+msgid "Modify access lists"
+msgstr ""
+
+#: ../site/api/index.php:126
+msgid "Topic"
+msgstr ""
+
+#: ../site/api/index.php:127
+msgid "View access lists"
+msgstr ""
+
+#: ../site/api/index.php:128
+msgid "Founder"
+msgstr ""
+
+#: ../site/api/index.php:129
+msgid "Banned"
+msgstr ""
+
+#: ../site/api/index.php:146
+msgid "Cannot fetch channels"
+msgstr ""
+
+#: ../site/api/index.php:151
+msgid "No message or user entered"
+msgstr ""
+
+#: ../site/api/index.php:155 ../site/index.php:348 ../site/index.php:402
+msgid "User"
+msgstr ""
+
+#: ../site/api/index.php:155
+msgid "does not exist"
+msgstr ""
+
+#: ../site/api/index.php:157
+msgid "Memo Sent"
+msgstr ""
+
+#: ../site/api/index.php:160 ../site/api/index.php:168
+msgid "Cannot send memo"
+msgstr ""
+
+#: ../site/api/index.php:165
+msgid "No id given"
+msgstr ""
+
+#: ../site/api/index.php:201
+msgid "Failed to add email"
+msgstr ""
+
+#: ../site/api/index.php:201
+msgid "to user"
+msgstr ""
+
+#: ../site/api/index.php:203
+msgid "Email does not match any users"
+msgstr ""
+
+#: ../site/api/index.php:227
+msgid "No ID set"
+msgstr ""
+
+#: ../site/api/index.php:229
+msgid "Could not remove email address"
+msgstr ""
+
+#: ../site/api/index.php:246
+msgid "2-factor disabled."
+msgstr ""
+
+#: ../site/api/index.php:253 ../site/api/index.php:268
+#: ../site/api/index.php:279
+msgid "Make sure that everything is filled in. Try reloading if it is."
 msgstr ""
 
+#: ../site/api/index.php:254
+msgid "Invalid password"
+msgstr ""
+
+#: ../site/api/index.php:259
+msgid "Could not update password with nickserv"
+msgstr ""
+
+#: ../site/api/index.php:269
+msgid "Not Logged in to use"
+msgstr ""
+
+#: ../site/api/index.php:269
+msgid "with key"
+msgstr ""
+
+#: ../site/api/index.php:270
+msgid "Must be logged in with type user to sync pass"
+msgstr ""
+
+#: ../site/api/index.php:273
+msgid "Could not verify with nickserv"
+msgstr ""
+
+#: ../site/api/index.php:276
+msgid "Nickserv password synchronized with main account"
+msgstr ""
+
+#: ../site/api/index.php:284 ../site/api/index.php:297
 #: ../site/api/index.php:316
 msgid "Not logged in"
 msgstr ""
 
+#: ../site/api/index.php:285 ../site/api/index.php:298
+msgid "No user set."
+msgstr ""
+
+#: ../site/api/index.php:286
+msgid "No email set."
+msgstr ""
+
+#: ../site/api/index.php:287
+msgid "No real name set."
+msgstr ""
+
+#: ../site/api/index.php:288 ../site/api/index.php:299
+msgid "No nick set."
+msgstr ""
+
+#: ../site/api/index.php:289
+msgid "User with id"
+msgstr ""
+
+#: ../site/api/index.php:289 ../site/api/index.php:301
+msgid "does not exist. You should reload the page."
+msgstr ""
+
+#: ../site/api/index.php:293
+msgid "Unable to update user"
+msgstr ""
+
+#: ../site/api/index.php:300
+msgid "No profile set."
+msgstr ""
+
+#: ../site/api/index.php:301
+msgid "Oper with id"
+msgstr ""
+
+#: ../site/api/index.php:303 ../site/api/index.php:305
+msgid "Unable to update oper"
+msgstr ""
+
+#: ../site/api/index.php:311
+msgid "Failed to update setting"
+msgstr ""
+
+#: ../site/api/index.php:311
+msgid "with value"
+msgstr ""
+
 #: ../site/api/index.php:320
 msgid "Invalid Action"
 msgstr ""
@@ -160,10 +381,6 @@ msgstr ""
 msgid "New Password"
 msgstr ""
 
-#: ../site/index.php:348 ../site/index.php:402
-msgid "User"
-msgstr ""
-
 #: ../site/index.php:359
 msgid "Switch"
 msgstr ""

+ 27 - 27
site/api/index.php

@@ -15,8 +15,8 @@
 			die();
 		break;
 		case 'login':
-			isset($_GET['username']) && isset($_GET['password']) or die('{"code":2,"message":"Missing username and/or password"}');
-			isset($_GET['type']) or die('{"code":2,"message":"Missing user type"}');
+			isset($_GET['username']) && isset($_GET['password']) or die('{"code":2,"message":"'._('Missing username and/or password').'"}');
+			isset($_GET['type']) or die('{"code":2,"message":"'._('Missing user type').'"}');
 			$r = login($_GET['username'],$_GET['password'],$_GET['type']);
 			if($r !== true){
 				die('{"code":2,"message":"'.$r.'"}');
@@ -25,7 +25,7 @@
 			}
 		break;
 		case 'verify':
-			isset($_GET['token']) or die('{"code":1,"message":"No token set"}');
+			isset($_GET['token']) or die('{"code":1,"message":"'._('No token set').'"}');
 			$r = verify($_GET['token']);
 			if($r !== true){
 				die('{"code":2,"message":"'.$r.'"}');
@@ -37,7 +37,7 @@
 			die('{"code":0}');
 		break;
 		case 'get-memos':
-			$u or die('{"code":1,"message":"You have been logged out"}');
+			$u or die('{"code":1,"message":"'._('You have been logged out').'"}');
 			$u['type'] = 'user' && isset($_COOKIE['user']) && isset($_SESSION['password']) or die('{"code":0}');
 			$res = atheme_command(get_conf('xmlrpc-server'),get_conf('xmlrpc-port'),get_conf('xmlrpc-path'),USER_IP,$_COOKIE['user'],$_SESSION['password'],'MemoServ','list');
 			if($res[0]){
@@ -66,11 +66,11 @@
 				}
 				die('{"code":0,"memos":'.json_encode($memos).'}');
 			}else{
-				die('{"code":1,"message":"Cannot fetch memos"}');
+				die('{"code":1,"message":"'._('Cannot fetch memos').'"}');
 			}
 		break;
 		case 'get-news':
-			$u or die('{"code":1,"message":"You have been logged out"}');
+			$u or die('{"code":1,"message":"'._('You have been logged out').'"}');
 			$u['type'] = 'user' && isset($_COOKIE['user']) && isset($_SESSION['password']) or die('{"code":0}');
 			$res = atheme_command(get_conf('xmlrpc-server'),get_conf('xmlrpc-port'),get_conf('xmlrpc-path'),USER_IP,$_COOKIE['user'],$_SESSION['password'],'InfoServ','list');
 			if($res[0]){
@@ -94,11 +94,11 @@
 				}
 				die('{"code":0,"news":'.json_encode($news).'}');
 			}else{
-				die('{"code":1,"message":"Cannot fetch news"}');
+				die('{"code":1,"message":"'._('Cannot fetch news').'"}');
 			}
 		break;
 		case 'get-channels':
-			$u or die('{"code":1,"message":"You have been logged out"}');
+			$u or die('{"code":1,"message":"'._('You have been logged out').'"}');
 			$u['type'] = 'user' && isset($_COOKIE['user']) && isset($_SESSION['password']) or die('{"code":0}');
 			$res = atheme_command(get_conf('xmlrpc-server'),get_conf('xmlrpc-port'),get_conf('xmlrpc-path'),USER_IP,$_COOKIE['user'],$_SESSION['password'],'NickServ','listchans');
 			if($res[0]){
@@ -110,23 +110,23 @@
 						$flags = array();
 						foreach($flags_list as $kk => $flag){
 							switch($flag){
-								case 'v':$name='Voice';break;
-								case 'V':$name='Automatic voice';break;
-								case 'h':$name='Halfop';break;
-								case 'H':$name='Automatic Halfop';break;
-								case 'o':$name='Op';break;
-								case 'O':$name='Automatic Op';break;
-								case 'a':$name='Admin';break;
-								case 'q':$name='Owner';break;
-								case 's':$name='Set';break;
-								case 'i':$name='Invite/Getkey';break;
-								case 'r':$name='Kick/Ban';break;
-								case 'R':$name='Recover/Clear';break;
-								case 'f':$name='Modify access lists';break;
-								case 't':$name='Topic';break;
-								case 'A':$name='View access lists';break;
-								case 'F':$name='Founder';break;
-								case 'b':$name='Banned';break;
+								case 'v':$name=_('Voice');break;
+								case 'V':$name=_('Automatic voice');break;
+								case 'h':$name=_('Halfop');break;
+								case 'H':$name=_('Automatic Halfop');break;
+								case 'o':$name=_('Op');break;
+								case 'O':$name=_('Automatic Op');break;
+								case 'a':$name=_('Admin');break;
+								case 'q':$name=_('Owner');break;
+								case 's':$name=_('Set');break;
+								case 'i':$name=_('Invite/Getkey');break;
+								case 'r':$name=_('Kick/Ban');break;
+								case 'R':$name=_('Recover/Clear');break;
+								case 'f':$name=_('Modify access lists');break;
+								case 't':$name=_('Topic');break;
+								case 'A':$name=_('View access lists');break;
+								case 'F':$name=_('Founder');break;
+								case 'b':$name=_('Banned');break;
 								default:$name=$flag;
 							}
 							array_push($flags,array(
@@ -143,7 +143,7 @@
 				}
 				die('{"code":0,"channels":'.json_encode($channels).'}');
 			}else{
-				die('{"code":1,"message":"Cannot fetch channels"}');
+				die('{"code":1,"message":"'._('Cannot fetch channels').'"}');
 			}
 		break;
 		case 'send-memo':
@@ -313,7 +313,7 @@
 			die('{"code":0}');
 		break;
 		case 'rehash':
-			$u or die('{"code":10,"message":"'_('Not logged in').'"}');
+			$u or die('{"code":10,"message":"'._('Not logged in').'"}');
 			die(ircrehash());
 		break;
 		default: