Introduce new pre-commit hooks and code cleaning
This commit is contained in:
parent
e34682de4b
commit
3abd2a328b
50 changed files with 776 additions and 774 deletions
6
.codespell-exclusions
Normal file
6
.codespell-exclusions
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
.git
|
||||||
|
./static/lib
|
||||||
|
./vendor
|
||||||
|
./example/data
|
||||||
|
./locales/*.js
|
||||||
|
*.pot
|
|
@ -1,9 +1,33 @@
|
||||||
# Pre-commit hooks to run tests and ensure code is cleaned.
|
# Pre-commit hooks to run tests and ensure code is cleaned.
|
||||||
# See https://pre-commit.com for more information
|
# See https://pre-commit.com for more information
|
||||||
|
---
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/digitalpulp/pre-commit-php.git
|
- repo: https://github.com/codespell-project/codespell
|
||||||
rev: 1.4.0
|
rev: v2.2.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: php-stan
|
- id: codespell
|
||||||
files: \.(php)$
|
exclude: static/lib/|locales/.*\.js$|\.pot$
|
||||||
args: ['--configuration=phpstan.neon']
|
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)
|
||||||
|
|
3
.prettierignore
Normal file
3
.prettierignore
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
/static/lib/*
|
||||||
|
/locales/*
|
||||||
|
/example/locales/*
|
9
.yamllint.yaml
Normal file
9
.yamllint.yaml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
extends: default
|
||||||
|
|
||||||
|
ignore: |
|
||||||
|
static/lib/*
|
||||||
|
|
||||||
|
rules:
|
||||||
|
line-length:
|
||||||
|
max: 100
|
||||||
|
level: warning
|
32
README.md
32
README.md
|
@ -10,20 +10,20 @@ This project aim to provide all main necessary elements to build a web applicati
|
||||||
|
|
||||||
Main features are :
|
Main features are :
|
||||||
|
|
||||||
* a configuration manager actually based on the [yaml](https://yaml.org/) file format
|
- a configuration manager actually based on the [yaml](https://yaml.org/) file format
|
||||||
* an URL routing system with a syntax based on regex
|
- an URL routing system with a syntax based on regex
|
||||||
* a templating solution based on [Smarty](https://www.smarty.net/)
|
- 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
|
- 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 logging system with PHP errors & exceptions handling
|
||||||
* a light database integration based on [FluentPDO](https://github.com/envms/fluentpdo)
|
- a light database integration based on [FluentPDO](https://github.com/envms/fluentpdo)
|
||||||
* a [Sentry](https://sentry.io) integration
|
- a [Sentry](https://sentry.io) integration
|
||||||
* a PHP session manager (with expiration and max life handling)
|
- a PHP session manager (with expiration and max life handling)
|
||||||
* a mailer solution to forge and send emails
|
- a mailer solution to forge and send emails
|
||||||
* an hook system to easily trigger and register hooks on events
|
- an hook system to easily trigger and register hooks on events
|
||||||
* a static files serving system with an overloadable multiple directories support
|
- 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
|
- 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
|
- a command line manager to easily implement CLI tools
|
||||||
* collection of helpers to check, clean, cast, format (etc) values
|
- 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.
|
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,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
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.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
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.
|
||||||
|
|
|
@ -1,39 +1,39 @@
|
||||||
{
|
{
|
||||||
"name": "brenard/eesyphp",
|
"name": "brenard/eesyphp",
|
||||||
"description": "Easyphp PHP framework for simple web apps",
|
"description": "Easyphp PHP framework for simple web apps",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Benjamin Renard",
|
"name": "Benjamin Renard",
|
||||||
"email": "brenard@easter-eggs.com"
|
"email": "brenard@easter-eggs.com"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"EesyPHP\\": "src/"
|
"EesyPHP\\": "src/"
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"src/functions.php"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"require": {
|
"files": [
|
||||||
"envms/fluentpdo": "^2.2",
|
"src/functions.php"
|
||||||
"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"
|
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"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"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Configuration
|
# 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).
|
> **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 :
|
## Data/files directories :
|
||||||
|
|
||||||
All application data are, by default, in _data_ sub-directory. You could configure it by using the following variables :
|
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_)
|
- `$data_dir` : Root DATA directory (Default : _data_)
|
||||||
- `$logs_dir_path` : Logs directory (Default : _$data_dir/logs_)
|
- `$tmp_root_dir` : Root temporary files directory (Default : _$data_dir/tmp_)
|
||||||
- `$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_)
|
- `$logs_dir_path` : Logs directory (Default : _$data_dir/logs_)
|
||||||
- `$smarty_templates_c_dir` : Templates cache directory (Default : _$tmp_root_dir/templates_c_)
|
- `$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 :
|
## 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 :
|
## 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 :
|
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.
|
- `$dn_dsn` : the _Data Source Name (DSN)_ depending on your database backend.
|
||||||
- `$db_pwd` : the database password.
|
- `$db_user` : the database username.
|
||||||
- `$db_options` : the database connection options (see your PHP PDO Driver documentation). By default, this variable value is an empty array ("`array()`").
|
- `$db_pwd` : the database password.
|
||||||
- `$db_date_format` : the date format as retreive from the database.
|
- `$db_options` : the database connection options (see your PHP PDO Driver documentation). By default, this variable value is an empty array ("`array()`").
|
||||||
- `$db_datetime_format` : the date and time format as retreive from the database.
|
- `$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.
|
> **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 :
|
## 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 :
|
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_headers` : an PHP array of default headers add to mail 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_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
|
## Web stats JS code inclusion
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ apt install php-ldap php-net-ldap2
|
||||||
|
|
||||||
## Deployment :
|
## 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
|
```bash
|
||||||
cd /var/www
|
cd /var/www
|
||||||
|
@ -77,9 +77,9 @@ sudo mysql items < /var/www/eesyphp/data/mariadb-mysql.init-db.sql
|
||||||
|
|
||||||
## Configure PHP FPM pool :
|
## Configure PHP FPM pool :
|
||||||
|
|
||||||
You could configure a dedicated *PHP FPM pool*.
|
You could configure a dedicated _PHP FPM pool_.
|
||||||
|
|
||||||
***Example :***
|
**_Example :_**
|
||||||
|
|
||||||
```
|
```
|
||||||
[eesyphp]
|
[eesyphp]
|
||||||
|
@ -104,9 +104,9 @@ php_value[date.timezone] = Europe/Paris
|
||||||
|
|
||||||
## Configure Apache VirtualHost :
|
## Configure Apache VirtualHost :
|
||||||
|
|
||||||
You could configure a dedicated *VirtualHost*.
|
You could configure a dedicated _VirtualHost_.
|
||||||
|
|
||||||
***Example :***
|
**_Example :_**
|
||||||
|
|
||||||
```
|
```
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
|
|
|
@ -172,7 +172,7 @@ function cli_delete($command_args) {
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
if (!delete_item($item['id']))
|
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;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ log:
|
||||||
file_path: "${log.directory_path}/app.log"
|
file_path: "${log.directory_path}/app.log"
|
||||||
|
|
||||||
# Log level (TRACE / DEBUG / INFO / WARNING / ERROR / FATAL)
|
# Log level (TRACE / DEBUG / INFO / WARNING / ERROR / FATAL)
|
||||||
level: 'INFO'
|
level: "INFO"
|
||||||
|
|
||||||
# Log PHP errors levels (as specified to set_error_handler())
|
# 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
|
# Note: expected a list of PHP error level constants that will be resolved and combine
|
||||||
|
@ -51,7 +51,6 @@ log:
|
||||||
# - ~E_STRICT
|
# - ~E_STRICT
|
||||||
# - ~E_DEPRECATED
|
# - ~E_DEPRECATED
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Sentry configuration
|
# Sentry configuration
|
||||||
#
|
#
|
||||||
|
@ -70,7 +69,6 @@ sentry:
|
||||||
- "E_RECOVERABLE_ERROR"
|
- "E_RECOVERABLE_ERROR"
|
||||||
- "E_DEPRECATED"
|
- "E_DEPRECATED"
|
||||||
|
|
||||||
|
|
||||||
# Traces sample rate (between 0 and 1)
|
# Traces sample rate (between 0 and 1)
|
||||||
# Note: this parameter permit to determine how many transactions (=~ access) are traced and
|
# 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
|
# 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
|
options: null
|
||||||
|
|
||||||
# Date/Datetime format in database (strptime format)
|
# Date/Datetime format in database (strptime format)
|
||||||
date_format: '%s'
|
date_format: "%s"
|
||||||
datetime_format: '%s'
|
datetime_format: "%s"
|
||||||
|
|
||||||
# Postgresql
|
# Postgresql
|
||||||
#dsn: "pgsql:host=localhost;port=5432;dbname=items"
|
#dsn: "pgsql:host=localhost;port=5432;dbname=items"
|
||||||
|
@ -128,8 +126,8 @@ db:
|
||||||
#options: null
|
#options: null
|
||||||
|
|
||||||
# Date/Datetime format in database (strptime format)
|
# Date/Datetime format in database (strptime format)
|
||||||
#date_format: '%Y-%m-%d' # Exemple : 2018-10-12
|
#date_format: '%Y-%m-%d' # Example : 2018-10-12
|
||||||
#datetime_format: '%Y-%m-%d %H:%M:%S' # Exemple : 2018-10-12 18:06:59
|
#datetime_format: '%Y-%m-%d %H:%M:%S' # Example : 2018-10-12 18:06:59
|
||||||
|
|
||||||
# MariaDB / MySQL
|
# MariaDB / MySQL
|
||||||
#dsn: "mysql:host=localhost;dbname=items"
|
#dsn: "mysql:host=localhost;dbname=items"
|
||||||
|
@ -138,9 +136,8 @@ db:
|
||||||
#options: null
|
#options: null
|
||||||
|
|
||||||
# Date/Datetime format in database (strptime format)
|
# Date/Datetime format in database (strptime format)
|
||||||
#date_format: '%Y-%m-%d' # Exemple : 2018-10-12
|
#date_format: '%Y-%m-%d' # Example : 2018-10-12
|
||||||
#datetime_format: '%Y-%m-%d %H:%M:%S' # Exemple : 2018-10-12 18:06:59
|
#datetime_format: '%Y-%m-%d %H:%M:%S' # Example : 2018-10-12 18:06:59
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Authentication
|
# Authentication
|
||||||
|
@ -185,18 +182,18 @@ auth:
|
||||||
#
|
#
|
||||||
http:
|
http:
|
||||||
# HTTP Auth methods :
|
# 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 :
|
# Specific configuration is need in Apache to use this mode :
|
||||||
# RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
# 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
|
# This method could be only used with $http_auth_trust_without_password_challenge
|
||||||
# enabled.
|
# 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)
|
# using mod_php with Apache. (default)
|
||||||
method: 'PHP_AUTH'
|
method: "PHP_AUTH"
|
||||||
|
|
||||||
# Trust HTTP server authentication
|
# 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.
|
# from HTTP server.
|
||||||
#trust_without_password_challenge: true
|
#trust_without_password_challenge: true
|
||||||
|
|
||||||
|
@ -208,17 +205,17 @@ auth:
|
||||||
#
|
#
|
||||||
cas:
|
cas:
|
||||||
# CAS host (just the domain name)
|
# CAS host (just the domain name)
|
||||||
host: 'idp.example.com'
|
host: "idp.example.com"
|
||||||
|
|
||||||
# CAS context (the root path, default: '/idp/cas')
|
# CAS context (the root path, default: '/idp/cas')
|
||||||
# Example: for 'http://idp.example.com/idp/cas', put '/idp/cas'
|
# Example: for 'http://idp.example.com/idp/cas', put '/idp/cas'
|
||||||
context: '/idp/cas'
|
context: "/idp/cas"
|
||||||
|
|
||||||
# CAS HTTP port (default: 443)
|
# CAS HTTP port (default: 443)
|
||||||
#port: 443
|
#port: 443
|
||||||
|
|
||||||
# CAS procotol version
|
# 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'
|
#version: '2.0'
|
||||||
|
|
||||||
# CAS server SSL certificate validation (set to false to disable)
|
# CAS server SSL certificate validation (set to false to disable)
|
||||||
|
@ -233,8 +230,8 @@ auth:
|
||||||
|
|
||||||
# CAS Fake authenticated user
|
# CAS Fake authenticated user
|
||||||
#fake_authenticated_user: 'myusername'
|
#fake_authenticated_user: 'myusername'
|
||||||
|
|
||||||
# CAS user attributes to retreive with their properties:
|
# CAS user attributes to retrieve with their properties:
|
||||||
# [attr name]:
|
# [attr name]:
|
||||||
# # CAS attribute name (optional, default: [attr name])
|
# # CAS attribute name (optional, default: [attr name])
|
||||||
# cas_name: [CAS attr name]
|
# cas_name: [CAS attr name]
|
||||||
|
@ -247,14 +244,14 @@ auth:
|
||||||
# Note: only used by casuser auth backend.
|
# Note: only used by casuser auth backend.
|
||||||
user_attributes:
|
user_attributes:
|
||||||
login:
|
login:
|
||||||
cas_name: 'uid'
|
cas_name: "uid"
|
||||||
default: null
|
default: null
|
||||||
name:
|
name:
|
||||||
cas_name: 'displayName'
|
cas_name: "displayName"
|
||||||
cas_ldap_name: 'cn'
|
cas_ldap_name: "cn"
|
||||||
default: null
|
default: null
|
||||||
mail:
|
mail:
|
||||||
type: 'string'
|
type: "string"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Database user backend
|
# Database user backend
|
||||||
|
@ -275,7 +272,7 @@ auth:
|
||||||
# Password field name (optional, default: password)
|
# Password field name (optional, default: password)
|
||||||
password_field: "password"
|
password_field: "password"
|
||||||
# Exposed users table fields in resulting EesyPHP\Auth\User object
|
# Exposed users table fields in resulting EesyPHP\Auth\User object
|
||||||
# (optional, defailt: name, mail)
|
# (optional, default: name, mail)
|
||||||
exposed_fields:
|
exposed_fields:
|
||||||
- "name"
|
- "name"
|
||||||
- "mail"
|
- "mail"
|
||||||
|
@ -285,7 +282,7 @@ auth:
|
||||||
#
|
#
|
||||||
ldap:
|
ldap:
|
||||||
# LDAP host (required, multiple hosts could be specified with comma separator)
|
# LDAP host (required, multiple hosts could be specified with comma separator)
|
||||||
host: 'ldap://localhost'
|
host: "ldap://localhost"
|
||||||
|
|
||||||
# LDAP port (optional)
|
# LDAP port (optional)
|
||||||
#port: 389
|
#port: 389
|
||||||
|
@ -294,7 +291,7 @@ auth:
|
||||||
#starttls: false
|
#starttls: false
|
||||||
|
|
||||||
# LDAP directory base DN (required)
|
# LDAP directory base DN (required)
|
||||||
basedn: 'o=example'
|
basedn: "o=example"
|
||||||
|
|
||||||
# LDAP bind DN (optional)
|
# LDAP bind DN (optional)
|
||||||
#bind_dn: 'uid=eesyphp,ou=sysaccounts,${auth.ldap.basedn}'
|
#bind_dn: 'uid=eesyphp,ou=sysaccounts,${auth.ldap.basedn}'
|
||||||
|
@ -307,12 +304,12 @@ auth:
|
||||||
#user_filter_by_uid: 'uid=[username]'
|
#user_filter_by_uid: 'uid=[username]'
|
||||||
|
|
||||||
# User base DN
|
# 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 instead of user DN (optional, default: false)
|
||||||
#bind_with_username: true
|
#bind_with_username: true
|
||||||
|
|
||||||
# LDAP user attributes to retreive with their properties:
|
# LDAP user attributes to retrieve with their properties:
|
||||||
# [attr name]:
|
# [attr name]:
|
||||||
# # LDAP attribute name (optional, default: [attr name])
|
# # LDAP attribute name (optional, default: [attr name])
|
||||||
# ldap_name: [LDAP attr name]
|
# ldap_name: [LDAP attr name]
|
||||||
|
@ -326,16 +323,16 @@ auth:
|
||||||
# default: null
|
# default: null
|
||||||
user_attributes:
|
user_attributes:
|
||||||
login:
|
login:
|
||||||
ldap_name: 'uid'
|
ldap_name: "uid"
|
||||||
multivalued: false
|
multivalued: false
|
||||||
default: null
|
default: null
|
||||||
name:
|
name:
|
||||||
ldap_name: 'displayName'
|
ldap_name: "displayName"
|
||||||
alt_ldap_name: 'cn'
|
alt_ldap_name: "cn"
|
||||||
multivalued: false
|
multivalued: false
|
||||||
default: null
|
default: null
|
||||||
mail:
|
mail:
|
||||||
type: 'string'
|
type: "string"
|
||||||
|
|
||||||
# PEAR Net_LDAP2 library path (optional, default: Net/LDAP2.php)
|
# PEAR Net_LDAP2 library path (optional, default: Net/LDAP2.php)
|
||||||
#netldap2_path: 'Net/LDAP2.php'
|
#netldap2_path: 'Net/LDAP2.php'
|
||||||
|
@ -345,15 +342,14 @@ auth:
|
||||||
#
|
#
|
||||||
email:
|
email:
|
||||||
# PHP PEAR Mail and Mail_Mine paths
|
# PHP PEAR Mail and Mail_Mine paths
|
||||||
php_mail_path: 'Mail.php'
|
php_mail_path: "Mail.php"
|
||||||
php_mail_mime_path: 'Mail/mime.php'
|
php_mail_mime_path: "Mail/mime.php"
|
||||||
|
|
||||||
|
|
||||||
# Sending method :
|
# Sending method :
|
||||||
# - mail : use PHP mail function
|
# - mail : use PHP mail function
|
||||||
# - sendmail : use sendmail system command
|
# - sendmail : use sendmail system command
|
||||||
# - smtp : use an SMTP server (PHP PEAR Net_SMTP required)
|
# - smtp : use an SMTP server (PHP PEAR Net_SMTP required)
|
||||||
send_method: 'smtp'
|
send_method: "smtp"
|
||||||
|
|
||||||
# Sending parameters
|
# Sending parameters
|
||||||
# See : http:#pear.php.net/manual/en/package.mail.mail.factory.php
|
# 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 e-mails sent to a configured e-mail address
|
||||||
catch_all: false
|
catch_all: false
|
||||||
|
|
||||||
# Web Stats JS code
|
# Web Stats JS code
|
||||||
#webstats_js_code: ''
|
#webstats_js_code: ''
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ function get_items($orderby='id', $raw_values=false) {
|
||||||
return $items;
|
return $items;
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ function get_item($id, $raw_values=false) {
|
||||||
return $db -> format_row_info($info, array('date'));
|
return $db -> format_row_info($info, array('date'));
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -280,7 +280,7 @@ function search_items($params) {
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
Log :: exception(
|
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))
|
preg_replace("/\n[ \t]*/", " ", print_r($params, true))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -322,7 +322,7 @@ function restore_items($fd=null) {
|
||||||
$result = $db -> fpdo -> deleteFrom('item')
|
$result = $db -> fpdo -> deleteFrom('item')
|
||||||
-> execute();
|
-> execute();
|
||||||
if ($result === false) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -369,7 +369,7 @@ function restore_items($fd=null) {
|
||||||
$restored++;
|
$restored++;
|
||||||
}
|
}
|
||||||
else {
|
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;
|
$error = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ function handle_item_post_data(&$info, $enabled_fields=null, $required_fields=nu
|
||||||
$info['name'] = $_POST['name'];
|
$info['name'] = $_POST['name'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$field_errors['name'] = "Ce nom est invalide.";
|
$field_errors['name'] = "Ce nom est invalid.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -61,7 +61,7 @@ function handle_item_post_data(&$info, $enabled_fields=null, $required_fields=nu
|
||||||
$info['description'] = $_POST['description'];
|
$info['description'] = $_POST['description'];
|
||||||
}
|
}
|
||||||
else {
|
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) {
|
function can_modify($item) {
|
||||||
|
|
|
@ -10,7 +10,7 @@ function get_item_from_url($id, $fatal=false) {
|
||||||
|
|
||||||
$item = get_item($id);
|
$item = get_item($id);
|
||||||
if(!is_array($item)) {
|
if(!is_array($item)) {
|
||||||
$error = sprintf(_("Item #% s not found."), $id);
|
$error = sprintf(_("Item #%s not found."), $id);
|
||||||
if ($fatal)
|
if ($fatal)
|
||||||
Log :: fatal($error);
|
Log :: fatal($error);
|
||||||
Tpl :: add_error($error);
|
Tpl :: add_error($error);
|
||||||
|
|
|
@ -156,7 +156,7 @@ function handle_create($request) {
|
||||||
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)) {
|
||||||
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']);
|
Url :: redirect('item/'.$item['id']);
|
||||||
}
|
}
|
||||||
Tpl :: add_error(_("An error occurred while saving this item."));
|
Tpl :: add_error(_("An error occurred while saving this item."));
|
||||||
|
@ -196,11 +196,11 @@ function handle_modify($request) {
|
||||||
}
|
}
|
||||||
Log :: debug('Changes : '.vardump($changes));
|
Log :: debug('Changes : '.vardump($changes));
|
||||||
if (empty($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']);
|
Url :: redirect('item/'.$item['id']);
|
||||||
}
|
}
|
||||||
if (update_item($item['id'], $changes) === true) {
|
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']);
|
Url :: redirect('item/'.$item['id']);
|
||||||
}
|
}
|
||||||
Tpl :: add_error(_("An error occurred while updating this item."));
|
Tpl :: add_error(_("An error occurred while updating this item."));
|
||||||
|
@ -229,7 +229,7 @@ Url :: add_url_handler('|^item/(?P<id>[0-9]+)/modify$|', 'handle_modify');
|
||||||
function handle_archive($request) {
|
function handle_archive($request) {
|
||||||
$item = get_item_from_url($request -> id);
|
$item = get_item_from_url($request -> id);
|
||||||
if(!is_array($item)) {
|
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');
|
Url :: redirect('item');
|
||||||
}
|
}
|
||||||
if ($item['status'] == 'archived') {
|
if ($item['status'] == 'archived') {
|
||||||
|
@ -239,7 +239,7 @@ function handle_archive($request) {
|
||||||
Tpl :: add_error(_('You cannot archive this item.'));
|
Tpl :: add_error(_('You cannot archive this item.'));
|
||||||
}
|
}
|
||||||
else if (archive_item($item['id']) === true) {
|
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 {
|
else {
|
||||||
Tpl :: add_error(_('An error occurred while archiving this item.'));
|
Tpl :: add_error(_('An error occurred while archiving this item.'));
|
||||||
|
@ -256,13 +256,13 @@ Url :: add_url_handler('|^item/(?P<id>[0-9]+)/archive$|', 'handle_archive');
|
||||||
function handle_delete($request) {
|
function handle_delete($request) {
|
||||||
$item = get_item_from_url($request -> id);
|
$item = get_item_from_url($request -> id);
|
||||||
if(!is_array($item)) {
|
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)) {
|
else if (!can_delete($item)) {
|
||||||
Tpl :: add_error(_('You cannot delete this item.'));
|
Tpl :: add_error(_('You cannot delete this item.'));
|
||||||
}
|
}
|
||||||
else if (delete_item($item['id']) === true) {
|
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 {
|
else {
|
||||||
Tpl :: add_error(_('An error occurred while deleting this item.'));
|
Tpl :: add_error(_('An error occurred while deleting this item.'));
|
||||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -1,7 +1,7 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"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"
|
"PO-Revision-Date: \n"
|
||||||
"Last-Translator: Benjamin Renard <brenard@easter-eggs.com>\n"
|
"Last-Translator: Benjamin Renard <brenard@easter-eggs.com>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
|
@ -9,18 +9,18 @@ msgstr ""
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Generator: Poedit 2.4.2\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||||
|
"X-Generator: Poedit 3.2.2\n"
|
||||||
|
|
||||||
#: includes/url-helpers.php:9
|
#: includes/url-helpers.php:9
|
||||||
msgid "Invalid element identifier."
|
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-helpers.php:13 includes/url-public.php:232
|
||||||
#: includes/url-public.php:269
|
#: includes/url-public.php:259 includes/cli.php:136 includes/cli.php:160
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Item #% s not found."
|
msgid "Item #%s not found."
|
||||||
msgstr "L'élément #%s est introuvable."
|
msgstr "Élément #%s introuvable."
|
||||||
|
|
||||||
#: includes/url-public.php:38
|
#: includes/url-public.php:38
|
||||||
msgid "Any"
|
msgid "Any"
|
||||||
|
@ -45,14 +45,14 @@ msgstr "Élément %s"
|
||||||
|
|
||||||
#: includes/url-public.php:159
|
#: includes/url-public.php:159
|
||||||
#, php-format
|
#, 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éé."
|
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."
|
msgid "An error occurred while saving this item."
|
||||||
msgstr "Une erreur est survenue en enregistrant cet élément."
|
msgstr "Une erreur est survenue en enregistrant cet élément."
|
||||||
|
|
||||||
#: includes/url-public.php:170
|
#: includes/url-public.php:168
|
||||||
msgid ""
|
msgid ""
|
||||||
"There are errors preventing this item from being saved. Please correct them "
|
"There are errors preventing this item from being saved. Please correct them "
|
||||||
"before attempting to add this item."
|
"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 "
|
"Des erreurs empêchent l'enregistrement de cet élément. Merci de les corriger "
|
||||||
"avant de tenter d'ajouter cet élément."
|
"avant de tenter d'ajouter cet élément."
|
||||||
|
|
||||||
#: includes/url-public.php:177
|
#: includes/url-public.php:175
|
||||||
msgid "New"
|
msgid "New"
|
||||||
msgstr "Nouveau"
|
msgstr "Nouveau"
|
||||||
|
|
||||||
#: includes/url-public.php:187
|
#: includes/url-public.php:186
|
||||||
msgid "You cannot edit this item."
|
msgid "You cannot edit this item."
|
||||||
msgstr "Vous ne pouvez pas modifier cet élément."
|
msgstr "Vous ne pouvez pas modifier cet élément."
|
||||||
|
|
||||||
#: includes/url-public.php:200
|
#: includes/url-public.php:199
|
||||||
#, php-format
|
#, 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'."
|
msgstr "Vous n'avez apporté aucune modification à l'élément '%s'."
|
||||||
|
|
||||||
#: includes/url-public.php:204
|
#: includes/url-public.php:203
|
||||||
#, php-format
|
#, 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."
|
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."
|
msgid "An error occurred while updating this item."
|
||||||
msgstr "Une erreur est survenue en mettant à jour cet élément."
|
msgstr "Une erreur est survenue en mettant à jour cet élément."
|
||||||
|
|
||||||
#: includes/url-public.php:216
|
#: includes/url-public.php:213
|
||||||
msgid ""
|
msgid ""
|
||||||
"There are errors preventing this item from being saved. Please correct them "
|
"There are errors preventing this item from being saved. Please correct them "
|
||||||
"before attempting to save your changes."
|
"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 "
|
"Des erreurs empêchent l'enregistrement de cet élément. Merci de les corriger "
|
||||||
"avant de tenter d'enregistrer vos modifications."
|
"avant de tenter d'enregistrer vos modifications."
|
||||||
|
|
||||||
#: includes/url-public.php:228
|
#: includes/url-public.php:220
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Element %s: Modification"
|
msgid "Element %s: Modification"
|
||||||
msgstr "Élément %s : Modification"
|
msgstr "Élément %s : Modification"
|
||||||
|
|
||||||
#: includes/url-public.php:246
|
#: includes/url-public.php:236
|
||||||
msgid "This item is already archived."
|
msgid "This item is already archived."
|
||||||
msgstr "Cet élément est déjà archivé."
|
msgstr "Cet élément est déjà archivé."
|
||||||
|
|
||||||
#: includes/url-public.php:249
|
#: includes/url-public.php:239
|
||||||
msgid "You cannot archive this item."
|
msgid "You cannot archive this item."
|
||||||
msgstr "Vous ne pouvez pas archiver cet élément."
|
msgstr "Vous ne pouvez pas archiver cet élément."
|
||||||
|
|
||||||
#: includes/url-public.php:252
|
#: includes/url-public.php:242
|
||||||
#, php-format
|
#, 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é."
|
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."
|
msgid "An error occurred while archiving this item."
|
||||||
msgstr "Une erreur est survenue en archivant cet élément."
|
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."
|
msgid "You cannot delete this item."
|
||||||
msgstr "Vous ne pouvez pas supprimer cet élément."
|
msgstr "Vous ne pouvez pas supprimer cet élément."
|
||||||
|
|
||||||
#: includes/url-public.php:275
|
#: includes/url-public.php:265
|
||||||
#, php-format
|
#, 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é."
|
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."
|
msgid "An error occurred while deleting this item."
|
||||||
msgstr "Une erreur est survenue en supprimant cet élément."
|
msgstr "Une erreur est survenue en supprimant cet élément."
|
||||||
|
|
||||||
#: includes/core.php:57
|
#: includes/core.php:61
|
||||||
msgid "Pending"
|
msgid "Pending"
|
||||||
msgstr "En attente"
|
msgstr "En attente"
|
||||||
|
|
||||||
#: includes/core.php:58
|
#: includes/core.php:62
|
||||||
msgid "Validated"
|
msgid "Validated"
|
||||||
msgstr "Validé"
|
msgstr "Validé"
|
||||||
|
|
||||||
#: includes/core.php:59
|
#: includes/core.php:63
|
||||||
msgid "Refused"
|
msgid "Refused"
|
||||||
msgstr "Refusé"
|
msgstr "Refusé"
|
||||||
|
|
||||||
#: includes/core.php:60
|
#: includes/core.php:64
|
||||||
msgid "Archived"
|
msgid "Archived"
|
||||||
msgstr "Archivé"
|
msgstr "Archivé"
|
||||||
|
|
||||||
#: includes/cli.php:23
|
#: includes/cli.php:24
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Item #%s:\n"
|
msgid "Item #%s:\n"
|
||||||
msgstr "Élément #%s :\n"
|
msgstr "Élément #%s :\n"
|
||||||
|
|
||||||
#: includes/cli.php:24
|
#: includes/cli.php:25
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "ID: %s"
|
msgid "ID: %s"
|
||||||
msgstr "ID : %s"
|
msgstr "ID : %s"
|
||||||
|
|
||||||
#: includes/cli.php:25
|
#: includes/cli.php:26
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Name: '%s'"
|
msgid "Name: '%s'"
|
||||||
msgstr "Nom : %s"
|
msgstr "Nom : %s"
|
||||||
|
|
||||||
#: includes/cli.php:26
|
#: includes/cli.php:27
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Date: %s"
|
msgid "Date: %s"
|
||||||
msgstr "Date : %s"
|
msgstr "Date : %s"
|
||||||
|
|
||||||
#: includes/cli.php:28
|
#: includes/cli.php:29
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Description: %s"
|
msgid "Description: %s"
|
||||||
msgstr "Description : %s"
|
msgstr "Description : %s"
|
||||||
|
|
||||||
#: includes/cli.php:29
|
#: includes/cli.php:30
|
||||||
msgid "Not set"
|
msgid "Not set"
|
||||||
msgstr "Non-défini"
|
msgstr "Non-défini"
|
||||||
|
|
||||||
#: includes/cli.php:31
|
#: includes/cli.php:32
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Status: %s"
|
msgid "Status: %s"
|
||||||
msgstr "Statut : %s"
|
msgstr "Statut : %s"
|
||||||
|
|
||||||
#: includes/cli.php:84
|
#: includes/cli.php:85
|
||||||
msgid "No item.\n"
|
msgid "No item.\n"
|
||||||
msgstr "Aucun élément.\n"
|
msgstr "Aucun élément.\n"
|
||||||
|
|
||||||
#: includes/cli.php:110
|
#: includes/cli.php:111
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%d item(s)"
|
msgid "%d item(s)"
|
||||||
msgstr "%d élément(s)"
|
msgstr "%d élément(s)"
|
||||||
|
|
||||||
#: includes/cli.php:116
|
#: includes/cli.php:117
|
||||||
msgid "List/search items"
|
msgid "List/search items"
|
||||||
msgstr "Lister/rechercher les éléments"
|
msgstr "Lister/rechercher les éléments"
|
||||||
|
|
||||||
#: includes/cli.php:117
|
#: includes/cli.php:118
|
||||||
msgid "[patterns]"
|
msgid "[patterns]"
|
||||||
msgstr "[mots clés]"
|
msgstr "[mots clés]"
|
||||||
|
|
||||||
#: includes/cli.php:119
|
#: includes/cli.php:120
|
||||||
msgid "-o|--orderby Ordering list criterion. Possible values:"
|
msgid "-o|--orderby Ordering list criterion. Possible values:"
|
||||||
msgstr "-o|--orderby Critère de tri de la liste. Valeurs possibles :"
|
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"
|
msgid "-r|--reverse Reverse order"
|
||||||
msgstr "-r|--reverse Ordre inverse"
|
msgstr "-r|--reverse Ordre inverse"
|
||||||
|
|
||||||
#: includes/cli.php:122
|
#: includes/cli.php:123
|
||||||
msgid "-s|--status Filter on status. Possible values:"
|
msgid "-s|--status Filter on status. Possible values:"
|
||||||
msgstr "-s|--status Filtrer sur le statut. Valeurs possibles :"
|
msgstr "-s|--status Filtrer sur le statut. Valeurs possibles :"
|
||||||
|
|
||||||
#: includes/cli.php:129
|
#: includes/cli.php:130
|
||||||
msgid "You must provide a valid ID."
|
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
|
#: includes/cli.php:144
|
||||||
#, php-format
|
|
||||||
msgid "Item #%s not found."
|
|
||||||
msgstr "Élément #%s introuvable."
|
|
||||||
|
|
||||||
#: includes/cli.php:143
|
|
||||||
msgid "Show item"
|
msgid "Show item"
|
||||||
msgstr "Voir un élément"
|
msgstr "Voir un élément"
|
||||||
|
|
||||||
#: includes/cli.php:144
|
#: includes/cli.php:145
|
||||||
msgid "[ID]"
|
msgid "[ID]"
|
||||||
msgstr "[ID]"
|
msgstr "[ID]"
|
||||||
|
|
||||||
#: includes/cli.php:149
|
#: includes/cli.php:150
|
||||||
msgid "You must provide item ID."
|
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"
|
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: "
|
msgid "Are you sure you want to delete this item? Type 'yes' to continue: "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Êtes-vous sûre de vouloir supprimer cet élément ? Taper 'yes' pour "
|
"Êtes-vous sûre de vouloir supprimer cet élément ? Taper 'yes' pour "
|
||||||
"continuer : "
|
"continuer : "
|
||||||
|
|
||||||
#: includes/cli.php:168
|
#: includes/cli.php:169
|
||||||
msgid "User cancel"
|
msgid "User cancel"
|
||||||
msgstr "L'utilisateur a annulé"
|
msgstr "L'utilisateur a annulé"
|
||||||
|
|
||||||
#: includes/cli.php:174
|
#: includes/cli.php:175
|
||||||
#, php-format
|
#, 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."
|
msgstr "Une erreur est survenue en supprimant l'élément #%d."
|
||||||
|
|
||||||
#: includes/cli.php:181
|
#: includes/cli.php:182
|
||||||
msgid "Delete item"
|
msgid "Delete item"
|
||||||
msgstr "Supprimer un élément"
|
msgstr "Supprimer un élément"
|
||||||
|
|
||||||
#: includes/cli.php:182
|
#: includes/cli.php:183
|
||||||
msgid "[item ID]"
|
msgid "[item ID]"
|
||||||
msgstr "[ID de l'élément]"
|
msgstr "[ID de l'élément]"
|
||||||
|
|
||||||
#: includes/cli.php:194
|
#: includes/cli.php:195
|
||||||
msgid "Export items (as CSV)"
|
msgid "Export items (as CSV)"
|
||||||
msgstr "Exporter les éléments (au format CSV)"
|
msgstr "Exporter les éléments (au format CSV)"
|
||||||
|
|
||||||
#: includes/cli.php:195
|
#: includes/cli.php:196
|
||||||
msgid "[output file path]"
|
msgid "[output file path]"
|
||||||
msgstr "[chemin du fichier de sortie]"
|
msgstr "[chemin du fichier de sortie]"
|
||||||
|
|
||||||
#: includes/cli.php:210
|
#: includes/cli.php:211
|
||||||
msgid "Restore items (from CSV)"
|
msgid "Restore items (from CSV)"
|
||||||
msgstr "Restaurer les éléments (depuis un fichier CSV)"
|
msgstr "Restaurer les éléments (depuis un fichier CSV)"
|
||||||
|
|
||||||
#: includes/cli.php:211
|
#: includes/cli.php:212
|
||||||
msgid "[input file path]"
|
msgid "[input file path]"
|
||||||
msgstr "[chemin du fichier d'entrée]"
|
msgstr "[chemin du fichier d'entrée]"
|
||||||
|
|
||||||
#: includes/cli.php:278
|
#: includes/cli.php:279
|
||||||
msgid "Cron to handle item expiration"
|
msgid "Cron to handle item expiration"
|
||||||
msgstr "Cron gérant l'expiration des éléments"
|
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)"
|
msgid "-j/--just-try Just-try mode : do not really removed expired item(s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"-j/--just-try Mode just-try : Ne supprime pas réellement les éléments "
|
"-j/--just-try Mode just-try : Ne supprime pas réellement les éléments "
|
||||||
"expirés"
|
"expirés"
|
||||||
|
|
||||||
#: includes/cli.php:282
|
#: includes/cli.php:283
|
||||||
msgid "-m/--max-age Item expiration limit (in days, optional)"
|
msgid "-m/--max-age Item expiration limit (in days, optional)"
|
||||||
msgstr ""
|
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
|
#: templates/form.tpl:7 templates/search.tpl:50 templates/show.tpl:5
|
||||||
msgid "Name"
|
msgid "Name"
|
||||||
|
@ -310,7 +305,7 @@ msgstr "Ajouter"
|
||||||
|
|
||||||
#: templates/search.tpl:8
|
#: templates/search.tpl:8
|
||||||
msgid "Pattern"
|
msgid "Pattern"
|
||||||
msgstr "Mot clé"
|
msgstr "Not clé"
|
||||||
|
|
||||||
#: templates/search.tpl:24
|
#: templates/search.tpl:24
|
||||||
msgid "Nb by page"
|
msgid "Nb by page"
|
||||||
|
@ -384,11 +379,11 @@ msgstr ""
|
||||||
|
|
||||||
#: templates/homepage.tpl:11
|
#: templates/homepage.tpl:11
|
||||||
msgid ""
|
msgid ""
|
||||||
"The access to this application is available by the following URL: <a href="
|
"The access to this application is available by the following URL: <a "
|
||||||
"\"%1\">%1</a>"
|
"href=\"%1\">%1</a>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"L'accès à cette application est possible via l'URL suivante : <a href=\"%1\">"
|
"L'accès à cette application est possible via l'URL suivante : <a "
|
||||||
"%1</a>"
|
"href=\"%1\">%1</a>"
|
||||||
|
|
||||||
#: templates/homepage.tpl:14
|
#: templates/homepage.tpl:14
|
||||||
msgid "This app contains some demo pages:"
|
msgid "This app contains some demo pages:"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"POT-Creation-Date: 2023-03-09 18:14+0100\n"
|
"POT-Creation-Date: 2024-01-23 18:09+0000\n"
|
||||||
"PO-Revision-Date: 2023-03-09 18:14+0100\n"
|
"PO-Revision-Date: 2024-01-23 18:09+0000\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
@ -10,10 +10,10 @@ msgstr ""
|
||||||
msgid "Invalid element identifier."
|
msgid "Invalid element identifier."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/url-helpers.php:13 includes/url-public.php:242
|
#: includes/url-helpers.php:13 includes/url-public.php:232
|
||||||
#: includes/url-public.php:269
|
#: includes/url-public.php:259 includes/cli.php:136 includes/cli.php:160
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Item #% s not found."
|
msgid "Item #%s not found."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/url-public.php:38
|
#: includes/url-public.php:38
|
||||||
|
@ -37,232 +37,227 @@ msgstr ""
|
||||||
|
|
||||||
#: includes/url-public.php:159
|
#: includes/url-public.php:159
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The element '% s' has been created."
|
msgid "The element '%s' has been created."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/url-public.php:163
|
#: includes/url-public.php:162
|
||||||
msgid "An error occurred while saving this item."
|
msgid "An error occurred while saving this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/url-public.php:170
|
#: includes/url-public.php:168
|
||||||
msgid ""
|
msgid ""
|
||||||
"There are errors preventing this item from being saved. Please correct them "
|
"There are errors preventing this item from being saved. Please correct them "
|
||||||
"before attempting to add this item."
|
"before attempting to add this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/url-public.php:177
|
#: includes/url-public.php:175
|
||||||
msgid "New"
|
msgid "New"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/url-public.php:187
|
#: includes/url-public.php:186
|
||||||
msgid "You cannot edit this item."
|
msgid "You cannot edit this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/url-public.php:200
|
#: includes/url-public.php:199
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "You have not made any changes to element '% s'."
|
msgid "You have not made any changes to element '%s'."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/url-public.php:204
|
#: includes/url-public.php:203
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The element '% s' has been updated successfully."
|
msgid "The element '%s' has been updated successfully."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/url-public.php:208
|
#: includes/url-public.php:206
|
||||||
msgid "An error occurred while updating this item."
|
msgid "An error occurred while updating this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/url-public.php:216
|
#: includes/url-public.php:213
|
||||||
msgid ""
|
msgid ""
|
||||||
"There are errors preventing this item from being saved. Please correct them "
|
"There are errors preventing this item from being saved. Please correct them "
|
||||||
"before attempting to save your changes."
|
"before attempting to save your changes."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/url-public.php:228
|
#: includes/url-public.php:220
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Element %s: Modification"
|
msgid "Element %s: Modification"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/url-public.php:246
|
#: includes/url-public.php:236
|
||||||
msgid "This item is already archived."
|
msgid "This item is already archived."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/url-public.php:249
|
#: includes/url-public.php:239
|
||||||
msgid "You cannot archive this item."
|
msgid "You cannot archive this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/url-public.php:252
|
#: includes/url-public.php:242
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The element '% s' has been archived successfully."
|
msgid "The element '%s' has been archived successfully."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/url-public.php:255
|
#: includes/url-public.php:245
|
||||||
msgid "An error occurred while archiving this item."
|
msgid "An error occurred while archiving this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/url-public.php:272
|
#: includes/url-public.php:262
|
||||||
msgid "You cannot delete this item."
|
msgid "You cannot delete this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/url-public.php:275
|
#: includes/url-public.php:265
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The element '% s' has been deleted successfully."
|
msgid "The element '%s' has been deleted successfully."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/url-public.php:278
|
#: includes/url-public.php:268
|
||||||
msgid "An error occurred while deleting this item."
|
msgid "An error occurred while deleting this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/core.php:57
|
#: includes/core.php:61
|
||||||
msgid "Pending"
|
msgid "Pending"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/core.php:58
|
#: includes/core.php:62
|
||||||
msgid "Validated"
|
msgid "Validated"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/core.php:59
|
#: includes/core.php:63
|
||||||
msgid "Refused"
|
msgid "Refused"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/core.php:60
|
#: includes/core.php:64
|
||||||
msgid "Archived"
|
msgid "Archived"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:23
|
|
||||||
#, php-format
|
|
||||||
msgid "Item #%s:\n"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: includes/cli.php:24
|
#: includes/cli.php:24
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "ID: %s"
|
msgid "Item #%s:\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:25
|
#: includes/cli.php:25
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Name: '%s'"
|
msgid "ID: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:26
|
#: includes/cli.php:26
|
||||||
#, php-format
|
#, php-format
|
||||||
|
msgid "Name: '%s'"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: includes/cli.php:27
|
||||||
|
#, php-format
|
||||||
msgid "Date: %s"
|
msgid "Date: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:28
|
#: includes/cli.php:29
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Description: %s"
|
msgid "Description: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:29
|
#: includes/cli.php:30
|
||||||
msgid "Not set"
|
msgid "Not set"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:31
|
#: includes/cli.php:32
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Status: %s"
|
msgid "Status: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:84
|
#: includes/cli.php:85
|
||||||
msgid "No item.\n"
|
msgid "No item.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:110
|
#: includes/cli.php:111
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%d item(s)"
|
msgid "%d item(s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:116
|
#: includes/cli.php:117
|
||||||
msgid "List/search items"
|
msgid "List/search items"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:117
|
#: includes/cli.php:118
|
||||||
msgid "[patterns]"
|
msgid "[patterns]"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:119
|
#: includes/cli.php:120
|
||||||
msgid "-o|--orderby Ordering list criterion. Possible values:"
|
msgid "-o|--orderby Ordering list criterion. Possible values:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:121
|
#: includes/cli.php:122
|
||||||
msgid "-r|--reverse Reverse order"
|
msgid "-r|--reverse Reverse order"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:122
|
#: includes/cli.php:123
|
||||||
msgid "-s|--status Filter on status. Possible values:"
|
msgid "-s|--status Filter on status. Possible values:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:129
|
#: includes/cli.php:130
|
||||||
msgid "You must provide a valid ID."
|
msgid "You must provide a valid ID."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:135 includes/cli.php:159
|
#: includes/cli.php:144
|
||||||
#, php-format
|
|
||||||
msgid "Item #%s not found."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: includes/cli.php:143
|
|
||||||
msgid "Show item"
|
msgid "Show item"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:144
|
#: includes/cli.php:145
|
||||||
msgid "[ID]"
|
msgid "[ID]"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:149
|
#: includes/cli.php:150
|
||||||
msgid "You must provide item ID."
|
msgid "You must provide item ID."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:153
|
#: includes/cli.php:154
|
||||||
msgid "Invalid item ID"
|
msgid "Invalid item ID"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:164
|
#: includes/cli.php:165
|
||||||
msgid "Are you sure you want to delete this item? Type 'yes' to continue: "
|
msgid "Are you sure you want to delete this item? Type 'yes' to continue: "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:168
|
#: includes/cli.php:169
|
||||||
msgid "User cancel"
|
msgid "User cancel"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:174
|
#: includes/cli.php:175
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "An error occured deleting item #%d."
|
msgid "An error occurred deleting item #%d."
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: includes/cli.php:181
|
|
||||||
msgid "Delete item"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:182
|
#: includes/cli.php:182
|
||||||
|
msgid "Delete item"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: includes/cli.php:183
|
||||||
msgid "[item ID]"
|
msgid "[item ID]"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:194
|
#: includes/cli.php:195
|
||||||
msgid "Export items (as CSV)"
|
msgid "Export items (as CSV)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:195
|
#: includes/cli.php:196
|
||||||
msgid "[output file path]"
|
msgid "[output file path]"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:210
|
#: includes/cli.php:211
|
||||||
msgid "Restore items (from CSV)"
|
msgid "Restore items (from CSV)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:211
|
#: includes/cli.php:212
|
||||||
msgid "[input file path]"
|
msgid "[input file path]"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:278
|
#: includes/cli.php:279
|
||||||
msgid "Cron to handle item expiration"
|
msgid "Cron to handle item expiration"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:281
|
#: includes/cli.php:282
|
||||||
msgid "-j/--just-try Just-try mode : do not really removed expired item(s)"
|
msgid "-j/--just-try Just-try mode : do not really removed expired item(s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/cli.php:282
|
#: includes/cli.php:283
|
||||||
msgid "-m/--max-age Item expiration limit (in days, optional)"
|
msgid "-m/--max-age Item expiration limit (in days, optional)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -365,8 +360,8 @@ msgstr ""
|
||||||
|
|
||||||
#: templates/homepage.tpl:11
|
#: templates/homepage.tpl:11
|
||||||
msgid ""
|
msgid ""
|
||||||
"The access to this application is available by the following URL: <a href="
|
"The access to this application is available by the following URL: <a "
|
||||||
"\"%1\">%1</a>"
|
"href=\"%1\">%1</a>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/homepage.tpl:14
|
#: templates/homepage.tpl:14
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
$( document ).ready(function () {
|
$(document).ready(function () {
|
||||||
// Submit form on order change
|
// Submit form on order change
|
||||||
$('select').change(function (e) {
|
$("select").change(function (e) {
|
||||||
$('button[name=submit]').click();
|
$("button[name=submit]").click();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input name="name" type="text" required
|
<input name="name" type="text" required
|
||||||
value='{if array_key_exists('name', $info) && $info.name}{$info.name|escape:'quotes'}{/if}'
|
value='{if array_key_exists('name', $info) && $info.name}{$info.name|escape:'quotes'}{/if}'
|
||||||
class="form-control{if array_key_exists('name', $field_errors)} is-invalid{else if $submited} is-valid{/if}"/>
|
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)}<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}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
<label class="col-sm-2 col-form-label required">{t}Status{/t}</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" required
|
<select name="status" id="status" required
|
||||||
class="form-select{if array_key_exists('status', $field_errors)} is-invalid{else if $submited} is-valid{/if}">
|
class="form-select{if array_key_exists('status', $field_errors)} is-invalid{else if $submitted} is-valid{/if}">
|
||||||
{html_options options=$status_list selected=$info.status}
|
{html_options options=$status_list selected=$info.status}
|
||||||
</select>
|
</select>
|
||||||
{if array_key_exists('status', $field_errors)}<div class="invalid-feedback">{$field_errors['status']}</div>{/if}
|
{if array_key_exists('status', $field_errors)}<div class="invalid-feedback">{$field_errors['status']}</div>{/if}
|
||||||
|
@ -27,14 +27,14 @@
|
||||||
<div class="mb-3 row">
|
<div class="mb-3 row">
|
||||||
<label class="col-sm-2 col-form-label">{t}Description{/t}</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 $submitted} 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}
|
||||||
</div>
|
</div>
|
||||||
</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> {t}Back{/t}</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="submitted" class="btn btn-primary">
|
||||||
{if isset($item_id)}
|
{if isset($item_id)}
|
||||||
<i class="fa fa-floppy-o" aria-hidden="true"></i> {t}Save{/t}
|
<i class="fa fa-floppy-o" aria-hidden="true"></i> {t}Save{/t}
|
||||||
{else}
|
{else}
|
||||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -1,7 +1,7 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"POT-Creation-Date: 2023-11-20 17:34+0000\n"
|
"POT-Creation-Date: 2024-01-23 18:15+0000\n"
|
||||||
"PO-Revision-Date: \n"
|
"PO-Revision-Date: \n"
|
||||||
"Last-Translator: Benjamin Renard <brenard@easter-eggs.com>\n"
|
"Last-Translator: Benjamin Renard <brenard@easter-eggs.com>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
|
@ -20,14 +20,14 @@ msgstr "Aucun template spécifié."
|
||||||
msgid "An error occurred while displaying this page."
|
msgid "An error occurred while displaying this page."
|
||||||
msgstr "Une erreur est survenue en affichant cette page."
|
msgstr "Une erreur est survenue en affichant cette page."
|
||||||
|
|
||||||
#: Tpl.php:567
|
#: Tpl.php:573
|
||||||
msgid "Unexpected error occured. If problem persist, please contact support."
|
msgid "Unexpected error occurred. If problem persist, please contact support."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Une erreur inconnue est survenue. Si le problème persiste, merci de prendre "
|
"Une erreur inconnue est survenue. Si le problème persiste, merci de prendre "
|
||||||
"contact avec le support."
|
"contact avec le support."
|
||||||
|
|
||||||
#: Tpl.php:896
|
#: Tpl.php:904
|
||||||
msgid "Unkwown"
|
msgid "Unknown"
|
||||||
msgstr "Inconnu"
|
msgstr "Inconnu"
|
||||||
|
|
||||||
#: Db.php:78
|
#: Db.php:78
|
||||||
|
@ -36,15 +36,15 @@ msgstr "Impossible de se connecter à la base de données."
|
||||||
|
|
||||||
#: Auth/Form.php:51
|
#: Auth/Form.php:51
|
||||||
msgid "Invalid username or password."
|
msgid "Invalid username or password."
|
||||||
msgstr "Nom d'utilisateur ou mot de passe invalide."
|
msgstr "Nom d'utilisateur ou not de passe invalid."
|
||||||
|
|
||||||
#: Auth/Form.php:91
|
#: Auth/Form.php:91
|
||||||
msgid "Sign in"
|
msgid "Sign in"
|
||||||
msgstr "Connexion"
|
msgstr "Connection"
|
||||||
|
|
||||||
#: Auth/Http.php:37 Url.php:181
|
#: Auth/Http.php:37 Url.php:181
|
||||||
msgid "Authentication required"
|
msgid "Authentication required"
|
||||||
msgstr "Authentification requise"
|
msgstr "Authentication requise"
|
||||||
|
|
||||||
#: Auth/Http.php:124 Auth/Http.php:127 Url.php:185
|
#: Auth/Http.php:124 Auth/Http.php:127 Url.php:185
|
||||||
msgid "Access denied"
|
msgid "Access denied"
|
||||||
|
@ -60,7 +60,7 @@ msgstr "Mauvaise requête"
|
||||||
|
|
||||||
#: Url.php:178
|
#: Url.php:178
|
||||||
msgid "Invalid request."
|
msgid "Invalid request."
|
||||||
msgstr "Requête invalide."
|
msgstr "Requête invalid."
|
||||||
|
|
||||||
#: Url.php:182
|
#: Url.php:182
|
||||||
msgid "You have to be authenticated to access to this page."
|
msgid "You have to be authenticated to access to this page."
|
||||||
|
@ -114,7 +114,7 @@ msgstr "Cette requête ne peut être traitée."
|
||||||
|
|
||||||
#: Url.php:450
|
#: Url.php:450
|
||||||
msgid "Authentication required but fail to authenticate you."
|
msgid "Authentication required but fail to authenticate you."
|
||||||
msgstr "Authentification requise mais impossible pour vous authentifier."
|
msgstr "Authentication requise mais impossible pour vous authentifier."
|
||||||
|
|
||||||
#: Url.php:469
|
#: Url.php:469
|
||||||
msgid "This request could not be processed correctly."
|
msgid "This request could not be processed correctly."
|
||||||
|
@ -122,7 +122,7 @@ msgstr "Cette requête n'a put être traitée correctement."
|
||||||
|
|
||||||
#: Cli.php:44
|
#: Cli.php:44
|
||||||
msgid "Create a new project using EesyPHP framework"
|
msgid "Create a new project using EesyPHP framework"
|
||||||
msgstr "Créer un nouveau projet utilisant le framework EesyPHP"
|
msgstr "Créer un nouveau project utilisant le framework EesyPHP"
|
||||||
|
|
||||||
#: Cli.php:47
|
#: Cli.php:47
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@ -130,7 +130,7 @@ msgid ""
|
||||||
"using the EesyPHP framework."
|
"using the EesyPHP framework."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Cette commande peut-être utilisée pour construire facilement la structure "
|
"Cette commande peut-être utilisée pour construire facilement la structure "
|
||||||
"d'un nouveau projet utilisant le framework EesyPHP."
|
"d'un nouveau project utilisant le framework EesyPHP."
|
||||||
|
|
||||||
#: Cli.php:55
|
#: Cli.php:55
|
||||||
msgid "Start the PHP built-in HTTP server to serve the application"
|
msgid "Start the PHP built-in HTTP server to serve the application"
|
||||||
|
@ -141,7 +141,7 @@ msgid ""
|
||||||
"This command could be used to start the PHP built-in HTTP server to serve\n"
|
"This command could be used to start the PHP built-in HTTP server to serve\n"
|
||||||
"the application.\n"
|
"the application.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Additionnal parameters:\n"
|
"Additional parameters:\n"
|
||||||
" -p/--public-url Define the public URL (default: based on "
|
" -p/--public-url Define the public URL (default: based on "
|
||||||
"listen address)\n"
|
"listen address)\n"
|
||||||
" -P/--enable-profiler Enable Xdebug profiler\n"
|
" -P/--enable-profiler Enable Xdebug profiler\n"
|
||||||
|
@ -165,7 +165,7 @@ msgstr "La commande CLI '%s' n'existe pas."
|
||||||
#: Cli.php:100
|
#: Cli.php:100
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The CLI command '%s' handler is not callable !"
|
msgid "The CLI command '%s' handler is not callable !"
|
||||||
msgstr "La fonction implémentant la commande CLI '%s' n'est pas exécutable !"
|
msgstr "La function implémentant la commande CLI '%s' n'est pas exécutable !"
|
||||||
|
|
||||||
#: Cli.php:132
|
#: Cli.php:132
|
||||||
#, php-format
|
#, php-format
|
||||||
|
@ -212,13 +212,13 @@ msgid ""
|
||||||
"Invalid parameter \"%s\".\n"
|
"Invalid parameter \"%s\".\n"
|
||||||
"Note: Command's parameter/argument must be place after the command."
|
"Note: Command's parameter/argument must be place after the command."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Paramètre \"%s\" invalide.\n"
|
"Paramètre \"%s\" invalid.\n"
|
||||||
"Note : Les paramètres/arguments de la requête doivent être placés après "
|
"Note : Les paramètres/arguments de la requête doivent être placés après "
|
||||||
"celle-ci."
|
"celle-ci."
|
||||||
|
|
||||||
#: Cli.php:252
|
#: Cli.php:252
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "An exception occured running command %s"
|
msgid "An exception occurred running command %s"
|
||||||
msgstr "Une exception est survenue en exécutant la commande %s"
|
msgstr "Une exception est survenue en exécutant la commande %s"
|
||||||
|
|
||||||
#: Cli.php:327
|
#: Cli.php:327
|
||||||
|
@ -228,48 +228,48 @@ msgstr "L'extension PHP XDEBUG ne semble pas installée."
|
||||||
#: Cli.php:336
|
#: Cli.php:336
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Invalid profiler output directory \"%s\": not found"
|
msgid "Invalid profiler output directory \"%s\": not found"
|
||||||
msgstr "Dossier de sortie du profiler invalide \"%s\" : introuvable"
|
msgstr "Dossier de sortie du profiler invalid \"%s\" : introuvable"
|
||||||
|
|
||||||
#: Cli.php:341
|
#: Cli.php:341
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Invalid profiler output directory \"%s\": not writeable"
|
msgid "Invalid profiler output directory \"%s\": not writeable"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Dossier de sortie du profiler invalide \"%s\" : non-accessible en écriture"
|
"Dossier de sortie du profiler invalid \"%s\" : non-accessible en écriture"
|
||||||
|
|
||||||
#: Cli.php:350
|
#: Cli.php:350
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Invalid parameter \"%s\""
|
msgid "Invalid parameter \"%s\""
|
||||||
msgstr "Paramètre \"%s\" invalide"
|
msgstr "Paramètre \"%s\" invalid"
|
||||||
|
|
||||||
#: Cli.php:361
|
#: Cli.php:361
|
||||||
msgid ""
|
msgid ""
|
||||||
"Invalid listen address specify. Must be in format host:port, host or :port."
|
"Invalid listen address specify. Must be in format host:port, host or :port."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Adresse d'écoute spécifiée invalide. Elle doit être au format hôte:port (ou :"
|
"Address d'écoute spécifiée invalid. Elle doit être au format hôte:port (ou :"
|
||||||
"port)."
|
"port)."
|
||||||
|
|
||||||
#: Cli.php:369
|
#: Cli.php:369
|
||||||
msgid "Invalid listen host specified. Must be an IPv4 or IPv6 address."
|
msgid "Invalid listen host specified. Must be an IPv4 or IPv6 address."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Hôte d'écoute spécifié invalide. Il doit s'agir d'une adresse IPv4 ou IPv6."
|
"Hôte d'écoute spécifié invalid. Il doit s'agir d'une address IPv4 ou IPv6."
|
||||||
|
|
||||||
#: Cli.php:376
|
#: Cli.php:376
|
||||||
msgid ""
|
msgid ""
|
||||||
"Invalid listen port specified. Must be a positive integer between 1 and "
|
"Invalid listen port specified. Must be a positive integer between 1 and "
|
||||||
"65535."
|
"65535."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Port d'écoute spécifié invalide. Il doit s'agir d'un entier positif entre 1 "
|
"Port d'écoute spécifié invalid. Il doit s'agir d'un entier positif entre 1 "
|
||||||
"et 65535."
|
"et 65535."
|
||||||
|
|
||||||
#: Cli.php:418
|
#: Cli.php:418
|
||||||
msgid "Can't invoke bash. Can't ask password prompt."
|
msgid "Can't invoke bash. Can't ask password prompt."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Impossible d'utiliser bash. Impossible de demander à l'utilisateur de saisir "
|
"Impossible d'utiliser bash. Impossible de demander à l'utilisateur de saisir "
|
||||||
"un mot de passe."
|
"un not de passe."
|
||||||
|
|
||||||
#: Cli.php:421
|
#: Cli.php:421
|
||||||
msgid "Please enter password:"
|
msgid "Please enter password:"
|
||||||
msgstr "Merci de saisir le mot de passe :"
|
msgstr "Merci de saisir le not de passe :"
|
||||||
|
|
||||||
#: functions.php:304
|
#: functions.php:304
|
||||||
msgid "d"
|
msgid "d"
|
||||||
|
@ -300,7 +300,7 @@ msgstr "ns"
|
||||||
msgid "Less than 1%s"
|
msgid "Less than 1%s"
|
||||||
msgstr "Moins de 1%s"
|
msgstr "Moins de 1%s"
|
||||||
|
|
||||||
#: App.php:239 I18n.php:118
|
#: App.php:239 I18n.php:119
|
||||||
msgid "Hello world !"
|
msgid "Hello world !"
|
||||||
msgstr "Bonjour tout le monde !"
|
msgstr "Bonjour tout le monde !"
|
||||||
|
|
||||||
|
@ -316,23 +316,23 @@ msgstr "Déconnecté"
|
||||||
msgid "You are now disconnected."
|
msgid "You are now disconnected."
|
||||||
msgstr "Vous êtes maintenant déconnecté."
|
msgstr "Vous êtes maintenant déconnecté."
|
||||||
|
|
||||||
#: I18n.php:138
|
#: I18n.php:139
|
||||||
msgid "Extract messages that need to be translated"
|
msgid "Extract messages that need to be translated"
|
||||||
msgstr "Extraire les messages devant être traduit"
|
msgstr "Extraire les messages devant être traduit"
|
||||||
|
|
||||||
#: I18n.php:140
|
#: I18n.php:141
|
||||||
msgid ""
|
msgid ""
|
||||||
"This command could be used to generate/update locales/messages.pot file."
|
"This command could be used to generate/update locales/messages.pot file."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Cette commande peut-être utilisée pour générer/mettre à jour le fichier "
|
"Cette commande peut-être utilisée pour générer/mettre à jour le fichier "
|
||||||
"locales/messages.pot."
|
"locales/messages.pot."
|
||||||
|
|
||||||
#: I18n.php:146
|
#: I18n.php:147
|
||||||
msgid "Update messages in translation PO lang files"
|
msgid "Update messages in translation PO lang files"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Mettre à jour les messages dans les fichiers de traduction PO existants"
|
"Mettre à jour les messages dans les fichiers de traduction PO existants"
|
||||||
|
|
||||||
#: I18n.php:148
|
#: I18n.php:149
|
||||||
msgid ""
|
msgid ""
|
||||||
"This command could be used to init/update PO files in locales/*/LC_MESSAGES "
|
"This command could be used to init/update PO files in locales/*/LC_MESSAGES "
|
||||||
"directories."
|
"directories."
|
||||||
|
@ -340,15 +340,15 @@ msgstr ""
|
||||||
"Cette commande peut-être utilisée pour initialiser/mettre à jour les "
|
"Cette commande peut-être utilisée pour initialiser/mettre à jour les "
|
||||||
"fichiers PO dans les dossiers locales/*/LC_MESSAGES."
|
"fichiers PO dans les dossiers locales/*/LC_MESSAGES."
|
||||||
|
|
||||||
#: I18n.php:155
|
#: I18n.php:156
|
||||||
msgid ""
|
msgid ""
|
||||||
"Compile messages from existing translation PO lang files to corresponding MO "
|
"Compile messages from existing translation PO lang files to corresponding MO "
|
||||||
"files and JS catalogs"
|
"files and JS catalogs"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Compiler les messages depuis les fichiers PO de traduction existants vers "
|
"Compiler les messages depuis les fichiers PO de traduction existants vers "
|
||||||
"les fichiers MO et les catalogues JS correspondant"
|
"les fichiers MO et les catalogues JS correspondent"
|
||||||
|
|
||||||
#: I18n.php:160
|
#: I18n.php:161
|
||||||
msgid ""
|
msgid ""
|
||||||
"This command could be used to compile PO files in locales/*/LC_MESSAGES "
|
"This command could be used to compile PO files in locales/*/LC_MESSAGES "
|
||||||
"directories to MO files and as JS catalogs in locales directory."
|
"directories to MO files and as JS catalogs in locales directory."
|
||||||
|
@ -356,99 +356,99 @@ msgstr ""
|
||||||
"Cette commande peut-être utilisée pour compiler les fichiers PO dans les "
|
"Cette commande peut-être utilisée pour compiler les fichiers PO dans les "
|
||||||
"dossiers locales/*/LC_MESSAGES and les catalogues JS dans le dossier locales."
|
"dossiers locales/*/LC_MESSAGES and les catalogues JS dans le dossier locales."
|
||||||
|
|
||||||
#: I18n.php:168
|
#: I18n.php:169
|
||||||
msgid "Initialize a new locale for translation."
|
msgid "Initialize a new locale for translation."
|
||||||
msgstr "Initialiser un nouvelle locale pour traduction."
|
msgstr "Initialiser un nouvelle locale pour traduction."
|
||||||
|
|
||||||
#: I18n.php:170
|
#: I18n.php:171
|
||||||
msgid "This command could be used to initialize a new locale for translation."
|
msgid "This command could be used to initialize a new locale for translation."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Cette commande peut-être utilisée pour initialiser une nouvelle locale pour "
|
"Cette commande peut-être utilisée pour initialiser une nouvelle locale pour "
|
||||||
"traduction."
|
"traduction."
|
||||||
|
|
||||||
#: I18n.php:367
|
#: I18n.php:368
|
||||||
msgid "You must provide the locale to initialize as unique and first argument."
|
msgid "You must provide the locale to initialize as unique and first argument."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Vous devez fournir la locale à initialiser comme unique et premier argument."
|
"Vous devez fournir la locale à initialiser comme unique et premier argument."
|
||||||
|
|
||||||
#: I18n.php:370 I18n.php:377
|
#: I18n.php:371 I18n.php:378
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Invalid locale %s."
|
msgid "Invalid locale %s."
|
||||||
msgstr "Locale \"%s\" invalide."
|
msgstr "Locale \"%s\" invalid."
|
||||||
|
|
||||||
#: I18n.php:375
|
#: I18n.php:376
|
||||||
msgid "Fail to list valid locales."
|
msgid "Fail to list valid locales."
|
||||||
msgstr "Une erreur est survenue en listant les locales valides."
|
msgstr "Une erreur est survenue en listant les locales valides."
|
||||||
|
|
||||||
#: I18n.php:386
|
#: I18n.php:387
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Locale %s directory created (%s)."
|
msgid "Locale %s directory created (%s)."
|
||||||
msgstr "Dossier de la locale %s créé (%s)."
|
msgstr "Dossier de la locale %s créé (%s)."
|
||||||
|
|
||||||
#: I18n.php:388
|
#: I18n.php:389
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to create locale %s directory (%s)."
|
msgid "Fail to create locale %s directory (%s)."
|
||||||
msgstr "Une erreur est survenue en créant le dossier de la locale %s (%s)."
|
msgstr "Une erreur est survenue en créant le dossier de la locale %s (%s)."
|
||||||
|
|
||||||
#: I18n.php:391
|
#: I18n.php:392
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Locale %s directory already exist (%s)."
|
msgid "Locale %s directory already exist (%s)."
|
||||||
msgstr "Le dossier de la locale %s existe déjà (%s)."
|
msgstr "Le dossier de la locale %s existe déjà (%s)."
|
||||||
|
|
||||||
#: I18n.php:398
|
#: I18n.php:399
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Locale %s LC_MESSAGES directory created (%s)."
|
msgid "Locale %s LC_MESSAGES directory created (%s)."
|
||||||
msgstr "Dossier LC_MESSAGES de la locale %s créé (%s)."
|
msgstr "Dossier LC_MESSAGES de la locale %s créé (%s)."
|
||||||
|
|
||||||
#: I18n.php:402
|
#: I18n.php:403
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to create locale %s LC_MESSAGES directory (%s)."
|
msgid "Fail to create locale %s LC_MESSAGES directory (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Une erreur est survenue en créant le dossier LC_MESSAGE de la locale %s (%s)."
|
"Une erreur est survenue en créant le dossier LC_MESSAGE de la locale %s (%s)."
|
||||||
|
|
||||||
#: I18n.php:406
|
#: I18n.php:407
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Locale %s LC_MESSAGES directory already exist (%s)."
|
msgid "Locale %s LC_MESSAGES directory already exist (%s)."
|
||||||
msgstr "Le dossier LC_MESSAGES de la locale %s existe déjà (%s)."
|
msgstr "Le dossier LC_MESSAGES de la locale %s existe déjà (%s)."
|
||||||
|
|
||||||
#: I18n.php:430
|
#: I18n.php:431
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Locale %s PO file created (%s)."
|
msgid "Locale %s PO file created (%s)."
|
||||||
msgstr "Fichier PO de la locale %s créé (%s)."
|
msgstr "Fichier PO de la locale %s créé (%s)."
|
||||||
|
|
||||||
#: I18n.php:434
|
#: I18n.php:435
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Locale %s PO file already exist (%s)."
|
msgid "Locale %s PO file already exist (%s)."
|
||||||
msgstr "Le fichier PO de la locale %s existe déjà (%s)."
|
msgstr "Le fichier PO de la locale %s existe déjà (%s)."
|
||||||
|
|
||||||
#: I18n.php:468
|
#: I18n.php:475
|
||||||
msgid "Fail to list EesyPHP PHP files."
|
msgid "Fail to list EesyPHP PHP files."
|
||||||
msgstr "Une erreur est survenue en listant les fichiers PHP d'EesyPHP."
|
msgstr "Une erreur est survenue en listant les fichiers PHP d'EesyPHP."
|
||||||
|
|
||||||
#: I18n.php:488
|
#: I18n.php:495
|
||||||
msgid "Fail to extract messages from EesyPHP PHP files using xgettext."
|
msgid "Fail to extract messages from EesyPHP PHP files using xgettext."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Une erreur est survenue en extrayant les messages depuis les fichiers PHP "
|
"Une erreur est survenue en extrayant les messages depuis les fichiers PHP "
|
||||||
"d'EesyPHP en utilisant xgettext."
|
"d'EesyPHP en utilisant xgettext."
|
||||||
|
|
||||||
#: I18n.php:505
|
#: I18n.php:514
|
||||||
msgid "Fail to list application PHP files."
|
msgid "Fail to list application PHP files."
|
||||||
msgstr "Une erreur est survenue en listant les fichiers PHP de l'application."
|
msgstr "Une erreur est survenue en listant les fichiers PHP de l'application."
|
||||||
|
|
||||||
#: I18n.php:525
|
#: I18n.php:534
|
||||||
msgid "Fail to extract messages from PHP files using xgettext."
|
msgid "Fail to extract messages from PHP files using xgettext."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Impossible d'extraire les messages depuis les fichiers PHP en utilisant "
|
"Impossible d'extraire les messages depuis les fichiers PHP en utilisant "
|
||||||
"xgettext."
|
"xgettext."
|
||||||
|
|
||||||
#: I18n.php:542
|
#: I18n.php:563
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to list JS files in the directory of static files '%s'."
|
msgid "Fail to list JS files in the directory of static files '%s'."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Une erreur est survenue en listant les fichiers JS dans le dossier des "
|
"Une erreur est survenue en listant les fichiers JS dans le dossier des "
|
||||||
"fichiers statiques '%s'."
|
"fichiers statiques '%s'."
|
||||||
|
|
||||||
#: I18n.php:564
|
#: I18n.php:585
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Fail to extract messages from JS files in the directory of static files '%s' "
|
"Fail to extract messages from JS files in the directory of static files '%s' "
|
||||||
|
@ -457,7 +457,12 @@ msgstr ""
|
||||||
"Une erreur est survenue en extrayant les messages depuis les fichiers JS du "
|
"Une erreur est survenue en extrayant les messages depuis les fichiers JS du "
|
||||||
"dossier des fichiers statiques '%s' en utilisant xgettext."
|
"dossier des fichiers statiques '%s' en utilisant xgettext."
|
||||||
|
|
||||||
#: I18n.php:586
|
#: I18n.php:617
|
||||||
|
#, php-format
|
||||||
|
msgid "Fail to list templates files in directory %s."
|
||||||
|
msgstr "Une erreur est survenue en listant les fichiers dans le dossier %s."
|
||||||
|
|
||||||
|
#: I18n.php:638
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Fail to extract messages from templates directory '%s' using tsmarty2c.php "
|
"Fail to extract messages from templates directory '%s' using tsmarty2c.php "
|
||||||
|
@ -466,100 +471,100 @@ msgstr ""
|
||||||
"Impossible d'extraire les messages depuis le dossier de templates '%s' en "
|
"Impossible d'extraire les messages depuis le dossier de templates '%s' en "
|
||||||
"utilisant le script tsmarty2c.php."
|
"utilisant le script tsmarty2c.php."
|
||||||
|
|
||||||
#: I18n.php:622
|
#: I18n.php:674
|
||||||
msgid "Fail to merge messages using msgcat."
|
msgid "Fail to merge messages using msgcat."
|
||||||
msgstr "Impossible de fusionner les messages en utilisant msgcat."
|
msgstr "Impossible de fusionner les messages en utilisant msgcat."
|
||||||
|
|
||||||
#: I18n.php:636
|
#: I18n.php:688
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Compendium file %s not found."
|
msgid "Compendium file %s not found."
|
||||||
msgstr "Fichier compendium %s introuvable."
|
msgstr "Fichier compendium %s introuvable."
|
||||||
|
|
||||||
#: I18n.php:645
|
#: I18n.php:697
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "POT file not found (%s). Please run extract_messages first."
|
msgid "POT file not found (%s). Please run extract_messages first."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Fichier POT introuvable (%s). Merci de lancer la commande extract_messages "
|
"Fichier POT introuvable (%s). Merci de lancer la commande extract_messages "
|
||||||
"pour commencer."
|
"pour commencer."
|
||||||
|
|
||||||
#: I18n.php:657 I18n.php:766
|
#: I18n.php:709 I18n.php:818
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Lang directory '%s' found"
|
msgid "Lang directory '%s' found"
|
||||||
msgstr "Dossier de langue '%s' trouvé"
|
msgstr "Dossier de langue '%s' trouvé"
|
||||||
|
|
||||||
#: I18n.php:663 I18n.php:772
|
#: I18n.php:715 I18n.php:824
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it."
|
msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Le dossier LC_MESSAGES est introuvable dans le dossier de langue '%s', on "
|
"Le dossier LC_MESSAGES est introuvable dans le dossier de langue '%s', on "
|
||||||
"l'ignore."
|
"l'ignore."
|
||||||
|
|
||||||
#: I18n.php:678
|
#: I18n.php:730
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to init messages in %s PO file using msginit (%s)."
|
msgid "Fail to init messages in %s PO file using msginit (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Impossible d'initialiser les messages dans le fichier PO %s en utilisant "
|
"Impossible d'initialiser les messages dans le fichier PO %s en utilisant "
|
||||||
"msginit (%s)."
|
"msginit (%s)."
|
||||||
|
|
||||||
#: I18n.php:696
|
#: I18n.php:748
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to update messages in %s PO file using msgmerge (%s)."
|
msgid "Fail to update messages in %s PO file using msgmerge (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Impossible de mettre à jour les messages dans les fichiers PO %s en "
|
"Impossible de mettre à jour les messages dans les fichiers PO %s en "
|
||||||
"utilisant msgmerge (%s)."
|
"utilisant msgmerge (%s)."
|
||||||
|
|
||||||
#: I18n.php:702 I18n.php:780
|
#: I18n.php:754 I18n.php:832
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "PO file not found in lang '%s' directory, ignore it."
|
msgid "PO file not found in lang '%s' directory, ignore it."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Le fichier PO est introuvable dans le dossier de langue '%s', on l'ignore."
|
"Le fichier PO est introuvable dans le dossier de langue '%s', on l'ignore."
|
||||||
|
|
||||||
#: I18n.php:709 I18n.php:835
|
#: I18n.php:761 I18n.php:887
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to open root lang directory (%s)."
|
msgid "Fail to open root lang directory (%s)."
|
||||||
msgstr "Impossible d'ouvrir le dossier racine des langues (%s)."
|
msgstr "Impossible d'ouvrir le dossier racine des langues (%s)."
|
||||||
|
|
||||||
#: I18n.php:736
|
#: I18n.php:788
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Lang alias symlink found: %s -> %s"
|
msgid "Lang alias symlink found: %s -> %s"
|
||||||
msgstr "Lien symbolique d'alias de langue trouvé : %s -> %s"
|
msgstr "Lien symbolique d'alias de langue trouvé : %s -> %s"
|
||||||
|
|
||||||
#: I18n.php:743
|
#: I18n.php:795
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "JS catalog symlink for %s -> %s created (%s)"
|
msgid "JS catalog symlink for %s -> %s created (%s)"
|
||||||
msgstr "Lien symbolique de catalogue JS pour %s -> %s créé (%s)"
|
msgstr "Lien symbolique de catalogue JS pour %s -> %s créé (%s)"
|
||||||
|
|
||||||
#: I18n.php:747
|
#: I18n.php:799
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to create JS catalog symlink for %s -> %s (%s)"
|
msgid "Fail to create JS catalog symlink for %s -> %s (%s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Impossible de créer le lien symbolique de catalogue JS pour %s -> %s (%s)"
|
"Impossible de créer le lien symbolique de catalogue JS pour %s -> %s (%s)"
|
||||||
|
|
||||||
#: I18n.php:753
|
#: I18n.php:805
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "JS catalog symlink for %s -> %s already exist (%s)"
|
msgid "JS catalog symlink for %s -> %s already exist (%s)"
|
||||||
msgstr "Le lien symbolique du catalogue JS pour %s -> %s existe déjà (%s)"
|
msgstr "Le lien symbolique du catalogue JS pour %s -> %s existe déjà (%s)"
|
||||||
|
|
||||||
#: I18n.php:758
|
#: I18n.php:810
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "JS catalog file for %s already exist, but it's not a symlink to %s (%s)"
|
msgid "JS catalog file for %s already exist, but it's not a symlink to %s (%s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Le catalogue JS pour %s existe, mais il ne s'agit par d'un lien symbolique "
|
"Le catalogue JS pour %s existe, mais il ne s'agit par d'un lien symbolique "
|
||||||
"vers %s (%s)"
|
"vers %s (%s)"
|
||||||
|
|
||||||
#: I18n.php:793
|
#: I18n.php:845
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)."
|
msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Impossible de compiler les messages depuis le fichier PO %s en tant que "
|
"Impossible de compiler les messages depuis le fichier PO %s en tant que "
|
||||||
"fichier MO en utilisant msgfmt (%s)."
|
"fichier MO en utilisant msgfmt (%s)."
|
||||||
|
|
||||||
#: I18n.php:805
|
#: I18n.php:857
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Include core translated messages from %s PO file"
|
msgid "Include core translated messages from %s PO file"
|
||||||
msgstr "Inclusion des messages traduits (core) depuis le fichier PO %s"
|
msgstr "Inclusion des messages traduits (core) depuis le fichier PO %s"
|
||||||
|
|
||||||
#: I18n.php:812
|
#: I18n.php:864
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Core PO file %s not found: can not include its translated messages in "
|
"Core PO file %s not found: can not include its translated messages in "
|
||||||
|
@ -568,24 +573,24 @@ msgstr ""
|
||||||
"Le fichier PO core %s est introuvable : impossible d'inclure ses messages "
|
"Le fichier PO core %s est introuvable : impossible d'inclure ses messages "
|
||||||
"traduits dans le catalogue JSON résultant."
|
"traduits dans le catalogue JSON résultant."
|
||||||
|
|
||||||
#: I18n.php:818
|
#: I18n.php:870
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to open %s JS catalog file in write mode (%s)."
|
msgid "Fail to open %s JS catalog file in write mode (%s)."
|
||||||
msgstr "Impossible d'ouvrir le catalogue JS %s en mode écriture (%s)."
|
msgstr "Impossible d'ouvrir le catalogue JS %s en mode écriture (%s)."
|
||||||
|
|
||||||
#: I18n.php:823
|
#: I18n.php:875
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to write %s JS catalog in file (%s)."
|
msgid "Fail to write %s JS catalog in file (%s)."
|
||||||
msgstr "Impossible d'écrire le fichier du catalogue JS %s (%s)."
|
msgstr "Impossible d'écrire le fichier du catalogue JS %s (%s)."
|
||||||
|
|
||||||
#: I18n.php:828
|
#: I18n.php:880
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s JS catalog writed (%s)."
|
msgid "%s JS catalog writed (%s)."
|
||||||
msgstr "Catalogue JS %s créé (%s)."
|
msgstr "Catalogue JS %s créé (%s)."
|
||||||
|
|
||||||
#: Email.php:101
|
#: Email.php:101
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "</hr><p><small>Mail initialy intended for %s.</small></p>"
|
msgid "</hr><p><small>Mail initially intended for %s.</small></p>"
|
||||||
msgstr "</hr><p><small>Email initialement destiné à %s.</small></p>"
|
msgstr "</hr><p><small>Email initialement destiné à %s.</small></p>"
|
||||||
|
|
||||||
#: Email.php:102
|
#: Email.php:102
|
||||||
|
@ -594,7 +599,7 @@ msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
"\n"
|
"\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Mail initialy intended for %s."
|
"Mail initially intended for %s."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"\n"
|
"\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
@ -615,54 +620,13 @@ msgstr ""
|
||||||
"\n"
|
"\n"
|
||||||
"%s: %s"
|
"%s: %s"
|
||||||
|
|
||||||
#: static/js/myconfirm.js:4 static/js/myconfirm.js:187
|
|
||||||
#: static/js/myconfirm.js:216
|
|
||||||
msgid "Confirmation"
|
|
||||||
msgstr "Confirmation"
|
|
||||||
|
|
||||||
#: static/js/myconfirm.js:5
|
|
||||||
msgid "Do you confirm?"
|
|
||||||
msgstr "Confirmez-vous ?"
|
|
||||||
|
|
||||||
#: static/js/myconfirm.js:18 static/js/myconfirm.js:122
|
|
||||||
msgid "Cancel"
|
|
||||||
msgstr "Annuler"
|
|
||||||
|
|
||||||
#: static/js/myconfirm.js:24 static/js/myconfirm.js:128
|
|
||||||
msgid "Validate"
|
|
||||||
msgstr "Valider"
|
|
||||||
|
|
||||||
#: static/js/myconfirm.js:64
|
|
||||||
msgid "OK"
|
|
||||||
msgstr "OK"
|
|
||||||
|
|
||||||
#: static/js/myconfirm.js:103
|
|
||||||
msgid "Question"
|
|
||||||
msgstr "Question"
|
|
||||||
|
|
||||||
#: static/js/myconfirm.js:104
|
|
||||||
msgid "Please enter your answer below:"
|
|
||||||
msgstr "Merci de saisir vos réponses ci-dessous :"
|
|
||||||
|
|
||||||
#: static/js/myconfirm.js:157
|
|
||||||
msgid "Please wait"
|
|
||||||
msgstr "Merci de patienter"
|
|
||||||
|
|
||||||
#: static/js/myconfirm.js:158
|
|
||||||
msgid "Please wait while your request is being processed."
|
|
||||||
msgstr "Merci de patienter pendant le traitement de votre requête."
|
|
||||||
|
|
||||||
#: static/js/myconfirm.js:188 static/js/myconfirm.js:217
|
|
||||||
msgid "Are you sure?"
|
|
||||||
msgstr "Êtes-vous sure ?"
|
|
||||||
|
|
||||||
#: templates/login.tpl:19 templates/login.tpl:20
|
#: templates/login.tpl:19 templates/login.tpl:20
|
||||||
msgid "Username"
|
msgid "Username"
|
||||||
msgstr "Nom d'utilisateur"
|
msgstr "Nom d'utilisateur"
|
||||||
|
|
||||||
#: templates/login.tpl:24 templates/login.tpl:25
|
#: templates/login.tpl:24 templates/login.tpl:25
|
||||||
msgid "Password"
|
msgid "Password"
|
||||||
msgstr "Mot de passe"
|
msgstr "Not de passe"
|
||||||
|
|
||||||
#: templates/login.tpl:32
|
#: templates/login.tpl:32
|
||||||
msgid "Remember username"
|
msgid "Remember username"
|
||||||
|
@ -693,31 +657,31 @@ msgstr "Erreur : %1"
|
||||||
msgid "Back"
|
msgid "Back"
|
||||||
msgstr "Retour"
|
msgstr "Retour"
|
||||||
|
|
||||||
#: templates/empty.tpl:72
|
#: templates/empty.tpl:74
|
||||||
msgid "Sign out"
|
msgid "Sign out"
|
||||||
msgstr "Déconnexion"
|
msgstr "Déconnexion"
|
||||||
|
|
||||||
#: templates/empty.tpl:82
|
#: templates/empty.tpl:84
|
||||||
msgid "Log in"
|
msgid "Log in"
|
||||||
msgstr "Connexion"
|
msgstr "Connection"
|
||||||
|
|
||||||
#: templates/empty.tpl:119
|
#: templates/empty.tpl:121
|
||||||
msgid "Loading time:"
|
msgid "Loading time:"
|
||||||
msgstr "Temps de chargement :"
|
msgstr "Temps de chargement :"
|
||||||
|
|
||||||
#: templates/empty.tpl:120
|
#: templates/empty.tpl:122
|
||||||
msgid "Page: %1"
|
msgid "Page: %1"
|
||||||
msgstr "Page : %1"
|
msgstr "Page : %1"
|
||||||
|
|
||||||
#: templates/empty.tpl:121
|
#: templates/empty.tpl:123
|
||||||
msgid "Database: %1"
|
msgid "Database: %1"
|
||||||
msgstr "Base de données : %1"
|
msgstr "Base de données : %1"
|
||||||
|
|
||||||
#: templates/empty.tpl:122
|
#: templates/empty.tpl:124
|
||||||
msgid "Templating: "
|
msgid "Templating: "
|
||||||
msgstr "Modèle : "
|
msgstr "Modèle : "
|
||||||
|
|
||||||
#: templates/empty.tpl:123
|
#: templates/empty.tpl:125
|
||||||
msgid "Total: "
|
msgid "Total: "
|
||||||
msgstr "Total : "
|
msgstr "Total : "
|
||||||
|
|
||||||
|
@ -737,6 +701,36 @@ msgstr ""
|
||||||
"fichier <em>homepage.tpl</em> pour l'écraser. Vous pouvez également écraser "
|
"fichier <em>homepage.tpl</em> pour l'écraser. Vous pouvez également écraser "
|
||||||
"le gestionnaire de l'URL racine de l'application web."
|
"le gestionnaire de l'URL racine de l'application web."
|
||||||
|
|
||||||
|
#~ msgid "Confirmation"
|
||||||
|
#~ msgstr "Confirmation"
|
||||||
|
|
||||||
|
#~ msgid "Do you confirm?"
|
||||||
|
#~ msgstr "Confirmez-vous ?"
|
||||||
|
|
||||||
|
#~ msgid "Cancel"
|
||||||
|
#~ msgstr "Annuler"
|
||||||
|
|
||||||
|
#~ msgid "Validate"
|
||||||
|
#~ msgstr "Valider"
|
||||||
|
|
||||||
|
#~ msgid "OK"
|
||||||
|
#~ msgstr "OK"
|
||||||
|
|
||||||
|
#~ msgid "Question"
|
||||||
|
#~ msgstr "Question"
|
||||||
|
|
||||||
|
#~ msgid "Please enter your answer below:"
|
||||||
|
#~ msgstr "Merci de saisir vos réponses ci-dessous :"
|
||||||
|
|
||||||
|
#~ msgid "Please wait"
|
||||||
|
#~ msgstr "Merci de patienter"
|
||||||
|
|
||||||
|
#~ msgid "Please wait while your request is being processed."
|
||||||
|
#~ msgstr "Merci de patienter pendant le traitement de votre requête."
|
||||||
|
|
||||||
|
#~ msgid "Are you sure?"
|
||||||
|
#~ msgstr "Êtes-vous sure ?"
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "This command could be used to start the PHP built-in HTTP server to serve "
|
#~ "This command could be used to start the PHP built-in HTTP server to serve "
|
||||||
#~ "the application."
|
#~ "the application."
|
||||||
|
@ -755,10 +749,10 @@ msgstr ""
|
||||||
#~ msgstr "Déconnexion"
|
#~ msgstr "Déconnexion"
|
||||||
|
|
||||||
#~ msgid "Connection"
|
#~ msgid "Connection"
|
||||||
#~ msgstr "Connexion"
|
#~ msgstr "Connection"
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "Authentication required but force_authentication function is not defined."
|
#~ "Authentication required but force_authentication function is not defined."
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "Authentification requise mais la fonction force_authentication n'est pas "
|
#~ "Authentication requise mais la function force_authentication n'est pas "
|
||||||
#~ "définie."
|
#~ "définie."
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"POT-Creation-Date: 2023-11-20 17:34+0000\n"
|
"POT-Creation-Date: 2024-01-23 18:19+0000\n"
|
||||||
"PO-Revision-Date: 2023-11-20 17:34+0000\n"
|
"PO-Revision-Date: 2024-01-23 18:19+0000\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
@ -14,12 +14,12 @@ msgstr ""
|
||||||
msgid "An error occurred while displaying this page."
|
msgid "An error occurred while displaying this page."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: Tpl.php:567
|
#: Tpl.php:573
|
||||||
msgid "Unexpected error occured. If problem persist, please contact support."
|
msgid "Unexpected error occurred. If problem persist, please contact support."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: Tpl.php:896
|
#: Tpl.php:904
|
||||||
msgid "Unkwown"
|
msgid "Unknown"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: Db.php:78
|
#: Db.php:78
|
||||||
|
@ -123,7 +123,7 @@ msgid ""
|
||||||
"This command could be used to start the PHP built-in HTTP server to serve\n"
|
"This command could be used to start the PHP built-in HTTP server to serve\n"
|
||||||
"the application.\n"
|
"the application.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Additionnal parameters:\n"
|
"Additional parameters:\n"
|
||||||
" -p/--public-url Define the public URL (default: based on "
|
" -p/--public-url Define the public URL (default: based on "
|
||||||
"listen address)\n"
|
"listen address)\n"
|
||||||
" -P/--enable-profiler Enable Xdebug profiler\n"
|
" -P/--enable-profiler Enable Xdebug profiler\n"
|
||||||
|
@ -186,7 +186,7 @@ msgstr ""
|
||||||
|
|
||||||
#: Cli.php:252
|
#: Cli.php:252
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "An exception occured running command %s"
|
msgid "An exception occurred running command %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: Cli.php:327
|
#: Cli.php:327
|
||||||
|
@ -260,7 +260,7 @@ msgstr ""
|
||||||
msgid "Less than 1%s"
|
msgid "Less than 1%s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: App.php:239 I18n.php:118
|
#: App.php:239 I18n.php:119
|
||||||
msgid "Hello world !"
|
msgid "Hello world !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -276,237 +276,242 @@ msgstr ""
|
||||||
msgid "You are now disconnected."
|
msgid "You are now disconnected."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:138
|
#: I18n.php:139
|
||||||
msgid "Extract messages that need to be translated"
|
msgid "Extract messages that need to be translated"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:140
|
#: I18n.php:141
|
||||||
msgid ""
|
msgid ""
|
||||||
"This command could be used to generate/update locales/messages.pot file."
|
"This command could be used to generate/update locales/messages.pot file."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:146
|
#: I18n.php:147
|
||||||
msgid "Update messages in translation PO lang files"
|
msgid "Update messages in translation PO lang files"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:148
|
#: I18n.php:149
|
||||||
msgid ""
|
msgid ""
|
||||||
"This command could be used to init/update PO files in locales/*/LC_MESSAGES "
|
"This command could be used to init/update PO files in locales/*/LC_MESSAGES "
|
||||||
"directories."
|
"directories."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:155
|
#: I18n.php:156
|
||||||
msgid ""
|
msgid ""
|
||||||
"Compile messages from existing translation PO lang files to corresponding MO "
|
"Compile messages from existing translation PO lang files to corresponding MO "
|
||||||
"files and JS catalogs"
|
"files and JS catalogs"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:160
|
#: I18n.php:161
|
||||||
msgid ""
|
msgid ""
|
||||||
"This command could be used to compile PO files in locales/*/LC_MESSAGES "
|
"This command could be used to compile PO files in locales/*/LC_MESSAGES "
|
||||||
"directories to MO files and as JS catalogs in locales directory."
|
"directories to MO files and as JS catalogs in locales directory."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:168
|
#: I18n.php:169
|
||||||
msgid "Initialize a new locale for translation."
|
msgid "Initialize a new locale for translation."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:170
|
#: I18n.php:171
|
||||||
msgid "This command could be used to initialize a new locale for translation."
|
msgid "This command could be used to initialize a new locale for translation."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:367
|
#: I18n.php:368
|
||||||
msgid "You must provide the locale to initialize as unique and first argument."
|
msgid "You must provide the locale to initialize as unique and first argument."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:370 I18n.php:377
|
#: I18n.php:371 I18n.php:378
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Invalid locale %s."
|
msgid "Invalid locale %s."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:375
|
#: I18n.php:376
|
||||||
msgid "Fail to list valid locales."
|
msgid "Fail to list valid locales."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:386
|
#: I18n.php:387
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Locale %s directory created (%s)."
|
msgid "Locale %s directory created (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:388
|
#: I18n.php:389
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to create locale %s directory (%s)."
|
msgid "Fail to create locale %s directory (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:391
|
#: I18n.php:392
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Locale %s directory already exist (%s)."
|
msgid "Locale %s directory already exist (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:398
|
#: I18n.php:399
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Locale %s LC_MESSAGES directory created (%s)."
|
msgid "Locale %s LC_MESSAGES directory created (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:402
|
#: I18n.php:403
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to create locale %s LC_MESSAGES directory (%s)."
|
msgid "Fail to create locale %s LC_MESSAGES directory (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:406
|
#: I18n.php:407
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Locale %s LC_MESSAGES directory already exist (%s)."
|
msgid "Locale %s LC_MESSAGES directory already exist (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:430
|
#: I18n.php:431
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Locale %s PO file created (%s)."
|
msgid "Locale %s PO file created (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:434
|
#: I18n.php:435
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Locale %s PO file already exist (%s)."
|
msgid "Locale %s PO file already exist (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:468
|
#: I18n.php:475
|
||||||
msgid "Fail to list EesyPHP PHP files."
|
msgid "Fail to list EesyPHP PHP files."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:488
|
#: I18n.php:495
|
||||||
msgid "Fail to extract messages from EesyPHP PHP files using xgettext."
|
msgid "Fail to extract messages from EesyPHP PHP files using xgettext."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:505
|
#: I18n.php:514
|
||||||
msgid "Fail to list application PHP files."
|
msgid "Fail to list application PHP files."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:525
|
#: I18n.php:534
|
||||||
msgid "Fail to extract messages from PHP files using xgettext."
|
msgid "Fail to extract messages from PHP files using xgettext."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:542
|
#: I18n.php:563
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to list JS files in the directory of static files '%s'."
|
msgid "Fail to list JS files in the directory of static files '%s'."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:564
|
#: I18n.php:585
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Fail to extract messages from JS files in the directory of static files '%s' "
|
"Fail to extract messages from JS files in the directory of static files '%s' "
|
||||||
"using xgettext."
|
"using xgettext."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:586
|
#: I18n.php:617
|
||||||
|
#, php-format
|
||||||
|
msgid "Fail to list templates files in directory %s."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: I18n.php:638
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Fail to extract messages from templates directory '%s' using tsmarty2c.php "
|
"Fail to extract messages from templates directory '%s' using tsmarty2c.php "
|
||||||
"script."
|
"script."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:622
|
#: I18n.php:674
|
||||||
msgid "Fail to merge messages using msgcat."
|
msgid "Fail to merge messages using msgcat."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:636
|
#: I18n.php:688
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Compendium file %s not found."
|
msgid "Compendium file %s not found."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:645
|
#: I18n.php:697
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "POT file not found (%s). Please run extract_messages first."
|
msgid "POT file not found (%s). Please run extract_messages first."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:657 I18n.php:766
|
#: I18n.php:709 I18n.php:818
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Lang directory '%s' found"
|
msgid "Lang directory '%s' found"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:663 I18n.php:772
|
#: I18n.php:715 I18n.php:824
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it."
|
msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:678
|
#: I18n.php:730
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to init messages in %s PO file using msginit (%s)."
|
msgid "Fail to init messages in %s PO file using msginit (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:696
|
#: I18n.php:748
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to update messages in %s PO file using msgmerge (%s)."
|
msgid "Fail to update messages in %s PO file using msgmerge (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:702 I18n.php:780
|
#: I18n.php:754 I18n.php:832
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "PO file not found in lang '%s' directory, ignore it."
|
msgid "PO file not found in lang '%s' directory, ignore it."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:709 I18n.php:835
|
#: I18n.php:761 I18n.php:887
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to open root lang directory (%s)."
|
msgid "Fail to open root lang directory (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:736
|
#: I18n.php:788
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Lang alias symlink found: %s -> %s"
|
msgid "Lang alias symlink found: %s -> %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:743
|
#: I18n.php:795
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "JS catalog symlink for %s -> %s created (%s)"
|
msgid "JS catalog symlink for %s -> %s created (%s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:747
|
#: I18n.php:799
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to create JS catalog symlink for %s -> %s (%s)"
|
msgid "Fail to create JS catalog symlink for %s -> %s (%s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:753
|
#: I18n.php:805
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "JS catalog symlink for %s -> %s already exist (%s)"
|
msgid "JS catalog symlink for %s -> %s already exist (%s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:758
|
#: I18n.php:810
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "JS catalog file for %s already exist, but it's not a symlink to %s (%s)"
|
msgid "JS catalog file for %s already exist, but it's not a symlink to %s (%s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:793
|
#: I18n.php:845
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)."
|
msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:805
|
#: I18n.php:857
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Include core translated messages from %s PO file"
|
msgid "Include core translated messages from %s PO file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:812
|
#: I18n.php:864
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Core PO file %s not found: can not include its translated messages in "
|
"Core PO file %s not found: can not include its translated messages in "
|
||||||
"resulting JSON catalog."
|
"resulting JSON catalog."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:818
|
#: I18n.php:870
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to open %s JS catalog file in write mode (%s)."
|
msgid "Fail to open %s JS catalog file in write mode (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:823
|
#: I18n.php:875
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to write %s JS catalog in file (%s)."
|
msgid "Fail to write %s JS catalog in file (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: I18n.php:828
|
#: I18n.php:880
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s JS catalog writed (%s)."
|
msgid "%s JS catalog writed (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: Email.php:101
|
#: Email.php:101
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "</hr><p><small>Mail initialy intended for %s.</small></p>"
|
msgid "</hr><p><small>Mail initially intended for %s.</small></p>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: Email.php:102
|
#: Email.php:102
|
||||||
|
@ -515,7 +520,7 @@ msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
"\n"
|
"\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Mail initialy intended for %s."
|
"Mail initially intended for %s."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: Email.php:139
|
#: Email.php:139
|
||||||
|
@ -530,47 +535,6 @@ msgid ""
|
||||||
"%s: %s"
|
"%s: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: static/js/myconfirm.js:4 static/js/myconfirm.js:187
|
|
||||||
#: static/js/myconfirm.js:216
|
|
||||||
msgid "Confirmation"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: static/js/myconfirm.js:5
|
|
||||||
msgid "Do you confirm?"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: static/js/myconfirm.js:18 static/js/myconfirm.js:122
|
|
||||||
msgid "Cancel"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: static/js/myconfirm.js:24 static/js/myconfirm.js:128
|
|
||||||
msgid "Validate"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: static/js/myconfirm.js:64
|
|
||||||
msgid "OK"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: static/js/myconfirm.js:103
|
|
||||||
msgid "Question"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: static/js/myconfirm.js:104
|
|
||||||
msgid "Please enter your answer below:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: static/js/myconfirm.js:157
|
|
||||||
msgid "Please wait"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: static/js/myconfirm.js:158
|
|
||||||
msgid "Please wait while your request is being processed."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: static/js/myconfirm.js:188 static/js/myconfirm.js:217
|
|
||||||
msgid "Are you sure?"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: templates/login.tpl:19 templates/login.tpl:20
|
#: templates/login.tpl:19 templates/login.tpl:20
|
||||||
msgid "Username"
|
msgid "Username"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -605,31 +569,31 @@ msgstr ""
|
||||||
msgid "Back"
|
msgid "Back"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/empty.tpl:72
|
#: templates/empty.tpl:74
|
||||||
msgid "Sign out"
|
msgid "Sign out"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/empty.tpl:82
|
#: templates/empty.tpl:84
|
||||||
msgid "Log in"
|
msgid "Log in"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/empty.tpl:119
|
#: templates/empty.tpl:121
|
||||||
msgid "Loading time:"
|
msgid "Loading time:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/empty.tpl:120
|
#: templates/empty.tpl:122
|
||||||
msgid "Page: %1"
|
msgid "Page: %1"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/empty.tpl:121
|
#: templates/empty.tpl:123
|
||||||
msgid "Database: %1"
|
msgid "Database: %1"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/empty.tpl:122
|
#: templates/empty.tpl:124
|
||||||
msgid "Templating: "
|
msgid "Templating: "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/empty.tpl:123
|
#: templates/empty.tpl:125
|
||||||
msgid "Total: "
|
msgid "Total: "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
4
setup.cfg
Normal file
4
setup.cfg
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
[codespell]
|
||||||
|
ignore-words-list=fro,hass
|
||||||
|
exclude-file=.codespell-exclusions
|
||||||
|
quiet-level=2
|
|
@ -34,7 +34,7 @@ log:
|
||||||
file_path: "${log.directory_path}/app.log"
|
file_path: "${log.directory_path}/app.log"
|
||||||
|
|
||||||
# Log level (TRACE / DEBUG / INFO / WARNING / ERROR / FATAL)
|
# Log level (TRACE / DEBUG / INFO / WARNING / ERROR / FATAL)
|
||||||
level: 'INFO'
|
level: "INFO"
|
||||||
|
|
||||||
# Log PHP errors levels (as specified to set_error_handler())
|
# 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
|
# Note: expected a list of PHP error level constants that will be resolved and combine
|
||||||
|
@ -51,7 +51,6 @@ log:
|
||||||
# - ~E_STRICT
|
# - ~E_STRICT
|
||||||
# - ~E_DEPRECATED
|
# - ~E_DEPRECATED
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Sentry configuration
|
# Sentry configuration
|
||||||
#
|
#
|
||||||
|
@ -70,7 +69,6 @@ sentry:
|
||||||
- "E_RECOVERABLE_ERROR"
|
- "E_RECOVERABLE_ERROR"
|
||||||
- "E_DEPRECATED"
|
- "E_DEPRECATED"
|
||||||
|
|
||||||
|
|
||||||
# Traces sample rate (between 0 and 1)
|
# Traces sample rate (between 0 and 1)
|
||||||
# Note: this parameter permit to determine how many transactions (=~ access) are traced and
|
# 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
|
# sent to Sentry, for instance, 0.2 meen that 20% of the transactions will be traced. In dev
|
||||||
|
@ -96,7 +94,7 @@ templates:
|
||||||
#
|
#
|
||||||
i18n:
|
i18n:
|
||||||
# Default locale (see locales directory for available languages list)
|
# Default locale (see locales directory for available languages list)
|
||||||
default_locale: 'en_US.UTF8'
|
default_locale: "en_US.UTF8"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Session
|
# Session
|
||||||
|
@ -128,8 +126,8 @@ db:
|
||||||
#options: null
|
#options: null
|
||||||
|
|
||||||
# Date/Datetime format in database (strptime format)
|
# Date/Datetime format in database (strptime format)
|
||||||
#date_format: '%Y-%m-%d' # Exemple : 2018-10-12
|
#date_format: '%Y-%m-%d' # Example : 2018-10-12
|
||||||
#datetime_format: '%Y-%m-%d %H:%M:%S' # Exemple : 2018-10-12 18:06:59
|
#datetime_format: '%Y-%m-%d %H:%M:%S' # Example : 2018-10-12 18:06:59
|
||||||
|
|
||||||
# MariaDB / MySQL
|
# MariaDB / MySQL
|
||||||
#dsn: "mysql:host=localhost;dbname=items"
|
#dsn: "mysql:host=localhost;dbname=items"
|
||||||
|
@ -138,9 +136,8 @@ db:
|
||||||
#options: null
|
#options: null
|
||||||
|
|
||||||
# Date/Datetime format in database (strptime format)
|
# Date/Datetime format in database (strptime format)
|
||||||
#date_format: '%Y-%m-%d' # Exemple : 2018-10-12
|
#date_format: '%Y-%m-%d' # Example : 2018-10-12
|
||||||
#datetime_format: '%Y-%m-%d %H:%M:%S' # Exemple : 2018-10-12 18:06:59
|
#datetime_format: '%Y-%m-%d %H:%M:%S' # Example : 2018-10-12 18:06:59
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Authentication
|
# Authentication
|
||||||
|
@ -185,18 +182,18 @@ auth:
|
||||||
#
|
#
|
||||||
http:
|
http:
|
||||||
# HTTP Auth methods :
|
# 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 :
|
# Specific configuration is need in Apache to use this mode :
|
||||||
# RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
# 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
|
# This method could be only used with $http_auth_trust_without_password_challenge
|
||||||
# enabled.
|
# 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)
|
# using mod_php with Apache. (default)
|
||||||
method: 'PHP_AUTH'
|
method: "PHP_AUTH"
|
||||||
|
|
||||||
# Trust HTTP server authentication
|
# 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.
|
# from HTTP server.
|
||||||
#trust_without_password_challenge: true
|
#trust_without_password_challenge: true
|
||||||
|
|
||||||
|
@ -208,17 +205,17 @@ auth:
|
||||||
#
|
#
|
||||||
cas:
|
cas:
|
||||||
# CAS host (just the domain name)
|
# CAS host (just the domain name)
|
||||||
host: 'idp.example.com'
|
host: "idp.example.com"
|
||||||
|
|
||||||
# CAS context (the root path, default: '/idp/cas')
|
# CAS context (the root path, default: '/idp/cas')
|
||||||
# Example: for 'http://idp.example.com/idp/cas', put '/idp/cas'
|
# Example: for 'http://idp.example.com/idp/cas', put '/idp/cas'
|
||||||
context: '/idp/cas'
|
context: "/idp/cas"
|
||||||
|
|
||||||
# CAS HTTP port (default: 443)
|
# CAS HTTP port (default: 443)
|
||||||
#port: 443
|
#port: 443
|
||||||
|
|
||||||
# CAS procotol version
|
# 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'
|
#version: '2.0'
|
||||||
|
|
||||||
# CAS server SSL certificate validation (set to false to disable)
|
# CAS server SSL certificate validation (set to false to disable)
|
||||||
|
@ -234,7 +231,7 @@ auth:
|
||||||
# CAS Fake authenticated user
|
# CAS Fake authenticated user
|
||||||
#fake_authenticated_user: 'myusername'
|
#fake_authenticated_user: 'myusername'
|
||||||
|
|
||||||
# CAS user attributes to retreive with their properties:
|
# CAS user attributes to retrieve with their properties:
|
||||||
# [attr name]:
|
# [attr name]:
|
||||||
# # CAS attribute name (optional, default: [attr name])
|
# # CAS attribute name (optional, default: [attr name])
|
||||||
# cas_name: [CAS attr name]
|
# cas_name: [CAS attr name]
|
||||||
|
@ -247,14 +244,14 @@ auth:
|
||||||
# Note: only used by casuser auth backend.
|
# Note: only used by casuser auth backend.
|
||||||
user_attributes:
|
user_attributes:
|
||||||
login:
|
login:
|
||||||
cas_name: 'uid'
|
cas_name: "uid"
|
||||||
default: null
|
default: null
|
||||||
name:
|
name:
|
||||||
cas_name: 'displayName'
|
cas_name: "displayName"
|
||||||
cas_ldap_name: 'cn'
|
cas_ldap_name: "cn"
|
||||||
default: null
|
default: null
|
||||||
mail:
|
mail:
|
||||||
type: 'string'
|
type: "string"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Database user backend
|
# Database user backend
|
||||||
|
@ -275,7 +272,7 @@ auth:
|
||||||
# Password field name (optional, default: password)
|
# Password field name (optional, default: password)
|
||||||
#password_field: "password"
|
#password_field: "password"
|
||||||
# Exposed users table fields in resulting EesyPHP\Auth\User object
|
# Exposed users table fields in resulting EesyPHP\Auth\User object
|
||||||
# (optional, defailt: name, mail)
|
# (optional, default: name, mail)
|
||||||
#exposed_fields:
|
#exposed_fields:
|
||||||
# - "name"
|
# - "name"
|
||||||
# - "mail"
|
# - "mail"
|
||||||
|
@ -285,7 +282,7 @@ auth:
|
||||||
#
|
#
|
||||||
ldap:
|
ldap:
|
||||||
# LDAP host (required, multiple hosts could be specified with comma separator)
|
# LDAP host (required, multiple hosts could be specified with comma separator)
|
||||||
host: 'ldap://localhost'
|
host: "ldap://localhost"
|
||||||
|
|
||||||
# LDAP port (optional)
|
# LDAP port (optional)
|
||||||
#port: 389
|
#port: 389
|
||||||
|
@ -294,7 +291,7 @@ auth:
|
||||||
#starttls: false
|
#starttls: false
|
||||||
|
|
||||||
# LDAP directory base DN (required)
|
# LDAP directory base DN (required)
|
||||||
basedn: 'o=example'
|
basedn: "o=example"
|
||||||
|
|
||||||
# LDAP bind DN (optional)
|
# LDAP bind DN (optional)
|
||||||
#bind_dn: 'uid=eesyphp,ou=sysaccounts,${auth.ldap.basedn}'
|
#bind_dn: 'uid=eesyphp,ou=sysaccounts,${auth.ldap.basedn}'
|
||||||
|
@ -307,12 +304,12 @@ auth:
|
||||||
#user_filter_by_uid: 'uid=[username]'
|
#user_filter_by_uid: 'uid=[username]'
|
||||||
|
|
||||||
# User base DN
|
# 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 instead of user DN (optional, default: false)
|
||||||
#bind_with_username: true
|
#bind_with_username: true
|
||||||
|
|
||||||
# LDAP user attributes to retreive with their properties:
|
# LDAP user attributes to retrieve with their properties:
|
||||||
# [attr name]:
|
# [attr name]:
|
||||||
# # LDAP attribute name (optional, default: [attr name])
|
# # LDAP attribute name (optional, default: [attr name])
|
||||||
# ldap_name: [LDAP attr name]
|
# ldap_name: [LDAP attr name]
|
||||||
|
@ -326,16 +323,16 @@ auth:
|
||||||
# default: null
|
# default: null
|
||||||
user_attributes:
|
user_attributes:
|
||||||
login:
|
login:
|
||||||
ldap_name: 'uid'
|
ldap_name: "uid"
|
||||||
multivalued: false
|
multivalued: false
|
||||||
default: null
|
default: null
|
||||||
name:
|
name:
|
||||||
ldap_name: 'displayName'
|
ldap_name: "displayName"
|
||||||
alt_ldap_name: 'cn'
|
alt_ldap_name: "cn"
|
||||||
multivalued: false
|
multivalued: false
|
||||||
default: null
|
default: null
|
||||||
mail:
|
mail:
|
||||||
type: 'string'
|
type: "string"
|
||||||
|
|
||||||
# PEAR Net_LDAP2 library path (optional, default: Net/LDAP2.php)
|
# PEAR Net_LDAP2 library path (optional, default: Net/LDAP2.php)
|
||||||
#netldap2_path: 'Net/LDAP2.php'
|
#netldap2_path: 'Net/LDAP2.php'
|
||||||
|
@ -345,15 +342,14 @@ auth:
|
||||||
#
|
#
|
||||||
email:
|
email:
|
||||||
# PHP PEAR Mail and Mail_Mine paths
|
# PHP PEAR Mail and Mail_Mine paths
|
||||||
php_mail_path: 'Mail.php'
|
php_mail_path: "Mail.php"
|
||||||
php_mail_mime_path: 'Mail/mime.php'
|
php_mail_mime_path: "Mail/mime.php"
|
||||||
|
|
||||||
|
|
||||||
# Sending method :
|
# Sending method :
|
||||||
# - mail : use PHP mail function
|
# - mail : use PHP mail function
|
||||||
# - sendmail : use sendmail system command
|
# - sendmail : use sendmail system command
|
||||||
# - smtp : use an SMTP server (PHP PEAR Net_SMTP required)
|
# - smtp : use an SMTP server (PHP PEAR Net_SMTP required)
|
||||||
send_method: 'smtp'
|
send_method: "smtp"
|
||||||
|
|
||||||
# Sending parameters
|
# Sending parameters
|
||||||
# See : http:#pear.php.net/manual/en/package.mail.mail.factory.php
|
# 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 e-mails sent to a configured e-mail address
|
||||||
catch_all: false
|
catch_all: false
|
||||||
|
|
||||||
# Web Stats JS code
|
# Web Stats JS code
|
||||||
#webstats_js_code: ''
|
#webstats_js_code: ''
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ class App {
|
||||||
* @param string $cast The type of expected value. The configuration variable
|
* @param string $cast The type of expected value. The configuration variable
|
||||||
* value will be cast as this type. Could be : bool, int,
|
* value will be cast as this type. Could be : bool, int,
|
||||||
* float or string. (Optional, default : raw value)
|
* float or string. (Optional, default : raw value)
|
||||||
* @param bool $split If true, $cast is 'array' and value retreived from configuration
|
* @param bool $split If true, $cast is 'array' and value retrieved from configuration
|
||||||
* is a string, split the value by comma (optional, default: true)
|
* is a string, split the value by comma (optional, default: true)
|
||||||
* @return mixed The configuration variable value
|
* @return mixed The configuration variable value
|
||||||
**/
|
**/
|
||||||
|
@ -154,7 +154,7 @@ class App {
|
||||||
* @param string $cast The type of expected value. The configuration variable
|
* @param string $cast The type of expected value. The configuration variable
|
||||||
* default value will be cast as this type. Could be : bool, int,
|
* default value will be cast as this type. Could be : bool, int,
|
||||||
* float or string. (Optional, default : raw value)
|
* float or string. (Optional, default : raw value)
|
||||||
* @param bool $split If true, $cast is 'array' and value retreived from configuration
|
* @param bool $split If true, $cast is 'array' and value retrieved from configuration
|
||||||
* is a string, split the value by comma (optional, default: true)
|
* is a string, split the value by comma (optional, default: true)
|
||||||
* @return mixed The configuration variable default value
|
* @return mixed The configuration variable default value
|
||||||
**/
|
**/
|
||||||
|
@ -222,7 +222,7 @@ class App {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retreive application root directory path
|
* Retrieve application root directory path
|
||||||
* @return string|null
|
* @return string|null
|
||||||
*/
|
*/
|
||||||
public static function root_directory_path() {
|
public static function root_directory_path() {
|
||||||
|
|
12
src/Auth.php
12
src/Auth.php
|
@ -51,7 +51,7 @@ class Auth {
|
||||||
foreach(App::get('auth.methods', array(), 'array') as $method) {
|
foreach(App::get('auth.methods', array(), 'array') as $method) {
|
||||||
if (!$method || !is_string($method)) {
|
if (!$method || !is_string($method)) {
|
||||||
Log::warning(
|
Log::warning(
|
||||||
'Auth Init: Invalid auth method retreive from configuration, ignore it: %s',
|
'Auth Init: Invalid auth method retrieve from configuration, ignore it: %s',
|
||||||
vardump($method));
|
vardump($method));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ class Auth {
|
||||||
);
|
);
|
||||||
if (!class_exists($class)) {
|
if (!class_exists($class)) {
|
||||||
Log::warning(
|
Log::warning(
|
||||||
"Auth Init: Unknown auth method '%s' retreived from configuration, ignore it",
|
"Auth Init: Unknown auth method '%s' retrieved from configuration, ignore it",
|
||||||
$method
|
$method
|
||||||
);
|
);
|
||||||
continue;
|
continue;
|
||||||
|
@ -90,7 +90,7 @@ class Auth {
|
||||||
foreach(App::get('auth.backends', array(), 'array') as $backend) {
|
foreach(App::get('auth.backends', array(), 'array') as $backend) {
|
||||||
if (!$backend || !is_string($backend)) {
|
if (!$backend || !is_string($backend)) {
|
||||||
Log::warning(
|
Log::warning(
|
||||||
'Auth Init: Invalid auth backend retreive from configuration, ignore it: %s',
|
'Auth Init: Invalid auth backend retrieve from configuration, ignore it: %s',
|
||||||
vardump($backend));
|
vardump($backend));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ class Auth {
|
||||||
);
|
);
|
||||||
if (!class_exists($class)) {
|
if (!class_exists($class)) {
|
||||||
Log::warning(
|
Log::warning(
|
||||||
"Auth Init: Unknown auth backend '%s' retreived from configuration, ignore it",
|
"Auth Init: Unknown auth backend '%s' retrieved from configuration, ignore it",
|
||||||
$backend
|
$backend
|
||||||
);
|
);
|
||||||
continue;
|
continue;
|
||||||
|
@ -140,7 +140,7 @@ class Auth {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a authentification method is enabled
|
* Check if a authentication method is enabled
|
||||||
* @param string $method
|
* @param string $method
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
|
@ -156,7 +156,7 @@ class Auth {
|
||||||
*/
|
*/
|
||||||
public static function get_user($username, $first=true) {
|
public static function get_user($username, $first=true) {
|
||||||
if (!self :: $backends) {
|
if (!self :: $backends) {
|
||||||
Log :: warning("No auth backend registered, can't retreive user");
|
Log :: warning("No auth backend registered, can't retrieve user");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$users = array();
|
$users = array();
|
||||||
|
|
|
@ -13,7 +13,7 @@ class Backend {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retreive a user by its username
|
* Retrieve a user by its username
|
||||||
* @param string $username
|
* @param string $username
|
||||||
* @return \EesyPHP\Auth\User|null|false The user object if found, null it not, false in case of error
|
* @return \EesyPHP\Auth\User|null|false The user object if found, null it not, false in case of error
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -14,7 +14,7 @@ use phpCAS;
|
||||||
class Casuser extends Backend {
|
class Casuser extends Backend {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retreive CAS attribute value(s) from CAS authenticated user
|
* Retrieve CAS attribute value(s) from CAS authenticated user
|
||||||
* @param string $attr The CAS attribute name
|
* @param string $attr The CAS attribute name
|
||||||
* @param mixed $default The default value to return if the CAS attribute is undefined
|
* @param mixed $default The default value to return if the CAS attribute is undefined
|
||||||
* (optional, default: null)
|
* (optional, default: null)
|
||||||
|
@ -27,7 +27,7 @@ class Casuser extends Backend {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retreive a user by its username
|
* Retrieve a user by its username
|
||||||
* @param string $username
|
* @param string $username
|
||||||
* @return \EesyPHP\Auth\User|null|false The user object if found, null it not, false in case of error
|
* @return \EesyPHP\Auth\User|null|false The user object if found, null it not, false in case of error
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -110,7 +110,7 @@ class Db extends Backend {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retreive a user by its username
|
* Retrieve a user by its username
|
||||||
* @param string $username
|
* @param string $username
|
||||||
* @return \EesyPHP\Auth\User|null|false The user object if found, null it not, false in case of error
|
* @return \EesyPHP\Auth\User|null|false The user object if found, null it not, false in case of error
|
||||||
*/
|
*/
|
||||||
|
@ -129,7 +129,7 @@ class Db extends Backend {
|
||||||
return new User($username, '\\EesyPHP\\Auth\\Db', $info);
|
return new User($username, '\\EesyPHP\\Auth\\Db', $info);
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
Log :: error("Error retreiving user %s info from database: %s", $username, $e->getMessage());
|
Log :: error("Error retrieving user %s info from database: %s", $username, $e->getMessage());
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@ class Db extends Backend {
|
||||||
return password_verify($password, $info['password']);
|
return password_verify($password, $info['password']);
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
Log :: error("Error retreiving user %s password from database: %s", $user, $e->getMessage());
|
Log :: error("Error retrieving user %s password from database: %s", $user, $e->getMessage());
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ use function EesyPHP\vardump;
|
||||||
class Http extends Method {
|
class Http extends Method {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to retreive HTTP credentials
|
* Method to retrieve HTTP credentials
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private static $method;
|
private static $method;
|
||||||
|
@ -45,7 +45,7 @@ class Http extends Method {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retreive HTTP authentication data
|
* Retrieve HTTP authentication data
|
||||||
* @return array|false array('username' => '[login]', 'password' => '[password]') or false
|
* @return array|false array('username' => '[login]', 'password' => '[password]') or false
|
||||||
*/
|
*/
|
||||||
private static function get_auth_data() {
|
private static function get_auth_data() {
|
||||||
|
@ -61,7 +61,7 @@ class Http extends Method {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Log :: error("Fail to parse HTTP_AUTHORIZATION environnement variable.");
|
Log :: error("Fail to parse HTTP_AUTHORIZATION environment variable.");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'REMOTE_USER':
|
case 'REMOTE_USER':
|
||||||
|
@ -112,7 +112,7 @@ class Http extends Method {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Force HTTP user authentification
|
* Force HTTP user authentication
|
||||||
* @return never
|
* @return never
|
||||||
*/
|
*/
|
||||||
public static function force_login() {
|
public static function force_login() {
|
||||||
|
|
|
@ -144,7 +144,7 @@ class Ldap extends Backend {
|
||||||
// @phpstan-ignore-next-line
|
// @phpstan-ignore-next-line
|
||||||
if (PEAR::isError($search)) {
|
if (PEAR::isError($search)) {
|
||||||
Log :: error(
|
Log :: error(
|
||||||
'Error occured searching in LDAP with filter "%s" on base DN "%s": %s',
|
'Error occurred searching in LDAP with filter "%s" on base DN "%s": %s',
|
||||||
$filter, $basedn?$basedn:"unset", $search->getMessage()
|
$filter, $basedn?$basedn:"unset", $search->getMessage()
|
||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
|
@ -187,7 +187,7 @@ class Ldap extends Backend {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retreive LDAP attribute value(s) from LDAP entry
|
* Retrieve LDAP attribute value(s) from LDAP entry
|
||||||
* @param array<string,mixed> $entry The LDAP entry
|
* @param array<string,mixed> $entry The LDAP entry
|
||||||
* @param string $attr The LDAP attribute name
|
* @param string $attr The LDAP attribute name
|
||||||
* @param bool $all_values Return all values or just the first one (optional, default: false)
|
* @param bool $all_values Return all values or just the first one (optional, default: false)
|
||||||
|
@ -208,7 +208,7 @@ class Ldap extends Backend {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retreive a user by its username
|
* Retrieve a user by its username
|
||||||
* @param string $username
|
* @param string $username
|
||||||
* @return \EesyPHP\Auth\User|null|false The user object if found, null it not, false in case of error
|
* @return \EesyPHP\Auth\User|null|false The user object if found, null it not, false in case of error
|
||||||
*/
|
*/
|
||||||
|
@ -232,7 +232,7 @@ class Ldap extends Backend {
|
||||||
App::get('auth.ldap.user_basedn', null, 'string')
|
App::get('auth.ldap.user_basedn', null, 'string')
|
||||||
);
|
);
|
||||||
if (!is_array($users)) {
|
if (!is_array($users)) {
|
||||||
Log::warning('An error occured looking for user "%s" in LDAP directory', $username);
|
Log::warning('An error occurred looking for user "%s" in LDAP directory', $username);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!$users) {
|
if (!$users) {
|
||||||
|
|
|
@ -43,31 +43,27 @@ class Check {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function email($value, $domain=NULL, $checkDns=true) {
|
public static function email($value, $domains=NULL, $checkDns=true) {
|
||||||
$regex = '/^((\"[^\"\f\n\r\t\v\b]+\")|([\w\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+(\.[\w\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+)*))@((\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\-])+\.)+[A-Za-z\-]+))$/';
|
$regex = '/^((\"[^\"\f\n\r\t\v\b]+\")|([\w\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+(\.[\w\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+)*))@((\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\-])+\.)+[A-Za-z\-]+))$/';
|
||||||
|
|
||||||
if (!preg_match($regex, $value)) {
|
if (!preg_match($regex, $value)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$nd = explode('@', $value);
|
$domain = explode('@', $value);
|
||||||
$nd=$nd[1];
|
$domain = $domain[1];
|
||||||
|
|
||||||
if ($domain) {
|
if ($domains && !in_array($domain, ensure_is_array($domains)))
|
||||||
if(is_array($domain)) {
|
return false;
|
||||||
if (!in_array($nd,$domain)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if($nd!=$domain) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($checkDns && function_exists('checkdnsrr')) {
|
if ($checkDns) {
|
||||||
if (!(checkdnsrr($nd, 'MX') || checkdnsrr($nd, 'A'))) {
|
if (!function_exists('checkdnsrr')) {
|
||||||
|
Log::warning(
|
||||||
|
"Check::email(): PHP function checkdnsrr is missing, can't check domain against DNS. ".
|
||||||
|
"Assume is OK."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else if (!(checkdnsrr($domain, 'MX') || checkdnsrr($domain, 'A'))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ class Cli {
|
||||||
"This command could be used to start the PHP built-in HTTP server to serve
|
"This command could be used to start the PHP built-in HTTP server to serve
|
||||||
the application.
|
the application.
|
||||||
|
|
||||||
Additionnal parameters:
|
Additional parameters:
|
||||||
-p/--public-url Define the public URL (default: based on listen address)
|
-p/--public-url Define the public URL (default: based on listen address)
|
||||||
-P/--enable-profiler Enable Xdebug profiler
|
-P/--enable-profiler Enable Xdebug profiler
|
||||||
-O/--profiler-output [path] Xdebug profiler output directory path"
|
-O/--profiler-output [path] Xdebug profiler output directory path"
|
||||||
|
@ -249,7 +249,7 @@ Additionnal parameters:
|
||||||
exit($result?0:1);
|
exit($result?0:1);
|
||||||
}
|
}
|
||||||
catch(Exception $e) {
|
catch(Exception $e) {
|
||||||
Log :: exception($e, I18n::_("An exception occured running command %s"), self :: $command);
|
Log :: exception($e, I18n::_("An exception occurred running command %s"), self :: $command);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,7 +137,7 @@ Class Config {
|
||||||
* the value by comma (optional, default: false)
|
* the value by comma (optional, default: false)
|
||||||
* @param array|null $config Optional configuration to use instead of current loaded configuration
|
* @param array|null $config Optional configuration to use instead of current loaded configuration
|
||||||
* @param callable|null $get Optional callable to get another value that will be used to replace
|
* @param callable|null $get Optional callable to get another value that will be used to replace
|
||||||
* variables references found in retreived value.
|
* variables references found in retrieved value.
|
||||||
* @return mixed The configuration variable value
|
* @return mixed The configuration variable value
|
||||||
**/
|
**/
|
||||||
public static function get($key, $default=null, $cast=null, $split=false, &$config=null, $get=null) {
|
public static function get($key, $default=null, $cast=null, $split=false, &$config=null, $get=null) {
|
||||||
|
@ -166,10 +166,10 @@ Class Config {
|
||||||
/**
|
/**
|
||||||
* Replace variable in specified value
|
* Replace variable in specified value
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
* @param array|callable|null $config Optional configuration to use to retreive variable reference
|
* @param array|callable|null $config Optional configuration to use to retrieve variable reference
|
||||||
* value instead of current loaded configuration. Could be an
|
* value instead of current loaded configuration. Could be an
|
||||||
* array of configuration data or a callable that could be used
|
* array of configuration data or a callable that could be used
|
||||||
* as Config::get() to retreive the desired variable reference.
|
* as Config::get() to retrieve the desired variable reference.
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public static function replace_variables($value, $config=null) {
|
public static function replace_variables($value, $config=null) {
|
||||||
|
|
|
@ -21,7 +21,7 @@ class Date {
|
||||||
/**
|
/**
|
||||||
* Format a timestamp as date/datetime string
|
* Format a timestamp as date/datetime string
|
||||||
* @param int $time The timestamp to format
|
* @param int $time The timestamp to format
|
||||||
* @param bool $with_time If true, include time in formated string
|
* @param bool $with_time If true, include time in formatted string
|
||||||
* (optional, default: true)
|
* (optional, default: true)
|
||||||
*/
|
*/
|
||||||
public static function format($time, $with_time=true) {
|
public static function format($time, $with_time=true) {
|
||||||
|
|
22
src/Db.php
22
src/Db.php
|
@ -128,10 +128,10 @@ class Db {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper to retreive one row from a table of the database
|
* Helper to retrieve one row from a table of the database
|
||||||
* @param string $table The table name
|
* @param string $table The table name
|
||||||
* @param array|string $where WHERE clause(s) as expected by Envms\FluentPDO\Query
|
* @param array|string $where WHERE clause(s) as expected by Envms\FluentPDO\Query
|
||||||
* @param array|string|null $fields The expected fields as string (separeted by comma) or an
|
* @param array|string|null $fields The expected fields as string (separated by comma) or an
|
||||||
* array (optional, default: all table fields will be returned)
|
* array (optional, default: all table fields will be returned)
|
||||||
* @param array<array{0: 'LEFT'|'RIGHT'|'INNER'|'OUTER'|'FULL', 1: string, 2: string}>|array{0: 'LEFT'|'RIGHT'|'INNER'|'OUTER'|'FULL', 1: string, 2: string} $joins Join specification as array (see apply_joins())
|
* @param array<array{0: 'LEFT'|'RIGHT'|'INNER'|'OUTER'|'FULL', 1: string, 2: string}>|array{0: 'LEFT'|'RIGHT'|'INNER'|'OUTER'|'FULL', 1: string, 2: string} $joins Join specification as array (see apply_joins())
|
||||||
* @return array|false
|
* @return array|false
|
||||||
|
@ -159,10 +159,10 @@ class Db {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper to retreive multiple rows from a table of the database
|
* Helper to retrieve multiple rows from a table of the database
|
||||||
* @param string $table The table name
|
* @param string $table The table name
|
||||||
* @param array|string $where WHERE clause(s) as expected by Envms\FluentPDO\Query
|
* @param array|string $where WHERE clause(s) as expected by Envms\FluentPDO\Query
|
||||||
* @param array|string|null $fields The expected fields as string (separeted by comma) or an
|
* @param array|string|null $fields The expected fields as string (separated by comma) or an
|
||||||
* array (optional, default: all table fields will be returned)
|
* array (optional, default: all table fields will be returned)
|
||||||
* @param string|null $order_by An optional ORDER clause as a string
|
* @param string|null $order_by An optional ORDER clause as a string
|
||||||
* @param string|null $limit An optional LIMIT clause as a string
|
* @param string|null $limit An optional LIMIT clause as a string
|
||||||
|
@ -197,7 +197,7 @@ class Db {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper to retreive a count from a table of the database
|
* Helper to retrieve a count from a table of the database
|
||||||
* @param string $table The table name
|
* @param string $table The table name
|
||||||
* @param array|string $where WHERE clause(s) as expected by Envms\FluentPDO\Query
|
* @param array|string $where WHERE clause(s) as expected by Envms\FluentPDO\Query
|
||||||
* @param array|string|null $what What to count (optional, default: "*")
|
* @param array|string|null $what What to count (optional, default: "*")
|
||||||
|
@ -267,7 +267,7 @@ class Db {
|
||||||
* @param string $table The table name
|
* @param string $table The table name
|
||||||
* @param Exception $e The exception
|
* @param Exception $e The exception
|
||||||
* @param array|string $where WHERE clause(s) as expected by Envms\FluentPDO\Query
|
* @param array|string $where WHERE clause(s) as expected by Envms\FluentPDO\Query
|
||||||
* @param array|string|null $fields The expected fields as string (separeted by comma) or an
|
* @param array|string|null $fields The expected fields as string (separated by comma) or an
|
||||||
* array (optional, default: all table fields will be returned)
|
* array (optional, default: all table fields will be returned)
|
||||||
* @param string|null $order_by An optional ORDER clause as a string
|
* @param string|null $order_by An optional ORDER clause as a string
|
||||||
* @param string|null $limit An optional LIMIT clause as a string
|
* @param string|null $limit An optional LIMIT clause as a string
|
||||||
|
@ -277,7 +277,7 @@ class Db {
|
||||||
private function _log_simple_select_query_error(
|
private function _log_simple_select_query_error(
|
||||||
$multiple, $table, $e, $where=null, $fields=null, $order_by=null, $limit=null, $joins=null
|
$multiple, $table, $e, $where=null, $fields=null, $order_by=null, $limit=null, $joins=null
|
||||||
) {
|
) {
|
||||||
$msg = "Error occured getting %s of the table %s";
|
$msg = "Error occurred getting %s of the table %s";
|
||||||
$params = [
|
$params = [
|
||||||
$multiple?"rows":"one row",
|
$multiple?"rows":"one row",
|
||||||
$table,
|
$table,
|
||||||
|
@ -311,7 +311,7 @@ class Db {
|
||||||
* Helper to insert a row in a table
|
* Helper to insert a row in a table
|
||||||
* @param string $table The table name
|
* @param string $table The table name
|
||||||
* @param array<string,mixed> $values The values of the row
|
* @param array<string,mixed> $values The values of the row
|
||||||
* @param boolean $want_id Set to true if you want to retreive the ID of the inserted row
|
* @param boolean $want_id Set to true if you want to retrieve the ID of the inserted row
|
||||||
* @return bool|int The ID of the inserted row if $want_id, or true/false in case of success/error
|
* @return bool|int The ID of the inserted row if $want_id, or true/false in case of success/error
|
||||||
*/
|
*/
|
||||||
public function insert($table, $values, $want_id=false) {
|
public function insert($table, $values, $want_id=false) {
|
||||||
|
@ -322,7 +322,7 @@ class Db {
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
Log :: error(
|
Log :: error(
|
||||||
"Error occured inserting row in the table %s of the database: %s\nValues:\n%s",
|
"Error occurred inserting row in the table %s of the database: %s\nValues:\n%s",
|
||||||
$table,
|
$table,
|
||||||
$e->getMessage(),
|
$e->getMessage(),
|
||||||
vardump($values)
|
vardump($values)
|
||||||
|
@ -356,7 +356,7 @@ class Db {
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
Log :: error(
|
Log :: error(
|
||||||
"Error occured updating %s in the table %s of the database (where %s): %s\nChanges:\n%s",
|
"Error occurred updating %s in the table %s of the database (where %s): %s\nChanges:\n%s",
|
||||||
$expected_row_changes == 1?'row':'rows',
|
$expected_row_changes == 1?'row':'rows',
|
||||||
$table,
|
$table,
|
||||||
is_array($where)?
|
is_array($where)?
|
||||||
|
@ -392,7 +392,7 @@ class Db {
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
Log :: error(
|
Log :: error(
|
||||||
"Error occured deleting %s in the table %s of the database (where %s): %s",
|
"Error occurred deleting %s in the table %s of the database (where %s): %s",
|
||||||
$expected_row_changes == 1?'one row':'some rows',
|
$expected_row_changes == 1?'one row':'some rows',
|
||||||
$table,
|
$table,
|
||||||
is_array($where)?
|
is_array($where)?
|
||||||
|
|
|
@ -98,8 +98,8 @@ class Email {
|
||||||
$msg .= sprintf(
|
$msg .= sprintf(
|
||||||
(
|
(
|
||||||
$html?
|
$html?
|
||||||
I18n::_("</hr><p><small>Mail initialy intended for %s.</small></p>"):
|
I18n::_("</hr><p><small>Mail initially intended for %s.</small></p>"):
|
||||||
I18n::_("\n\n\nMail initialy intended for %s.")
|
I18n::_("\n\n\nMail initially intended for %s.")
|
||||||
),
|
),
|
||||||
(is_array($to)?implode(',', $to):$to));
|
(is_array($to)?implode(',', $to):$to));
|
||||||
$headers["X-Orig-To"] = $to;
|
$headers["X-Orig-To"] = $to;
|
||||||
|
@ -132,7 +132,7 @@ class Email {
|
||||||
foreach(array_keys($headers) as $header) {
|
foreach(array_keys($headers) as $header) {
|
||||||
if(in_array(strtoupper($header), array('BCC', 'CC'))) {
|
if(in_array(strtoupper($header), array('BCC', 'CC'))) {
|
||||||
if (App :: get('email.catch_all')) {
|
if (App :: get('email.catch_all')) {
|
||||||
Log :: debug("Mail catched: remove $header header");
|
Log :: debug("Mail caught: remove $header header");
|
||||||
$msg .= sprintf(
|
$msg .= sprintf(
|
||||||
(
|
(
|
||||||
$html?
|
$html?
|
||||||
|
|
|
@ -17,7 +17,7 @@ class Hook {
|
||||||
*
|
*
|
||||||
* @param $event string The event name
|
* @param $event string The event name
|
||||||
* @param $callable callable The callable to run on event
|
* @param $callable callable The callable to run on event
|
||||||
* @param $param mixed Paremeter that will be pass to the callable
|
* @param $param mixed Parameter that will be pass to the callable
|
||||||
* Use an array if you have multiple parameters to pass
|
* Use an array if you have multiple parameters to pass
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
|
@ -37,7 +37,7 @@ class Hook {
|
||||||
* @param $event string Hook event name
|
* @param $event string Hook event name
|
||||||
* @param $event_data mixed Hook event data (optional, default: null)
|
* @param $event_data mixed Hook event data (optional, default: null)
|
||||||
*
|
*
|
||||||
* @return boolean True if all triggered actions succefully runned, false otherwise
|
* @return boolean True if all triggered actions succefully executed, false otherwise
|
||||||
*/
|
*/
|
||||||
public static function trigger($event_name, $event_data=null) {
|
public static function trigger($event_name, $event_data=null) {
|
||||||
$return = true;
|
$return = true;
|
||||||
|
@ -54,7 +54,7 @@ class Hook {
|
||||||
}
|
}
|
||||||
catch(Exception $e) {
|
catch(Exception $e) {
|
||||||
Log :: exception(
|
Log :: exception(
|
||||||
$e, "An exception occured running hook ".format_callable($e['callable']).
|
$e, "An exception occurred running hook ".format_callable($e['callable']).
|
||||||
" on event $event_name");
|
" on event $event_name");
|
||||||
$return = false;
|
$return = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,11 +107,11 @@ class I18n {
|
||||||
|
|
||||||
// Gettext firstly look the LANGUAGE env variable, so set it
|
// Gettext firstly look the LANGUAGE env variable, so set it
|
||||||
if (!putenv("LANGUAGE=$locale"))
|
if (!putenv("LANGUAGE=$locale"))
|
||||||
Log :: error("Fail to set LANGUAGE variable in environnement to '$locale'");
|
Log :: error("Fail to set LANGUAGE variable in environment to '$locale'");
|
||||||
|
|
||||||
// Set the locale
|
// Set the locale
|
||||||
if (setlocale(LC_ALL, $locale) === false)
|
if (setlocale(LC_ALL, $locale) === false)
|
||||||
Log :: error("An error occured setting locale to '$locale'");
|
Log :: error("An error occurred setting locale to '$locale'");
|
||||||
|
|
||||||
// Configure and set the text domain
|
// Configure and set the text domain
|
||||||
$fullpath = bindtextdomain(self :: CORE_TEXT_DOMAIN, self :: $core_root_path);
|
$fullpath = bindtextdomain(self :: CORE_TEXT_DOMAIN, self :: $core_root_path);
|
||||||
|
|
|
@ -404,7 +404,7 @@ class Log {
|
||||||
* Log an exception
|
* Log an exception
|
||||||
* @param Throwable $exception
|
* @param Throwable $exception
|
||||||
* @param string|null $prefix The prefix of the log message
|
* @param string|null $prefix The prefix of the log message
|
||||||
* (optional, default: "An exception occured")
|
* (optional, default: "An exception occurred")
|
||||||
* @param array $extra_args Extra arguments to use to compute prefix using sprintf
|
* @param array $extra_args Extra arguments to use to compute prefix using sprintf
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
@ -419,7 +419,7 @@ class Log {
|
||||||
}
|
}
|
||||||
self :: error(
|
self :: error(
|
||||||
"%s:\n%s\n## %s:%d : %s",
|
"%s:\n%s\n## %s:%d : %s",
|
||||||
($prefix?$prefix:"An exception occured"),
|
($prefix?$prefix:"An exception occurred"),
|
||||||
$exception->getTraceAsString(),
|
$exception->getTraceAsString(),
|
||||||
$exception->getFile(), $exception->getLine(),
|
$exception->getFile(), $exception->getLine(),
|
||||||
$exception->getMessage());
|
$exception->getMessage());
|
||||||
|
@ -456,7 +456,7 @@ class Log {
|
||||||
*/
|
*/
|
||||||
public static function on_php_error($errno, $errstr, $errfile, $errline) {
|
public static function on_php_error($errno, $errstr, $errfile, $errline) {
|
||||||
self :: error(
|
self :: error(
|
||||||
"A PHP error occured : [%s] %s\nFile : %s (line : %d)",
|
"A PHP error occurred : [%s] %s\nFile : %s (line : %d)",
|
||||||
self :: errno2type($errno), $errstr, $errfile, $errline
|
self :: errno2type($errno), $errstr, $errfile, $errline
|
||||||
);
|
);
|
||||||
return False;
|
return False;
|
||||||
|
|
|
@ -106,7 +106,7 @@ class SentryIntegration {
|
||||||
public static function on_php_error($errno, $errstr, $errfile, $errline) {
|
public static function on_php_error($errno, $errstr, $errfile, $errline) {
|
||||||
if (in_array($errno, self :: $php_error_types))
|
if (in_array($errno, self :: $php_error_types))
|
||||||
self :: log(
|
self :: log(
|
||||||
"A PHP error occured : [%s] %s\nFile : %s (line : %d)",
|
"A PHP error occurred : [%s] %s\nFile : %s (line : %d)",
|
||||||
Log :: errno2type($errno), $errstr, $errfile, $errline
|
Log :: errno2type($errno), $errstr, $errfile, $errline
|
||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
|
|
18
src/Tpl.php
18
src/Tpl.php
|
@ -470,7 +470,7 @@ class Tpl {
|
||||||
self :: $smarty->display("Tpl:$template");
|
self :: $smarty->display("Tpl:$template");
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
Log :: exception($e, "Smarty - An exception occured displaying template '$template'");
|
Log :: exception($e, "Smarty - An exception occurred displaying template '$template'");
|
||||||
Hook :: trigger('after_displaying_template', array('success' => false));
|
Hook :: trigger('after_displaying_template', array('success' => false));
|
||||||
$sentry_span->finish();
|
$sentry_span->finish();
|
||||||
if ($template != 'fatal_error.tpl')
|
if ($template != 'fatal_error.tpl')
|
||||||
|
@ -514,7 +514,7 @@ class Tpl {
|
||||||
$success = true;
|
$success = true;
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
Log :: exception($e, "Smarty - An exception occured fetching template '$template'");
|
Log :: exception($e, "Smarty - An exception occurred fetching template '$template'");
|
||||||
}
|
}
|
||||||
Hook :: trigger('after_fetching_template', array('success' => $success));
|
Hook :: trigger('after_fetching_template', array('success' => $success));
|
||||||
$sentry_span->finish();
|
$sentry_span->finish();
|
||||||
|
@ -533,7 +533,7 @@ class Tpl {
|
||||||
if (!is_array($data))
|
if (!is_array($data))
|
||||||
$data = array();
|
$data = array();
|
||||||
|
|
||||||
// Adjust HTTP error code on unsuccessfull request (or if custom error code is provided)
|
// Adjust HTTP error code on unsuccessful request (or if custom error code is provided)
|
||||||
if (
|
if (
|
||||||
$error_code
|
$error_code
|
||||||
|| (isset($data['success']) && !$data['success'] && http_response_code() == 200)
|
|| (isset($data['success']) && !$data['success'] && http_response_code() == 200)
|
||||||
|
@ -570,7 +570,7 @@ class Tpl {
|
||||||
'error' => (
|
'error' => (
|
||||||
$error?
|
$error?
|
||||||
$error:
|
$error:
|
||||||
I18n::_("Unexpected error occured. If problem persist, please contact support.")
|
I18n::_("Unexpected error occurred. If problem persist, please contact support.")
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
$error_code,
|
$error_code,
|
||||||
|
@ -599,7 +599,7 @@ class Tpl {
|
||||||
die("FATAL ERROR: $error\n");
|
die("FATAL ERROR: $error\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set HTTP reponse code to 500
|
// Set HTTP response code to 500
|
||||||
http_response_code(500);
|
http_response_code(500);
|
||||||
|
|
||||||
// Handle API mode
|
// Handle API mode
|
||||||
|
@ -696,7 +696,7 @@ class Tpl {
|
||||||
public static function get_template_source($template, $core_only=false) {
|
public static function get_template_source($template, $core_only=false) {
|
||||||
$path = self :: resolve_templates_path($template, $core_only);
|
$path = self :: resolve_templates_path($template, $core_only);
|
||||||
if (!is_readable($path)) {
|
if (!is_readable($path)) {
|
||||||
// No error return with Smarty3 and highter because it's call
|
// No error return with Smarty3 and higher because it's call
|
||||||
// template name in lower first systematically
|
// template name in lower first systematically
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
@ -782,7 +782,7 @@ class Tpl {
|
||||||
Url :: add_url_handler(
|
Url :: add_url_handler(
|
||||||
$pattern,
|
$pattern,
|
||||||
array('EesyPHP\\Tpl', 'handle_static_file'),
|
array('EesyPHP\\Tpl', 'handle_static_file'),
|
||||||
null, // additionnal info
|
null, // additional info
|
||||||
false, // authenticated
|
false, // authenticated
|
||||||
false, // override
|
false, // override
|
||||||
false, // API mode
|
false, // API mode
|
||||||
|
@ -797,7 +797,7 @@ class Tpl {
|
||||||
$priority++;
|
$priority++;
|
||||||
}
|
}
|
||||||
Log :: trace(
|
Log :: trace(
|
||||||
'Register additionnal static directory "%s" for root URL "%s" (priority: %d)',
|
'Register additional static directory "%s" for root URL "%s" (priority: %d)',
|
||||||
$path, $root_url, $priority);
|
$path, $root_url, $priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -901,7 +901,7 @@ class Tpl {
|
||||||
echo format_duration(hrtime(true) - $init_time, 'ns', 'ms');
|
echo format_duration(hrtime(true) - $init_time, 'ns', 'ms');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo _('Unkwown');
|
echo _('Unknown');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ use Smarty_Resource_Custom;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Smarty ressource for EesyPHP templates
|
* Smarty resource for EesyPHP templates
|
||||||
*
|
*
|
||||||
* @author Benjamin Renard <brenard@zionetrix.net>
|
* @author Benjamin Renard <brenard@zionetrix.net>
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -330,9 +330,9 @@ class Url {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retreive current requested URL and return it
|
* Retrieve current requested URL and return it
|
||||||
*
|
*
|
||||||
* @param bool $with_parameters Set to true to retreive current URL with GET parameters
|
* @param bool $with_parameters Set to true to retrieve current URL with GET parameters
|
||||||
*
|
*
|
||||||
* @return string|false The current request URL or false if fail
|
* @return string|false The current request URL or false if fail
|
||||||
**/
|
**/
|
||||||
|
@ -379,7 +379,7 @@ class Url {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Trigger redirect to specified URL (or homepage if omited)
|
* Trigger redirect to specified URL (or homepage if omitted)
|
||||||
*
|
*
|
||||||
* @param string|false $go The destination URL
|
* @param string|false $go The destination URL
|
||||||
*
|
*
|
||||||
|
@ -457,7 +457,7 @@ class Url {
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
Log :: exception(
|
Log :: exception(
|
||||||
$e, "An exception occured running URL handler %s",
|
$e, "An exception occurred running URL handler %s",
|
||||||
format_callable(self :: $request -> handler));
|
format_callable(self :: $request -> handler));
|
||||||
}
|
}
|
||||||
Hook::trigger(
|
Hook::trigger(
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace EesyPHP;
|
||||||
use League\MimeTypeDetection\ExtensionMimeTypeDetector;
|
use League\MimeTypeDetection\ExtensionMimeTypeDetector;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parser/formater values helpers
|
* Parser/formatter values helpers
|
||||||
*/
|
*/
|
||||||
function format_size($size, $digit=False) {
|
function format_size($size, $digit=False) {
|
||||||
if (!$digit && $digit!==0) $digit=2;
|
if (!$digit && $digit!==0) $digit=2;
|
||||||
|
@ -297,7 +297,7 @@ function ___($msg) {
|
||||||
* @param string|null $unit The unit of provide value (optional, default: 's')
|
* @param string|null $unit The unit of provide value (optional, default: 's')
|
||||||
* @param string|null $precision Minimal precision to displayed (optional, default: 's')
|
* @param string|null $precision Minimal precision to displayed (optional, default: 's')
|
||||||
* @param string|null $separator The separator between time block (optional, default: null = one space)
|
* @param string|null $separator The separator between time block (optional, default: null = one space)
|
||||||
* @return string|false The formated duration as string, or false in case of error
|
* @return string|false The formatted duration as string, or false in case of error
|
||||||
*/
|
*/
|
||||||
function format_duration($value, $unit=null, $precision=null, $separator=null) {
|
function format_duration($value, $unit=null, $precision=null, $separator=null) {
|
||||||
$units = array(
|
$units = array(
|
||||||
|
|
|
@ -55,15 +55,20 @@ body.signin {
|
||||||
border-top-right-radius: 0;
|
border-top-right-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Common helpers
|
* Common helpers
|
||||||
*/
|
*/
|
||||||
.center { text-align: center; }
|
.center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
p { text-align: justify; }
|
p {
|
||||||
|
text-align: justify;
|
||||||
|
}
|
||||||
|
|
||||||
img { max-width: 100%; }
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Messages/errors & fatal errors
|
* Messages/errors & fatal errors
|
||||||
|
@ -82,20 +87,25 @@ img { max-width: 100%; }
|
||||||
/*
|
/*
|
||||||
* Tables
|
* Tables
|
||||||
*/
|
*/
|
||||||
th a, th a:hover {
|
th a,
|
||||||
color: #000;
|
th a:hover {
|
||||||
text-decoration: none;
|
color: #000;
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Forms
|
* Forms
|
||||||
*/
|
*/
|
||||||
.form-inline .form-control, .form-inline label, .form-inline input, .form-inline select, .form-inline button {
|
.form-inline .form-control,
|
||||||
margin-left: 1em!important;
|
.form-inline label,
|
||||||
|
.form-inline input,
|
||||||
|
.form-inline select,
|
||||||
|
.form-inline button {
|
||||||
|
margin-left: 1em !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
label.required::after {
|
label.required::after {
|
||||||
content: " *";
|
content: " *";
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-error {
|
.form-error {
|
||||||
|
@ -107,8 +117,8 @@ label.required::after {
|
||||||
}
|
}
|
||||||
|
|
||||||
span.form-control-plaintext {
|
span.form-control-plaintext {
|
||||||
padding-top: calc(.375rem + 1px);
|
padding-top: calc(0.375rem + 1px);
|
||||||
padding-bottom: calc(.375rem + 1px);
|
padding-bottom: calc(0.375rem + 1px);
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
var myconfirm = function(opts) {
|
var myconfirm = function (opts) {
|
||||||
var confirm = false;
|
var confirm = false;
|
||||||
var dialog = BootstrapDialog.show({
|
var dialog = BootstrapDialog.show({
|
||||||
title: opts.title || _('Confirmation'),
|
title: opts.title || _("Confirmation"),
|
||||||
message: opts.question || _('Do you confirm?'),
|
message: opts.question || _("Do you confirm?"),
|
||||||
autodestroy: true,
|
autodestroy: true,
|
||||||
cssClass: opts.css_class || null,
|
cssClass: opts.css_class || null,
|
||||||
type: opts.type || BootstrapDialog.TYPE_LIGHT,
|
type: opts.type || BootstrapDialog.TYPE_LIGHT,
|
||||||
|
@ -15,44 +15,43 @@ var myconfirm = function(opts) {
|
||||||
},
|
},
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
label: opts.cancel_label || _('Cancel'),
|
label: opts.cancel_label || _("Cancel"),
|
||||||
action: function(dialog) {
|
action: function (dialog) {
|
||||||
dialog.close();
|
dialog.close();
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: opts.confirm_label || _('Validate'),
|
label: opts.confirm_label || _("Validate"),
|
||||||
cssClass: 'btn-danger',
|
cssClass: "btn-danger",
|
||||||
action: function(dialog) {
|
action: function (dialog) {
|
||||||
dialog.setData('confirm',true);
|
dialog.setData("confirm", true);
|
||||||
dialog.close();
|
dialog.close();
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
onhidden: function(dialog) {
|
onhidden: function (dialog) {
|
||||||
if (dialog.getData('confirm')) {
|
if (dialog.getData("confirm")) {
|
||||||
if (jQuery.type(dialog.getData('onconfirm')) == 'function') {
|
if (jQuery.type(dialog.getData("onconfirm")) == "function") {
|
||||||
dialog.getData('onconfirm')(dialog.getData('data'));
|
dialog.getData("onconfirm")(dialog.getData("data"));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (jQuery.type(dialog.getData("oncancel")) == "function") {
|
||||||
|
dialog.getData("oncancel")(dialog.getData("data"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
},
|
||||||
if (jQuery.type(dialog.getData('oncancel')) == 'function') {
|
|
||||||
dialog.getData('oncancel')(dialog.getData('data'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
return dialog;
|
return dialog;
|
||||||
};
|
};
|
||||||
|
|
||||||
var myalert = function(msg, title, opts) {
|
var myalert = function (msg, title, opts) {
|
||||||
if (!opts) opts={};
|
if (!opts) opts = {};
|
||||||
var dialog = BootstrapDialog.show({
|
var dialog = BootstrapDialog.show({
|
||||||
title: title || opts.title || _('Error'),
|
title: title || opts.title || _("Error"),
|
||||||
message: msg,
|
message: msg,
|
||||||
autodestroy: true,
|
autodestroy: true,
|
||||||
type: opts.type || BootstrapDialog.TYPE_DANGER,
|
type: opts.type || BootstrapDialog.TYPE_DANGER,
|
||||||
size: opts.size || BootstrapDialog.SIZE_MEDIUM,
|
size: opts.size || BootstrapDialog.SIZE_MEDIUM,
|
||||||
draggable: opts.draggable || false,
|
draggable: opts.draggable || false,
|
||||||
cssClass: opts.css_class || null,
|
cssClass: opts.css_class || null,
|
||||||
data: {
|
data: {
|
||||||
|
@ -61,37 +60,37 @@ var myalert = function(msg, title, opts) {
|
||||||
},
|
},
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
label: opts.btnLabel || _('OK'),
|
label: opts.btnLabel || _("OK"),
|
||||||
cssClass: opts.btnCssClass ||'btn-primary',
|
cssClass: opts.btnCssClass || "btn-primary",
|
||||||
action: function(dialog) {
|
action: function (dialog) {
|
||||||
dialog.close();
|
dialog.close();
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
onhidden: function(dialog) {
|
onhidden: function (dialog) {
|
||||||
if (jQuery.type(dialog.getData('onclose')) == 'function') {
|
if (jQuery.type(dialog.getData("onclose")) == "function") {
|
||||||
dialog.getData('onclose')(dialog.getData('data'));
|
dialog.getData("onclose")(dialog.getData("data"));
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
return dialog;
|
return dialog;
|
||||||
};
|
};
|
||||||
|
|
||||||
var myprompt = function(opts) {
|
var myprompt = function (opts) {
|
||||||
if ($.type(opts) != "object") {
|
if ($.type(opts) != "object") {
|
||||||
opts={};
|
opts = {};
|
||||||
}
|
}
|
||||||
var submited = false;
|
var submitted = false;
|
||||||
|
|
||||||
var onSubmitBtnClick = function(dialog) {
|
var onSubmitBtnClick = function (dialog) {
|
||||||
submited = true;
|
submitted = true;
|
||||||
var val = dialog.getModalBody().find('input').val();
|
var val = dialog.getModalBody().find("input").val();
|
||||||
if (jQuery.type(dialog.getData('onsubmit')) == 'function') {
|
if (jQuery.type(dialog.getData("onsubmit")) == "function") {
|
||||||
if (!dialog.getData('onsubmit')(val, dialog.getData('data'))) {
|
if (!dialog.getData("onsubmit")(val, dialog.getData("data"))) {
|
||||||
if (jQuery.type(dialog.getData('onerror')) == 'function') {
|
if (jQuery.type(dialog.getData("onerror")) == "function") {
|
||||||
dialog.getData('onerror')(val, dialog.getData('data'));
|
dialog.getData("onerror")(val, dialog.getData("data"));
|
||||||
}
|
}
|
||||||
if (!dialog.getData('closeonerror')) {
|
if (!dialog.getData("closeonerror")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -100,11 +99,14 @@ var myprompt = function(opts) {
|
||||||
};
|
};
|
||||||
|
|
||||||
var dialog = BootstrapDialog.show({
|
var dialog = BootstrapDialog.show({
|
||||||
title: opts.title || _('Question'),
|
title: opts.title || _("Question"),
|
||||||
message: "<label for='myprompt_input'>"+(opts.label || _("Please enter your answer below:"))+"</label><input type='text' class='form-control' id='myprompt_input'/>",
|
message:
|
||||||
|
"<label for='myprompt_input'>" +
|
||||||
|
(opts.label || _("Please enter your answer below:")) +
|
||||||
|
"</label><input type='text' class='form-control' id='myprompt_input'/>",
|
||||||
autodestroy: true,
|
autodestroy: true,
|
||||||
type: opts.type || BootstrapDialog.TYPE_INFO,
|
type: opts.type || BootstrapDialog.TYPE_INFO,
|
||||||
size: opts.size || BootstrapDialog.SIZE_MEDIUM,
|
size: opts.size || BootstrapDialog.SIZE_MEDIUM,
|
||||||
cssClass: opts.css_class || null,
|
cssClass: opts.css_class || null,
|
||||||
draggable: opts.draggable || false,
|
draggable: opts.draggable || false,
|
||||||
data: {
|
data: {
|
||||||
|
@ -115,118 +117,123 @@ var myprompt = function(opts) {
|
||||||
default_answer: opts.default_answer,
|
default_answer: opts.default_answer,
|
||||||
onSubmitBtnClick: onSubmitBtnClick,
|
onSubmitBtnClick: onSubmitBtnClick,
|
||||||
data: opts.data,
|
data: opts.data,
|
||||||
submited: false,
|
submitted: false,
|
||||||
},
|
},
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
label: opts.cancel_label || _('Cancel'),
|
label: opts.cancel_label || _("Cancel"),
|
||||||
action: function(dialog) {
|
action: function (dialog) {
|
||||||
dialog.close();
|
dialog.close();
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: opts.submit_label || _('Validate'),
|
label: opts.submit_label || _("Validate"),
|
||||||
cssClass: 'btn-danger',
|
cssClass: "btn-danger",
|
||||||
action: onSubmitBtnClick
|
action: onSubmitBtnClick,
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
onshown: function(dialog) {
|
onshown: function (dialog) {
|
||||||
var input = dialog.getModalBody().find('input');
|
var input = dialog.getModalBody().find("input");
|
||||||
input.on('keyup', function (e) {
|
input.on("keyup", function (e) {
|
||||||
if (e.keyCode == 13) {
|
if (e.keyCode == 13) {
|
||||||
dialog.getData('onSubmitBtnClick')(dialog);
|
dialog.getData("onSubmitBtnClick")(dialog);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (dialog.getData('default_answer')) {
|
if (dialog.getData("default_answer")) {
|
||||||
input.val(dialog.getData('default_answer'));
|
input.val(dialog.getData("default_answer"));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onhidden: function(dialog) {
|
onhidden: function (dialog) {
|
||||||
if (!submited && jQuery.type(dialog.getData('oncancel')) == 'function') {
|
if (!submitted && jQuery.type(dialog.getData("oncancel")) == "function") {
|
||||||
dialog.getData('oncancel')(dialog.getData('data'));
|
dialog.getData("oncancel")(dialog.getData("data"));
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var myloadingalert = function(opts) {
|
var myloadingalert = function (opts) {
|
||||||
if (!opts) opts={};
|
if (!opts) opts = {};
|
||||||
var opened = false;
|
var opened = false;
|
||||||
var closed = false;
|
var closed = false;
|
||||||
var dialog = BootstrapDialog.show({
|
var dialog = BootstrapDialog.show({
|
||||||
title: opts.title || _('Please wait'),
|
title: opts.title || _("Please wait"),
|
||||||
message: opts.message || _('Please wait while your request is being processed.'),
|
message:
|
||||||
|
opts.message || _("Please wait while your request is being processed."),
|
||||||
autodestroy: true,
|
autodestroy: true,
|
||||||
type: opts.type || BootstrapDialog.TYPE_INFO,
|
type: opts.type || BootstrapDialog.TYPE_INFO,
|
||||||
size: opts.size || BootstrapDialog.SIZE_NORMAL,
|
size: opts.size || BootstrapDialog.SIZE_NORMAL,
|
||||||
cssClass: opts.css_class || null,
|
cssClass: opts.css_class || null,
|
||||||
centered: opts.centered || true,
|
centered: opts.centered || true,
|
||||||
closable: opts.closable || false,
|
closable: opts.closable || false,
|
||||||
draggable: opts.draggable || false,
|
draggable: opts.draggable || false,
|
||||||
onshown: function (dialog) {
|
onshown: function (dialog) {
|
||||||
if (closed)
|
if (closed) dialog.close();
|
||||||
dialog.close();
|
|
||||||
opened = true;
|
opened = true;
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
'modal': dialog,
|
modal: dialog,
|
||||||
'close': function() {
|
close: function () {
|
||||||
if (opened)
|
if (opened) dialog.close();
|
||||||
dialog.close();
|
|
||||||
closed = true;
|
closed = true;
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
$( document ).ready(function () {
|
$(document).ready(function () {
|
||||||
// Manage .myconfirm-link
|
// Manage .myconfirm-link
|
||||||
$('.myconfirm-link').click(function(event) {
|
$(".myconfirm-link").click(function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
myconfirm({
|
myconfirm({
|
||||||
title: $(this).data("myconfirm-title") || _("Confirmation"),
|
title: $(this).data("myconfirm-title") || _("Confirmation"),
|
||||||
question: "<p><strong>"+($(this).data("myconfirm-question") || _("Are you sure?"))+"</strong></p>",
|
question:
|
||||||
onconfirm: function(data) {
|
"<p><strong>" +
|
||||||
|
($(this).data("myconfirm-question") || _("Are you sure?")) +
|
||||||
|
"</strong></p>",
|
||||||
|
onconfirm: function (data) {
|
||||||
window.location = data.confirm_url;
|
window.location = data.confirm_url;
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
confirm_url: $(this).data('myconfirm-url')
|
confirm_url: $(this).data("myconfirm-url"),
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Manage .myloading-link
|
// Manage .myloading-link
|
||||||
$('.myloading-link').click(function(event) {
|
$(".myloading-link").click(function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
myloadingalert({
|
myloadingalert({
|
||||||
title: $(this).data("myloading-title"),
|
title: $(this).data("myloading-title"),
|
||||||
message: $(this).data("myloading-message"),
|
message: $(this).data("myloading-message"),
|
||||||
});
|
});
|
||||||
window.location = $(this).data('myloading-url');
|
window.location = $(this).data("myloading-url");
|
||||||
});
|
});
|
||||||
|
|
||||||
// Manage .myconfirm-btn
|
// Manage .myconfirm-btn
|
||||||
$('.myconfirm-btn').click(function(event) {
|
$(".myconfirm-btn").click(function (event) {
|
||||||
if ($(this).data('myconfirm-btn-confirmed') == '1') {
|
if ($(this).data("myconfirm-btn-confirmed") == "1") {
|
||||||
$(this).data('myconfirm-btn-confirmed', '');
|
$(this).data("myconfirm-btn-confirmed", "");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
myconfirm({
|
myconfirm({
|
||||||
title: $(this).data("myconfirm-title") || _("Confirmation"),
|
title: $(this).data("myconfirm-title") || _("Confirmation"),
|
||||||
question: "<p><strong>"+($(this).data("myconfirm-question") || _("Are you sure?"))+"</strong></p>",
|
question:
|
||||||
onconfirm: function(data) {
|
"<p><strong>" +
|
||||||
data.btn.data('myconfirm-btn-confirmed', 1);
|
($(this).data("myconfirm-question") || _("Are you sure?")) +
|
||||||
|
"</strong></p>",
|
||||||
|
onconfirm: function (data) {
|
||||||
|
data.btn.data("myconfirm-btn-confirmed", 1);
|
||||||
data.btn.click();
|
data.btn.click();
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
btn: $(this)
|
btn: $(this),
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Manage .myloading-btn
|
// Manage .myloading-btn
|
||||||
$('.myloading-btn').click(function(event) {
|
$(".myloading-btn").click(function (event) {
|
||||||
myloadingalert({
|
myloadingalert({
|
||||||
title: $(this).data("myloading-title"),
|
title: $(this).data("myloading-title"),
|
||||||
message: $(this).data("myloading-message"),
|
message: $(this).data("myloading-message"),
|
||||||
|
|
|
@ -1,23 +1,25 @@
|
||||||
/*
|
/*
|
||||||
* I18n
|
* I18n
|
||||||
*/
|
*/
|
||||||
var translations;
|
var translations;
|
||||||
var translations_data;
|
var translations_data;
|
||||||
|
|
||||||
function _(string) {
|
function _(string) {
|
||||||
var translated = (translations?translations.gettext(string):string);
|
var translated = translations ? translations.gettext(string) : string;
|
||||||
return (translated !== '') ? translated : string;
|
return translated !== "" ? translated : string;
|
||||||
}
|
}
|
||||||
|
|
||||||
function ngettext(singular, plural, n) {
|
function ngettext(singular, plural, n) {
|
||||||
return (
|
return translations
|
||||||
translations?
|
? translations.ngettext(singular, plural, n)
|
||||||
translations.ngettext(singular, plural, n):
|
: n > 1
|
||||||
(n > 1?plural:singular)
|
? plural
|
||||||
);
|
: singular;
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready( function() {
|
$(document).ready(function () {
|
||||||
// Load Gettext translations
|
// Load Gettext translations
|
||||||
translations = babel.Translations.load(translations_data?translations_data:{}).install();
|
translations = babel.Translations.load(
|
||||||
|
translations_data ? translations_data : {}
|
||||||
|
).install();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue