Commit 2dc4984a authored by Jérôme Jutteau's avatar Jérôme Jutteau

[TASK] set a translation string id for each element

closes #158Signed-off-by: Jérôme Jutteau's avatarJerome Jutteau <j.jutteau@gmail.com>
parent a1bcc5b8
......@@ -46,7 +46,7 @@ if (php_sapi_name() == "cli") {
if (empty($cfg['admin_password']) && empty($cfg['admin_http_auth_user'])) {
require(JIRAFEAU_ROOT . 'lib/template/header.php');
echo '<div class="error"><p>'.
t('Sorry, the admin interface is not enabled.') .
t('NO_ADMIN') .
'</p></div>';
require(JIRAFEAU_ROOT.'lib/template/footer.php');
exit;
......@@ -66,7 +66,7 @@ if (php_sapi_name() == "cli") {
$_SESSION['admin_auth'] = false;
require(JIRAFEAU_ROOT . 'lib/template/header.php');
echo '<div class="error"><p>'.
t('Wrong password.') . '</p></div>';
t('BAD_PSW') . '</p></div>';
require(JIRAFEAU_ROOT.'lib/template/footer.php');
exit;
}
......@@ -80,7 +80,7 @@ if (php_sapi_name() == "cli") {
<table>
<tr>
<td class = "label"><label for = "enter_password">
<?php echo t('Administration password') . ':'; ?></label>
<?php echo t('ADMIN_PSW') . ':'; ?></label>
</td>
<td class = "field"><input type = "password"
name = "admin_password" id = "admin_password"
......@@ -91,7 +91,7 @@ if (php_sapi_name() == "cli") {
<td></td>
<td class = "nav next">
<input type = "submit" name = "key" value =
"<?php echo t('Login'); ?>" />
"<?php echo t('LOGIN'); ?>" />
</td>
</tr>
</table>
......@@ -114,7 +114,7 @@ if (php_sapi_name() == "cli") {
$_SESSION['admin_auth'] = false;
require(JIRAFEAU_ROOT . 'lib/template/header.php');
echo '<div class="error"><p>'.
t('Sorry, you are not authenticated on admin interface.') .
t('NO_ADMIN_AUTH') .
'</p></div>';
require(JIRAFEAU_ROOT.'lib/template/footer.php');
exit;
......@@ -129,21 +129,21 @@ if (php_sapi_name() == "cli") {
/* Show admin interface if not downloading a file. */
if (!(isset($_POST['action']) && strcmp($_POST['action'], 'download') == 0)) {
require(JIRAFEAU_ROOT . 'lib/template/header.php'); ?><h2><?php echo t('Admin interface'); ?></h2><?php
require(JIRAFEAU_ROOT . 'lib/template/header.php'); ?><h2><?php echo t('ADMIN_INTERFACE'); ?></h2><?php
?><h2>(version <?php echo JIRAFEAU_VERSION ?>)</h2><?php
?><div id = "admin">
<fieldset><legend><?php echo t('Actions'); ?></legend>
<fieldset><legend><?php echo t('ACTIONS'); ?></legend>
<table>
<form method="post">
<tr>
<input type = "hidden" name = "action" value = "clean"/>
<td class = "info">
<?php echo t('Clean expired files'); ?>
<?php echo t('CLEAN_EXPIRED'); ?>
</td>
<td></td>
<td>
<input type = "submit" value = "<?php echo t('Clean'); ?>" />
<input type = "submit" value = "<?php echo t('CLEAN'); ?>" />
</td>
</tr>
</form>
......@@ -151,11 +151,11 @@ if (php_sapi_name() == "cli") {
<tr>
<input type = "hidden" name = "action" value = "clean_async"/>
<td class = "info">
<?php echo t('Clean old unfinished transfers'); ?>
<?php echo t('CLEAN_INCOMPLETE'); ?>
</td>
<td></td>
<td>
<input type = "submit" value = "<?php echo t('Clean'); ?>" />
<input type = "submit" value = "<?php echo t('CLEAN'); ?>" />
</td>
</tr>
</form>
......@@ -163,11 +163,11 @@ if (php_sapi_name() == "cli") {
<tr>
<input type = "hidden" name = "action" value = "list"/>
<td class = "info">
<?php echo t('List all files'); ?>
<?php echo t('LS_FILES'); ?>
</td>
<td></td>
<td>
<input type = "submit" value = "<?php echo t('List'); ?>" />
<input type = "submit" value = "<?php echo t('LIST'); ?>" />
</td>
</tr>
</form>
......@@ -175,13 +175,13 @@ if (php_sapi_name() == "cli") {
<tr>
<input type = "hidden" name = "action" value = "search_by_name"/>
<td class = "info">
<?php echo t('Search files by name'); ?>
<?php echo t('SEARCH_NAME'); ?>
</td>
<td>
<input type = "text" name = "name" id = "name"/>
</td>
<td>
<input type = "submit" value = "<?php echo t('Search'); ?>" />
<input type = "submit" value = "<?php echo t('SEARCH'); ?>" />
</td>
</tr>
</form>
......@@ -189,13 +189,13 @@ if (php_sapi_name() == "cli") {
<tr>
<input type = "hidden" name = "action" value = "search_by_file_hash"/>
<td class = "info">
<?php echo t('Search files by file hash'); ?>
<?php echo t('SEARH_BY_HASH'); ?>
</td>
<td>
<input type = "text" name = "hash" id = "hash"/>
</td>
<td>
<input type = "submit" value = "<?php echo t('Search'); ?>" />
<input type = "submit" value = "<?php echo t('SEARCH'); ?>" />
</td>
</tr>
</form>
......@@ -203,20 +203,20 @@ if (php_sapi_name() == "cli") {
<tr>
<input type = "hidden" name = "action" value = "search_link"/>
<td class = "info">
<?php echo t('Search a specific link'); ?>
<?php echo t('SEARCH'); ?>
</td>
<td>
<input type = "text" name = "link" id = "link"/>
</td>
<td>
<input type = "submit" value = "<?php echo t('Search'); ?>" />
<input type = "submit" value = "<?php echo t('SEARCH'); ?>" />
</td>
</tr>
</form>
</table>
<form method="post">
<input type = "hidden" name = "action" value = "logout" />
<input type = "submit" value = "<?php echo t('Logout'); ?>" />
<input type = "submit" value = "<?php echo t('LOGOUT'); ?>" />
</form>
</fieldset></div><?php
......@@ -228,13 +228,13 @@ if (php_sapi_name() == "cli") {
$total = jirafeau_admin_clean();
echo '<div class="message">' . NL;
echo '<p>';
echo t('Number of cleaned files') . ' : ' . $total;
echo t('CLEANED_FILES_CNT') . ' : ' . $total;
echo '</p></div>';
} elseif (strcmp($_POST['action'], 'clean_async') == 0) {
$total = jirafeau_admin_clean_async();
echo '<div class="message">' . NL;
echo '<p>';
echo t('Number of cleaned files') . ' : ' . $total;
echo t('CLEANED_FILES_CNT') . ' : ' . $total;
echo '</p></div>';
} elseif (strcmp($_POST['action'], 'list') == 0) {
jirafeau_admin_list("", "", "");
......@@ -247,11 +247,11 @@ if (php_sapi_name() == "cli") {
} elseif (strcmp($_POST['action'], 'delete_link') == 0) {
jirafeau_delete_link($_POST['link']);
echo '<div class="message">' . NL;
echo '<p>' . t('Link deleted') . '</p></div>';
echo '<p>' . t('LINK_DELETED') . '</p></div>';
} elseif (strcmp($_POST['action'], 'delete_file') == 0) {
$count = jirafeau_delete_file($_POST['md5']);
echo '<div class="message">' . NL;
echo '<p>' . t('Deleted links') . ' : ' . $count . '</p></div>';
echo '<p>' . t('DELETED_LINKS') . ' : ' . $count . '</p></div>';
} elseif (strcmp($_POST['action'], 'download') == 0) {
$l = jirafeau_get_link($_POST['link']);
if (!count($l)) {
......
......@@ -39,7 +39,7 @@ $link_name = $_GET['h'];
if (!preg_match('/[0-9a-zA-Z_-]+$/', $link_name)) {
require(JIRAFEAU_ROOT.'lib/template/header.php');
echo '<div class="error"><p>' . t('Sorry, the requested file is not found') . '</p></div>';
echo '<div class="error"><p>' . t('FILE_404') . '</p></div>';
require(JIRAFEAU_ROOT.'lib/template/footer.php');
exit;
}
......@@ -47,7 +47,7 @@ if (!preg_match('/[0-9a-zA-Z_-]+$/', $link_name)) {
$link = jirafeau_get_link($link_name);
if (count($link) == 0) {
require(JIRAFEAU_ROOT.'lib/template/header.php');
echo '<div class="error"><p>' . t('Sorry, the requested file is not found') .
echo '<div class="error"><p>' . t('FILE_404') .
'</p></div>';
require(JIRAFEAU_ROOT.'lib/template/footer.php');
exit;
......@@ -77,7 +77,7 @@ $p = s2p($link['md5']);
if (!file_exists(VAR_FILES . $p . $link['md5'])) {
jirafeau_delete_link($link_name);
require(JIRAFEAU_ROOT.'lib/template/header.php');
echo '<div class="error"><p>'.t('File not available.').
echo '<div class="error"><p>'.t('FILE_NOT_AVAIL').
'</p></div>';
require(JIRAFEAU_ROOT.'lib/template/footer.php');
exit;
......@@ -87,23 +87,23 @@ if (!empty($delete_code) && $delete_code == $link['link_code']) {
require(JIRAFEAU_ROOT.'lib/template/header.php');
if (isset($_POST['do_delete'])) {
jirafeau_delete_link($link_name);
echo '<div class="message"><p>'.t('File has been deleted.').
echo '<div class="message"><p>'.t('FILE_DELETED').
'</p></div>';
} else { ?>
<div>
<form action="f.php" method="post" id="submit_delete_post" class="form login">
<input type="hidden" name="do_delete" value=1/>
<fieldset>
<legend> <?php echo t('Confirm deletion') ?> </legend>
<legend> <?php echo t('CONFIRM_DEL') ?> </legend>
<table>
<tr><td>
<?php echo t('You are about to delete') . ' "' . htmlspecialchars($link['file_name']) . '" (' . jirafeau_human_size($link['file_size']) . ').' ?>
<?php echo t('GONNA_DEL') . ' "' . htmlspecialchars($link['file_name']) . '" (' . jirafeau_human_size($link['file_size']) . ').' ?>
</td></tr>
<tr><td>
<?php echo t('By using our services, you accept our'). ' <a href="tos.php">' . t('Terms of Service') . '</a>.' ?>
<?php echo t('USING_SERIVCE'). ' <a href="tos.php">' . t('TOS') . '</a>.' ?>
</td></tr>
<tr><td>
<input type="submit" id="submit_delete" value="<?php echo t('Delete'); ?>"
<input type="submit" id="submit_delete" value="<?php echo t('DELETE'); ?>"
onclick="document.getElementById('submit_delete_post').action='<?php echo 'f.php?h=' . $link_name . '&amp;d=' . $delete_code . "';"; ?>
document.getElementById('submit_delete').submit ();"/>
</td></tr>
......@@ -118,8 +118,8 @@ if ($link['time'] != JIRAFEAU_INFINITY && time() > $link['time']) {
jirafeau_delete_link($link_name);
require(JIRAFEAU_ROOT.'lib/template/header.php');
echo '<div class="error"><p>'.
t('The time limit of this file has expired.') . ' ' .
t('File has been deleted.') .
t('FILE_EXPIRED') . ' ' .
t('FILE_DELETED') .
'</p></div>';
require(JIRAFEAU_ROOT . 'lib/template/footer.php');
exit;
......@@ -127,7 +127,7 @@ if ($link['time'] != JIRAFEAU_INFINITY && time() > $link['time']) {
if (empty($crypt_key) && $link['crypted']) {
require(JIRAFEAU_ROOT.'lib/template/header.php');
echo '<div class="error"><p>' . t('Sorry, the requested file is not found') .
echo '<div class="error"><p>' . t('FILE_404') .
'</p></div>';
require(JIRAFEAU_ROOT.'lib/template/footer.php');
exit;
......@@ -141,20 +141,20 @@ if (!empty($link['key'])) {
'<form action="f.php" method="post" id="submit_post" class="form login">'; ?>
<input type = "hidden" name = "jirafeau" value = "<?php echo JIRAFEAU_VERSION ?>"/><?php
echo '<fieldset>' .
'<legend>' . t('Password protection') .
'<legend>' . t('PSW_PROTEC') .
'</legend><table><tr><td>' .
t('Give the password of this file') . ' : ' .
t('GIMME_PSW') . ' : ' .
'<input type = "password" name = "key" />' .
'</td></tr>' .
'<tr><td>' .
t('By using our services, you accept our'). ' <a href="tos.php">' . t('Terms of Service') . '</a>.' .
t('USING_SERIVCE'). ' <a href="tos.php">' . t('TOS') . '</a>.' .
'</td></tr>';
if ($link['onetime'] == 'O') {
echo '<tr><td id="self_destruct">' .
t('Warning, this file will self-destruct after being read') .
t('AUTO_DESTRUCT') .
'</td></tr>';
} ?><tr><td><input type="submit" id = "submit_download" value="<?php echo t('Download'); ?>"
} ?><tr><td><input type="submit" id = "submit_download" value="<?php echo t('DL'); ?>"
onclick="document.getElementById('submit_post').action='<?php
echo 'f.php?h=' . $link_name . '&amp;d=1';
if (!empty($crypt_key)) {
......@@ -162,7 +162,7 @@ if (!empty($link['key'])) {
} ?>';
document.getElementById('submit_download').submit ();"/><?php
if ($cfg['preview'] && jirafeau_is_viewable($link['mime_type'])) {
?><input type="submit" id = "submit_preview" value="<?php echo t('Preview'); ?>"
?><input type="submit" id = "submit_preview" value="<?php echo t('PREVIEW'); ?>"
onclick="document.getElementById('submit_post').action='<?php
echo 'f.php?h=' . $link_name . '&amp;p=1';
if (!empty($crypt_key)) {
......@@ -180,7 +180,7 @@ if (!empty($link['key'])) {
} else {
sleep(2);
require(JIRAFEAU_ROOT.'lib/template/header.php');
echo '<div class="error"><p>' . t('Access denied') .
echo '<div class="error"><p>' . t('ACCESS_KO') .
'</p></div>';
require(JIRAFEAU_ROOT.'lib/template/footer.php');
exit;
......@@ -195,18 +195,18 @@ if (!$password_challenged && !$do_download && !$do_preview) {
<input type = "hidden" name = "jirafeau" value = "<?php echo JIRAFEAU_VERSION ?>"/><?php
echo '<fieldset><legend>' . htmlspecialchars($link['file_name']) . '</legend><table>' .
'<tr><td>' .
t('You are about to download') . ' "' . htmlspecialchars($link['file_name']) . '" (' . jirafeau_human_size($link['file_size']) . ').' .
t('NOW_DOWNLOADING') . ' "' . htmlspecialchars($link['file_name']) . '" (' . jirafeau_human_size($link['file_size']) . ').' .
'</td></tr>' .
'<tr><td>' .
t('By using our services, you accept our'). ' <a href="tos.php">' . t('Terms of Service') . '</a>.' .
t('USING_SERIVCE'). ' <a href="tos.php">' . t('TOS') . '</a>.' .
'</td></tr>';
if ($link['onetime'] == 'O') {
echo '<tr><td id="self_destruct">' .
t('Warning, this file will self-destruct after being read') .
t('AUTO_DESTRUCT') .
'</td></tr>';
} ?>
<tr><td><input type="submit" id = "submit_download" value="<?php echo t('Download'); ?>"
<tr><td><input type="submit" id = "submit_download" value="<?php echo t('DL'); ?>"
onclick="document.getElementById('submit_post').action='<?php
echo 'f.php?h=' . $link_name . '&amp;d=1';
if (!empty($crypt_key)) {
......@@ -215,7 +215,7 @@ if (!$password_challenged && !$do_download && !$do_preview) {
document.getElementById('submit_post').submit ();"/><?php
if ($cfg['preview'] && jirafeau_is_viewable($link['mime_type'])) {
?><input type="submit" id = "submit_preview" value="<?php echo t('Preview'); ?>"
?><input type="submit" id = "submit_preview" value="<?php echo t('PREVIEW'); ?>"
onclick="document.getElementById('submit_post').action='<?php
echo 'f.php?h=' . $link_name . '&amp;p=1';
if (!empty($crypt_key)) {
......
......@@ -52,7 +52,7 @@ if (true === jirafeau_challenge_upload_ip($cfg['upload_ip'], get_ip_address($cfg
$_SESSION['user_upload_password'] = $_POST['upload_password'];
} else {
$_SESSION['admin_auth'] = false;
jirafeau_fatal_error(t('Wrong password.'), $cfg);
jirafeau_fatal_error(t('BAD_PSW'), $cfg);
}
}
......@@ -64,7 +64,7 @@ if (true === jirafeau_challenge_upload_ip($cfg['upload_ip'], get_ip_address($cfg
<table>
<tr>
<td class = "label"><label for = "enter_password">
<?php echo t('Upload password') . ':'; ?></label>
<?php echo t('UP_PSW') . ':'; ?></label>
</td>
</tr><tr>
<td class = "field"><input type = "password"
......@@ -75,7 +75,7 @@ if (true === jirafeau_challenge_upload_ip($cfg['upload_ip'], get_ip_address($cfg
<tr class = "nav">
<td class = "nav next">
<input type = "submit" name = "key" value =
"<?php echo t('Login'); ?>" />
"<?php echo t('LOGIN'); ?>" />
</td>
</tr>
</table>
......@@ -88,16 +88,16 @@ if (true === jirafeau_challenge_upload_ip($cfg['upload_ip'], get_ip_address($cfg
}
}
else {
jirafeau_fatal_error(t('Access denied'), $cfg);
jirafeau_fatal_error(t('ACCESS_KO'), $cfg);
}
?>
<div id="upload_finished">
<p><?php echo t('File uploaded !') ?></p>
<p><?php echo t('FILE_UP') ?></p>
<div id="upload_finished_download_page">
<p>
<a id="upload_link" href=""><?php echo t('Download page') ?></a>
<a id="upload_link" href=""><?php echo t('DL_PAGE') ?></a>
<a id="upload_link_email" href=""><img id="upload_image_email"/></a>
</p><p>
<code id=upload_link_text></code>
......@@ -109,7 +109,7 @@ else {
?>
<div id="upload_finished_preview">
<p>
<a id="preview_link" href=""><?php echo t('View link') ?></a>
<a id="preview_link" href=""><?php echo t('VIEW_LINK') ?></a>
</p><p>
<code id=preview_link_text></code>
<button id="preview_link_button"></button>
......@@ -120,7 +120,7 @@ else {
<div id="upload_direct_download">
<p>
<a id="direct_link" href=""><?php echo t('Direct download link') ?></a>
<a id="direct_link" href=""><?php echo t('DIRECT_DL') ?></a>
</p><p>
<code id=direct_link_text></code>
<button id="direct_link_button"></button>
......@@ -129,7 +129,7 @@ else {
<div id="upload_delete">
<p>
<a id="delete_link" href=""><?php echo t('Delete link') ?></a>
<a id="delete_link" href=""><?php echo t('DELETE_LINK') ?></a>
</p><p>
<code id=delete_link_text></code>
<button id="delete_link_button"></button>
......@@ -137,14 +137,14 @@ else {
</div>
<div id="upload_validity">
<p><?php echo t('This file is valid until the following date'); ?>:</p>
<p><?php echo t('VALID_UNTIL'); ?>:</p>
<p id="date"></p>
</div>
</div>
<div id="uploading">
<p>
<?php echo t('Uploading ...'); ?>
<?php echo t('UP'); ?>
<div id="uploaded_percentage"></div>
<div id="uploaded_speed"></div>
<div id="uploaded_time"></div>
......@@ -157,59 +157,59 @@ else {
<div id="upload">
<fieldset>
<legend>
<?php echo t('Select a file'); ?>
<?php echo t('SEL_FILE'); ?>
</legend>
<p>
<input type="file" id="file_select" size="30"
onchange="control_selected_file_size(<?php echo $cfg['maximal_upload_size'] ?>, '<?php echo t('File is too big') . ', ' . t('File size is limited to') . " " . $cfg['maximal_upload_size'] . " MB"; ?>')"/>
onchange="control_selected_file_size(<?php echo $cfg['maximal_upload_size'] ?>, '<?php echo t('2_BIG') . ', ' . t('FILE_LIM') . " " . $cfg['maximal_upload_size'] . " MB"; ?>')"/>
</p>
<div id="options">
<table id="option_table">
<tr>
<td><?php echo t('One time download'); ?>:</td>
<td><?php echo t('ONE_TIME_DL'); ?>:</td>
<td><input type="checkbox" id="one_time_download" /></td>
</tr>
<tr>
<td><label for="input_key"><?php echo t('Password') . ':'; ?></label></td>
<td><label for="input_key"><?php echo t('PSW') . ':'; ?></label></td>
<td><input type="text" name="key" id="input_key" /></td>
</tr>
<tr>
<td><label for="select_time"><?php echo t('Time limit') . ':'; ?></label></td>
<td><label for="select_time"><?php echo t('TIME_LIM') . ':'; ?></label></td>
<td><select name="time" id="select_time">
<?php
$expirationTimeOptions = array(
array(
'value' => 'minute',
'label' => 'One minute'
'label' => '1_MIN'
),
array(
'value' => 'hour',
'label' => 'One hour'
'label' => '1_H'
),
array(
'value' => 'day',
'label' => 'One day'
'label' => '1_D'
),
array(
'value' => 'week',
'label' => 'One week'
'label' => '1_W'
),
array(
'value' => 'month',
'label' => 'One month'
'label' => '1_M'
),
array(
'value' => 'quarter',
'label' => 'One quarter'
'label' => '1_Q'
),
array(
'value' => 'year',
'label' => 'One year'
'label' => '1_Y'
),
array(
'value' => 'none',
'label' => 'None'
'label' => 'NONE'
)
);
foreach ($expirationTimeOptions as $expirationTimeOption) {
......@@ -225,7 +225,7 @@ else {
<?php
if ($cfg['maximal_upload_size'] > 0) {
echo '<p class="config">' . t('File size is limited to');
echo '<p class="config">' . t('FILE_LIM');
echo " " . $cfg['maximal_upload_size'] . " MB</p>";
}
?>
......@@ -245,7 +245,7 @@ else {
}
?>
<input type="submit" id="send" value="<?php echo t('Send'); ?>"
<input type="submit" id="send" value="<?php echo t('SEND'); ?>"
onclick="
document.getElementById('upload').style.display = 'none';
document.getElementById('uploading').style.display = '';
......@@ -260,7 +260,7 @@ else {
?>
<form method="post" class="form logout">
<input type = "hidden" name = "action" value = "logout"/>
<input type = "submit" value = "<?php echo t('Logout'); ?>" />
<input type = "submit" value = "<?php echo t('LOGOUT'); ?>" />
</form>
<?php
......
......@@ -69,12 +69,12 @@ function jirafeau_is_writable($path)
function jirafeau_check_var_dir($path)
{
$mkdir_str1 = t('The following directory could not be created') . ':';
$mkdir_str2 = t('You should create this directory manually.');
$write_str1 = t('The following directory is not writable') . ':';
$mkdir_str1 = t('CANNOT_CREATE_DIR') . ':';
$mkdir_str2 = t('MANUAL_CREATE');
$write_str1 = t('DIR_NOT_W') . ':';
$write_str2 = t('You should give the write permission to the web server on ' .
'this directory.');
$solution_str = t('Here is a solution') . ':';
$solution_str = t('HERE_SOLUTION') . ':';
if (!jirafeau_mkdir($path) || !jirafeau_is_writable($path)) {
return array('has_error' => true,
......@@ -188,8 +188,8 @@ if (isset($_POST['next'])) {
switch ($current) {
case 1:
default:
?><h2><?php printf(t('Installation of Jirafeau') . ' - ' . t('step') .
' %d ' . t('out of') . ' %d', 1, 4);
?><h2><?php printf(t('JI_INSTALL') . ' - ' . t('STEP') .
' %d ' . t('OUT_OF') . ' %d', 1, 4);
?></h2> <div id = "install"> <form method="post"> <input type =
"hidden" name = "jirafeau" value =
"<?php echo JIRAFEAU_VERSION; ?>" /><input type = "hidden" name =
......@@ -199,7 +199,7 @@ default:
t('Jirafeau is internationalised. Choose a specific langage or ' .
'choose Automatic (langage is provided by user\'s browser).');
?></td> </tr> <tr> <td class = "label"><label for = "select_lang"
><?php echo t('Choose the default language') . ':';
><?php echo t('DEF_LANGUAGE') . ':';
?></label></td>
<td class = "field">
<select name = "lang" id = "select_lang">
......@@ -214,25 +214,25 @@ default:
<tr class = "nav">
<td></td>
<td class = "nav next"><input type = "submit" name = "next" value =
"<?php echo t('Next step'); ?>" /></td> </tr> </table>
"<?php echo t('NEXT_STEP'); ?>" /></td> </tr> </table>
</fieldset> </form> </div> <?php
break;
case 2:
?><h2><?php printf(t('Installation of Jirafeau') . ' - ' . t('step') .
' %d ' . t('out of') . ' %d', 2, 4);
?><h2><?php printf(t('JI_INSTALL') . ' - ' . t('STEP') .
' %d ' . t('OUT_OF') . ' %d', 2, 4);
?></h2> <div id = "install"> <form method="post"> <input type =
"hidden" name = "jirafeau" value =
"<?php echo JIRAFEAU_VERSION; ?>" /><input type = "hidden" name =
"step" value = "2" /><fieldset> <legend><?php
echo t('Administration password');
echo t('ADMIN_PSW');
?></legend> <table> <tr> <td class = "info" colspan =
"2"><?php echo
t('Jirafeau has an administration interface (through admin.php). ' .
'You can set a password to access the interface or leave it empty ' .
'to disable the interface.');
?></td> </tr> <tr> <td class = "label"><label for = "select_password"
><?php echo t('Administration password') . ':';
><?php echo t('ADMIN_PSW') . ':';
?></label></td>
<td class = "field"><input type = "password" name = "admin_password"
id = "admin_password" size = "40" /></td>
......@@ -242,27 +242,27 @@ case 2:
<td class = "nav next">
<input type = "submit"
class = "navleft" name = "previous" value = "<?php
echo t('Previous step'); ?>" />
echo t('PREV_STEP'); ?>" />
<input type = "submit" name = "next" value =
"<?php echo t('Next step'); ?>" /></td> </tr> </table>
"<?php echo t('NEXT_STEP'); ?>" /></td> </tr> </table>
</fieldset> </form> </div> <?php
break;
case 3:
?><h2><?php printf(t('Installation of Jirafeau') . ' - ' . t('step') .
' %d ' . t('out of') . ' %d', 3, 4);
?><h2><?php printf(t('JI_INSTALL') . ' - ' . t('STEP') .
' %d ' . t('OUT_OF') . ' %d', 3, 4);
?></h2> <div id = "install"> <form method="post"> <input type =
"hidden" name = "jirafeau" value =
"<?php echo JIRAFEAU_VERSION; ?>" /><input type = "hidden" name =
"step" value =
"3" /><fieldset> <legend><?php echo t('Information');
"3" /><fieldset> <legend><?php echo t('INFO');
?></legend> <table> <tr> <td class = "info" colspan =
"2"><?php echo
t('The base address of Jirafeau is the first part of the URL, until ' .
'(and including) the last slash. For example: ' .
'"http://www.example.com/". Do not forget the trailing slash!');
?></td> </tr> <tr> <td class = "label"><label for = "input_web_root"
><?php echo t('Base address') . ':';
><?php echo t('BASE_ADDR') . ':';
?></label></td>
<td class = "field"><input type = "text" name = "web_root"
id = "input_web_root" value = "<?php
......@@ -276,7 +276,7 @@ case 3:
'site, or at least restrict the access to this directory. Do not ' .
'forget the trailing slash!');
?></td> </tr> <tr> <td class = "label"><label for = "input_var_root"
><?php echo t('Data directory') . ':';
><?php echo t('DATA_DIR') . ':';
?></label></td>
<td class = "field"><input type = "text" name = "var_root"
id = "input_var_root" value = "<?php
......@@ -295,21 +295,21 @@ case 3:
?>" size = "40" /></td>
</tr> <tr> <td colspan = "2"><input type = "submit"
class = "navleft" name = "previous" value = "<?php
echo t('Previous step'); ?>" />
echo t('PREV_STEP'); ?>" />
<input type = "submit" class = "navright" name = "next" value = "
<?php echo t('Next step'); ?>" />
<?php echo t('NEXT_STEP'); ?>" />
</td> </tr> </table> </fieldset>
</form> </div> <?php
break;
case 4:
?><h2><?php printf(t('Installation of Jirafeau') . ' - ' . t('step') .
' %d ' . t('out of') . ' %d', 4, 4);
?><h2><?php printf(t('JI_INSTALL') . ' - ' . t('STEP') .
' %d ' . t('OUT_OF') . ' %d', 4, 4);
?></h2> <div id = "install"> <form method="post"> <input type =
"hidden" name = "jirafeau" value =
"<?php echo JIRAFEAU_VERSION; ?>" /><input type = "hidden" name =
"step" value =
"4" /><fieldset> <legend><?php echo t('Finalisation');
"4" /><fieldset> <legend><?php echo t('FINALIZATION');
?></legend> <table> <tr> <td class = "info" colspan =
"2"><?php echo
t('Jirafeau is setting the website according to the configuration ' .
......@@ -318,7 +318,7 @@ case 4:
"submit" name = "previous" value =
"
<?php
echo t('Previous step');
echo t('PREV_STEP');
?>" /></td> <td></td> </tr>
</table> </fieldset> </form> </div>
<?php
......@@ -328,13 +328,13 @@ case 4:
"<?php echo JIRAFEAU_VERSION; ?>" /><input type = "hidden" name =
"step" value = "4" /><input type = "submit" name =
"retry" value =
"<?php echo t('Retry this step'); ?>" /></form>
"<?php echo t('RETRY_STEP'); ?>" /></form>
<?php echo '</p></div>';
} else {
$cfg['installation_done'] = true;
jirafeau_export_cfg($cfg);
echo '<div class="message"><p>' .
t('Jirafeau is now fully operational') . ':' .
t('JI_FONCTIONAL') . ':' .
'<br /><a href="./">' .
$cfg['web_root'].'</a></p></div>';
}
......
......@@ -654,25 +654,25 @@ function milliseconds_to_time_string (milliseconds)
var temp = Math.floor(milliseconds / 1000);
var years = Math.floor(temp / 31536000);
if (years) {
return years + ' ' + translate ('year') + numberEnding(years);
return years + ' ' + translate ('YEAR') + numberEnding(years);
}
var days = Math.floor((temp %= 31536000) / 86400);
if (days) {
return days + ' ' + translate ('day') + numberEnding(days);
return days + ' ' + translate ('DAY') + numberEnding(days);
}
var hours = Math.floor((temp %= 86400) / 3600);
if (hours) {
return hours + ' ' + translate ('hour') + numberEnding(hours);
return hours + ' ' + translate ('HOUR') + numberEnding(hours);
}
var minutes = Math.floor((temp %= 3600) / 60);
if (minutes) {
return minutes + ' ' + translate ('minute') + numberEnding(minutes);
return minutes + ' ' + translate ('MINUTE') + numberEnding(minutes);
}
var seconds = temp % 60;
if (seconds) {
return seconds + ' ' + translate ('second') + numberEnding(seconds);
return seconds + ' ' + translate ('SECOND') + numberEnding(seconds);
}
return translate ('less than a second');