diff --git a/.codespell-exclusions b/.codespell-exclusions new file mode 100644 index 0000000..27900db --- /dev/null +++ b/.codespell-exclusions @@ -0,0 +1,6 @@ +.git +./static/lib +./vendor +./example/data +./locales/*.js +*.pot diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4c5e5e3..f727290 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,9 +1,33 @@ # Pre-commit hooks to run tests and ensure code is cleaned. # See https://pre-commit.com for more information +--- repos: -- repo: https://github.com/digitalpulp/pre-commit-php.git - rev: 1.4.0 - hooks: - - id: php-stan - files: \.(php)$ - args: ['--configuration=phpstan.neon'] + - repo: https://github.com/codespell-project/codespell + rev: v2.2.2 + hooks: + - id: codespell + exclude: static/lib/|locales/.*\.js$|\.pot$ + args: ["--write-changes"] + exclude_types: [csv, json] + - repo: https://github.com/adrienverge/yamllint + rev: v1.32.0 + hooks: + - id: yamllint + ignore: .github/ + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v2.7.1 + hooks: + - id: prettier + - repo: https://github.com/digitalpulp/pre-commit-php.git + rev: 1.4.0 + hooks: + - id: php-stan + files: \.(php)$ + args: ["--configuration=phpstan.neon"] + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-executables-have-shebangs + stages: [manual] + - id: check-json + exclude: (.vscode|.devcontainer) diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..7e07b6c --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +/static/lib/* +/locales/* +/example/locales/* diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000..1288913 --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,9 @@ +extends: default + +ignore: | + static/lib/* + +rules: + line-length: + max: 100 + level: warning diff --git a/README.md b/README.md index fd00ab6..b490fb2 100644 --- a/README.md +++ b/README.md @@ -10,20 +10,20 @@ This project aim to provide all main necessary elements to build a web applicati Main features are : -* a configuration manager actually based on the [yaml](https://yaml.org/) file format -* an URL routing system with a syntax based on regex -* a templating solution based on [Smarty](https://www.smarty.net/) -* an easily expandable authentication system with native HTML form, HTTP and CAS SSO support (based on [phpCAS](https://github.com/apereo/phpCAS)), database and LDAP users backends and a ligth user object abstraction solution with expandable attributes -* a logging system with PHP errors & exceptions handling -* a light database integration based on [FluentPDO](https://github.com/envms/fluentpdo) -* a [Sentry](https://sentry.io) integration -* a PHP session manager (with expiration and max life handling) -* a mailer solution to forge and send emails -* an hook system to easily trigger and register hooks on events -* a static files serving system with an overloadable multiple directories support -* an internationalization system based on [Gettext](https://www.gnu.org/software/gettext/) with Smarty templates (based on [Smarty Gettext](https://github.com/smarty-gettext/smarty-gettext)) and Javascript (based on [Babel JS](https://babeljs.io/)) integrations -* a command line manager to easily implement CLI tools -* collection of helpers to check, clean, cast, format (etc) values +- a configuration manager actually based on the [yaml](https://yaml.org/) file format +- an URL routing system with a syntax based on regex +- a templating solution based on [Smarty](https://www.smarty.net/) +- an easily expandable authentication system with native HTML form, HTTP and CAS SSO support (based on [phpCAS](https://github.com/apereo/phpCAS)), database and LDAP users backends and a light user object abstraction solution with expandable attributes +- a logging system with PHP errors & exceptions handling +- a light database integration based on [FluentPDO](https://github.com/envms/fluentpdo) +- a [Sentry](https://sentry.io) integration +- a PHP session manager (with expiration and max life handling) +- a mailer solution to forge and send emails +- an hook system to easily trigger and register hooks on events +- a static files serving system with an overloadable multiple directories support +- an internationalization system based on [Gettext](https://www.gnu.org/software/gettext/) with Smarty templates (based on [Smarty Gettext](https://github.com/smarty-gettext/smarty-gettext)) and Javascript (based on [Babel JS](https://babeljs.io/)) integrations +- a command line manager to easily implement CLI tools +- collection of helpers to check, clean, cast, format (etc) values All this features can be or not enabled and their initialization are manage by an application abstraction class. @@ -43,9 +43,9 @@ as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/composer.json b/composer.json index 71dd5a8..d9e3112 100644 --- a/composer.json +++ b/composer.json @@ -1,39 +1,39 @@ { - "name": "brenard/eesyphp", - "description": "Easyphp PHP framework for simple web apps", - "authors": [ - { - "name": "Benjamin Renard", - "email": "brenard@easter-eggs.com" - } - ], - "license": "GPL-3.0-or-later", - "autoload": { - "psr-4": { - "EesyPHP\\": "src/" - }, - "files": [ - "src/functions.php" - ] + "name": "brenard/eesyphp", + "description": "Easyphp PHP framework for simple web apps", + "authors": [ + { + "name": "Benjamin Renard", + "email": "brenard@easter-eggs.com" + } + ], + "license": "GPL-3.0-or-later", + "autoload": { + "psr-4": { + "EesyPHP\\": "src/" }, - "require": { - "envms/fluentpdo": "^2.2", - "pear/console_table": "^1.3", - "brenard/php-unidecode": "dev-master", - "smarty/smarty": "^4.3.0", - "smarty-gettext/smarty-gettext": "^1.6", - "sepia/po-parser": "^6.0", - "sentry/sdk": "^3.3", - "ext-pdo": ">=7.3", - "ext-json": "*", - "ext-yaml": "^2.0", - "league/mime-type-detection": "^1.11", - "apereo/phpcas": "^1.6" - }, - "require-dev": { - "phpstan/phpstan": "^1.9" - }, - "bin": [ - "eesyphp" + "files": [ + "src/functions.php" ] + }, + "require": { + "envms/fluentpdo": "^2.2", + "pear/console_table": "^1.3", + "brenard/php-unidecode": "dev-master", + "smarty/smarty": "^4.3.0", + "smarty-gettext/smarty-gettext": "^1.6", + "sepia/po-parser": "^6.0", + "sentry/sdk": "^3.3", + "ext-pdo": ">=7.3", + "ext-json": "*", + "ext-yaml": "^2.0", + "league/mime-type-detection": "^1.11", + "apereo/phpcas": "^1.6" + }, + "require-dev": { + "phpstan/phpstan": "^1.9" + }, + "bin": [ + "eesyphp" + ] } diff --git a/docs/config.md b/docs/config.md index 5dd4328..093e5f0 100644 --- a/docs/config.md +++ b/docs/config.md @@ -1,6 +1,6 @@ # Configuration -The main configuration file is *includes/config.inc.php*. You can overrides all variables that main configuration file contain in your own configuration file *includes/config.local.php*. This file will be automatically included if present. +The main configuration file is _includes/config.inc.php_. You can overrides all variables that main configuration file contain in your own configuration file _includes/config.local.php_. This file will be automatically included if present. > **Note :** In the configuration files, to refer to the application root directory, you could use the variable `$root_dir_path` (that does not contain the trailing slash). @@ -11,44 +11,47 @@ The main configuration file is *includes/config.inc.php*. You can overrides all ## Data/files directories : All application data are, by default, in _data_ sub-directory. You could configure it by using the following variables : - - `$data_dir` : Root DATA directory (Default : _data_) - - `$tmp_root_dir` : Root temporary files directory (Default : _$data_dir/tmp_) - - `$logs_dir_path` : Logs directory (Default : _$data_dir/logs_) - - `$upload_tmp_dir` : Temporary directory for PHP uploading files : when uploading files, PHP will stored files in this directory before application move it to their final destination (Default : _$data_dir/uploading_) - - `$smarty_templates_c_dir` : Templates cache directory (Default : _$tmp_root_dir/templates_c_) + +- `$data_dir` : Root DATA directory (Default : _data_) +- `$tmp_root_dir` : Root temporary files directory (Default : _$data_dir/tmp_) +- `$logs_dir_path` : Logs directory (Default : _$data_dir/logs_) +- `$upload_tmp_dir` : Temporary directory for PHP uploading files : when uploading files, PHP will stored files in this directory before application move it to their final destination (Default : _$data_dir/uploading_) +- `$smarty_templates_c_dir` : Templates cache directory (Default : _$tmp_root_dir/templates_c_) ## Logs : -Default log files path is *data/logs/app.log* (and *data/logs/cli.log* for CLI tool). This could be configured using `$log_file` configuration variable. You can also set the log level using `$log_level` variable *(default value = "INFO", see config.inc.php).* +Default log files path is _data/logs/app.log_ (and _data/logs/cli.log_ for CLI tool). This could be configured using `$log_file` configuration variable. You can also set the log level using `$log_level` variable _(default value = "INFO", see config.inc.php)._ ## Database configuration : -The database is used to store demo items information. For this reason, a basic *Sqlite* database could be used and is the default database backend. However, you can use any database backend supported by the [PHP PDO abstraction system](http://php.net/pdo). +The database is used to store demo items information. For this reason, a basic _Sqlite_ database could be used and is the default database backend. However, you can use any database backend supported by the [PHP PDO abstraction system](http://php.net/pdo). The database connection is configured using the following variables : - - `$dn_dsn` : the *Data Source Name (DSN)* depending on your database backend. - - `$db_user` : the database username. - - `$db_pwd` : the database password. - - `$db_options` : the database connection options (see your PHP PDO Driver documentation). By default, this variable value is an empty array ("`array()`"). - - `$db_date_format` : the date format as retreive from the database. - - `$db_datetime_format` : the date and time format as retreive from the database. + +- `$dn_dsn` : the _Data Source Name (DSN)_ depending on your database backend. +- `$db_user` : the database username. +- `$db_pwd` : the database password. +- `$db_options` : the database connection options (see your PHP PDO Driver documentation). By default, this variable value is an empty array ("`array()`"). +- `$db_date_format` : the date format as retrieve from the database. +- `$db_datetime_format` : the date and time format as retrieve from the database. > **Note :** You could find some configuration examples for _PostgreSQL_, _MariaDB / MySQL_ or _Sqlite_ in _config.inc.php_ file. Initial _SQL_ files could also be found in _data_ directory. ## E-mail configuration : -This application send some mail by using [PEAR Mail library](http://pear.php.net/package/Mail). The path of this library must be specify using `$php_mail_path`. The default value corresponding to the version provided by *php-mail* Debian package. +This application send some mail by using [PEAR Mail library](http://pear.php.net/package/Mail). The path of this library must be specify using `$php_mail_path`. The default value corresponding to the version provided by _php-mail_ Debian package. -This library support different methods to send mail and the default one is *SMTP*. This method require that the [PEAR Net_SMTP library](http://pear.php.net/package/Net_SMTP) is also installed on the system. You could configure another method sending method using the variable `$mail_send_method` (see comment in *config.inc.php* file or [the PEAR Mail library documentation](http://pear.php.net/manual/en/package.mail.mail.factory.php)). +This library support different methods to send mail and the default one is _SMTP_. This method require that the [PEAR Net_SMTP library](http://pear.php.net/package/Net_SMTP) is also installed on the system. You could configure another method sending method using the variable `$mail_send_method` (see comment in _config.inc.php_ file or [the PEAR Mail library documentation](http://pear.php.net/manual/en/package.mail.mail.factory.php)). -Depending on the sending method choose, some options are available to configure their usage (see comment in *config.inc.php* file or [the PEAR Mail library documentation](http://pear.php.net/manual/en/package.mail.mail.factory.php)) and could be configured using `$mail_send_params` variable. +Depending on the sending method choose, some options are available to configure their usage (see comment in _config.inc.php_ file or [the PEAR Mail library documentation](http://pear.php.net/manual/en/package.mail.mail.factory.php)) and could be configured using `$mail_send_params` variable. -To forge e-mail, this application use [PEAR Mail_Mime library](http://pear.php.net/package/Mail_Mime). The path of this library must be specify using `$php_mail_mime_path`. The default value corresponding to the version provided by *php-mail-mime* Debian package. +To forge e-mail, this application use [PEAR Mail_Mime library](http://pear.php.net/package/Mail_Mime). The path of this library must be specify using `$php_mail_mime_path`. The default value corresponding to the version provided by _php-mail-mime_ Debian package. Some other variables exist to manage the email sending by the application : - - `$mail_headers` : an PHP array of default headers add to mail sent by the application - - `$mail_sender` : the email address of the sender of all emails sent by the application - - `$mail_catch_all` : for debugging purpose, you can using this variable to specify an email address that will received all email sent by the application in place of the original recipient + +- `$mail_headers` : an PHP array of default headers add to mail sent by the application +- `$mail_sender` : the email address of the sender of all emails sent by the application +- `$mail_catch_all` : for debugging purpose, you can using this variable to specify an email address that will received all email sent by the application in place of the original recipient ## Web stats JS code inclusion diff --git a/docs/install.md b/docs/install.md index a8c0726..6eed992 100644 --- a/docs/install.md +++ b/docs/install.md @@ -22,7 +22,7 @@ apt install php-ldap php-net-ldap2 ## Deployment : -To deploy this application, for instance in */var/www/eesyphp*, run this commands : +To deploy this application, for instance in _/var/www/eesyphp_, run this commands : ```bash cd /var/www @@ -77,9 +77,9 @@ sudo mysql items < /var/www/eesyphp/data/mariadb-mysql.init-db.sql ## Configure PHP FPM pool : -You could configure a dedicated *PHP FPM pool*. +You could configure a dedicated _PHP FPM pool_. -***Example :*** +**_Example :_** ``` [eesyphp] @@ -104,9 +104,9 @@ php_value[date.timezone] = Europe/Paris ## Configure Apache VirtualHost : -You could configure a dedicated *VirtualHost*. +You could configure a dedicated _VirtualHost_. -***Example :*** +**_Example :_** ``` diff --git a/example/includes/cli.php b/example/includes/cli.php index b57ce11..4779dff 100644 --- a/example/includes/cli.php +++ b/example/includes/cli.php @@ -172,7 +172,7 @@ function cli_delete($command_args) { echo "\n"; if (!delete_item($item['id'])) - Log :: fatal(_("An error occured deleting item #%d."), $item_id); + Log :: fatal(_("An error occurred deleting item #%d."), $item_id); return True; } diff --git a/example/includes/config.yml b/example/includes/config.yml index e383984..003839f 100644 --- a/example/includes/config.yml +++ b/example/includes/config.yml @@ -34,7 +34,7 @@ log: file_path: "${log.directory_path}/app.log" # Log level (TRACE / DEBUG / INFO / WARNING / ERROR / FATAL) - level: 'INFO' + level: "INFO" # Log PHP errors levels (as specified to set_error_handler()) # Note: expected a list of PHP error level constants that will be resolved and combine @@ -51,7 +51,6 @@ log: # - ~E_STRICT # - ~E_DEPRECATED - # # Sentry configuration # @@ -70,7 +69,6 @@ sentry: - "E_RECOVERABLE_ERROR" - "E_DEPRECATED" - # Traces sample rate (between 0 and 1) # Note: this parameter permit to determine how many transactions (=~ access) are traced and # sent to Sentry, for instance, 0.2 meen that 20% of the transactions will be traced. In dev @@ -118,8 +116,8 @@ db: options: null # Date/Datetime format in database (strptime format) - date_format: '%s' - datetime_format: '%s' + date_format: "%s" + datetime_format: "%s" # Postgresql #dsn: "pgsql:host=localhost;port=5432;dbname=items" @@ -128,8 +126,8 @@ db: #options: null # Date/Datetime format in database (strptime format) - #date_format: '%Y-%m-%d' # Exemple : 2018-10-12 - #datetime_format: '%Y-%m-%d %H:%M:%S' # Exemple : 2018-10-12 18:06:59 + #date_format: '%Y-%m-%d' # Example : 2018-10-12 + #datetime_format: '%Y-%m-%d %H:%M:%S' # Example : 2018-10-12 18:06:59 # MariaDB / MySQL #dsn: "mysql:host=localhost;dbname=items" @@ -138,9 +136,8 @@ db: #options: null # Date/Datetime format in database (strptime format) - #date_format: '%Y-%m-%d' # Exemple : 2018-10-12 - #datetime_format: '%Y-%m-%d %H:%M:%S' # Exemple : 2018-10-12 18:06:59 - + #date_format: '%Y-%m-%d' # Example : 2018-10-12 + #datetime_format: '%Y-%m-%d %H:%M:%S' # Example : 2018-10-12 18:06:59 # # Authentication @@ -185,18 +182,18 @@ auth: # http: # HTTP Auth methods : - # * AUTHORIZATION : use HTTP_AUTHORIZATION environnement. This mode could be use with PHP FPM. + # * AUTHORIZATION : use HTTP_AUTHORIZATION environment. This mode could be use with PHP FPM. # Specific configuration is need in Apache to use this mode : # RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] - # * REMOTE_USER : use REMOTE_USER environnement variable to retreive authenticated user's login + # * REMOTE_USER : use REMOTE_USER environment variable to retrieve authenticated user's login # This method could be only used with $http_auth_trust_without_password_challenge # enabled. - # * PHP_AUTH : use PHP_AUTH_USER and PHP_AUTH_PW environnement variables (only available + # * PHP_AUTH : use PHP_AUTH_USER and PHP_AUTH_PW environment variables (only available # using mod_php with Apache. (default) - method: 'PHP_AUTH' + method: "PHP_AUTH" # Trust HTTP server authentication - # If enabled, the application will no check user credentials and only retreive user's login + # If enabled, the application will no check user credentials and only retrieve user's login # from HTTP server. #trust_without_password_challenge: true @@ -208,17 +205,17 @@ auth: # cas: # CAS host (just the domain name) - host: 'idp.example.com' + host: "idp.example.com" # CAS context (the root path, default: '/idp/cas') # Example: for 'http://idp.example.com/idp/cas', put '/idp/cas' - context: '/idp/cas' + context: "/idp/cas" # CAS HTTP port (default: 443) #port: 443 # CAS procotol version - # Posssible values: "1.0", "2.0" (default), "3.0" or "S1" (SAML1) + # Possible values: "1.0", "2.0" (default), "3.0" or "S1" (SAML1) #version: '2.0' # CAS server SSL certificate validation (set to false to disable) @@ -233,8 +230,8 @@ auth: # CAS Fake authenticated user #fake_authenticated_user: 'myusername' - - # CAS user attributes to retreive with their properties: + + # CAS user attributes to retrieve with their properties: # [attr name]: # # CAS attribute name (optional, default: [attr name]) # cas_name: [CAS attr name] @@ -247,14 +244,14 @@ auth: # Note: only used by casuser auth backend. user_attributes: login: - cas_name: 'uid' + cas_name: "uid" default: null name: - cas_name: 'displayName' - cas_ldap_name: 'cn' + cas_name: "displayName" + cas_ldap_name: "cn" default: null mail: - type: 'string' + type: "string" # # Database user backend @@ -275,7 +272,7 @@ auth: # Password field name (optional, default: password) password_field: "password" # Exposed users table fields in resulting EesyPHP\Auth\User object - # (optional, defailt: name, mail) + # (optional, default: name, mail) exposed_fields: - "name" - "mail" @@ -285,7 +282,7 @@ auth: # ldap: # LDAP host (required, multiple hosts could be specified with comma separator) - host: 'ldap://localhost' + host: "ldap://localhost" # LDAP port (optional) #port: 389 @@ -294,7 +291,7 @@ auth: #starttls: false # LDAP directory base DN (required) - basedn: 'o=example' + basedn: "o=example" # LDAP bind DN (optional) #bind_dn: 'uid=eesyphp,ou=sysaccounts,${auth.ldap.basedn}' @@ -307,12 +304,12 @@ auth: #user_filter_by_uid: 'uid=[username]' # User base DN - user_basedn: 'ou=people,${auth.ldap.basedn}' + user_basedn: "ou=people,${auth.ldap.basedn}" # Bind with username instead of user DN (optional, default: false) #bind_with_username: true - # LDAP user attributes to retreive with their properties: + # LDAP user attributes to retrieve with their properties: # [attr name]: # # LDAP attribute name (optional, default: [attr name]) # ldap_name: [LDAP attr name] @@ -326,16 +323,16 @@ auth: # default: null user_attributes: login: - ldap_name: 'uid' + ldap_name: "uid" multivalued: false default: null name: - ldap_name: 'displayName' - alt_ldap_name: 'cn' + ldap_name: "displayName" + alt_ldap_name: "cn" multivalued: false default: null mail: - type: 'string' + type: "string" # PEAR Net_LDAP2 library path (optional, default: Net/LDAP2.php) #netldap2_path: 'Net/LDAP2.php' @@ -345,15 +342,14 @@ auth: # email: # PHP PEAR Mail and Mail_Mine paths - php_mail_path: 'Mail.php' - php_mail_mime_path: 'Mail/mime.php' - + php_mail_path: "Mail.php" + php_mail_mime_path: "Mail/mime.php" # Sending method : # - mail : use PHP mail function # - sendmail : use sendmail system command # - smtp : use an SMTP server (PHP PEAR Net_SMTP required) - send_method: 'smtp' + send_method: "smtp" # Sending parameters # See : http:#pear.php.net/manual/en/package.mail.mail.factory.php @@ -368,7 +364,6 @@ email: # Catch all e-mails sent to a configured e-mail address catch_all: false - # Web Stats JS code #webstats_js_code: '' diff --git a/example/includes/db.php b/example/includes/db.php index 0e87c81..1fddadb 100644 --- a/example/includes/db.php +++ b/example/includes/db.php @@ -34,7 +34,7 @@ function get_items($orderby='id', $raw_values=false) { return $items; } catch (Exception $e) { - Log :: error("Error retreiving items info from database : ".$e->getMessage()); + Log :: error("Error retrieving items info from database : ".$e->getMessage()); } return false; } @@ -53,7 +53,7 @@ function get_item($id, $raw_values=false) { return $db -> format_row_info($info, array('date')); } catch (Exception $e) { - Log :: error("Error retreiving item #$id info from database : ".$e->getMessage()); + Log :: error("Error retrieving item #$id info from database : ".$e->getMessage()); } return false; } @@ -280,7 +280,7 @@ function search_items($params) { } catch (Exception $e) { Log :: exception( - $e, "An exception occured searching items with params %s infos from database : ", + $e, "An exception occurred searching items with params %s infos from database : ", preg_replace("/\n[ \t]*/", " ", print_r($params, true)) ); } @@ -322,7 +322,7 @@ function restore_items($fd=null) { $result = $db -> fpdo -> deleteFrom('item') -> execute(); if ($result === false) { - Log :: error("An unknown error occured truncating item table in database."); + Log :: error("An unknown error occurred truncating item table in database."); return false; } } @@ -369,7 +369,7 @@ function restore_items($fd=null) { $restored++; } else { - Log :: error("Unkwown error occured restoring item from line #$line :\n".print_r($values, true)); + Log :: error("Unknown error occurred restoring item from line #$line :\n".print_r($values, true)); $error = true; } } diff --git a/example/includes/functions.php b/example/includes/functions.php index ab93710..8243294 100644 --- a/example/includes/functions.php +++ b/example/includes/functions.php @@ -31,7 +31,7 @@ function handle_item_post_data(&$info, $enabled_fields=null, $required_fields=nu $info['name'] = $_POST['name']; } else { - $field_errors['name'] = "Ce nom est invalide."; + $field_errors['name'] = "Ce nom est invalid."; } } else { @@ -61,7 +61,7 @@ function handle_item_post_data(&$info, $enabled_fields=null, $required_fields=nu $info['description'] = $_POST['description']; } else { - $field_errors['description'] = "Cette description est invalide."; + $field_errors['description'] = "Cette description est invalid."; } } } @@ -88,7 +88,7 @@ function handle_item_post_data(&$info, $enabled_fields=null, $required_fields=nu } /* - * Parser/formater values helpers + * Parser/formatter values helpers */ function can_modify($item) { diff --git a/example/includes/url-helpers.php b/example/includes/url-helpers.php index 9332631..1b19d75 100644 --- a/example/includes/url-helpers.php +++ b/example/includes/url-helpers.php @@ -10,7 +10,7 @@ function get_item_from_url($id, $fatal=false) { $item = get_item($id); if(!is_array($item)) { - $error = sprintf(_("Item #% s not found."), $id); + $error = sprintf(_("Item #%s not found."), $id); if ($fatal) Log :: fatal($error); Tpl :: add_error($error); diff --git a/example/includes/url-public.php b/example/includes/url-public.php index a993f4b..a3a496f 100644 --- a/example/includes/url-public.php +++ b/example/includes/url-public.php @@ -156,7 +156,7 @@ function handle_create($request) { if (isset($_POST['submit']) && empty($field_errors)) { $item = add_item($info); if (is_array($item)) { - Tpl :: add_message(_("The element '% s' has been created."), $item['name']); + Tpl :: add_message(_("The element '%s' has been created."), $item['name']); Url :: redirect('item/'.$item['id']); } Tpl :: add_error(_("An error occurred while saving this item.")); @@ -196,11 +196,11 @@ function handle_modify($request) { } Log :: debug('Changes : '.vardump($changes)); if (empty($changes)) { - Tpl :: add_message(_("You have not made any changes to element '% s'."), $item['name']); + Tpl :: add_message(_("You have not made any changes to element '%s'."), $item['name']); Url :: redirect('item/'.$item['id']); } if (update_item($item['id'], $changes) === true) { - Tpl :: add_message(_("The element '% s' has been updated successfully."), $item['name']); + Tpl :: add_message(_("The element '%s' has been updated successfully."), $item['name']); Url :: redirect('item/'.$item['id']); } Tpl :: add_error(_("An error occurred while updating this item.")); @@ -229,7 +229,7 @@ Url :: add_url_handler('|^item/(?P[0-9]+)/modify$|', 'handle_modify'); function handle_archive($request) { $item = get_item_from_url($request -> id); if(!is_array($item)) { - Tpl :: add_error(_("Item #% s not found."), $request -> id); + Tpl :: add_error(_("Item #%s not found."), $request -> id); Url :: redirect('item'); } if ($item['status'] == 'archived') { @@ -239,7 +239,7 @@ function handle_archive($request) { Tpl :: add_error(_('You cannot archive this item.')); } else if (archive_item($item['id']) === true) { - Tpl :: add_message(_("The element '% s' has been archived successfully."), $item['name']); + Tpl :: add_message(_("The element '%s' has been archived successfully."), $item['name']); } else { Tpl :: add_error(_('An error occurred while archiving this item.')); @@ -256,13 +256,13 @@ Url :: add_url_handler('|^item/(?P[0-9]+)/archive$|', 'handle_archive'); function handle_delete($request) { $item = get_item_from_url($request -> id); if(!is_array($item)) { - Tpl :: add_error(_("Item #% s not found."), $request -> id); + Tpl :: add_error(_("Item #%s not found."), $request -> id); } else if (!can_delete($item)) { Tpl :: add_error(_('You cannot delete this item.')); } else if (delete_item($item['id']) === true) { - Tpl :: add_message(_("The element '% s' has been deleted successfully."), $item['name']); + Tpl :: add_message(_("The element '%s' has been deleted successfully."), $item['name']); } else { Tpl :: add_error(_('An error occurred while deleting this item.')); diff --git a/example/locales/fr_FR.UTF8.js b/example/locales/fr_FR.UTF8.js index 092049e..b94d34f 100644 --- a/example/locales/fr_FR.UTF8.js +++ b/example/locales/fr_FR.UTF8.js @@ -1 +1 @@ -translations_data = {"messages":{"Invalid element identifier.":"Identifiant d'\u00e9l\u00e9ment invalide.","Item #% s not found.":"L'\u00e9l\u00e9ment #%s est introuvable.","Any":"Peu importe","An error occurred while listing the items. If the problem persists, please contact support.":"Une erreur est survenue en listant les \u00e9l\u00e9ments. Si le probl\u00e8me persiste, merci de prendre contact avec le support.","Search":"Rechercher","Element %s":"\u00c9l\u00e9ment %s","The element '% s' has been created.":"L'\u00e9l\u00e9ment '%s' a bien \u00e9t\u00e9 cr\u00e9\u00e9.","An error occurred while saving this item.":"Une erreur est survenue en enregistrant cet \u00e9l\u00e9ment.","There are errors preventing this item from being saved. Please correct them before attempting to add this item.":"Des erreurs emp\u00eachent l'enregistrement de cet \u00e9l\u00e9ment. Merci de les corriger avant de tenter d'ajouter cet \u00e9l\u00e9ment.","New":"Nouveau","You cannot edit this item.":"Vous ne pouvez pas modifier cet \u00e9l\u00e9ment.","You have not made any changes to element '% s'.":"Vous n'avez apport\u00e9 aucune modification \u00e0 l'\u00e9l\u00e9ment '%s'.","The element '% s' has been updated successfully.":"L'\u00e9l\u00e9ment '%s' a bien \u00e9t\u00e9 mise \u00e0 jour.","An error occurred while updating this item.":"Une erreur est survenue en mettant \u00e0 jour cet \u00e9l\u00e9ment.","There are errors preventing this item from being saved. Please correct them before attempting to save your changes.":"Des erreurs emp\u00eachent l'enregistrement de cet \u00e9l\u00e9ment. Merci de les corriger avant de tenter d'enregistrer vos modifications.","Element %s: Modification":"\u00c9l\u00e9ment %s : Modification","This item is already archived.":"Cet \u00e9l\u00e9ment est d\u00e9j\u00e0 archiv\u00e9.","You cannot archive this item.":"Vous ne pouvez pas archiver cet \u00e9l\u00e9ment.","The element '% s' has been archived successfully.":"L'\u00e9l\u00e9ment '%s' a bien \u00e9t\u00e9 archiv\u00e9.","An error occurred while archiving this item.":"Une erreur est survenue en archivant cet \u00e9l\u00e9ment.","You cannot delete this item.":"Vous ne pouvez pas supprimer cet \u00e9l\u00e9ment.","The element '% s' has been deleted successfully.":"L'\u00e9l\u00e9ment '%s' a bien \u00e9t\u00e9 supprim\u00e9.","An error occurred while deleting this item.":"Une erreur est survenue en supprimant cet \u00e9l\u00e9ment.","Pending":"En attente","Validated":"Valid\u00e9","Refused":"Refus\u00e9","Archived":"Archiv\u00e9","Item #%s:\n":"\u00c9l\u00e9ment #%s :\n","ID: %s":"ID : %s","Name: '%s'":"Nom : %s","Date: %s":"Date : %s","Description: %s":"Description : %s","Not set":"Non-d\u00e9fini","Status: %s":"Statut : %s","No item.\n":"Aucun \u00e9l\u00e9ment.\n","%d item(s)":"%d \u00e9l\u00e9ment(s)","List\/search items":"Lister\/rechercher les \u00e9l\u00e9ments","[patterns]":"[mots cl\u00e9s]","-o|--orderby Ordering list criterion. Possible values:":"-o|--orderby Crit\u00e8re de tri de la liste. Valeurs possibles :","-r|--reverse Reverse order":"-r|--reverse Ordre inverse","-s|--status Filter on status. Possible values:":"-s|--status Filtrer sur le statut. Valeurs possibles :","You must provide a valid ID.":"Vous devez fournir un ID valide.","Item #%s not found.":"\u00c9l\u00e9ment #%s introuvable.","Show item":"Voir un \u00e9l\u00e9ment","[ID]":"[ID]","You must provide item ID.":"Vous devez fournir un ID valide.","Invalid item ID":"ID d'\u00e9l\u00e9ment invalide","Are you sure you want to delete this item? Type 'yes' to continue: ":"\u00cates-vous s\u00fbre de vouloir supprimer cet \u00e9l\u00e9ment ? Taper 'yes' pour continuer : ","User cancel":"L'utilisateur a annul\u00e9","An error occured deleting item #%d.":"Une erreur est survenue en supprimant l'\u00e9l\u00e9ment #%d.","Delete item":"Supprimer un \u00e9l\u00e9ment","[item ID]":"[ID de l'\u00e9l\u00e9ment]","Export items (as CSV)":"Exporter les \u00e9l\u00e9ments (au format CSV)","[output file path]":"[chemin du fichier de sortie]","Restore items (from CSV)":"Restaurer les \u00e9l\u00e9ments (depuis un fichier CSV)","[input file path]":"[chemin du fichier d'entr\u00e9e]","Cron to handle item expiration":"Cron g\u00e9rant l'expiration des \u00e9l\u00e9ments","-j\/--just-try Just-try mode : do not really removed expired item(s)":"-j\/--just-try Mode just-try : Ne supprime pas r\u00e9ellement les \u00e9l\u00e9ments expir\u00e9s","-m\/--max-age Item expiration limit (in days, optional)":"-m\/--max-age Limite d'expiration des \u00e9l\u00e9ments (en secondes, optionnel)","Name":"Nom","Status":"Statut","Description":"Description","Back":"Retour","Save":"Enregistrer","Add":"Ajouter","Pattern":"Mot cl\u00e9","Nb by page":"Nb par page","Reset":"R\u00e9initialiser","Date":"Date","Actions":"Actions","View":"Voir","Modify":"Modifier","Are you sure you want to archive this item?":"\u00cates-vous s\u00fbre de vouloir archiver cet \u00e9l\u00e9ment ?","Archive":"Archiver","Are you sure you want to delete this item?":"\u00cates-vous s\u00fbre de vouloir supprimer cet \u00e9l\u00e9ment ?","Delete":"Supprimer","No item found.":"Aucun \u00e9l\u00e9ment trouv\u00e9.","%3 element":[null,"Elements %1 to %2 on %3"],"Creation date":"Date de cr\u00e9ation","Unspecified.":"Non-sp\u00e9cifi\u00e9.","Hello, world!":"Bonjour tout le monde !","This is a simple app to show the different possibilities and basic functionality.":"Ceci est une simple application pour montrer les diff\u00e9rentes possibilit\u00e9s et les fonctionnalit\u00e9s de base.","The access to this application is available by the following URL: %1<\/a>":"L'acc\u00e8s \u00e0 cette application est possible via l'URL suivante : %1<\/a>","This app contains some demo pages:":"Cette application contient quelques pages de d\u00e9mo :","Search page":"Page de recherche","No template specified.":"Aucun template sp\u00e9cifi\u00e9.","An error occurred while displaying this page.":"Une erreur est survenue en affichant cette page.","Unable to connect to the database.":"Impossible de se connecter \u00e0 la base de donn\u00e9es.","Invalid username or password.":"Nom d'utilisateur ou mot de passe invalide.","Sign in":"Connexion","Authentication required":"Authentification requise","Access denied":"Acc\u00e8s interdit","You must login to access this page.":"Vous devez vous connecter pour acc\u00e9der \u00e0 cette page.","Bad request":"Mauvaise requ\u00eate","Invalid request.":"Requ\u00eate invalide.","You have to be authenticated to access to this page.":"Vous devez \u00eatre authentifi\u00e9 pour acc\u00e9der \u00e0 cette page.","You do not have access to this application. If you think this is an error, please contact support.":"Vous n'avez pas acc\u00e8s \u00e0 cette application. Si vous pensez qu'il s'agit d'une erreur, merci de prendre contact avec le support.","Whoops ! Page not found":"Oups ! Page introuvable","The requested page can not be found.":"La page demand\u00e9e est introuvable.","Error":"Erreur","An unknown error occurred. If problem persist, please contact support.":"Une erreur inconnue est survenue. Si le probl\u00e8me persiste, merci de prendre contact avec le support.","Unable to determine the requested page. If the problem persists, please contact support.":"Impossible de d\u00e9terminer la page demand\u00e9e. Si le probl\u00e8me persiste, merci de prendre contact avec le support.","Unable to determine the requested page (loop detected). If the problem persists, please contact support.":"Impossible de d\u00e9terminer la page demand\u00e9e (boucle d\u00e9tect\u00e9e). Si le probl\u00e8me persiste, merci de prendre contact avec le support.","This request cannot be processed.":"Cette requ\u00eate ne peut \u00eatre trait\u00e9e.","Authentication required but fail to authenticate you.":"Authentification requise mais impossible pour vous authentifier.","This request could not be processed correctly.":"Cette requ\u00eate n'a put \u00eatre trait\u00e9e correctement.","Create a new project using EesyPHP framework":"Cr\u00e9er un nouveau projet utilisant le framework EesyPHP","This command could be used to easily build the structure of a new project using the EesyPHP framework.":"Cette commande peut-\u00eatre utilis\u00e9e pour construire facilement la structure d'un nouveau projet utilisant le framework EesyPHP.","Start the PHP built-in HTTP server to serve the application":"D\u00e9marrer le service HTTP int\u00e9gr\u00e9 \u00e0 PHP pour servir l'application","This command could be used to start the PHP built-in HTTP server to serve the application.":"Cette commande peut-\u00eatre utilis\u00e9e pour d\u00e9marrer le service HTTP int\u00e9gr\u00e9 \u00e0 PHP pour servir l'application.","The CLI command '%s' already exists.":"La commande CLI '%s' n'existe pas.","The CLI command '%s' handler is not callable !":"La fonction impl\u00e9mentant la commande CLI '%s' n'est pas ex\u00e9cutable !","Usage: %s [-h] [-qd] command\n":"Utilisation: %s [-h] [-qd] commande\n"," -h Show this message\n":" -h Affiche ce message\n"," -q \/ -d Quiet\/Debug mode\n":" -q \/ -d Mode silencieux\/debug\n"," --trace Trace mode (the most verbose)\n":" --trace Mode trace (le plus verbeux)\n"," -l \/ --log-file Overwrite log file specified in configuration\n":" -l \/ --log-file Red\u00e9finir le fichier de journalisation \u00e0 utiliser \u00e0 la place de celui d\u00e9fini dans la configuration\n"," -C \/ --console Enable log on console\n":" -C \/ --console Activer la journalisation dans la console\n"," command Command to run\n":" command La commande \u00e0 ex\u00e9cuter\n","Available commands:\n":"Commandes disponibles:\n","Only one command could be executed !":"Une seul commande peut-\u00eatre ex\u00e9cut\u00e9e !","Invalid parameter \"%s\".\nNote: Command's parameter\/argument must be place after the command.":"Param\u00e8tre \"%s\" invalide.\nNote : Les param\u00e8tres\/arguments de la requ\u00eate doivent \u00eatre plac\u00e9s apr\u00e8s celle-ci.","An exception occured running command %s":"Une exception est survenue en ex\u00e9cutant la commande %s","This command only accept one argument: the listen address in format \"host:port\" or \":port\" (= 0.0.0.0:port).":"Cette commande n'accepte qu'un seul param\u00e8tre : l'adresse d'\u00e9coute au format \"h\u00f4te:port\" ou \":port\" (= 0.0.0.0:port).","Invalid listen address specify. Must be in formart host:port (or :port).":"Adresse d'\u00e9coute sp\u00e9cifi\u00e9e invalide. Elle doit \u00eatre au format h\u00f4te:port (ou :port).","Invalid listen host specified. Must be an IPv4 or IPv6 address.":"H\u00f4te d'\u00e9coute sp\u00e9cifi\u00e9 invalide. Il doit s'agir d'une adresse IPv4 ou IPv6.","Invalid listen port specified. Must be a positive integer between 1 and 65535.":"Port d'\u00e9coute sp\u00e9cifi\u00e9 invalide. Il doit s'agir d'un entier positif entre 1 et 65535.","Can't invoke bash. Can't ask password prompt.":"Impossible d'utiliser bash. Impossible de demander \u00e0 l'utilisateur de saisir un mot de passe.","Please enter password:":"Merci de saisir le mot de passe :","Hello world !":"Bonjour tout le monde !","Hello world!":"Salut tout le monde !","Disconnected":"D\u00e9connect\u00e9","You are now disconnected.":"Vous \u00eates maintenant d\u00e9connect\u00e9.","Extract messages that need to be translated":"Extraire les messages devant \u00eatre traduit","This command could be used to generate\/update locales\/messages.pot file.":"Cette commande peut-\u00eatre utilis\u00e9e pour g\u00e9n\u00e9rer\/mettre \u00e0 jour le fichier locales\/messages.pot.","Update messages in translation PO lang files":"Mettre \u00e0 jour les messages dans les fichiers de traduction PO existants","This command could be used to init\/update PO files in locales\/*\/LC_MESSAGES directories.":"Cette commande peut-\u00eatre utilis\u00e9e pour initialiser\/mettre \u00e0 jour les fichiers PO dans les dossiers locales\/*\/LC_MESSAGES.","Compile messages from existing translation PO lang files to corresponding MO files and JS catalogs":"Compiler les messages depuis les fichiers PO de traduction existants vers les fichiers MO et les catalogues JS correspondant","This command could be used to compile PO files in locales\/*\/LC_MESSAGES directories to MO files and as JS catalogs in locales directory.":"Cette commande peut-\u00eatre utilis\u00e9e pour compiler les fichiers PO dans les dossiers locales\/*\/LC_MESSAGES and les catalogues JS dans le dossier locales.","Fail to list EesyPHP PHP files.":"Une erreur est survenue en listant les fichiers PHP d'EesyPHP.","Fail to extract messages from EesyPHP PHP files using xgettext.":"Une erreur est survenue en extrayant les messages depuis les fichiers PHP d'EesyPHP en utilisant xgettext.","Fail to list application PHP files.":"Une erreur est survenue en listant les fichiers PHP de l'application.","Fail to extract messages from PHP files using xgettext.":"Impossible d'extraire les messages depuis les fichiers PHP en utilisant xgettext.","Fail to list JS files in the directory of static files '%s'.":"Une erreur est survenue en listant les fichiers JS dans le dossier des fichiers statiques '%s'.","Fail to extract messages from JS files in the directory of static files '%s' using xgettext.":"Une erreur est survenue en extrayant les messages depuis les fichiers JS du dossier des fichiers statiques '%s' en utilisant xgettext.","Fail to extract messages from templates directory '%s' using tsmarty2c.php script.":"Impossible d'extraire les messages depuis le dossier de templates '%s' en utilisant le script tsmarty2c.php.","Fail to merge messages using msgcat.":"Impossible de fusionner les messages en utilisant msgcat.","Compendium file %s not found.":"Fichier compendium %s introuvable.","POT file not found (%s). Please run extract_messages first.":"Fichier POT introuvable (%s). Merci de lancer la commande extract_messages pour commencer.","Lang directory '%s' found":"Dossier de langue '%s' trouv\u00e9","LC_MESSAGES directory not found in lang '%s' directory, ignore it.":"Le dossier LC_MESSAGES est introuvable dans le dossier de langue '%s', on l'ignore.","Fail to init messages in %s PO file using msginit (%s).":"Impossible d'initialiser les messages dans le fichier PO %s en utilisant msginit (%s).","Fail to update messages in %s PO file using msgmerge (%s).":"Impossible de mettre \u00e0 jour les messages dans les fichiers PO %s en utilisant msgmerge (%s).","PO file not found in lang '%s' directory, ignore it.":"Le fichier PO est introuvable dans le dossier de langue '%s', on l'ignore.","Fail to open root lang directory (%s).":"Impossible d'ouvrir le dossier racine des langues (%s).","Lang alias symlink found: %s -> %s":"Lien symbolique d'alias de langue trouv\u00e9 : %s -> %s","JS catalog symlink for %s -> %s created (%s)":"Lien symbolique de catalogue JS pour %s -> %s cr\u00e9\u00e9 (%s)","Fail to create JS catalog symlink for %s -> %s (%s)":"Impossible de cr\u00e9er le lien symbolique de catalogue JS pour %s -> %s (%s)","JS catalog symlink for %s -> %s already exist (%s)":"Le lien symbolique du catalogue JS pour %s -> %s existe d\u00e9j\u00e0 (%s)","JS catalog file for %s already exist, but it's not a symlink to %s (%s)":"Le catalogue JS pour %s existe, mais il ne s'agit par d'un lien symbolique vers %s (%s)","Fail to compile messages from %s PO file as MO file using msgfmt (%s).":"Impossible de compiler les messages depuis le fichier PO %s en tant que fichier MO en utilisant msgfmt (%s).","Include core translated messages from %s PO file":"Inclusion des messages traduits (core) depuis le fichier PO %s","Core PO file %s not found: can not include its translated messages in resulting JSON catalog.":"Le fichier PO core %s est introuvable : impossible d'inclure ses messages traduits dans le catalogue JSON r\u00e9sultant.","Fail to open %s JS catalog file in write mode (%s).":"Impossible d'ouvrir le catalogue JS %s en mode \u00e9criture (%s).","Fail to write %s JS catalog in file (%s).":"Impossible d'\u00e9crire le fichier du catalogue JS %s (%s).","%s JS catalog writed (%s).":"Catalogue JS %s cr\u00e9\u00e9 (%s).","<\/hr>

Mail initialy intended for %s.<\/small><\/p>":"<\/hr>

Email initialement destin\u00e9 \u00e0 %s.<\/small><\/p>","\n\n\nMail initialy intended for %s.":"\n\n\nMail originalement destin\u00e9 \u00e0 %s.","

%s: %s<\/small><\/p>":"

%s: %s<\/small><\/p>","\n%s: %s":"\n%s: %s","Confirmation":"Confirmation","Do you confirm?":"Confirmez-vous ?","Cancel":"Annuler","Validate":"Valider","OK":"OK","Question":"Question","Please enter your answer below:":"Merci de saisir vos r\u00e9ponses ci-dessous :","Please wait":"Merci de patienter","Please wait while your request is being processed.":"Merci de patienter pendant le traitement de votre requ\u00eate.","Are you sure?":"\u00cates-vous sure ?","Username":"Nom d'utilisateur","Password":"Mot de passe","Submit":"Envoyer","Oops...":"Oups...","A fatal error has occurred and it is preventing this application from working properly. Please try again later or contact support.":"Une erreur fatale est survenue et celle-ci emp\u00eache cette application de fonctionner correctement. Merci de r\u00e9essayer ult\u00e9rieurement ou de prendre contact avec le service support.","Error: %1":"Erreur : %1","Sign out":"D\u00e9connexion","This is the default page of a new app using EesyPHP framework. Register your own templates directory and create a homepage.tpl<\/em> file to overwrite it. You could also overwrite the URL handler for the root of the web application.":"Il s'agit de la page par d\u00e9faut d'une nouvelle application utilisant le framework EesyPHP. Configurez votre propre dossier de templates et cr\u00e9er le fichier homepage.tpl<\/em> pour l'\u00e9craser. Vous pouvez \u00e9galement \u00e9craser le gestionnaire de l'URL racine de l'application web.","Logout":"D\u00e9connexion","Connection":"Connexion","Authentication required but force_authentication function is not defined.":"Authentification requise mais la fonction force_authentication n'est pas d\u00e9finie."},"locale":"fr_FR.UTF8","domain":"DEFAULT","plural_expr":"(n > 1)"}; \ No newline at end of file +translations_data = {"messages":{"Invalid element identifier.":"Identifiant d'\u00e9l\u00e9ment invalid.","Item #%s not found.":"\u00c9l\u00e9ment #%s introuvable.","Any":"Peu importe","An error occurred while listing the items. If the problem persists, please contact support.":"Une erreur est survenue en listant les \u00e9l\u00e9ments. Si le probl\u00e8me persiste, merci de prendre contact avec le support.","Search":"Rechercher","Element %s":"\u00c9l\u00e9ment %s","The element '%s' has been created.":"L'\u00e9l\u00e9ment '%s' a bien \u00e9t\u00e9 cr\u00e9\u00e9.","An error occurred while saving this item.":"Une erreur est survenue en enregistrant cet \u00e9l\u00e9ment.","There are errors preventing this item from being saved. Please correct them before attempting to add this item.":"Des erreurs emp\u00eachent l'enregistrement de cet \u00e9l\u00e9ment. Merci de les corriger avant de tenter d'ajouter cet \u00e9l\u00e9ment.","New":"Nouveau","You cannot edit this item.":"Vous ne pouvez pas modifier cet \u00e9l\u00e9ment.","You have not made any changes to element '%s'.":"Vous n'avez apport\u00e9 aucune modification \u00e0 l'\u00e9l\u00e9ment '%s'.","The element '%s' has been updated successfully.":"L'\u00e9l\u00e9ment '%s' a bien \u00e9t\u00e9 mise \u00e0 jour.","An error occurred while updating this item.":"Une erreur est survenue en mettant \u00e0 jour cet \u00e9l\u00e9ment.","There are errors preventing this item from being saved. Please correct them before attempting to save your changes.":"Des erreurs emp\u00eachent l'enregistrement de cet \u00e9l\u00e9ment. Merci de les corriger avant de tenter d'enregistrer vos modifications.","Element %s: Modification":"\u00c9l\u00e9ment %s : Modification","This item is already archived.":"Cet \u00e9l\u00e9ment est d\u00e9j\u00e0 archiv\u00e9.","You cannot archive this item.":"Vous ne pouvez pas archiver cet \u00e9l\u00e9ment.","The element '%s' has been archived successfully.":"L'\u00e9l\u00e9ment '%s' a bien \u00e9t\u00e9 archiv\u00e9.","An error occurred while archiving this item.":"Une erreur est survenue en archivant cet \u00e9l\u00e9ment.","You cannot delete this item.":"Vous ne pouvez pas supprimer cet \u00e9l\u00e9ment.","The element '%s' has been deleted successfully.":"L'\u00e9l\u00e9ment '%s' a bien \u00e9t\u00e9 supprim\u00e9.","An error occurred while deleting this item.":"Une erreur est survenue en supprimant cet \u00e9l\u00e9ment.","Pending":"En attente","Validated":"Valid\u00e9","Refused":"Refus\u00e9","Archived":"Archiv\u00e9","Item #%s:\n":"\u00c9l\u00e9ment #%s :\n","ID: %s":"ID : %s","Name: '%s'":"Nom : %s","Date: %s":"Date : %s","Description: %s":"Description : %s","Not set":"Non-d\u00e9fini","Status: %s":"Statut : %s","No item.\n":"Aucun \u00e9l\u00e9ment.\n","%d item(s)":"%d \u00e9l\u00e9ment(s)","List\/search items":"Lister\/rechercher les \u00e9l\u00e9ments","[patterns]":"[mots cl\u00e9s]","-o|--orderby Ordering list criterion. Possible values:":"-o|--orderby Crit\u00e8re de tri de la liste. Valeurs possibles :","-r|--reverse Reverse order":"-r|--reverse Ordre inverse","-s|--status Filter on status. Possible values:":"-s|--status Filtrer sur le statut. Valeurs possibles :","You must provide a valid ID.":"Vous devez fournir un ID valid.","Show item":"Voir un \u00e9l\u00e9ment","[ID]":"[ID]","You must provide item ID.":"Vous devez fournir un ID valid.","Invalid item ID":"ID d'\u00e9l\u00e9ment invalid","Are you sure you want to delete this item? Type 'yes' to continue: ":"\u00cates-vous s\u00fbre de vouloir supprimer cet \u00e9l\u00e9ment ? Taper 'yes' pour continuer : ","User cancel":"L'utilisateur a annul\u00e9","An error occurred deleting item #%d.":"Une erreur est survenue en supprimant l'\u00e9l\u00e9ment #%d.","Delete item":"Supprimer un \u00e9l\u00e9ment","[item ID]":"[ID de l'\u00e9l\u00e9ment]","Export items (as CSV)":"Exporter les \u00e9l\u00e9ments (au format CSV)","[output file path]":"[chemin du fichier de sortie]","Restore items (from CSV)":"Restaurer les \u00e9l\u00e9ments (depuis un fichier CSV)","[input file path]":"[chemin du fichier d'entr\u00e9e]","Cron to handle item expiration":"Cron g\u00e9rant l'expiration des \u00e9l\u00e9ments","-j\/--just-try Just-try mode : do not really removed expired item(s)":"-j\/--just-try Mode just-try : Ne supprime pas r\u00e9ellement les \u00e9l\u00e9ments expir\u00e9s","-m\/--max-age Item expiration limit (in days, optional)":"-m\/--max-age Limit d'expiration des \u00e9l\u00e9ments (en secondes, optionnel)","Name":"Nom","Status":"Statut","Description":"Description","Back":"Retour","Save":"Enregistrer","Add":"Ajouter","Pattern":"Not cl\u00e9","Nb by page":"Nb par page","Reset":"R\u00e9initialiser","Date":"Date","Actions":"Actions","View":"Voir","Modify":"Modifier","Are you sure you want to archive this item?":"\u00cates-vous s\u00fbre de vouloir archiver cet \u00e9l\u00e9ment ?","Archive":"Archiver","Are you sure you want to delete this item?":"\u00cates-vous s\u00fbre de vouloir supprimer cet \u00e9l\u00e9ment ?","Delete":"Supprimer","No item found.":"Aucun \u00e9l\u00e9ment trouv\u00e9.","%3 element":[null,"Elements %1 to %2 on %3"],"Creation date":"Date de cr\u00e9ation","Unspecified.":"Non-sp\u00e9cifi\u00e9.","Hello, world!":"Bonjour tout le monde !","This is a simple app to show the different possibilities and basic functionality.":"Ceci est une simple application pour montrer les diff\u00e9rentes possibilit\u00e9s et les fonctionnalit\u00e9s de base.","The access to this application is available by the following URL: %1<\/a>":"L'acc\u00e8s \u00e0 cette application est possible via l'URL suivante : %1<\/a>","This app contains some demo pages:":"Cette application contient quelques pages de d\u00e9mo :","Search page":"Page de recherche","No template specified.":"Aucun template sp\u00e9cifi\u00e9.","An error occurred while displaying this page.":"Une erreur est survenue en affichant cette page.","Unexpected error occurred. If problem persist, please contact support.":"Une erreur inconnue est survenue. Si le probl\u00e8me persiste, merci de prendre contact avec le support.","Unknown":"Inconnu","Unable to connect to the database.":"Impossible de se connecter \u00e0 la base de donn\u00e9es.","Invalid username or password.":"Nom d'utilisateur ou not de passe invalid.","Sign in":"Connection","Authentication required":"Authentication requise","Access denied":"Acc\u00e8s interdit","You must login to access this page.":"Vous devez vous connecter pour acc\u00e9der \u00e0 cette page.","Bad request":"Mauvaise requ\u00eate","Invalid request.":"Requ\u00eate invalid.","You have to be authenticated to access to this page.":"Vous devez \u00eatre authentifi\u00e9 pour acc\u00e9der \u00e0 cette page.","You do not have access to this application. If you think this is an error, please contact support.":"Vous n'avez pas acc\u00e8s \u00e0 cette application. Si vous pensez qu'il s'agit d'une erreur, merci de prendre contact avec le support.","Whoops ! Page not found":"Oups ! Page introuvable","The requested page can not be found.":"La page demand\u00e9e est introuvable.","Error":"Erreur","An unknown error occurred. If problem persist, please contact support.":"Une erreur inconnue est survenue. Si le probl\u00e8me persiste, merci de prendre contact avec le support.","Unable to determine the requested page. If the problem persists, please contact support.":"Impossible de d\u00e9terminer la page demand\u00e9e. Si le probl\u00e8me persiste, merci de prendre contact avec le support.","Unable to determine the requested page (loop detected). If the problem persists, please contact support.":"Impossible de d\u00e9terminer la page demand\u00e9e (boucle d\u00e9tect\u00e9e). Si le probl\u00e8me persiste, merci de prendre contact avec le support.","This request cannot be processed.":"Cette requ\u00eate ne peut \u00eatre trait\u00e9e.","Authentication required but fail to authenticate you.":"Authentication requise mais impossible pour vous authentifier.","This request could not be processed correctly.":"Cette requ\u00eate n'a put \u00eatre trait\u00e9e correctement.","Create a new project using EesyPHP framework":"Cr\u00e9er un nouveau project utilisant le framework EesyPHP","This command could be used to easily build the structure of a new project using the EesyPHP framework.":"Cette commande peut-\u00eatre utilis\u00e9e pour construire facilement la structure d'un nouveau project utilisant le framework EesyPHP.","Start the PHP built-in HTTP server to serve the application":"D\u00e9marrer le service HTTP int\u00e9gr\u00e9 \u00e0 PHP pour servir l'application","This command could be used to start the PHP built-in HTTP server to serve\nthe application.\n\nAdditional parameters:\n -p\/--public-url Define the public URL (default: based on listen address)\n -P\/--enable-profiler Enable Xdebug profiler\n -O\/--profiler-output [path] Xdebug profiler output directory path":"Cette commande peut-\u00eatre utilis\u00e9e pour d\u00e9marre le serveur HTTP int\u00e9gr\u00e9\n\u00e0 PHP pour servir l'application.\n\nParam\u00e8tres additionnels :\n -p\/--public-url D\u00e9finir l'URL publique (par d\u00e9faut:\n d\u00e9finie \u00e0 partir de l'adresse d'\u00e9coute)\n -P\/--enable-profiler Activer le profilter Xdebug\n -O\/--profiler-output [path] Chemin du dossier de sortie du profiler\n Xdebug","The CLI command '%s' already exists.":"La commande CLI '%s' n'existe pas.","The CLI command '%s' handler is not callable !":"La function impl\u00e9mentant la commande CLI '%s' n'est pas ex\u00e9cutable !","Usage: %s [-h] [-qd] command\n":"Utilisation: %s [-h] [-qd] commande\n"," -h Show this message\n":" -h Affiche ce message\n"," -q \/ -d Quiet\/Debug mode\n":" -q \/ -d Mode silencieux\/debug\n"," --trace Trace mode (the most verbose)\n":" --trace Mode trace (le plus verbeux)\n"," -l \/ --log-file Overwrite log file specified in configuration\n":" -l \/ --log-file Red\u00e9finir le fichier de journalisation \u00e0 utiliser \u00e0 la place de celui d\u00e9fini dans la configuration\n"," -C \/ --console Enable log on console\n":" -C \/ --console Activer la journalisation dans la console\n"," command Command to run\n":" command La commande \u00e0 ex\u00e9cuter\n","Available commands:\n":"Commandes disponibles:\n","Only one command could be executed !":"Une seul commande peut-\u00eatre ex\u00e9cut\u00e9e !","Invalid parameter \"%s\".\nNote: Command's parameter\/argument must be place after the command.":"Param\u00e8tre \"%s\" invalid.\nNote : Les param\u00e8tres\/arguments de la requ\u00eate doivent \u00eatre plac\u00e9s apr\u00e8s celle-ci.","An exception occurred running command %s":"Une exception est survenue en ex\u00e9cutant la commande %s","The PHP XDEBUG extension is missing.":"L'extension PHP XDEBUG ne semble pas install\u00e9e.","Invalid profiler output directory \"%s\": not found":"Dossier de sortie du profiler invalid \"%s\" : introuvable","Invalid profiler output directory \"%s\": not writeable":"Dossier de sortie du profiler invalid \"%s\" : non-accessible en \u00e9criture","Invalid parameter \"%s\"":"Param\u00e8tre \"%s\" invalid","Invalid listen address specify. Must be in format host:port, host or :port.":"Address d'\u00e9coute sp\u00e9cifi\u00e9e invalid. Elle doit \u00eatre au format h\u00f4te:port (ou :port).","Invalid listen host specified. Must be an IPv4 or IPv6 address.":"H\u00f4te d'\u00e9coute sp\u00e9cifi\u00e9 invalid. Il doit s'agir d'une address IPv4 ou IPv6.","Invalid listen port specified. Must be a positive integer between 1 and 65535.":"Port d'\u00e9coute sp\u00e9cifi\u00e9 invalid. Il doit s'agir d'un entier positif entre 1 et 65535.","Can't invoke bash. Can't ask password prompt.":"Impossible d'utiliser bash. Impossible de demander \u00e0 l'utilisateur de saisir un not de passe.","Please enter password:":"Merci de saisir le not de passe :","d":"j","h":"h","m":"m","s":"s","ms":"ms","ns":"ns","Less than 1%s":"Moins de 1%s","Hello world !":"Bonjour tout le monde !","Hello world!":"Salut tout le monde !","Disconnected":"D\u00e9connect\u00e9","You are now disconnected.":"Vous \u00eates maintenant d\u00e9connect\u00e9.","Extract messages that need to be translated":"Extraire les messages devant \u00eatre traduit","This command could be used to generate\/update locales\/messages.pot file.":"Cette commande peut-\u00eatre utilis\u00e9e pour g\u00e9n\u00e9rer\/mettre \u00e0 jour le fichier locales\/messages.pot.","Update messages in translation PO lang files":"Mettre \u00e0 jour les messages dans les fichiers de traduction PO existants","This command could be used to init\/update PO files in locales\/*\/LC_MESSAGES directories.":"Cette commande peut-\u00eatre utilis\u00e9e pour initialiser\/mettre \u00e0 jour les fichiers PO dans les dossiers locales\/*\/LC_MESSAGES.","Compile messages from existing translation PO lang files to corresponding MO files and JS catalogs":"Compiler les messages depuis les fichiers PO de traduction existants vers les fichiers MO et les catalogues JS correspondent","This command could be used to compile PO files in locales\/*\/LC_MESSAGES directories to MO files and as JS catalogs in locales directory.":"Cette commande peut-\u00eatre utilis\u00e9e pour compiler les fichiers PO dans les dossiers locales\/*\/LC_MESSAGES and les catalogues JS dans le dossier locales.","Initialize a new locale for translation.":"Initialiser un nouvelle locale pour traduction.","This command could be used to initialize a new locale for translation.":"Cette commande peut-\u00eatre utilis\u00e9e pour initialiser une nouvelle locale pour traduction.","You must provide the locale to initialize as unique and first argument.":"Vous devez fournir la locale \u00e0 initialiser comme unique et premier argument.","Invalid locale %s.":"Locale \"%s\" invalid.","Fail to list valid locales.":"Une erreur est survenue en listant les locales valides.","Locale %s directory created (%s).":"Dossier de la locale %s cr\u00e9\u00e9 (%s).","Fail to create locale %s directory (%s).":"Une erreur est survenue en cr\u00e9ant le dossier de la locale %s (%s).","Locale %s directory already exist (%s).":"Le dossier de la locale %s existe d\u00e9j\u00e0 (%s).","Locale %s LC_MESSAGES directory created (%s).":"Dossier LC_MESSAGES de la locale %s cr\u00e9\u00e9 (%s).","Fail to create locale %s LC_MESSAGES directory (%s).":"Une erreur est survenue en cr\u00e9ant le dossier LC_MESSAGE de la locale %s (%s).","Locale %s LC_MESSAGES directory already exist (%s).":"Le dossier LC_MESSAGES de la locale %s existe d\u00e9j\u00e0 (%s).","Locale %s PO file created (%s).":"Fichier PO de la locale %s cr\u00e9\u00e9 (%s).","Locale %s PO file already exist (%s).":"Le fichier PO de la locale %s existe d\u00e9j\u00e0 (%s).","Fail to list EesyPHP PHP files.":"Une erreur est survenue en listant les fichiers PHP d'EesyPHP.","Fail to extract messages from EesyPHP PHP files using xgettext.":"Une erreur est survenue en extrayant les messages depuis les fichiers PHP d'EesyPHP en utilisant xgettext.","Fail to list application PHP files.":"Une erreur est survenue en listant les fichiers PHP de l'application.","Fail to extract messages from PHP files using xgettext.":"Impossible d'extraire les messages depuis les fichiers PHP en utilisant xgettext.","Fail to list JS files in the directory of static files '%s'.":"Une erreur est survenue en listant les fichiers JS dans le dossier des fichiers statiques '%s'.","Fail to extract messages from JS files in the directory of static files '%s' using xgettext.":"Une erreur est survenue en extrayant les messages depuis les fichiers JS du dossier des fichiers statiques '%s' en utilisant xgettext.","Fail to list templates files in directory %s.":"Une erreur est survenue en listant les fichiers dans le dossier %s.","Fail to extract messages from templates directory '%s' using tsmarty2c.php script.":"Impossible d'extraire les messages depuis le dossier de templates '%s' en utilisant le script tsmarty2c.php.","Fail to merge messages using msgcat.":"Impossible de fusionner les messages en utilisant msgcat.","Compendium file %s not found.":"Fichier compendium %s introuvable.","POT file not found (%s). Please run extract_messages first.":"Fichier POT introuvable (%s). Merci de lancer la commande extract_messages pour commencer.","Lang directory '%s' found":"Dossier de langue '%s' trouv\u00e9","LC_MESSAGES directory not found in lang '%s' directory, ignore it.":"Le dossier LC_MESSAGES est introuvable dans le dossier de langue '%s', on l'ignore.","Fail to init messages in %s PO file using msginit (%s).":"Impossible d'initialiser les messages dans le fichier PO %s en utilisant msginit (%s).","Fail to update messages in %s PO file using msgmerge (%s).":"Impossible de mettre \u00e0 jour les messages dans les fichiers PO %s en utilisant msgmerge (%s).","PO file not found in lang '%s' directory, ignore it.":"Le fichier PO est introuvable dans le dossier de langue '%s', on l'ignore.","Fail to open root lang directory (%s).":"Impossible d'ouvrir le dossier racine des langues (%s).","Lang alias symlink found: %s -> %s":"Lien symbolique d'alias de langue trouv\u00e9 : %s -> %s","JS catalog symlink for %s -> %s created (%s)":"Lien symbolique de catalogue JS pour %s -> %s cr\u00e9\u00e9 (%s)","Fail to create JS catalog symlink for %s -> %s (%s)":"Impossible de cr\u00e9er le lien symbolique de catalogue JS pour %s -> %s (%s)","JS catalog symlink for %s -> %s already exist (%s)":"Le lien symbolique du catalogue JS pour %s -> %s existe d\u00e9j\u00e0 (%s)","JS catalog file for %s already exist, but it's not a symlink to %s (%s)":"Le catalogue JS pour %s existe, mais il ne s'agit par d'un lien symbolique vers %s (%s)","Fail to compile messages from %s PO file as MO file using msgfmt (%s).":"Impossible de compiler les messages depuis le fichier PO %s en tant que fichier MO en utilisant msgfmt (%s).","Include core translated messages from %s PO file":"Inclusion des messages traduits (core) depuis le fichier PO %s","Core PO file %s not found: can not include its translated messages in resulting JSON catalog.":"Le fichier PO core %s est introuvable : impossible d'inclure ses messages traduits dans le catalogue JSON r\u00e9sultant.","Fail to open %s JS catalog file in write mode (%s).":"Impossible d'ouvrir le catalogue JS %s en mode \u00e9criture (%s).","Fail to write %s JS catalog in file (%s).":"Impossible d'\u00e9crire le fichier du catalogue JS %s (%s).","%s JS catalog writed (%s).":"Catalogue JS %s cr\u00e9\u00e9 (%s).","<\/hr>

Mail initially intended for %s.<\/small><\/p>":"<\/hr>

Email initialement destin\u00e9 \u00e0 %s.<\/small><\/p>","\n\n\nMail initially intended for %s.":"\n\n\nMail originalement destin\u00e9 \u00e0 %s.","

%s: %s<\/small><\/p>":"

%s: %s<\/small><\/p>","\n%s: %s":"\n%s: %s","Username":"Nom d'utilisateur","Password":"Not de passe","Remember username":"M\u00e9moriser nom d'utilisateur","Submit":"Envoyer","Oops...":"Oups...","A fatal error has occurred and it is preventing this application from working properly. Please try again later or contact support.":"Une erreur fatale est survenue et celle-ci emp\u00eache cette application de fonctionner correctement. Merci de r\u00e9essayer ult\u00e9rieurement ou de prendre contact avec le service support.","Error: %1":"Erreur : %1","Sign out":"D\u00e9connexion","Log in":"Connection","Loading time:":"Temps de chargement :","Page: %1":"Page : %1","Database: %1":"Base de donn\u00e9es : %1","Templating: ":"Mod\u00e8le : ","Total: ":"Total : ","This is the default page of a new app using EesyPHP framework. Register your own templates directory and create a homepage.tpl<\/em> file to overwrite it. You could also overwrite the URL handler for the root of the web application.":"Il s'agit de la page par d\u00e9faut d'une nouvelle application utilisant le framework EesyPHP. Configurez votre propre dossier de templates et cr\u00e9er le fichier homepage.tpl<\/em> pour l'\u00e9craser. Vous pouvez \u00e9galement \u00e9craser le gestionnaire de l'URL racine de l'application web.","Confirmation":"Confirmation","Do you confirm?":"Confirmez-vous ?","Cancel":"Annuler","Validate":"Valider","OK":"OK","Question":"Question","Please enter your answer below:":"Merci de saisir vos r\u00e9ponses ci-dessous :","Please wait":"Merci de patienter","Please wait while your request is being processed.":"Merci de patienter pendant le traitement de votre requ\u00eate.","Are you sure?":"\u00cates-vous sure ?","This command could be used to start the PHP built-in HTTP server to serve the application.":"Cette commande peut-\u00eatre utilis\u00e9e pour d\u00e9marrer le service HTTP int\u00e9gr\u00e9 \u00e0 PHP pour servir l'application.","This command only accept one argument: the listen address in format \"host:port\" or \":port\" (= 0.0.0.0:port).":"Cette commande n'accepte qu'un seul param\u00e8tre : l'adresse d'\u00e9coute au format \"h\u00f4te:port\" ou \":port\" (= 0.0.0.0:port).","Logout":"D\u00e9connexion","Connection":"Connection","Authentication required but force_authentication function is not defined.":"Authentication requise mais la function force_authentication n'est pas d\u00e9finie."},"locale":"fr_FR.UTF8","domain":"DEFAULT","plural_expr":"(n > 1)"}; \ No newline at end of file diff --git a/example/locales/fr_FR.UTF8/LC_MESSAGES/DEFAULT.mo b/example/locales/fr_FR.UTF8/LC_MESSAGES/DEFAULT.mo index b59da18..ded7c03 100644 Binary files a/example/locales/fr_FR.UTF8/LC_MESSAGES/DEFAULT.mo and b/example/locales/fr_FR.UTF8/LC_MESSAGES/DEFAULT.mo differ diff --git a/example/locales/fr_FR.UTF8/LC_MESSAGES/DEFAULT.po b/example/locales/fr_FR.UTF8/LC_MESSAGES/DEFAULT.po index f2f0c6a..de32e6e 100644 --- a/example/locales/fr_FR.UTF8/LC_MESSAGES/DEFAULT.po +++ b/example/locales/fr_FR.UTF8/LC_MESSAGES/DEFAULT.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2023-03-09 18:14+0100\n" +"POT-Creation-Date: 2024-01-23 18:09+0000\n" "PO-Revision-Date: \n" "Last-Translator: Benjamin Renard \n" "Language-Team: \n" @@ -9,18 +9,18 @@ msgstr "" "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" +"X-Generator: Poedit 3.2.2\n" #: includes/url-helpers.php:9 msgid "Invalid element identifier." -msgstr "Identifiant d'élément invalide." +msgstr "Identifiant d'élément invalid." -#: includes/url-helpers.php:13 includes/url-public.php:242 -#: includes/url-public.php:269 +#: includes/url-helpers.php:13 includes/url-public.php:232 +#: includes/url-public.php:259 includes/cli.php:136 includes/cli.php:160 #, php-format -msgid "Item #% s not found." -msgstr "L'élément #%s est introuvable." +msgid "Item #%s not found." +msgstr "Élément #%s introuvable." #: includes/url-public.php:38 msgid "Any" @@ -45,14 +45,14 @@ msgstr "Élément %s" #: includes/url-public.php:159 #, php-format -msgid "The element '% s' has been created." +msgid "The element '%s' has been created." msgstr "L'élément '%s' a bien été créé." -#: includes/url-public.php:163 +#: includes/url-public.php:162 msgid "An error occurred while saving this item." msgstr "Une erreur est survenue en enregistrant cet élément." -#: includes/url-public.php:170 +#: includes/url-public.php:168 msgid "" "There are errors preventing this item from being saved. Please correct them " "before attempting to add this item." @@ -60,29 +60,29 @@ msgstr "" "Des erreurs empêchent l'enregistrement de cet élément. Merci de les corriger " "avant de tenter d'ajouter cet élément." -#: includes/url-public.php:177 +#: includes/url-public.php:175 msgid "New" msgstr "Nouveau" -#: includes/url-public.php:187 +#: includes/url-public.php:186 msgid "You cannot edit this item." msgstr "Vous ne pouvez pas modifier cet élément." -#: includes/url-public.php:200 +#: includes/url-public.php:199 #, php-format -msgid "You have not made any changes to element '% s'." +msgid "You have not made any changes to element '%s'." msgstr "Vous n'avez apporté aucune modification à l'élément '%s'." -#: includes/url-public.php:204 +#: includes/url-public.php:203 #, php-format -msgid "The element '% s' has been updated successfully." +msgid "The element '%s' has been updated successfully." msgstr "L'élément '%s' a bien été mise à jour." -#: includes/url-public.php:208 +#: includes/url-public.php:206 msgid "An error occurred while updating this item." msgstr "Une erreur est survenue en mettant à jour cet élément." -#: includes/url-public.php:216 +#: includes/url-public.php:213 msgid "" "There are errors preventing this item from being saved. Please correct them " "before attempting to save your changes." @@ -90,198 +90,193 @@ msgstr "" "Des erreurs empêchent l'enregistrement de cet élément. Merci de les corriger " "avant de tenter d'enregistrer vos modifications." -#: includes/url-public.php:228 +#: includes/url-public.php:220 #, php-format msgid "Element %s: Modification" msgstr "Élément %s : Modification" -#: includes/url-public.php:246 +#: includes/url-public.php:236 msgid "This item is already archived." msgstr "Cet élément est déjà archivé." -#: includes/url-public.php:249 +#: includes/url-public.php:239 msgid "You cannot archive this item." msgstr "Vous ne pouvez pas archiver cet élément." -#: includes/url-public.php:252 +#: includes/url-public.php:242 #, php-format -msgid "The element '% s' has been archived successfully." +msgid "The element '%s' has been archived successfully." msgstr "L'élément '%s' a bien été archivé." -#: includes/url-public.php:255 +#: includes/url-public.php:245 msgid "An error occurred while archiving this item." msgstr "Une erreur est survenue en archivant cet élément." -#: includes/url-public.php:272 +#: includes/url-public.php:262 msgid "You cannot delete this item." msgstr "Vous ne pouvez pas supprimer cet élément." -#: includes/url-public.php:275 +#: includes/url-public.php:265 #, php-format -msgid "The element '% s' has been deleted successfully." +msgid "The element '%s' has been deleted successfully." msgstr "L'élément '%s' a bien été supprimé." -#: includes/url-public.php:278 +#: includes/url-public.php:268 msgid "An error occurred while deleting this item." msgstr "Une erreur est survenue en supprimant cet élément." -#: includes/core.php:57 +#: includes/core.php:61 msgid "Pending" msgstr "En attente" -#: includes/core.php:58 +#: includes/core.php:62 msgid "Validated" msgstr "Validé" -#: includes/core.php:59 +#: includes/core.php:63 msgid "Refused" msgstr "Refusé" -#: includes/core.php:60 +#: includes/core.php:64 msgid "Archived" msgstr "Archivé" -#: includes/cli.php:23 +#: includes/cli.php:24 #, php-format msgid "Item #%s:\n" msgstr "Élément #%s :\n" -#: includes/cli.php:24 +#: includes/cli.php:25 #, php-format msgid "ID: %s" msgstr "ID : %s" -#: includes/cli.php:25 +#: includes/cli.php:26 #, php-format msgid "Name: '%s'" msgstr "Nom : %s" -#: includes/cli.php:26 +#: includes/cli.php:27 #, php-format msgid "Date: %s" msgstr "Date : %s" -#: includes/cli.php:28 +#: includes/cli.php:29 #, php-format msgid "Description: %s" msgstr "Description : %s" -#: includes/cli.php:29 +#: includes/cli.php:30 msgid "Not set" msgstr "Non-défini" -#: includes/cli.php:31 +#: includes/cli.php:32 #, php-format msgid "Status: %s" msgstr "Statut : %s" -#: includes/cli.php:84 +#: includes/cli.php:85 msgid "No item.\n" msgstr "Aucun élément.\n" -#: includes/cli.php:110 +#: includes/cli.php:111 #, php-format msgid "%d item(s)" msgstr "%d élément(s)" -#: includes/cli.php:116 +#: includes/cli.php:117 msgid "List/search items" msgstr "Lister/rechercher les éléments" -#: includes/cli.php:117 +#: includes/cli.php:118 msgid "[patterns]" msgstr "[mots clés]" -#: includes/cli.php:119 +#: includes/cli.php:120 msgid "-o|--orderby Ordering list criterion. Possible values:" msgstr "-o|--orderby Critère de tri de la liste. Valeurs possibles :" -#: includes/cli.php:121 +#: includes/cli.php:122 msgid "-r|--reverse Reverse order" msgstr "-r|--reverse Ordre inverse" -#: includes/cli.php:122 +#: includes/cli.php:123 msgid "-s|--status Filter on status. Possible values:" msgstr "-s|--status Filtrer sur le statut. Valeurs possibles :" -#: includes/cli.php:129 +#: includes/cli.php:130 msgid "You must provide a valid ID." -msgstr "Vous devez fournir un ID valide." +msgstr "Vous devez fournir un ID valid." -#: includes/cli.php:135 includes/cli.php:159 -#, php-format -msgid "Item #%s not found." -msgstr "Élément #%s introuvable." - -#: includes/cli.php:143 +#: includes/cli.php:144 msgid "Show item" msgstr "Voir un élément" -#: includes/cli.php:144 +#: includes/cli.php:145 msgid "[ID]" msgstr "[ID]" -#: includes/cli.php:149 +#: includes/cli.php:150 msgid "You must provide item ID." -msgstr "Vous devez fournir un ID valide." +msgstr "Vous devez fournir un ID valid." -#: includes/cli.php:153 +#: includes/cli.php:154 msgid "Invalid item ID" -msgstr "ID d'élément invalide" +msgstr "ID d'élément invalid" -#: includes/cli.php:164 +#: includes/cli.php:165 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 : " -#: includes/cli.php:168 +#: includes/cli.php:169 msgid "User cancel" msgstr "L'utilisateur a annulé" -#: includes/cli.php:174 +#: includes/cli.php:175 #, php-format -msgid "An error occured deleting item #%d." +msgid "An error occurred deleting item #%d." msgstr "Une erreur est survenue en supprimant l'élément #%d." -#: includes/cli.php:181 +#: includes/cli.php:182 msgid "Delete item" msgstr "Supprimer un élément" -#: includes/cli.php:182 +#: includes/cli.php:183 msgid "[item ID]" msgstr "[ID de l'élément]" -#: includes/cli.php:194 +#: includes/cli.php:195 msgid "Export items (as CSV)" msgstr "Exporter les éléments (au format CSV)" -#: includes/cli.php:195 +#: includes/cli.php:196 msgid "[output file path]" msgstr "[chemin du fichier de sortie]" -#: includes/cli.php:210 +#: includes/cli.php:211 msgid "Restore items (from CSV)" msgstr "Restaurer les éléments (depuis un fichier CSV)" -#: includes/cli.php:211 +#: includes/cli.php:212 msgid "[input file path]" msgstr "[chemin du fichier d'entrée]" -#: includes/cli.php:278 +#: includes/cli.php:279 msgid "Cron to handle item expiration" msgstr "Cron gérant l'expiration des éléments" -#: includes/cli.php:281 +#: includes/cli.php:282 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" -#: includes/cli.php:282 +#: includes/cli.php:283 msgid "-m/--max-age Item expiration limit (in days, optional)" msgstr "" -"-m/--max-age Limite d'expiration des éléments (en secondes, optionnel)" +"-m/--max-age Limit d'expiration des éléments (en secondes, optionnel)" #: templates/form.tpl:7 templates/search.tpl:50 templates/show.tpl:5 msgid "Name" @@ -310,7 +305,7 @@ msgstr "Ajouter" #: templates/search.tpl:8 msgid "Pattern" -msgstr "Mot clé" +msgstr "Not clé" #: templates/search.tpl:24 msgid "Nb by page" @@ -384,11 +379,11 @@ msgstr "" #: templates/homepage.tpl:11 msgid "" -"The access to this application is available by the following URL: %1" +"The access to this application is available by the following URL: %1" msgstr "" -"L'accès à cette application est possible via l'URL suivante : " -"%1" +"L'accès à cette application est possible via l'URL suivante : %1" #: templates/homepage.tpl:14 msgid "This app contains some demo pages:" diff --git a/example/locales/messages.pot b/example/locales/messages.pot index c3763fe..409e3e1 100644 --- a/example/locales/messages.pot +++ b/example/locales/messages.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" -"POT-Creation-Date: 2023-03-09 18:14+0100\n" -"PO-Revision-Date: 2023-03-09 18:14+0100\n" +"POT-Creation-Date: 2024-01-23 18:09+0000\n" +"PO-Revision-Date: 2024-01-23 18:09+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -10,10 +10,10 @@ msgstr "" msgid "Invalid element identifier." msgstr "" -#: includes/url-helpers.php:13 includes/url-public.php:242 -#: includes/url-public.php:269 +#: includes/url-helpers.php:13 includes/url-public.php:232 +#: includes/url-public.php:259 includes/cli.php:136 includes/cli.php:160 #, php-format -msgid "Item #% s not found." +msgid "Item #%s not found." msgstr "" #: includes/url-public.php:38 @@ -37,232 +37,227 @@ msgstr "" #: includes/url-public.php:159 #, php-format -msgid "The element '% s' has been created." +msgid "The element '%s' has been created." msgstr "" -#: includes/url-public.php:163 +#: includes/url-public.php:162 msgid "An error occurred while saving this item." msgstr "" -#: includes/url-public.php:170 +#: includes/url-public.php:168 msgid "" "There are errors preventing this item from being saved. Please correct them " "before attempting to add this item." msgstr "" -#: includes/url-public.php:177 +#: includes/url-public.php:175 msgid "New" msgstr "" -#: includes/url-public.php:187 +#: includes/url-public.php:186 msgid "You cannot edit this item." msgstr "" -#: includes/url-public.php:200 +#: includes/url-public.php:199 #, php-format -msgid "You have not made any changes to element '% s'." +msgid "You have not made any changes to element '%s'." msgstr "" -#: includes/url-public.php:204 +#: includes/url-public.php:203 #, php-format -msgid "The element '% s' has been updated successfully." +msgid "The element '%s' has been updated successfully." msgstr "" -#: includes/url-public.php:208 +#: includes/url-public.php:206 msgid "An error occurred while updating this item." msgstr "" -#: includes/url-public.php:216 +#: includes/url-public.php:213 msgid "" "There are errors preventing this item from being saved. Please correct them " "before attempting to save your changes." msgstr "" -#: includes/url-public.php:228 +#: includes/url-public.php:220 #, php-format msgid "Element %s: Modification" msgstr "" -#: includes/url-public.php:246 +#: includes/url-public.php:236 msgid "This item is already archived." msgstr "" -#: includes/url-public.php:249 +#: includes/url-public.php:239 msgid "You cannot archive this item." msgstr "" -#: includes/url-public.php:252 +#: includes/url-public.php:242 #, php-format -msgid "The element '% s' has been archived successfully." +msgid "The element '%s' has been archived successfully." msgstr "" -#: includes/url-public.php:255 +#: includes/url-public.php:245 msgid "An error occurred while archiving this item." msgstr "" -#: includes/url-public.php:272 +#: includes/url-public.php:262 msgid "You cannot delete this item." msgstr "" -#: includes/url-public.php:275 +#: includes/url-public.php:265 #, php-format -msgid "The element '% s' has been deleted successfully." +msgid "The element '%s' has been deleted successfully." msgstr "" -#: includes/url-public.php:278 +#: includes/url-public.php:268 msgid "An error occurred while deleting this item." msgstr "" -#: includes/core.php:57 +#: includes/core.php:61 msgid "Pending" msgstr "" -#: includes/core.php:58 +#: includes/core.php:62 msgid "Validated" msgstr "" -#: includes/core.php:59 +#: includes/core.php:63 msgid "Refused" msgstr "" -#: includes/core.php:60 +#: includes/core.php:64 msgid "Archived" msgstr "" -#: includes/cli.php:23 -#, php-format -msgid "Item #%s:\n" -msgstr "" - #: includes/cli.php:24 #, php-format -msgid "ID: %s" +msgid "Item #%s:\n" msgstr "" #: includes/cli.php:25 #, php-format -msgid "Name: '%s'" +msgid "ID: %s" msgstr "" #: includes/cli.php:26 #, php-format +msgid "Name: '%s'" +msgstr "" + +#: includes/cli.php:27 +#, php-format msgid "Date: %s" msgstr "" -#: includes/cli.php:28 +#: includes/cli.php:29 #, php-format msgid "Description: %s" msgstr "" -#: includes/cli.php:29 +#: includes/cli.php:30 msgid "Not set" msgstr "" -#: includes/cli.php:31 +#: includes/cli.php:32 #, php-format msgid "Status: %s" msgstr "" -#: includes/cli.php:84 +#: includes/cli.php:85 msgid "No item.\n" msgstr "" -#: includes/cli.php:110 +#: includes/cli.php:111 #, php-format msgid "%d item(s)" msgstr "" -#: includes/cli.php:116 +#: includes/cli.php:117 msgid "List/search items" msgstr "" -#: includes/cli.php:117 +#: includes/cli.php:118 msgid "[patterns]" msgstr "" -#: includes/cli.php:119 +#: includes/cli.php:120 msgid "-o|--orderby Ordering list criterion. Possible values:" msgstr "" -#: includes/cli.php:121 +#: includes/cli.php:122 msgid "-r|--reverse Reverse order" msgstr "" -#: includes/cli.php:122 +#: includes/cli.php:123 msgid "-s|--status Filter on status. Possible values:" msgstr "" -#: includes/cli.php:129 +#: includes/cli.php:130 msgid "You must provide a valid ID." msgstr "" -#: includes/cli.php:135 includes/cli.php:159 -#, php-format -msgid "Item #%s not found." -msgstr "" - -#: includes/cli.php:143 +#: includes/cli.php:144 msgid "Show item" msgstr "" -#: includes/cli.php:144 +#: includes/cli.php:145 msgid "[ID]" msgstr "" -#: includes/cli.php:149 +#: includes/cli.php:150 msgid "You must provide item ID." msgstr "" -#: includes/cli.php:153 +#: includes/cli.php:154 msgid "Invalid item ID" msgstr "" -#: includes/cli.php:164 +#: includes/cli.php:165 msgid "Are you sure you want to delete this item? Type 'yes' to continue: " msgstr "" -#: includes/cli.php:168 +#: includes/cli.php:169 msgid "User cancel" msgstr "" -#: includes/cli.php:174 +#: includes/cli.php:175 #, php-format -msgid "An error occured deleting item #%d." -msgstr "" - -#: includes/cli.php:181 -msgid "Delete item" +msgid "An error occurred deleting item #%d." msgstr "" #: includes/cli.php:182 +msgid "Delete item" +msgstr "" + +#: includes/cli.php:183 msgid "[item ID]" msgstr "" -#: includes/cli.php:194 +#: includes/cli.php:195 msgid "Export items (as CSV)" msgstr "" -#: includes/cli.php:195 +#: includes/cli.php:196 msgid "[output file path]" msgstr "" -#: includes/cli.php:210 +#: includes/cli.php:211 msgid "Restore items (from CSV)" msgstr "" -#: includes/cli.php:211 +#: includes/cli.php:212 msgid "[input file path]" msgstr "" -#: includes/cli.php:278 +#: includes/cli.php:279 msgid "Cron to handle item expiration" msgstr "" -#: includes/cli.php:281 +#: includes/cli.php:282 msgid "-j/--just-try Just-try mode : do not really removed expired item(s)" msgstr "" -#: includes/cli.php:282 +#: includes/cli.php:283 msgid "-m/--max-age Item expiration limit (in days, optional)" msgstr "" @@ -365,8 +360,8 @@ msgstr "" #: templates/homepage.tpl:11 msgid "" -"The access to this application is available by the following URL: %1" +"The access to this application is available by the following URL: %1" msgstr "" #: templates/homepage.tpl:14 diff --git a/example/static/js/search.js b/example/static/js/search.js index 87c31ba..1b3baba 100644 --- a/example/static/js/search.js +++ b/example/static/js/search.js @@ -1,6 +1,6 @@ -$( document ).ready(function () { +$(document).ready(function () { // Submit form on order change - $('select').change(function (e) { - $('button[name=submit]').click(); + $("select").change(function (e) { + $("button[name=submit]").click(); }); }); diff --git a/example/templates/form.tpl b/example/templates/form.tpl index a41db9d..3b93c41 100644 --- a/example/templates/form.tpl +++ b/example/templates/form.tpl @@ -8,7 +8,7 @@

+ class="form-control{if array_key_exists('name', $field_errors)} is-invalid{else if $submitted} is-valid{/if}"/> {if array_key_exists('name', $field_errors)}
{$field_errors['name']}
{/if}
@@ -17,7 +17,7 @@
{if array_key_exists('status', $field_errors)}
{$field_errors['status']}
{/if} @@ -27,14 +27,14 @@
- + {if array_key_exists('description', $field_errors)}
{$field_errors['description']}
{/if}
{t}Back{/t} -