瀏覽代碼

Use Get Lang Function

own3mall 8 年之前
父節點
當前提交
c7fa1c3b8e

+ 5 - 5
index.php

@@ -99,7 +99,7 @@ function heading()
 	
 	if ( !file_exists(CONFIG_FILE) )
     {
-        print_failure( failed_to_read_config );
+        print_failure( get_lang("failed_to_read_config") );
         $view->refresh("index.php");
         return;
     }
@@ -210,7 +210,7 @@ function ogpHome()
 			$userInfo = $db->getUser($_SESSION['users_login']);
 			if( isset($_SESSION['users_passwd']) AND !empty($_SESSION['users_passwd']) AND $_SESSION['users_passwd'] == $userInfo['users_passwd'])
 			{
-				print_success( already_logged_in_redirecting_to_dashboard .".");
+				print_success( get_lang("already_logged_in_redirecting_to_dashboard") .".");
 				$view->refresh("home.php?$default_page",2);
 				echo "%botbody%
 					  %bottom%";
@@ -283,14 +283,14 @@ function ogpHome()
 				$_SESSION['users_group'] = $userInfo['users_role'];
 				$_SESSION['users_lang'] = isset( $_GET['lang'] ) ? $_GET['lang'] : $userInfo['users_lang'];
 				$_SESSION['users_theme'] = $userInfo['users_theme'];
-				print_success( logging_in ."...");
+				print_success( get_lang("logging_in") ."...");
 				$db->logger( logging_in ."...");
 				$db->query("UPDATE `OGP_DB_PREFIXban_list` SET logging_attempts='0', banned_until='0' WHERE client_ip = '$client_ip';");
 				$view->refresh("home.php?$default_page",2);
 			}
 			else
 			{
-				print_failure( bad_login );
+				print_failure( get_lang("bad_login") );
 				$login_attempts++;
 				if( $login_attempts == $settings["login_attempts_before_banned"] )
 				{
@@ -377,4 +377,4 @@ function ogpHome()
 	%bottom%
 <?php
 }
-?>
+?>

+ 3 - 3
modules/ftp/ftp_admin.php

@@ -42,12 +42,12 @@ function exec_ogp_module()
 		
 		// Validation
 		if(strlen($post_ftp_login) > 20){
-			print_failure( ftp_account_username_too_long );
+			print_failure( get_lang("ftp_account_username_too_long") );
 			$success = false;
 		}
 		
 		if(strlen($post_ftp_password) > 20){
-			print_failure( ftp_account_password_too_long );
+			print_failure( get_lang("ftp_account_password_too_long") );
 			$success = false;
 		}
 		
@@ -70,7 +70,7 @@ function exec_ogp_module()
 		
 		if( $user_exists === TRUE )
 		{
-			print_failure( ftp_account_already_exists );
+			print_failure( get_lang("ftp_account_already_exists") );
 		}
 		else
 		{

+ 6 - 6
modules/gamemanager/mini_start.php

@@ -79,13 +79,13 @@ if( !isset( $_POST['start_server'] ) )
 	}
 	else if($r === -1)
 	{
-		print_failure( agent_offline );
+		print_failure( get_lang("agent_offline") );
 		return;
 	}
 	// If the result is something else than 1 here then there unexpected retval was received.
 	else if ($r !== 1 )
 	{
-		print_failure( unexpected_result_libremote );
+		print_failure( get_lang("unexpected_result_libremote") );
 		return;
 	}
 
@@ -93,7 +93,7 @@ if( !isset( $_POST['start_server'] ) )
 
 	if ( empty($ip_info) )
 	{
-		print_failure( no_ip_port_pairs_assigned );
+		print_failure( get_lang("no_ip_port_pairs_assigned") );
 		return;
 	}
 
@@ -206,7 +206,7 @@ if( !isset( $_POST['start_server'] ) )
 		else
 		{
 			echo "<tr><td colspan='2'>";
-			print_failure( failed_to_read_maps_error_code .": $map_array");
+			print_failure( get_lang("failed_to_read_maps_error_code") .": $map_array");
 			echo "</td></tr>";
 			$check_ok = FALSE;
 		}
@@ -267,7 +267,7 @@ if( !isset( $_POST['start_server'] ) )
 	}
 	else
 	{
-		print_failure( unable_get_info );
+		print_failure( get_lang("unable_get_info") );
 	}
 
 	echo "</form>";
@@ -641,7 +641,7 @@ elseif($server_home['home_id'] == $_POST['home_id'])
 	$db->logger(  server_started  . " (".$server_home['home_name']." $ip:$port)" );
 	if ( $start_retval == AGENT_ERROR_NOT_EXECUTABLE )
 	{
-		print_failure( server_binary_not_executable );
+		print_failure( get_lang("server_binary_not_executable") );
 		return;
 	}
 

+ 1 - 1
modules/gamemanager/rcon.php

@@ -257,7 +257,7 @@ if($server_xml->list_players_command)
 				echo $player_actions_table;
 			}
 			else
-				print_failure( no_online_players );
+				print_failure( get_lang("no_online_players") );
 		}
 		echo "<form method='GET' >".
 			 "<input type='hidden' name='m' value='gamemanager' />".

+ 7 - 7
modules/gamemanager/rsync_install.php

@@ -138,7 +138,7 @@ function exec_ogp_module() {
 
 	if ( $home_info === FALSE || preg_match("/u/",$home_info['access_rights']) != 1 )
 	{
-		print_failure( no_rights );
+		print_failure( get_lang("no_rights") );
 		echo create_back_button("gamemanager","game_monitor");
 		return;
 	}
@@ -182,7 +182,7 @@ function exec_ogp_module() {
 	
 	if ( $remote->is_screen_running(OGP_SCREEN_TYPE_HOME,$home_id) == 1 )
 	{
-		print_failure( server_running_cant_update );
+		print_failure( get_lang("server_running_cant_update") );
 		return;
 	}
 	$update_active = $remote->get_log(OGP_SCREEN_TYPE_UPDATE,
@@ -191,7 +191,7 @@ function exec_ogp_module() {
 		$log_txt,30);
 	if ($update_active === 0)
 	{
-		print_failure( agent_offline );
+		print_failure( get_lang("agent_offline") );
 		$view->refresh("{CURRENT_PAGE}", 5);
 		return;
 	}
@@ -260,12 +260,12 @@ function exec_ogp_module() {
 		}
 		if( $rsync === 0 )
 		{
-			print_failure( failed_to_start_rsync_update );
+			print_failure( get_lang("failed_to_start_rsync_update") );
 			return;
 		}
 		else if ( $rsync === 1 )
 		{
-			print_success( update_started );
+			print_success(get_lang("update_started"));
 			echo "<p><a href=\"?m=gamemanager&amp;p=rsync_install&amp;update=refresh&amp;home_id=$home_id&amp;mod_id=$mod_id$master\">".
 				 refresh_rsync_status ."</a></p>";
 			$view->refresh("?m=gamemanager&amp;p=rsync_install&amp;update=refresh&amp;home_id=$home_id&amp;mod_id=$mod_id$master",5);
@@ -273,7 +273,7 @@ function exec_ogp_module() {
 		}
 		elseif( $rsync === 0 )
 		{
-			print_failure( agent_offline );
+			print_failure( get_lang("agent_offline") );
 			return;
 		}
 	}
@@ -324,7 +324,7 @@ function exec_ogp_module() {
 	elseif($update != "update")
 	{
 		$view->refresh("{CURRENT_PAGE}", 60);
-		print_success( update_completed );
+		print_success(get_lang("update_completed") );
 		echo "<table class='center'><tr><td><a href='?m=gamemanager&amp;p=game_monitor&amp;home_id=".$home_info['home_id']."'><< ". back ."</a></td></tr></table>";
 		echo "<pre>".$log_txt."</pre>\n";
 		echo "<table class='center'><tr><td><a href='?m=gamemanager&amp;p=game_monitor&amp;home_id=".$home_info['home_id']."'><< ". back ."</a></td></tr></table>";

+ 8 - 8
modules/gamemanager/update_server.php

@@ -41,7 +41,7 @@ function exec_ogp_module() {
 
 	if ( $home_info === FALSE || preg_match("/u/",$home_info['access_rights']) != 1 )
 	{
-		print_failure( no_rights );
+		print_failure( get_lang("no_rights") );
 		echo "<table class='center'><tr><td><a href='?m=gamemanager&amp;p=game_monitor&amp;home_id=".$home_info['home_id']."'><< ". back ."</a></td></tr></table>";
 		return;
 	}
@@ -56,14 +56,14 @@ function exec_ogp_module() {
 
 	if ( $server_xml->installer != "steamcmd" )
 	{
-		print_failure( xml_steam_error );
+		print_failure( get_lang("xml_steam_error") );
 		return;
 	}
 	$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'], $home_info['timeout']);
 	$host_stat = $remote->status_chk();
 	if( $host_stat === 0 )
 	{
-		print_failure( agent_offline );
+		print_failure( get_lang("agent_offline") );
 		$view->refresh("?m=gamemanager&amp;p=update&amp;update=".$_GET['update']."&amp;home_id=$home_id&amp;mod_id=$mod_id",5);
 		return;
 	}
@@ -71,7 +71,7 @@ function exec_ogp_module() {
 	{
 		if ( $remote->is_screen_running(OGP_SCREEN_TYPE_HOME,$home_id) == 1 )
 		{
-			print_failure( server_running_cant_update );
+			print_failure( get_lang("server_running_cant_update") );
 			return;
 		}
 
@@ -170,12 +170,12 @@ function exec_ogp_module() {
 			
 			if( $steam_out === 0 )
 			{
-				print_failure( failed_to_start_steam_update );
+				print_failure( get_lang("failed_to_start_steam_update") );
 				return;
 			}
 			else if ( $steam_out === 1 )
 			{
-				print_success( update_started );
+				print_success( get_lang("update_started") );
 			}
 		}
 		// Refresh update page.
@@ -197,7 +197,7 @@ function exec_ogp_module() {
 			else
 			{
 				$view->refresh("{CURRENT_PAGE}", 60);
-				print_success( update_completed );
+				print_success( get_lang("update_completed") );
 				echo "<table class='center'><tr><td><a href='?m=gamemanager&amp;p=game_monitor&amp;home_id=".$home_info['home_id']."'><< ". back ."</a></td></tr></table>";
 				$update_complete = true;
 			}
@@ -215,4 +215,4 @@ function exec_ogp_module() {
 		return;
 	}
 }
-?>
+?>

+ 3 - 3
modules/gamemanager/update_server_manual.php

@@ -56,7 +56,7 @@ function exec_ogp_module() {
 
 	if ( $home_info === FALSE || preg_match("/u/",$home_info['access_rights']) != 1 )
 	{
-		print_failure( no_rights );
+		print_failure( get_lang("no_rights") );
 		echo create_back_button("gamemanager","gamemanager");
 		return;
 	}
@@ -82,7 +82,7 @@ function exec_ogp_module() {
 
 			if ( $pid < 0 )
 			{
-				print_failure( failed_to_start_file_download );
+				print_failure( get_lang("failed_to_start_file_download") );
 				return;
 			}
 		}
@@ -121,7 +121,7 @@ function exec_ogp_module() {
 			// Lock the executable when done
 			$remote->secure_path("chattr+i", $home_info['home_path'] . "/" . ($server_xml->exe_location ? $server_xml->exe_location . "/" : "") . $server_xml->server_exec_name);
 			
-			print_success( finished_manual_update );
+			print_success( get_lang("finished_manual_update") );
 		}
 		else
 		{

+ 3 - 3
modules/gamemanager/view_server_log.php

@@ -52,7 +52,7 @@ function exec_ogp_module()
 	
     if ( $home_info === FALSE )
     {
-        print_failure( no_access_to_home );
+        print_failure( get_lang("no_access_to_home") );
         return;
     }
 
@@ -86,7 +86,7 @@ function exec_ogp_module()
 
     if ($log_retval == 0)
     {
-        print_failure( agent_offline );
+        print_failure( get_lang("agent_offline") );
 		echo create_back_button( $_GET['m'], 'game_monitor&home_id-mod_id-ip-port='.$_GET['home_id-mod_id-ip-port'] );
     }
     elseif ($log_retval == 1 || $log_retval == 2)
@@ -167,7 +167,7 @@ function exec_ogp_module()
 			else
 			{
 				echo "<pre class='log'>" . htmlentities($home_log) . "</pre>";
-				print_failure( server_not_running );
+				print_failure( get_lang("server_not_running") );
 			}
 			echo create_back_button( $_GET['m'], 'game_monitor&home_id-mod_id-ip-port='.$_GET['home_id-mod_id-ip-port'] );
 		}

+ 3 - 3
modules/litefm/fm_dir.php

@@ -30,7 +30,7 @@ function exec_ogp_module()
 
 	if (empty($home_id))
 	{
-		print_failure( home_id_missing );
+		print_failure( get_lang("home_id_missing") );
 		return;
 	}
 
@@ -44,7 +44,7 @@ function exec_ogp_module()
 	
 	if ($home_cfg === FALSE)
 	{
-		print_failure( no_access_to_home );
+		print_failure( get_lang("no_access_to_home") );
 		return;
 	}
 
@@ -424,7 +424,7 @@ function exec_ogp_module()
 				}
 				else
 				{
-					print_failure( failed_list );
+					print_failure( get_lang("failed_list") );
 					return;
 				}
 			}

+ 9 - 9
modules/server/add_server.php

@@ -41,13 +41,13 @@ function exec_ogp_module() {
 		$display_public_ip = trim($_POST['display_public_ip']);
 		
 		if ( empty($rhost_ip) ){
-			print_failure( enter_ip_host );
+			print_failure( get_lang("enter_ip_host") );
 			$view->refresh("?m=server");
 			return;
 		}
 
 		if ( !isPortValid($rhost_port) ){
-			print_failure( enter_valid_ip );
+			print_failure( get_lang("enter_valid_ip") );
 			$view->refresh("?m=server");
 			return;
 		}
@@ -58,13 +58,13 @@ function exec_ogp_module() {
 		$status = $remote->status_chk();
 		if($status === 0)
 		{
-			print_failure( agent_offline . "<br>" . could_not_add_server . " " . $rhost_ip );
+			print_failure( get_lang("agent_offline") . "<br>" . get_lang("could_not_add_server") . " " . $rhost_ip );
 			echo create_back_button($_GET['m']);
 			return;
 		}
 		elseif($status === -1)
 		{
-			print_failure( encryption_key_mismatch . "<br>" . could_not_add_server . " " . $rhost_ip );
+			print_failure( get_lang("encryption_key_mismatch") . "<br>" . get_lang("could_not_add_server") . " " . $rhost_ip );
 			echo create_back_button($_GET['m']);
 			return;
 		}
@@ -75,20 +75,20 @@ function exec_ogp_module() {
 		$rhost_id = $db->addRemoteServer($rhost_ip,$rhost_name,$rhost_user_name,$rhost_port,$rhost_ftp_ip,$rhost_ftp_port,$encryption_key,$timeout,$use_nat,$display_public_ip);
 		if ( !$rhost_id )
 		{
-			print_failure( could_not_add_server ." ".$rhost_ip." ". to_db );
+			print_failure( get_lang("could_not_add_server") ." ".$rhost_ip." ". get_lang("to_db") );
 			$view->refresh("?m=server");
 			return;
 		}
 
-		print_success( added_server ." $rhost_ip ". with_port ." $rhost_port ". to_db_succesfully );
+		print_success( get_lang("added_server") ." $rhost_ip ". get_lang("with_port") ." $rhost_port ". get_lang("to_db_succesfully") );
 
 		$iplist = $remote->discover_ips();
 
 		if ( empty($iplist) )
-			print_failure( unable_discover ." ".$rhost_ip.". ". set_ip_manually );
+			print_failure( get_lang("unable_discover") ." ".$rhost_ip.". ". get_lang("set_ip_manually") );
 		else
 		{
-			print_success( found_ips ." (".implode(",",$iplist).") ". for_remote_server );
+			print_success( get_lang("found_ips") ." (".implode(",",$iplist).") ". get_lang("for_remote_server") );
 			foreach ( $iplist as $remote_ip )
 			{
 				$remote_ip = trim($remote_ip);
@@ -96,7 +96,7 @@ function exec_ogp_module() {
 					continue;
 
 				if ( !$db->addRemoteServerIp($rhost_id,$remote_ip) )
-					print_failure( failed_add_ip ." (".$remote_ip.") ". for_remote_server );
+					print_failure( get_lang("failed_add_ip") ." (".$remote_ip.") ". get_lang("for_remote_server") );
 			}
 		}
 		$view->refresh("?m=server");

+ 6 - 6
modules/server/arrange_ports.php

@@ -24,9 +24,9 @@ function exec_ogp_module()
 						
 					$retval = $db->addPortsRange($_POST['ip_id'],$_POST['home_cfg_id'],$_POST['start_port'],$_POST['end_port'],$_POST['port_increment']);
 					if($retval === 1)
-						print_failure( invalid_values );
+						print_failure( get_lang("invalid_values") );
 					elseif($retval === 2)
-						print_failure( ports_in_range_already_arranged );
+						print_failure( get_lang("ports_in_range_already_arranged") );
 					elseif($retval)
 						print_success(get_lang_f('ports_range_added_successfull_for',$cfg_info['game_name']));
 					else
@@ -175,9 +175,9 @@ function exec_ogp_module()
 				if(isset($_POST['delete_range']))
 				{
 					if($db->delPortsRange($_POST['range_id']))
-						print_success( ports_range_deleted_successfull );
+						print_success( get_lang("ports_range_deleted_successfull") );
 					else
-						print_failure( failed_to_delete_ports_range );
+						print_failure( get_lang("failed_to_delete_ports_range") );
 					$view->refresh('?m=server&p=arrange_ports&rserver_id='.$_GET['rserver_id'].'&ip_id='.$_GET['ip_id'],3);
 				}
 				if(isset($_POST['edit_range']))
@@ -189,9 +189,9 @@ function exec_ogp_module()
 					
 					$retval = $db->editPortsRange($_POST['range_id'],$_POST['ip_id'],$_POST['start_port'],$_POST['end_port'],$_POST['port_increment']);
 					if($retval === 1)
-						print_failure( invalid_values );
+						print_failure( get_lang("invalid_values") );
 					elseif($retval === 2)
-						print_failure( ports_in_range_already_arranged );
+						print_failure( get_lang("ports_in_range_already_arranged") );
 					elseif($retval)
 						print_success(get_lang_f('ports_range_edited_successfull_for',$cfg_info['game_name']));
 					else

+ 4 - 4
modules/server/edit_server.php

@@ -45,7 +45,7 @@ function exec_ogp_module() {
 		$remote_ip = preg_replace("/[^0-9\.]/", "", $remote_ip);
         if ( $db->addRemoteServerIp($rhost_id, $remote_ip) === FALSE )
 		{       
-			print_failure( could_not_add_ip );
+			print_failure( get_lang("could_not_add_ip") );
 		}
 		else
 		{
@@ -60,7 +60,7 @@ function exec_ogp_module() {
 		
         if ( $db->removeRemoteServerIps($ip_id) === FALSE )
 		{
-            print_failure( could_not_remove_ip );
+            print_failure( get_lang("could_not_remove_ip") );
 		}
 		else
 		{
@@ -77,7 +77,7 @@ function exec_ogp_module() {
 		
         if ( $db->editRemoteServerIps($ip_id,$ip) === FALSE )
 		{
-            print_failure( could_not_edit_ip );
+            print_failure( get_lang("could_not_edit_ip") );
 		}
 		else
 		{
@@ -100,7 +100,7 @@ function exec_ogp_module() {
         }
 
         else if ( $db->removeRemoteServer($rhost_id) === FALSE )
-            print_failure( error_while_remove );
+            print_failure( get_lang("error_while_remove") );
 
         else
             print_success(get_lang_f('remote_host_removed',$remote_server['remote_server_name']));

+ 1 - 1
modules/server/restart.php

@@ -55,7 +55,7 @@ function exec_ogp_module() {
 			else
 			{
 				echo "<pre class='log'><xmp>".$agent_log."</xmp></pre>";
-				print_success( restarted );
+				print_success( get_lang("restarted") );
 				echo create_back_button($_GET['m']);
 				$view->refresh("?m=server",15);
 			}

+ 7 - 7
modules/server/view_log.php

@@ -36,30 +36,30 @@ function exec_ogp_module() {
 		$file_info = $remote->remote_writefile('./ogp_agent.log', strip_real_escape_string($_REQUEST['file_content']));
 		if ( $file_info === 1 )
 		{
-            print_success( wrote_changes );
+            print_success( get_lang("wrote_changes") );
 		}
         else if ( $file_info === 0 )
-            print_failure( failed_write );
+            print_failure( get_lang("failed_write") );
         else
 		{
-            print_failure( agent_offline );
+            print_failure( get_lang("agent_offline") );
 		}
 	}
     $data = "";
     $file_info =  $remote->remote_readfile('./ogp_agent.log',$data);
     if ( $file_info === 0 )
     {
-        print_failure( not_found );
+        print_failure( get_lang("not_found") );
         return;
     }
     else if ( $file_info === -1 )
     {
-        print_failure( agent_offline );
+        print_failure( get_lang("agent_offline") );
         return;
     }
     else if ( $file_info === -2 )
     {
-        print_failure( failed_read );
+        print_failure( get_lang("failed_read") );
         return;
     }
     echo "<form action='?m=server&amp;p=log&amp;rhost_id=".$rhost_id."' method='post'>";
@@ -68,4 +68,4 @@ function exec_ogp_module() {
     echo "</form>";
 	echo create_back_button($_GET['m']);
 }
-?>
+?>

+ 1 - 1
modules/update/updating.php

@@ -40,7 +40,7 @@ function exec_ogp_module()
 	define('REPONAME', 'OGP-Website');
 	if($_SESSION['users_group'] != "admin")
 	{
-		print_failure( no_access );
+		print_failure( get_lang("no_access") );
 		return;
 	}
 

+ 4 - 4
modules/user_games/assign_home.php

@@ -41,17 +41,17 @@ function exec_ogp_module()
 	if(isset($_REQUEST['user_id'])){
 		if(empty($_REQUEST['user_id']) || $db->getUserById($_REQUEST['user_id']) == null)
 		{
-			print_failure(valid_user);
+			print_failure(get_lang("valid_user"));
 			return;
 		}
 	}else if(isset($_REQUEST['group_id'])){
 		if(empty($_REQUEST['group_id']) || $db->getGroupById($_REQUEST['group_id']) == null)
 		{
-			print_failure(valid_group);
+			print_failure(get_lang("valid_group"));
 			return;
 		}
 	}else{
-		print_failure(invalid_url);
+		print_failure(get_lang("invalid_url"));
 		return;
 	}
 	
@@ -283,4 +283,4 @@ function exec_ogp_module()
 	else 
 		echo create_back_button('user_admin');
 }
-?>
+?>

+ 3 - 3
modules/user_games/del_home.php

@@ -84,7 +84,7 @@ function exec_ogp_module() {
 			}
 		}
 		else
-			print_failure(agent_offline . " " . remove_it_anyway . "?");
+			print_failure(get_lang("agent_offline") . " " . remove_it_anyway . "?");
 		echo "<a href=\"?m=user_games&amp;p=del&amp;y=y&amp;home_id=$home_id\">".
 		yes . "</a> | <a href=\"?m=user_games\">".
 		no . "</a></p>";
@@ -115,7 +115,7 @@ function exec_ogp_module() {
 		if ( $remote->ftp_mgr("userdel", $ftp_login) === 0 )
 		{
 			$del_files = $files == 'y' ? '&amp;files=y' : '';
-			print_failure(failed_to_remove_ftp_account_from_remote_server);
+			print_failure(get_lang("failed_to_remove_ftp_account_from_remote_server"));
 			echo "<p>" . remove_it_anyway . "<p>
 				<a href=\"?m=user_games&amp;p=del&amp;y=y&amp;force=y&amp;home_id=$home_id$del_files\">".
 				yes . "</a> | <a href=\"?m=user_games\">".
@@ -151,7 +151,7 @@ function exec_ogp_module() {
 		
 		if ( $db->deleteGameHome($home_id) === FALSE )
 		{
-			print_failure(failed_to_remove_gamehome_from_database);
+			print_failure(get_lang("failed_to_remove_gamehome_from_database"));
 			return;
 		}
 		else

+ 6 - 6
modules/user_games/edit_home.php

@@ -814,7 +814,7 @@ function exec_ogp_module()
 
 					if ( !isPortValid($port) ) 
 					{
-						print_failure( port_range_error );
+						print_failure( get_lang("port_range_error") );
 					}
 					else
 					{
@@ -836,7 +836,7 @@ function exec_ogp_module()
 					
 					if ( $db->delGameIpPort($home_id,$del_ip,$del_port) )
 					{
-						print_success( successfully_assigned_ip_port );
+						print_success( get_lang("successfully_assigned_ip_port") );
 						$db->logger( successfully_assigned_ip_port ." [unassigned]");
 					}
 					else
@@ -865,7 +865,7 @@ function exec_ogp_module()
 				$assigned = $db->getHomeIpPorts($home_id);
 				if( empty($assigned) )
 				{
-					print_failure( no_ip_ports_assigned );
+					print_failure( get_lang("no_ip_ports_assigned") );
 				}
 				else
 				{
@@ -901,12 +901,12 @@ function exec_ogp_module()
 			}
 			else
 			{
-				print_failure(  server_is_running_change_addresses_not_available  );
+				print_failure(  get_lang("server_is_running_change_addresses_not_available")  );
 			}
 		}
 		else
 		{
-			print_failure(  no_ip_addresses_configured ."<a href='?m=server'>". server_page ."</a>." );
+			print_failure(  get_lang("no_ip_addresses_configured") ."<a href='?m=server'>". get_lang("server_page") ."</a>." );
 		}
 		echo "<div id='mods'></div>";
 	}
@@ -942,4 +942,4 @@ function exec_ogp_module()
 		}
 	}
 }
-?>
+?>

+ 3 - 3
modules/user_games/home_mods.php

@@ -39,7 +39,7 @@ function exec_ogp_module()
 		$cpu_count = $remote->cpu_count();
 		if($cpu_count === -1)
 		{
-			print_failure( warning_agent_offline_defaulting_CPU_count_to_1 );
+			print_failure( get_lang("warning_agent_offline_defaulting_CPU_count_to_1") );
 			$cpu_count = 'NA';
 		}
 		else
@@ -77,7 +77,7 @@ function exec_ogp_module()
 		}
 		else
 		{
-			print_failure( note .":". note_no_mods );
+			print_failure( get_lang("note") .":". get_lang("note_no_mods") );
 			echo "<form action='?m=user_games&p=edit&home_id=".$home_id."' method='post'>\n";
 			echo "<input type='hidden' name='home_id' value=\"$home_id\" />\n";
 			echo "<p>". available_mods .": <select name='mod_cfg_id'>\n";
@@ -97,7 +97,7 @@ function exec_ogp_module()
 		
 		if($cpu_count === -1)
 		{
-			print_failure( warning_agent_offline_defaulting_CPU_count_to_1 );
+			print_failure( get_lang("warning_agent_offline_defaulting_CPU_count_to_1") );
 			$cpu_count = 'NA';
 		} else {
 			// cpu numbering starts from 0 so lets remove the last cpu.