Add translation system and improve URL routing system
This commit is contained in:
parent
ec452a1ff4
commit
e936064b78
26 changed files with 3849 additions and 334 deletions
|
@ -2,6 +2,8 @@
|
||||||
"require": {
|
"require": {
|
||||||
"envms/fluentpdo": "^1.1",
|
"envms/fluentpdo": "^1.1",
|
||||||
"pear/console_table": "^1.3",
|
"pear/console_table": "^1.3",
|
||||||
"brenard/php-unidecode": "dev-master"
|
"brenard/php-unidecode": "dev-master",
|
||||||
|
"smarty-gettext/smarty-gettext": "^1.6",
|
||||||
|
"smarty-gettext/tsmarty2c": "^0.2.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
1148
composer.lock
generated
1148
composer.lock
generated
File diff suppressed because it is too large
Load diff
168
includes/cli.php
168
includes/cli.php
|
@ -42,21 +42,28 @@ function usage($error=false) {
|
||||||
|
|
||||||
if ($error)
|
if ($error)
|
||||||
echo "$error\n\n";
|
echo "$error\n\n";
|
||||||
echo "Usage : ".$argv[0]." [-h] [-qd] command\n";
|
printf(_("Usage: %s [-h] [-qd] command\n"), $argv[0]);
|
||||||
echo " -h Show this message\n";
|
echo _(" -h Show this message\n");
|
||||||
echo " -q / -d Quiet/Debug mode\n";
|
echo _(" -q / -d Quiet/Debug mode\n");
|
||||||
echo " command Command to run\n";
|
echo _(" command Command to run\n");
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "Available commands :\n";
|
echo _("Available commands:\n");
|
||||||
|
|
||||||
foreach ($cli_commands as $command => $info) {
|
foreach ($cli_commands as $command => $info) {
|
||||||
if ($cli_command && $command != $cli_command)
|
if ($cli_command && $command != $cli_command)
|
||||||
continue;
|
continue;
|
||||||
echo " $command : ".$info['short_desc']."\n";
|
echo " $command: "._($info['short_desc'])."\n";
|
||||||
echo " ".$argv[0]." $command ".($info['usage_args']?$info['usage_args']:'')."\n";
|
echo " ".$argv[0]." $command ".($info['usage_args']?_($info['usage_args']):'')."\n";
|
||||||
if ($info['long_desc']) {
|
if ($info['long_desc']) {
|
||||||
if (is_array($info['long_desc']))
|
if (is_array($info['long_desc'])) {
|
||||||
$info['long_desc'] = implode("\n", $info['long_desc']);
|
$lines = array();
|
||||||
|
foreach ($info['long_desc'] as $line)
|
||||||
|
$lines[] = _($line);
|
||||||
|
$info['long_desc'] = implode("\n", $lines);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$info['long_desc'] = _($info['long_desc']);
|
||||||
|
|
||||||
echo "\n ".str_replace("\n", "\n ", wordwrap($info['long_desc']))."\n";
|
echo "\n ".str_replace("\n", "\n ", wordwrap($info['long_desc']))."\n";
|
||||||
}
|
}
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
@ -75,7 +82,7 @@ function handle_cli_args() {
|
||||||
if (!$cli_command)
|
if (!$cli_command)
|
||||||
$cli_command = $argv[$i];
|
$cli_command = $argv[$i];
|
||||||
else
|
else
|
||||||
usage("Only one command could be executed !");
|
usage(_("Only one command could be executed !"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
switch($argv[$i]) {
|
switch($argv[$i]) {
|
||||||
|
@ -95,7 +102,9 @@ function handle_cli_args() {
|
||||||
if ($cli_command)
|
if ($cli_command)
|
||||||
$command_args[] = $argv[$i];
|
$command_args[] = $argv[$i];
|
||||||
else
|
else
|
||||||
usage("Invalid parameter \"".$argv[$i]."\".\nNote: Command's parameter/argument must be place after the command.");
|
usage(
|
||||||
|
sprintf(_("Invalid parameter \"%s\".\nNote: Command's parameter/argument must be place after the command."), $argv[$i])
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -111,18 +120,18 @@ function handle_cli_args() {
|
||||||
exit($result?0:1);
|
exit($result?0:1);
|
||||||
}
|
}
|
||||||
catch(Exception $e) {
|
catch(Exception $e) {
|
||||||
log_exception("An exception occured running command $cli_command");
|
log_exception(sprintf(_("An exception occured running command %s"), $cli_command));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function print_item_info($item) {
|
function print_item_info($item) {
|
||||||
echo "Item #".$item['id']." :\n";
|
printf(_("Item #%s:\n"), $item['id']);
|
||||||
echo "\tID : ".$item['id']."\n";
|
printf("\t"._("ID: %s")."\n", $item['id']);
|
||||||
echo "\tName : '".$item['name']."'\n";
|
printf("\t"._("Name: '%s'")."\n", $item['name']);
|
||||||
echo "\tDate : ".format_time($item['date'])."\n";
|
printf("\t"._("Date: %s")."\n", format_time($item['date']));
|
||||||
echo "\tDescription : ".($item['description']?"'".$item['description']."'":"Not set")."\n";
|
printf("\t"._("Description: %s")."\n", ($item['description']?"'".$item['description']."'":_("Not set")));
|
||||||
echo "\tStatus : '".$item['status']."'\n";
|
printf("\t"._("Status: %s")."\n", $item['status']);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,7 +184,7 @@ function cli_list($command_args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($items['count'] == 0){
|
if ($items['count'] == 0){
|
||||||
echo "No item.\n";
|
echo _("No item.\n");
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,32 +210,32 @@ function cli_list($command_args) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
echo $tbl->getTable();
|
echo $tbl->getTable();
|
||||||
echo "\n".$items['count']." item(s)\n";
|
echo "\n".sprintf(_("%d item(s)"), $items['count'])."\n";
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
add_cli_command(
|
add_cli_command(
|
||||||
'list',
|
'list',
|
||||||
'cli_list',
|
'cli_list',
|
||||||
"List/search items",
|
___("List/search items"),
|
||||||
"[patterns]",
|
___("[patterns]"),
|
||||||
array(
|
array(
|
||||||
"-o|--orderby Ordering list criterion. Possible values :",
|
___("-o|--orderby Ordering list criterion. Possible values:"),
|
||||||
" - ".implode("\n - ", $orderbys),
|
" - ".implode("\n - ", $orderbys),
|
||||||
"-r|--reverse Reverse order",
|
___("-r|--reverse Reverse order"),
|
||||||
"-s|--status Filter on status. Possible values :",
|
___("-s|--status Filter on status. Possible values:"),
|
||||||
" - ".implode("\n - ", array_keys($status_list)),
|
" - ".implode("\n - ", array_keys($status_list)),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
function cli_show($command_args) {
|
function cli_show($command_args) {
|
||||||
if (count($command_args) != 1 || !check_id($command_args[0]))
|
if (count($command_args) != 1 || !check_id($command_args[0]))
|
||||||
usage('You must provide a valid ID.');
|
usage(_('You must provide a valid ID.'));
|
||||||
|
|
||||||
$item_id = $command_args[0];
|
$item_id = $command_args[0];
|
||||||
$item = get_item($item_id);
|
$item = get_item($item_id);
|
||||||
|
|
||||||
if (!$item)
|
if (!$item)
|
||||||
logging('FATAL', "Item #$item_id not found.");
|
logging('FATAL', sprintf(_("Item #%s not found."), $item_id));
|
||||||
|
|
||||||
print_item_info($item);
|
print_item_info($item);
|
||||||
return True;
|
return True;
|
||||||
|
@ -234,46 +243,46 @@ function cli_show($command_args) {
|
||||||
add_cli_command(
|
add_cli_command(
|
||||||
'show',
|
'show',
|
||||||
'cli_show',
|
'cli_show',
|
||||||
"Show item",
|
___("Show item"),
|
||||||
"[ID]"
|
___("[ID]")
|
||||||
);
|
);
|
||||||
|
|
||||||
function cli_delete($command_args) {
|
function cli_delete($command_args) {
|
||||||
if (count($command_args) != 1)
|
if (count($command_args) != 1)
|
||||||
usage('You must provide item ID.');
|
usage(_('You must provide item ID.'));
|
||||||
|
|
||||||
// Check URI
|
// Check URI
|
||||||
if (!check_id($command_args[0]))
|
if (!check_id($command_args[0]))
|
||||||
logging('FATAL', "Invalid item ID");
|
logging('FATAL', _("Invalid item ID"));
|
||||||
|
|
||||||
// Check exist
|
// Check exist
|
||||||
$item_id = $command_args[0];
|
$item_id = $command_args[0];
|
||||||
$item = get_item($item_id);
|
$item = get_item($item_id);
|
||||||
if (!$item)
|
if (!$item)
|
||||||
logging('FATAL', "Item #$item_id not found.");
|
logging('FATAL', sprintf(_("Item #%s not found."), $item_id));
|
||||||
|
|
||||||
print_item_info($item);
|
print_item_info($item);
|
||||||
|
|
||||||
// Sure ?
|
// Sure ?
|
||||||
echo "Are you sure you want to delete this item ? Type 'yes' to continue: ";
|
echo _("Are you sure you want to delete this item? Type 'yes' to continue: ");
|
||||||
$handle = fopen ("php://stdin","r");
|
$handle = fopen ("php://stdin","r");
|
||||||
$line = fgets($handle);
|
$line = fgets($handle);
|
||||||
if(trim($line) != 'yes'){
|
if(trim($line) != 'yes'){
|
||||||
logging('WARNING', "User cancel");
|
logging('WARNING', _("User cancel"));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
if (!delete_item($item['id']))
|
if (!delete_item($item['id']))
|
||||||
logging('FATAL', "An error occured deleting item #$item_id.");
|
logging('FATAL', sprintf(_("An error occured deleting item #%d."), $item_id));
|
||||||
|
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
add_cli_command(
|
add_cli_command(
|
||||||
'delete',
|
'delete',
|
||||||
'cli_delete',
|
'cli_delete',
|
||||||
"Delete item",
|
___("Delete item"),
|
||||||
"[item ID]"
|
___("[item ID]")
|
||||||
);
|
);
|
||||||
|
|
||||||
function cli_export($command_args) {
|
function cli_export($command_args) {
|
||||||
|
@ -285,8 +294,8 @@ function cli_export($command_args) {
|
||||||
add_cli_command(
|
add_cli_command(
|
||||||
'export',
|
'export',
|
||||||
'cli_export',
|
'cli_export',
|
||||||
"Export items (as CSV)",
|
___("Export items (as CSV)"),
|
||||||
"[output file path]"
|
___("[output file path]")
|
||||||
);
|
);
|
||||||
|
|
||||||
function cli_restore($command_args) {
|
function cli_restore($command_args) {
|
||||||
|
@ -298,8 +307,8 @@ function cli_restore($command_args) {
|
||||||
add_cli_command(
|
add_cli_command(
|
||||||
'restore',
|
'restore',
|
||||||
'cli_restore',
|
'cli_restore',
|
||||||
"Restore items (from CSV)",
|
___("Restore items (from CSV)"),
|
||||||
"[input file path]"
|
___("[input file path]")
|
||||||
);
|
);
|
||||||
|
|
||||||
function cli_cron($command_args) {
|
function cli_cron($command_args) {
|
||||||
|
@ -327,8 +336,8 @@ function cli_cron($command_args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_int($item_max_age) || $item_max_age <= 0)
|
if (!is_int($item_max_age) || $item_max_age <= 0)
|
||||||
logging('FATAL', 'Invalid $item_max_age value set in configuration : it\'s must be a positive integer.');
|
logging('FATAL', 'Invalid $item_max_age value set in configuration: it\'s must be a positive integer.');
|
||||||
logging('DEBUG', "cli_cron() : item max age = $item_max_age day(s)");
|
logging('DEBUG', "cli_cron(): item max age = $item_max_age day(s)");
|
||||||
|
|
||||||
$limit = time() - ($item_max_age * 86400);
|
$limit = time() - ($item_max_age * 86400);
|
||||||
logging('DEBUG', "Handle items expiration with creation date limit ".format_time($limit).".");
|
logging('DEBUG', "Handle items expiration with creation date limit ".format_time($limit).".");
|
||||||
|
@ -338,19 +347,19 @@ function cli_cron($command_args) {
|
||||||
foreach($items['items'] as $item) {
|
foreach($items['items'] as $item) {
|
||||||
if ($item['date'] < $limit) {
|
if ($item['date'] < $limit) {
|
||||||
if ($just_try) {
|
if ($just_try) {
|
||||||
logging('DEBUG', 'Just-try mode : do not really delete item #'.$item['id'].' ('.$item['name'].', creation date : '.format_time($item['date']).')');
|
logging('DEBUG', 'Just-try mode: do not really delete item #'.$item['id'].' ('.$item['name'].', creation date: '.format_time($item['date']).')');
|
||||||
}
|
}
|
||||||
else if (delete_item($item['id'])) {
|
else if (delete_item($item['id'])) {
|
||||||
logging('INFO', 'item #'.$item['id'].' ('.$item['name'].') deleted (creation date : '.format_time($item['date']).')');
|
logging('INFO', 'item #'.$item['id'].' ('.$item['name'].') deleted (creation date: '.format_time($item['date']).')');
|
||||||
remove_item_attachments($item['id']);
|
remove_item_attachments($item['id']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logging('ERROR', 'Fail to delete item "'.$item['id'].'" ('.$item['name'].', creation date : '.format_time($item['date']).')');
|
logging('ERROR', 'Fail to delete item "'.$item['id'].'" ('.$item['name'].', creation date: '.format_time($item['date']).')');
|
||||||
$error = true;
|
$error = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logging('DEBUG', 'item "'.$item['id'].'" ('.$item['name'].') still valid (creation date : '.format_time($item['date']).')');
|
logging('DEBUG', 'item "'.$item['id'].'" ('.$item['name'].') still valid (creation date: '.format_time($item['date']).')');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exit($error?1:0);
|
exit($error?1:0);
|
||||||
|
@ -358,10 +367,69 @@ function cli_cron($command_args) {
|
||||||
add_cli_command(
|
add_cli_command(
|
||||||
'cron',
|
'cron',
|
||||||
'cli_cron',
|
'cli_cron',
|
||||||
"Cron to handle items expiration",
|
___("Cron to handle item expiration"),
|
||||||
false,
|
false,
|
||||||
array (
|
array (
|
||||||
"-j/--just-try Just-try mode : do not really removed expired item(s)",
|
___("-j/--just-try Just-try mode : do not really removed expired item(s)"),
|
||||||
"-m/--max-day item expiration limit (in day, default = ".(isset($item_max_age)?$item_max_age:183).")"
|
___("-m/--max-age Item expiration limit (in days, optional)"),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
function cli_extract_messages($command_args) {
|
||||||
|
global $root_dir_path, $root_lang_dir, $smarty_templates_dir;
|
||||||
|
|
||||||
|
// List PHP files to parse
|
||||||
|
$php_files = run_external_command(
|
||||||
|
array('find', escapeshellarg($root_dir_path), '-name', "'*.php'"),
|
||||||
|
null, // no STDIN data
|
||||||
|
false // do not escape command args (already done)
|
||||||
|
);
|
||||||
|
if (!is_array($php_files) || $php_files[0] != 0) {
|
||||||
|
logging('FATAL', _("Fail to list PHP files."));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Extract messages from PHP files using xgettext
|
||||||
|
$result = run_external_command(
|
||||||
|
array(
|
||||||
|
"xgettext",
|
||||||
|
"--from-code utf-8",
|
||||||
|
"--language=PHP",
|
||||||
|
"-o", "$root_lang_dir/php-messages.pot", // Output
|
||||||
|
"--omit-header", // No POT header
|
||||||
|
"--keyword=___", // Handle custom ___() translation function
|
||||||
|
"--files=-" // Read files to parse from STDIN
|
||||||
|
),
|
||||||
|
$php_files[1] // Pass PHP files list via STDIN
|
||||||
|
);
|
||||||
|
if (!is_array($result) || $result[0] != 0)
|
||||||
|
logging('FATAL', _("Fail to extract messages from PHP files using xgettext."));
|
||||||
|
|
||||||
|
// Extract messages from templates files using tsmarty2c.php
|
||||||
|
$result = run_external_command(
|
||||||
|
array (
|
||||||
|
"$root_dir_path/vendor/bin/tsmarty2c.php",
|
||||||
|
"-o", "$root_lang_dir/templates-messages.pot",
|
||||||
|
$smarty_templates_dir,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
if (!is_array($result) || $result[0] != 0)
|
||||||
|
logging('FATAL', _("Fail to extract messages from template files using tsmarty2c.php script."));
|
||||||
|
|
||||||
|
// Merge previous results in ldapsaisie.pot file using msgcat
|
||||||
|
$result = run_external_command(array(
|
||||||
|
'msgcat',
|
||||||
|
"$root_lang_dir/php-messages.pot",
|
||||||
|
"$root_lang_dir/templates-messages.pot",
|
||||||
|
"-o", "$root_lang_dir/messages.pot",
|
||||||
|
));
|
||||||
|
if (!is_array($result) || $result[0] != 0)
|
||||||
|
logging('FATAL', _("Fail to merge messages using msgcat."));
|
||||||
|
}
|
||||||
|
add_cli_command(
|
||||||
|
'extract_messages',
|
||||||
|
'cli_extract_messages',
|
||||||
|
___("Extract messages that need to be translated"),
|
||||||
|
null,
|
||||||
|
___("This command could be used to generate/update lang/messages.pot file.")
|
||||||
|
);
|
||||||
|
|
|
@ -43,6 +43,9 @@ $smarty_path = 'smarty3/Smarty.class.php';
|
||||||
$smarty_templates_dir = "$root_dir_path/templates";
|
$smarty_templates_dir = "$root_dir_path/templates";
|
||||||
$smarty_templates_c_dir = "$tmp_root_dir/templates_c";
|
$smarty_templates_c_dir = "$tmp_root_dir/templates_c";
|
||||||
|
|
||||||
|
// Default locale (see lang directory for available languages list)
|
||||||
|
$default_locale = 'en_US.UTF8';
|
||||||
|
|
||||||
// Session
|
// Session
|
||||||
$session_timeout = 1800; // Session timeout dur to inactivity (in seconds)
|
$session_timeout = 1800; // Session timeout dur to inactivity (in seconds)
|
||||||
$session_max_duration = 43200; // Session max duration (in seconds, default : 12h)
|
$session_max_duration = 43200; // Session max duration (in seconds, default : 12h)
|
||||||
|
|
|
@ -20,7 +20,11 @@ set_include_path($root_dir_path.'/includes' . PATH_SEPARATOR . get_include_path(
|
||||||
// Load composer autoload.php
|
// Load composer autoload.php
|
||||||
require("$root_dir_path/vendor/autoload.php");
|
require("$root_dir_path/vendor/autoload.php");
|
||||||
|
|
||||||
|
// API mode
|
||||||
|
$api_mode = false;
|
||||||
|
|
||||||
// Load configuration
|
// Load configuration
|
||||||
|
require_once('translation.php');
|
||||||
require_once('config.inc.php');
|
require_once('config.inc.php');
|
||||||
|
|
||||||
// Check $public_root_url end
|
// Check $public_root_url end
|
||||||
|
@ -37,10 +41,10 @@ require_once('session.php');
|
||||||
|
|
||||||
// Nomenclatures
|
// Nomenclatures
|
||||||
$status_list = array (
|
$status_list = array (
|
||||||
'pending' => 'En attente',
|
'pending' => ___('Pending'),
|
||||||
'validated' => 'Validé',
|
'validated' => ___('Validated'),
|
||||||
'refused' => 'Refusé',
|
'refused' => ___('Refused'),
|
||||||
'archived' => 'Archivé',
|
'archived' => ___('Archived'),
|
||||||
);
|
);
|
||||||
|
|
||||||
require_once('hooks.php');
|
require_once('hooks.php');
|
||||||
|
@ -49,3 +53,8 @@ require_once('smarty.php');
|
||||||
require_once('url.php');
|
require_once('url.php');
|
||||||
require_once('url-helpers.php');
|
require_once('url-helpers.php');
|
||||||
require_once('db.php');
|
require_once('db.php');
|
||||||
|
|
||||||
|
// Initialize translation
|
||||||
|
init_translation();
|
||||||
|
foreach($status_list as $key => $value)
|
||||||
|
$status_list[$key] = _($value);
|
||||||
|
|
|
@ -28,7 +28,7 @@ try {
|
||||||
}
|
}
|
||||||
catch(Exception $e) {
|
catch(Exception $e) {
|
||||||
logging('ERROR',"Fail to connect to DB (DSN : '$db_dsn') : ".$e->getMessage());
|
logging('ERROR',"Fail to connect to DB (DSN : '$db_dsn') : ".$e->getMessage());
|
||||||
logging("FATAL", "Impossible de se connecter à la base de données");
|
logging("FATAL", _('Unable to connect to the database.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -293,3 +293,54 @@ function delete_directory($dir, $recursive=true) {
|
||||||
}
|
}
|
||||||
return rmdir($dir);
|
return rmdir($dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Run external command helper
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Run external command
|
||||||
|
*
|
||||||
|
* @param[in] $command string|array The command. It's could be an array of the command with its arguments.
|
||||||
|
* @param[in] $data_stdin string|null The command arguments (optional, default: null)
|
||||||
|
* @param[in] $escape_command_args boolean If true, the command will be escaped (optional, default: true)
|
||||||
|
*
|
||||||
|
* @retval false|array An array of return code, stdout and stderr result or False in case of fatal error
|
||||||
|
**/
|
||||||
|
function run_external_command($command, $data_stdin=null, $escape_command_args=true) {
|
||||||
|
if (array($command))
|
||||||
|
$command = implode(' ', $command);
|
||||||
|
if ($escape_command_args)
|
||||||
|
$command = escapeshellcmd($command);
|
||||||
|
logging('DEBUG', "Run external command: '$command'");
|
||||||
|
$descriptorspec = array(
|
||||||
|
0 => array("pipe", "r"), // stdin
|
||||||
|
1 => array("pipe", "w"), // stdout
|
||||||
|
2 => array("pipe", "w"), // stderr
|
||||||
|
);
|
||||||
|
$process = proc_open($command, $descriptorspec, $pipes);
|
||||||
|
|
||||||
|
if (!is_resource($process)) {
|
||||||
|
logging('ERROR', "Fail to run external command: '$command'");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!is_null($data_stdin)) {
|
||||||
|
fwrite($pipes[0], $data_stdin);
|
||||||
|
}
|
||||||
|
fclose($pipes[0]);
|
||||||
|
|
||||||
|
$stdout = stream_get_contents($pipes[1]);
|
||||||
|
fclose($pipes[1]);
|
||||||
|
|
||||||
|
$stderr = stream_get_contents($pipes[2]);
|
||||||
|
fclose($pipes[2]);
|
||||||
|
|
||||||
|
$return_value = proc_close($process);
|
||||||
|
|
||||||
|
if (!empty($stderr) || $return_value != 0)
|
||||||
|
logging('ERROR', "Externan command error:\nCommand : $command\nStdout :\n$stdout\n\n - Stderr :\n$stderr");
|
||||||
|
else
|
||||||
|
logging('DEBUG', "Externan command result:\n\tCommand : $command\n\tReturn code: $return_value\n\tOutput:\n\t\t- Stdout :\n$stdout\n\n\t\t- Stderr :\n$stderr");
|
||||||
|
|
||||||
|
return array($return_value, $stdout, $stderr);
|
||||||
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ function send_mail($from, $to, $subject, $msg, $headers=array(), $attachments=ar
|
||||||
$mail_obj = Mail::factory($mail_send_method, $mail_send_params);
|
$mail_obj = Mail::factory($mail_send_method, $mail_send_params);
|
||||||
|
|
||||||
if ($mail_catch_all) {
|
if ($mail_catch_all) {
|
||||||
$msg.="\n\n\nMail originalement destiné à ".(is_array($to)?implode(',', $to):$to);
|
$msg .= sprintf(_("\n\n\nMail initialy intended for %s."), (is_array($to)?implode(',', $to):$to));
|
||||||
$to = $mail_catch_all;
|
$to = $mail_catch_all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,3 +31,9 @@ if ($session_timeout) {
|
||||||
session_destroy();
|
session_destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function check_session_key($value=null) {
|
||||||
|
if (is_null($value) && isset($_REQUEST['session_key']))
|
||||||
|
$value = $_REQUEST['session_key'];
|
||||||
|
return ($value && $_SESSION['session_key'] == $value);
|
||||||
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ elseif (method_exists($smarty,'registerPlugin')) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logging('FATAL', 'Smarty version not recognized !');
|
logging('FATAL', _('Smarty version not supported.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Configure templates/templates_c directories
|
// Configure templates/templates_c directories
|
||||||
|
@ -131,7 +131,7 @@ function _defineCommonTemplateVariables($template, $pagetitle) {
|
||||||
|
|
||||||
function display_template($template, $pagetitle=false) {
|
function display_template($template, $pagetitle=false) {
|
||||||
if (!$template)
|
if (!$template)
|
||||||
logging("FATAL", "Aucun template fourni.");
|
logging("FATAL", _("No template specified."));
|
||||||
global $smarty;
|
global $smarty;
|
||||||
try {
|
try {
|
||||||
_defineCommonTemplateVariables($template, $pagetitle);
|
_defineCommonTemplateVariables($template, $pagetitle);
|
||||||
|
@ -142,7 +142,7 @@ function display_template($template, $pagetitle=false) {
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
log_exception($e, "Smarty - An exception occured displaying template '$template'");
|
log_exception($e, "Smarty - An exception occured displaying template '$template'");
|
||||||
if ($template != 'fatal_error.tpl')
|
if ($template != 'fatal_error.tpl')
|
||||||
logging("FATAL", "Une erreur est survenue en affichant cette page.");
|
logging("FATAL", _("An error occurred while viewing this page."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ function display_ajax_return($data) {
|
||||||
|
|
||||||
$ajax=false;
|
$ajax=false;
|
||||||
function fatal_error($error) {
|
function fatal_error($error) {
|
||||||
global $smarty, $ajax;
|
global $smarty, $ajax, $api_mode;
|
||||||
|
|
||||||
if (php_sapi_name() == "cli")
|
if (php_sapi_name() == "cli")
|
||||||
die("FATAL ERROR : $error\n");
|
die("FATAL ERROR : $error\n");
|
||||||
|
@ -173,8 +173,8 @@ function fatal_error($error) {
|
||||||
// Set HTTP reponse code to 500
|
// Set HTTP reponse code to 500
|
||||||
http_response_code(500);
|
http_response_code(500);
|
||||||
|
|
||||||
if ($ajax)
|
if ($ajax || $api_mode)
|
||||||
display_ajax_return(array('error' => $error));
|
display_ajax_return(array('success' => false, 'error' => $error));
|
||||||
|
|
||||||
$smarty->assign('fatal_error', $error);
|
$smarty->assign('fatal_error', $error);
|
||||||
display_template('fatal_error.tpl');
|
display_template('fatal_error.tpl');
|
||||||
|
|
120
includes/translation.php
Normal file
120
includes/translation.php
Normal file
|
@ -0,0 +1,120 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// Gettext text domain
|
||||||
|
define('TEXT_DOMAIN', 'DEFAULT');
|
||||||
|
|
||||||
|
/*
|
||||||
|
* List available translation languages
|
||||||
|
*
|
||||||
|
* @param[in] $as_locales boolean If true, locale names will be return instead
|
||||||
|
* of primary languages (optional, default: false)
|
||||||
|
*
|
||||||
|
* @retval array Array of available translation languages (or locales)
|
||||||
|
*/
|
||||||
|
function get_available_langs($as_locales=false) {
|
||||||
|
global $root_lang_dir;
|
||||||
|
if (!is_dir($root_lang_dir))
|
||||||
|
logging('FATAL', "Root land directory not found ($root_lang_dir)");
|
||||||
|
$langs = array(($as_locales?'en_US.UTF8':'en'));
|
||||||
|
if ($dh = opendir($root_lang_dir)) {
|
||||||
|
while (($file = readdir($dh)) !== false) {
|
||||||
|
if (!is_dir($root_lang_dir . '/' . $file) || in_array($file, array('.', '..')))
|
||||||
|
continue;
|
||||||
|
if ($as_locales) {
|
||||||
|
$langs[] = $file;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$lang = Locale::getPrimaryLanguage($file);
|
||||||
|
if (!in_array($lang, $langs))
|
||||||
|
$langs[] = $lang;
|
||||||
|
}
|
||||||
|
closedir($dh);
|
||||||
|
}
|
||||||
|
$langs = array_unique($langs);
|
||||||
|
logging('TRACE', 'Available '.($as_locales?'locales':'languages').': '.implode(', ', $langs));
|
||||||
|
return $langs;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get locale name corresponding to specified translation language
|
||||||
|
*
|
||||||
|
* @param[in] $lang string The translation language
|
||||||
|
* @param[in] $default string|null Default locale name to return if any available translation
|
||||||
|
* locales matched with the specified language
|
||||||
|
* (optional, default: $default_locale)
|
||||||
|
* return string Corresponding locale
|
||||||
|
*/
|
||||||
|
function lang2locale($lang, $default=null) {
|
||||||
|
global $default_locale;
|
||||||
|
if (is_null($default))
|
||||||
|
$default = $default_locale;
|
||||||
|
foreach (get_available_langs(true) as $locale) {
|
||||||
|
if (strpos($locale, $lang) === false)
|
||||||
|
continue;
|
||||||
|
return $locale;
|
||||||
|
}
|
||||||
|
return $default;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Helper function: just mark message to translation
|
||||||
|
function ___($msg) {
|
||||||
|
return $msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize translation system
|
||||||
|
*
|
||||||
|
* Detect best translation language and configure the translation
|
||||||
|
* system.
|
||||||
|
*
|
||||||
|
* @retval void
|
||||||
|
*/
|
||||||
|
function init_translation() {
|
||||||
|
global $root_dir_path, $root_lang_dir, $default_locale;
|
||||||
|
$root_lang_dir = "$root_dir_path/lang";
|
||||||
|
|
||||||
|
if (!class_exists('Locale')) {
|
||||||
|
logging('ERROR', 'Locale PHP class does not exist. May be php-intl is not installed?');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$available_langs = get_available_langs();
|
||||||
|
if (php_sapi_name() != "cli") {
|
||||||
|
$lang = Locale::lookup(
|
||||||
|
get_available_langs(),
|
||||||
|
Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']),
|
||||||
|
true,
|
||||||
|
Locale::getPrimaryLanguage($default_locale)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$lang = null;
|
||||||
|
$sys_current = getenv('LC_ALL');
|
||||||
|
if (!$sys_current)
|
||||||
|
$sys_current = getenv('LANG');
|
||||||
|
if ($sys_current)
|
||||||
|
$lang = Locale::getPrimaryLanguage($sys_current);
|
||||||
|
if (is_null($lang)) {
|
||||||
|
logging('TRACE', 'No configured lang detected from CLI env, use default.');
|
||||||
|
$lang = Locale::getPrimaryLanguage($default_locale);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
logging('TRACE', "Lang detected from CLI env : '$lang'");
|
||||||
|
}
|
||||||
|
logging('TRACE', "Best lang found is '$lang'");
|
||||||
|
|
||||||
|
$locale = lang2locale($lang);
|
||||||
|
logging('TRACE', "Matching locale found with language '$lang' is '$locale'");
|
||||||
|
|
||||||
|
// Gettext firstly look the LANGUAGE env variable, so set it
|
||||||
|
putenv("LANGUAGE=$locale");
|
||||||
|
|
||||||
|
// Set the locale
|
||||||
|
if (setlocale(LC_ALL, $locale) === false)
|
||||||
|
logging('ERROR', "An error occured setting locale to '$locale'");
|
||||||
|
|
||||||
|
// Configure and set the text domain
|
||||||
|
$fullpath = bindtextdomain(TEXT_DOMAIN, $root_lang_dir);
|
||||||
|
logging('TRACE', "Text domain fullpath is '$fullpath'.");
|
||||||
|
logging('TRACE', "Text domain is '".textdomain(TEXT_DOMAIN)."'.");
|
||||||
|
}
|
|
@ -2,13 +2,14 @@
|
||||||
|
|
||||||
function get_item_from_url($id, $fatal=false) {
|
function get_item_from_url($id, $fatal=false) {
|
||||||
if (!check_id($id))
|
if (!check_id($id))
|
||||||
logging('FATAL', "Identifiant d'élément invalide.");
|
logging('FATAL', _('Invalid element identifier.'));
|
||||||
|
|
||||||
$item = get_item($id);
|
$item = get_item($id);
|
||||||
if(!is_array($item)) {
|
if(!is_array($item)) {
|
||||||
|
$error = sprintf(_("Item #% s not found."), $id);
|
||||||
if ($fatal)
|
if ($fatal)
|
||||||
logging('FATAL', "Élément #$id introuvable.");
|
logging('FATAL', $error);
|
||||||
add_error("Élement #$id introuvable.");
|
add_error($error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return $item;
|
return $item;
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
if (php_sapi_name() == "cli")
|
if (php_sapi_name() == "cli")
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
function handle_homepage($url_info) {
|
function handle_homepage($request) {
|
||||||
display_template("homepage.tpl", "Hello world !");
|
display_template("homepage.tpl", _("Hello world !"));
|
||||||
}
|
}
|
||||||
add_url_handler('#^$#', 'handle_homepage');
|
add_url_handler('#^$#', 'handle_homepage');
|
||||||
|
|
||||||
function handle_search($url_info) {
|
function handle_search($request) {
|
||||||
global $smarty, $status_list;
|
global $smarty, $status_list;
|
||||||
|
|
||||||
// Manage params
|
// Manage params
|
||||||
|
@ -20,11 +20,11 @@ function handle_search($url_info) {
|
||||||
'order_direction' => 'ASC',
|
'order_direction' => 'ASC',
|
||||||
);
|
);
|
||||||
if (isset($_REQUEST['clear']) && $_REQUEST['clear']=='true')
|
if (isset($_REQUEST['clear']) && $_REQUEST['clear']=='true')
|
||||||
redirect($url_info['current_page']);
|
redirect($request -> current_url);
|
||||||
}
|
}
|
||||||
logging('DEBUG', 'Request params : '.vardump($_REQUEST));
|
logging('DEBUG', 'Request params : '.vardump($_REQUEST));
|
||||||
|
|
||||||
$status_list['all'] = 'Peu importe';
|
$status_list['all'] = _('Any');
|
||||||
if (isset($_REQUEST['status'])) {
|
if (isset($_REQUEST['status'])) {
|
||||||
if (check_status($_REQUEST['status']) || $_REQUEST['status'] == 'all')
|
if (check_status($_REQUEST['status']) || $_REQUEST['status'] == 'all')
|
||||||
$_SESSION['search']['status'] = $_REQUEST['status'];
|
$_SESSION['search']['status'] = $_REQUEST['status'];
|
||||||
|
@ -81,7 +81,7 @@ function handle_search($url_info) {
|
||||||
logging('DEBUG', 'Search params : '.vardump($_SESSION['search']));
|
logging('DEBUG', 'Search params : '.vardump($_SESSION['search']));
|
||||||
$result = search_items($_SESSION['search']);
|
$result = search_items($_SESSION['search']);
|
||||||
if (!is_array($result))
|
if (!is_array($result))
|
||||||
fatal_error("Une erreur est survenue en listant les éléments. Si le problème persiste, merci de prendre contact avec le support.");
|
fatal_error(_("An error occurred while listing the items. If the problem persists, please contact support."));
|
||||||
|
|
||||||
$smarty -> assign('result', $result);
|
$smarty -> assign('result', $result);
|
||||||
$smarty -> assign('search', $_SESSION['search']);
|
$smarty -> assign('search', $_SESSION['search']);
|
||||||
|
@ -93,7 +93,7 @@ function handle_search($url_info) {
|
||||||
add_js_file('lib/myconfirm.js');
|
add_js_file('lib/myconfirm.js');
|
||||||
add_js_file('js/search.js');
|
add_js_file('js/search.js');
|
||||||
|
|
||||||
display_template("search.tpl", "Recherche");
|
display_template("search.tpl", _("Search"));
|
||||||
}
|
}
|
||||||
add_url_handler('|^item/?$|', 'handle_search');
|
add_url_handler('|^item/?$|', 'handle_search');
|
||||||
|
|
||||||
|
@ -101,10 +101,10 @@ add_url_handler('|^item/?$|', 'handle_search');
|
||||||
* One item pages
|
* One item pages
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle_show($url_info) {
|
function handle_show($request) {
|
||||||
global $smarty;
|
global $smarty;
|
||||||
|
|
||||||
$item = get_item_from_url($url_info['id']);
|
$item = get_item_from_url($request -> id);
|
||||||
if (!$item)
|
if (!$item)
|
||||||
error_404();
|
error_404();
|
||||||
|
|
||||||
|
@ -115,11 +115,11 @@ function handle_show($url_info) {
|
||||||
add_js_file('lib/bootstrap4-dialog/bootstrap-dialog.min.js');
|
add_js_file('lib/bootstrap4-dialog/bootstrap-dialog.min.js');
|
||||||
add_js_file('lib/myconfirm.js');
|
add_js_file('lib/myconfirm.js');
|
||||||
|
|
||||||
display_template("show.tpl", "Élement ".(is_array($item)?$item['name']:"#".$url_info['id']));
|
display_template("show.tpl", sprintf(_("Element %s"), (is_array($item)?$item['name']:"#".$request -> id)));
|
||||||
}
|
}
|
||||||
add_url_handler('|^item/(?P<id>[0-9]+)$|', 'handle_show');
|
add_url_handler('|^item/(?P<id>[0-9]+)$|', 'handle_show');
|
||||||
|
|
||||||
function handle_create($url_info) {
|
function handle_create($request) {
|
||||||
global $smarty, $status_list;
|
global $smarty, $status_list;
|
||||||
|
|
||||||
$info = array();
|
$info = array();
|
||||||
|
@ -127,33 +127,33 @@ function handle_create($url_info) {
|
||||||
if (isset($_POST['submit']) && empty($field_errors)) {
|
if (isset($_POST['submit']) && empty($field_errors)) {
|
||||||
$item = add_item($info);
|
$item = add_item($info);
|
||||||
if (is_array($item)) {
|
if (is_array($item)) {
|
||||||
add_message("L'élément '".$item['name']."' a bien été créé.");
|
add_message(sprintf(_("The element '% s' has been created."), $item['name']));
|
||||||
redirect('item/'.$item['id']);
|
redirect('item/'.$item['id']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
add_error("Une erreur est survenue en enregistrant cet élément.");
|
add_error(_("An error occurred while saving this item."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logging('DEBUG', 'Validated data : '.vardump($info));
|
logging('DEBUG', 'Validated data : '.vardump($info));
|
||||||
logging('DEBUG', 'Fields errors : '.vardump($field_errors));
|
logging('DEBUG', 'Fields errors : '.vardump($field_errors));
|
||||||
if (isset($_POST['submit']) && !empty($field_errors))
|
if (isset($_POST['submit']) && !empty($field_errors))
|
||||||
add_error("Des erreurs empêchent l'enregistrement de cet élément. Merci de les corriger avant de tenter d'ajouter cet élément.");
|
add_error(_("There are errors preventing this item from being saved. Please correct them before attempting to add this item."));
|
||||||
$smarty->assign('submited', isset($_POST['submit']));
|
$smarty->assign('submited', isset($_POST['submit']));
|
||||||
$smarty->assign('info', $info);
|
$smarty->assign('info', $info);
|
||||||
$smarty->assign('field_errors', $field_errors);
|
$smarty->assign('field_errors', $field_errors);
|
||||||
$smarty->assign('status_list', $status_list);
|
$smarty->assign('status_list', $status_list);
|
||||||
|
|
||||||
display_template("form.tpl", "Nouveau");
|
display_template("form.tpl", _("New"));
|
||||||
}
|
}
|
||||||
add_url_handler('|^item/new$|', 'handle_create');
|
add_url_handler('|^item/new$|', 'handle_create');
|
||||||
|
|
||||||
function handle_modify($url_info) {
|
function handle_modify($request) {
|
||||||
global $smarty, $status_list;
|
global $smarty, $status_list;
|
||||||
|
|
||||||
$item = get_item_from_url($url_info['id']);
|
$item = get_item_from_url($request -> id);
|
||||||
if(is_array($item)) {
|
if(is_array($item)) {
|
||||||
if (!can_modify($item)) {
|
if (!can_modify($item)) {
|
||||||
add_error('Vous ne pouvez pas modifier cet élément.');
|
add_error(_('You cannot edit this item.'));
|
||||||
redirect('item/'.$item['id']);
|
redirect('item/'.$item['id']);
|
||||||
}
|
}
|
||||||
$info = array();
|
$info = array();
|
||||||
|
@ -166,22 +166,22 @@ function handle_modify($url_info) {
|
||||||
}
|
}
|
||||||
logging('DEBUG', 'Changes : '.vardump($changes));
|
logging('DEBUG', 'Changes : '.vardump($changes));
|
||||||
if (empty($changes)) {
|
if (empty($changes)) {
|
||||||
add_message("Vous n'avez apporté aucune modification à l'élément '".$item['name']."'.");
|
add_message(sprintf(_("You have not made any changes to element '% s'."), $item['name']));
|
||||||
redirect('item/'.$item['id']);
|
redirect('item/'.$item['id']);
|
||||||
}
|
}
|
||||||
else if (update_item($item['id'], $changes) === true) {
|
else if (update_item($item['id'], $changes) === true) {
|
||||||
add_message("L'élément '".$item['name']."' a bien été mise à jour.");
|
add_message(sprintf(_("The element '% s' has been updated successfully."), $item['name']));
|
||||||
redirect('item/'.$item['id']);
|
redirect('item/'.$item['id']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
add_error("Une erreur est survenue en mettant à jour cet élément.");
|
add_error(_("An error occurred while updating this item."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logging('DEBUG', 'Validated data : '.vardump($info));
|
logging('DEBUG', 'Validated data : '.vardump($info));
|
||||||
logging('DEBUG', 'Fields errors : '.vardump($field_errors));
|
logging('DEBUG', 'Fields errors : '.vardump($field_errors));
|
||||||
$smarty->assign('submited', isset($_POST['submit']));
|
$smarty->assign('submited', isset($_POST['submit']));
|
||||||
if (isset($_POST['submit']) && !empty($field_errors))
|
if (isset($_POST['submit']) && !empty($field_errors))
|
||||||
add_error("Des erreurs empêchent l'enregistrement de cet élément. Merci de les corriger avant de tenter d'enregistrer vos modifications.");
|
add_error(_("There are errors preventing this item from being saved. Please correct them before attempting to save your changes."));
|
||||||
$smarty->assign('info', (!empty($info)?$info:$item));
|
$smarty->assign('info', (!empty($info)?$info:$item));
|
||||||
$smarty->assign('item_id', $item['id']);
|
$smarty->assign('item_id', $item['id']);
|
||||||
$smarty->assign('field_errors', $field_errors);
|
$smarty->assign('field_errors', $field_errors);
|
||||||
|
@ -191,49 +191,49 @@ function handle_modify($url_info) {
|
||||||
error_404();
|
error_404();
|
||||||
}
|
}
|
||||||
|
|
||||||
display_template("form.tpl", "Élement ".(is_array($item)?$item['name']:"#".$url_info['id'])." : Modification");
|
display_template("form.tpl", sprintf(_("Element %s: Modification"), (is_array($item)?$item['name']:"#".$request -> id)));
|
||||||
}
|
}
|
||||||
add_url_handler('|^item/(?P<id>[0-9]+)/modify$|', 'handle_modify');
|
add_url_handler('|^item/(?P<id>[0-9]+)/modify$|', 'handle_modify');
|
||||||
|
|
||||||
function handle_archive($url_info) {
|
function handle_archive($request) {
|
||||||
global $smarty;
|
global $smarty;
|
||||||
|
|
||||||
$item = get_item_from_url($url_info['id']);
|
$item = get_item_from_url($request -> id);
|
||||||
if(!is_array($item)) {
|
if(!is_array($item)) {
|
||||||
add_error("Élement #".$url_info['id']." introuvable.");
|
add_error(sprintf(_("Item #% s not found."), $request -> id));
|
||||||
redirect('item');
|
redirect('item');
|
||||||
}
|
}
|
||||||
elseif ($item['status'] == 'archived') {
|
elseif ($item['status'] == 'archived') {
|
||||||
add_message("Cet élément est déjà archivé.");
|
add_message(_("This item is already archived."));
|
||||||
}
|
}
|
||||||
else if (!can_archive($item)) {
|
else if (!can_archive($item)) {
|
||||||
add_error('Vous ne pouvez pas archiver cet élément.');
|
add_error(_('You cannot archive this item.'));
|
||||||
}
|
}
|
||||||
else if (archive_item($item['id']) === true) {
|
else if (archive_item($item['id']) === true) {
|
||||||
add_message("L'élément '".$item['name']."' a bien été archivé.");
|
add_message(sprintf(_("The element '% s' has been archived successfully."), $item['name']));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
add_error("Une erreur est survenue en archivant cet élément.");
|
add_error(_('An error occurred while archiving this item.'));
|
||||||
}
|
}
|
||||||
redirect('item/'.$item['id']);
|
redirect('item/'.$item['id']);
|
||||||
}
|
}
|
||||||
add_url_handler('|^item/(?P<id>[0-9]+)/archive$|', 'handle_archive');
|
add_url_handler('|^item/(?P<id>[0-9]+)/archive$|', 'handle_archive');
|
||||||
|
|
||||||
function handle_delete($url_info) {
|
function handle_delete($request) {
|
||||||
global $smarty;
|
global $smarty;
|
||||||
|
|
||||||
$item = get_item_from_url($url_info['id']);
|
$item = get_item_from_url($request -> id);
|
||||||
if(!is_array($item)) {
|
if(!is_array($item)) {
|
||||||
add_error("Élement #".$url_info['id']." introuvable.");
|
add_error(sprintf(_("Item #% s not found."), $request -> id));
|
||||||
}
|
}
|
||||||
else if (!can_delete($item)) {
|
else if (!can_delete($item)) {
|
||||||
add_error('Vous ne pouvez pas supprimer cet élément.');
|
add_error(_('You cannot delete this item.'));
|
||||||
}
|
}
|
||||||
else if (delete_item($item['id']) === true) {
|
else if (delete_item($item['id']) === true) {
|
||||||
add_message("L'élément '".$item['name']."' a bien été supprimé.");
|
add_message(sprintf(_("The element '% s' has been deleted successfully."), $item['name']));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
add_error("Une erreur est survenue en supprimant cet élément.");
|
add_error(_('An error occurred while deleting this item.'));
|
||||||
redirect('item/'.$item['id']);
|
redirect('item/'.$item['id']);
|
||||||
}
|
}
|
||||||
redirect('item');
|
redirect('item');
|
||||||
|
|
599
includes/url.php
599
includes/url.php
|
@ -1,245 +1,474 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Configured URL patterns :
|
||||||
|
*
|
||||||
|
* Example :
|
||||||
|
*
|
||||||
|
* array (
|
||||||
|
* '|get/(?P<name>[a-zA-Z0-9]+)$|' => array (
|
||||||
|
* 'handler' => 'get',
|
||||||
|
* 'authenticated' => true,
|
||||||
|
* 'api_mode' => false,
|
||||||
|
* 'methods' => array('GET'),
|
||||||
|
* ),
|
||||||
|
* '|get/all$|' => => array (
|
||||||
|
* 'handler' => 'get_all',
|
||||||
|
* 'authenticated' => true,
|
||||||
|
* 'api_mode' => false,
|
||||||
|
* 'methods' => array('GET', 'POST'),
|
||||||
|
* ),
|
||||||
|
* )
|
||||||
|
*
|
||||||
|
*/
|
||||||
$url_patterns =array();
|
$url_patterns =array();
|
||||||
|
|
||||||
function add_url_handler($pattern, $handler=null, $override=true) {
|
/**
|
||||||
global $url_patterns;
|
* Add an URL pattern
|
||||||
if (is_array($pattern)) {
|
*
|
||||||
if (is_null($handler))
|
* @param[in] $pattern string The URL pattern (required)
|
||||||
foreach($pattern as $p => $h)
|
* @param[in] $handler callable The URL pattern handler (must be callable, required)
|
||||||
add_url_handler($p, $h, $override);
|
* @param[in] $authenticated boolean Permit to define if this URL is accessible only for authenticated users (optional, default: true)
|
||||||
else
|
* @param[in] $override boolean Allow override if a command already exists with the same name (optional, default: false)
|
||||||
foreach($pattern as $p)
|
* @param[in] $api_mode boolean Enable API mode (optional, default: false)
|
||||||
add_url_handler($p, $handler, $override);
|
* @param[in] $methods array|null HTTP method (optional, default: array('GET', 'POST'))
|
||||||
}
|
**/
|
||||||
else {
|
function add_url_handler($pattern, $handler=null, $authenticated=false, $override=true, $api_mode=false, $methods=null) {
|
||||||
if (!isset($url_patterns[$pattern])) {
|
if (is_null($methods))
|
||||||
$url_patterns[$pattern] = $handler;
|
$methods = array('GET', 'POST');
|
||||||
}
|
elseif (!is_array($methods))
|
||||||
elseif ($override) {
|
$methods = array($methods);
|
||||||
logging('DEBUG', "URL : override pattern '$pattern' with handler '$handler' (old handler = '".$url_patterns[$pattern]."')");
|
global $url_patterns;
|
||||||
$url_patterns[$pattern] = $handler;
|
if (is_array($pattern)) {
|
||||||
}
|
if (is_null($handler))
|
||||||
else {
|
foreach($pattern as $p => $h)
|
||||||
logging('DEBUG', "URL : pattern '$pattern' already defined : do not override.");
|
add_url_handler($p, $h, $authenticated, $override, $api_mode, $methods);
|
||||||
}
|
else
|
||||||
}
|
foreach($pattern as $p)
|
||||||
|
add_url_handler($p, $handler, $authenticated, $override, $api_mode, $methods);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (!isset($url_patterns[$pattern])) {
|
||||||
|
$url_patterns[$pattern] = array(
|
||||||
|
'handler' => $handler,
|
||||||
|
'authenticated' => $authenticated,
|
||||||
|
'api_mode' => $api_mode,
|
||||||
|
'methods' => $methods,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
elseif ($override) {
|
||||||
|
logging('DEBUG', "URL : override pattern '$pattern' with handler '$handler' (old handler = '".$url_patterns[$pattern]."')");
|
||||||
|
$url_patterns[$pattern] = array(
|
||||||
|
'handler' => $handler,
|
||||||
|
'authenticated' => $authenticated,
|
||||||
|
'api_mode' => $api_mode,
|
||||||
|
'methods' => $methods,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
logging('DEBUG', "URL : pattern '$pattern' already defined : do not override.");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Error 404 page
|
* Error 404 page
|
||||||
*/
|
*/
|
||||||
function error_404($url_infos=array()) {
|
|
||||||
display_template('error_404.tpl', "Oups ! Page introuvable");
|
/**
|
||||||
exit();
|
* Error 404 handler
|
||||||
|
*
|
||||||
|
* @param[in] $request UrlRequest|null The request (optional, default: null)
|
||||||
|
*
|
||||||
|
* @retval void
|
||||||
|
**/
|
||||||
|
function error_404($request=null) {
|
||||||
|
display_template('error_404.tpl', _("Whoops ! Page not found"));
|
||||||
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$_404_url_handler = 'error_404';
|
$_404_url_handler = 'error_404';
|
||||||
function set_404_url_handler($handler=null) {
|
function set_404_url_handler($handler=null) {
|
||||||
global $_404_url_handler;
|
global $_404_url_handler;
|
||||||
$_404_url_handler = $handler;
|
$_404_url_handler = $handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* URL patterns :
|
* Interprets the requested URL and return the corresponding UrlRequest object
|
||||||
*
|
*
|
||||||
* array (
|
* @param[in] $default_url string|null The default URL if current one does not
|
||||||
* '[URL pattern]' => '[handler]',
|
* match with any configured pattern.
|
||||||
* [...]
|
|
||||||
* )
|
|
||||||
*
|
|
||||||
* Example :
|
|
||||||
*
|
|
||||||
* array (
|
|
||||||
* '#get/(?P<name>[a-zA-Z0-9]+)$#' => 'get_by_name',
|
|
||||||
* '#get/status/(?P<status>pending|archived)$#' => 'get_by_status',
|
|
||||||
* '#get/all$#' => 'get_all',
|
|
||||||
* )
|
|
||||||
*
|
|
||||||
* Return example (for the last one previous URL pattern) :
|
|
||||||
*
|
|
||||||
* return : array (
|
|
||||||
* 'handler' => 'get',
|
|
||||||
* 'current_page' => 'get/[name]',
|
|
||||||
* 'name' => [name],
|
|
||||||
* )
|
|
||||||
*
|
*
|
||||||
|
* @retval UrlRequest The UrlRequest object corresponding to the the requested URL.
|
||||||
*/
|
*/
|
||||||
function get_current_url_handler($url_patterns=null, $default_page=false) {
|
function get_request($default_url=null) {
|
||||||
global $_404_url_handler;
|
global $url_patterns, $_404_url_handler;
|
||||||
if (is_null($url_patterns))
|
$current_url = get_current_url();
|
||||||
global $url_patterns;
|
if ($current_url === false) {
|
||||||
$current_page = get_current_page();
|
logging('FATAL', _('Unable to determine the requested page. If the problem persists, please contact support.'));
|
||||||
if ($current_page === false) {
|
exit();
|
||||||
logging('FATAL', 'Impossible de déterminer la page demandée. Si le problème persiste, merci de prendre contact avec le support.');
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
if (!is_array($url_patterns)) {
|
|
||||||
logging('FATAL', 'URL : No URL patterns provided !');
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
logging('DEBUG', "URL : current page = '$current_page'");
|
|
||||||
logging('DEBUG', "URL : check current page with the following URL patterns :\n - ".implode("\n - ", array_keys($url_patterns)));
|
|
||||||
foreach ($url_patterns as $pattern => $handler) {
|
|
||||||
$m = url_match($pattern, $current_page);
|
|
||||||
if (is_array($m)) {
|
|
||||||
$m['handler'] = $handler;
|
|
||||||
$m['current_page'] = $current_page;
|
|
||||||
// Reset last redirect
|
|
||||||
if (isset($_SESSION['last_redirect']))
|
|
||||||
unset($_SESSION['last_redirect']);
|
|
||||||
logging('DEBUG', "URL : result :\n".print_r($m, 1));
|
|
||||||
return $m;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($default_page !== false) {
|
|
||||||
logging('DEBUG', "Current page match with no pattern. Redirect to default page ('$default_page')");
|
|
||||||
redirect($default_page);
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
elseif ($_404_url_handler) {
|
|
||||||
logging('DEBUG', "Current page match with no pattern. Use error 404 handler.");
|
|
||||||
return array('handler' => $_404_url_handler);
|
|
||||||
}
|
}
|
||||||
return False;
|
if (!is_array($url_patterns)) {
|
||||||
|
logging('FATAL', 'URL : No URL patterns configured !');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
logging('DEBUG', "URL : current url = '$current_url'");
|
||||||
|
logging('DEBUG', "URL : check current url with the following URL patterns :\n - ".implode("\n - ", array_keys($url_patterns)));
|
||||||
|
foreach ($url_patterns as $pattern => $handler_infos) {
|
||||||
|
$m = url_match($pattern, $current_url, $handler_infos['methods']);
|
||||||
|
if (is_array($m)) {
|
||||||
|
$request = new UrlRequest($current_url, $handler_infos, $m);
|
||||||
|
// Reset last redirect
|
||||||
|
if (isset($_SESSION['last_redirect']))
|
||||||
|
unset($_SESSION['last_redirect']);
|
||||||
|
logging('DEBUG', "URL : result :\n".varDump($request, 1));
|
||||||
|
return $request;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($default_url !== false) {
|
||||||
|
logging('DEBUG', "Current url match with no pattern. Redirect to default url ('$default_url')");
|
||||||
|
redirect($default_url);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
// Error 404
|
||||||
|
$api_mode = (strpos($current_url, 'api/') === 0);
|
||||||
|
logging('DEBUG', "Current URL match with no pattern. Use error 404 handler (API mode=$api_mode).");
|
||||||
|
return new UrlRequest(
|
||||||
|
$current_url,
|
||||||
|
array(
|
||||||
|
'handler' => $_404_url_handler,
|
||||||
|
'authenticated' => false,
|
||||||
|
'api_mode' => $api_mode,
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function url_match($pattern, $current_page=false) {
|
/**
|
||||||
if ($current_page === false) {
|
* Check if the current requested URL match with a specific pattern
|
||||||
$current_page = get_current_page();
|
*
|
||||||
if (!$current_page) return False;
|
* @param[in] $pattern string The URL pattern
|
||||||
}
|
* @param[in] $current_url string|false The current URL (optional)
|
||||||
if (preg_match($pattern, $current_page, $m)) {
|
* @param[in] $methods array|null HTTP method (optional, default: no check)
|
||||||
logging('DEBUG', "URL : Match found with pattern '$pattern' :\n\t".str_replace("\n", "\n\t", print_r($m, 1)));
|
*
|
||||||
return $m;
|
* @retval array|false The URL info if pattern matched, false otherwise.
|
||||||
}
|
**/
|
||||||
return False;
|
function url_match($pattern, $current_url=false, $methods=null) {
|
||||||
|
if ($methods && !in_array($_SERVER['REQUEST_METHOD'], $methods))
|
||||||
|
return false;
|
||||||
|
if ($current_url === false) {
|
||||||
|
$current_url = get_current_url();
|
||||||
|
if (!$current_url) return False;
|
||||||
|
}
|
||||||
|
if (preg_match($pattern, $current_url, $m)) {
|
||||||
|
logging('DEBUG', "URL : Match found with pattern '$pattern' :\n\t".str_replace("\n", "\n\t", print_r($m, 1)));
|
||||||
|
return $m;
|
||||||
|
}
|
||||||
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_current_page() {
|
/*
|
||||||
if (isset($_REQUEST['go']))
|
* Retreive current requested URL and return it
|
||||||
return $_REQUEST['go'];
|
*
|
||||||
else
|
* @retval string|false The current request URL or false if fail
|
||||||
return detect_current_page();
|
**/
|
||||||
|
function get_current_url() {
|
||||||
|
if (isset($_REQUEST['go']))
|
||||||
|
return $_REQUEST['go'];
|
||||||
|
return detect_current_url();
|
||||||
}
|
}
|
||||||
|
|
||||||
function detect_current_page() {
|
/*
|
||||||
logging('DEBUG', "URL : request URI = '".$_SERVER['REQUEST_URI']."'");
|
* Try to detect current requested URL and return it
|
||||||
|
*
|
||||||
|
* @retval string|false The current request URL or false if detection fail
|
||||||
|
**/
|
||||||
|
function detect_current_url() {
|
||||||
|
logging('DEBUG', "URL : request URI = '".$_SERVER['REQUEST_URI']."'");
|
||||||
|
|
||||||
$base = get_rewrite_base();
|
$base = get_rewrite_base();
|
||||||
logging('DEBUG', "URL : rewrite base = '$base'");
|
logging('DEBUG', "URL : rewrite base = '$base'");
|
||||||
|
|
||||||
if ($_SERVER['REQUEST_URI'] == $base)
|
if ($_SERVER['REQUEST_URI'] == $base)
|
||||||
return '';
|
return '';
|
||||||
|
|
||||||
if (substr($_SERVER['REQUEST_URI'], 0, strlen($base)) != $base) {
|
if (substr($_SERVER['REQUEST_URI'], 0, strlen($base)) != $base) {
|
||||||
logging('ERROR', "URL : request URI (".$_SERVER['REQUEST_URI'].") does not start with rewrite base ($base)");
|
logging('ERROR', "URL : request URI (".$_SERVER['REQUEST_URI'].") does not start with rewrite base ($base)");
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
$current_page = substr($_SERVER['REQUEST_URI'], strlen($base));
|
$current_url = substr($_SERVER['REQUEST_URI'], strlen($base));
|
||||||
|
|
||||||
// URL contain params ?
|
// URL contain params ?
|
||||||
$params_start = strpos($current_page, '?');
|
$params_start = strpos($current_url, '?');
|
||||||
if ($params_start !== false)
|
if ($params_start !== false)
|
||||||
// Params detected, remove it
|
// Params detected, remove it
|
||||||
|
|
||||||
// No page / currrent page start by '?' ?
|
// No url / currrent url start by '?' ?
|
||||||
if ($params_start == 0)
|
if ($params_start == 0)
|
||||||
return '';
|
return '';
|
||||||
else
|
else
|
||||||
return substr($current_page, 0, $params_start);
|
return substr($current_url, 0, $params_start);
|
||||||
|
|
||||||
return $current_page;
|
return $current_url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Try to detect rewrite base from public root URL
|
||||||
|
*
|
||||||
|
* @retval string The detected rewrite base
|
||||||
|
**/
|
||||||
function get_rewrite_base() {
|
function get_rewrite_base() {
|
||||||
global $public_root_url;
|
global $public_root_url;
|
||||||
if (preg_match('|^https?://[^/]+/(.*)$|', $public_root_url, $m))
|
if (preg_match('|^https?://[^/]+/(.*)$|', $public_root_url, $m))
|
||||||
return '/'.remove_trailing_slash($m[1]).'/';
|
return '/'.remove_trailing_slash($m[1]).'/';
|
||||||
elseif (preg_match('|^/(.*)$|', $public_root_url, $m))
|
elseif (preg_match('|^/(.*)$|', $public_root_url, $m))
|
||||||
return '/'.remove_trailing_slash($m[1]).'/';
|
return '/'.remove_trailing_slash($m[1]).'/';
|
||||||
return '/';
|
return '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Trigger redirect to specified URL (or homepage if omited)
|
||||||
|
*
|
||||||
|
* @param[in] $go string|false The destination URL
|
||||||
|
*
|
||||||
|
* @retval void
|
||||||
|
**/
|
||||||
function redirect($go=false) {
|
function redirect($go=false) {
|
||||||
global $public_root_url;
|
global $public_root_url;
|
||||||
|
|
||||||
if ($go===false)
|
if ($go===false)
|
||||||
$go = "";
|
$go = "";
|
||||||
|
|
||||||
if (preg_match('#^https?://#',$go))
|
if (is_absolute_url($go))
|
||||||
$url = $go;
|
$url = $go;
|
||||||
elseif (isset($public_root_url) && $public_root_url) {
|
elseif (isset($public_root_url) && $public_root_url) {
|
||||||
// Check $public_root_url end
|
// Check $public_root_url end
|
||||||
if (substr($public_root_url, -1)=='/') {
|
if (substr($public_root_url, -1)=='/') {
|
||||||
$public_root_url=substr($public_root_url, 0, -1);
|
$public_root_url=substr($public_root_url, 0, -1);
|
||||||
}
|
}
|
||||||
$url="$public_root_url/$go";
|
$url="$public_root_url/$go";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$url="/$go";
|
$url="/$go";
|
||||||
|
|
||||||
// Prevent loop
|
// Prevent loop
|
||||||
if (isset($_SESSION['last_redirect']) && $_SESSION['last_redirect'] == $url)
|
if (isset($_SESSION['last_redirect']) && $_SESSION['last_redirect'] == $url)
|
||||||
logging('FATAL', 'Impossible de déterminer la page demandée (boucle). Si le problème persiste, merci de prendre contact avec le support.');
|
logging('FATAL', _('Unable to determine the requested page (loop detected). If the problem persists, please contact support.'));
|
||||||
else
|
else
|
||||||
$_SESSION['last_redirect'] = $url;
|
$_SESSION['last_redirect'] = $url;
|
||||||
|
|
||||||
logging('DEBUG',"redirect($go) => Redirect to : <$url>");
|
logging('DEBUG',"redirect($go) => Redirect to : <$url>");
|
||||||
header("Location: $url");
|
header("Location: $url");
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
function handle_url($url_patterns=null, $default_url=null) {
|
/**
|
||||||
global $smarty;
|
* Handle the current requested URL
|
||||||
if (is_null($url_patterns)) global $url_patterns;
|
*
|
||||||
if (is_null($default_url)) global $default_url;
|
* @param[in] $default_url string|null The default URL if current one does not
|
||||||
|
* match with any configured pattern.
|
||||||
|
*
|
||||||
|
* @retval void
|
||||||
|
**/
|
||||||
|
function handle_request($default_url=null) {
|
||||||
|
global $smarty, $api_mode;
|
||||||
|
|
||||||
global $url_info;
|
$request = get_request($default_url);
|
||||||
$url_info = get_current_url_handler();
|
|
||||||
|
|
||||||
if (!is_array($url_info))
|
if (!is_callable($request -> handler)) {
|
||||||
logging('FATAL', "Une problème est survenu en interprétant l'URL de la page demandée.");
|
logging('ERROR', "URL handler function ".$request -> handler."() does not exists !");
|
||||||
|
logging('FATAL', _("This request cannot be processed."));
|
||||||
|
}
|
||||||
|
|
||||||
if (!function_exists($url_info['handler'])) {
|
if ($request -> api_mode)
|
||||||
logging('ERROR', "URL handler function ".$url_info['handler']."() does not exists !");
|
$api_mode = true;
|
||||||
logging('FATAL', "Cette requête ne peut être traitée.");
|
if (isset($smarty) && $smarty)
|
||||||
}
|
$smarty -> assign('request', $request);
|
||||||
|
|
||||||
if (isset($smarty) && $smarty)
|
// Check authentication (if need)
|
||||||
$smarty -> assign('url_info', $url_info);
|
if($request -> authenticated && function_exists('force_authentication'))
|
||||||
|
force_authentication();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return call_user_func($url_info['handler'], $url_info);
|
return call_user_func($request -> handler, $request);
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
log_exception($e, "An exception occured running URL handler function ".$url_info['handler']."()");
|
log_exception($e, "An exception occured running URL handler function ".$request -> handler."()");
|
||||||
logging('FATAL', "Cette requête n'a put être traitée correctement.");
|
logging('FATAL', _("This request could not be processed correctly."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove trailing slash in specified URL
|
||||||
|
*
|
||||||
|
* @param[in] $url string The URL
|
||||||
|
*
|
||||||
|
* @retval string The specified URL without trailing slash
|
||||||
|
**/
|
||||||
function remove_trailing_slash($url) {
|
function remove_trailing_slash($url) {
|
||||||
if ($url == '/')
|
if ($url == '/')
|
||||||
return $url;
|
return $url;
|
||||||
elseif (substr($url, -1) == '/')
|
elseif (substr($url, -1) == '/')
|
||||||
return substr($url, 0, -1);
|
return substr($url, 0, -1);
|
||||||
return $url;
|
return $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check an AJAX request and trigger a fatal error on fail
|
||||||
|
*
|
||||||
|
* Check if session key is present and valid and set AJAX
|
||||||
|
* mode.
|
||||||
|
*
|
||||||
|
* @param[in] $session_key string The current session key (optional)
|
||||||
|
*
|
||||||
|
* @retval void
|
||||||
|
**/
|
||||||
function check_ajax_request($session_key=null) {
|
function check_ajax_request($session_key=null) {
|
||||||
global $ajax, $debug_ajax;
|
global $ajax, $debug_ajax;
|
||||||
$ajax=true;
|
$ajax=true;
|
||||||
|
|
||||||
if (is_null($session_key) && isset($_REQUEST['session_key']))
|
if (check_session_key($session_key))
|
||||||
$session_key = $_REQUEST['session_key'];
|
fatal_error('Invalid request');
|
||||||
|
|
||||||
|
if ($debug_ajax)
|
||||||
|
logging('DEBUG',"Ajax Request : ".vardump($_REQUEST));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the public absolute URL
|
||||||
|
*
|
||||||
|
* @param[in] $relative_url string|null Relative URL to convert (Default: current URL)
|
||||||
|
*
|
||||||
|
* @retval string The public absolute URL
|
||||||
|
**/
|
||||||
|
function get_absolute_url($relative_url=null) {
|
||||||
|
global $public_root_url;
|
||||||
|
if (!is_string($relative_url))
|
||||||
|
$relative_url = get_current_url();
|
||||||
|
if ($public_root_url[0] == '/') {
|
||||||
|
logging('DEBUG', "URL :: get_absolute_url($relative_url): configured public root URL is relative ($public_root_url) => try to detect it from current request infos.");
|
||||||
|
$public_root_url = 'http'.(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'?'s':'').'://'.$_SERVER['HTTP_HOST'].$public_root_url;
|
||||||
|
logging('DEBUG', "URL :: get_absolute_url($relative_url): detected public_root_url: $public_root_url");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (substr($relative_url, 0, 1) == '/')
|
||||||
|
$relative_url = substr($url, 1);
|
||||||
|
$url = remove_trailing_slash($public_root_url)."/$relative_url";
|
||||||
|
logging('DEBUG', "URL :: get_absolute_url($relative_url): result = $url");
|
||||||
|
return $url;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if specified URL is absolute
|
||||||
|
*
|
||||||
|
* @param[in] $url string The URL to check
|
||||||
|
*
|
||||||
|
* @retval boolean True if specified URL is absolute, False otherwise
|
||||||
|
**/
|
||||||
|
function is_absolute_url($url) {
|
||||||
|
return boolval(preg_match('#^https?://#', $url));
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Add parameter in specified URL
|
||||||
|
*
|
||||||
|
* @param[in] &$url string The reference of the URL
|
||||||
|
* @param[in] $param string The parameter name
|
||||||
|
* @param[in] $value string The parameter value
|
||||||
|
* @param[in] $encode boolean Set if parameter value must be URL encoded (optional, default: true)
|
||||||
|
*
|
||||||
|
* @retval string|null The completed URL
|
||||||
|
*/
|
||||||
|
function add_url_parameter(&$url, $param, $value, $encode=true) {
|
||||||
|
if (strpos($url, '?') === false)
|
||||||
|
$url .= '?';
|
||||||
|
else
|
||||||
|
$url .= '&';
|
||||||
|
$url .= "$param=".($encode?urlencode($value):$value);
|
||||||
|
return $url;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL request abstraction
|
||||||
|
*
|
||||||
|
* @author Benjamin Renard <brenard@easter-eggs.com>
|
||||||
|
*/
|
||||||
|
class UrlRequest {
|
||||||
|
|
||||||
|
// The URL requested handler
|
||||||
|
private $current_url = null;
|
||||||
|
|
||||||
|
// The URL requested handler
|
||||||
|
private $handler = null;
|
||||||
|
|
||||||
|
// Request need authentication ?
|
||||||
|
private $authenticated = true;
|
||||||
|
|
||||||
|
// API mode enabled ?
|
||||||
|
private $api_mode = false;
|
||||||
|
|
||||||
|
// Parameters detected on requested URL
|
||||||
|
private $url_params = array();
|
||||||
|
|
||||||
|
public function __construct($current_url, $handler_infos, $url_params=array()) {
|
||||||
|
$this -> current_url = $current_url;
|
||||||
|
$this -> handler = $handler_infos['handler'];
|
||||||
|
$this -> authenticated = (isset($handler_infos['authenticated'])?boolval($handler_infos['authenticated']):true);
|
||||||
|
$this -> api_mode = (isset($handler_infos['api_mode'])?boolval($handler_infos['api_mode']):false);
|
||||||
|
$this -> url_params = $url_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get request info
|
||||||
|
*
|
||||||
|
* @param[in] $key string The name of the info
|
||||||
|
*
|
||||||
|
* @retval mixed The value
|
||||||
|
**/
|
||||||
|
public function __get($key) {
|
||||||
|
if ($key == 'current_url')
|
||||||
|
return $this -> current_url;
|
||||||
|
if ($key == 'handler')
|
||||||
|
return $this -> handler;
|
||||||
|
if ($key == 'authenticated')
|
||||||
|
return $this -> authenticated;
|
||||||
|
if ($key == 'api_mode')
|
||||||
|
return $this -> api_mode;
|
||||||
|
if ($key == 'referer')
|
||||||
|
return $this -> get_referer();
|
||||||
|
if ($key == 'http_method')
|
||||||
|
return $_SERVER['REQUEST_METHOD'];
|
||||||
|
if (array_key_exists($key, $this->url_params)) {
|
||||||
|
return urldecode($this->url_params[$key]);
|
||||||
|
}
|
||||||
|
// Unknown key, log warning
|
||||||
|
logging('WARNING', "__get($key): invalid property requested\n".get_debug_backtrace_context());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check is request info is set
|
||||||
|
*
|
||||||
|
* @param[in] $key string The name of the info
|
||||||
|
*
|
||||||
|
* @retval boolval True is info is set, False otherwise
|
||||||
|
**/
|
||||||
|
public function __isset($key) {
|
||||||
|
if (in_array($key, array('current_url', 'handler', 'authenticated')))
|
||||||
|
return True;
|
||||||
|
return array_key_exists($key, $this->url_params);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get request referer (if known)
|
||||||
|
*
|
||||||
|
* @retval string|null The request referer URL if known, null otherwise
|
||||||
|
*/
|
||||||
|
public function get_referer() {
|
||||||
|
if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'])
|
||||||
|
return $_SERVER['HTTP_REFERER'];
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if ($_SESSION['session_key'] != $session_key) {
|
|
||||||
fatal_error('Invalid request');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($debug_ajax)
|
|
||||||
logging('DEBUG',"Ajax Request : ".vardump($_REQUEST));
|
|
||||||
}
|
}
|
||||||
|
|
BIN
lang/fr_FR.UTF8/LC_MESSAGES/DEFAULT.mo
Normal file
BIN
lang/fr_FR.UTF8/LC_MESSAGES/DEFAULT.mo
Normal file
Binary file not shown.
830
lang/fr_FR.UTF8/LC_MESSAGES/DEFAULT.po
Normal file
830
lang/fr_FR.UTF8/LC_MESSAGES/DEFAULT.po
Normal file
|
@ -0,0 +1,830 @@
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: \n"
|
||||||
|
"POT-Creation-Date: \n"
|
||||||
|
"PO-Revision-Date: \n"
|
||||||
|
"Last-Translator: \n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"Language: fr_FR\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Generator: Poedit 2.4.2\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-helpers.php:5
|
||||||
|
msgid "Invalid element identifier."
|
||||||
|
msgstr "Identifiant d'élément invalide."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-helpers.php:9
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:203
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:227
|
||||||
|
#, php-format
|
||||||
|
msgid "Item #% s not found."
|
||||||
|
msgstr "L'élément #%s est introuvable."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/smarty.php:61
|
||||||
|
msgid "Smarty version not supported."
|
||||||
|
msgstr "Une erreur est survenue en affichant cette page."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/smarty.php:134
|
||||||
|
msgid "No template specified."
|
||||||
|
msgstr "Aucun template spécifié."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/smarty.php:145
|
||||||
|
msgid "An error occurred while viewing this page."
|
||||||
|
msgstr "Une erreur est survenue en affichant cette page."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:7
|
||||||
|
msgid "Hello world !"
|
||||||
|
msgstr "Bonjour tout le monde !"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:27
|
||||||
|
msgid "Any"
|
||||||
|
msgstr "Peu importe"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:84
|
||||||
|
msgid ""
|
||||||
|
"An error occurred while listing the items. If the problem persists, please "
|
||||||
|
"contact support."
|
||||||
|
msgstr ""
|
||||||
|
"Une erreur est survenue en listant les éléments. Si le problème persiste, "
|
||||||
|
"merci de prendre contact avec le support."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:96
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:22
|
||||||
|
msgid "Search"
|
||||||
|
msgstr "Rechercher"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:118
|
||||||
|
#, php-format
|
||||||
|
msgid "Element %s"
|
||||||
|
msgstr "Élément %s"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:130
|
||||||
|
#, php-format
|
||||||
|
msgid "The element '% s' has been created."
|
||||||
|
msgstr "L'élément '%s' a bien été créé."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:134
|
||||||
|
msgid "An error occurred while saving this item."
|
||||||
|
msgstr "Une erreur est survenue en enregistrant cet élément."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:140
|
||||||
|
msgid ""
|
||||||
|
"There are errors preventing this item from being saved. Please correct them "
|
||||||
|
"before attempting to add this item."
|
||||||
|
msgstr ""
|
||||||
|
"Des erreurs empêchent l'enregistrement de cet élément. Merci de les corriger "
|
||||||
|
"avant de tenter d'ajouter cet élément."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:146
|
||||||
|
msgid "New"
|
||||||
|
msgstr "Nouveau"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:156
|
||||||
|
msgid "You cannot edit this item."
|
||||||
|
msgstr "Vous ne pouvez pas modifier cet élément."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:169
|
||||||
|
#, php-format
|
||||||
|
msgid "You have not made any changes to element '% s'."
|
||||||
|
msgstr "Vous n'avez apporté aucune modification à l'élément '%s'."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:173
|
||||||
|
#, php-format
|
||||||
|
msgid "The element '% s' has been updated successfully."
|
||||||
|
msgstr "L'élément '%s' a bien été mise à jour."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:177
|
||||||
|
msgid "An error occurred while updating this item."
|
||||||
|
msgstr "Une erreur est survenue en mettant à jour cet élément."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:184
|
||||||
|
msgid ""
|
||||||
|
"There are errors preventing this item from being saved. Please correct them "
|
||||||
|
"before attempting to save your changes."
|
||||||
|
msgstr ""
|
||||||
|
"Des erreurs empêchent l'enregistrement de cet élément. Merci de les corriger "
|
||||||
|
"avant de tenter d'enregistrer vos modifications."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:194
|
||||||
|
#, php-format
|
||||||
|
msgid "Element %s: Modification"
|
||||||
|
msgstr "Élément %s : Modification"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:207
|
||||||
|
msgid "This item is already archived."
|
||||||
|
msgstr "Cet élément est déjà archivé."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:210
|
||||||
|
msgid "You cannot archive this item."
|
||||||
|
msgstr "Vous ne pouvez pas archiver cet élément."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:213
|
||||||
|
#, php-format
|
||||||
|
msgid "The element '% s' has been archived successfully."
|
||||||
|
msgstr "L'élément '%s' a bien été archivé."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:216
|
||||||
|
msgid "An error occurred while archiving this item."
|
||||||
|
msgstr "Une erreur est survenue en archivant cet élément."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:230
|
||||||
|
msgid "You cannot delete this item."
|
||||||
|
msgstr "Vous ne pouvez pas supprimer cet élément."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:233
|
||||||
|
#, php-format
|
||||||
|
msgid "The element '% s' has been deleted successfully."
|
||||||
|
msgstr "L'élément '%s' a bien été supprimé."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:236
|
||||||
|
msgid "An error occurred while deleting this item."
|
||||||
|
msgstr "Une erreur est survenue en supprimant cet élément."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/db.php:31
|
||||||
|
msgid "Unable to connect to the database."
|
||||||
|
msgstr "Impossible de se connecter à la base de données."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/core.php:44
|
||||||
|
msgid "Pending"
|
||||||
|
msgstr "En attente"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/core.php:45
|
||||||
|
msgid "Validated"
|
||||||
|
msgstr "Validé"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/core.php:46
|
||||||
|
msgid "Refused"
|
||||||
|
msgstr "Refusé"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/core.php:47
|
||||||
|
msgid "Archived"
|
||||||
|
msgstr "Archivé"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/mail.php:12
|
||||||
|
#, php-format
|
||||||
|
msgid ""
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"Mail initialy intended for %s."
|
||||||
|
msgstr ""
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"Mail originalement destiné à %s."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url.php:86
|
||||||
|
msgid "Whoops ! Page not found"
|
||||||
|
msgstr "Oups ! Page introuvable"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url.php:109
|
||||||
|
msgid ""
|
||||||
|
"Unable to determine the requested page. If the problem persists, please "
|
||||||
|
"contact support."
|
||||||
|
msgstr ""
|
||||||
|
"Impossible de déterminer la page demandée. Si le problème persiste, merci de "
|
||||||
|
"prendre contact avec le support."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url.php:258
|
||||||
|
msgid ""
|
||||||
|
"Unable to determine the requested page (loop detected). If the problem "
|
||||||
|
"persists, please contact support."
|
||||||
|
msgstr ""
|
||||||
|
"Impossible de déterminer la page demandée (boucle détectée). Si le problème "
|
||||||
|
"persiste, merci de prendre contact avec le support."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url.php:282
|
||||||
|
msgid "This request cannot be processed."
|
||||||
|
msgstr "Cette requête ne peut être traitée."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url.php:299
|
||||||
|
msgid "This request could not be processed correctly."
|
||||||
|
msgstr "Cette requête n'a put être traitée correctement."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:7
|
||||||
|
#, php-format
|
||||||
|
msgid "The CLI command '%s' already exists."
|
||||||
|
msgstr "La commande CLI '%s' n'existe pas."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:12
|
||||||
|
#, php-format
|
||||||
|
msgid "The CLI command '%s' handler is not callable !"
|
||||||
|
msgstr "La fonction implémentant la commande CLI '%s' n'est pas exécutable !"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:45
|
||||||
|
#, php-format
|
||||||
|
msgid "Usage: %s [-h] [-qd] command\n"
|
||||||
|
msgstr "Utilisation: %s [-h] [-qd] commande\n"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:46
|
||||||
|
msgid " -h Show this message\n"
|
||||||
|
msgstr " -h Affiche ce message\n"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:47
|
||||||
|
msgid " -q / -d Quiet/Debug mode\n"
|
||||||
|
msgstr " -q / -d Mode silencieux/debug\n"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:48
|
||||||
|
msgid " --trace Trace mode (the most verbose)\n"
|
||||||
|
msgstr " --trace Mode trace (le plus verbeux)\n"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:49
|
||||||
|
msgid " command Command to run\n"
|
||||||
|
msgstr " command La commande à exécuter\n"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:51
|
||||||
|
msgid "Available commands:\n"
|
||||||
|
msgstr "Commandes disponibles:\n"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:86
|
||||||
|
msgid "Only one command could be executed !"
|
||||||
|
msgstr "Une seul commande peut-être exécutée !"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:110
|
||||||
|
#, php-format
|
||||||
|
msgid ""
|
||||||
|
"Invalid parameter \"%s\".\n"
|
||||||
|
"Note: Command's parameter/argument must be place after the command."
|
||||||
|
msgstr ""
|
||||||
|
"Paramètre \"%s\" invalide.\n"
|
||||||
|
"Note : Les paramètres/arguments de la requête doivent être placés après "
|
||||||
|
"celle-ci."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:127
|
||||||
|
#, php-format
|
||||||
|
msgid "An exception occured running command %s"
|
||||||
|
msgstr "Une exception est survenue en exécutant la commande %s"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:133
|
||||||
|
#, php-format
|
||||||
|
msgid "Item #%s:\n"
|
||||||
|
msgstr "Élément #%s :\n"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:134
|
||||||
|
#, php-format
|
||||||
|
msgid "ID: %s"
|
||||||
|
msgstr "ID : %s"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:135
|
||||||
|
#, php-format
|
||||||
|
msgid "Name: '%s'"
|
||||||
|
msgstr "Nom : %s"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:136
|
||||||
|
#, php-format
|
||||||
|
msgid "Date: %s"
|
||||||
|
msgstr "Date : %s"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:137
|
||||||
|
#, php-format
|
||||||
|
msgid "Description: %s"
|
||||||
|
msgstr "Description : %s"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:137
|
||||||
|
msgid "Not set"
|
||||||
|
msgstr "Non-défini"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:138
|
||||||
|
#, php-format
|
||||||
|
msgid "Status: %s"
|
||||||
|
msgstr "Statut : %s"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:191
|
||||||
|
msgid "No item.\n"
|
||||||
|
msgstr "Aucun élément.\n"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:217
|
||||||
|
#, php-format
|
||||||
|
msgid "%d item(s)"
|
||||||
|
msgstr "%d élément(s)"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:223
|
||||||
|
msgid "List/search items"
|
||||||
|
msgstr "Lister/rechercher les éléments"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:224
|
||||||
|
msgid "[patterns]"
|
||||||
|
msgstr "[mots clés]"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:226
|
||||||
|
msgid "-o|--orderby Ordering list criterion. Possible values:"
|
||||||
|
msgstr "-o|--orderby Critère de tri de la liste. Valeurs possibles :"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:228
|
||||||
|
msgid "-r|--reverse Reverse order"
|
||||||
|
msgstr "-r|--reverse Ordre inverse"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:229
|
||||||
|
msgid "-s|--status Filter on status. Possible values:"
|
||||||
|
msgstr "-s|--status Filtrer sur le statut. Valeurs possibles :"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:236
|
||||||
|
msgid "You must provide a valid ID."
|
||||||
|
msgstr "Vous devez fournir un ID valide."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:242
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:266
|
||||||
|
#, php-format
|
||||||
|
msgid "Item #%s not found."
|
||||||
|
msgstr "Élément #%s introuvable."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:250
|
||||||
|
msgid "Show item"
|
||||||
|
msgstr "Voir un élément"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:251
|
||||||
|
msgid "[ID]"
|
||||||
|
msgstr "[ID]"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:256
|
||||||
|
msgid "You must provide item ID."
|
||||||
|
msgstr "Vous devez fournir un ID valide."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:260
|
||||||
|
msgid "Invalid item ID"
|
||||||
|
msgstr "ID d'élément invalide"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:271
|
||||||
|
msgid "Are you sure you want to delete this item? Type 'yes' to continue: "
|
||||||
|
msgstr ""
|
||||||
|
"Êtes-vous sûre de vouloir supprimer cet élément ? Taper 'yes' pour "
|
||||||
|
"continuer : "
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:275
|
||||||
|
msgid "User cancel"
|
||||||
|
msgstr "L'utilisateur a annulé"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:281
|
||||||
|
#, php-format
|
||||||
|
msgid "An error occured deleting item #%d."
|
||||||
|
msgstr "Une erreur est survenue en supprimant l'élément #%d."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:288
|
||||||
|
msgid "Delete item"
|
||||||
|
msgstr "Supprimer un élément"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:289
|
||||||
|
msgid "[item ID]"
|
||||||
|
msgstr "[ID de l'élément]"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:301
|
||||||
|
msgid "Export items (as CSV)"
|
||||||
|
msgstr "Exporter les éléments (au format CSV)"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:302
|
||||||
|
msgid "[output file path]"
|
||||||
|
msgstr "[chemin du fichier de sortie]"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:314
|
||||||
|
msgid "Restore items (from CSV)"
|
||||||
|
msgstr "Restaurer les éléments (depuis un fichier CSV)"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:315
|
||||||
|
msgid "[input file path]"
|
||||||
|
msgstr "[chemin du fichier d'entrée]"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:374
|
||||||
|
msgid "Cron to handle item expiration"
|
||||||
|
msgstr "Cron gérant l'expiration des éléments"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:377
|
||||||
|
msgid "-j/--just-try Just-try mode : do not really removed expired item(s)"
|
||||||
|
msgstr ""
|
||||||
|
"-j/--just-try Mode just-try : Ne supprime pas réellement les éléments "
|
||||||
|
"expirés"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:378
|
||||||
|
msgid "-m/--max-age Item expiration limit (in days, optional)"
|
||||||
|
msgstr ""
|
||||||
|
"-m/--max-age Limite d'expiration des éléments (en secondes, optionnel)"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:393
|
||||||
|
msgid "Fail to list PHP files."
|
||||||
|
msgstr "Impossible de lister les fichiers PHP."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:410
|
||||||
|
msgid "Fail to extract messages from PHP files using xgettext."
|
||||||
|
msgstr ""
|
||||||
|
"Impossible d'extraire les messages depuis les fichiers PHP en utilisant "
|
||||||
|
"xgettext."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:421
|
||||||
|
msgid ""
|
||||||
|
"Fail to extract messages from template files using tsmarty2c.php script."
|
||||||
|
msgstr ""
|
||||||
|
"Impossible d'extraire les messages depuis les fichiers template en utilisant "
|
||||||
|
"le script tsmarty2c.php."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:431
|
||||||
|
msgid "Fail to merge messages using msgcat."
|
||||||
|
msgstr "Impossible de fusionner les messages en utilisant msgcat."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:436
|
||||||
|
msgid "Extract messages that need to be translated"
|
||||||
|
msgstr "Extraire les messages devant être traduit"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:438
|
||||||
|
msgid "This command could be used to generate/update lang/messages.pot file."
|
||||||
|
msgstr ""
|
||||||
|
"Cette commande peut-être utilisée pour générer/mettre à jour le fichier lang/"
|
||||||
|
"messages.pot."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/form.tpl:7
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:36
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:5
|
||||||
|
msgid "Name"
|
||||||
|
msgstr "Nom"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/form.tpl:15
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:11
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:23
|
||||||
|
msgid "Status"
|
||||||
|
msgstr "Statut"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/form.tpl:25
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:32
|
||||||
|
msgid "Description"
|
||||||
|
msgstr "Description"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/form.tpl:33
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/fatal_error.tpl:9
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:42
|
||||||
|
msgid "Back"
|
||||||
|
msgstr "Retour"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/form.tpl:36
|
||||||
|
msgid "Save"
|
||||||
|
msgstr "Enregistrer"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/form.tpl:38
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:28
|
||||||
|
msgid "Add"
|
||||||
|
msgstr "Ajouter"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/fatal_error.tpl:5
|
||||||
|
msgid ""
|
||||||
|
"A fatal error has occurred and it is preventing this application from "
|
||||||
|
"working properly. Please try again later or contact support."
|
||||||
|
msgstr ""
|
||||||
|
"Une erreur fatale est survenue et celle-ci empêche cette application de "
|
||||||
|
"fonctionner correctement. Merci de réessayer ultérieurement ou de prendre "
|
||||||
|
"contact avec le service support."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/fatal_error.tpl:7
|
||||||
|
msgid "Error: %1"
|
||||||
|
msgstr "Erreur : %1"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:8
|
||||||
|
msgid "Pattern"
|
||||||
|
msgstr "Mot clé"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:16
|
||||||
|
msgid "Nb by page"
|
||||||
|
msgstr "Nb par page"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:23
|
||||||
|
msgid "Reset"
|
||||||
|
msgstr "Réinitialiser"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:35
|
||||||
|
msgid "Date"
|
||||||
|
msgstr "Date"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:37
|
||||||
|
msgid "Actions"
|
||||||
|
msgstr "Actions"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:47
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:50
|
||||||
|
msgid "View"
|
||||||
|
msgstr "Voir"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:51
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:43
|
||||||
|
msgid "Modify"
|
||||||
|
msgstr "Modifier"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:52
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:44
|
||||||
|
msgid "Are you sure you want to archive this item?"
|
||||||
|
msgstr "Êtes-vous sûre de vouloir archiver cet élément ?"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:52
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:44
|
||||||
|
msgid "Archive"
|
||||||
|
msgstr "Archiver"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:53
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:45
|
||||||
|
msgid "Are you sure you want to delete this item?"
|
||||||
|
msgstr "Êtes-vous sûre de vouloir supprimer cet élément ?"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:53
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:45
|
||||||
|
msgid "Delete"
|
||||||
|
msgstr "Supprimer"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:59
|
||||||
|
msgid "No item found."
|
||||||
|
msgstr "Aucun élément trouvé."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:68
|
||||||
|
msgid "Element(s) %1 to %2 on %3"
|
||||||
|
msgstr "Élément(s) %1 à %2 sur %3"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/error_404.tpl:3
|
||||||
|
msgid "The requested page can not be found."
|
||||||
|
msgstr "La page demandée est introuvable."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:14
|
||||||
|
msgid "Creation date"
|
||||||
|
msgstr "Date de création"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:35
|
||||||
|
msgid "Unspecified."
|
||||||
|
msgstr "Non-spécifié."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/homepage.tpl:5
|
||||||
|
msgid "Hello, world!"
|
||||||
|
msgstr "Bonjour tout le monde !"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/homepage.tpl:6
|
||||||
|
msgid ""
|
||||||
|
"This is a simple app to show the different possibilities and basic "
|
||||||
|
"functionality."
|
||||||
|
msgstr ""
|
||||||
|
"Ceci est une simple application pour montrer les différentes possibilités et "
|
||||||
|
"les fonctionnalités de base."
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/homepage.tpl:8
|
||||||
|
msgid "This app contains some demo pages:"
|
||||||
|
msgstr "Cette application contient quelques pages de démo :"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/homepage.tpl:9
|
||||||
|
msgid "Search page"
|
||||||
|
msgstr "Page de recherche"
|
||||||
|
|
||||||
|
#~ msgid "Authentication required"
|
||||||
|
#~ msgstr "Authentification requise"
|
||||||
|
|
||||||
|
#~ msgid "Invalid session key"
|
||||||
|
#~ msgstr "Clé de session invalide"
|
||||||
|
|
||||||
|
#~ msgid "Activate your account"
|
||||||
|
#~ msgstr "Activez votre compte"
|
||||||
|
|
||||||
|
#~ msgid "Your account is activated"
|
||||||
|
#~ msgstr "Votre compte est activé"
|
||||||
|
|
||||||
|
#~ msgid ""
|
||||||
|
#~ "Your account is already activated. If you loose your password, please use "
|
||||||
|
#~ "the reset password link present on login page."
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Votre compte est déjà activé. Si vous avez perdu votre mot de passe, "
|
||||||
|
#~ "merci d'utiliser le lien de réinitialisation présent sur la page de "
|
||||||
|
#~ "connexion."
|
||||||
|
|
||||||
|
#~ msgid "You previous initialization request was expired."
|
||||||
|
#~ msgstr "Votre précédente requête d'initialisation a expirée."
|
||||||
|
|
||||||
|
#~ msgid "The repeated password does not match with the password you choosed."
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Le mot de passe répété ne correspond pas au mot de passe que vous avez "
|
||||||
|
#~ "choisi."
|
||||||
|
|
||||||
|
#~ msgid "Invalid password"
|
||||||
|
#~ msgstr "Mot de passe invalide"
|
||||||
|
|
||||||
|
#~ msgid "Choose your password"
|
||||||
|
#~ msgstr "Choisissez votre mot de passe"
|
||||||
|
|
||||||
|
#~ msgid "Please check your mailbox"
|
||||||
|
#~ msgstr "Merci de consulter votre boîte mails"
|
||||||
|
|
||||||
|
#~ msgid "At least one uppercase unaccent character"
|
||||||
|
#~ msgstr "Au moins une lettre majuscule et non-accentuée"
|
||||||
|
|
||||||
|
#~ msgid "At least one lowercase unaccent character"
|
||||||
|
#~ msgstr "Au moins une lettre minuscule et non-accentuée"
|
||||||
|
|
||||||
|
#~ msgid "At least one digit"
|
||||||
|
#~ msgstr "Au moins un chiffre"
|
||||||
|
|
||||||
|
#~ msgid "At least one character that is not an unaccent letter or a digit"
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Au moins un caractère qui n'est pas une lettre non-accuentée ou un chiffre"
|
||||||
|
|
||||||
|
#~ msgid "Railcoop - Activation of your account"
|
||||||
|
#~ msgstr "Railcoop - Activation de votre compte"
|
||||||
|
|
||||||
|
#, php-format
|
||||||
|
#~ msgid ""
|
||||||
|
#~ "Hello,\n"
|
||||||
|
#~ "\n"
|
||||||
|
#~ "To activate your account, please click on the following link:\n"
|
||||||
|
#~ "\n"
|
||||||
|
#~ "%s\n"
|
||||||
|
#~ "\n"
|
||||||
|
#~ "Railcoop"
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Bonjour,\n"
|
||||||
|
#~ "\n"
|
||||||
|
#~ "Pour activer votre compte, merci de cliquer sur le lien suivant :\n"
|
||||||
|
#~ "\n"
|
||||||
|
#~ "%s\n"
|
||||||
|
#~ "\n"
|
||||||
|
#~ "Railcoop"
|
||||||
|
|
||||||
|
#, php-format
|
||||||
|
#~ msgid "Password is too long (maximum: %d)."
|
||||||
|
#~ msgstr "Mot de passe trop long (maximum : %d)."
|
||||||
|
|
||||||
|
#, php-format
|
||||||
|
#~ msgid "Password is too short (minimum: %d)."
|
||||||
|
#~ msgstr "Mot de passe trop court (minimum : %d)."
|
||||||
|
|
||||||
|
#, php-format
|
||||||
|
#~ msgid "Password match with only %d rule(s) (at least %d are required)."
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Le mot de passe ne corresponds qu'a %d des règle(s) (au moins %d sont "
|
||||||
|
#~ "requises)."
|
||||||
|
|
||||||
|
#, php-format
|
||||||
|
#~ msgid "Password match with any rule (at least %d are required)."
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Le mot de passe ne corresponds à aucune règle (au moins %d sont requises)."
|
||||||
|
|
||||||
|
#~ msgid "This password is prohibited."
|
||||||
|
#~ msgstr "Ce mot de passe est interdit."
|
||||||
|
|
||||||
|
#, php-format
|
||||||
|
#~ msgid "Initialization request #%s:\n"
|
||||||
|
#~ msgstr "Requête d'initialisation #%s:\n"
|
||||||
|
|
||||||
|
#~ msgid "No initialization request.\n"
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Aucune requête d'initialisation.\n"
|
||||||
|
#~ "\n"
|
||||||
|
|
||||||
|
#, php-format
|
||||||
|
#~ msgid "%d initialization request(s)"
|
||||||
|
#~ msgstr "%d requête(s) d'initialisation"
|
||||||
|
|
||||||
|
#~ msgid "Show initialization request"
|
||||||
|
#~ msgstr "Afficher un requête d'initialisation"
|
||||||
|
|
||||||
|
#~ msgid "You must provide initialization request ID."
|
||||||
|
#~ msgstr "Vous devez fournir l'ID de la requête d'initialisation."
|
||||||
|
|
||||||
|
#~ msgid "Invalid initialization request ID"
|
||||||
|
#~ msgstr "ID de requête d'initialisation invalide"
|
||||||
|
|
||||||
|
#~ msgid "Delete initialization request"
|
||||||
|
#~ msgstr "Supprimer une requête d'initialisation"
|
||||||
|
|
||||||
|
#~ msgid "[initialization request ID]"
|
||||||
|
#~ msgstr "[ID de la requête d'initialisation]"
|
||||||
|
|
||||||
|
#~ msgid "Email"
|
||||||
|
#~ msgstr "Email"
|
||||||
|
|
||||||
|
#~ msgid "Please enter your email address."
|
||||||
|
#~ msgstr "Merci de saisir votre adresse email."
|
||||||
|
|
||||||
|
#~ msgid "Continue"
|
||||||
|
#~ msgstr "Continuer"
|
||||||
|
|
||||||
|
#~ msgid "Your account is now activated."
|
||||||
|
#~ msgstr "Votre compte est maintenant activé."
|
||||||
|
|
||||||
|
#~ msgid "To continue, please click on the following button:"
|
||||||
|
#~ msgstr "Pour continuer, merci de cliquer sur le bouton suivant:"
|
||||||
|
|
||||||
|
#~ msgid "You could now connect with your account."
|
||||||
|
#~ msgstr "Vous pouvez désormais vous connecter avec votre compte."
|
||||||
|
|
||||||
|
#~ msgid "Invalid password choice"
|
||||||
|
#~ msgstr "Choix du mot de passe invalide"
|
||||||
|
|
||||||
|
#~ msgid ""
|
||||||
|
#~ "The password you have chosen does not appear to be valid. Please check "
|
||||||
|
#~ "that it fulfills all the rules set out."
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Le mot de passe que vous avez choisi ne semble pas être valide. Merci de "
|
||||||
|
#~ "vérifier qu'il rempli bien toutes les règles exposées."
|
||||||
|
|
||||||
|
#~ msgid "The repeated password does not seem to match the password you chose."
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Le mot de passe répété ne semble pas correspondre avec le mot de passe "
|
||||||
|
#~ "que vous avez choisi."
|
||||||
|
|
||||||
|
#~ msgid "Password:"
|
||||||
|
#~ msgstr "Mot de passe :"
|
||||||
|
|
||||||
|
#~ msgid "Please enter the password of your choice."
|
||||||
|
#~ msgstr "Merci de saisir le mot de passe de votre choix."
|
||||||
|
|
||||||
|
#~ msgid "Your password must contain from %1 to %2 characters."
|
||||||
|
#~ msgstr "Votre mot de passe doit contenir entre %1 et %2 caractères."
|
||||||
|
|
||||||
|
#~ msgid "Your password must contain at least %1 characters."
|
||||||
|
#~ msgstr "Votre mot de passe doit contenir au moins %1 caractères."
|
||||||
|
|
||||||
|
#~ msgid "Your password must contain at most %1 characters."
|
||||||
|
#~ msgstr "Votre mot de passe doit contenir au maximum %1 caractères."
|
||||||
|
|
||||||
|
#~ msgid "It also have to repect at least %1 of the following rules:"
|
||||||
|
#~ msgstr "Il doit également respecter au moins %1 des règles suivantes :"
|
||||||
|
|
||||||
|
#~ msgid "It also have to repect all the following rules:"
|
||||||
|
#~ msgstr "Il doit également respecter toutes les règles suivantes :"
|
||||||
|
|
||||||
|
#~ msgid "Confirmation:"
|
||||||
|
#~ msgstr "Confirmation :"
|
||||||
|
|
||||||
|
#~ msgid "Please repeat here the password you choiced."
|
||||||
|
#~ msgstr "Merci de répéter le mot de passe que vous avez choisi."
|
||||||
|
|
||||||
|
#~ msgid ""
|
||||||
|
#~ "An email with instructions to initialized your account have been sent to "
|
||||||
|
#~ "your email address (%1). Please check your mailbox to continue."
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Un email avec les instructions pour initialiser votre compte a été envoyé "
|
||||||
|
#~ "à votre adresse (%1). Merci de consulter votre boîte mail pour continuer."
|
||||||
|
|
||||||
|
#~ msgid ""
|
||||||
|
#~ "This email may take a few minutes to reach you. Furthermore, considering "
|
||||||
|
#~ "this email was sent to you automatically, please check that it did not "
|
||||||
|
#~ "arrive in your spam emails. Despite this, if you do not receive this "
|
||||||
|
#~ "email, please click on the following button."
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Cet email peut prendre quelques minutes pour vous parvenir. Par ailleurs, "
|
||||||
|
#~ "ce mail vous ayant été envoyé automatiquement, merci de vérifier qu'il "
|
||||||
|
#~ "n'est pas arrivé dans vos spams. Malgré cela, si vous ne recevez pas cet "
|
||||||
|
#~ "email, merci de cliquer sur le bouton ci-dessous."
|
||||||
|
|
||||||
|
#~ msgid "Resent me this email"
|
||||||
|
#~ msgstr "Renvoyez-moi cet email"
|
||||||
|
|
||||||
|
#~ msgid ""
|
||||||
|
#~ "An email with instructions to initialized your account have been already "
|
||||||
|
#~ "sent to your email address (%1). Please check your mailbox to continue."
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Un email avec les instructions pour initialiser votre compte vous a déjà "
|
||||||
|
#~ "été envoyé à votre adresse (%1). Merci de consulter votre boîte mail pour "
|
||||||
|
#~ "continuer."
|
||||||
|
|
||||||
|
#~ msgid ""
|
||||||
|
#~ "This email may take a few minutes to reach you. Furthermore, considering "
|
||||||
|
#~ "this email was sent to you automatically, please check that it did not "
|
||||||
|
#~ "arrive in your spam emails. Despite this, if you still do not receive "
|
||||||
|
#~ "this email, please wait until %1 and click on the following button."
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Cet email peut prendre quelques minutes pour vous parvenir. Par ailleurs, "
|
||||||
|
#~ "ce mail vous ayant été envoyé automatiquement, merci de vérifier qu'il "
|
||||||
|
#~ "n'est pas arrivé dans vos spams. Malgré cela, si vous ne recevez toujours "
|
||||||
|
#~ "pas cet email, merci de patienter jusqu'au %1 puis cliquer sur le bouton "
|
||||||
|
#~ "ci-dessous."
|
||||||
|
|
||||||
|
#~ msgid "Please choose your password:"
|
||||||
|
#~ msgstr "Merci de choisir votre mot de passe:"
|
||||||
|
|
||||||
|
#~ msgid "Please repeat it:"
|
||||||
|
#~ msgstr "Merci de le répéter:"
|
||||||
|
|
||||||
|
#~ msgid "Please repeat it."
|
||||||
|
#~ msgstr "Merci de le répéter."
|
||||||
|
|
||||||
|
#~ msgid ""
|
||||||
|
#~ "\n"
|
||||||
|
#~ "Your password must contain from 8 to 10 characters and contains at least "
|
||||||
|
#~ "one caracter that match with 3 of this types :\n"
|
||||||
|
#~ "<ul>\n"
|
||||||
|
#~ " <li>Uppercase unaccent character</li>\n"
|
||||||
|
#~ " <li>Lowercase unaccent character</li>\n"
|
||||||
|
#~ " <li>Digit</li>\n"
|
||||||
|
#~ " <li>Anything that is not a letter or a digit</li>\n"
|
||||||
|
#~ "</ul>"
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "\n"
|
||||||
|
#~ "Votre mot de passe doit contenir de 8 à 10 caractères et au moins un "
|
||||||
|
#~ "caractère correspondant avec 3 des types suivants :\n"
|
||||||
|
#~ "<ul>\n"
|
||||||
|
#~ "<li>Une lettre majuscule non-accuentuée</li>\n"
|
||||||
|
#~ "<li>Une lettre minuscule non-accuentuée</li>\n"
|
||||||
|
#~ "<li>Un chiffre</li>\n"
|
||||||
|
#~ "<li>N'importe quel caractère qui n'est pas une lettre non-accuentée ou un "
|
||||||
|
#~ "chiffre</li>\n"
|
||||||
|
#~ "</ul>"
|
||||||
|
|
||||||
|
#~ msgid "Account initialization - Please check your mailbox"
|
||||||
|
#~ msgstr "Initialisation de compte - Merci de consulter votre boîte mails"
|
||||||
|
|
||||||
|
#~ msgid "Account initialization"
|
||||||
|
#~ msgstr "Initialisation de compte"
|
||||||
|
|
||||||
|
#~ msgid "Account initialization - Choose your password"
|
||||||
|
#~ msgstr "Initialisation de compte - Choisissez votre mot de passe"
|
524
lang/messages.pot
Normal file
524
lang/messages.pot
Normal file
|
@ -0,0 +1,524 @@
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-helpers.php:5
|
||||||
|
msgid "Invalid element identifier."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-helpers.php:9
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:203
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:227
|
||||||
|
#, php-format
|
||||||
|
msgid "Item #% s not found."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/smarty.php:61
|
||||||
|
msgid "Smarty version not supported."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/smarty.php:134
|
||||||
|
msgid "No template specified."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/smarty.php:145
|
||||||
|
msgid "An error occurred while viewing this page."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:7
|
||||||
|
msgid "Hello world !"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:27
|
||||||
|
msgid "Any"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:84
|
||||||
|
msgid ""
|
||||||
|
"An error occurred while listing the items. If the problem persists, please "
|
||||||
|
"contact support."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:96
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:22
|
||||||
|
msgid "Search"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:118
|
||||||
|
#, php-format
|
||||||
|
msgid "Element %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:130
|
||||||
|
#, php-format
|
||||||
|
msgid "The element '% s' has been created."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:134
|
||||||
|
msgid "An error occurred while saving this item."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:140
|
||||||
|
msgid ""
|
||||||
|
"There are errors preventing this item from being saved. Please correct them "
|
||||||
|
"before attempting to add this item."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:146
|
||||||
|
msgid "New"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:156
|
||||||
|
msgid "You cannot edit this item."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:169
|
||||||
|
#, php-format
|
||||||
|
msgid "You have not made any changes to element '% s'."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:173
|
||||||
|
#, php-format
|
||||||
|
msgid "The element '% s' has been updated successfully."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:177
|
||||||
|
msgid "An error occurred while updating this item."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:184
|
||||||
|
msgid ""
|
||||||
|
"There are errors preventing this item from being saved. Please correct them "
|
||||||
|
"before attempting to save your changes."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:194
|
||||||
|
#, php-format
|
||||||
|
msgid "Element %s: Modification"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:207
|
||||||
|
msgid "This item is already archived."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:210
|
||||||
|
msgid "You cannot archive this item."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:213
|
||||||
|
#, php-format
|
||||||
|
msgid "The element '% s' has been archived successfully."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:216
|
||||||
|
msgid "An error occurred while archiving this item."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:230
|
||||||
|
msgid "You cannot delete this item."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:233
|
||||||
|
#, php-format
|
||||||
|
msgid "The element '% s' has been deleted successfully."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:236
|
||||||
|
msgid "An error occurred while deleting this item."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/db.php:31
|
||||||
|
msgid "Unable to connect to the database."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/core.php:44
|
||||||
|
msgid "Pending"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/core.php:45
|
||||||
|
msgid "Validated"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/core.php:46
|
||||||
|
msgid "Refused"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/core.php:47
|
||||||
|
msgid "Archived"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/mail.php:12
|
||||||
|
#, php-format
|
||||||
|
msgid ""
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"Mail initialy intended for %s."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url.php:86
|
||||||
|
msgid "Whoops ! Page not found"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url.php:109
|
||||||
|
msgid ""
|
||||||
|
"Unable to determine the requested page. If the problem persists, please "
|
||||||
|
"contact support."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url.php:258
|
||||||
|
msgid ""
|
||||||
|
"Unable to determine the requested page (loop detected). If the problem "
|
||||||
|
"persists, please contact support."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url.php:282
|
||||||
|
msgid "This request cannot be processed."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url.php:299
|
||||||
|
msgid "This request could not be processed correctly."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:7
|
||||||
|
#, php-format
|
||||||
|
msgid "The CLI command '%s' already exists."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:12
|
||||||
|
#, php-format
|
||||||
|
msgid "The CLI command '%s' handler is not callable !"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:45
|
||||||
|
#, php-format
|
||||||
|
msgid "Usage: %s [-h] [-qd] command\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:46
|
||||||
|
msgid " -h Show this message\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:47
|
||||||
|
msgid " -q / -d Quiet/Debug mode\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:48
|
||||||
|
msgid " --trace Trace mode (the most verbose)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:49
|
||||||
|
msgid " command Command to run\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:51
|
||||||
|
msgid "Available commands:\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:86
|
||||||
|
msgid "Only one command could be executed !"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:110
|
||||||
|
#, php-format
|
||||||
|
msgid ""
|
||||||
|
"Invalid parameter \"%s\".\n"
|
||||||
|
"Note: Command's parameter/argument must be place after the command."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:127
|
||||||
|
#, php-format
|
||||||
|
msgid "An exception occured running command %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:133
|
||||||
|
#, php-format
|
||||||
|
msgid "Item #%s:\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:134
|
||||||
|
#, php-format
|
||||||
|
msgid "ID: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:135
|
||||||
|
#, php-format
|
||||||
|
msgid "Name: '%s'"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:136
|
||||||
|
#, php-format
|
||||||
|
msgid "Date: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:137
|
||||||
|
#, php-format
|
||||||
|
msgid "Description: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:137
|
||||||
|
msgid "Not set"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:138
|
||||||
|
#, php-format
|
||||||
|
msgid "Status: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:191
|
||||||
|
msgid "No item.\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:217
|
||||||
|
#, php-format
|
||||||
|
msgid "%d item(s)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:223
|
||||||
|
msgid "List/search items"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:224
|
||||||
|
msgid "[patterns]"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:226
|
||||||
|
msgid "-o|--orderby Ordering list criterion. Possible values:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:228
|
||||||
|
msgid "-r|--reverse Reverse order"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:229
|
||||||
|
msgid "-s|--status Filter on status. Possible values:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:236
|
||||||
|
msgid "You must provide a valid ID."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:242
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:266
|
||||||
|
#, php-format
|
||||||
|
msgid "Item #%s not found."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:250
|
||||||
|
msgid "Show item"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:251
|
||||||
|
msgid "[ID]"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:256
|
||||||
|
msgid "You must provide item ID."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:260
|
||||||
|
msgid "Invalid item ID"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:271
|
||||||
|
msgid "Are you sure you want to delete this item? Type 'yes' to continue: "
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:275
|
||||||
|
msgid "User cancel"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:281
|
||||||
|
#, php-format
|
||||||
|
msgid "An error occured deleting item #%d."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:288
|
||||||
|
msgid "Delete item"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:289
|
||||||
|
msgid "[item ID]"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:301
|
||||||
|
msgid "Export items (as CSV)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:302
|
||||||
|
msgid "[output file path]"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:314
|
||||||
|
msgid "Restore items (from CSV)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:315
|
||||||
|
msgid "[input file path]"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:374
|
||||||
|
msgid "Cron to handle item expiration"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:377
|
||||||
|
msgid "-j/--just-try Just-try mode : do not really removed expired item(s)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:378
|
||||||
|
msgid "-m/--max-age Item expiration limit (in days, optional)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:393
|
||||||
|
msgid "Fail to list PHP files."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:410
|
||||||
|
msgid "Fail to extract messages from PHP files using xgettext."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:421
|
||||||
|
msgid ""
|
||||||
|
"Fail to extract messages from template files using tsmarty2c.php script."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:431
|
||||||
|
msgid "Fail to merge messages using msgcat."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:436
|
||||||
|
msgid "Extract messages that need to be translated"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:438
|
||||||
|
msgid "This command could be used to generate/update lang/messages.pot file."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
msgstr "Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/form.tpl:7
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:36
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:5
|
||||||
|
msgid "Name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/form.tpl:15
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:11
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:23
|
||||||
|
msgid "Status"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/form.tpl:25
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:32
|
||||||
|
msgid "Description"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/form.tpl:33
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/fatal_error.tpl:9
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:42
|
||||||
|
msgid "Back"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/form.tpl:36
|
||||||
|
msgid "Save"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/form.tpl:38
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:28
|
||||||
|
msgid "Add"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/fatal_error.tpl:5
|
||||||
|
msgid ""
|
||||||
|
"A fatal error has occurred and it is preventing this application from "
|
||||||
|
"working properly. Please try again later or contact support."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/fatal_error.tpl:7
|
||||||
|
msgid "Error: %1"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:8
|
||||||
|
msgid "Pattern"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:16
|
||||||
|
msgid "Nb by page"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:23
|
||||||
|
msgid "Reset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:35
|
||||||
|
msgid "Date"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:37
|
||||||
|
msgid "Actions"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:47
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:50
|
||||||
|
msgid "View"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:51
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:43
|
||||||
|
msgid "Modify"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:52
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:44
|
||||||
|
msgid "Are you sure you want to archive this item?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:52
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:44
|
||||||
|
msgid "Archive"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:53
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:45
|
||||||
|
msgid "Are you sure you want to delete this item?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:53
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:45
|
||||||
|
msgid "Delete"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:59
|
||||||
|
msgid "No item found."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:68
|
||||||
|
msgid "Element(s) %1 to %2 on %3"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/error_404.tpl:3
|
||||||
|
msgid "The requested page can not be found."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:14
|
||||||
|
msgid "Creation date"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:35
|
||||||
|
msgid "Unspecified."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/homepage.tpl:5
|
||||||
|
msgid "Hello, world!"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/homepage.tpl:6
|
||||||
|
msgid ""
|
||||||
|
"This is a simple app to show the different possibilities and basic "
|
||||||
|
"functionality."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/homepage.tpl:8
|
||||||
|
msgid "This app contains some demo pages:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/homepage.tpl:9
|
||||||
|
msgid "Search page"
|
||||||
|
msgstr ""
|
390
lang/php-messages.pot
Normal file
390
lang/php-messages.pot
Normal file
|
@ -0,0 +1,390 @@
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-helpers.php:5
|
||||||
|
msgid "Invalid element identifier."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-helpers.php:9
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:203
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:227
|
||||||
|
#, php-format
|
||||||
|
msgid "Item #% s not found."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/smarty.php:61
|
||||||
|
msgid "Smarty version not supported."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/smarty.php:134
|
||||||
|
msgid "No template specified."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/smarty.php:145
|
||||||
|
msgid "An error occurred while viewing this page."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:7
|
||||||
|
msgid "Hello world !"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:27
|
||||||
|
msgid "Any"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:84
|
||||||
|
msgid ""
|
||||||
|
"An error occurred while listing the items. If the problem persists, please "
|
||||||
|
"contact support."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:96
|
||||||
|
msgid "Search"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:118
|
||||||
|
#, php-format
|
||||||
|
msgid "Element %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:130
|
||||||
|
#, php-format
|
||||||
|
msgid "The element '% s' has been created."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:134
|
||||||
|
msgid "An error occurred while saving this item."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:140
|
||||||
|
msgid ""
|
||||||
|
"There are errors preventing this item from being saved. Please correct them "
|
||||||
|
"before attempting to add this item."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:146
|
||||||
|
msgid "New"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:156
|
||||||
|
msgid "You cannot edit this item."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:169
|
||||||
|
#, php-format
|
||||||
|
msgid "You have not made any changes to element '% s'."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:173
|
||||||
|
#, php-format
|
||||||
|
msgid "The element '% s' has been updated successfully."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:177
|
||||||
|
msgid "An error occurred while updating this item."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:184
|
||||||
|
msgid ""
|
||||||
|
"There are errors preventing this item from being saved. Please correct them "
|
||||||
|
"before attempting to save your changes."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:194
|
||||||
|
#, php-format
|
||||||
|
msgid "Element %s: Modification"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:207
|
||||||
|
msgid "This item is already archived."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:210
|
||||||
|
msgid "You cannot archive this item."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:213
|
||||||
|
#, php-format
|
||||||
|
msgid "The element '% s' has been archived successfully."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:216
|
||||||
|
msgid "An error occurred while archiving this item."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:230
|
||||||
|
msgid "You cannot delete this item."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:233
|
||||||
|
#, php-format
|
||||||
|
msgid "The element '% s' has been deleted successfully."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:236
|
||||||
|
msgid "An error occurred while deleting this item."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/db.php:31
|
||||||
|
msgid "Unable to connect to the database."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/core.php:44
|
||||||
|
msgid "Pending"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/core.php:45
|
||||||
|
msgid "Validated"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/core.php:46
|
||||||
|
msgid "Refused"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/core.php:47
|
||||||
|
msgid "Archived"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/mail.php:12
|
||||||
|
#, php-format
|
||||||
|
msgid ""
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"Mail initialy intended for %s."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url.php:86
|
||||||
|
msgid "Whoops ! Page not found"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url.php:109
|
||||||
|
msgid ""
|
||||||
|
"Unable to determine the requested page. If the problem persists, please "
|
||||||
|
"contact support."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url.php:258
|
||||||
|
msgid ""
|
||||||
|
"Unable to determine the requested page (loop detected). If the problem "
|
||||||
|
"persists, please contact support."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url.php:282
|
||||||
|
msgid "This request cannot be processed."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/url.php:299
|
||||||
|
msgid "This request could not be processed correctly."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:7
|
||||||
|
#, php-format
|
||||||
|
msgid "The CLI command '%s' already exists."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:12
|
||||||
|
#, php-format
|
||||||
|
msgid "The CLI command '%s' handler is not callable !"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:45
|
||||||
|
#, php-format
|
||||||
|
msgid "Usage: %s [-h] [-qd] command\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:46
|
||||||
|
msgid " -h Show this message\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:47
|
||||||
|
msgid " -q / -d Quiet/Debug mode\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:48
|
||||||
|
msgid " --trace Trace mode (the most verbose)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:49
|
||||||
|
msgid " command Command to run\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:51
|
||||||
|
msgid "Available commands:\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:86
|
||||||
|
msgid "Only one command could be executed !"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:110
|
||||||
|
#, php-format
|
||||||
|
msgid ""
|
||||||
|
"Invalid parameter \"%s\".\n"
|
||||||
|
"Note: Command's parameter/argument must be place after the command."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:127
|
||||||
|
#, php-format
|
||||||
|
msgid "An exception occured running command %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:133
|
||||||
|
#, php-format
|
||||||
|
msgid "Item #%s:\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:134
|
||||||
|
#, php-format
|
||||||
|
msgid "ID: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:135
|
||||||
|
#, php-format
|
||||||
|
msgid "Name: '%s'"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:136
|
||||||
|
#, php-format
|
||||||
|
msgid "Date: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:137
|
||||||
|
#, php-format
|
||||||
|
msgid "Description: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:137
|
||||||
|
msgid "Not set"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:138
|
||||||
|
#, php-format
|
||||||
|
msgid "Status: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:191
|
||||||
|
msgid "No item.\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:217
|
||||||
|
#, php-format
|
||||||
|
msgid "%d item(s)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:223
|
||||||
|
msgid "List/search items"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:224
|
||||||
|
msgid "[patterns]"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:226
|
||||||
|
msgid "-o|--orderby Ordering list criterion. Possible values:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:228
|
||||||
|
msgid "-r|--reverse Reverse order"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:229
|
||||||
|
msgid "-s|--status Filter on status. Possible values:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:236
|
||||||
|
msgid "You must provide a valid ID."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:242
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:266
|
||||||
|
#, php-format
|
||||||
|
msgid "Item #%s not found."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:250
|
||||||
|
msgid "Show item"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:251
|
||||||
|
msgid "[ID]"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:256
|
||||||
|
msgid "You must provide item ID."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:260
|
||||||
|
msgid "Invalid item ID"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:271
|
||||||
|
msgid "Are you sure you want to delete this item? Type 'yes' to continue: "
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:275
|
||||||
|
msgid "User cancel"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:281
|
||||||
|
#, php-format
|
||||||
|
msgid "An error occured deleting item #%d."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:288
|
||||||
|
msgid "Delete item"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:289
|
||||||
|
msgid "[item ID]"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:301
|
||||||
|
msgid "Export items (as CSV)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:302
|
||||||
|
msgid "[output file path]"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:314
|
||||||
|
msgid "Restore items (from CSV)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:315
|
||||||
|
msgid "[input file path]"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:374
|
||||||
|
msgid "Cron to handle item expiration"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:377
|
||||||
|
msgid "-j/--just-try Just-try mode : do not really removed expired item(s)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:378
|
||||||
|
msgid "-m/--max-age Item expiration limit (in days, optional)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:393
|
||||||
|
msgid "Fail to list PHP files."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:410
|
||||||
|
msgid "Fail to extract messages from PHP files using xgettext."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:421
|
||||||
|
msgid ""
|
||||||
|
"Fail to extract messages from template files using tsmarty2c.php script."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:431
|
||||||
|
msgid "Fail to merge messages using msgcat."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:436
|
||||||
|
msgid "Extract messages that need to be translated"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/includes/cli.php:438
|
||||||
|
msgid "This command could be used to generate/update lang/messages.pot file."
|
||||||
|
msgstr ""
|
136
lang/templates-messages.pot
Normal file
136
lang/templates-messages.pot
Normal file
|
@ -0,0 +1,136 @@
|
||||||
|
msgid ""
|
||||||
|
msgstr "Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/form.tpl:7
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:36
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:5
|
||||||
|
msgid "Name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/form.tpl:15
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:11
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:23
|
||||||
|
msgid "Status"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/form.tpl:25
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:32
|
||||||
|
msgid "Description"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/form.tpl:33
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/fatal_error.tpl:9
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:42
|
||||||
|
msgid "Back"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/form.tpl:36
|
||||||
|
msgid "Save"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/form.tpl:38
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:28
|
||||||
|
msgid "Add"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/fatal_error.tpl:5
|
||||||
|
msgid ""
|
||||||
|
"A fatal error has occurred and it is preventing this application from "
|
||||||
|
"working properly. Please try again later or contact support."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/fatal_error.tpl:7
|
||||||
|
msgid "Error: %1"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:8
|
||||||
|
msgid "Pattern"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:16
|
||||||
|
msgid "Nb by page"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:22
|
||||||
|
msgid "Search"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:23
|
||||||
|
msgid "Reset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:35
|
||||||
|
msgid "Date"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:37
|
||||||
|
msgid "Actions"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:47
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:50
|
||||||
|
msgid "View"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:51
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:43
|
||||||
|
msgid "Modify"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:52
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:44
|
||||||
|
msgid "Are you sure you want to archive this item?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:52
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:44
|
||||||
|
msgid "Archive"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:53
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:45
|
||||||
|
msgid "Are you sure you want to delete this item?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:53
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:45
|
||||||
|
msgid "Delete"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:59
|
||||||
|
msgid "No item found."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/search.tpl:68
|
||||||
|
msgid "Element(s) %1 to %2 on %3"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/error_404.tpl:3
|
||||||
|
msgid "The requested page can not be found."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:14
|
||||||
|
msgid "Creation date"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/show.tpl:35
|
||||||
|
msgid "Unspecified."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/homepage.tpl:5
|
||||||
|
msgid "Hello, world!"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/homepage.tpl:6
|
||||||
|
msgid ""
|
||||||
|
"This is a simple app to show the different possibilities and basic "
|
||||||
|
"functionality."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/homepage.tpl:8
|
||||||
|
msgid "This app contains some demo pages:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/brenard/dev/eesyphp/templates/homepage.tpl:9
|
||||||
|
msgid "Search page"
|
||||||
|
msgstr ""
|
|
@ -4,4 +4,4 @@ include '../includes/core.php';
|
||||||
include 'url-public.php';
|
include 'url-public.php';
|
||||||
|
|
||||||
$default_url='';
|
$default_url='';
|
||||||
handle_url();
|
handle_request();
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{extends file='empty.tpl'}
|
{extends file='empty.tpl'}
|
||||||
{block name="content"}
|
{block name="content"}
|
||||||
<p class="center">La page demandée est introuvable.</p>
|
<p class="center">{t}The requested page can not be found.{/t}</p>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
{block name="content"}
|
{block name="content"}
|
||||||
<h1 class="center">Oops ...</h1>
|
<h1 class="center">Oops ...</h1>
|
||||||
|
|
||||||
<p class="center">Une erreur fatale est survenue et celle-ci empêche cette application de fonctionner correctement. Merci de réessayer ultérieurement ou de prendre contact avec le service support.</p>
|
<p class="center">{t}A fatal error has occurred and it is preventing this application from working properly. Please try again later or contact support.{/t}</p>
|
||||||
|
|
||||||
<p class='fatal_error_msg'>Erreur : {$fatal_error}</p>
|
<p class='fatal_error_msg'>{t 1=$fatal_error}Error: %1{/t}</p>
|
||||||
|
|
||||||
<div class="center"><a href="javascript:history.back()" class="btn btn-primary"><i class="fa fa-undo"></i> Retour</a></div>
|
<div class="center"><a href="javascript:history.back()" class="btn btn-primary"><i class="fa fa-undo"></i> {t}Back{/t}</a></div>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<input type='hidden' name='session_key' value='{$session_key|escape:'quotes'}' />
|
<input type='hidden' name='session_key' value='{$session_key|escape:'quotes'}' />
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label required">Nom</label>
|
<label class="col-sm-2 col-form-label required">{t}Name{/t}</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input name="name" class="form-control{if array_key_exists('name', $field_errors)} is-invalid{else if $submited} is-valid{/if}" type="text" value='{if array_key_exists('name', $info) && $info.name}{$info.name|escape:'quotes'}{/if}' required/>
|
<input name="name" class="form-control{if array_key_exists('name', $field_errors)} is-invalid{else if $submited} is-valid{/if}" type="text" value='{if array_key_exists('name', $info) && $info.name}{$info.name|escape:'quotes'}{/if}' required/>
|
||||||
{if array_key_exists('name', $field_errors)}<div class="invalid-feedback">{$field_errors['name']}</div>{/if}
|
{if array_key_exists('name', $field_errors)}<div class="invalid-feedback">{$field_errors['name']}</div>{/if}
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label required">Status</label>
|
<label class="col-sm-2 col-form-label required">{t}Status{/t}</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<select name="status" id="status" class="form-control{if array_key_exists('status', $field_errors)} is-invalid{else if $submited} is-valid{/if}" required>
|
<select name="status" id="status" class="form-control{if array_key_exists('status', $field_errors)} is-invalid{else if $submited} is-valid{/if}" required>
|
||||||
{html_options options=$status_list selected=$info.status}
|
{html_options options=$status_list selected=$info.status}
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">Description</label>
|
<label class="col-sm-2 col-form-label">{t}Description{/t}</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<textarea name="description" id="description" class="form-control{if array_key_exists('description', $field_errors)} is-invalid{else if $submited} is-valid{/if}">{if array_key_exists('description', $info) && $info.description}{$info.description|escape:"htmlall"}{/if}</textarea>
|
<textarea name="description" id="description" class="form-control{if array_key_exists('description', $field_errors)} is-invalid{else if $submited} is-valid{/if}">{if array_key_exists('description', $info) && $info.description}{$info.description|escape:"htmlall"}{/if}</textarea>
|
||||||
{if array_key_exists('description', $field_errors)}<div class="form-error">{$field_errors['description']}</div>{/if}
|
{if array_key_exists('description', $field_errors)}<div class="form-error">{$field_errors['description']}</div>{/if}
|
||||||
|
@ -30,12 +30,12 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<a href="{if isset($item_id)}item/{$item_id}{else}search{/if}" class="btn btn-light"><i class="fa fa-undo"></i> Retour</a>
|
<a href="{if isset($item_id)}item/{$item_id}{else}search{/if}" class="btn btn-light"><i class="fa fa-undo"></i> {t}Back{/t}</a>
|
||||||
<button type="submit" name="submit" value="submited" class="btn btn-primary">
|
<button type="submit" name="submit" value="submited" class="btn btn-primary">
|
||||||
{if isset($item_id)}
|
{if isset($item_id)}
|
||||||
<i class="fa fa-floppy-o" aria-hidden="true"></i> Enregistrer
|
<i class="fa fa-floppy-o" aria-hidden="true"></i> {t}Save{/t}
|
||||||
{else}
|
{else}
|
||||||
<i class="fa fa-plus" aria-hidden="true"></i> Ajouter
|
<i class="fa fa-plus" aria-hidden="true"></i> {t}Add{/t}
|
||||||
{/if}
|
{/if}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
{block name="pagetitle"}{/block}
|
{block name="pagetitle"}{/block}
|
||||||
{block name="content"}
|
{block name="content"}
|
||||||
<div class="jumbotron">
|
<div class="jumbotron">
|
||||||
<h1 class="display-4">Hello, world!</h1>
|
<h1 class="display-4">{t}Hello, world!{/t}</h1>
|
||||||
<p class="lead">Ceci est une simple application pour montrer les différentes possibilités et les fonctionalités de base.</p>
|
<p class="lead">{t}This is a simple app to show the different possibilities and basic functionality.{/t}</p>
|
||||||
<hr class="my-4">
|
<hr class="my-4">
|
||||||
<p>Cette application contient quelques pages de démo :.</p>
|
<p>{t}This app contains some demo pages:{/t}</p>
|
||||||
<a class="btn btn-primary btn-lg" href="item" role="button">Page de recherche</a>
|
<a class="btn btn-primary btn-lg" href="item" role="button">{t}Search page{/t}</a>
|
||||||
</div>
|
</div>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
|
@ -5,36 +5,36 @@
|
||||||
<form method='post' class="form-inline">
|
<form method='post' class="form-inline">
|
||||||
<input type='hidden' name='session_key' value='{$session_key|escape:'quotes'}' />
|
<input type='hidden' name='session_key' value='{$session_key|escape:'quotes'}' />
|
||||||
|
|
||||||
<label for="pattern">Mot clé</label>
|
<label for="pattern">{t}Pattern{/t}</label>
|
||||||
<input type="text" name="pattern" class="form-control{if isset($pattern_error) && $pattern_error} is-invalid{/if}" value='{$search.pattern|escape:'quotes'}'/>
|
<input type="text" name="pattern" class="form-control{if isset($pattern_error) && $pattern_error} is-invalid{/if}" value='{$search.pattern|escape:'quotes'}'/>
|
||||||
|
|
||||||
<label for="status">Status</label>
|
<label for="status">{t}Status{/t}</label>
|
||||||
<select name="status" id="status" class="form-control{if isset($status_error) && $status_error} is-invalid{/if}">
|
<select name="status" id="status" class="form-control{if isset($status_error) && $status_error} is-invalid{/if}">
|
||||||
{html_options options=$status_list selected=$search.status}
|
{html_options options=$status_list selected=$search.status}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<label for="nb_by_page">Nb par page</label>
|
<label for="nb_by_page">{t}Nb by page{/t}</label>
|
||||||
<select name="nb_by_page" class="form-control">
|
<select name="nb_by_page" class="form-control">
|
||||||
{html_options values=$nbs_by_page output=$nbs_by_page selected=$search.nb_by_page}
|
{html_options values=$nbs_by_page output=$nbs_by_page selected=$search.nb_by_page}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<div class="btn-group" role="group" aria-label="Actions">
|
<div class="btn-group" role="group" aria-label="Actions">
|
||||||
<button type="submit" name="submit" class="btn btn-primary"><i class="fa fa-search"></i> Rechercher</button>
|
<button type="submit" name="submit" class="btn btn-primary"><i class="fa fa-search"></i> {t}Search{/t}</button>
|
||||||
<a href="{$url_info.current_page}?clear=true" class="btn btn-warning"><i class="fa fa-trash"></i> Réinitialiser</a>
|
<a href="{$request->current_url}?clear=true" class="btn btn-warning"><i class="fa fa-trash"></i> {t}Reset{/t}</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md" style="text-align: righ">
|
<div class="col-md" style="text-align: righ">
|
||||||
<a href="item/new" class="btn btn-success"><i class="fa fa-plus"></i> Ajouter</a>
|
<a href="item/new" class="btn btn-success"><i class="fa fa-plus"></i> {t}Add{/t}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<table class="table" style='margin-top: 1em;'>
|
<table class="table" style='margin-top: 1em;'>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">{table_ordered_th url="{$url_info.current_page}" order="date" text="Date" search=$search}</th>
|
<th scope="col">{table_ordered_th url="{$request->current_url}" order="date" text="{t}Date{/t}" search=$search}</th>
|
||||||
<th scope="col">{table_ordered_th url="{$url_info.current_page}" order="name" text="Facture" search=$search}</th>
|
<th scope="col">{table_ordered_th url="{$request->current_url}" order="name" text="{t}Name{/t}" search=$search}</th>
|
||||||
<th scope="col" class="center">Actions</th>
|
<th scope="col" class="center">{t}Actions{/t}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -44,19 +44,19 @@
|
||||||
<td><a href="item/{$item.id}"><span title='{$item.id|escape:'quotes'}'>{$item.name}</span></a></td>
|
<td><a href="item/{$item.id}"><span title='{$item.id|escape:'quotes'}'>{$item.name}</span></a></td>
|
||||||
<td>{item_status item=$item}</td>
|
<td>{item_status item=$item}</td>
|
||||||
<td class="center">
|
<td class="center">
|
||||||
<a href="item/{$item.id}" class="btn btn-sm btn-info"><i class="fa fa-eye"></i> Voir</a>
|
<a href="item/{$item.id}" class="btn btn-sm btn-info"><i class="fa fa-eye"></i> {t}View{/t}</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="center">
|
<td class="center">
|
||||||
<a href="item/{$item.id}" class="btn btn-sm btn-info"><i class="fa fa-eye"></i> Voir</a>
|
<a href="item/{$item.id}" class="btn btn-sm btn-info"><i class="fa fa-eye"></i> {t}View{/t}</a>
|
||||||
{if can_modify($item)}<a href="item/{$item.id}/modify" class="btn btn-sm btn-primary"><i class="fa fa-edit"></i> Modifier</a>{/if}
|
{if can_modify($item)}<a href="item/{$item.id}/modify" class="btn btn-sm btn-primary"><i class="fa fa-edit"></i> {t}Modify{/t}</a>{/if}
|
||||||
{if can_archive($item)}<a data-myconfirm-url="item/{$item.id}/archive" data-myconfirm-question="Êtes-vous sûre de vouloir archiver cet élément ?" class="btn btn-sm btn-warning myconfirm-link"><i class="fa fa-archive"></i> Archiver</a>{/if}
|
{if can_archive($item)}<a data-myconfirm-url="item/{$item.id}/archive" data-myconfirm-question="{t}Are you sure you want to archive this item?{/t}" class="btn btn-sm btn-warning myconfirm-link"><i class="fa fa-archive"></i> {t}Archive{/t}</a>{/if}
|
||||||
{if can_delete($item)}<a href="#" data-myconfirm-url="item/{$item.id}/delete" data-myconfirm-question="Êtes-vous sûre de vouloir supprimer cet élément ?" class="btn btn-sm btn-danger myconfirm-link"><i class="fa fa-trash"></i> Supprimer</a>{/if}
|
{if can_delete($item)}<a href="#" data-myconfirm-url="item/{$item.id}/delete" data-myconfirm-question="{t}Are you sure you want to delete this item?{/t}" class="btn btn-sm btn-danger myconfirm-link"><i class="fa fa-trash"></i> {t}Delete{/t}</a>{/if}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
{foreachelse}
|
{foreachelse}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4" class="center">Aucun élément trouvé.</td>
|
<td colspan="4" class="center">{t}No item found.{/t}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{if $result.count>1}
|
{if $result.count>1}
|
||||||
<div class="col-lg-3">
|
<div class="col-lg-3">
|
||||||
<div role="status">Élement(s) {$result.first} à {$result.last} sur {$result.count}</div>
|
<div role="status">{t 1=$result.first 2=$result.last 3=$result.count}Element(s) %1 to %2 on %3{/t}</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{if $result.nb_pages > 1}
|
{if $result.nb_pages > 1}
|
||||||
|
@ -73,10 +73,10 @@
|
||||||
<nav aria-label="Navigation par page">
|
<nav aria-label="Navigation par page">
|
||||||
<ul class="pagination justify-content-end">
|
<ul class="pagination justify-content-end">
|
||||||
<li{if $result.page==1} class="disabled"{/if}>
|
<li{if $result.page==1} class="disabled"{/if}>
|
||||||
<a href="{$url_info.current_page}?page=1" aria-label="Première page" class="page-link"><span aria-hidden="true">««</span></a>
|
<a href="{$request->current_url}?page=1" aria-label="Première page" class="page-link"><span aria-hidden="true">««</span></a>
|
||||||
</li>
|
</li>
|
||||||
<li{if $result.page==1} class="disabled"{/if}>
|
<li{if $result.page==1} class="disabled"{/if}>
|
||||||
<a href="{$url_info.current_page}?page={$result.page-1}" aria-label="Page précédente" class="page-link"><span aria-hidden="true">«</span></a>
|
<a href="{$request->current_url}?page={$result.page-1}" aria-label="Page précédente" class="page-link"><span aria-hidden="true">«</span></a>
|
||||||
</li>
|
</li>
|
||||||
{if $result.nb_pages > 9}
|
{if $result.nb_pages > 9}
|
||||||
{if $result.page > 4}
|
{if $result.page > 4}
|
||||||
|
@ -89,18 +89,18 @@
|
||||||
{assign var=start value=0}
|
{assign var=start value=0}
|
||||||
{/if}
|
{/if}
|
||||||
{foreach from=1|range:9 item=i}
|
{foreach from=1|range:9 item=i}
|
||||||
<li class="paginate_button{if $result.page==$start+$i} active{/if}"><a href="{$url_info.current_page}?page={$start+$i}" class="page-link">{$start+$i}</a></li>
|
<li class="paginate_button{if $result.page==$start+$i} active{/if}"><a href="{$request->current_url}?page={$start+$i}" class="page-link">{$start+$i}</a></li>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
{else}
|
{else}
|
||||||
{section name=listpage start=1 loop=$result.nb_pages+1 step=1}
|
{section name=listpage start=1 loop=$result.nb_pages+1 step=1}
|
||||||
<li class="paginate_button{if $result.page == $smarty.section.listpage.index} active{/if}"><a href="{$url_info.current_page}?page={$smarty.section.listpage.index}" class="page-link">{$smarty.section.listpage.index}</a></li>
|
<li class="paginate_button{if $result.page == $smarty.section.listpage.index} active{/if}"><a href="{$request->current_url}?page={$smarty.section.listpage.index}" class="page-link">{$smarty.section.listpage.index}</a></li>
|
||||||
{/section}
|
{/section}
|
||||||
{/if}
|
{/if}
|
||||||
<li{if $result.page==$result.nb_pages} class="disabled"{/if}>
|
<li{if $result.page==$result.nb_pages} class="disabled"{/if}>
|
||||||
<a href="{$url_info.current_page}?page={$result.page+1}" aria-label="Page suivante" class="page-link"><span aria-hidden="true">»</span></a>
|
<a href="{$request->current_url}?page={$result.page+1}" aria-label="Page suivante" class="page-link"><span aria-hidden="true">»</span></a>
|
||||||
</li>
|
</li>
|
||||||
<li{if $result.page==$result.nb_pages} class="disabled"{/if}>
|
<li{if $result.page==$result.nb_pages} class="disabled"{/if}>
|
||||||
<a href="{$url_info.current_page}?page={$result.nb_pages}" aria-label="Dernière page" class="page-link"><span aria-hidden="true">»»</span></a>
|
<a href="{$request->current_url}?page={$result.nb_pages}" aria-label="Dernière page" class="page-link"><span aria-hidden="true">»»</span></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{block name="content"}
|
{block name="content"}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-4 col-form-label">Nom</label>
|
<label class="col-sm-4 col-form-label">{t}Name{/t}</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<span class="form-control-plaintext">
|
<span class="form-control-plaintext">
|
||||||
{$item.name}
|
{$item.name}
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-4 col-form-label">Date de création</label>
|
<label class="col-sm-4 col-form-label">{t}Creation date{/t}</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<span class="form-control-plaintext">
|
<span class="form-control-plaintext">
|
||||||
{format_time time=$item.date}
|
{format_time time=$item.date}
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-4 col-form-label">Statut</label>
|
<label class="col-sm-4 col-form-label">{t}Status{/t}</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<span class="form-control-plaintext">
|
<span class="form-control-plaintext">
|
||||||
{item_status item=$item}
|
{item_status item=$item}
|
||||||
|
@ -29,19 +29,19 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-4 col-form-label">Description</label>
|
<label class="col-sm-4 col-form-label">{t}Description{/t}</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<span class="form-control-plaintext">
|
<span class="form-control-plaintext">
|
||||||
{if $item.description}{$item.description|escape:'htmlall'}{else}Non renseignée.{/if}
|
{if $item.description}{$item.description|escape:'htmlall'}{else}{t}Unspecified.{/t}{/if}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<a href="item" class="btn btn-light"><i class="fa fa-undo"></i> Retour</a>
|
<a href="item" class="btn btn-light"><i class="fa fa-undo"></i> {t}Back{/t}</a>
|
||||||
{if can_modify($item)}<a href="item/{$item.id}/modify" class="btn btn-primary"><i class="fa fa-edit"></i> Modifier</a>{/if}
|
{if can_modify($item)}<a href="item/{$item.id}/modify" class="btn btn-primary"><i class="fa fa-edit"></i> {t}Modify{/t}</a>{/if}
|
||||||
{if can_archive($item)}<a data-myconfirm-url="item/{$item.id}/archive" data-myconfirm-question="Êtes-vous sûre de vouloir archiver cet élément ?" class="btn btn-warning myconfirm-link"><i class="fa fa-archive"></i> Archiver</a>{/if}
|
{if can_archive($item)}<a data-myconfirm-url="item/{$item.id}/archive" data-myconfirm-question="{t}Are you sure you want to archive this item?{/t}" class="btn btn-warning myconfirm-link"><i class="fa fa-archive"></i> {t}Archive{/t}</a>{/if}
|
||||||
{if can_delete($item)}<a href="#" data-myconfirm-url="item/{$item.id}/delete" data-myconfirm-question="Êtes-vous sûre de vouloir supprimer cet élément ?" class="btn btn-danger myconfirm-link"><i class="fa fa-trash"></i> Supprimer</a>{/if}
|
{if can_delete($item)}<a href="#" data-myconfirm-url="item/{$item.id}/delete" data-myconfirm-question="{t}Are you sure you want to delete this item?{/t}" class="btn btn-danger myconfirm-link"><i class="fa fa-trash"></i> {t}Delete{/t}</a>{/if}
|
||||||
</div>
|
</div>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
Loading…
Reference in a new issue