Просмотр исходного кода

Merge pull request #16 from own3mall/master

Localization Changes
OwN-3m-All 8 лет назад
Родитель
Сommit
02f68784b7
4 измененных файлов с 56 добавлено и 56 удалено
  1. 31 31
      modules/cron/cron.php
  2. 1 1
      modules/cron/events.php
  3. 2 2
      modules/cron/thetime.php
  4. 22 22
      modules/cron/user_cron.php

+ 31 - 31
modules/cron/cron.php

@@ -141,7 +141,7 @@ function exec_ogp_module()
 		list($jobsArray, $remote_servers_offline) = reloadJobs($server_homes, $remote_servers);
 	}	
 	
-	echo "<h2>" . schedule_new_job . "</h2>";
+	echo "<h2>" . get_lang("schedule_new_job") . "</h2>";
 	require_once("includes/refreshed.php");
 	$refresh = new refreshed();
 	if( isset($_POST['r_server_id']) )
@@ -161,7 +161,7 @@ function exec_ogp_module()
 	$r_server_id = $homeid_ip_port == 0 ? $_POST['r_server_id'] : $server_homes[$homeid_ip_port]['remote_server_id'];
 	$homeid_ip_port = $homeid_ip_port == 0 ? key($server_homes) : $homeid_ip_port;
 	$curtime = $refresh->add( "home.php?m=cron&p=thetime&r_server_id=$r_server_id&type=cleared" );
-	echo "<pre class='log' ><table><tr><td>" . now . 
+	echo "<pre class='log' ><table><tr><td>" . get_lang("now") . 
 		 "&nbsp;</td><td><form action='' method='POST' >" . get_server_selector($server_homes, $homeid_ip_port, TRUE, true) . 
 		 "</form></td><td><form action='' method='POST' >" .
 		 get_remote_server_selector($remote_servers, $remote_servers_offline, $r_server_id, TRUE) .
@@ -170,25 +170,25 @@ function exec_ogp_module()
 <table class="center hundred">
 	<tr>
 		<th>
-		<?php echo minute; ?>
+		<?php echo get_lang("minute"); ?>
 		</th>
 		<th>
-		<?php echo hour; ?>
+		<?php echo get_lang("hour"); ?>
 		</th>
 		<th>
-		<?php echo day; ?>
+		<?php echo get_lang("day"); ?>
 		</th>
 		<th>
-		<?php echo month; ?>
+		<?php echo get_lang("month"); ?>
 		</th>
 		<th>
-		<?php echo day_of_the_week; ?>
+		<?php echo get_lang("day_of_the_week"); ?>
 		</th>
 		<th>
-		<?php echo action; ?>
+		<?php echo get_lang("action"); ?>
 		</th>
 		<th>
-		<?php echo user_games; ?>
+		<?php echo get_lang("user_games"); ?>
 		</th>
 	</tr>
 	<tr>
@@ -215,31 +215,31 @@ function exec_ogp_module()
 			<?php echo get_server_selector($server_homes, $homeid_ip_port, FALSE, true);?>
 		</td>
 		<td>
-			<input style="" type="submit" name="addJob" value="<?php echo add; ?>" />
+			<input style="" type="submit" name="addJob" value="<?php echo get_lang("add"); ?>" />
 			</form>
 		</td>
 	</tr>
 	<tr>
 		<th>
-		<?php echo minute; ?>
+		<?php echo get_lang("minute"); ?>
 		</th>
 		<th>
-		<?php echo hour; ?>
+		<?php echo get_lang("hour"); ?>
 		</th>
 		<th>
-		<?php echo day; ?>
+		<?php echo get_lang("day"); ?>
 		</th>
 		<th>
-		<?php echo month; ?>
+		<?php echo get_lang("month"); ?>
 		</th>
 		<th>
-		<?php echo day_of_the_week; ?>
+		<?php echo get_lang("day_of_the_week"); ?>
 		</th>
 		<th>
-		<?php echo server; ?>
+		<?php echo get_lang("server"); ?>
 		</th>
 		<th>
-		<?php echo command; ?>
+		<?php echo get_lang("command"); ?>
 		</th>
 	</tr>
 	<tr>
@@ -266,13 +266,13 @@ function exec_ogp_module()
 			<input style="width: 100%; box-sizing: border-box;" type="text" name="command" />
 		</td>
 		<td>
-			<input style="" type="submit" name="addJob" value="<?php echo add; ?>" />
+			<input style="" type="submit" name="addJob" value="<?php echo get_lang("add"); ?>" />
 			</form>
 		</td>
 	</tr>
 </table>
 <br>
-<h2><?php echo scheduled_jobs;?></h2>
+<h2><?php echo get_lang("scheduled_jobs");?></h2>
 <?php
 	if ( !empty($remote_servers_offline) )
 	{
@@ -292,32 +292,32 @@ function exec_ogp_module()
 			<form  action='' method='GET'>
 				<input type="hidden" name="m" value="cron" />
 				<input type="hidden" name="p" value="events" />
-				<label for="r_server_id" ><?php echo cron_events;?></label>
+				<label for="r_server_id" ><?php echo get_lang("cron_events");?></label>
 				<?php echo get_remote_server_selector($remote_servers, $remote_servers_offline, FALSE, TRUE, TRUE); ?>
 			</form>
 		</td>
 	</tr>
 	<tr>
 		<th>
-		<?php echo minute; ?>
+		<?php echo get_lang("minute"); ?>
 		</th>
 		<th>
-		<?php echo hour; ?>
+		<?php echo get_lang("hour"); ?>
 		</th>
 		<th>
-		<?php echo day; ?>
+		<?php echo get_lang("day"); ?>
 		</th>
 		<th>
-		<?php echo month; ?>
+		<?php echo get_lang("month"); ?>
 		</th>
 		<th>
-		<?php echo day_of_the_week; ?>
+		<?php echo get_lang("day_of_the_week"); ?>
 		</th>
 		<th>
-		<?php echo action . " / " . server; ?>
+		<?php echo get_lang("action") . " / " . get_lang("server"); ?>
 		</th>
 		<th>
-		<?php echo user_games . " / " . command; ?>
+		<?php echo get_lang("user_games") . " / " . get_lang("command"); ?>
 		</th>
 	</tr>
 <?php
@@ -365,8 +365,8 @@ function exec_ogp_module()
 									<td style="width: 132px;">
 										<input type="hidden" name="job_id" value=\''.$jobId.'\' />
 										<input type="hidden" name="r_server_id" value=\''.$remote_server_id.'\' />
-										<input style="" type="submit" name="editJob" value="'. edit .'" />
-										<input style="" type="submit" name="removeJob" value="'. remove .'" />
+										<input style="" type="submit" name="editJob" value="'. get_lang("edit") .'" />
+										<input style="" type="submit" name="removeJob" value="'. get_lang("remove") .'" />
 										</form>
 									</td>
 								</tr>';
@@ -379,10 +379,10 @@ function exec_ogp_module()
 	}
 	else
 	{
-		echo "<h3>". there_are_no_scheduled_jobs ."</h3>";
+		echo "<h3>". get_lang("there_are_no_scheduled_jobs") ."</h3>";
 	}
 ?>
-<table class='center hundred' ><tr><td><a href='javascript:history.go(-1)' > << <?php echo back ?></a></td></tr></table>
+<table class='center hundred' ><tr><td><a href='javascript:history.go(-1)' > << <?php echo get_lang("back") ?></a></td></tr></table>
 <script type="text/javascript">
 $(document).ready(function() 
 	{

+ 1 - 1
modules/cron/events.php

@@ -37,7 +37,7 @@ function exec_ogp_module()
 		$remote = new OGPRemoteLibrary($remote_server['agent_ip'], $remote_server['agent_port'], $remote_server['encryption_key'], $remote_server['timeout'] );
 		if($remote->status_chk() != 1)
 		{
-			print_failure(agent_offline);
+			print_failure(get_lang("agent_offline"));
 			return;
 		}
 		$remote->remote_readfile('scheduler.log', $events);

+ 2 - 2
modules/cron/thetime.php

@@ -43,6 +43,6 @@ function exec_ogp_module()
 			 '</td></tr></table>';
 	}
 	else
-		echo agent_offline;
+		echo get_lang("agent_offline");
 }
-?>
+?>

+ 22 - 22
modules/cron/user_cron.php

@@ -143,13 +143,13 @@ function exec_ogp_module()
 		list($jobsArray, $remote_servers_offline) = reloadJobs($server_homes, $remote_servers);
 	}	
 
-	echo "<h2>" . schedule_new_job . "</h2>";
+	echo "<h2>" . get_lang("schedule_new_job") . "</h2>";
 	require_once("includes/refreshed.php");
 	$refresh = new refreshed();
 	$homeid_ip_port = isset($_POST['homeid_ip_port']) ? $_POST['homeid_ip_port'] : key($server_homes);
 	$r_server_id = $server_homes[$homeid_ip_port]['remote_server_id'];
 	$curtime = $refresh->add( "home.php?m=cron&p=thetime&r_server_id=$r_server_id&type=cleared" );
-	echo "<pre class='log' ><table><tr><td>" . now . 
+	echo "<pre class='log' ><table><tr><td>" . get_lang("now") . 
 		"&nbsp;</td><td><form action='' method='POST' >" . get_server_selector($server_homes, $homeid_ip_port, TRUE) . 
 		"</form></td></tr></table> <b style='font-size:1.4em;'>" . $refresh->getdiv($curtime) . "</b></pre>";
  ?>
@@ -157,25 +157,25 @@ function exec_ogp_module()
 <table class="center hundred">
 	<tr>
 		<th>
-		<?php echo minute; ?>
+		<?php echo get_lang("minute"); ?>
 		</th>
 		<th>
-		<?php echo hour; ?>
+		<?php echo get_lang("hour"); ?>
 		</th>
 		<th>
-		<?php echo day; ?>
+		<?php echo get_lang("day"); ?>
 		</th>
 		<th>
-		<?php echo month; ?>
+		<?php echo get_lang("month"); ?>
 		</th>
 		<th>
-		<?php echo day_of_the_week; ?>
+		<?php echo get_lang("day_of_the_week"); ?>
 		</th>
 		<th>
-		<?php echo action; ?>
+		<?php echo get_lang("action"); ?>
 		</th>
 		<th>
-		<?php echo user_games; ?>
+		<?php echo get_lang("user_games"); ?>
 		</th>
 	</tr>
 	<tr>
@@ -201,13 +201,13 @@ function exec_ogp_module()
 			<?php echo get_server_selector($server_homes, $homeid_ip_port);?>
 		</td>
 		<td style="width: 132px;">
-			<input style="" type="submit" name="addJob" value="<?php echo add; ?>" />
+			<input style="" type="submit" name="addJob" value="<?php echo get_lang("add"); ?>" />
 		</td>
 	</tr>
 </table>
 </form>
 <br>
-<h2><?php echo scheduled_jobs;?></h2>
+<h2><?php echo get_lang("scheduled_jobs");?></h2>
 <?php
 	if ( !empty($jobsArray) )
 	{
@@ -216,25 +216,25 @@ function exec_ogp_module()
 	</tr>
 	<tr>
 		<th>
-		<?php echo minute; ?>
+		<?php echo get_lang("minute"); ?>
 		</th>
 		<th>
-		<?php echo hour; ?>
+		<?php echo get_lang("hour"); ?>
 		</th>
 		<th>
-		<?php echo day; ?>
+		<?php echo get_lang("day"); ?>
 		</th>
 		<th>
-		<?php echo month; ?>
+		<?php echo get_lang("month"); ?>
 		</th>
 		<th>
-		<?php echo day_of_the_week; ?>
+		<?php echo get_lang("day_of_the_week"); ?>
 		</th>
 		<th>
-		<?php echo action; ?>
+		<?php echo get_lang("action"); ?>
 		</th>
 		<th>
-		<?php echo user_games; ?>
+		<?php echo get_lang("user_games"); ?>
 		</th>
 	</tr>
 <?php
@@ -276,8 +276,8 @@ function exec_ogp_module()
 										<td style="width: 132px;">
 											<input type="hidden" name="job_id" value=\''.$jobId.'\' />
 											<input type="hidden" name="r_server_id" value=\''.$remote_server_id.'\' />
-											<input style="" type="submit" name="editJob" value="'. edit .'" />
-											<input style="" type="submit" name="removeJob" value="'. remove .'" />
+											<input style="" type="submit" name="editJob" value="'. get_lang("edit") .'" />
+											<input style="" type="submit" name="removeJob" value="'. get_lang("remove") .'" />
 											</form>
 										</td>
 									</tr>';
@@ -291,9 +291,9 @@ function exec_ogp_module()
 <?php
 	}
 	else
-		echo "<h3>". there_are_no_scheduled_jobs ."</h3>";
+		echo "<h3>". get_lang("there_are_no_scheduled_jobs") ."</h3>";
 ?>
-<table class='center hundred' ><tr><td><a href='javascript:history.go(-1)' > << <?php echo back ?></a><?php if(!$boolShowedAdminLink && $isAdmin){ echo '&nbsp; &nbsp; | &nbsp; &nbsp; ' . '<a href="home.php?m=cron&p=cron">' . get_lang('cron_admin_link_display_text') . '</a>'; }?></td></tr></table>
+<table class='center hundred' ><tr><td><a href='javascript:history.go(-1)' > << <?php echo get_lang("back") ?></a><?php if(!$boolShowedAdminLink && $isAdmin){ echo '&nbsp; &nbsp; | &nbsp; &nbsp; ' . '<a href="home.php?m=cron&p=cron">' . get_lang('cron_admin_link_display_text') . '</a>'; }?></td></tr></table>
 <script type="text/javascript">
 $(document).ready(function() 
 	{