mirror of
https://gitlab.com/mojo42/Jirafeau.git
synced 2025-04-22 12:36:17 +02:00
refactorised translation function
This commit is contained in:
parent
1fe28b19ec
commit
53517d3b93
42
admin.php
42
admin.php
@ -37,7 +37,7 @@ if (file_exists (JIRAFEAU_ROOT . 'install.php'))
|
||||
{
|
||||
require (JIRAFEAU_ROOT . 'lib/template/header.php');
|
||||
echo '<div class="error"><p>'.
|
||||
_('Installer script still present') .
|
||||
t('Installer script still present') .
|
||||
'</p></div>';
|
||||
require (JIRAFEAU_ROOT.'lib/template/footer.php');
|
||||
exit;
|
||||
@ -48,7 +48,7 @@ if (!$cfg['admin_password'])
|
||||
{
|
||||
require (JIRAFEAU_ROOT . 'lib/template/header.php');
|
||||
echo '<div class="error"><p>'.
|
||||
_('Sorry, the admin interface is not enabled.') .
|
||||
t('Sorry, the admin interface is not enabled.') .
|
||||
'</p></div>';
|
||||
require (JIRAFEAU_ROOT.'lib/template/footer.php');
|
||||
exit;
|
||||
@ -71,7 +71,7 @@ if (isset ($_POST['admin_password']))
|
||||
$_SESSION['admin_auth'] = false;
|
||||
require (JIRAFEAU_ROOT . 'lib/template/header.php');
|
||||
echo '<div class="error"><p>'.
|
||||
_('Wrong password.') . '</p></div>';
|
||||
t('Wrong password.') . '</p></div>';
|
||||
require (JIRAFEAU_ROOT.'lib/template/footer.php');
|
||||
exit;
|
||||
}
|
||||
@ -85,7 +85,7 @@ elseif (!isset ($_SESSION['admin_auth']) || $_SESSION['admin_auth'] != true)
|
||||
<table>
|
||||
<tr>
|
||||
<td class = "label"><label for = "enter_password">
|
||||
<?php echo _('Administration password') . ':';?></label>
|
||||
<?php echo t('Administration password') . ':';?></label>
|
||||
</td>
|
||||
<td class = "field"><input type = "password"
|
||||
name = "admin_password" id = "admin_password"
|
||||
@ -96,7 +96,7 @@ elseif (!isset ($_SESSION['admin_auth']) || $_SESSION['admin_auth'] != true)
|
||||
<td></td>
|
||||
<td class = "nav next">
|
||||
<input type = "submit" name = "key" value =
|
||||
"<?php echo _('Login'); ?>" />
|
||||
"<?php echo t('Login'); ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -109,22 +109,22 @@ elseif (!isset ($_SESSION['admin_auth']) || $_SESSION['admin_auth'] != true)
|
||||
|
||||
/* Admin interface. */
|
||||
require (JIRAFEAU_ROOT . 'lib/template/header.php');
|
||||
?><h2><?php echo _('Admin interface'); ?></h2><?php
|
||||
?><h2><?php echo t('Admin interface'); ?></h2><?php
|
||||
|
||||
/* Show admin interface. */
|
||||
{
|
||||
?><div id = "install">
|
||||
<fieldset><legend><?php echo _('Actions');?></legend>
|
||||
<fieldset><legend><?php echo t('Actions');?></legend>
|
||||
<table>
|
||||
<form action = "<?php echo basename(__FILE__); ?>" method = "post">
|
||||
<tr>
|
||||
<input type = "hidden" name = "action" value = "clean"/>
|
||||
<td class = "info">
|
||||
<?php echo _('Clean expired files'); ?>
|
||||
<?php echo t('Clean expired files'); ?>
|
||||
</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<input type = "submit" value = "<?php echo _('Clean'); ?>" />
|
||||
<input type = "submit" value = "<?php echo t('Clean'); ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
@ -132,11 +132,11 @@ require (JIRAFEAU_ROOT . 'lib/template/header.php');
|
||||
<tr>
|
||||
<input type = "hidden" name = "action" value = "list"/>
|
||||
<td class = "info">
|
||||
<?php echo _('List all files'); ?>
|
||||
<?php echo t('List all files'); ?>
|
||||
</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<input type = "submit" value = "<?php echo _('List'); ?>" />
|
||||
<input type = "submit" value = "<?php echo t('List'); ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
@ -144,13 +144,13 @@ require (JIRAFEAU_ROOT . 'lib/template/header.php');
|
||||
<tr>
|
||||
<input type = "hidden" name = "action" value = "search_by_name"/>
|
||||
<td class = "info">
|
||||
<?php echo _('Search files by name'); ?>
|
||||
<?php echo t('Search files by name'); ?>
|
||||
</td>
|
||||
<td>
|
||||
<input type = "text" name = "name" id = "name"/>
|
||||
</td>
|
||||
<td>
|
||||
<input type = "submit" value = "<?php echo _('Search'); ?>" />
|
||||
<input type = "submit" value = "<?php echo t('Search'); ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
@ -158,13 +158,13 @@ require (JIRAFEAU_ROOT . 'lib/template/header.php');
|
||||
<tr>
|
||||
<input type = "hidden" name = "action" value = "search_by_file_hash"/>
|
||||
<td class = "info">
|
||||
<?php echo _('Search files by file hash'); ?>
|
||||
<?php echo t('Search files by file hash'); ?>
|
||||
</td>
|
||||
<td>
|
||||
<input type = "text" name = "hash" id = "hash"/>
|
||||
</td>
|
||||
<td>
|
||||
<input type = "submit" value = "<?php echo _('Search'); ?>" />
|
||||
<input type = "submit" value = "<?php echo t('Search'); ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
@ -172,20 +172,20 @@ require (JIRAFEAU_ROOT . 'lib/template/header.php');
|
||||
<tr>
|
||||
<input type = "hidden" name = "action" value = "search_link"/>
|
||||
<td class = "info">
|
||||
<?php echo _('Search a specific link'); ?>
|
||||
<?php echo t('Search a specific link'); ?>
|
||||
</td>
|
||||
<td>
|
||||
<input type = "text" name = "link" id = "link"/>
|
||||
</td>
|
||||
<td>
|
||||
<input type = "submit" value = "<?php echo _('Search'); ?>" />
|
||||
<input type = "submit" value = "<?php echo t('Search'); ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
<form action = "<?php echo basename(__FILE__); ?>" method = "post">
|
||||
<input type = "hidden" name = "action" value = "logout"/>
|
||||
<input type = "submit" value = "<?php echo _('Logout'); ?>" />
|
||||
<input type = "submit" value = "<?php echo t('Logout'); ?>" />
|
||||
</form>
|
||||
</fieldset></div><?php
|
||||
}
|
||||
@ -198,7 +198,7 @@ if (isset ($_POST['action']))
|
||||
$total = jirafeau_admin_clean ();
|
||||
echo '<div class="message">' . NL;
|
||||
echo '<p>';
|
||||
echo _('Number of cleaned files') . ' : ' . $total;
|
||||
echo t('Number of cleaned files') . ' : ' . $total;
|
||||
echo '</p></div>';
|
||||
}
|
||||
elseif (strcmp ($_POST['action'], 'list') == 0)
|
||||
@ -221,13 +221,13 @@ if (isset ($_POST['action']))
|
||||
{
|
||||
jirafeau_delete ($_POST['link']);
|
||||
echo '<div class="message">' . NL;
|
||||
echo '<p>' . _('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>' . _('Deleted links') . ' : ' . $count . '</p></div>';
|
||||
echo '<p>' . t('Deleted links') . ' : ' . $count . '</p></div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
20
file.php
20
file.php
@ -35,7 +35,7 @@ if (isset ($_GET['h']) && !empty ($_GET['h']))
|
||||
if (!preg_match ('/[0-9a-f]{32}$/', $link_name))
|
||||
{
|
||||
require (JIRAFEAU_ROOT.'lib/template/header.php');
|
||||
echo '<div class="error"><p>' . _('Sorry, the requested file is not found') . '</p></div>';
|
||||
echo '<div class="error"><p>' . t('Sorry, the requested file is not found') . '</p></div>';
|
||||
require (JIRAFEAU_ROOT.'lib/template/footer.php');
|
||||
exit;
|
||||
}
|
||||
@ -44,7 +44,7 @@ if (isset ($_GET['h']) && !empty ($_GET['h']))
|
||||
if (count ($link) == 0)
|
||||
{
|
||||
require (JIRAFEAU_ROOT.'lib/template/header.php');
|
||||
echo '<div class="error"><p>' . _('Sorry, the requested file is not found') .
|
||||
echo '<div class="error"><p>' . t('Sorry, the requested file is not found') .
|
||||
'</p></div>';
|
||||
require (JIRAFEAU_ROOT.'lib/template/footer.php');
|
||||
exit;
|
||||
@ -54,7 +54,7 @@ if (isset ($_GET['h']) && !empty ($_GET['h']))
|
||||
{
|
||||
jirafeau_delete ($link_name);
|
||||
require (JIRAFEAU_ROOT.'lib/template/header.php');
|
||||
echo '<div class="error"><p>'._('File not available.').
|
||||
echo '<div class="error"><p>'.t('File not available.').
|
||||
'</p></div>';
|
||||
require (JIRAFEAU_ROOT.'lib/template/footer.php');
|
||||
exit;
|
||||
@ -64,7 +64,7 @@ if (isset ($_GET['h']) && !empty ($_GET['h']))
|
||||
{
|
||||
jirafeau_delete ($link_name);
|
||||
require (JIRAFEAU_ROOT.'lib/template/header.php');
|
||||
echo '<div class="message"><p>'._('File has been deleted.').
|
||||
echo '<div class="message"><p>'.t('File has been deleted.').
|
||||
'</p></div>';
|
||||
require (JIRAFEAU_ROOT.'lib/template/footer.php');
|
||||
exit;
|
||||
@ -75,8 +75,8 @@ if (isset ($_GET['h']) && !empty ($_GET['h']))
|
||||
jirafeau_delete ($link_name);
|
||||
require (JIRAFEAU_ROOT.'lib/template/header.php');
|
||||
echo '<div class="error"><p>'.
|
||||
_('The time limit of this file has expired.') . ' ' .
|
||||
_('File has been deleted.') .
|
||||
t('The time limit of this file has expired.') . ' ' .
|
||||
t('File has been deleted.') .
|
||||
'</p></div>';
|
||||
require (JIRAFEAU_ROOT.'lib/template/footer.php');
|
||||
exit;
|
||||
@ -92,13 +92,13 @@ if (isset ($_GET['h']) && !empty ($_GET['h']))
|
||||
"<?php echo $_SERVER['REQUEST_URI']; ?>" method =
|
||||
"post"> <input type = "hidden" name = "jirafeau" value =
|
||||
"<?php echo JIRAFEAU_VERSION; ?>" /><fieldset>
|
||||
<legend><?php echo _('Password protection');
|
||||
<legend><?php echo t('Password protection');
|
||||
?></legend> <table> <tr>
|
||||
<td><?php echo _('Give the password of this file') . ' : ';
|
||||
<td><?php echo t('Give the password of this file') . ' : ';
|
||||
?><input type = "password" name =
|
||||
"key" /></td> </tr> <tr> <td><input type =
|
||||
"submit" value =
|
||||
"<?php echo _('Download'); ?>"
|
||||
"<?php echo t('Download'); ?>"
|
||||
/></td> </tr> </table> </fieldset> </form> </div>
|
||||
<?php require (JIRAFEAU_ROOT.'lib/template/footer.php');
|
||||
exit;
|
||||
@ -110,7 +110,7 @@ if (isset ($_GET['h']) && !empty ($_GET['h']))
|
||||
header ("Access denied");
|
||||
|
||||
require (JIRAFEAU_ROOT.'lib/template/header.php');
|
||||
echo '<div class="error"><p>' . _('Access denied') .
|
||||
echo '<div class="error"><p>' . t('Access denied') .
|
||||
'</p></div>';
|
||||
require (JIRAFEAU_ROOT.'lib/template/footer.php');
|
||||
exit;
|
||||
|
40
index.php
40
index.php
@ -71,21 +71,21 @@ require (JIRAFEAU_ROOT . 'lib/template/header.php');
|
||||
|
||||
/* Checking for errors. */
|
||||
if (!is_writable (VAR_FILES))
|
||||
add_error (_('The file directory is not writable!'), VAR_FILES);
|
||||
add_error (t('The file directory is not writable!'), VAR_FILES);
|
||||
|
||||
if (!is_writable (VAR_LINKS))
|
||||
add_error (_('The link directory is not writable!'), VAR_LINKS);
|
||||
add_error (t('The link directory is not writable!'), VAR_LINKS);
|
||||
|
||||
/* Check if the install.php script is still in the directory. */
|
||||
if (file_exists (JIRAFEAU_ROOT . 'install.php'))
|
||||
add_error (_('Installer script still present'),
|
||||
_('Please make sure to delete the installer script ' .
|
||||
add_error (t('Installer script still present'),
|
||||
t('Please make sure to delete the installer script ' .
|
||||
'"install.php" before continuing.'));
|
||||
|
||||
if (!has_error () && !empty ($res))
|
||||
{
|
||||
if ($res['error']['has_error'])
|
||||
add_error (_('An error occurred.'), $res['error']['why']);
|
||||
add_error (t('An error occurred.'), $res['error']['why']);
|
||||
else
|
||||
{
|
||||
$link = $cfg['web_root'];
|
||||
@ -106,20 +106,20 @@ if (!has_error () && !empty ($res))
|
||||
}
|
||||
|
||||
echo '<div class="message">'.NL;
|
||||
echo '<p>' . _('File uploaded! Copy the following URL to get it') .
|
||||
echo '<p>' . t('File uploaded! Copy the following URL to get it') .
|
||||
':<br />' . NL;
|
||||
echo '<a href="'.$link.'">'.$link.'</a>' . NL;
|
||||
|
||||
if ($time != JIRAFEAU_INFINITY)
|
||||
{
|
||||
echo '<br />' . _('This file is valid until the following date') .
|
||||
echo '<br />' . t('This file is valid until the following date') .
|
||||
':<br /><strong>' . strftime ('%c', $time) . '</strong>';
|
||||
}
|
||||
|
||||
echo '</p></div>';
|
||||
|
||||
echo '<div class="message">' . NL;
|
||||
echo '<p>' . _('Keep the following URL to delete it at any moment') . ':<br />' . NL;
|
||||
echo '<p>' . t('Keep the following URL to delete it at any moment') . ':<br />' . NL;
|
||||
echo '<a href="' . $delete_link . '">' . $delete_link . '</a>' . NL;
|
||||
echo '</p></div>';
|
||||
}
|
||||
@ -135,30 +135,30 @@ if (!has_error () && $writable)
|
||||
<?php echo $cfg['web_root']; ?>" method =
|
||||
"post"> <div><input type = "hidden" name = "jirafeau" value = "
|
||||
<?php echo JIRAFEAU_VERSION; ?>" /></div> <fieldset>
|
||||
<legend><?php echo _('Upload a file');
|
||||
<legend><?php echo t('Upload a file');
|
||||
?></legend> <p><input type = "file" name = "file" size =
|
||||
"30" /></p> <p class =
|
||||
"config"><?php printf ('%s: %dMB', _('Maximum file size'),
|
||||
"config"><?php printf ('%s: %dMB', t('Maximum file size'),
|
||||
jirafeau_get_max_upload_size () / (1024 *
|
||||
1024));
|
||||
?></p> <p><input type = "submit" value =
|
||||
"<?php echo _('Send'); ?>" /></p>
|
||||
"<?php echo t('Send'); ?>" /></p>
|
||||
<hr /><div id = "moreoptions"> <p><label><input type =
|
||||
"checkbox" name =
|
||||
"one_time_download" /><?php echo _('One time download');
|
||||
"one_time_download" /><?php echo t('One time download');
|
||||
?></label></p><br/><p><label for = "input_key"
|
||||
><?php echo _('Password') . ':';
|
||||
><?php echo t('Password') . ':';
|
||||
?></label><input type = "text" name = "key" id = "input_key" /></p>
|
||||
<p><label for = "select_time"
|
||||
><?php echo _('Time limit') . ':';
|
||||
><?php echo t('Time limit') . ':';
|
||||
?></label>
|
||||
<select name = "time" id = "select_time">
|
||||
<option value = "none"><?php echo _('None');
|
||||
?></option> <option value = "minute"><?php echo _('One minute');
|
||||
?></option> <option value = "hour"><?php echo _('One hour');
|
||||
?></option> <option value = "day"><?php echo _('One day');
|
||||
?></option> <option value = "week"><?php echo _('One week');
|
||||
?></option> <option value = "month"><?php echo _('One month');
|
||||
<option value = "none"><?php echo t('None');
|
||||
?></option> <option value = "minute"><?php echo t('One minute');
|
||||
?></option> <option value = "hour"><?php echo t('One hour');
|
||||
?></option> <option value = "day"><?php echo t('One day');
|
||||
?></option> <option value = "week"><?php echo t('One week');
|
||||
?></option> <option value = "month"><?php echo t('One month');
|
||||
?></option>
|
||||
</select> </p> </div> </fieldset> </form> </div> <?php
|
||||
}
|
||||
|
74
install.php
74
install.php
@ -39,7 +39,7 @@ jirafeau_export_cfg ($cfg)
|
||||
fwrite ($handle, '<?php' . NL);
|
||||
fwrite ($handle,
|
||||
'/* ' .
|
||||
_ ('This file was generated by the install process. ' .
|
||||
t ('This file was generated by the install process. ' .
|
||||
'You can edit it. Please see config.php to understand the ' .
|
||||
'configuration items.') . ' */' . NL);
|
||||
foreach ($cfg as $key => $item)
|
||||
@ -82,12 +82,12 @@ jirafeau_is_writable ($path)
|
||||
function
|
||||
jirafeau_check_var_dir ($path)
|
||||
{
|
||||
$mkdir_str1 = _('The following directory could not be created') . ':';
|
||||
$mkdir_str2 = _('You should create this directory by hand.');
|
||||
$write_str1 = _('The following directory is not writable') . ':';
|
||||
$write_str2 = _('You should give the write right to the web server on ' .
|
||||
$mkdir_str1 = t('The following directory could not be created') . ':';
|
||||
$mkdir_str2 = t('You should create this directory by hand.');
|
||||
$write_str1 = t('The following directory is not writable') . ':';
|
||||
$write_str2 = t('You should give the write right to the web server on ' .
|
||||
'this directory.');
|
||||
$solution_str = _('Here is a solution') . ':';
|
||||
$solution_str = t('Here is a solution') . ':';
|
||||
|
||||
if (!jirafeau_mkdir ($path) || !jirafeau_is_writable ($path))
|
||||
return array ('has_error' => true,
|
||||
@ -122,7 +122,7 @@ if (!file_exists (JIRAFEAU_CFG))
|
||||
{
|
||||
require (JIRAFEAU_ROOT . 'lib/template/header.php');
|
||||
echo '<div class="error"><p>' .
|
||||
_('The local configuration file could not be created. Create a ' .
|
||||
t('The local configuration file could not be created. Create a ' .
|
||||
'<code>lib/config.local.php</code> file and give the write ' .
|
||||
'right to the web server (preferred solution), or give the ' .
|
||||
'write right to the web server on the <code>lib</code> ' .
|
||||
@ -137,7 +137,7 @@ if (!is_writable (JIRAFEAU_CFG) && !@chmod (JIRAFEAU_CFG, '0666'))
|
||||
{
|
||||
require (JIRAFEAU_ROOT . 'lib/template/header.php');
|
||||
echo '<div class="error"><p>' .
|
||||
_('The local configuration is not writable by the web server. ' .
|
||||
t('The local configuration is not writable by the web server. ' .
|
||||
'Give the write right to the web server on the ' .
|
||||
'<code>lib/config.local.php</code> file.') .
|
||||
'</p></div>';
|
||||
@ -191,20 +191,20 @@ switch ($current)
|
||||
{
|
||||
case 1:
|
||||
default:
|
||||
?><h2><?php printf (_('Installation of Jirafeau') . ' - ' . _('step') .
|
||||
' %d ' . _('out of') . ' %d', 1, 4);
|
||||
?><h2><?php printf (t('Installation of Jirafeau') . ' - ' . t('step') .
|
||||
' %d ' . t('out of') . ' %d', 1, 4);
|
||||
?></h2> <div id = "install"> <form action =
|
||||
"<?php echo basename(__FILE__); ?>" method = "post"> <input type =
|
||||
"hidden" name = "jirafeau" value =
|
||||
"<?php echo JIRAFEAU_VERSION; ?>" /><input type = "hidden" name =
|
||||
"step" value = "1" /><fieldset> <legend><?php echo _('Language');
|
||||
"step" value = "1" /><fieldset> <legend><?php echo t('Language');
|
||||
?></legend> <table> <tr> <td class = "info" colspan =
|
||||
"2"><?php echo
|
||||
_
|
||||
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 _('Choose the default language') . ':';
|
||||
><?php echo t('Choose the default language') . ':';
|
||||
?></label></td>
|
||||
<td class = "field">
|
||||
<select name = "lang" id = "select_lang">
|
||||
@ -220,27 +220,27 @@ default:
|
||||
<tr class = "nav">
|
||||
<td></td>
|
||||
<td class = "nav next"><input type = "submit" name = "next" value =
|
||||
"<?php echo _('Next step'); ?>" /></td> </tr> </table>
|
||||
"<?php echo t('Next step'); ?>" /></td> </tr> </table>
|
||||
</fieldset> </form> </div> <?php
|
||||
break;
|
||||
|
||||
case 2:
|
||||
?><h2><?php printf (_('Installation of Jirafeau') . ' - ' . _('step') .
|
||||
' %d ' . _('out of') . ' %d', 2, 4);
|
||||
?><h2><?php printf (t('Installation of Jirafeau') . ' - ' . t('step') .
|
||||
' %d ' . t('out of') . ' %d', 2, 4);
|
||||
?></h2> <div id = "install"> <form action =
|
||||
"<?php echo basename(__FILE__); ?>" method = "post"> <input type =
|
||||
"hidden" name = "jirafeau" value =
|
||||
"<?php echo JIRAFEAU_VERSION; ?>" /><input type = "hidden" name =
|
||||
"step" value = "2" /><fieldset> <legend><?php
|
||||
echo _('Administration password');
|
||||
echo t('Administration password');
|
||||
?></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 intercace or let it be empty ' .
|
||||
'to disable the interface.');
|
||||
?></td> </tr> <tr> <td class = "label"><label for = "select_password"
|
||||
><?php echo _('Administration password') . ':';
|
||||
><?php echo t('Administration password') . ':';
|
||||
?></label></td>
|
||||
<td class = "field"><input type = "password" name = "admin_password"
|
||||
id = "admin_password" size = "40" /></td>
|
||||
@ -250,29 +250,29 @@ case 2:
|
||||
<td class = "nav next">
|
||||
<input type = "submit"
|
||||
class = "navleft" name = "previous" value = "<?php
|
||||
echo _('Previous step'); ?>" />
|
||||
echo t('Previous step'); ?>" />
|
||||
<input type = "submit" name = "next" value =
|
||||
"<?php echo _('Next step'); ?>" /></td> </tr> </table>
|
||||
"<?php echo t('Next step'); ?>" /></td> </tr> </table>
|
||||
</fieldset> </form> </div> <?php
|
||||
break;
|
||||
|
||||
case 3:
|
||||
?><h2><?php printf (_('Installation of Jirafeau') . ' - ' . _('step') .
|
||||
' %d ' . _('out of') . ' %d', 3, 4);
|
||||
?><h2><?php printf (t('Installation of Jirafeau') . ' - ' . t('step') .
|
||||
' %d ' . t('out of') . ' %d', 3, 4);
|
||||
?></h2> <div id = "install"> <form action =
|
||||
"<?php echo basename(__FILE__); ?>" method = "post"> <input type =
|
||||
"hidden" name = "jirafeau" value =
|
||||
"<?php echo JIRAFEAU_VERSION; ?>" /><input type = "hidden" name =
|
||||
"step" value =
|
||||
"3" /><fieldset> <legend><?php echo _('Information');
|
||||
"3" /><fieldset> <legend><?php echo t('Information');
|
||||
?></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 ending slash!');
|
||||
?></td> </tr> <tr> <td class = "label"><label for = "input_web_root"
|
||||
><?php echo _('Base address') . ':';
|
||||
><?php echo t('Base address') . ':';
|
||||
?></label></td>
|
||||
<td class = "field"><input type = "text" name = "web_root"
|
||||
id = "input_web_root" value = "<?php
|
||||
@ -281,12 +281,12 @@ case 3:
|
||||
'', $_SERVER['REQUEST_URI']) : $cfg['web_root']);
|
||||
?>" size = "40" /></td>
|
||||
</tr> <tr> <td class = "info" colspan = "2"><?php
|
||||
echo _('The data directory is where your files and information about' .
|
||||
echo t('The data directory is where your files and information about' .
|
||||
' your files will be stored. You should put it outside your web ' .
|
||||
'site, or at least restrict the access of this directory. Do not ' .
|
||||
'forget the ending slash!');
|
||||
?></td> </tr> <tr> <td class = "label"><label for = "input_var_root"
|
||||
><?php echo _('Data directory') . ':';
|
||||
><?php echo t('Data directory') . ':';
|
||||
?></label></td>
|
||||
<td class = "field"><input type = "text" name = "var_root"
|
||||
id = "input_var_root" value = "<?php
|
||||
@ -305,31 +305,31 @@ case 3:
|
||||
?>" size = "40" /></td>
|
||||
</tr> <tr> <td colspan = "2"><input type = "submit"
|
||||
class = "navleft" name = "previous" value = "<?php
|
||||
echo _('Previous step'); ?>" />
|
||||
echo t('Previous step'); ?>" />
|
||||
<input type = "submit" class = "navright" name = "next" value = "
|
||||
<?php echo _('Next step'); ?>" />
|
||||
<?php echo t('Next step'); ?>" />
|
||||
</td> </tr> </table> </fieldset>
|
||||
</form> </div> <?php
|
||||
break;
|
||||
|
||||
case 4:
|
||||
?><h2><?php printf (_('Installation of Jirafeau') . ' - ' . _('step') .
|
||||
' %d ' . _('out of') . ' %d', 4, 4);
|
||||
?><h2><?php printf (t('Installation of Jirafeau') . ' - ' . t('step') .
|
||||
' %d ' . t('out of') . ' %d', 4, 4);
|
||||
?></h2> <div id = "install"> <form action =
|
||||
"<?php echo basename(__FILE__); ?>" method = "post"> <input type =
|
||||
"hidden" name = "jirafeau" value =
|
||||
"<?php echo JIRAFEAU_VERSION; ?>" /><input type = "hidden" name =
|
||||
"step" value =
|
||||
"4" /><fieldset> <legend><?php echo _('Finalisation');
|
||||
"4" /><fieldset> <legend><?php echo t('Finalisation');
|
||||
?></legend> <table> <tr> <td class = "info" colspan =
|
||||
"2"><?php echo
|
||||
_ ('Jirafeau is setting the website according to the configuration ' .
|
||||
t ('Jirafeau is setting the website according to the configuration ' .
|
||||
'you provided.');
|
||||
?></td> </tr> <tr> <td class = "nav previous"><input type =
|
||||
"submit" name = "previous" value =
|
||||
"
|
||||
<?php
|
||||
echo _('Previous step');
|
||||
echo t('Previous step');
|
||||
?>" /></td> <td></td> </tr>
|
||||
</table> </fieldset> </form> </div>
|
||||
<?php
|
||||
@ -342,13 +342,13 @@ case 4:
|
||||
"<?php echo JIRAFEAU_VERSION; ?>" /><input type = "hidden" name =
|
||||
"step" value = "3" /><input type = "submit" name =
|
||||
"retry" value =
|
||||
"<?php echo _('Retry this step'); ?>" /></form>
|
||||
"<?php echo t('Retry this step'); ?>" /></form>
|
||||
<?php echo '</p></div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<div class="message"><p>' .
|
||||
_('Jirafeau is now fully operational') . ':' .
|
||||
t('Jirafeau is now fully operational') . ':' .
|
||||
'<br /><a href="' . $cfg['web_root'] . '">' .
|
||||
$cfg['web_root'].'</a></p></div>';
|
||||
}
|
||||
|
@ -67,26 +67,26 @@ jirafeau_upload_errstr ($code)
|
||||
{
|
||||
case UPLOAD_ERR_INI_SIZE:
|
||||
case UPLOAD_ERR_FORM_SIZE:
|
||||
return _('Your file exceeds the maximum authorized file size. ');
|
||||
return t('Your file exceeds the maximum authorized file size. ');
|
||||
break;
|
||||
|
||||
case UPLOAD_ERR_PARTIAL:
|
||||
case UPLOAD_ERR_NO_FILE:
|
||||
return
|
||||
_
|
||||
t
|
||||
('Your file was not uploaded correctly. You may succeed in retrying. ');
|
||||
break;
|
||||
|
||||
case UPLOAD_ERR_NO_TMP_DIR:
|
||||
case UPLOAD_ERR_CANT_WRITE:
|
||||
case UPLOAD_ERR_EXTENSION:
|
||||
return _('Internal error. You may not succeed in retrying. ');
|
||||
return t('Internal error. You may not succeed in retrying. ');
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return _('Unknown error. ');
|
||||
return t('Unknown error. ');
|
||||
}
|
||||
|
||||
/** Remove link and it's file
|
||||
@ -208,7 +208,7 @@ jirafeau_upload ($file, $one_time_download, $key, $time, $cfg, $ip)
|
||||
return (array(
|
||||
'error' =>
|
||||
array ('has_error' => true,
|
||||
'why' => _('Internal error during file creation. ')),
|
||||
'why' => t('Internal error during file creation. ')),
|
||||
'link' =>'',
|
||||
'delete_link' => ''));
|
||||
}
|
||||
@ -262,7 +262,7 @@ jirafeau_upload ($file, $one_time_download, $key, $time, $cfg, $ip)
|
||||
return (array(
|
||||
'error' =>
|
||||
array ('has_error' => true,
|
||||
'why' => _('Internal error during file creation. ')),
|
||||
'why' => t('Internal error during file creation. ')),
|
||||
'link' =>'',
|
||||
'delete_link' => ''));
|
||||
}
|
||||
@ -388,18 +388,18 @@ jirafeau_admin_list ($name, $file_hash, $link_hash)
|
||||
if (!empty ($link_hash))
|
||||
echo $link_hash . ' ';
|
||||
if (empty ($name) && empty ($file_hash) && empty ($link_hash))
|
||||
echo _('List all files');
|
||||
echo t('List all files');
|
||||
echo '</legend>';
|
||||
echo '<table>';
|
||||
echo '<tr>';
|
||||
echo '<td>' . _('Filename') . '</td>';
|
||||
echo '<td>' . _('Type') . '</td>';
|
||||
echo '<td>' . _('Size') . '</td>';
|
||||
echo '<td>' . _('Expire') . '</td>';
|
||||
echo '<td>' . _('Onetime') . '</td>';
|
||||
echo '<td>' . _('Upload date') . '</td>';
|
||||
echo '<td>' . _('Origin') . '</td>';
|
||||
echo '<td>' . _('Action') . '</td>';
|
||||
echo '<td>' . t('Filename') . '</td>';
|
||||
echo '<td>' . t('Type') . '</td>';
|
||||
echo '<td>' . t('Size') . '</td>';
|
||||
echo '<td>' . t('Expire') . '</td>';
|
||||
echo '<td>' . t('Onetime') . '</td>';
|
||||
echo '<td>' . t('Upload date') . '</td>';
|
||||
echo '<td>' . t('Origin') . '</td>';
|
||||
echo '<td>' . t('Action') . '</td>';
|
||||
echo '</tr>';
|
||||
foreach ($links_dir as $link)
|
||||
{
|
||||
@ -431,12 +431,12 @@ jirafeau_admin_list ($name, $file_hash, $link_hash)
|
||||
'<form action = "admin.php" method = "post">' .
|
||||
'<input type = "hidden" name = "action" value = "delete_link"/>' .
|
||||
'<input type = "hidden" name = "link" value = "' . $link . '"/>' .
|
||||
'<input type = "submit" value = "' . _('Del link') . '" />' .
|
||||
'<input type = "submit" value = "' . t('Del link') . '" />' .
|
||||
'</form>' .
|
||||
'<form action = "admin.php" method = "post">' .
|
||||
'<input type = "hidden" name = "action" value = "delete_file"/>' .
|
||||
'<input type = "hidden" name = "md5" value = "' . $l['md5'] . '"/>' .
|
||||
'<input type = "submit" value = "' . _('Del file and links') . '" />' .
|
||||
'<input type = "submit" value = "' . t('Del file and links') . '" />' .
|
||||
'</form>' .
|
||||
'</td>';
|
||||
echo '</tr>';
|
||||
|
@ -23,7 +23,7 @@
|
||||
'fr' => 'Français');
|
||||
|
||||
/* Translation */
|
||||
function _ ($text)
|
||||
function t ($text)
|
||||
{
|
||||
$cfg = $GLOBALS['cfg'];
|
||||
$languages_list = $GLOBALS['languages_list'];
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div id="copyright">
|
||||
<p><a href="https://gitorious.org/jirafeau/"><?php echo _('powered by Jirafeau'); ?></a><br />
|
||||
<p><a href="https://gitorious.org/jirafeau/"><?php echo t('powered by Jirafeau'); ?></a><br />
|
||||
<a href="http://www.gnu.org/licenses/agpl.html">copyright</a> © 2008-2012 <a href="https://gitorious.org/jirafeau/">
|
||||
<?php echo _('Jirafeau Project'); ?></a></p>
|
||||
<?php echo t('Jirafeau Project'); ?></a></p>
|
||||
<p><a href="tos.php">Terms of Service</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -12,11 +12,11 @@ header('Content-Type: ' . $content_type);
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title><?php echo _('Jirafeau, your web file repository'); ?></title>
|
||||
<title><?php echo t('Jirafeau, your web file repository'); ?></title>
|
||||
<meta http-equiv="Content-Type" content="<?php echo $content_type; ?>" />
|
||||
<link href="<?php echo $cfg['web_root'] . 'media/' . $cfg['style'] . '/style.css.php'; ?>" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="content">
|
||||
<h1><a href="<?php echo $cfg['web_root']; ?>"><?php echo _('Jirafeau, your web file repository'); ?></a></h1>
|
||||
<h1><a href="<?php echo $cfg['web_root']; ?>"><?php echo t('Jirafeau, your web file repository'); ?></a></h1>
|
||||
|
Loading…
x
Reference in New Issue
Block a user