Compare commits
No commits in common. "0219714d4a169571e3b24b1c103d6e4830063a0b" and "129eff19867b20b58e788a036fc479ee4e21f492" have entirely different histories.
0219714d4a
...
129eff1986
80 changed files with 12078 additions and 15354 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -11,4 +11,3 @@
|
|||
/.vim*
|
||||
/.less*
|
||||
/.ssh
|
||||
/.phplint-cache
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
path: ./
|
||||
jobs: 10
|
||||
extensions:
|
||||
- php
|
||||
exclude:
|
||||
- vendor
|
||||
warning: true
|
|
@ -4,10 +4,6 @@
|
|||
"pear/console_table": "^1.3",
|
||||
"brenard/php-unidecode": "dev-master",
|
||||
"smarty-gettext/smarty-gettext": "^1.6",
|
||||
"smarty-gettext/tsmarty2c": "^0.2.1",
|
||||
"sepia/po-parser": "^6.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"overtrue/phplint": "^3.0"
|
||||
"smarty-gettext/tsmarty2c": "^0.2.1"
|
||||
}
|
||||
}
|
||||
|
|
566
composer.lock
generated
566
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "996b970dc0d35f8d9dc7a0dbcbb1c55b",
|
||||
"content-hash": "a04f1f6d9c33a934cf0fe14d26de9ae7",
|
||||
"packages": [
|
||||
{
|
||||
"name": "brenard/php-unidecode",
|
||||
|
@ -79,10 +79,6 @@
|
|||
"pdo",
|
||||
"query"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/envms/fluentpdo/issues",
|
||||
"source": "https://github.com/envms/fluentpdo/tree/legacy"
|
||||
},
|
||||
"time": "2018-04-27T19:01:30+00:00"
|
||||
},
|
||||
{
|
||||
|
@ -186,28 +182,24 @@
|
|||
"keywords": [
|
||||
"console"
|
||||
],
|
||||
"support": {
|
||||
"issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Console_Table",
|
||||
"source": "https://github.com/pear/Console_Table"
|
||||
},
|
||||
"time": "2018-01-25T20:47:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/container",
|
||||
"version": "1.1.2",
|
||||
"version": "1.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/container.git",
|
||||
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
|
||||
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
|
||||
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
|
||||
"url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
|
||||
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.4.0"
|
||||
"php": ">=7.2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
|
@ -236,63 +228,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/php-fig/container/issues",
|
||||
"source": "https://github.com/php-fig/container/tree/1.1.2"
|
||||
"source": "https://github.com/php-fig/container/tree/1.1.1"
|
||||
},
|
||||
"time": "2021-11-05T16:50:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sepia/po-parser",
|
||||
"version": "6.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/raulferras/PHP-po-parser.git",
|
||||
"reference": "f60a4a6259b08cc04807c4ad5f59ec5a006bb87b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/raulferras/PHP-po-parser/zipball/f60a4a6259b08cc04807c4ad5f59ec5a006bb87b",
|
||||
"reference": "f60a4a6259b08cc04807c4ad5f59ec5a006bb87b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3",
|
||||
"symfony/polyfill-mbstring": "^1"
|
||||
},
|
||||
"require-dev": {
|
||||
"fzaninotto/faker": "^1.7",
|
||||
"phpunit/phpunit": "^4.8.36",
|
||||
"squizlabs/php_codesniffer": "^2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Sepia\\PoParser\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Raúl Ferràs",
|
||||
"email": "raul.ferras@gmail.com",
|
||||
"role": "developer"
|
||||
}
|
||||
],
|
||||
"description": "Gettext *.PO file parser for PHP.",
|
||||
"homepage": "https://github.com/raulferras/PHP-po-parser",
|
||||
"keywords": [
|
||||
"gettext",
|
||||
"i10n",
|
||||
"i18n",
|
||||
"po"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/raulferras/PHP-po-parser/issues",
|
||||
"source": "https://github.com/raulferras/PHP-po-parser/tree/6.0.1"
|
||||
},
|
||||
"time": "2020-05-29T05:20:47+00:00"
|
||||
"time": "2021-03-05T17:36:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "smarty-gettext/smarty-gettext",
|
||||
|
@ -355,16 +293,16 @@
|
|||
},
|
||||
{
|
||||
"name": "smarty-gettext/tsmarty2c",
|
||||
"version": "0.2.2",
|
||||
"version": "0.2.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/smarty-gettext/tsmarty2c.git",
|
||||
"reference": "fb899c70757f868cc3ee47824b04332b1ed02ea8"
|
||||
"reference": "84b342e6fb7b4b5b3e92e732635f3b0bbc217649"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/smarty-gettext/tsmarty2c/zipball/fb899c70757f868cc3ee47824b04332b1ed02ea8",
|
||||
"reference": "fb899c70757f868cc3ee47824b04332b1ed02ea8",
|
||||
"url": "https://api.github.com/repos/smarty-gettext/tsmarty2c/zipball/84b342e6fb7b4b5b3e92e732635f3b0bbc217649",
|
||||
"reference": "84b342e6fb7b4b5b3e92e732635f3b0bbc217649",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -402,9 +340,9 @@
|
|||
"homepage": "https://github.com/smarty-gettext/tsmarty2c",
|
||||
"support": {
|
||||
"issues": "https://github.com/smarty-gettext/tsmarty2c/issues",
|
||||
"source": "https://github.com/smarty-gettext/tsmarty2c/tree/0.2.2"
|
||||
"source": "https://github.com/smarty-gettext/tsmarty2c/tree/0.2.1"
|
||||
},
|
||||
"time": "2021-12-24T11:57:46+00:00"
|
||||
"time": "2020-11-11T21:40:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "smarty/smarty",
|
||||
|
@ -470,26 +408,26 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v5.4.7",
|
||||
"version": "v5.3.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "900275254f0a1a2afff1ab0e11abd5587a10e1d6"
|
||||
"reference": "ebd610dacd40d75b6a12bf64b5ccd494fc7d6ab1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/900275254f0a1a2afff1ab0e11abd5587a10e1d6",
|
||||
"reference": "900275254f0a1a2afff1ab0e11abd5587a10e1d6",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/ebd610dacd40d75b6a12bf64b5ccd494fc7d6ab1",
|
||||
"reference": "ebd610dacd40d75b6a12bf64b5ccd494fc7d6ab1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.5",
|
||||
"symfony/deprecation-contracts": "^2.1|^3",
|
||||
"symfony/deprecation-contracts": "^2.1",
|
||||
"symfony/polyfill-mbstring": "~1.0",
|
||||
"symfony/polyfill-php73": "^1.9",
|
||||
"symfony/polyfill-php73": "^1.8",
|
||||
"symfony/polyfill-php80": "^1.16",
|
||||
"symfony/service-contracts": "^1.1|^2|^3",
|
||||
"symfony/string": "^5.1|^6.0"
|
||||
"symfony/service-contracts": "^1.1|^2",
|
||||
"symfony/string": "^5.1"
|
||||
},
|
||||
"conflict": {
|
||||
"psr/log": ">=3",
|
||||
|
@ -504,12 +442,12 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"psr/log": "^1|^2",
|
||||
"symfony/config": "^4.4|^5.0|^6.0",
|
||||
"symfony/dependency-injection": "^4.4|^5.0|^6.0",
|
||||
"symfony/event-dispatcher": "^4.4|^5.0|^6.0",
|
||||
"symfony/lock": "^4.4|^5.0|^6.0",
|
||||
"symfony/process": "^4.4|^5.0|^6.0",
|
||||
"symfony/var-dumper": "^4.4|^5.0|^6.0"
|
||||
"symfony/config": "^4.4|^5.0",
|
||||
"symfony/dependency-injection": "^4.4|^5.0",
|
||||
"symfony/event-dispatcher": "^4.4|^5.0",
|
||||
"symfony/lock": "^4.4|^5.0",
|
||||
"symfony/process": "^4.4|^5.0",
|
||||
"symfony/var-dumper": "^4.4|^5.0"
|
||||
},
|
||||
"suggest": {
|
||||
"psr/log": "For using the console logger",
|
||||
|
@ -549,7 +487,7 @@
|
|||
"terminal"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/console/tree/v5.4.7"
|
||||
"source": "https://github.com/symfony/console/tree/v5.3.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -565,20 +503,20 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-03-31T17:09:19+00:00"
|
||||
"time": "2021-07-26T16:33:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/deprecation-contracts",
|
||||
"version": "v2.5.1",
|
||||
"version": "v2.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||
"reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66"
|
||||
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
|
||||
"reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
|
||||
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627",
|
||||
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -587,7 +525,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "2.5-dev"
|
||||
"dev-main": "2.4-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/contracts",
|
||||
|
@ -616,7 +554,7 @@
|
|||
"description": "A generic function and convention to trigger deprecation notices",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.1"
|
||||
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -632,25 +570,24 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-01-02T09:53:40+00:00"
|
||||
"time": "2021-03-23T23:28:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/finder",
|
||||
"version": "v5.4.3",
|
||||
"version": "v5.3.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/finder.git",
|
||||
"reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d"
|
||||
"reference": "17f50e06018baec41551a71a15731287dbaab186"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/finder/zipball/231313534dded84c7ecaa79d14bc5da4ccb69b7d",
|
||||
"reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d",
|
||||
"url": "https://api.github.com/repos/symfony/finder/zipball/17f50e06018baec41551a71a15731287dbaab186",
|
||||
"reference": "17f50e06018baec41551a71a15731287dbaab186",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.5",
|
||||
"symfony/deprecation-contracts": "^2.1|^3",
|
||||
"symfony/polyfill-php80": "^1.16"
|
||||
},
|
||||
"type": "library",
|
||||
|
@ -679,7 +616,7 @@
|
|||
"description": "Finds files and directories via an intuitive fluent interface",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/finder/tree/v5.4.3"
|
||||
"source": "https://github.com/symfony/finder/tree/v5.3.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -695,28 +632,25 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-01-26T16:34:36+00:00"
|
||||
"time": "2021-07-23T15:54:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.25.0",
|
||||
"version": "v1.23.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||
"reference": "30885182c981ab175d4d034db0f6f469898070ab"
|
||||
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab",
|
||||
"reference": "30885182c981ab175d4d034db0f6f469898070ab",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce",
|
||||
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"provide": {
|
||||
"ext-ctype": "*"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-ctype": "For best performance"
|
||||
},
|
||||
|
@ -731,12 +665,12 @@
|
|||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Ctype\\": ""
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
|
@ -761,7 +695,7 @@
|
|||
"portable"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0"
|
||||
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -777,20 +711,20 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-10-20T20:35:02+00:00"
|
||||
"time": "2021-02-19T12:13:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-grapheme",
|
||||
"version": "v1.25.0",
|
||||
"version": "v1.23.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-grapheme.git",
|
||||
"reference": "81b86b50cf841a64252b439e738e97f4a34e2783"
|
||||
"reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783",
|
||||
"reference": "81b86b50cf841a64252b439e738e97f4a34e2783",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/24b72c6baa32c746a4d0840147c9715e42bb68ab",
|
||||
"reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -810,12 +744,12 @@
|
|||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Intl\\Grapheme\\": ""
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
|
@ -842,7 +776,7 @@
|
|||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.25.0"
|
||||
"source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -858,11 +792,11 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-11-23T21:10:46+00:00"
|
||||
"time": "2021-05-27T09:17:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-normalizer",
|
||||
"version": "v1.25.0",
|
||||
"version": "v1.23.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
|
||||
|
@ -891,12 +825,12 @@
|
|||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Intl\\Normalizer\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"classmap": [
|
||||
"Resources/stubs"
|
||||
]
|
||||
|
@ -926,7 +860,7 @@
|
|||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0"
|
||||
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -946,24 +880,21 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.25.0",
|
||||
"version": "v1.23.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825"
|
||||
"reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825",
|
||||
"reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2df51500adbaebdc4c38dea4c89a2e131c45c8a1",
|
||||
"reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"provide": {
|
||||
"ext-mbstring": "*"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mbstring": "For best performance"
|
||||
},
|
||||
|
@ -978,12 +909,12 @@
|
|||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Mbstring\\": ""
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
|
@ -1009,7 +940,7 @@
|
|||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0"
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -1025,20 +956,20 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-11-30T18:21:41+00:00"
|
||||
"time": "2021-05-27T09:27:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php73",
|
||||
"version": "v1.25.0",
|
||||
"version": "v1.23.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php73.git",
|
||||
"reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5"
|
||||
"reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5",
|
||||
"reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010",
|
||||
"reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1055,12 +986,12 @@
|
|||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Php73\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"classmap": [
|
||||
"Resources/stubs"
|
||||
]
|
||||
|
@ -1088,7 +1019,7 @@
|
|||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-php73/tree/v1.25.0"
|
||||
"source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -1104,20 +1035,20 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-06-05T21:20:04+00:00"
|
||||
"time": "2021-02-19T12:13:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php80",
|
||||
"version": "v1.25.0",
|
||||
"version": "v1.23.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php80.git",
|
||||
"reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c"
|
||||
"reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c",
|
||||
"reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/eca0bf41ed421bed1b57c4958bab16aa86b757d0",
|
||||
"reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1134,12 +1065,12 @@
|
|||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Php80\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"classmap": [
|
||||
"Resources/stubs"
|
||||
]
|
||||
|
@ -1171,7 +1102,7 @@
|
|||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0"
|
||||
"source": "https://github.com/symfony/polyfill-php80/tree/v1.23.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -1187,29 +1118,25 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-03-04T08:16:47+00:00"
|
||||
"time": "2021-02-19T12:13:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/service-contracts",
|
||||
"version": "v2.5.1",
|
||||
"version": "v2.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/service-contracts.git",
|
||||
"reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c"
|
||||
"reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/24d9dc654b83e91aa59f9d167b131bc3b5bea24c",
|
||||
"reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c",
|
||||
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb",
|
||||
"reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.5",
|
||||
"psr/container": "^1.1",
|
||||
"symfony/deprecation-contracts": "^2.1|^3"
|
||||
},
|
||||
"conflict": {
|
||||
"ext-psr": "<1.1|>=2"
|
||||
"psr/container": "^1.1"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/service-implementation": ""
|
||||
|
@ -1217,7 +1144,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "2.5-dev"
|
||||
"dev-main": "2.4-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/contracts",
|
||||
|
@ -1254,7 +1181,7 @@
|
|||
"standards"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/service-contracts/tree/v2.5.1"
|
||||
"source": "https://github.com/symfony/service-contracts/tree/v2.4.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -1270,20 +1197,20 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-03-13T20:07:29+00:00"
|
||||
"time": "2021-04-01T10:43:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/string",
|
||||
"version": "v5.4.3",
|
||||
"version": "v5.3.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/string.git",
|
||||
"reference": "92043b7d8383e48104e411bc9434b260dbeb5a10"
|
||||
"reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/string/zipball/92043b7d8383e48104e411bc9434b260dbeb5a10",
|
||||
"reference": "92043b7d8383e48104e411bc9434b260dbeb5a10",
|
||||
"url": "https://api.github.com/repos/symfony/string/zipball/bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1",
|
||||
"reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1294,23 +1221,20 @@
|
|||
"symfony/polyfill-mbstring": "~1.0",
|
||||
"symfony/polyfill-php80": "~1.15"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/translation-contracts": ">=3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/error-handler": "^4.4|^5.0|^6.0",
|
||||
"symfony/http-client": "^4.4|^5.0|^6.0",
|
||||
"symfony/error-handler": "^4.4|^5.0",
|
||||
"symfony/http-client": "^4.4|^5.0",
|
||||
"symfony/translation-contracts": "^1.1|^2",
|
||||
"symfony/var-exporter": "^4.4|^5.0|^6.0"
|
||||
"symfony/var-exporter": "^4.4|^5.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"Resources/functions.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\String\\": ""
|
||||
},
|
||||
"files": [
|
||||
"Resources/functions.php"
|
||||
],
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
|
@ -1340,7 +1264,7 @@
|
|||
"utf8"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/string/tree/v5.4.3"
|
||||
"source": "https://github.com/symfony/string/tree/v5.3.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -1356,264 +1280,10 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-01-02T09:53:40+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "n98/junit-xml",
|
||||
"version": "1.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/cmuench/junit-xml.git",
|
||||
"reference": "0017dd92ac8cb619f02e32f4cffd768cfe327c73"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/cmuench/junit-xml/zipball/0017dd92ac8cb619f02e32f4cffd768cfe327c73",
|
||||
"reference": "0017dd92ac8cb619f02e32f4cffd768cfe327c73",
|
||||
"shasum": ""
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.5.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"N98\\JUnitXml\\": "src/N98/JUnitXml"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Christian Münch",
|
||||
"email": "c.muench@netz98.de"
|
||||
}
|
||||
],
|
||||
"description": "JUnit XML Document generation library",
|
||||
"support": {
|
||||
"issues": "https://github.com/cmuench/junit-xml/issues",
|
||||
"source": "https://github.com/cmuench/junit-xml/tree/1.1.0"
|
||||
},
|
||||
"time": "2020-12-25T09:08:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "overtrue/phplint",
|
||||
"version": "3.0.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/overtrue/phplint.git",
|
||||
"reference": "b4212c2c65bf50f6c823ab8e7c13c9ead9433241"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/overtrue/phplint/zipball/b4212c2c65bf50f6c823ab8e7c13c9ead9433241",
|
||||
"reference": "b4212c2c65bf50f6c823ab8e7c13c9ead9433241",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"n98/junit-xml": "1.1.0",
|
||||
"php": ">=5.5.9",
|
||||
"symfony/console": "^3.2|^4.0|^5.0",
|
||||
"symfony/finder": "^3.0|^4.0|^5.0",
|
||||
"symfony/process": "^3.3|^4.0|^5.0",
|
||||
"symfony/yaml": "^3.0|^4.0|^5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"brainmaestro/composer-git-hooks": "^2.7",
|
||||
"friendsofphp/php-cs-fixer": "^2.16",
|
||||
"jakub-onderka/php-console-highlighter": "^0.3.2 || ^0.4"
|
||||
},
|
||||
"bin": [
|
||||
"bin/phplint"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"hooks": {
|
||||
"pre-commit": [
|
||||
"composer fix-style"
|
||||
],
|
||||
"pre-push": [
|
||||
"composer check-style"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Overtrue\\PHPLint\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "overtrue",
|
||||
"email": "anzhengchao@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "`phplint` is a tool that can speed up linting of php files by running several lint processes at once.",
|
||||
"keywords": [
|
||||
"check",
|
||||
"lint",
|
||||
"phplint",
|
||||
"syntax"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/overtrue/phplint/issues",
|
||||
"source": "https://github.com/overtrue/phplint/tree/3.0.6"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/overtrue",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-11-30T15:45:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v5.4.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/process.git",
|
||||
"reference": "38a44b2517b470a436e1c944bf9b9ba3961137fb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/38a44b2517b470a436e1c944bf9b9ba3961137fb",
|
||||
"reference": "38a44b2517b470a436e1c944bf9b9ba3961137fb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.5",
|
||||
"symfony/polyfill-php80": "^1.16"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Process\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Executes commands in sub-processes",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/process/tree/v5.4.7"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-03-18T16:18:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v5.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/yaml.git",
|
||||
"reference": "e80f87d2c9495966768310fc531b487ce64237a2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/e80f87d2c9495966768310fc531b487ce64237a2",
|
||||
"reference": "e80f87d2c9495966768310fc531b487ce64237a2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.5",
|
||||
"symfony/deprecation-contracts": "^2.1|^3",
|
||||
"symfony/polyfill-ctype": "^1.8"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/console": "<5.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/console": "^5.3|^6.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/console": "For validating YAML files using the lint command"
|
||||
},
|
||||
"bin": [
|
||||
"Resources/bin/yaml-lint"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Yaml\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Loads and dumps YAML files",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/yaml/tree/v5.4.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-01-26T16:32:32+00:00"
|
||||
"time": "2021-06-27T11:44:38+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": {
|
||||
|
@ -1623,5 +1293,5 @@
|
|||
"prefer-lowest": false,
|
||||
"platform": [],
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "2.3.0"
|
||||
"plugin-api-version": "2.0.0"
|
||||
}
|
||||
|
|
|
@ -2,23 +2,25 @@
|
|||
|
||||
## Dependencies :
|
||||
|
||||
Some Debian packages have to be installed :
|
||||
This Debian packages have to be installed :
|
||||
|
||||
```bash
|
||||
apt install git composer php-cli php-mail php-mail-mine php-net-smtp php-auth-sasl php-json php-mbstring php-intl smarty3
|
||||
# for PostgreSQL DB backend
|
||||
apt install php-pgsql
|
||||
# for MySQL/MariaDB DB backend
|
||||
apt install php-mysql
|
||||
# for sqlite DB backend
|
||||
apt install sqlite3 php-sqlite3
|
||||
```
|
||||
- git *(only for deployment only)*
|
||||
- composer (and unzip or zip)
|
||||
- php-cli
|
||||
- php-mail
|
||||
- php-mail-mine
|
||||
- php-net-smtp
|
||||
- php-auth-sasl
|
||||
- php-json
|
||||
- php-mbstring
|
||||
- php-pgsql *(for PostgreSQL DB backend)*
|
||||
- php-sqlite3 *(for sqlite DB backend, sqlite3 tool (provided by the same name package) is also used to create the DB file)*
|
||||
- smarty3
|
||||
|
||||
## Deployment :
|
||||
|
||||
To deploy this application, for instance in */var/www/eesyphp*, run this commands :
|
||||
|
||||
```bash
|
||||
cd /var/www
|
||||
adduser --home /var/www/eesyphp --no-create-home --disabled-password --gid 33 eesyphp
|
||||
git clone https://gogs.example.org/example/eesyphp.git /var/www/eesyphp
|
||||
|
@ -26,14 +28,11 @@ chown eesyphp: /var/www/eesyphp
|
|||
ln -s /var/www/eesyphp/bin/items.wrapper /usr/local/bin/eesyphp
|
||||
ln -s /var/www/eesyphp/docs/eesyphp.cron /etc/cron.d/eesyphp
|
||||
ln -s /var/www/eesyphp/docs/eesyphplogrotate /etc/logrotate.d/eesyphp
|
||||
```
|
||||
|
||||
## Install PHP dependencies :
|
||||
|
||||
```bash
|
||||
su - eesyphp
|
||||
composer install
|
||||
```
|
||||
|
||||
## Initialize database :
|
||||
|
||||
|
@ -41,33 +40,28 @@ composer install
|
|||
|
||||
To initialize SQLite database, run this commands :
|
||||
|
||||
```bash
|
||||
cd /var/www/eesyphp/data
|
||||
sqlite3 db.sqlite3 < sqlite.init-db.sql
|
||||
```
|
||||
|
||||
### PostgreSQL
|
||||
|
||||
To initialize PostgreSQL database, run this commands :
|
||||
|
||||
```bash
|
||||
su - postgres
|
||||
createuser -P items
|
||||
createdb -O items items
|
||||
psql items < /var/www/eesyphp/data/pgsql.init-db.sql
|
||||
```
|
||||
|
||||
### MariaDB / MySQL
|
||||
|
||||
To initialize MariaDB / MySQL database, run this commands :
|
||||
|
||||
```bash
|
||||
sudo mysql << EOF
|
||||
CREATE DATABASE items;
|
||||
GRANT ALL ON items.* TO items@localhost IDENTIFIED BY 'items';
|
||||
EOF
|
||||
sudo mysql items < /var/www/eesyphp/data/mariadb-mysql.init-db.sql
|
||||
```
|
||||
|
||||
|
||||
## Configure PHP FPM pool :
|
||||
|
||||
|
@ -79,7 +73,7 @@ You could configure a dedicated *PHP FPM pool*.
|
|||
[eesyphp]
|
||||
user = eesyphp
|
||||
group = www-data
|
||||
listen = /run/php/php7.3-fpm-eesyphp.sock
|
||||
listen = /run/php7.0-fpm_eesyphp.sock
|
||||
listen.owner = www-data
|
||||
listen.group = www-data
|
||||
pm = dynamic
|
||||
|
@ -123,7 +117,7 @@ You could configure a dedicated *VirtualHost*.
|
|||
SSLCertificateKeyFile /etc/letsencrypt/live/eesyphp.example.org/privkey.pem
|
||||
|
||||
<FilesMatch \.php$>
|
||||
SetHandler "proxy:unix:/run/php/php7.3-fpm-eesyphp.sock|fcgi:///"
|
||||
SetHandler "proxy:unix:/run/php7.0-fpm_eesyphp.sock|fcgi:///"
|
||||
</FilesMatch>
|
||||
|
||||
<Directory /var/www/eesyphp/public_html>
|
||||
|
|
266
includes/cli.php
266
includes/cli.php
|
@ -1,16 +1,15 @@
|
|||
<?php
|
||||
|
||||
$cli_commands=array();
|
||||
function add_cli_command($command, $handler, $short_desc, $usage_args=false, $long_desc=false,
|
||||
$override=false) {
|
||||
function add_cli_command($command, $handler, $short_desc, $usage_args=false, $long_desc=false, $override=false) {
|
||||
global $cli_commands;
|
||||
if (array_key_exists($command, $cli_commands) && !$override) {
|
||||
logging('ERROR', _("The CLI command '%s' already exists.", $command));
|
||||
logging('ERROR', sprintf(_("The CLI command '%s' already exists.", $command)));
|
||||
return False;
|
||||
}
|
||||
|
||||
if (!is_callable($handler)) {
|
||||
logging('ERROR', _("The CLI command '%s' handler is not callable !"), $command);
|
||||
logging('ERROR', sprintf(_("The CLI command '%s' handler is not callable !"), $command));
|
||||
return False;
|
||||
}
|
||||
|
||||
|
@ -24,9 +23,9 @@ function add_cli_command($command, $handler, $short_desc, $usage_args=false, $lo
|
|||
}
|
||||
|
||||
/*
|
||||
*************************************************************************************************
|
||||
**************************************************************************************************************
|
||||
* /!\ Code after this message will only be execute on CLI context /!\
|
||||
*************************************************************************************************
|
||||
**************************************************************************************************************
|
||||
*/
|
||||
if (php_sapi_name() != "cli")
|
||||
return true;
|
||||
|
@ -41,14 +40,6 @@ $cli_command = null;
|
|||
function usage($error=false) {
|
||||
global $cli_commands, $cli_command, $argv;
|
||||
|
||||
// If more than 1 arguments passed, format error message using sprintf
|
||||
if (func_num_args() > 1) {
|
||||
$error = call_user_func_array(
|
||||
'sprintf',
|
||||
array_merge(array($error), array_slice(func_get_args(), 1))
|
||||
);
|
||||
}
|
||||
|
||||
if ($error)
|
||||
echo "$error\n\n";
|
||||
printf(_("Usage: %s [-h] [-qd] command\n"), basename($argv[0]));
|
||||
|
@ -62,15 +53,8 @@ function usage($error=false) {
|
|||
foreach ($cli_commands as $command => $info) {
|
||||
if ($cli_command && $command != $cli_command)
|
||||
continue;
|
||||
echo (
|
||||
" ".str_replace(
|
||||
"\n", "\n ",
|
||||
wordwrap("$command : "._($info['short_desc'])))
|
||||
."\n\n");
|
||||
echo (
|
||||
" ".basename($argv[0])." $command ".
|
||||
($info['usage_args']?_($info['usage_args']):'').
|
||||
"\n");
|
||||
echo " ".str_replace("\n", "\n ", wordwrap("$command : "._($info['short_desc'])))."\n\n";
|
||||
echo " ".basename($argv[0])." $command ".($info['usage_args']?_($info['usage_args']):'')."\n";
|
||||
if ($info['long_desc']) {
|
||||
if (is_array($info['long_desc'])) {
|
||||
$lines = array();
|
||||
|
@ -123,10 +107,7 @@ function handle_cli_args() {
|
|||
$command_args[] = $argv[$i];
|
||||
else
|
||||
usage(
|
||||
_(
|
||||
"Invalid parameter \"%s\".\nNote: Command's parameter/argument must be place ".
|
||||
"after the command."
|
||||
), $argv[$i]
|
||||
sprintf(_("Invalid parameter \"%s\".\nNote: Command's parameter/argument must be place after the command."), $argv[$i])
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -135,10 +116,7 @@ function handle_cli_args() {
|
|||
if (!$cli_command)
|
||||
usage();
|
||||
|
||||
logging(
|
||||
'DEBUG', "Run %s command %s with argument(s) '%s'.",
|
||||
basename($argv[0]), $cli_command, implode("', '", $command_args)
|
||||
);
|
||||
logging('DEBUG', 'Run '.basename($argv[0])." command $cli_command with argument(s) '".implode("', '", $command_args)."'");
|
||||
|
||||
try {
|
||||
$result = call_user_func($cli_commands[$cli_command]['handler'], $command_args);
|
||||
|
@ -146,7 +124,7 @@ function handle_cli_args() {
|
|||
exit($result?0:1);
|
||||
}
|
||||
catch(Exception $e) {
|
||||
log_exception($e, _("An exception occured running command %s"), $cli_command);
|
||||
log_exception(sprintf(_("An exception occured running command %s"), $cli_command));
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
@ -156,10 +134,7 @@ function print_item_info($item) {
|
|||
printf("\t"._("ID: %s")."\n", $item['id']);
|
||||
printf("\t"._("Name: '%s'")."\n", $item['name']);
|
||||
printf("\t"._("Date: %s")."\n", format_time($item['date']));
|
||||
printf(
|
||||
"\t"._("Description: %s")."\n",
|
||||
($item['description']?"'".$item['description']."'":_("Not set"))
|
||||
);
|
||||
printf("\t"._("Description: %s")."\n", ($item['description']?"'".$item['description']."'":_("Not set")));
|
||||
printf("\t"._("Status: %s")."\n", $item['status']);
|
||||
return true;
|
||||
}
|
||||
|
@ -264,7 +239,7 @@ function cli_show($command_args) {
|
|||
$item = get_item($item_id);
|
||||
|
||||
if (!$item)
|
||||
logging('FATAL', _("Item #%s not found."), $item_id);
|
||||
logging('FATAL', sprintf(_("Item #%s not found."), $item_id));
|
||||
|
||||
print_item_info($item);
|
||||
return True;
|
||||
|
@ -288,7 +263,7 @@ function cli_delete($command_args) {
|
|||
$item_id = $command_args[0];
|
||||
$item = get_item($item_id);
|
||||
if (!$item)
|
||||
logging('FATAL', _("Item #%s not found."), $item_id);
|
||||
logging('FATAL', sprintf(_("Item #%s not found."), $item_id));
|
||||
|
||||
print_item_info($item);
|
||||
|
||||
|
@ -303,7 +278,7 @@ function cli_delete($command_args) {
|
|||
echo "\n";
|
||||
|
||||
if (!delete_item($item['id']))
|
||||
logging('FATAL', _("An error occured deleting item #%d."), $item_id);
|
||||
logging('FATAL', sprintf(_("An error occured deleting item #%d."), $item_id));
|
||||
|
||||
return True;
|
||||
}
|
||||
|
@ -331,10 +306,7 @@ function cli_restore($command_args) {
|
|||
$fd = fopen((count($command_args) >= 1?$command_args[0]:'php://stdin'), 'r');
|
||||
restore_items($fd);
|
||||
fclose($fd);
|
||||
logging('INFO', sprint(
|
||||
"Items restored from '%s'",
|
||||
(count($command_args) >= 1?$command_args[0]:'STDIN')
|
||||
));
|
||||
logging('INFO', "Items restored from '".(count($command_args) >= 1?$command_args[0]:'STDIN')."'.");
|
||||
}
|
||||
add_cli_command(
|
||||
'restore',
|
||||
|
@ -368,9 +340,7 @@ function cli_cron($command_args) {
|
|||
}
|
||||
|
||||
if (!is_int($item_max_age) || $item_max_age <= 0)
|
||||
logging(
|
||||
'FATAL',
|
||||
'Invalid $item_max_age value set in configuration: it\'s must be a positive integer.');
|
||||
logging('FATAL', 'Invalid $item_max_age value set in configuration: it\'s must be a positive integer.');
|
||||
logging('DEBUG', "cli_cron(): item max age = $item_max_age day(s)");
|
||||
|
||||
$limit = time() - ($item_max_age * 86400);
|
||||
|
@ -381,27 +351,19 @@ function cli_cron($command_args) {
|
|||
foreach($items['items'] as $item) {
|
||||
if ($item['date'] < $limit) {
|
||||
if ($just_try) {
|
||||
logging('DEBUG', 'Just-try mode: do not really delete item #%s (%s, creation date: %s)',
|
||||
$item['id'], $item['name'], format_time($item['date'])
|
||||
);
|
||||
logging('DEBUG', 'Just-try mode: do not really delete item #'.$item['id'].' ('.$item['name'].', creation date: '.format_time($item['date']).')');
|
||||
}
|
||||
else if (delete_item($item['id'])) {
|
||||
logging('INFO', 'Item #%s (%s) deleted (creation date: %s)',
|
||||
$item['id'], $item['name'], format_time($item['date'])
|
||||
);
|
||||
logging('INFO', 'item #'.$item['id'].' ('.$item['name'].') deleted (creation date: '.format_time($item['date']).')');
|
||||
remove_item_attachments($item['id']);
|
||||
}
|
||||
else {
|
||||
logging('ERROR', 'Fail to delete item "%s" (%s, creation date: %s)',
|
||||
$item['id'], $item['name'], format_time($item['date'])
|
||||
);
|
||||
logging('ERROR', 'Fail to delete item "'.$item['id'].'" ('.$item['name'].', creation date: '.format_time($item['date']).')');
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
logging('DEBUG', 'Item "%s" (%s) still valid (creation date: %s)',
|
||||
$item['id'], $item['name'], format_time($item['date'])
|
||||
);
|
||||
logging('DEBUG', 'item "'.$item['id'].'" ('.$item['name'].') still valid (creation date: '.format_time($item['date']).')');
|
||||
}
|
||||
}
|
||||
exit($error?1:0);
|
||||
|
@ -416,3 +378,191 @@ add_cli_command(
|
|||
___("-m/--max-age Item expiration limit (in days, optional)"),
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
function cli_extract_messages($command_args) {
|
||||
global $root_dir_path, $root_lang_dir, $smarty_templates_dir;
|
||||
|
||||
// List PHP files to parse
|
||||
$php_files = run_external_command(
|
||||
array('find', escapeshellarg($root_dir_path), '-name', "'*.php'"),
|
||||
null, // no STDIN data
|
||||
false // do not escape command args (already done)
|
||||
);
|
||||
if (!is_array($php_files) || $php_files[0] != 0) {
|
||||
logging('FATAL', _("Fail to list PHP files."));
|
||||
}
|
||||
|
||||
// Extract messages from PHP files using xgettext
|
||||
$result = run_external_command(
|
||||
array(
|
||||
"xgettext",
|
||||
"--from-code utf-8",
|
||||
"--language=PHP",
|
||||
"-o", "$root_lang_dir/php-messages.pot", // Output
|
||||
"--omit-header", // No POT header
|
||||
"--keyword=___", // Handle custom ___() translation function
|
||||
"--files=-" // Read files to parse from STDIN
|
||||
),
|
||||
$php_files[1] // Pass PHP files list via STDIN
|
||||
);
|
||||
if (!is_array($result) || $result[0] != 0)
|
||||
logging('FATAL', _("Fail to extract messages from PHP files using xgettext."));
|
||||
|
||||
// Extract messages from templates files using tsmarty2c.php
|
||||
$result = run_external_command(
|
||||
array (
|
||||
"$root_dir_path/vendor/bin/tsmarty2c.php",
|
||||
"-o", "$root_lang_dir/templates-messages.pot",
|
||||
$smarty_templates_dir,
|
||||
)
|
||||
);
|
||||
if (!is_array($result) || $result[0] != 0)
|
||||
logging('FATAL', _("Fail to extract messages from template files using tsmarty2c.php script."));
|
||||
|
||||
// Merge previous results in ldapsaisie.pot file using msgcat
|
||||
$result = run_external_command(array(
|
||||
'msgcat',
|
||||
"$root_lang_dir/php-messages.pot",
|
||||
"$root_lang_dir/templates-messages.pot",
|
||||
"-o", "$root_lang_dir/messages.pot",
|
||||
));
|
||||
if (!is_array($result) || $result[0] != 0)
|
||||
logging('FATAL', _("Fail to merge messages using msgcat."));
|
||||
}
|
||||
add_cli_command(
|
||||
'extract_messages',
|
||||
'cli_extract_messages',
|
||||
___("Extract messages that need to be translated"),
|
||||
null,
|
||||
___("This command could be used to generate/update lang/messages.pot file.")
|
||||
);
|
||||
|
||||
|
||||
function cli_update_messages($command_args) {
|
||||
global $root_dir_path, $root_lang_dir, $smarty_templates_dir;
|
||||
|
||||
$pot_file = "$root_lang_dir/messages.pot";
|
||||
if (!is_file($pot_file))
|
||||
logging(
|
||||
'FATAL', sprintf(
|
||||
_("POT file not found (%s). Please run extract_messages first."),
|
||||
$pot_file
|
||||
)
|
||||
);
|
||||
|
||||
if ($dh = opendir($root_lang_dir)) {
|
||||
$error = False;
|
||||
while (($file = readdir($dh)) !== false) {
|
||||
if (!is_dir($root_lang_dir . '/' . $file) || in_array($file, array('.', '..')) || is_link($root_lang_dir . '/' . $file))
|
||||
continue;
|
||||
|
||||
logging('DEBUG', sprintf(_("Lang directory '%s' found"), $file));
|
||||
|
||||
// Check LC_MESSAGES directory exists
|
||||
$lang = $file;
|
||||
$lang_dir = $root_lang_dir . '/' . $file . '/LC_MESSAGES' ;
|
||||
if (!is_dir($lang_dir)) {
|
||||
logging('DEBUG', sprintf(
|
||||
_("LC_MESSAGES directory not found in lang '%s' directory, ignore it."),
|
||||
$lang)
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Test .PO file is present
|
||||
$po_file = $lang_dir . '/' . TEXT_DOMAIN . '.po';
|
||||
if (!is_file($po_file)) {
|
||||
logging('DEBUG', sprintf(
|
||||
_("PO file not found in lang '%s' directory, ignore it."),
|
||||
$lang)
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Update messages in PO file from POT file using msgmerge
|
||||
$result = run_external_command(
|
||||
array("msgmerge", "-q", "-U", $po_file, $pot_file)
|
||||
);
|
||||
if (!is_array($result) || $result[0] != 0) {
|
||||
logging('ERROR', sprintf(
|
||||
_("Fail to update messages in %s PO file using msgmerge (%s)."),
|
||||
$lang, $po_file)
|
||||
);
|
||||
$error = True;
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
return !$error;
|
||||
}
|
||||
|
||||
logging('FATAL', sprintf(_("Fail to open root lang directory (%s)."), $root_dir_path));
|
||||
}
|
||||
add_cli_command(
|
||||
'update_messages',
|
||||
'cli_update_messages',
|
||||
___("Update messages in existing translation PO lang files"),
|
||||
null,
|
||||
___("This command could be used to update PO files in lang/*/LC_MESSAGES directories.")
|
||||
);
|
||||
|
||||
|
||||
function cli_compile_messages($command_args) {
|
||||
global $root_dir_path, $root_lang_dir, $smarty_templates_dir;
|
||||
|
||||
if ($dh = opendir($root_lang_dir)) {
|
||||
$error = False;
|
||||
while (($file = readdir($dh)) !== false) {
|
||||
if (!is_dir($root_lang_dir . '/' . $file) || in_array($file, array('.', '..')) || is_link($root_lang_dir . '/' . $file))
|
||||
continue;
|
||||
|
||||
logging('DEBUG', sprintf(_("Lang directory '%s' found"), $file));
|
||||
|
||||
// Check LC_MESSAGES directory exists
|
||||
$lang = $file;
|
||||
$lang_dir = $root_lang_dir . '/' . $file . '/LC_MESSAGES' ;
|
||||
if (!is_dir($lang_dir)) {
|
||||
logging('DEBUG', sprintf(
|
||||
_("LC_MESSAGES directory not found in lang '%s' directory, ignore it."),
|
||||
$lang)
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Test .PO file is present
|
||||
$po_file = $lang_dir . '/' . TEXT_DOMAIN . '.po';
|
||||
if (!is_file($po_file)) {
|
||||
logging('DEBUG', sprintf(
|
||||
_("PO file not found in lang '%s' directory, ignore it."),
|
||||
$lang)
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
$mo_file = preg_replace('/\.po$/', '.mo', $po_file);
|
||||
|
||||
// Compile messages from PO file to MO file using msgfmt
|
||||
$result = run_external_command(
|
||||
array("msgfmt", "-o", $mo_file, $po_file)
|
||||
);
|
||||
if (!is_array($result) || $result[0] != 0) {
|
||||
logging('ERROR', sprintf(
|
||||
_("Fail to compile messages from %s PO file as MO file using msgfmt (%s)."),
|
||||
$lang, $po_file)
|
||||
);
|
||||
$error = True;
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
return !$error;
|
||||
}
|
||||
|
||||
logging('FATAL', sprintf(_("Fail to open root lang directory (%s)."), $root_dir_path));
|
||||
}
|
||||
add_cli_command(
|
||||
'compile_messages',
|
||||
'cli_compile_messages',
|
||||
___("Compile messages from existing translation PO lang files to corresponding MO files"),
|
||||
null,
|
||||
___("This command could be used to compile PO files in lang/*/LC_MESSAGES directories to MO files.")
|
||||
);
|
||||
|
|
|
@ -49,7 +49,6 @@ $status_list = array (
|
|||
|
||||
require_once('hooks.php');
|
||||
require_once('cli.php');
|
||||
require_once('translation-cli.php');
|
||||
require_once('smarty.php');
|
||||
require_once('url.php');
|
||||
require_once('url-helpers.php');
|
||||
|
|
|
@ -285,13 +285,7 @@ function search_items($params) {
|
|||
if (!empty($where))
|
||||
$query -> where($where);
|
||||
foreach ($patterns_where as $patterns_word)
|
||||
call_user_func_array(
|
||||
array($query, 'where'),
|
||||
array_merge(
|
||||
array('('.implode(' OR ', array_keys($patterns_word)).')'),
|
||||
array_values($patterns_word)
|
||||
)
|
||||
);
|
||||
call_user_func_array(array($query, 'where'), array_merge(array('('.implode(' OR ', array_keys($patterns_word)).')'), array_values($patterns_word)));
|
||||
$result = $query -> orderBy($orderby)
|
||||
-> limit($limit)
|
||||
-> offset($offset)
|
||||
|
@ -321,13 +315,7 @@ function search_items($params) {
|
|||
if (!empty($where))
|
||||
$query_count -> where($where);
|
||||
foreach ($patterns_where as $patterns_word)
|
||||
call_user_func_array(
|
||||
array($query_count, 'where'),
|
||||
array_merge(
|
||||
array('('.implode(' OR ', array_keys($patterns_word)).')'),
|
||||
array_values($patterns_word)
|
||||
)
|
||||
);
|
||||
call_user_func_array(array($query_count, 'where'), array_merge(array('('.implode(' OR ', array_keys($patterns_word)).')'), array_values($patterns_word)));
|
||||
|
||||
$result_count = $query_count -> execute();
|
||||
|
||||
|
@ -339,9 +327,7 @@ function search_items($params) {
|
|||
return array(
|
||||
'count' => $count['count'],
|
||||
'first' => $offset+1,
|
||||
'last' => (
|
||||
$offset+$nb_by_page<$count['count']?
|
||||
$offset+$nb_by_page:$count['count']),
|
||||
'last' => ($offset+$nb_by_page<$count['count']?$offset+$nb_by_page:$count['count']),
|
||||
'nb_pages' => ceil($count['count']/$nb_by_page),
|
||||
'page' => $page,
|
||||
'items' => $items,
|
||||
|
@ -353,10 +339,7 @@ function search_items($params) {
|
|||
logging('ERROR', 'search_items() : search in DB return false');
|
||||
}
|
||||
catch (Exception $e) {
|
||||
log_exception(
|
||||
$e, "An exception occured searching items with params %s infos from database : ",
|
||||
preg_replace("/\n[ \t]*/", " ", print_r($params, true))
|
||||
);
|
||||
log_exception($e, "An exception occured searching items with params ".preg_replace("/\n[ \t]*/"," ",print_r($params,1))." infos from database : ");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -428,10 +411,7 @@ function restore_items($fd=null) {
|
|||
$values = array();
|
||||
for ($i=0; $i < count($first_row); $i++) {
|
||||
if (!$row[$i]) continue;
|
||||
$field = (
|
||||
array_key_exists($first_row[$i], $mapping)?
|
||||
$mapping[$first_row[$i]]:
|
||||
$first_row[$i]);
|
||||
$field = (array_key_exists($first_row[$i], $mapping)?$mapping[$first_row[$i]]:$first_row[$i]);
|
||||
$value = (in_array($field, $datetime_fields)?db_time2datetime($row[$i]):$row[$i]);
|
||||
$values[$field] = $value;
|
||||
}
|
||||
|
@ -448,9 +428,7 @@ function restore_items($fd=null) {
|
|||
}
|
||||
}
|
||||
catch (Exception $e) {
|
||||
logging(
|
||||
'ERROR',
|
||||
"Error restoring item from line #$line : ".$e->getMessage()."\n".print_r($values, true));
|
||||
logging('ERROR', "Error restoring item from line #$line : ".$e->getMessage()."\n".print_r($values, true));
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,8 +83,7 @@ function check_email($value, $domain=NULL, $checkDns=true) {
|
|||
/*
|
||||
* Handling item POST data
|
||||
*/
|
||||
function handle_item_post_data(&$info, $enabled_fields=null, $required_fields=null, &$item=null,
|
||||
&$changes=null) {
|
||||
function handle_item_post_data(&$info, $enabled_fields=null, $required_fields=null, &$item=null, &$changes=null) {
|
||||
$field_errors=array();
|
||||
if (isset($_POST['submit'])) {
|
||||
logging('DEBUG', 'POST data : '.vardump($_POST));
|
||||
|
@ -114,10 +113,7 @@ function handle_item_post_data(&$info, $enabled_fields=null, $required_fields=nu
|
|||
}
|
||||
|
||||
// description
|
||||
if (
|
||||
isset($_POST['description']) &&
|
||||
(!$enabled_fields || in_array('description', $enabled_fields))
|
||||
) {
|
||||
if (isset($_POST['description']) && (!$enabled_fields || in_array('description', $enabled_fields))) {
|
||||
if (check_is_empty(trim($_POST['description']))) {
|
||||
$info['description'] = null;
|
||||
}
|
||||
|
@ -261,15 +257,7 @@ function dump_file($file_path, $max_age=3600) {
|
|||
header("Last-Modified: ".gmdate("D, d M Y H:i:s", $last_modified_time)." GMT");
|
||||
header("Etag: $etag");
|
||||
|
||||
if (
|
||||
(
|
||||
isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) &&
|
||||
@strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $last_modified_time
|
||||
) || (
|
||||
isset($_SERVER['HTTP_IF_NONE_MATCH']) &&
|
||||
trim($_SERVER['HTTP_IF_NONE_MATCH']) == $etag
|
||||
)
|
||||
) {
|
||||
if ((isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && @strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $last_modified_time) || (isset($_SERVER['HTTP_IF_NONE_MATCH']) && trim($_SERVER['HTTP_IF_NONE_MATCH']) == $etag)) {
|
||||
header("HTTP/1.1 304 Not Modified");
|
||||
exit();
|
||||
}
|
||||
|
@ -312,14 +300,11 @@ function delete_directory($dir, $recursive=true) {
|
|||
/**
|
||||
* Run external command
|
||||
*
|
||||
* @param $command string|array The command. It's could be an array of the command with its
|
||||
* arguments.
|
||||
* @param $data_stdin string|null The command arguments (optional, default: null)
|
||||
* @param $escape_command_args boolean If true, the command will be escaped
|
||||
* (optional, default: true)
|
||||
* @param[in] $command string|array The command. It's could be an array of the command with its arguments.
|
||||
* @param[in] $data_stdin string|null The command arguments (optional, default: null)
|
||||
* @param[in] $escape_command_args boolean If true, the command will be escaped (optional, default: true)
|
||||
*
|
||||
* @return false|array An array of return code, stdout and stderr result or False in case of fatal
|
||||
* error
|
||||
* @retval false|array An array of return code, stdout and stderr result or False in case of fatal error
|
||||
**/
|
||||
function run_external_command($command, $data_stdin=null, $escape_command_args=true) {
|
||||
if (array($command))
|
||||
|
|
|
@ -5,12 +5,12 @@ $hooks = array();
|
|||
/**
|
||||
* Registered a hook on a specific event
|
||||
*
|
||||
* @param $event string The event name
|
||||
* @param $callable callable The callable to run on event
|
||||
* @param $param mixed Paremeter that will be pass to the callable
|
||||
* @param[in] $event string The event name
|
||||
* @param[in] $callable callable The callable to run on event
|
||||
* @param[in] $param mixed Paremeter that will be pass to the callable
|
||||
* Use an array if you have multiple parameters to pass
|
||||
*
|
||||
* @return void
|
||||
* @retval void
|
||||
*/
|
||||
function register_hook($event, $callable, $param=NULL) {
|
||||
global $hooks;
|
||||
|
@ -25,9 +25,9 @@ function register_hook($event, $callable, $param=NULL) {
|
|||
/**
|
||||
* Run triggered actions on specific event
|
||||
*
|
||||
* @param $event string Event name
|
||||
* @param[in] $event string Event name
|
||||
*
|
||||
* @return boolean True if all triggered actions succefully runned, false otherwise
|
||||
* @retval boolean True if all triggered actions succefully runned, false otherwise
|
||||
*/
|
||||
function trigger_hook($event_name, $event_data=null) {
|
||||
global $hooks;
|
||||
|
@ -44,16 +44,12 @@ function trigger_hook($event_name, $event_data=null) {
|
|||
call_user_func_array($e['callable'],array($event, &$e['param']));
|
||||
}
|
||||
catch(Exception $e) {
|
||||
logException(
|
||||
$e, "An exception occured running hook ".format_callable($e['callable']).
|
||||
" on event $event_name");
|
||||
logException($e, "An exception occured running hook ".format_callable($e['callable'])." on event $event_name");
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
logging(
|
||||
'ERROR',
|
||||
"The hook ".format_callable($e['callable'])." on event $event_name is not callable.");
|
||||
logging('ERROR', "The hook ".format_callable($e['callable'])." on event $event_name is not callable.");
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ $_log_levels=array(
|
|||
);
|
||||
|
||||
function logging($level, $message) {
|
||||
global $log_file, $_log_file_fd, $_log_levels, $log_level, $argv, $auth_user;
|
||||
global $log_file, $_log_file_fd, $_log_levels, $log_level, $argv;
|
||||
|
||||
if (!array_key_exists($level, $_log_levels)) $level = 'INFO';
|
||||
$level_id = $_log_levels[$level];
|
||||
|
@ -37,33 +37,14 @@ function logging($level, $message) {
|
|||
$_log_file_fd = fopen($log_file, 'a');
|
||||
}
|
||||
|
||||
// If more than 2 arguments passed, format message using sprintf
|
||||
if (func_num_args() > 2) {
|
||||
$message = call_user_func_array(
|
||||
'sprintf',
|
||||
array_merge(array($message), array_slice(func_get_args(), 2))
|
||||
);
|
||||
}
|
||||
|
||||
if (php_sapi_name() == "cli") {
|
||||
$msg = implode(' - ', array(
|
||||
date('Y/m/d H:i:s'),
|
||||
basename($argv[0]),
|
||||
$level,
|
||||
$message
|
||||
))."\n";
|
||||
$msg=date('Y/m/d H:i:s').' - '.basename($argv[0])." - $level - $message\n";
|
||||
}
|
||||
else {
|
||||
$msg = array(
|
||||
date('Y/m/d H:i:s'),
|
||||
$_SERVER['REQUEST_URI'],
|
||||
$_SERVER['REMOTE_ADDR'],
|
||||
);
|
||||
if (isset($auth_user))
|
||||
$msg[] = ($auth_user?$auth_user:'anonymous');
|
||||
$msg[] = $level;
|
||||
$msg[] = $message;
|
||||
$msg = implode(' - ', $msg)."\n";
|
||||
// With auth enabled
|
||||
// global $auth_user;
|
||||
// $msg=date('Y/m/d H:i:s').' - '.$_SERVER['REQUEST_URI'].' - '.$_SERVER['REMOTE_ADDR']." - $auth_user - $level - $message\n";
|
||||
$msg=date('Y/m/d H:i:s').' - '.$_SERVER['REQUEST_URI'].' - '.$_SERVER['REMOTE_ADDR']." - $level - $message\n";
|
||||
}
|
||||
|
||||
fwrite($_log_file_fd , $msg);
|
||||
|
@ -106,10 +87,7 @@ function get_debug_backtrace_context($ignore_last=0) {
|
|||
if (isset($traces[$i]['file']))
|
||||
$trace[] = $traces[$i]['file'].(isset($traces[$i]['line'])?":".$traces[$i]['line']:"");
|
||||
if (isset($traces[$i]['class']) && isset($traces[$i]['function']))
|
||||
$trace[] = implode(" ", array(
|
||||
$traces[$i]['class'],
|
||||
$traces[$i]['type'],
|
||||
$traces[$i]['function']. "()"));
|
||||
$trace[] = $traces[$i]['class'] . " " . $traces[$i]['type'] . " " . $traces[$i]['function']. "()";
|
||||
elseif (isset($traces[$i]['function']))
|
||||
$trace[] = $traces[$i]['function']. "()";
|
||||
$msg[] = implode(" - ", $trace);
|
||||
|
@ -118,27 +96,15 @@ function get_debug_backtrace_context($ignore_last=0) {
|
|||
return implode("\n", $msg);
|
||||
}
|
||||
|
||||
function log_exception($exception, $prefix=null) {
|
||||
// If more than 2 arguments passed, format prefix message using sprintf
|
||||
if ($prefix && func_num_args() > 2) {
|
||||
$prefix = call_user_func_array(
|
||||
'sprintf',
|
||||
array_merge(array($prefix), array_slice(func_get_args(), 2))
|
||||
);
|
||||
}
|
||||
logging(
|
||||
"ERROR", "%s:\n%s\n## %s:%d : %s",
|
||||
($prefix?$prefix:"An exception occured"),
|
||||
get_debug_backtrace_context(1),
|
||||
$exception->getFile(), $exception->getLine(),
|
||||
$exception->getMessage());
|
||||
function log_exception($exception, $prefix='') {
|
||||
logging("ERROR", ($prefix?"$prefix :\n":"An exception occured :\n"). get_debug_backtrace_context(1). "\n" .
|
||||
"## ".$exception->getFile().":".$exception->getLine(). " : ". $exception->getMessage());
|
||||
}
|
||||
set_exception_handler('log_exception');
|
||||
|
||||
// Handle PHP error logging
|
||||
function log_php_eror($errno, $errstr, $errfile, $errline) {
|
||||
logging("ERROR", "A PHP error occured : [%d] %s\nFile : %s (line : %d)",
|
||||
$errno, $errstr, $errfile, $errline);
|
||||
logging("ERROR", "A PHP error occured : [$errno] $errstr\nFile : $errfile (line : $errline)");
|
||||
return False;
|
||||
}
|
||||
if ($log_level == 'DEBUG')
|
||||
|
|
|
@ -4,15 +4,12 @@
|
|||
require_once($php_mail_path);
|
||||
require_once($php_mail_mime_path);
|
||||
|
||||
function send_mail($from, $to, $subject, $msg, $headers=array(), $attachments=array(),
|
||||
$crlf="\r\n") {
|
||||
function send_mail($from, $to, $subject, $msg, $headers=array(), $attachments=array(), $crlf="\r\n") {
|
||||
global $mail_send_method, $mail_headers, $mail_send_params, $mail_catch_all, $mail_sender;
|
||||
$mail_obj = Mail::factory($mail_send_method, $mail_send_params);
|
||||
|
||||
if ($mail_catch_all) {
|
||||
$msg .= sprintf(
|
||||
_("\n\n\nMail initialy intended for %s."),
|
||||
(is_array($to)?implode(',', $to):$to));
|
||||
$msg .= sprintf(_("\n\n\nMail initialy intended for %s."), (is_array($to)?implode(',', $to):$to));
|
||||
$to = $mail_catch_all;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,10 +23,7 @@ if ($session_timeout) {
|
|||
$_SESSION['session_last_access'] = time();
|
||||
}
|
||||
elseif ($_SESSION['session_last_access'] > (time() - $session_timeout)) {
|
||||
logging(
|
||||
'DEBUG',
|
||||
'Session timeout not expired, update session last access '.
|
||||
'(Previous value : '.$_SESSION['session_last_access'].')');
|
||||
logging('DEBUG', 'Session timeout not expired, update session last access (Previous value : '.$_SESSION['session_last_access'].')');
|
||||
$_SESSION['session_last_access'] = time();
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -85,26 +85,12 @@ $smarty->assign('session_key', $_SESSION['session_key']);
|
|||
if (!isset($_SESSION['errors']))
|
||||
$_SESSION['errors']=array();
|
||||
function add_error($error) {
|
||||
// If more than one arguments passed, format error message using sprintf
|
||||
if (func_num_args() > 1) {
|
||||
$error = call_user_func_array(
|
||||
'sprintf',
|
||||
array_merge(array($error), array_slice(func_get_args(), 1))
|
||||
);
|
||||
}
|
||||
$_SESSION['errors'][]=$error;
|
||||
}
|
||||
|
||||
if (!isset($_SESSION['messages']))
|
||||
$_SESSION['messages']=array();
|
||||
function add_message($message) {
|
||||
// If more than one arguments passed, format message using sprintf
|
||||
if (func_num_args() > 1) {
|
||||
$message = call_user_func_array(
|
||||
'sprintf',
|
||||
array_merge(array($message), array_slice(func_get_args(), 1))
|
||||
);
|
||||
}
|
||||
$_SESSION['messages'][]=$message;
|
||||
}
|
||||
|
||||
|
@ -147,13 +133,6 @@ function display_template($template, $pagetitle=false) {
|
|||
if (!$template)
|
||||
logging("FATAL", _("No template specified."));
|
||||
global $smarty;
|
||||
// If more than 2 arguments passed, format pagetitle using sprintf
|
||||
if ($pagetitle & func_num_args() > 2) {
|
||||
$pagetitle = call_user_func_array(
|
||||
'sprintf',
|
||||
array_merge(array($pagetitle), array_slice(func_get_args(), 2))
|
||||
);
|
||||
}
|
||||
try {
|
||||
_defineCommonTemplateVariables($template, $pagetitle);
|
||||
$smarty->display($template);
|
||||
|
@ -194,14 +173,6 @@ $ajax=false;
|
|||
function fatal_error($error) {
|
||||
global $smarty, $ajax, $api_mode;
|
||||
|
||||
// If more than one arguments passed, format error message using sprintf
|
||||
if (func_num_args() > 1) {
|
||||
$error = call_user_func_array(
|
||||
'sprintf',
|
||||
array_merge(array($error), array_slice(func_get_args(), 1))
|
||||
);
|
||||
}
|
||||
|
||||
if (php_sapi_name() == "cli")
|
||||
die("FATAL ERROR : $error\n");
|
||||
|
||||
|
@ -231,11 +202,7 @@ function smarty_item_status($params) {
|
|||
else
|
||||
$class='danger';
|
||||
echo "<span class='badge badge-$class'>";
|
||||
echo (
|
||||
array_key_exists($params['item']['status'], $status_list)?
|
||||
$status_list[$params['item']['status']]:
|
||||
"Inconnu (".$params['item']['status'].")"
|
||||
);
|
||||
echo array_key_exists($params['item']['status'], $status_list)?$status_list[$params['item']['status']]:"Inconnu (".$params['item']['status'].")";
|
||||
echo "</span>";
|
||||
}
|
||||
smarty_register_function('item_status','smarty_item_status');
|
||||
|
@ -256,10 +223,7 @@ function smarty_table_ordered_th($params, $smarty) {
|
|||
echo "<a href='".$params['url']."?order=".$params['order']."'>".$params['text']."</a>";
|
||||
}
|
||||
if ($params['order']==$params['search']['order']) {
|
||||
echo (
|
||||
' <i class="fa fa-sort-'.
|
||||
(strtolower($params['search']['order_direction'])=='asc'?'up':'down').
|
||||
'" aria-hidden="true"></i>');
|
||||
echo ' <i class="fa fa-sort-'.(strtolower($params['search']['order_direction'])=='asc'?'up':'down').'" aria-hidden="true"></i>';
|
||||
}
|
||||
}
|
||||
smarty_register_function('table_ordered_th','smarty_table_ordered_th');
|
||||
|
|
|
@ -1,370 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
********************************************************************
|
||||
* Translations CLI commands *
|
||||
********************************************************************
|
||||
*/
|
||||
|
||||
if (php_sapi_name() != "cli")
|
||||
return true;
|
||||
|
||||
/**
|
||||
* Convert PO file to JSON file
|
||||
*
|
||||
* @param string $locale The locale of the input PO file
|
||||
* @param string $path The path of the input PO file
|
||||
*
|
||||
* @return string JSON encoded file content
|
||||
*/
|
||||
function po2json($locale, $path) {
|
||||
$fileHandler = new \Sepia\PoParser\SourceHandler\FileSystem($path);
|
||||
$poparser = new \Sepia\PoParser\Parser($fileHandler);
|
||||
$catalog = $poparser->parse();
|
||||
$headers = $catalog->getHeader();
|
||||
|
||||
$messages = array();
|
||||
foreach ($catalog->getEntries() as $entry) {
|
||||
// msg id json format
|
||||
$msg = $entry->getMsgStr();
|
||||
if ($entry->isPlural())
|
||||
$msg = array($msg, $entry->getMsgIdPlural());
|
||||
$messages[$entry->getMsgId()] = $msg;
|
||||
}
|
||||
return json_encode(array(
|
||||
'messages' => $messages,
|
||||
'locale' => $locale,
|
||||
'domain' => TEXT_DOMAIN,
|
||||
'plural_expr' => '(n > 1)',
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Command to extract messages from PHP/JS & template files and
|
||||
* generate the lang/messages.pot file.
|
||||
*
|
||||
* @param array $command_args The command arguments
|
||||
* @return void
|
||||
*/
|
||||
function cli_extract_messages($command_args) {
|
||||
global $root_dir_path, $root_lang_dir, $smarty_templates_dir;
|
||||
|
||||
// List PHP files to parse
|
||||
$php_files = run_external_command(
|
||||
array('find', escapeshellarg($root_dir_path), '-name', "'*.php'"),
|
||||
null, // no STDIN data
|
||||
false // do not escape command args (already done)
|
||||
);
|
||||
if (!is_array($php_files) || $php_files[0] != 0) {
|
||||
logging('FATAL', _("Fail to list PHP files."));
|
||||
}
|
||||
|
||||
// Extract messages from PHP files using xgettext
|
||||
$result = run_external_command(
|
||||
array(
|
||||
"xgettext",
|
||||
"--from-code utf-8",
|
||||
"--language=PHP",
|
||||
"-o", "$root_lang_dir/php-messages.pot", // Output
|
||||
"--omit-header", // No POT header
|
||||
"--keyword=___", // Handle custom ___() translation function
|
||||
"--files=-" // Read files to parse from STDIN
|
||||
),
|
||||
$php_files[1] // Pass PHP files list via STDIN
|
||||
);
|
||||
if (!is_array($result) || $result[0] != 0)
|
||||
logging('FATAL', _("Fail to extract messages from PHP files using xgettext."));
|
||||
|
||||
|
||||
// List JS files to parse
|
||||
$js_files = run_external_command(
|
||||
array('find', escapeshellarg("$root_dir_path/public_html/js"), '-name', "'*.js'"),
|
||||
null, // no STDIN data
|
||||
false // do not escape command args (already done)
|
||||
);
|
||||
if (!is_array($js_files) || $js_files[0] != 0) {
|
||||
logging('FATAL', _("Fail to list JS files."));
|
||||
}
|
||||
|
||||
// Extract messages from JS files using xgettext
|
||||
$result = run_external_command(
|
||||
array(
|
||||
"xgettext",
|
||||
"--from-code utf-8",
|
||||
"--language=JavaScript",
|
||||
"-o", "$root_lang_dir/js-messages.pot", // Output
|
||||
"--omit-header", // No POT header
|
||||
"--keyword=___", // Handle custom ___() translation function
|
||||
"--files=-" // Read files to parse from STDIN
|
||||
),
|
||||
$js_files[1] // Pass JS files list via STDIN
|
||||
);
|
||||
if (!is_array($result) || $result[0] != 0)
|
||||
logging('FATAL', _("Fail to extract messages from JS files using xgettext."));
|
||||
|
||||
// Extract messages from templates files using tsmarty2c.php
|
||||
$result = run_external_command(
|
||||
array (
|
||||
"$root_dir_path/vendor/bin/tsmarty2c.php",
|
||||
"-o", "$root_lang_dir/templates-messages.pot",
|
||||
$smarty_templates_dir,
|
||||
)
|
||||
);
|
||||
if (!is_array($result) || $result[0] != 0)
|
||||
logging(
|
||||
'FATAL',
|
||||
_("Fail to extract messages from template files using tsmarty2c.php script."));
|
||||
|
||||
$fd = fopen("$root_lang_dir/headers.pot", 'w');
|
||||
$headers = array(
|
||||
'msgid ""',
|
||||
'msgstr ""',
|
||||
'"POT-Creation-Date: '.date('Y-m-d H:iO').'\n"',
|
||||
'"PO-Revision-Date: '.date('Y-m-d H:iO').'\n"',
|
||||
'"MIME-Version: 1.0\n"',
|
||||
'"Content-Type: text/plain; charset=utf-8\n"',
|
||||
'"Content-Transfer-Encoding: 8bit\n"',
|
||||
);
|
||||
fwrite($fd, implode("\n", $headers));
|
||||
fclose($fd);
|
||||
|
||||
// Merge previous results in messages.pot file using msgcat
|
||||
$result = run_external_command(array(
|
||||
'msgcat',
|
||||
"$root_lang_dir/headers.pot",
|
||||
"$root_lang_dir/php-messages.pot",
|
||||
"$root_lang_dir/js-messages.pot",
|
||||
"$root_lang_dir/templates-messages.pot",
|
||||
"-t", "utf-8", "--use-first",
|
||||
"-o", "$root_lang_dir/messages.pot",
|
||||
));
|
||||
if (!is_array($result) || $result[0] != 0)
|
||||
logging('FATAL', _("Fail to merge messages using msgcat."));
|
||||
}
|
||||
add_cli_command(
|
||||
'extract_messages',
|
||||
'cli_extract_messages',
|
||||
___("Extract messages that need to be translated"),
|
||||
null,
|
||||
___("This command could be used to generate/update lang/messages.pot file.")
|
||||
);
|
||||
|
||||
/**
|
||||
* Command to update messages from lang/messages.pot file to
|
||||
* all PO file in lang/[lang]/LC_MESSAGES.
|
||||
*
|
||||
* @param array $command_args The command arguments
|
||||
* @return void
|
||||
*/
|
||||
function cli_update_messages($command_args) {
|
||||
global $root_dir_path, $root_lang_dir, $smarty_templates_dir;
|
||||
|
||||
$compendium_args = array();
|
||||
foreach ($command_args as $path) {
|
||||
if (!file_exists($path))
|
||||
logging('FATAL', _("Compendium file %s not found."), $path);
|
||||
$compendium_args[] = '-C';
|
||||
$compendium_args[] = $path;
|
||||
}
|
||||
|
||||
$pot_file = "$root_lang_dir/messages.pot";
|
||||
if (!is_file($pot_file))
|
||||
logging('FATAL', _("POT file not found (%s). Please run extract_messages first."), $pot_file);
|
||||
|
||||
if ($dh = opendir($root_lang_dir)) {
|
||||
$error = False;
|
||||
while (($file = readdir($dh)) !== false) {
|
||||
if (
|
||||
!is_dir($root_lang_dir . '/' . $file) ||
|
||||
in_array($file, array('.', '..')) ||
|
||||
is_link($root_lang_dir . '/' . $file)
|
||||
)
|
||||
continue;
|
||||
|
||||
logging('DEBUG', _("Lang directory '%s' found"), $file);
|
||||
|
||||
// Check LC_MESSAGES directory exists
|
||||
$lang = $file;
|
||||
$lang_dir = $root_lang_dir . '/' . $file . '/LC_MESSAGES' ;
|
||||
if (!is_dir($lang_dir)) {
|
||||
logging('DEBUG', _("LC_MESSAGES directory not found in lang '%s' directory, ignore it."),
|
||||
$lang);
|
||||
continue;
|
||||
}
|
||||
|
||||
$po_file = $lang_dir . '/' . TEXT_DOMAIN . '.po';
|
||||
$created = false;
|
||||
if (!is_file($po_file)) {
|
||||
// Init PO file from POT file using msginit
|
||||
$result = run_external_command(
|
||||
array("msginit", "-i", "$pot_file", "-l", "$lang", "-o", $po_file)
|
||||
);
|
||||
if (is_array($result) && $result[0] == 0) {
|
||||
$created = true;
|
||||
} else {
|
||||
logging('ERROR', _("Fail to init messages in %s PO file using msginit (%s)."),
|
||||
$lang, $po_file);
|
||||
$error = True;
|
||||
}
|
||||
}
|
||||
|
||||
// Update messages in PO file from POT file using msgmerge
|
||||
// Note: msginit does not accept compendium files, so we also run
|
||||
// msgmerge on creation with compendium file(s).
|
||||
if (is_file($po_file) && (!$created || $compendium_args)) {
|
||||
$result = run_external_command(
|
||||
array_merge(
|
||||
array("msgmerge", "-q", "-U"),
|
||||
$compendium_args,
|
||||
array($po_file, $pot_file)
|
||||
)
|
||||
);
|
||||
if (!is_array($result) || $result[0] != 0) {
|
||||
logging('ERROR', _("Fail to update messages in %s PO file using msgmerge (%s)."),
|
||||
$lang, $po_file);
|
||||
$error = True;
|
||||
}
|
||||
}
|
||||
elseif (!$created) {
|
||||
logging('DEBUG', _("PO file not found in lang '%s' directory, ignore it."), $lang);
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
return !$error;
|
||||
}
|
||||
|
||||
logging('FATAL', _("Fail to open root lang directory (%s)."), $root_dir_path);
|
||||
}
|
||||
add_cli_command(
|
||||
'update_messages',
|
||||
'cli_update_messages',
|
||||
___("Update messages in translation PO lang files"),
|
||||
null,
|
||||
___("This command could be used to init/update PO files in lang/*/LC_MESSAGES directories.")
|
||||
);
|
||||
|
||||
/**
|
||||
* Command to compile messages from existing translation PO lang files
|
||||
* to corresponding MO files and as JSON catalog (for translation in JS).
|
||||
*
|
||||
* @param array $command_args The command arguments
|
||||
* @return void
|
||||
*/
|
||||
function cli_compile_messages($command_args) {
|
||||
global $root_dir_path, $root_lang_dir, $smarty_templates_dir;
|
||||
|
||||
if ($dh = opendir($root_lang_dir)) {
|
||||
$error = False;
|
||||
while (($file = readdir($dh)) !== false) {
|
||||
if (
|
||||
!is_dir($root_lang_dir . '/' . $file) ||
|
||||
in_array($file, array('.', '..'))
|
||||
)
|
||||
continue;
|
||||
|
||||
if (is_link($root_lang_dir . '/' . $file)) {
|
||||
$real_lang_dir = readlink($root_lang_dir . '/' . $file);
|
||||
if (dirname($real_lang_dir) != '.' || !is_dir($root_lang_dir . '/' . $real_lang_dir))
|
||||
continue;
|
||||
$lang = $file;
|
||||
logging('DEBUG', _("Lang alias symlink found: %s -> %s"), $lang, $real_lang_dir);
|
||||
|
||||
// Create JSON catalog symlink (if not exists)
|
||||
$js_link = "$root_dir_path/public_html/translations/$lang.js";
|
||||
$link_target = "$real_lang_dir.js";
|
||||
if (!file_exists($js_link)) {
|
||||
if (symlink($link_target, $js_link)) {
|
||||
logging('INFO', _("JSON catalog symlink for %s -> %s created (%s)"),
|
||||
$lang, $real_lang_dir, $js_link);
|
||||
}
|
||||
else {
|
||||
logging('ERROR', _("Fail to create JSON catalog symlink for %s -> %s (%s)"),
|
||||
$lang, $real_lang_dir, $js_link);
|
||||
$error = True;
|
||||
}
|
||||
}
|
||||
elseif (readlink($js_link) == $link_target) {
|
||||
logging('DEBUG', _("JSON catalog symlink for %s -> %s already exist (%s)"),
|
||||
$lang, $real_lang_dir, $js_link);
|
||||
}
|
||||
else {
|
||||
logging(
|
||||
'WARNING',
|
||||
_("JSON catalog file for %s already exist, but it's not a symlink to %s (%s)"),
|
||||
$lang, $real_lang_dir, $js_link
|
||||
);
|
||||
$error = True;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
logging('DEBUG', _("Lang directory '%s' found"), $file);
|
||||
|
||||
// Check LC_MESSAGES directory exists
|
||||
$lang = $file;
|
||||
$lang_dir = $root_lang_dir . '/' . $file . '/LC_MESSAGES' ;
|
||||
if (!is_dir($lang_dir)) {
|
||||
logging('DEBUG', _("LC_MESSAGES directory not found in lang '%s' directory, ignore it."),
|
||||
$lang);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Test .PO file is present
|
||||
$po_file = $lang_dir . '/' . TEXT_DOMAIN . '.po';
|
||||
if (!is_file($po_file)) {
|
||||
logging('DEBUG', _("PO file not found in lang '%s' directory, ignore it."),
|
||||
$lang);
|
||||
continue;
|
||||
}
|
||||
|
||||
$mo_file = preg_replace('/\.po$/', '.mo', $po_file);
|
||||
|
||||
// Compile messages from PO file to MO file using msgfmt
|
||||
$result = run_external_command(
|
||||
array("msgfmt", "-o", $mo_file, $po_file)
|
||||
);
|
||||
if (!is_array($result) || $result[0] != 0) {
|
||||
logging(
|
||||
'ERROR',
|
||||
_("Fail to compile messages from %s PO file as MO file using msgfmt (%s)."),
|
||||
$lang, $po_file
|
||||
);
|
||||
$error = True;
|
||||
}
|
||||
|
||||
// Compile messages from PO file to JSON catalog file
|
||||
$json_catalog = po2json($lang, $po_file);
|
||||
$js_file = "$root_dir_path/public_html/translations/$lang.js";
|
||||
if(!$fd = fopen($js_file, 'w')) {
|
||||
logging('ERROR', _("Fail to open %s JSON catalog file in write mode (%s)."),
|
||||
$lang, $js_file);
|
||||
$error = True;
|
||||
}
|
||||
elseif (fwrite($fd, sprintf("translations_data = %s;", $json_catalog)) === false) {
|
||||
logging('ERROR', _("Fail to write %s JSON catalog in file (%s)."),
|
||||
$lang, $js_file);
|
||||
$error = True;
|
||||
}
|
||||
else {
|
||||
logging('INFO', _("%s JSON catalog writed (%s)."), $lang, $js_file);
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
|
||||
return !$error;
|
||||
}
|
||||
logging('FATAL', _("Fail to open root lang directory (%s)."), $root_dir_path);
|
||||
}
|
||||
add_cli_command(
|
||||
'compile_messages',
|
||||
'cli_compile_messages',
|
||||
___(
|
||||
"Compile messages from existing translation PO lang files to ".
|
||||
"corresponding MO files and JSON catalogs"
|
||||
),
|
||||
null,
|
||||
___(
|
||||
"This command could be used to compile PO files in lang/*/LC_MESSAGES ".
|
||||
"directories to MO files and as JSON catalogs in public_html/translations."
|
||||
)
|
||||
);
|
|
@ -3,13 +3,13 @@
|
|||
// Gettext text domain
|
||||
define('TEXT_DOMAIN', 'DEFAULT');
|
||||
|
||||
/**
|
||||
/*
|
||||
* List available translation languages
|
||||
*
|
||||
* @param $as_locales boolean If true, locale names will be return instead
|
||||
* @param[in] $as_locales boolean If true, locale names will be return instead
|
||||
* of primary languages (optional, default: false)
|
||||
*
|
||||
* @return array Array of available translation languages (or locales)
|
||||
* @retval array Array of available translation languages (or locales)
|
||||
*/
|
||||
function get_available_langs($as_locales=false) {
|
||||
global $root_lang_dir;
|
||||
|
@ -35,14 +35,14 @@ function get_available_langs($as_locales=false) {
|
|||
return $langs;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get locale name corresponding to specified translation language
|
||||
*
|
||||
* @param $lang string The translation language
|
||||
* @param $default string|null Default locale name to return if any available translation
|
||||
* @param[in] $lang string The translation language
|
||||
* @param[in] $default string|null Default locale name to return if any available translation
|
||||
* locales matched with the specified language
|
||||
* (optional, default: $default_locale)
|
||||
* @return string Corresponding locale
|
||||
* return string Corresponding locale
|
||||
*/
|
||||
function lang2locale($lang, $default=null) {
|
||||
global $default_locale;
|
||||
|
@ -56,27 +56,21 @@ function lang2locale($lang, $default=null) {
|
|||
return $default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function: just mark message for translation
|
||||
*
|
||||
* @param string $msg The message to translate
|
||||
*
|
||||
* @return string The message without transformation
|
||||
*/
|
||||
// Helper function: just mark message to translation
|
||||
function ___($msg) {
|
||||
return $msg;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Initialize translation system
|
||||
*
|
||||
* Detect best translation language and configure the translation
|
||||
* system.
|
||||
*
|
||||
* @return void
|
||||
* @retval void
|
||||
*/
|
||||
function init_translation() {
|
||||
global $root_dir_path, $root_lang_dir, $default_locale, $smarty;
|
||||
global $root_dir_path, $root_lang_dir, $default_locale;
|
||||
$root_lang_dir = "$root_dir_path/lang";
|
||||
|
||||
if (!class_exists('Locale')) {
|
||||
|
@ -138,11 +132,4 @@ function init_translation() {
|
|||
logging('TRACE', "Text domain fullpath is '$fullpath'.");
|
||||
logging('TRACE', "Text domain is '".textdomain(TEXT_DOMAIN)."'.");
|
||||
logging('TRACE', "Test: "._('Hello world !'));
|
||||
|
||||
// JS translation file
|
||||
$js_translation_file = "translations/$lang.js";
|
||||
if (php_sapi_name() != "cli" && is_file("$root_dir_path/public_html/$js_translation_file")) {
|
||||
add_js_file(array("lib/babel.js", "js/translation.js", $js_translation_file));
|
||||
$smarty->assign('lang', $lang);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,11 +12,7 @@ function handle_search($request) {
|
|||
global $smarty, $status_list;
|
||||
|
||||
// Manage params
|
||||
if(
|
||||
(isset($_REQUEST['clear']) && $_REQUEST['clear']=='true') ||
|
||||
!isset($_SESSION['search']) ||
|
||||
!is_array($_SESSION['search'])
|
||||
) {
|
||||
if((isset($_REQUEST['clear']) && $_REQUEST['clear']=='true') || !isset($_SESSION['search']) || !is_array($_SESSION['search'])) {
|
||||
$_SESSION['search']=array(
|
||||
'pattern' => false,
|
||||
'status' => 'all',
|
||||
|
@ -85,21 +81,17 @@ function handle_search($request) {
|
|||
logging('DEBUG', 'Search params : '.vardump($_SESSION['search']));
|
||||
$result = search_items($_SESSION['search']);
|
||||
if (!is_array($result))
|
||||
fatal_error(
|
||||
_("An error occurred while listing the items. ".
|
||||
"If the problem persists, please contact support.")
|
||||
);
|
||||
fatal_error(_("An error occurred while listing the items. If the problem persists, please contact support."));
|
||||
|
||||
$smarty -> assign('result', $result);
|
||||
$smarty -> assign('search', $_SESSION['search']);
|
||||
$smarty -> assign('nbs_by_page', $nbs_by_page);
|
||||
$smarty -> assign('status_list', $status_list);
|
||||
|
||||
add_js_file(array(
|
||||
'lib/bootstrap4dialog/dist/js/bootstrap4dialog.min.js',
|
||||
'js/myconfirm.js',
|
||||
'js/search.js'
|
||||
));
|
||||
add_css_file('lib/bootstrap4-dialog/bootstrap-dialog.min.css');
|
||||
add_js_file('lib/bootstrap4-dialog/bootstrap-dialog.min.js');
|
||||
add_js_file('lib/myconfirm.js');
|
||||
add_js_file('js/search.js');
|
||||
|
||||
display_template("search.tpl", _("Search"));
|
||||
}
|
||||
|
@ -119,15 +111,11 @@ function handle_show($request) {
|
|||
$smarty->assign('item', $item);
|
||||
|
||||
// Dialog
|
||||
add_js_file(array(
|
||||
'lib/bootstrap4dialog/dist/js/bootstrap4dialog.min.js',
|
||||
'js/myconfirm.js',
|
||||
));
|
||||
add_css_file('lib/bootstrap4-dialog/bootstrap-dialog.min.css');
|
||||
add_js_file('lib/bootstrap4-dialog/bootstrap-dialog.min.js');
|
||||
add_js_file('lib/myconfirm.js');
|
||||
|
||||
display_template(
|
||||
"show.tpl", _("Element %s"),
|
||||
(is_array($item)?$item['name']:"#".$request -> id)
|
||||
);
|
||||
display_template("show.tpl", sprintf(_("Element %s"), (is_array($item)?$item['name']:"#".$request -> id)));
|
||||
}
|
||||
add_url_handler('|^item/(?P<id>[0-9]+)$|', 'handle_show');
|
||||
|
||||
|
@ -139,7 +127,7 @@ function handle_create($request) {
|
|||
if (isset($_POST['submit']) && empty($field_errors)) {
|
||||
$item = add_item($info);
|
||||
if (is_array($item)) {
|
||||
add_message(_("The element '% s' has been created."), $item['name']);
|
||||
add_message(sprintf(_("The element '% s' has been created."), $item['name']));
|
||||
redirect('item/'.$item['id']);
|
||||
}
|
||||
else {
|
||||
|
@ -149,9 +137,7 @@ function handle_create($request) {
|
|||
logging('DEBUG', 'Validated data : '.vardump($info));
|
||||
logging('DEBUG', 'Fields errors : '.vardump($field_errors));
|
||||
if (isset($_POST['submit']) && !empty($field_errors))
|
||||
add_error(
|
||||
_("There are errors preventing this item from being saved. ".
|
||||
"Please correct them before attempting to add this item."));
|
||||
add_error(_("There are errors preventing this item from being saved. Please correct them before attempting to add this item."));
|
||||
$smarty->assign('submited', isset($_POST['submit']));
|
||||
$smarty->assign('info', $info);
|
||||
$smarty->assign('field_errors', $field_errors);
|
||||
|
@ -180,11 +166,11 @@ function handle_modify($request) {
|
|||
}
|
||||
logging('DEBUG', 'Changes : '.vardump($changes));
|
||||
if (empty($changes)) {
|
||||
add_message(_("You have not made any changes to element '% s'."), $item['name']);
|
||||
add_message(sprintf(_("You have not made any changes to element '% s'."), $item['name']));
|
||||
redirect('item/'.$item['id']);
|
||||
}
|
||||
else if (update_item($item['id'], $changes) === true) {
|
||||
add_message(_("The element '% s' has been updated successfully."), $item['name']);
|
||||
add_message(sprintf(_("The element '% s' has been updated successfully."), $item['name']));
|
||||
redirect('item/'.$item['id']);
|
||||
}
|
||||
else {
|
||||
|
@ -195,9 +181,7 @@ function handle_modify($request) {
|
|||
logging('DEBUG', 'Fields errors : '.vardump($field_errors));
|
||||
$smarty->assign('submited', isset($_POST['submit']));
|
||||
if (isset($_POST['submit']) && !empty($field_errors))
|
||||
add_error(
|
||||
_("There are errors preventing this item from being saved. ".
|
||||
"Please correct them before attempting to save your changes."));
|
||||
add_error(_("There are errors preventing this item from being saved. Please correct them before attempting to save your changes."));
|
||||
$smarty->assign('info', (!empty($info)?$info:$item));
|
||||
$smarty->assign('item_id', $item['id']);
|
||||
$smarty->assign('field_errors', $field_errors);
|
||||
|
@ -207,10 +191,7 @@ function handle_modify($request) {
|
|||
error_404();
|
||||
}
|
||||
|
||||
display_template(
|
||||
"form.tpl", _("Element %s: Modification"),
|
||||
(is_array($item)?$item['name']:"#".$request -> id)
|
||||
);
|
||||
display_template("form.tpl", sprintf(_("Element %s: Modification"), (is_array($item)?$item['name']:"#".$request -> id)));
|
||||
}
|
||||
add_url_handler('|^item/(?P<id>[0-9]+)/modify$|', 'handle_modify');
|
||||
|
||||
|
@ -219,7 +200,7 @@ function handle_archive($request) {
|
|||
|
||||
$item = get_item_from_url($request -> id);
|
||||
if(!is_array($item)) {
|
||||
add_error(_("Item #% s not found."), $request -> id);
|
||||
add_error(sprintf(_("Item #% s not found."), $request -> id));
|
||||
redirect('item');
|
||||
}
|
||||
elseif ($item['status'] == 'archived') {
|
||||
|
@ -229,7 +210,7 @@ function handle_archive($request) {
|
|||
add_error(_('You cannot archive this item.'));
|
||||
}
|
||||
else if (archive_item($item['id']) === true) {
|
||||
add_message(_("The element '% s' has been archived successfully."), $item['name']);
|
||||
add_message(sprintf(_("The element '% s' has been archived successfully."), $item['name']));
|
||||
}
|
||||
else {
|
||||
add_error(_('An error occurred while archiving this item.'));
|
||||
|
@ -243,13 +224,13 @@ function handle_delete($request) {
|
|||
|
||||
$item = get_item_from_url($request -> id);
|
||||
if(!is_array($item)) {
|
||||
add_error(_("Item #% s not found."), $request -> id);
|
||||
add_error(sprintf(_("Item #% s not found."), $request -> id));
|
||||
}
|
||||
else if (!can_delete($item)) {
|
||||
add_error(_('You cannot delete this item.'));
|
||||
}
|
||||
else if (delete_item($item['id']) === true) {
|
||||
add_message(_("The element '% s' has been deleted successfully."), $item['name']);
|
||||
add_message(sprintf(_("The element '% s' has been deleted successfully."), $item['name']));
|
||||
}
|
||||
else {
|
||||
add_error(_('An error occurred while deleting this item.'));
|
||||
|
|
197
includes/url.php
197
includes/url.php
|
@ -26,17 +26,14 @@ $url_patterns =array();
|
|||
/**
|
||||
* Add an URL pattern
|
||||
*
|
||||
* @param $pattern string The URL pattern (required)
|
||||
* @param $handler callable The URL pattern handler (must be callable, required)
|
||||
* @param $authenticated boolean Permit to define if this URL is accessible only for
|
||||
* authenticated users (optional, default: true)
|
||||
* @param $override boolean Allow override if a command already exists with the
|
||||
* same name (optional, default: false)
|
||||
* @param $api_mode boolean Enable API mode (optional, default: false)
|
||||
* @param $methods array|null HTTP method (optional, default: array('GET', 'POST'))
|
||||
* @param[in] $pattern string The URL pattern (required)
|
||||
* @param[in] $handler callable The URL pattern handler (must be callable, required)
|
||||
* @param[in] $authenticated boolean Permit to define if this URL is accessible only for authenticated users (optional, default: true)
|
||||
* @param[in] $override boolean Allow override if a command already exists with the same name (optional, default: false)
|
||||
* @param[in] $api_mode boolean Enable API mode (optional, default: false)
|
||||
* @param[in] $methods array|null HTTP method (optional, default: array('GET', 'POST'))
|
||||
**/
|
||||
function add_url_handler($pattern, $handler=null, $authenticated=false, $override=true,
|
||||
$api_mode=false, $methods=null) {
|
||||
function add_url_handler($pattern, $handler=null, $authenticated=false, $override=true, $api_mode=false, $methods=null) {
|
||||
if (is_null($methods))
|
||||
$methods = array('GET', 'POST');
|
||||
elseif (!is_array($methods))
|
||||
|
@ -60,10 +57,7 @@ function add_url_handler($pattern, $handler=null, $authenticated=false, $overrid
|
|||
);
|
||||
}
|
||||
elseif ($override) {
|
||||
logging(
|
||||
'DEBUG',
|
||||
"URL : override pattern '$pattern' with handler '$handler' ".
|
||||
"(old handler = '".$url_patterns[$pattern]."')");
|
||||
logging('DEBUG', "URL : override pattern '$pattern' with handler '$handler' (old handler = '".$url_patterns[$pattern]."')");
|
||||
$url_patterns[$pattern] = array(
|
||||
'handler' => $handler,
|
||||
'authenticated' => $authenticated,
|
||||
|
@ -77,49 +71,6 @@ function add_url_handler($pattern, $handler=null, $authenticated=false, $overrid
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show error page
|
||||
*
|
||||
* @param $request UrlRequest|null The request (optional, default: null)
|
||||
* @param $error_code int|null The HTTP error code (optional, default: 400)
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
function error_page($request=null, $error_code=null) {
|
||||
global $smarty;
|
||||
$http_errors = array(
|
||||
400 => array(
|
||||
'pagetitle' => _("Bad request"),
|
||||
'message' => _("Invalid request."),
|
||||
),
|
||||
401 => array(
|
||||
'pagetitle' => _("Authentication required"),
|
||||
'message' => _("You have to be authenticated to access to this page."),
|
||||
),
|
||||
403 => array(
|
||||
'pagetitle' => _("Access denied"),
|
||||
'message' => _("You do not have access to this application. If you think this is an error, please contact support."),
|
||||
),
|
||||
404 => array(
|
||||
'pagetitle' => _("Whoops ! Page not found"),
|
||||
'message' => _("The requested page can not be found."),
|
||||
),
|
||||
);
|
||||
$error_code = ($error_code?intval($error_code):400);
|
||||
if (array_key_exists($error_code, $http_errors))
|
||||
$error = $http_errors[intval($error_code)];
|
||||
else
|
||||
$error = array(
|
||||
'pagetitle' => _('Error'),
|
||||
'message' => _('An unknown error occurred. If problem persist, please contact support.'),
|
||||
);
|
||||
http_response_code($error_code);
|
||||
|
||||
$smarty -> assign('message', $error['message']);
|
||||
display_template('error_page.tpl', $error['pagetitle']);
|
||||
exit();
|
||||
}
|
||||
|
||||
/*
|
||||
* Error 404 page
|
||||
*/
|
||||
|
@ -132,7 +83,8 @@ function error_page($request=null, $error_code=null) {
|
|||
* @retval void
|
||||
**/
|
||||
function error_404($request=null) {
|
||||
error_page($request, 404);
|
||||
display_template('error_404.tpl', _("Whoops ! Page not found"));
|
||||
exit();
|
||||
}
|
||||
|
||||
$_404_url_handler = 'error_404';
|
||||
|
@ -142,23 +94,19 @@ function set_404_url_handler($handler=null) {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
/*
|
||||
* Interprets the requested URL and return the corresponding UrlRequest object
|
||||
*
|
||||
* @param $default_url string|null The default URL if current one does not
|
||||
* @param[in] $default_url string|null The default URL if current one does not
|
||||
* match with any configured pattern.
|
||||
*
|
||||
* @return UrlRequest The UrlRequest object corresponding to the the requested URL.
|
||||
* @retval UrlRequest The UrlRequest object corresponding to the the requested URL.
|
||||
*/
|
||||
function get_request($default_url=null) {
|
||||
global $url_patterns, $_404_url_handler;
|
||||
$current_url = get_current_url();
|
||||
if ($current_url === false) {
|
||||
logging(
|
||||
'FATAL',
|
||||
_('Unable to determine the requested page. '.
|
||||
'If the problem persists, please contact support.')
|
||||
);
|
||||
logging('FATAL', _('Unable to determine the requested page. If the problem persists, please contact support.'));
|
||||
exit();
|
||||
}
|
||||
if (!is_array($url_patterns)) {
|
||||
|
@ -167,11 +115,7 @@ function get_request($default_url=null) {
|
|||
}
|
||||
|
||||
logging('DEBUG', "URL : current url = '$current_url'");
|
||||
logging(
|
||||
'DEBUG',
|
||||
"URL : check current url with the following URL patterns :\n - ".
|
||||
implode("\n - ", array_keys($url_patterns))
|
||||
);
|
||||
logging('DEBUG', "URL : check current url with the following URL patterns :\n - ".implode("\n - ", array_keys($url_patterns)));
|
||||
foreach ($url_patterns as $pattern => $handler_infos) {
|
||||
$m = url_match($pattern, $current_url, $handler_infos['methods']);
|
||||
if (is_array($m)) {
|
||||
|
@ -190,9 +134,7 @@ function get_request($default_url=null) {
|
|||
}
|
||||
// Error 404
|
||||
$api_mode = (strpos($current_url, 'api/') === 0);
|
||||
logging(
|
||||
'DEBUG',
|
||||
"Current URL match with no pattern. Use error 404 handler (API mode=$api_mode).");
|
||||
logging('DEBUG', "Current URL match with no pattern. Use error 404 handler (API mode=$api_mode).");
|
||||
return new UrlRequest(
|
||||
$current_url,
|
||||
array(
|
||||
|
@ -206,11 +148,11 @@ function get_request($default_url=null) {
|
|||
/**
|
||||
* Check if the current requested URL match with a specific pattern
|
||||
*
|
||||
* @param $pattern string The URL pattern
|
||||
* @param $current_url string|false The current URL (optional)
|
||||
* @param $methods array|null HTTP method (optional, default: no check)
|
||||
* @param[in] $pattern string The URL pattern
|
||||
* @param[in] $current_url string|false The current URL (optional)
|
||||
* @param[in] $methods array|null HTTP method (optional, default: no check)
|
||||
*
|
||||
* @return array|false The URL info if pattern matched, false otherwise.
|
||||
* @retval array|false The URL info if pattern matched, false otherwise.
|
||||
**/
|
||||
function url_match($pattern, $current_url=false, $methods=null) {
|
||||
if ($methods && !in_array($_SERVER['REQUEST_METHOD'], $methods))
|
||||
|
@ -220,19 +162,16 @@ function url_match($pattern, $current_url=false, $methods=null) {
|
|||
if (!$current_url) return False;
|
||||
}
|
||||
if (preg_match($pattern, $current_url, $m)) {
|
||||
logging(
|
||||
'DEBUG',
|
||||
"URL : Match found with pattern '$pattern' :\n\t".
|
||||
str_replace("\n", "\n\t", print_r($m, 1)));
|
||||
logging('DEBUG', "URL : Match found with pattern '$pattern' :\n\t".str_replace("\n", "\n\t", print_r($m, 1)));
|
||||
return $m;
|
||||
}
|
||||
return False;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Retreive current requested URL and return it
|
||||
*
|
||||
* @return string|false The current request URL or false if fail
|
||||
* @retval string|false The current request URL or false if fail
|
||||
**/
|
||||
function get_current_url() {
|
||||
logging('DEBUG', "URL : request URI = '".$_SERVER['REQUEST_URI']."'");
|
||||
|
@ -244,9 +183,7 @@ function get_current_url() {
|
|||
return '';
|
||||
|
||||
if (substr($_SERVER['REQUEST_URI'], 0, strlen($base)) != $base) {
|
||||
logging(
|
||||
'ERROR',
|
||||
"URL : request URI (".$_SERVER['REQUEST_URI'].") does not start with rewrite base ($base)");
|
||||
logging('ERROR', "URL : request URI (".$_SERVER['REQUEST_URI'].") does not start with rewrite base ($base)");
|
||||
return False;
|
||||
}
|
||||
|
||||
|
@ -269,7 +206,7 @@ function get_current_url() {
|
|||
/**
|
||||
* Try to detect rewrite base from public root URL
|
||||
*
|
||||
* @return string The detected rewrite base
|
||||
* @retval string The detected rewrite base
|
||||
**/
|
||||
function get_rewrite_base() {
|
||||
global $public_root_url;
|
||||
|
@ -283,9 +220,9 @@ function get_rewrite_base() {
|
|||
/**
|
||||
* Trigger redirect to specified URL (or homepage if omited)
|
||||
*
|
||||
* @param $go string|false The destination URL
|
||||
* @param[in] $go string|false The destination URL
|
||||
*
|
||||
* @return void
|
||||
* @retval void
|
||||
**/
|
||||
function redirect($go=false) {
|
||||
global $public_root_url;
|
||||
|
@ -307,10 +244,7 @@ function redirect($go=false) {
|
|||
|
||||
// Prevent loop
|
||||
if (isset($_SESSION['last_redirect']) && $_SESSION['last_redirect'] == $url)
|
||||
logging(
|
||||
'FATAL',
|
||||
_('Unable to determine the requested page (loop detected). '.
|
||||
'If the problem persists, please contact support.'));
|
||||
logging('FATAL', _('Unable to determine the requested page (loop detected). If the problem persists, please contact support.'));
|
||||
else
|
||||
$_SESSION['last_redirect'] = $url;
|
||||
|
||||
|
@ -322,10 +256,10 @@ function redirect($go=false) {
|
|||
/**
|
||||
* Handle the current requested URL
|
||||
*
|
||||
* @param $default_url string|null The default URL if current one does not
|
||||
* @param[in] $default_url string|null The default URL if current one does not
|
||||
* match with any configured pattern.
|
||||
*
|
||||
* @return void
|
||||
* @retval void
|
||||
**/
|
||||
function handle_request($default_url=null) {
|
||||
global $smarty, $api_mode;
|
||||
|
@ -350,8 +284,7 @@ function handle_request($default_url=null) {
|
|||
return call_user_func($request -> handler, $request);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
log_exception(
|
||||
$e, "An exception occured running URL handler function ".$request -> handler."()");
|
||||
log_exception($e, "An exception occured running URL handler function ".$request -> handler."()");
|
||||
logging('FATAL', _("This request could not be processed correctly."));
|
||||
}
|
||||
}
|
||||
|
@ -359,9 +292,9 @@ function handle_request($default_url=null) {
|
|||
/**
|
||||
* Remove trailing slash in specified URL
|
||||
*
|
||||
* @param $url string The URL
|
||||
* @param[in] $url string The URL
|
||||
*
|
||||
* @return string The specified URL without trailing slash
|
||||
* @retval string The specified URL without trailing slash
|
||||
**/
|
||||
function remove_trailing_slash($url) {
|
||||
if ($url == '/')
|
||||
|
@ -377,9 +310,9 @@ function remove_trailing_slash($url) {
|
|||
* Check if session key is present and valid and set AJAX
|
||||
* mode.
|
||||
*
|
||||
* @param $session_key string The current session key (optional)
|
||||
* @param[in] $session_key string The current session key (optional)
|
||||
*
|
||||
* @return void
|
||||
* @retval void
|
||||
**/
|
||||
function check_ajax_request($session_key=null) {
|
||||
global $ajax, $debug_ajax;
|
||||
|
@ -395,25 +328,18 @@ function check_ajax_request($session_key=null) {
|
|||
/**
|
||||
* Get the public absolute URL
|
||||
*
|
||||
* @param $relative_url string|null Relative URL to convert (Default: current URL)
|
||||
* @param[in] $relative_url string|null Relative URL to convert (Default: current URL)
|
||||
*
|
||||
* @return string The public absolute URL
|
||||
* @retval string The public absolute URL
|
||||
**/
|
||||
function get_absolute_url($relative_url=null) {
|
||||
global $public_root_url;
|
||||
if (!is_string($relative_url))
|
||||
$relative_url = get_current_url();
|
||||
if ($public_root_url[0] == '/') {
|
||||
logging(
|
||||
'DEBUG',
|
||||
"URL :: get_absolute_url($relative_url): configured public root URL is relative ".
|
||||
"($public_root_url) => try to detect it from current request infos.");
|
||||
$public_root_url = (
|
||||
'http'.(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'?'s':'').'://'.
|
||||
$_SERVER['HTTP_HOST'].$public_root_url);
|
||||
logging(
|
||||
'DEBUG',
|
||||
"URL :: get_absolute_url($relative_url): detected public_root_url: $public_root_url");
|
||||
logging('DEBUG', "URL :: get_absolute_url($relative_url): configured public root URL is relative ($public_root_url) => try to detect it from current request infos.");
|
||||
$public_root_url = 'http'.(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'?'s':'').'://'.$_SERVER['HTTP_HOST'].$public_root_url;
|
||||
logging('DEBUG', "URL :: get_absolute_url($relative_url): detected public_root_url: $public_root_url");
|
||||
}
|
||||
|
||||
if (substr($relative_url, 0, 1) == '/')
|
||||
|
@ -426,23 +352,23 @@ function get_absolute_url($relative_url=null) {
|
|||
/**
|
||||
* Check if specified URL is absolute
|
||||
*
|
||||
* @param $url string The URL to check
|
||||
* @param[in] $url string The URL to check
|
||||
*
|
||||
* @return boolean True if specified URL is absolute, False otherwise
|
||||
* @retval boolean True if specified URL is absolute, False otherwise
|
||||
**/
|
||||
function is_absolute_url($url) {
|
||||
return boolval(preg_match('#^https?://#', $url));
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Add parameter in specified URL
|
||||
*
|
||||
* @param &$url string The reference of the URL
|
||||
* @param $param string The parameter name
|
||||
* @param $value string The parameter value
|
||||
* @param $encode boolean Set if parameter value must be URL encoded (optional, default: true)
|
||||
* @param[in] &$url string The reference of the URL
|
||||
* @param[in] $param string The parameter name
|
||||
* @param[in] $value string The parameter value
|
||||
* @param[in] $encode boolean Set if parameter value must be URL encoded (optional, default: true)
|
||||
*
|
||||
* @return string|null The completed URL
|
||||
* @retval string|null The completed URL
|
||||
*/
|
||||
function add_url_parameter(&$url, $param, $value, $encode=true) {
|
||||
if (strpos($url, '?') === false)
|
||||
|
@ -478,21 +404,17 @@ class UrlRequest {
|
|||
public function __construct($current_url, $handler_infos, $url_params=array()) {
|
||||
$this -> current_url = $current_url;
|
||||
$this -> handler = $handler_infos['handler'];
|
||||
$this -> authenticated = (
|
||||
isset($handler_infos['authenticated'])?
|
||||
boolval($handler_infos['authenticated']):true);
|
||||
$this -> api_mode = (
|
||||
isset($handler_infos['api_mode'])?
|
||||
boolval($handler_infos['api_mode']):false);
|
||||
$this -> authenticated = (isset($handler_infos['authenticated'])?boolval($handler_infos['authenticated']):true);
|
||||
$this -> api_mode = (isset($handler_infos['api_mode'])?boolval($handler_infos['api_mode']):false);
|
||||
$this -> url_params = $url_params;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get request info
|
||||
*
|
||||
* @param $key string The name of the info
|
||||
* @param[in] $key string The name of the info
|
||||
*
|
||||
* @return mixed The value
|
||||
* @retval mixed The value
|
||||
**/
|
||||
public function __get($key) {
|
||||
if ($key == 'current_url')
|
||||
|
@ -517,9 +439,9 @@ class UrlRequest {
|
|||
/**
|
||||
* Check is request info is set
|
||||
*
|
||||
* @param $key string The name of the info
|
||||
* @param[in] $key string The name of the info
|
||||
*
|
||||
* @return boolval True is info is set, False otherwise
|
||||
* @retval boolval True is info is set, False otherwise
|
||||
**/
|
||||
public function __isset($key) {
|
||||
if (in_array($key, array('current_url', 'handler', 'authenticated')))
|
||||
|
@ -530,11 +452,10 @@ class UrlRequest {
|
|||
/**
|
||||
* Get request parameter
|
||||
*
|
||||
* @param $parameter string The name of the parameter
|
||||
* @param $decode string If true, the parameter value will be urldecoded
|
||||
* (optional, default: true)
|
||||
* @param[in] $parameter string The name of the parameter
|
||||
* @param[in] $decode string If true, the parameter value will be urldecoded (optional, default: true)
|
||||
*
|
||||
* @return mixed The value or false if parameter does not exists
|
||||
* @retval mixed The value or false if parameter does not exists
|
||||
**/
|
||||
public function get_param($parameter, $decode=true) {
|
||||
if (array_key_exists($parameter, $this->url_params)) {
|
||||
|
@ -545,10 +466,10 @@ class UrlRequest {
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get request referer (if known)
|
||||
*
|
||||
* @return string|null The request referer URL if known, null otherwise
|
||||
* @retval string|null The request referer URL if known, null otherwise
|
||||
*/
|
||||
public function get_referer() {
|
||||
if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'])
|
||||
|
|
Binary file not shown.
|
@ -1,24 +1,10 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: 2022-04-24 19:09+0200\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: Benjamin Renard <brenard@easter-eggs.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: fr_FR\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 2.4.2\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-helpers.php:5
|
||||
msgid "Invalid element identifier."
|
||||
msgstr "Identifiant d'élément invalide."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-helpers.php:9
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:222
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:246
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:203
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:227
|
||||
#, php-format
|
||||
msgid "Item #% s not found."
|
||||
msgstr "L'élément #%s est introuvable."
|
||||
|
@ -27,24 +13,24 @@ msgstr "L'élément #%s est introuvable."
|
|||
msgid "Smarty version not supported."
|
||||
msgstr "Une erreur est survenue en affichant cette page."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/smarty.php:148
|
||||
#: /home/brenard/dev/eesyphp/includes/smarty.php:134
|
||||
msgid "No template specified."
|
||||
msgstr "Aucun template spécifié."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/smarty.php:166
|
||||
#: /home/brenard/dev/eesyphp/includes/smarty.php:145
|
||||
msgid "An error occurred while viewing this page."
|
||||
msgstr "Une erreur est survenue en affichant cette page."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:7
|
||||
#: /home/brenard/dev/eesyphp/includes/translation.php:140
|
||||
#: /home/brenard/dev/eesyphp/includes/translation.php:134
|
||||
msgid "Hello world !"
|
||||
msgstr "Bonjour tout le monde !"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:31
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:27
|
||||
msgid "Any"
|
||||
msgstr "Peu importe"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:89
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:84
|
||||
msgid ""
|
||||
"An error occurred while listing the items. If the problem persists, please "
|
||||
"contact support."
|
||||
|
@ -52,25 +38,26 @@ msgstr ""
|
|||
"Une erreur est survenue en listant les éléments. Si le problème persiste, "
|
||||
"merci de prendre contact avec le support."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:104
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:96
|
||||
#: /home/brenard/dev/eesyphp/templates/search.tpl:22
|
||||
msgid "Search"
|
||||
msgstr "Rechercher"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:128
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:118
|
||||
#, php-format
|
||||
msgid "Element %s"
|
||||
msgstr "Élément %s"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:142
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:130
|
||||
#, php-format
|
||||
msgid "The element '% s' has been created."
|
||||
msgstr "L'élément '%s' a bien été créé."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:146
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:134
|
||||
msgid "An error occurred while saving this item."
|
||||
msgstr "Une erreur est survenue en enregistrant cet élément."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:153
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:140
|
||||
msgid ""
|
||||
"There are errors preventing this item from being saved. Please correct them "
|
||||
"before attempting to add this item."
|
||||
|
@ -78,29 +65,29 @@ msgstr ""
|
|||
"Des erreurs empêchent l'enregistrement de cet élément. Merci de les corriger "
|
||||
"avant de tenter d'ajouter cet élément."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:160
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:146
|
||||
msgid "New"
|
||||
msgstr "Nouveau"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:170
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:156
|
||||
msgid "You cannot edit this item."
|
||||
msgstr "Vous ne pouvez pas modifier cet élément."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:183
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:169
|
||||
#, php-format
|
||||
msgid "You have not made any changes to element '% s'."
|
||||
msgstr "Vous n'avez apporté aucune modification à l'élément '%s'."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:187
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:173
|
||||
#, php-format
|
||||
msgid "The element '% s' has been updated successfully."
|
||||
msgstr "L'élément '%s' a bien été mise à jour."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:191
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:177
|
||||
msgid "An error occurred while updating this item."
|
||||
msgstr "Une erreur est survenue en mettant à jour cet élément."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:199
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:184
|
||||
msgid ""
|
||||
"There are errors preventing this item from being saved. Please correct them "
|
||||
"before attempting to save your changes."
|
||||
|
@ -108,38 +95,38 @@ msgstr ""
|
|||
"Des erreurs empêchent l'enregistrement de cet élément. Merci de les corriger "
|
||||
"avant de tenter d'enregistrer vos modifications."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:211
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:194
|
||||
#, php-format
|
||||
msgid "Element %s: Modification"
|
||||
msgstr "Élément %s : Modification"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:226
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:207
|
||||
msgid "This item is already archived."
|
||||
msgstr "Cet élément est déjà archivé."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:229
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:210
|
||||
msgid "You cannot archive this item."
|
||||
msgstr "Vous ne pouvez pas archiver cet élément."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:232
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:213
|
||||
#, php-format
|
||||
msgid "The element '% s' has been archived successfully."
|
||||
msgstr "L'élément '%s' a bien été archivé."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:235
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:216
|
||||
msgid "An error occurred while archiving this item."
|
||||
msgstr "Une erreur est survenue en archivant cet élément."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:249
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:230
|
||||
msgid "You cannot delete this item."
|
||||
msgstr "Vous ne pouvez pas supprimer cet élément."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:252
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:233
|
||||
#, php-format
|
||||
msgid "The element '% s' has been deleted successfully."
|
||||
msgstr "L'élément '%s' a bien été supprimé."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:255
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:236
|
||||
msgid "An error occurred while deleting this item."
|
||||
msgstr "Une erreur est survenue en supprimant cet élément."
|
||||
|
||||
|
@ -163,182 +150,7 @@ msgstr "Refusé"
|
|||
msgid "Archived"
|
||||
msgstr "Archivé"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:59
|
||||
msgid "Fail to list PHP files."
|
||||
msgstr "Impossible de lister les fichiers PHP."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:76
|
||||
msgid "Fail to extract messages from PHP files using xgettext."
|
||||
msgstr ""
|
||||
"Impossible d'extraire les messages depuis les fichiers PHP en utilisant "
|
||||
"xgettext."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:86
|
||||
msgid "Fail to list JS files."
|
||||
msgstr "Impossible de lister les fichiers JS."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:103
|
||||
msgid "Fail to extract messages from JS files using xgettext."
|
||||
msgstr ""
|
||||
"Impossible d'extraire les messages depuis les fichiers JS en utilisant "
|
||||
"xgettext."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:116
|
||||
msgid ""
|
||||
"Fail to extract messages from template files using tsmarty2c.php script."
|
||||
msgstr ""
|
||||
"Impossible d'extraire les messages depuis les fichiers template en utilisant "
|
||||
"le script tsmarty2c.php."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:142
|
||||
msgid "Fail to merge messages using msgcat."
|
||||
msgstr "Impossible de fusionner les messages en utilisant msgcat."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:147
|
||||
msgid "Extract messages that need to be translated"
|
||||
msgstr "Extraire les messages devant être traduit"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:149
|
||||
msgid "This command could be used to generate/update lang/messages.pot file."
|
||||
msgstr ""
|
||||
"Cette commande peut-être utilisée pour générer/mettre à jour le fichier lang/"
|
||||
"messages.pot."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:165
|
||||
#, php-format
|
||||
msgid "Compendium file %s not found."
|
||||
msgstr "Fichier compendium %s introuvable."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:172
|
||||
#, php-format
|
||||
msgid "POT file not found (%s). Please run extract_messages first."
|
||||
msgstr ""
|
||||
"Fichier POT introuvable (%s). Merci de lancer la commande extract_messages "
|
||||
"pour commencer."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:184
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:301
|
||||
#, php-format
|
||||
msgid "Lang directory '%s' found"
|
||||
msgstr "Dossier de langue '%s' trouvé"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:190
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:307
|
||||
#, php-format
|
||||
msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it."
|
||||
msgstr ""
|
||||
"Le dossier LC_MESSAGES est introuvable dans le dossier de langue '%s', on "
|
||||
"l'ignore."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:205
|
||||
#, php-format
|
||||
msgid "Fail to init messages in %s PO file using msginit (%s)."
|
||||
msgstr ""
|
||||
"Impossible d'initialiser les messages dans le fichier PO %s en utilisant "
|
||||
"msginit (%s)."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:223
|
||||
#, php-format
|
||||
msgid "Fail to update messages in %s PO file using msgmerge (%s)."
|
||||
msgstr ""
|
||||
"Impossible de mettre à jour les messages dans les fichiers PO %s en "
|
||||
"utilisant msgmerge (%s)."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:229
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:315
|
||||
#, php-format
|
||||
msgid "PO file not found in lang '%s' directory, ignore it."
|
||||
msgstr ""
|
||||
"Le fichier PO est introuvable dans le dossier de langue '%s', on l'ignore."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:236
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:356
|
||||
#, php-format
|
||||
msgid "Fail to open root lang directory (%s)."
|
||||
msgstr "Impossible d'ouvrir le dossier racine des langues (%s)."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:241
|
||||
msgid "Update messages in translation PO lang files"
|
||||
msgstr ""
|
||||
"Mettre à jour les messages dans les fichiers de traduction PO existants"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:243
|
||||
msgid ""
|
||||
"This command could be used to init/update PO files in lang/*/LC_MESSAGES "
|
||||
"directories."
|
||||
msgstr ""
|
||||
"Cette commande peut-être utilisée pour initialiser/mettre à jour les "
|
||||
"fichiers PO les dossiers lang/*/LC_MESSAGES."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:270
|
||||
#, php-format
|
||||
msgid "Lang alias symlink found: %s -> %s"
|
||||
msgstr "Lien symbolique d'alias de langue trouvé : %s -> %s"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:277
|
||||
#, php-format
|
||||
msgid "JSON catalog symlink for %s -> %s created (%s)"
|
||||
msgstr "Lien symbolique de catalogue JSON pour %s -> %s créé (%s)"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:281
|
||||
#, php-format
|
||||
msgid "Fail to create JSON catalog symlink for %s -> %s (%s)"
|
||||
msgstr ""
|
||||
"Impossible de créer le lien symbolique de catalogue JSON pour %s -> %s (%s)"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:287
|
||||
#, php-format
|
||||
msgid "JSON catalog symlink for %s -> %s already exist (%s)"
|
||||
msgstr "Le lien symbolique du catalogue JSON pour %s -> %s existe déjà (%s)"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:293
|
||||
#, php-format
|
||||
msgid ""
|
||||
"JSON catalog file for %s already exist, but it's not a symlink to %s (%s)"
|
||||
msgstr ""
|
||||
"Le catalogue JSON pour %s existe, mais il ne s'agit par d'un lien symbolique "
|
||||
"vers %s (%s)"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:329
|
||||
#, php-format
|
||||
msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)."
|
||||
msgstr ""
|
||||
"Impossible de compiler les messages depuis le fichier PO %s en tant que "
|
||||
"fichier MO en utilisant msgfmt (%s)."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:339
|
||||
#, php-format
|
||||
msgid "Fail to open %s JSON catalog file in write mode (%s)."
|
||||
msgstr "Impossible d'ouvrir le catalogue JSON %s en mode écriture (%s)."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:344
|
||||
#, php-format
|
||||
msgid "Fail to write %s JSON catalog in file (%s)."
|
||||
msgstr "Impossible d'écrire le fichier du catalogue JSON %s (%s)."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:349
|
||||
#, php-format
|
||||
msgid "%s JSON catalog writed (%s)."
|
||||
msgstr "Catalogue JSON %s créé (%s)."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:362
|
||||
msgid ""
|
||||
"Compile messages from existing translation PO lang files to corresponding MO "
|
||||
"files and JSON catalogs"
|
||||
msgstr ""
|
||||
"Compiler les messages depuis les fichiers PO de traduction existants vers "
|
||||
"les fichiers MO et les catalogues JSON correspondant"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:367
|
||||
msgid ""
|
||||
"This command could be used to compile PO files in lang/*/LC_MESSAGES "
|
||||
"directories to MO files and as JSON catalogs in public_html/translations."
|
||||
msgstr ""
|
||||
"Cette commande peut-être utilisée pour compiler les fichiers PO dans les "
|
||||
"dossiers lang/*/LC_MESSAGES en fichiers MO and en tant que catalogues JSON "
|
||||
"dans public_html/translations."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/mail.php:14
|
||||
#: /home/brenard/dev/eesyphp/includes/mail.php:12
|
||||
#, php-format
|
||||
msgid ""
|
||||
"\n"
|
||||
|
@ -351,53 +163,11 @@ msgstr ""
|
|||
"\n"
|
||||
"Mail originalement destiné à %s."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:92
|
||||
msgid "Bad request"
|
||||
msgstr "Mauvaise requête"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:93
|
||||
msgid "Invalid request."
|
||||
msgstr "Requête invalide."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:96
|
||||
msgid "Authentication required"
|
||||
msgstr "Authentification requise"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:97
|
||||
msgid "You have to be authenticated to access to this page."
|
||||
msgstr "Vous devez être authentifié pour accéder à cette page."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:100
|
||||
msgid "Access denied"
|
||||
msgstr "Accès interdit"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:101
|
||||
msgid ""
|
||||
"You do not have access to this application. If you think this is an error, "
|
||||
"please contact support."
|
||||
msgstr ""
|
||||
"Vous n'avez pas accès à cette application. Si vous pensez qu'il s'agit d'une "
|
||||
"erreur, merci de prendre contact avec le support."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:104
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:86
|
||||
msgid "Whoops ! Page not found"
|
||||
msgstr "Oups ! Page introuvable"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:105
|
||||
msgid "The requested page can not be found."
|
||||
msgstr "La page demandée est introuvable."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:113
|
||||
msgid "Error"
|
||||
msgstr "Erreur"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:114
|
||||
msgid "An unknown error occurred. If problem persist, please contact support."
|
||||
msgstr ""
|
||||
"Une erreur inconnue est survenue. Si le problème persiste, merci de prendre "
|
||||
"contact avec le support."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:159
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:109
|
||||
msgid ""
|
||||
"Unable to determine the requested page. If the problem persists, please "
|
||||
"contact support."
|
||||
|
@ -405,7 +175,7 @@ msgstr ""
|
|||
"Impossible de déterminer la page demandée. Si le problème persiste, merci de "
|
||||
"prendre contact avec le support."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:312
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:247
|
||||
msgid ""
|
||||
"Unable to determine the requested page (loop detected). If the problem "
|
||||
"persists, please contact support."
|
||||
|
@ -413,54 +183,54 @@ msgstr ""
|
|||
"Impossible de déterminer la page demandée (boucle détectée). Si le problème "
|
||||
"persiste, merci de prendre contact avec le support."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:337
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:271
|
||||
msgid "This request cannot be processed."
|
||||
msgstr "Cette requête ne peut être traitée."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:355
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:288
|
||||
msgid "This request could not be processed correctly."
|
||||
msgstr "Cette requête n'a put être traitée correctement."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:8
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:7
|
||||
#, php-format
|
||||
msgid "The CLI command '%s' already exists."
|
||||
msgstr "La commande CLI '%s' n'existe pas."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:13
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:12
|
||||
#, php-format
|
||||
msgid "The CLI command '%s' handler is not callable !"
|
||||
msgstr "La fonction implémentant la commande CLI '%s' n'est pas exécutable !"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:54
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:45
|
||||
#, php-format
|
||||
msgid "Usage: %s [-h] [-qd] command\n"
|
||||
msgstr "Utilisation: %s [-h] [-qd] commande\n"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:55
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:46
|
||||
msgid " -h Show this message\n"
|
||||
msgstr " -h Affiche ce message\n"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:56
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:47
|
||||
msgid " -q / -d Quiet/Debug mode\n"
|
||||
msgstr " -q / -d Mode silencieux/debug\n"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:57
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:48
|
||||
msgid " --trace Trace mode (the most verbose)\n"
|
||||
msgstr " --trace Mode trace (le plus verbeux)\n"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:58
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:49
|
||||
msgid " command Command to run\n"
|
||||
msgstr " command La commande à exécuter\n"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:60
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:51
|
||||
msgid "Available commands:\n"
|
||||
msgstr "Commandes disponibles:\n"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:102
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:86
|
||||
msgid "Only one command could be executed !"
|
||||
msgstr "Une seul commande peut-être exécutée !"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:127
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:110
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Invalid parameter \"%s\".\n"
|
||||
|
@ -470,198 +240,275 @@ msgstr ""
|
|||
"Note : Les paramètres/arguments de la requête doivent être placés après "
|
||||
"celle-ci."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:149
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:127
|
||||
#, php-format
|
||||
msgid "An exception occured running command %s"
|
||||
msgstr "Une exception est survenue en exécutant la commande %s"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:155
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:133
|
||||
#, php-format
|
||||
msgid "Item #%s:\n"
|
||||
msgstr "Élément #%s :\n"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:156
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:134
|
||||
#, php-format
|
||||
msgid "ID: %s"
|
||||
msgstr "ID : %s"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:157
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:135
|
||||
#, php-format
|
||||
msgid "Name: '%s'"
|
||||
msgstr "Nom : %s"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:158
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:136
|
||||
#, php-format
|
||||
msgid "Date: %s"
|
||||
msgstr "Date : %s"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:160
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:137
|
||||
#, php-format
|
||||
msgid "Description: %s"
|
||||
msgstr "Description : %s"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:161
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:137
|
||||
msgid "Not set"
|
||||
msgstr "Non-défini"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:163
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:138
|
||||
#, php-format
|
||||
msgid "Status: %s"
|
||||
msgstr "Statut : %s"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:216
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:191
|
||||
msgid "No item.\n"
|
||||
msgstr "Aucun élément.\n"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:242
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:217
|
||||
#, php-format
|
||||
msgid "%d item(s)"
|
||||
msgstr "%d élément(s)"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:248
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:223
|
||||
msgid "List/search items"
|
||||
msgstr "Lister/rechercher les éléments"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:249
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:224
|
||||
msgid "[patterns]"
|
||||
msgstr "[mots clés]"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:251
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:226
|
||||
msgid "-o|--orderby Ordering list criterion. Possible values:"
|
||||
msgstr "-o|--orderby Critère de tri de la liste. Valeurs possibles :"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:253
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:228
|
||||
msgid "-r|--reverse Reverse order"
|
||||
msgstr "-r|--reverse Ordre inverse"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:254
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:229
|
||||
msgid "-s|--status Filter on status. Possible values:"
|
||||
msgstr "-s|--status Filtrer sur le statut. Valeurs possibles :"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:261
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:236
|
||||
msgid "You must provide a valid ID."
|
||||
msgstr "Vous devez fournir un ID valide."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:267
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:291
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:242
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:266
|
||||
#, php-format
|
||||
msgid "Item #%s not found."
|
||||
msgstr "Élément #%s introuvable."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:275
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:250
|
||||
msgid "Show item"
|
||||
msgstr "Voir un élément"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:276
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:251
|
||||
msgid "[ID]"
|
||||
msgstr "[ID]"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:281
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:256
|
||||
msgid "You must provide item ID."
|
||||
msgstr "Vous devez fournir un ID valide."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:285
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:260
|
||||
msgid "Invalid item ID"
|
||||
msgstr "ID d'élément invalide"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:296
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:271
|
||||
msgid "Are you sure you want to delete this item? Type 'yes' to continue: "
|
||||
msgstr ""
|
||||
"Êtes-vous sûre de vouloir supprimer cet élément ? Taper 'yes' pour "
|
||||
"continuer : "
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:300
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:275
|
||||
msgid "User cancel"
|
||||
msgstr "L'utilisateur a annulé"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:306
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:281
|
||||
#, php-format
|
||||
msgid "An error occured deleting item #%d."
|
||||
msgstr "Une erreur est survenue en supprimant l'élément #%d."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:313
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:288
|
||||
msgid "Delete item"
|
||||
msgstr "Supprimer un élément"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:314
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:289
|
||||
msgid "[item ID]"
|
||||
msgstr "[ID de l'élément]"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:326
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:301
|
||||
msgid "Export items (as CSV)"
|
||||
msgstr "Exporter les éléments (au format CSV)"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:327
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:302
|
||||
msgid "[output file path]"
|
||||
msgstr "[chemin du fichier de sortie]"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:342
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:314
|
||||
msgid "Restore items (from CSV)"
|
||||
msgstr "Restaurer les éléments (depuis un fichier CSV)"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:343
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:315
|
||||
msgid "[input file path]"
|
||||
msgstr "[chemin du fichier d'entrée]"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:412
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:374
|
||||
msgid "Cron to handle item expiration"
|
||||
msgstr "Cron gérant l'expiration des éléments"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:415
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:377
|
||||
msgid "-j/--just-try Just-try mode : do not really removed expired item(s)"
|
||||
msgstr ""
|
||||
"-j/--just-try Mode just-try : Ne supprime pas réellement les éléments "
|
||||
"expirés"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:416
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:378
|
||||
msgid "-m/--max-age Item expiration limit (in days, optional)"
|
||||
msgstr ""
|
||||
"-m/--max-age Limite d'expiration des éléments (en secondes, optionnel)"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:4
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:171
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:200
|
||||
msgid "Confirmation"
|
||||
msgstr "Confirmation"
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:393
|
||||
msgid "Fail to list PHP files."
|
||||
msgstr "Impossible de lister les fichiers PHP."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:5
|
||||
msgid "Do you confirm?"
|
||||
msgstr "Confirmez-vous ?"
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:410
|
||||
msgid "Fail to extract messages from PHP files using xgettext."
|
||||
msgstr ""
|
||||
"Impossible d'extraire les messages depuis les fichiers PHP en utilisant "
|
||||
"xgettext."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:11
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:108
|
||||
msgid "Cancel"
|
||||
msgstr "Annuler"
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:421
|
||||
msgid ""
|
||||
"Fail to extract messages from template files using tsmarty2c.php script."
|
||||
msgstr ""
|
||||
"Impossible d'extraire les messages depuis les fichiers template en utilisant "
|
||||
"le script tsmarty2c.php."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:17
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:114
|
||||
msgid "Validate"
|
||||
msgstr "Valider"
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:431
|
||||
msgid "Fail to merge messages using msgcat."
|
||||
msgstr "Impossible de fusionner les messages en utilisant msgcat."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:52
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:436
|
||||
msgid "Extract messages that need to be translated"
|
||||
msgstr "Extraire les messages devant être traduit"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:91
|
||||
msgid "Question"
|
||||
msgstr "Question"
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:438
|
||||
msgid "This command could be used to generate/update lang/messages.pot file."
|
||||
msgstr ""
|
||||
"Cette commande peut-être utilisée pour générer/mettre à jour le fichier lang/"
|
||||
"messages.pot."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:92
|
||||
msgid "Please enter your answer below:"
|
||||
msgstr "Merci de saisir vos réponses ci-dessous :"
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:449
|
||||
#, php-format
|
||||
msgid "POT file not found (%s). Please run extract_messages first."
|
||||
msgstr ""
|
||||
"Fichier POT introuvable (%s). Merci de lancer la commande extract_messages "
|
||||
"pour commencer."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:143
|
||||
msgid "Please wait"
|
||||
msgstr "Merci de patienter"
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:460
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:519
|
||||
#, php-format
|
||||
msgid "Lang directory '%s' found"
|
||||
msgstr "Dossier de langue '%s' trouvé"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:144
|
||||
msgid "Please wait while your request is being processed."
|
||||
msgstr "Merci de patienter pendant le traitement de votre requête."
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:467
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:526
|
||||
#, php-format
|
||||
msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it."
|
||||
msgstr ""
|
||||
"Le dossier LC_MESSAGES est introuvable dans le dossier de langue '%s', on "
|
||||
"l'ignore."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:172
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:201
|
||||
msgid "Are you sure?"
|
||||
msgstr "Êtes-vous sure ?"
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:477
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:536
|
||||
#, php-format
|
||||
msgid "PO file not found in lang '%s' directory, ignore it."
|
||||
msgstr ""
|
||||
"Le fichier PO est introuvable dans le dossier de langue '%s', on l'ignore."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:489
|
||||
#, php-format
|
||||
msgid "Fail to update messages in %s PO file using msgmerge (%s)."
|
||||
msgstr ""
|
||||
"Impossible de mettre à jour les messages dans les fichiers PO %s en "
|
||||
"utilisant msgmerge (%s)."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:499
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:560
|
||||
#, php-format
|
||||
msgid "Fail to open root lang directory (%s)."
|
||||
msgstr "Impossible d'ouvrir le dossier racine des langues (%s)."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:504
|
||||
msgid "Update messages in existing translation PO lang files"
|
||||
msgstr ""
|
||||
"Mettre à jour les messages dans les fichiers de traduction PO existants"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:506
|
||||
msgid ""
|
||||
"This command could be used to update PO files in lang/*/LC_MESSAGES "
|
||||
"directories."
|
||||
msgstr ""
|
||||
"Cette commande peut-être utilisée pour mettre à jour les fichiers PO les "
|
||||
"dossiers lang/*/LC_MESSAGES."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:550
|
||||
#, php-format
|
||||
msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)."
|
||||
msgstr ""
|
||||
"Impossible de compiler les messages depuis le fichier PO %s en tant que "
|
||||
"fichier MO en utilisant msgfmt (%s)."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:565
|
||||
msgid ""
|
||||
"Compile messages from existing translation PO lang files to corresponding MO "
|
||||
"files"
|
||||
msgstr ""
|
||||
"Compiler les messages depuis les fichiers PO de traduction existants vers "
|
||||
"les fichiers MO correspondant"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:567
|
||||
msgid ""
|
||||
"This command could be used to compile PO files in lang/*/LC_MESSAGES "
|
||||
"directories to MO files."
|
||||
msgstr ""
|
||||
"Cette commande peut-être utilisée pour compiler les fichiers PO dans les "
|
||||
"dossiers lang/*/LC_MESSAGES en fichiers MO."
|
||||
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"Language: fr_FR\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 2.4.2\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/templates/form.tpl:7
|
||||
#: /home/brenard/dev/eesyphp/templates/search.tpl:36
|
||||
|
@ -763,10 +610,12 @@ msgid "No item found."
|
|||
msgstr "Aucun élément trouvé."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/templates/search.tpl:68
|
||||
msgid "%3 element"
|
||||
msgid_plural "Elements %1 to %2 on %3"
|
||||
msgstr[0] "%3 élément"
|
||||
msgstr[1] "Éléments %1 à %2 sur %3"
|
||||
msgid "Element(s) %1 to %2 on %3"
|
||||
msgstr "Élément(s) %1 à %2 sur %3"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/templates/error_404.tpl:3
|
||||
msgid "The requested page can not be found."
|
||||
msgstr "La page demandée est introuvable."
|
||||
|
||||
#: /home/brenard/dev/eesyphp/templates/show.tpl:14
|
||||
msgid "Creation date"
|
||||
|
@ -795,31 +644,3 @@ msgstr "Cette application contient quelques pages de démo :"
|
|||
#: /home/brenard/dev/eesyphp/templates/homepage.tpl:9
|
||||
msgid "Search page"
|
||||
msgstr "Page de recherche"
|
||||
|
||||
#~ msgid "Update messages in existing translation PO lang files"
|
||||
#~ msgstr ""
|
||||
#~ "Mettre à jour les messages dans les fichiers de traduction PO existants"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "This command could be used to update PO files in lang/*/LC_MESSAGES "
|
||||
#~ "directories."
|
||||
#~ msgstr ""
|
||||
#~ "Cette commande peut-être utilisée pour mettre à jour les fichiers PO les "
|
||||
#~ "dossiers lang/*/LC_MESSAGES."
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Compile messages from existing translation PO lang files to corresponding "
|
||||
#~ "MO files"
|
||||
#~ msgstr ""
|
||||
#~ "Compiler les messages depuis les fichiers PO de traduction existants vers "
|
||||
#~ "les fichiers MO correspondant"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "This command could be used to compile PO files in lang/*/LC_MESSAGES "
|
||||
#~ "directories to MO files."
|
||||
#~ msgstr ""
|
||||
#~ "Cette commande peut-être utilisée pour compiler les fichiers PO dans les "
|
||||
#~ "dossiers lang/*/LC_MESSAGES en fichiers MO."
|
||||
|
||||
#~ msgid "Element(s) %1 to %2 on %3"
|
||||
#~ msgstr "Élément(s) %1 à %2 sur %3"
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"POT-Creation-Date: 2022-04-24 20:13+0200\n"
|
||||
"PO-Revision-Date: 2022-04-24 20:13+0200\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
|
@ -1,48 +0,0 @@
|
|||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:4
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:171
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:200
|
||||
msgid "Confirmation"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:5
|
||||
msgid "Do you confirm?"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:11
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:108
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:17
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:114
|
||||
msgid "Validate"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:44
|
||||
msgid "Error"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:52
|
||||
msgid "OK"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:91
|
||||
msgid "Question"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:92
|
||||
msgid "Please enter your answer below:"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:143
|
||||
msgid "Please wait"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:144
|
||||
msgid "Please wait while your request is being processed."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:172
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:201
|
||||
msgid "Are you sure?"
|
||||
msgstr ""
|
|
@ -1,18 +1,10 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"POT-Creation-Date: 2022-04-24 20:13+0200\n"
|
||||
"PO-Revision-Date: 2022-04-24 20:13+0200\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-helpers.php:5
|
||||
msgid "Invalid element identifier."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-helpers.php:9
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:222
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:246
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:203
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:227
|
||||
#, php-format
|
||||
msgid "Item #% s not found."
|
||||
msgstr ""
|
||||
|
@ -21,113 +13,114 @@ msgstr ""
|
|||
msgid "Smarty version not supported."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/smarty.php:148
|
||||
#: /home/brenard/dev/eesyphp/includes/smarty.php:134
|
||||
msgid "No template specified."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/smarty.php:166
|
||||
#: /home/brenard/dev/eesyphp/includes/smarty.php:145
|
||||
msgid "An error occurred while viewing this page."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:7
|
||||
#: /home/brenard/dev/eesyphp/includes/translation.php:140
|
||||
#: /home/brenard/dev/eesyphp/includes/translation.php:134
|
||||
msgid "Hello world !"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:31
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:27
|
||||
msgid "Any"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:89
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:84
|
||||
msgid ""
|
||||
"An error occurred while listing the items. If the problem persists, please "
|
||||
"contact support."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:104
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:96
|
||||
#: /home/brenard/dev/eesyphp/templates/search.tpl:22
|
||||
msgid "Search"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:128
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:118
|
||||
#, php-format
|
||||
msgid "Element %s"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:142
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:130
|
||||
#, php-format
|
||||
msgid "The element '% s' has been created."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:146
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:134
|
||||
msgid "An error occurred while saving this item."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:153
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:140
|
||||
msgid ""
|
||||
"There are errors preventing this item from being saved. Please correct them "
|
||||
"before attempting to add this item."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:160
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:146
|
||||
msgid "New"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:170
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:156
|
||||
msgid "You cannot edit this item."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:183
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:169
|
||||
#, php-format
|
||||
msgid "You have not made any changes to element '% s'."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:187
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:173
|
||||
#, php-format
|
||||
msgid "The element '% s' has been updated successfully."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:191
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:177
|
||||
msgid "An error occurred while updating this item."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:199
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:184
|
||||
msgid ""
|
||||
"There are errors preventing this item from being saved. Please correct them "
|
||||
"before attempting to save your changes."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:211
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:194
|
||||
#, php-format
|
||||
msgid "Element %s: Modification"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:226
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:207
|
||||
msgid "This item is already archived."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:229
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:210
|
||||
msgid "You cannot archive this item."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:232
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:213
|
||||
#, php-format
|
||||
msgid "The element '% s' has been archived successfully."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:235
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:216
|
||||
msgid "An error occurred while archiving this item."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:249
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:230
|
||||
msgid "You cannot delete this item."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:252
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:233
|
||||
#, php-format
|
||||
msgid "The element '% s' has been deleted successfully."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:255
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:236
|
||||
msgid "An error occurred while deleting this item."
|
||||
msgstr ""
|
||||
|
||||
|
@ -151,152 +144,7 @@ msgstr ""
|
|||
msgid "Archived"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:59
|
||||
msgid "Fail to list PHP files."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:76
|
||||
msgid "Fail to extract messages from PHP files using xgettext."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:86
|
||||
msgid "Fail to list JS files."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:103
|
||||
msgid "Fail to extract messages from JS files using xgettext."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:116
|
||||
msgid ""
|
||||
"Fail to extract messages from template files using tsmarty2c.php script."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:142
|
||||
msgid "Fail to merge messages using msgcat."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:147
|
||||
msgid "Extract messages that need to be translated"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:149
|
||||
msgid "This command could be used to generate/update lang/messages.pot file."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:165
|
||||
#, php-format
|
||||
msgid "Compendium file %s not found."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:172
|
||||
#, php-format
|
||||
msgid "POT file not found (%s). Please run extract_messages first."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:184
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:301
|
||||
#, php-format
|
||||
msgid "Lang directory '%s' found"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:190
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:307
|
||||
#, php-format
|
||||
msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:205
|
||||
#, php-format
|
||||
msgid "Fail to init messages in %s PO file using msginit (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:223
|
||||
#, php-format
|
||||
msgid "Fail to update messages in %s PO file using msgmerge (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:229
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:315
|
||||
#, php-format
|
||||
msgid "PO file not found in lang '%s' directory, ignore it."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:236
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:356
|
||||
#, php-format
|
||||
msgid "Fail to open root lang directory (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:241
|
||||
msgid "Update messages in translation PO lang files"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:243
|
||||
msgid ""
|
||||
"This command could be used to init/update PO files in lang/*/LC_MESSAGES "
|
||||
"directories."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:270
|
||||
#, php-format
|
||||
msgid "Lang alias symlink found: %s -> %s"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:277
|
||||
#, php-format
|
||||
msgid "JSON catalog symlink for %s -> %s created (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:281
|
||||
#, php-format
|
||||
msgid "Fail to create JSON catalog symlink for %s -> %s (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:287
|
||||
#, php-format
|
||||
msgid "JSON catalog symlink for %s -> %s already exist (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:293
|
||||
#, php-format
|
||||
msgid ""
|
||||
"JSON catalog file for %s already exist, but it's not a symlink to %s (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:329
|
||||
#, php-format
|
||||
msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:339
|
||||
#, php-format
|
||||
msgid "Fail to open %s JSON catalog file in write mode (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:344
|
||||
#, php-format
|
||||
msgid "Fail to write %s JSON catalog in file (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:349
|
||||
#, php-format
|
||||
msgid "%s JSON catalog writed (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:362
|
||||
msgid ""
|
||||
"Compile messages from existing translation PO lang files to corresponding MO "
|
||||
"files and JSON catalogs"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:367
|
||||
msgid ""
|
||||
"This command could be used to compile PO files in lang/*/LC_MESSAGES "
|
||||
"directories to MO files and as JSON catalogs in public_html/translations."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/mail.php:14
|
||||
#: /home/brenard/dev/eesyphp/includes/mail.php:12
|
||||
#, php-format
|
||||
msgid ""
|
||||
"\n"
|
||||
|
@ -305,302 +153,308 @@ msgid ""
|
|||
"Mail initialy intended for %s."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:92
|
||||
msgid "Bad request"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:93
|
||||
msgid "Invalid request."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:96
|
||||
msgid "Authentication required"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:97
|
||||
msgid "You have to be authenticated to access to this page."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:100
|
||||
msgid "Access denied"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:101
|
||||
msgid ""
|
||||
"You do not have access to this application. If you think this is an error, "
|
||||
"please contact support."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:104
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:86
|
||||
msgid "Whoops ! Page not found"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:105
|
||||
msgid "The requested page can not be found."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:113
|
||||
msgid "Error"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:114
|
||||
msgid "An unknown error occurred. If problem persist, please contact support."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:159
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:109
|
||||
msgid ""
|
||||
"Unable to determine the requested page. If the problem persists, please "
|
||||
"contact support."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:312
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:247
|
||||
msgid ""
|
||||
"Unable to determine the requested page (loop detected). If the problem "
|
||||
"persists, please contact support."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:337
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:271
|
||||
msgid "This request cannot be processed."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:355
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:288
|
||||
msgid "This request could not be processed correctly."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:8
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:7
|
||||
#, php-format
|
||||
msgid "The CLI command '%s' already exists."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:13
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:12
|
||||
#, php-format
|
||||
msgid "The CLI command '%s' handler is not callable !"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:54
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:45
|
||||
#, php-format
|
||||
msgid "Usage: %s [-h] [-qd] command\n"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:55
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:46
|
||||
msgid " -h Show this message\n"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:56
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:47
|
||||
msgid " -q / -d Quiet/Debug mode\n"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:57
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:48
|
||||
msgid " --trace Trace mode (the most verbose)\n"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:58
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:49
|
||||
msgid " command Command to run\n"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:60
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:51
|
||||
msgid "Available commands:\n"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:102
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:86
|
||||
msgid "Only one command could be executed !"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:127
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:110
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Invalid parameter \"%s\".\n"
|
||||
"Note: Command's parameter/argument must be place after the command."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:149
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:127
|
||||
#, php-format
|
||||
msgid "An exception occured running command %s"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:155
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:133
|
||||
#, php-format
|
||||
msgid "Item #%s:\n"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:156
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:134
|
||||
#, php-format
|
||||
msgid "ID: %s"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:157
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:135
|
||||
#, php-format
|
||||
msgid "Name: '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:158
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:136
|
||||
#, php-format
|
||||
msgid "Date: %s"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:160
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:137
|
||||
#, php-format
|
||||
msgid "Description: %s"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:161
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:137
|
||||
msgid "Not set"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:163
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:138
|
||||
#, php-format
|
||||
msgid "Status: %s"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:216
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:191
|
||||
msgid "No item.\n"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:242
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:217
|
||||
#, php-format
|
||||
msgid "%d item(s)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:248
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:223
|
||||
msgid "List/search items"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:249
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:224
|
||||
msgid "[patterns]"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:251
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:226
|
||||
msgid "-o|--orderby Ordering list criterion. Possible values:"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:253
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:228
|
||||
msgid "-r|--reverse Reverse order"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:254
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:229
|
||||
msgid "-s|--status Filter on status. Possible values:"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:261
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:236
|
||||
msgid "You must provide a valid ID."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:267
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:291
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:242
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:266
|
||||
#, php-format
|
||||
msgid "Item #%s not found."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:275
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:250
|
||||
msgid "Show item"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:276
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:251
|
||||
msgid "[ID]"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:281
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:256
|
||||
msgid "You must provide item ID."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:285
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:260
|
||||
msgid "Invalid item ID"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:296
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:271
|
||||
msgid "Are you sure you want to delete this item? Type 'yes' to continue: "
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:300
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:275
|
||||
msgid "User cancel"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:306
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:281
|
||||
#, php-format
|
||||
msgid "An error occured deleting item #%d."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:313
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:288
|
||||
msgid "Delete item"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:314
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:289
|
||||
msgid "[item ID]"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:326
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:301
|
||||
msgid "Export items (as CSV)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:327
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:302
|
||||
msgid "[output file path]"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:342
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:314
|
||||
msgid "Restore items (from CSV)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:343
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:315
|
||||
msgid "[input file path]"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:412
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:374
|
||||
msgid "Cron to handle item expiration"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:415
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:377
|
||||
msgid "-j/--just-try Just-try mode : do not really removed expired item(s)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:416
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:378
|
||||
msgid "-m/--max-age Item expiration limit (in days, optional)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:4
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:171
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:200
|
||||
msgid "Confirmation"
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:393
|
||||
msgid "Fail to list PHP files."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:5
|
||||
msgid "Do you confirm?"
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:410
|
||||
msgid "Fail to extract messages from PHP files using xgettext."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:11
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:108
|
||||
msgid "Cancel"
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:421
|
||||
msgid ""
|
||||
"Fail to extract messages from template files using tsmarty2c.php script."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:17
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:114
|
||||
msgid "Validate"
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:431
|
||||
msgid "Fail to merge messages using msgcat."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:52
|
||||
msgid "OK"
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:436
|
||||
msgid "Extract messages that need to be translated"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:91
|
||||
msgid "Question"
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:438
|
||||
msgid "This command could be used to generate/update lang/messages.pot file."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:92
|
||||
msgid "Please enter your answer below:"
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:449
|
||||
#, php-format
|
||||
msgid "POT file not found (%s). Please run extract_messages first."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:143
|
||||
msgid "Please wait"
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:460
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:519
|
||||
#, php-format
|
||||
msgid "Lang directory '%s' found"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:144
|
||||
msgid "Please wait while your request is being processed."
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:467
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:526
|
||||
#, php-format
|
||||
msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:172
|
||||
#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:201
|
||||
msgid "Are you sure?"
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:477
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:536
|
||||
#, php-format
|
||||
msgid "PO file not found in lang '%s' directory, ignore it."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:489
|
||||
#, php-format
|
||||
msgid "Fail to update messages in %s PO file using msgmerge (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:499
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:560
|
||||
#, php-format
|
||||
msgid "Fail to open root lang directory (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:504
|
||||
msgid "Update messages in existing translation PO lang files"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:506
|
||||
msgid ""
|
||||
"This command could be used to update PO files in lang/*/LC_MESSAGES "
|
||||
"directories."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:550
|
||||
#, php-format
|
||||
msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:565
|
||||
msgid ""
|
||||
"Compile messages from existing translation PO lang files to corresponding MO "
|
||||
"files"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:567
|
||||
msgid ""
|
||||
"This command could be used to compile PO files in lang/*/LC_MESSAGES "
|
||||
"directories to MO files."
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
#: /home/brenard/dev/eesyphp/templates/form.tpl:7
|
||||
#: /home/brenard/dev/eesyphp/templates/search.tpl:36
|
||||
#: /home/brenard/dev/eesyphp/templates/show.tpl:5
|
||||
|
@ -698,10 +552,12 @@ msgid "No item found."
|
|||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/templates/search.tpl:68
|
||||
msgid "%3 element"
|
||||
msgid_plural "Elements %1 to %2 on %3"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgid "Element(s) %1 to %2 on %3"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/templates/error_404.tpl:3
|
||||
msgid "The requested page can not be found."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/templates/show.tpl:14
|
||||
msgid "Creation date"
|
||||
|
|
|
@ -3,8 +3,8 @@ msgid "Invalid element identifier."
|
|||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-helpers.php:9
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:222
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:246
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:203
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:227
|
||||
#, php-format
|
||||
msgid "Item #% s not found."
|
||||
msgstr ""
|
||||
|
@ -13,113 +13,113 @@ msgstr ""
|
|||
msgid "Smarty version not supported."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/smarty.php:148
|
||||
#: /home/brenard/dev/eesyphp/includes/smarty.php:134
|
||||
msgid "No template specified."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/smarty.php:166
|
||||
#: /home/brenard/dev/eesyphp/includes/smarty.php:145
|
||||
msgid "An error occurred while viewing this page."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:7
|
||||
#: /home/brenard/dev/eesyphp/includes/translation.php:140
|
||||
#: /home/brenard/dev/eesyphp/includes/translation.php:134
|
||||
msgid "Hello world !"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:31
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:27
|
||||
msgid "Any"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:89
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:84
|
||||
msgid ""
|
||||
"An error occurred while listing the items. If the problem persists, please "
|
||||
"contact support."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:104
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:96
|
||||
msgid "Search"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:128
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:118
|
||||
#, php-format
|
||||
msgid "Element %s"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:142
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:130
|
||||
#, php-format
|
||||
msgid "The element '% s' has been created."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:146
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:134
|
||||
msgid "An error occurred while saving this item."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:153
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:140
|
||||
msgid ""
|
||||
"There are errors preventing this item from being saved. Please correct them "
|
||||
"before attempting to add this item."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:160
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:146
|
||||
msgid "New"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:170
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:156
|
||||
msgid "You cannot edit this item."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:183
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:169
|
||||
#, php-format
|
||||
msgid "You have not made any changes to element '% s'."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:187
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:173
|
||||
#, php-format
|
||||
msgid "The element '% s' has been updated successfully."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:191
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:177
|
||||
msgid "An error occurred while updating this item."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:199
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:184
|
||||
msgid ""
|
||||
"There are errors preventing this item from being saved. Please correct them "
|
||||
"before attempting to save your changes."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:211
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:194
|
||||
#, php-format
|
||||
msgid "Element %s: Modification"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:226
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:207
|
||||
msgid "This item is already archived."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:229
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:210
|
||||
msgid "You cannot archive this item."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:232
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:213
|
||||
#, php-format
|
||||
msgid "The element '% s' has been archived successfully."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:235
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:216
|
||||
msgid "An error occurred while archiving this item."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:249
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:230
|
||||
msgid "You cannot delete this item."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:252
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:233
|
||||
#, php-format
|
||||
msgid "The element '% s' has been deleted successfully."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:255
|
||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:236
|
||||
msgid "An error occurred while deleting this item."
|
||||
msgstr ""
|
||||
|
||||
|
@ -143,152 +143,7 @@ msgstr ""
|
|||
msgid "Archived"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:59
|
||||
msgid "Fail to list PHP files."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:76
|
||||
msgid "Fail to extract messages from PHP files using xgettext."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:86
|
||||
msgid "Fail to list JS files."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:103
|
||||
msgid "Fail to extract messages from JS files using xgettext."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:116
|
||||
msgid ""
|
||||
"Fail to extract messages from template files using tsmarty2c.php script."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:142
|
||||
msgid "Fail to merge messages using msgcat."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:147
|
||||
msgid "Extract messages that need to be translated"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:149
|
||||
msgid "This command could be used to generate/update lang/messages.pot file."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:165
|
||||
#, php-format
|
||||
msgid "Compendium file %s not found."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:172
|
||||
#, php-format
|
||||
msgid "POT file not found (%s). Please run extract_messages first."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:184
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:301
|
||||
#, php-format
|
||||
msgid "Lang directory '%s' found"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:190
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:307
|
||||
#, php-format
|
||||
msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:205
|
||||
#, php-format
|
||||
msgid "Fail to init messages in %s PO file using msginit (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:223
|
||||
#, php-format
|
||||
msgid "Fail to update messages in %s PO file using msgmerge (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:229
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:315
|
||||
#, php-format
|
||||
msgid "PO file not found in lang '%s' directory, ignore it."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:236
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:356
|
||||
#, php-format
|
||||
msgid "Fail to open root lang directory (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:241
|
||||
msgid "Update messages in translation PO lang files"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:243
|
||||
msgid ""
|
||||
"This command could be used to init/update PO files in lang/*/LC_MESSAGES "
|
||||
"directories."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:270
|
||||
#, php-format
|
||||
msgid "Lang alias symlink found: %s -> %s"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:277
|
||||
#, php-format
|
||||
msgid "JSON catalog symlink for %s -> %s created (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:281
|
||||
#, php-format
|
||||
msgid "Fail to create JSON catalog symlink for %s -> %s (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:287
|
||||
#, php-format
|
||||
msgid "JSON catalog symlink for %s -> %s already exist (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:293
|
||||
#, php-format
|
||||
msgid ""
|
||||
"JSON catalog file for %s already exist, but it's not a symlink to %s (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:329
|
||||
#, php-format
|
||||
msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:339
|
||||
#, php-format
|
||||
msgid "Fail to open %s JSON catalog file in write mode (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:344
|
||||
#, php-format
|
||||
msgid "Fail to write %s JSON catalog in file (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:349
|
||||
#, php-format
|
||||
msgid "%s JSON catalog writed (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:362
|
||||
msgid ""
|
||||
"Compile messages from existing translation PO lang files to corresponding MO "
|
||||
"files and JSON catalogs"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:367
|
||||
msgid ""
|
||||
"This command could be used to compile PO files in lang/*/LC_MESSAGES "
|
||||
"directories to MO files and as JSON catalogs in public_html/translations."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/mail.php:14
|
||||
#: /home/brenard/dev/eesyphp/includes/mail.php:12
|
||||
#, php-format
|
||||
msgid ""
|
||||
"\n"
|
||||
|
@ -297,253 +152,301 @@ msgid ""
|
|||
"Mail initialy intended for %s."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:92
|
||||
msgid "Bad request"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:93
|
||||
msgid "Invalid request."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:96
|
||||
msgid "Authentication required"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:97
|
||||
msgid "You have to be authenticated to access to this page."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:100
|
||||
msgid "Access denied"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:101
|
||||
msgid ""
|
||||
"You do not have access to this application. If you think this is an error, "
|
||||
"please contact support."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:104
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:86
|
||||
msgid "Whoops ! Page not found"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:105
|
||||
msgid "The requested page can not be found."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:113
|
||||
msgid "Error"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:114
|
||||
msgid "An unknown error occurred. If problem persist, please contact support."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:159
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:109
|
||||
msgid ""
|
||||
"Unable to determine the requested page. If the problem persists, please "
|
||||
"contact support."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:312
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:247
|
||||
msgid ""
|
||||
"Unable to determine the requested page (loop detected). If the problem "
|
||||
"persists, please contact support."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:337
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:271
|
||||
msgid "This request cannot be processed."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:355
|
||||
#: /home/brenard/dev/eesyphp/includes/url.php:288
|
||||
msgid "This request could not be processed correctly."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:8
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:7
|
||||
#, php-format
|
||||
msgid "The CLI command '%s' already exists."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:13
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:12
|
||||
#, php-format
|
||||
msgid "The CLI command '%s' handler is not callable !"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:54
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:45
|
||||
#, php-format
|
||||
msgid "Usage: %s [-h] [-qd] command\n"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:55
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:46
|
||||
msgid " -h Show this message\n"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:56
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:47
|
||||
msgid " -q / -d Quiet/Debug mode\n"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:57
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:48
|
||||
msgid " --trace Trace mode (the most verbose)\n"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:58
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:49
|
||||
msgid " command Command to run\n"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:60
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:51
|
||||
msgid "Available commands:\n"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:102
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:86
|
||||
msgid "Only one command could be executed !"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:127
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:110
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Invalid parameter \"%s\".\n"
|
||||
"Note: Command's parameter/argument must be place after the command."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:149
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:127
|
||||
#, php-format
|
||||
msgid "An exception occured running command %s"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:155
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:133
|
||||
#, php-format
|
||||
msgid "Item #%s:\n"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:156
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:134
|
||||
#, php-format
|
||||
msgid "ID: %s"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:157
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:135
|
||||
#, php-format
|
||||
msgid "Name: '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:158
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:136
|
||||
#, php-format
|
||||
msgid "Date: %s"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:160
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:137
|
||||
#, php-format
|
||||
msgid "Description: %s"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:161
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:137
|
||||
msgid "Not set"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:163
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:138
|
||||
#, php-format
|
||||
msgid "Status: %s"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:216
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:191
|
||||
msgid "No item.\n"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:242
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:217
|
||||
#, php-format
|
||||
msgid "%d item(s)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:248
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:223
|
||||
msgid "List/search items"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:249
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:224
|
||||
msgid "[patterns]"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:251
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:226
|
||||
msgid "-o|--orderby Ordering list criterion. Possible values:"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:253
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:228
|
||||
msgid "-r|--reverse Reverse order"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:254
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:229
|
||||
msgid "-s|--status Filter on status. Possible values:"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:261
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:236
|
||||
msgid "You must provide a valid ID."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:267
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:291
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:242
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:266
|
||||
#, php-format
|
||||
msgid "Item #%s not found."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:275
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:250
|
||||
msgid "Show item"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:276
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:251
|
||||
msgid "[ID]"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:281
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:256
|
||||
msgid "You must provide item ID."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:285
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:260
|
||||
msgid "Invalid item ID"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:296
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:271
|
||||
msgid "Are you sure you want to delete this item? Type 'yes' to continue: "
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:300
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:275
|
||||
msgid "User cancel"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:306
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:281
|
||||
#, php-format
|
||||
msgid "An error occured deleting item #%d."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:313
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:288
|
||||
msgid "Delete item"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:314
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:289
|
||||
msgid "[item ID]"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:326
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:301
|
||||
msgid "Export items (as CSV)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:327
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:302
|
||||
msgid "[output file path]"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:342
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:314
|
||||
msgid "Restore items (from CSV)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:343
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:315
|
||||
msgid "[input file path]"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:412
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:374
|
||||
msgid "Cron to handle item expiration"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:415
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:377
|
||||
msgid "-j/--just-try Just-try mode : do not really removed expired item(s)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:416
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:378
|
||||
msgid "-m/--max-age Item expiration limit (in days, optional)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:393
|
||||
msgid "Fail to list PHP files."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:410
|
||||
msgid "Fail to extract messages from PHP files using xgettext."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:421
|
||||
msgid ""
|
||||
"Fail to extract messages from template files using tsmarty2c.php script."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:431
|
||||
msgid "Fail to merge messages using msgcat."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:436
|
||||
msgid "Extract messages that need to be translated"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:438
|
||||
msgid "This command could be used to generate/update lang/messages.pot file."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:449
|
||||
#, php-format
|
||||
msgid "POT file not found (%s). Please run extract_messages first."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:460
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:519
|
||||
#, php-format
|
||||
msgid "Lang directory '%s' found"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:467
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:526
|
||||
#, php-format
|
||||
msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:477
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:536
|
||||
#, php-format
|
||||
msgid "PO file not found in lang '%s' directory, ignore it."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:489
|
||||
#, php-format
|
||||
msgid "Fail to update messages in %s PO file using msgmerge (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:499
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:560
|
||||
#, php-format
|
||||
msgid "Fail to open root lang directory (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:504
|
||||
msgid "Update messages in existing translation PO lang files"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:506
|
||||
msgid ""
|
||||
"This command could be used to update PO files in lang/*/LC_MESSAGES "
|
||||
"directories."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:550
|
||||
#, php-format
|
||||
msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:565
|
||||
msgid ""
|
||||
"Compile messages from existing translation PO lang files to corresponding MO "
|
||||
"files"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/includes/cli.php:567
|
||||
msgid ""
|
||||
"This command could be used to compile PO files in lang/*/LC_MESSAGES "
|
||||
"directories to MO files."
|
||||
msgstr ""
|
||||
|
|
|
@ -102,10 +102,12 @@ msgid "No item found."
|
|||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/templates/search.tpl:68
|
||||
msgid "%3 element"
|
||||
msgid_plural "Elements %1 to %2 on %3"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgid "Element(s) %1 to %2 on %3"
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/templates/error_404.tpl:3
|
||||
msgid "The requested page can not be found."
|
||||
msgstr ""
|
||||
|
||||
#: /home/brenard/dev/eesyphp/templates/show.tpl:14
|
||||
msgid "Creation date"
|
||||
|
|
|
@ -1,219 +0,0 @@
|
|||
var myconfirm = function(opts) {
|
||||
var confirm = false;
|
||||
var dialog = Bootstrap4Dialog.show({
|
||||
title: opts.title || _('Confirmation'),
|
||||
message: opts.question || _('Do you confirm?'),
|
||||
autodestroy: true,
|
||||
type: opts.type || Bootstrap4Dialog.TYPE_LIGHT,
|
||||
scrollable: opts.scrollable || false,
|
||||
buttons: [
|
||||
{
|
||||
label: opts.cancel_label || _('Cancel'),
|
||||
action: function(dialog) {
|
||||
dialog.modal('hide');
|
||||
}
|
||||
},
|
||||
{
|
||||
label: opts.confirm_label || _('Validate'),
|
||||
cssClass: 'btn-danger',
|
||||
action: function(dialog) {
|
||||
confirm = true;
|
||||
dialog.modal('hide');
|
||||
}
|
||||
}
|
||||
],
|
||||
close: function() {
|
||||
if (confirm) {
|
||||
if (jQuery.type(opts.onconfirm) == 'function') {
|
||||
opts.onconfirm(opts.data);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (jQuery.type(opts.oncancel) == 'function') {
|
||||
opts.oncancel(opts.data);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return dialog;
|
||||
};
|
||||
|
||||
var myalert = function(msg, title, opts) {
|
||||
if (!opts) opts={};
|
||||
var dialog = Bootstrap4Dialog.show({
|
||||
title: title || opts.title || _('Error'),
|
||||
message: msg,
|
||||
autodestroy: true,
|
||||
type: opts.type || Bootstrap4Dialog.TYPE_DANGER,
|
||||
size: opts.size || Bootstrap4Dialog.SIZE_MEDIUM,
|
||||
scrollable: opts.scrollable || false,
|
||||
buttons: [
|
||||
{
|
||||
label: opts.btnLabel || _('OK'),
|
||||
cssClass: opts.btnCssClass ||'btn-primary',
|
||||
action: function(dialog) {
|
||||
dialog.modal('hide');
|
||||
}
|
||||
},
|
||||
],
|
||||
close: function() {
|
||||
if ($.type(opts.onclose) == 'function') {
|
||||
opts.onclose(opts.data);
|
||||
}
|
||||
}
|
||||
});
|
||||
return dialog;
|
||||
};
|
||||
|
||||
var myprompt = function(opts) {
|
||||
if ($.type(opts) != "object") {
|
||||
opts={};
|
||||
}
|
||||
var submited = false;
|
||||
|
||||
var onSubmitBtnClick = function(dialog) {
|
||||
submited = true;
|
||||
var val = dialog.getModalBody().find('input').val();
|
||||
if (jQuery.type(opts.onsubmit) == 'function') {
|
||||
if (!opts.onsubmit(val, opts.data)) {
|
||||
if (jQuery.type(opts.onerror) == 'function') {
|
||||
opts.onerror(val, opts.data);
|
||||
}
|
||||
if (!opts.closeonerror) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
dialog.modal('hide');
|
||||
};
|
||||
|
||||
var dialog = Bootstrap4Dialog.show({
|
||||
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'/>",
|
||||
autodestroy: true,
|
||||
type: opts.type || Bootstrap4Dialog.TYPE_INFO,
|
||||
size: opts.size || Bootstrap4Dialog.SIZE_MEDIUM,
|
||||
data: {
|
||||
oncancel: opts.oncancel,
|
||||
onsubmit: opts.onsubmit,
|
||||
onerror: opts.onerror,
|
||||
closeonerror: opts.closeonerror || false,
|
||||
default_answer: opts.default_answer,
|
||||
onSubmitBtnClick: onSubmitBtnClick,
|
||||
data: opts.data,
|
||||
submited: false,
|
||||
},
|
||||
buttons: [
|
||||
{
|
||||
label: opts.cancel_label || _('Cancel'),
|
||||
action: function(dialog) {
|
||||
dialog.modal('hide');
|
||||
}
|
||||
},
|
||||
{
|
||||
label: opts.submit_label || _('Validate'),
|
||||
cssClass: 'btn-danger',
|
||||
action: onSubmitBtnClick
|
||||
}
|
||||
],
|
||||
open: function() {
|
||||
var input = dialog.getModalBody().find('input');
|
||||
input.on('keyup', function (e) {
|
||||
if (e.keyCode == 13) {
|
||||
opts.onSubmitBtnClick(dialog);
|
||||
}
|
||||
});
|
||||
if (opts.default_answer) {
|
||||
input.val(opts.default_answer);
|
||||
}
|
||||
},
|
||||
close: function() {
|
||||
if (!submited && jQuery.type(opts.oncancel) == 'function') {
|
||||
opts.oncancel(opts.data);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var myloadingalert = function(opts) {
|
||||
if (!opts) opts={};
|
||||
var opened = false;
|
||||
var closed = false;
|
||||
var dialog = Bootstrap4Dialog.show({
|
||||
title: opts.title || _('Please wait'),
|
||||
message: opts.message || _('Please wait while your request is being processed.'),
|
||||
autodestroy: true,
|
||||
type: opts.type || Bootstrap4Dialog.TYPE_INFO,
|
||||
size: opts.size || Bootstrap4Dialog.SIZE_NORMAL,
|
||||
centered: opts.centered || true,
|
||||
closable: opts.closable || false,
|
||||
open: function () {
|
||||
if (closed)
|
||||
dialog.modal('hide');
|
||||
opened = true;
|
||||
}
|
||||
});
|
||||
return {
|
||||
'modal': dialog,
|
||||
'close': function() {
|
||||
if (opened)
|
||||
dialog.modal('hide');
|
||||
closed = true;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
$( document ).ready(function () {
|
||||
// Manage .myconfirm-link
|
||||
$('.myconfirm-link').click(function(event) {
|
||||
event.preventDefault();
|
||||
myconfirm({
|
||||
title: $(this).data("myconfirm-title") || _("Confirmation"),
|
||||
question: "<p><strong>"+($(this).data("myconfirm-question") || _("Are you sure?"))+"</strong></p>",
|
||||
onconfirm: function(data) {
|
||||
window.location = data.confirm_url;
|
||||
},
|
||||
data: {
|
||||
confirm_url: $(this).data('myconfirm-url')
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Manage .myloading-link
|
||||
$('.myloading-link').click(function(event) {
|
||||
event.preventDefault();
|
||||
myloadingalert({
|
||||
title: $(this).data("myloading-title"),
|
||||
message: $(this).data("myloading-message"),
|
||||
});
|
||||
window.location = $(this).data('myloading-url');
|
||||
});
|
||||
|
||||
// Manage .myconfirm-btn
|
||||
$('.myconfirm-btn').click(function(event) {
|
||||
if ($(this).data('myconfirm-btn-confirmed') == '1') {
|
||||
$(this).data('myconfirm-btn-confirmed', '');
|
||||
return true;
|
||||
}
|
||||
event.preventDefault();
|
||||
myconfirm({
|
||||
title: $(this).data("myconfirm-title") || _("Confirmation"),
|
||||
question: "<p><strong>"+($(this).data("myconfirm-question") || _("Are you sure?"))+"</strong></p>",
|
||||
onconfirm: function(data) {
|
||||
data.btn.data('myconfirm-btn-confirmed', 1);
|
||||
data.btn.click();
|
||||
},
|
||||
data: {
|
||||
btn: $(this)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Manage .myloading-btn
|
||||
$('.myloading-btn').click(function(event) {
|
||||
myloadingalert({
|
||||
title: $(this).data("myloading-title"),
|
||||
message: $(this).data("myloading-message"),
|
||||
});
|
||||
});
|
||||
});
|
|
@ -1,23 +0,0 @@
|
|||
/*
|
||||
* I18n
|
||||
*/
|
||||
var translations;
|
||||
var translations_data;
|
||||
|
||||
function _(string) {
|
||||
var translated = (translations?translations.gettext(string):string);
|
||||
return (translated !== '') ? translated : string;
|
||||
}
|
||||
|
||||
function ngettext(singular, plural, n) {
|
||||
return (
|
||||
translations?
|
||||
translations.ngettext(singular, plural, n):
|
||||
(n > 1?plural:singular)
|
||||
);
|
||||
}
|
||||
|
||||
$(document).ready( function() {
|
||||
// Load Gettext translations
|
||||
translations = babel.Translations.load(translations_data?translations_data:{}).install();
|
||||
});
|
|
@ -1,160 +0,0 @@
|
|||
/**
|
||||
* Babel JavaScript Support
|
||||
*
|
||||
* Copyright (C) 2008-2011 Edgewall Software
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://babel.edgewall.org/wiki/License.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals. For the exact contribution history, see the revision
|
||||
* history and logs, available at http://babel.edgewall.org/log/.
|
||||
*/
|
||||
|
||||
/**
|
||||
* A simple module that provides a gettext like translation interface.
|
||||
* The catalog passed to load() must be a object conforming to this
|
||||
* interface::
|
||||
*
|
||||
* {
|
||||
* messages: an object of {msgid: translations} items where
|
||||
* translations is an array of messages or a single
|
||||
* string if the message is not pluralizable.
|
||||
* plural_expr: the plural expression for the language.
|
||||
* locale: the identifier for this locale.
|
||||
* domain: the name of the domain.
|
||||
* }
|
||||
*
|
||||
* Missing elements in the object are ignored.
|
||||
*
|
||||
* Typical usage::
|
||||
*
|
||||
* var translations = babel.Translations.load(...).install();
|
||||
*/
|
||||
var babel = new function() {
|
||||
|
||||
var defaultPluralExpr = function(n) { return n == 1 ? 0 : 1; };
|
||||
var formatRegex = /%?%(?:\(([^\)]+)\))?([disr])/g;
|
||||
|
||||
/**
|
||||
* A translations object implementing the gettext interface
|
||||
*/
|
||||
var Translations = this.Translations = function(locale, domain) {
|
||||
this.messages = {};
|
||||
this.locale = locale || 'unknown';
|
||||
this.domain = domain || 'messages';
|
||||
this.pluralexpr = defaultPluralExpr;
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a new translations object from the catalog and return it.
|
||||
* See the babel-module comment for more details.
|
||||
*/
|
||||
Translations.load = function(catalog) {
|
||||
var rv = new Translations();
|
||||
rv.load(catalog);
|
||||
return rv;
|
||||
};
|
||||
|
||||
Translations.prototype = {
|
||||
/**
|
||||
* translate a single string.
|
||||
*/
|
||||
gettext: function(string) {
|
||||
var translated = this.messages[string];
|
||||
if (typeof translated == 'undefined')
|
||||
return string;
|
||||
return (typeof translated == 'string') ? translated : translated[0];
|
||||
},
|
||||
|
||||
/**
|
||||
* translate a pluralizable string
|
||||
*/
|
||||
ngettext: function(singular, plural, n) {
|
||||
var translated = this.messages[singular];
|
||||
if (typeof translated == 'undefined')
|
||||
return (n == 1) ? singular : plural;
|
||||
return translated[this.pluralexpr(n)];
|
||||
},
|
||||
|
||||
/**
|
||||
* Install this translation document wide. After this call, there are
|
||||
* three new methods on the window object: _, gettext and ngettext
|
||||
*/
|
||||
install: function() {
|
||||
var self = this;
|
||||
window.gettext = function(string) {
|
||||
return self.gettext(string);
|
||||
};
|
||||
window.ngettext = function(singular, plural, n) {
|
||||
return self.ngettext(singular, plural, n);
|
||||
};
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Works like Translations.load but updates the instance rather
|
||||
* then creating a new one.
|
||||
*/
|
||||
load: function(catalog) {
|
||||
if (catalog.messages)
|
||||
this.update(catalog.messages);
|
||||
if (catalog.plural_expr)
|
||||
this.setPluralExpr(catalog.plural_expr);
|
||||
if (catalog.locale)
|
||||
this.locale = catalog.locale;
|
||||
if (catalog.domain)
|
||||
this.domain = catalog.domain;
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates the translations with the object of messages.
|
||||
*/
|
||||
update: function(mapping) {
|
||||
for (var key in mapping)
|
||||
if (mapping.hasOwnProperty(key))
|
||||
this.messages[key] = mapping[key];
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the plural expression
|
||||
*/
|
||||
setPluralExpr: function(expr) {
|
||||
this.pluralexpr = new Function('n', 'return +(' + expr + ')');
|
||||
return this;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* A python inspired string formatting function. Supports named and
|
||||
* positional placeholders and "s", "d" and "i" as type characters
|
||||
* without any formatting specifications.
|
||||
*
|
||||
* Examples::
|
||||
*
|
||||
* babel.format(_('Hello %s'), name)
|
||||
* babel.format(_('Progress: %(percent)s%%'), {percent: 100})
|
||||
*/
|
||||
this.format = function() {
|
||||
var arg, string = arguments[0], idx = 0;
|
||||
if (arguments.length == 1)
|
||||
return string;
|
||||
else if (arguments.length == 2 && typeof arguments[1] == 'object')
|
||||
arg = arguments[1];
|
||||
else {
|
||||
arg = [];
|
||||
for (var i = 1, n = arguments.length; i != n; ++i)
|
||||
arg[i - 1] = arguments[i];
|
||||
}
|
||||
return string.replace(formatRegex, function(all, name, type) {
|
||||
if (all[0] == all[1]) return all.substring(1);
|
||||
var value = arg[name || idx++];
|
||||
return (type == 'i' || type == 'd') ? +value : value;
|
||||
});
|
||||
}
|
||||
|
||||
};
|
1
public_html/lib/bootstrap4-dialog/bootstrap-dialog.min.css
vendored
Normal file
1
public_html/lib/bootstrap4-dialog/bootstrap-dialog.min.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.bootstrap-dialog .modal-header{border-top-left-radius:4px;border-top-right-radius:4px}.bootstrap-dialog .bootstrap-dialog-title{color:#fff;display:inline-block;font-size:16px}.bootstrap-dialog .bootstrap-dialog-message{font-size:14px}.bootstrap-dialog .bootstrap-dialog-button-icon{margin-right:3px}.bootstrap-dialog .bootstrap-dialog-close-button{font-size:20px;float:right;opacity:.9;filter:alpha(opacity=90)}.bootstrap-dialog .bootstrap-dialog-close-button:hover{cursor:pointer;opacity:1;filter:alpha(opacity=100)}.bootstrap-dialog.type-default .modal-header{background-color:#fff}.bootstrap-dialog.type-default .bootstrap-dialog-title{color:#333}.bootstrap-dialog.type-info .modal-header{background-color:#5bc0de}.bootstrap-dialog.type-primary .modal-header{background-color:#337ab7}.bootstrap-dialog.type-success .modal-header{background-color:#5cb85c}.bootstrap-dialog.type-warning .modal-header{background-color:#f0ad4e}.bootstrap-dialog.type-danger .modal-header{background-color:#d9534f}.bootstrap-dialog.size-large .bootstrap-dialog-title{font-size:24px}.bootstrap-dialog.size-large .bootstrap-dialog-close-button{font-size:30px}.bootstrap-dialog.size-large .bootstrap-dialog-message{font-size:18px}.bootstrap-dialog .icon-spin{display:inline-block;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}
|
1
public_html/lib/bootstrap4-dialog/bootstrap-dialog.min.js
vendored
Normal file
1
public_html/lib/bootstrap4-dialog/bootstrap-dialog.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
111
public_html/lib/bootstrap4-dialog/css/bootstrap-dialog.css
vendored
Normal file
111
public_html/lib/bootstrap4-dialog/css/bootstrap-dialog.css
vendored
Normal file
|
@ -0,0 +1,111 @@
|
|||
.bootstrap-dialog {
|
||||
/* dialog types */
|
||||
/**
|
||||
* Icon animation
|
||||
* Copied from font-awesome: http://fontawesome.io/
|
||||
**/
|
||||
/** End of icon animation **/
|
||||
}
|
||||
.bootstrap-dialog .modal-header {
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
}
|
||||
.bootstrap-dialog .bootstrap-dialog-title {
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
}
|
||||
.bootstrap-dialog .bootstrap-dialog-message {
|
||||
font-size: 14px;
|
||||
}
|
||||
.bootstrap-dialog .bootstrap-dialog-button-icon {
|
||||
margin-right: 3px;
|
||||
}
|
||||
.bootstrap-dialog .bootstrap-dialog-close-button {
|
||||
font-size: 20px;
|
||||
float: right;
|
||||
opacity: 0.9;
|
||||
filter: alpha(opacity=90);
|
||||
}
|
||||
.bootstrap-dialog .bootstrap-dialog-close-button:hover {
|
||||
cursor: pointer;
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100);
|
||||
}
|
||||
.bootstrap-dialog.type-default .modal-header {
|
||||
background-color: #fff;
|
||||
}
|
||||
.bootstrap-dialog.type-default .bootstrap-dialog-title {
|
||||
color: #333;
|
||||
}
|
||||
.bootstrap-dialog.type-info .modal-header {
|
||||
background-color: #5bc0de;
|
||||
}
|
||||
.bootstrap-dialog.type-primary .modal-header {
|
||||
background-color: #337ab7;
|
||||
}
|
||||
.bootstrap-dialog.type-success .modal-header {
|
||||
background-color: #5cb85c;
|
||||
}
|
||||
.bootstrap-dialog.type-warning .modal-header {
|
||||
background-color: #f0ad4e;
|
||||
}
|
||||
.bootstrap-dialog.type-danger .modal-header {
|
||||
background-color: #d9534f;
|
||||
}
|
||||
.bootstrap-dialog.size-large .bootstrap-dialog-title {
|
||||
font-size: 24px;
|
||||
}
|
||||
.bootstrap-dialog.size-large .bootstrap-dialog-close-button {
|
||||
font-size: 30px;
|
||||
}
|
||||
.bootstrap-dialog.size-large .bootstrap-dialog-message {
|
||||
font-size: 18px;
|
||||
}
|
||||
.bootstrap-dialog .icon-spin {
|
||||
display: inline-block;
|
||||
-moz-animation: spin 2s infinite linear;
|
||||
-o-animation: spin 2s infinite linear;
|
||||
-webkit-animation: spin 2s infinite linear;
|
||||
animation: spin 2s infinite linear;
|
||||
}
|
||||
@-moz-keyframes spin {
|
||||
0% {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-moz-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-o-keyframes spin {
|
||||
0% {
|
||||
-o-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-o-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-ms-keyframes spin {
|
||||
0% {
|
||||
-ms-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-ms-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
1
public_html/lib/bootstrap4-dialog/css/bootstrap-dialog.min.css
vendored
Normal file
1
public_html/lib/bootstrap4-dialog/css/bootstrap-dialog.min.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.bootstrap-dialog .modal-header{border-top-left-radius:4px;border-top-right-radius:4px}.bootstrap-dialog .bootstrap-dialog-title{color:#fff;display:inline-block;font-size:16px}.bootstrap-dialog .bootstrap-dialog-message{font-size:14px}.bootstrap-dialog .bootstrap-dialog-button-icon{margin-right:3px}.bootstrap-dialog .bootstrap-dialog-close-button{font-size:20px;float:right;opacity:.9;filter:alpha(opacity=90)}.bootstrap-dialog .bootstrap-dialog-close-button:hover{cursor:pointer;opacity:1;filter:alpha(opacity=100)}.bootstrap-dialog.type-default .modal-header{background-color:#fff}.bootstrap-dialog.type-default .bootstrap-dialog-title{color:#333}.bootstrap-dialog.type-info .modal-header{background-color:#5bc0de}.bootstrap-dialog.type-primary .modal-header{background-color:#337ab7}.bootstrap-dialog.type-success .modal-header{background-color:#5cb85c}.bootstrap-dialog.type-warning .modal-header{background-color:#f0ad4e}.bootstrap-dialog.type-danger .modal-header{background-color:#d9534f}.bootstrap-dialog.size-large .bootstrap-dialog-title{font-size:24px}.bootstrap-dialog.size-large .bootstrap-dialog-close-button{font-size:30px}.bootstrap-dialog.size-large .bootstrap-dialog-message{font-size:18px}.bootstrap-dialog .icon-spin{display:inline-block;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}
|
1389
public_html/lib/bootstrap4-dialog/js/bootstrap-dialog.js
vendored
Normal file
1389
public_html/lib/bootstrap4-dialog/js/bootstrap-dialog.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
1
public_html/lib/bootstrap4-dialog/js/bootstrap-dialog.min.js
vendored
Normal file
1
public_html/lib/bootstrap4-dialog/js/bootstrap-dialog.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2043
public_html/lib/bootstrap4-dialog/less/bootstrap-dialog.less
vendored
Normal file
2043
public_html/lib/bootstrap4-dialog/less/bootstrap-dialog.less
vendored
Normal file
File diff suppressed because it is too large
Load diff
2362
public_html/lib/bootstrap4/css/bootstrap-grid.css
vendored
2362
public_html/lib/bootstrap4/css/bootstrap-grid.css
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,8 +1,8 @@
|
|||
/*!
|
||||
* Bootstrap Reboot v4.6.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Bootstrap Reboot v4.0.0 (https://getbootstrap.com)
|
||||
* Copyright 2011-2018 The Bootstrap Authors
|
||||
* Copyright 2011-2018 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
*,
|
||||
|
@ -15,16 +15,22 @@ html {
|
|||
font-family: sans-serif;
|
||||
line-height: 1.15;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
-ms-text-size-adjust: 100%;
|
||||
-ms-overflow-style: scrollbar;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||
@-ms-viewport {
|
||||
width: device-width;
|
||||
}
|
||||
|
||||
article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
|
@ -33,7 +39,7 @@ body {
|
|||
background-color: #fff;
|
||||
}
|
||||
|
||||
[tabindex="-1"]:focus:not(:focus-visible) {
|
||||
[tabindex="-1"]:focus {
|
||||
outline: 0 !important;
|
||||
}
|
||||
|
||||
|
@ -60,8 +66,6 @@ abbr[data-original-title] {
|
|||
text-decoration: underline dotted;
|
||||
cursor: help;
|
||||
border-bottom: 0;
|
||||
-webkit-text-decoration-skip-ink: none;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
|
||||
address {
|
||||
|
@ -97,6 +101,10 @@ blockquote {
|
|||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
|
@ -126,6 +134,7 @@ a {
|
|||
color: #007bff;
|
||||
text-decoration: none;
|
||||
background-color: transparent;
|
||||
-webkit-text-decoration-skip: objects;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
|
@ -133,21 +142,25 @@ a:hover {
|
|||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:not([href]):not([class]) {
|
||||
a:not([href]):not([tabindex]) {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:not([href]):not([class]):hover {
|
||||
a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:not([href]):not([tabindex]):focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
|
@ -167,9 +180,8 @@ img {
|
|||
border-style: none;
|
||||
}
|
||||
|
||||
svg {
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table {
|
||||
|
@ -186,20 +198,20 @@ caption {
|
|||
|
||||
th {
|
||||
text-align: inherit;
|
||||
text-align: -webkit-match-parent;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
margin-bottom: 0.5rem;
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button:focus:not(:focus-visible) {
|
||||
outline: 0;
|
||||
button:focus {
|
||||
outline: 1px dotted;
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
}
|
||||
|
||||
input,
|
||||
|
@ -223,28 +235,13 @@ select {
|
|||
text-transform: none;
|
||||
}
|
||||
|
||||
[role="button"] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
|
||||
button,
|
||||
[type="button"],
|
||||
html [type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
button:not(:disabled),
|
||||
[type="button"]:not(:disabled),
|
||||
[type="reset"]:not(:disabled),
|
||||
[type="submit"]:not(:disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
|
@ -259,6 +256,13 @@ input[type="checkbox"] {
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
input[type="date"],
|
||||
input[type="time"],
|
||||
input[type="datetime-local"],
|
||||
input[type="month"] {
|
||||
-webkit-appearance: listbox;
|
||||
}
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
resize: vertical;
|
||||
|
@ -297,6 +301,7 @@ progress {
|
|||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
[type="search"]::-webkit-search-cancel-button,
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,8 +1,8 @@
|
|||
/*!
|
||||
* Bootstrap Reboot v4.6.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Bootstrap Reboot v4.0.0 (https://getbootstrap.com)
|
||||
* Copyright 2011-2018 The Bootstrap Authors
|
||||
* Copyright 2011-2018 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([class]){color:inherit;text-decoration:none}a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit;text-align:-webkit-match-parent}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
|
||||
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
|
||||
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
File diff suppressed because one or more lines are too long
3484
public_html/lib/bootstrap4/css/bootstrap.css
vendored
3484
public_html/lib/bootstrap4/css/bootstrap.css
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
10
public_html/lib/bootstrap4/css/bootstrap.min.css
vendored
10
public_html/lib/bootstrap4/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
3672
public_html/lib/bootstrap4/js/bootstrap.bundle.js
vendored
3672
public_html/lib/bootstrap4/js/bootstrap.bundle.js
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
3205
public_html/lib/bootstrap4/js/bootstrap.js
vendored
3205
public_html/lib/bootstrap4/js/bootstrap.js
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,72 +0,0 @@
|
|||
Bootstrap4Dialog
|
||||
================
|
||||
|
||||
## Description
|
||||
|
||||
Create <a href="https://getbootstrap.com/" target="_blank">Bootstrap 4 / Bootstrap 5</a> Dialog Modals Easily.
|
||||
|
||||
[![Latest release](https://img.shields.io/github/release/SUXUMI/bootstrap4dialog.svg)](https://github.com/SUXUMI/bootstrap4dialog/releases/latest)
|
||||
|
||||
================
|
||||
|
||||
### Installation
|
||||
``npm i gr-bootstrap4dialog``
|
||||
|
||||
### Usage
|
||||
|
||||
Simple sample:
|
||||
```
|
||||
Bootstrap4Dialog.show({
|
||||
title: 'Title'
|
||||
})
|
||||
```
|
||||
|
||||
Sample without title:
|
||||
```
|
||||
Bootstrap4Dialog.show({
|
||||
message: 'Message',
|
||||
duration: 5
|
||||
})
|
||||
```
|
||||
|
||||
Sample with multiple options:
|
||||
```
|
||||
Bootstrap4Dialog.show({
|
||||
title: 'Title',
|
||||
message: 'Message text goes here',
|
||||
backdrop: Bootstrap4Dialog.BACKDROP_STATIC,
|
||||
type: Bootstrap4Dialog.TYPE_DANGER,
|
||||
centered: true,
|
||||
scrollable: true,
|
||||
duration: 5, // display seconds
|
||||
open: function() {
|
||||
Bootstrap4Dialog.show({
|
||||
title: 'Dialog displayed',
|
||||
size: Bootstrap4Dialog.SIZE_SMALL,
|
||||
type: Bootstrap4Dialog.TYPE_LIGHT,
|
||||
duration: 0.5
|
||||
})
|
||||
|
||||
$('#btn-cancel').focus();
|
||||
},
|
||||
close: function() {
|
||||
Bootstrap4Dialog.show({
|
||||
message: 'Dialog closed',
|
||||
size: Bootstrap4Dialog.SIZE_SMALL,
|
||||
type: Bootstrap4Dialog.TYPE_LIGHT,
|
||||
backdrop: Bootstrap4Dialog.BACKDROP_NO,
|
||||
duration: 0.5
|
||||
})
|
||||
},
|
||||
buttons: [
|
||||
{
|
||||
id: 'btn-cancel',
|
||||
label: 'Cancel',
|
||||
cssClass: 'btn btn-light',
|
||||
action: function(dialog) {
|
||||
dialog.modal('hide');
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
```
|
|
@ -1,322 +0,0 @@
|
|||
/**
|
||||
* Bootstrap Modal for Bootstrap 4.*
|
||||
*
|
||||
* @author GR <admin@admin.ge>, https://github.com/SUXUMI
|
||||
* @source https://github.com/SUXUMI/bootstrab4dialog
|
||||
* @description Bootstrap Modal for Bootstrap 4.*
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
(function (root, factory) {
|
||||
"use strict";
|
||||
|
||||
// https://github.com/umdjs/umd
|
||||
if (typeof module !== "undefined" && module.exports) {
|
||||
module.exports = factory(require("jquery"), require("bootstrap"));
|
||||
}
|
||||
else if (typeof define === "function" && define.amd) {
|
||||
define("bootstrap4dialog", ["jquery", "bootstrap"], function ($) {
|
||||
return factory($);
|
||||
});
|
||||
} else {
|
||||
root.Bootstrap4Dialog = factory(root.jQuery);
|
||||
}
|
||||
})(this ? this : window, function ($) {
|
||||
/**
|
||||
* Set default global options
|
||||
*
|
||||
* @param {} options
|
||||
*/
|
||||
var Bootstrap4Dialog = function (options) {
|
||||
$.extend(true, this.defaultOptions, options);
|
||||
};
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
Bootstrap4Dialog.TYPE_PRIMARY = "primary";
|
||||
Bootstrap4Dialog.TYPE_SECONDARY = "secondary";
|
||||
Bootstrap4Dialog.TYPE_SUCCESS = "success";
|
||||
Bootstrap4Dialog.TYPE_DANGER = "danger";
|
||||
Bootstrap4Dialog.TYPE_WARNING = "warning";
|
||||
Bootstrap4Dialog.TYPE_INFO = "info";
|
||||
Bootstrap4Dialog.TYPE_LIGHT = "light";
|
||||
Bootstrap4Dialog.TYPE_DARK = "dark";
|
||||
|
||||
Bootstrap4Dialog.SIZE_SMALL = "modal-sm";
|
||||
Bootstrap4Dialog.SIZE_MEDIUM = "";
|
||||
Bootstrap4Dialog.SIZE_LARGE = "modal-lg";
|
||||
Bootstrap4Dialog.SIZE_EXTRA_LARGE = "modal-xl";
|
||||
|
||||
Bootstrap4Dialog.BACKDROP_YES = "true";
|
||||
Bootstrap4Dialog.BACKDROP_NO = "";
|
||||
Bootstrap4Dialog.BACKDROP_STATIC = "static";
|
||||
|
||||
/**
|
||||
* Default options
|
||||
*/
|
||||
Bootstrap4Dialog.defaultOptions = {
|
||||
title: '',
|
||||
message: '',
|
||||
type: Bootstrap4Dialog.TYPE_PRIMARY,
|
||||
size: Bootstrap4Dialog.SIZE_MEDIUM,
|
||||
keyboard: true,
|
||||
focus: true,
|
||||
scrollable: false, // modal-dialog-scrollable
|
||||
centered: false, // modal-dialog-centered
|
||||
backdrop: Bootstrap4Dialog.BACKDROP_YES,
|
||||
duration: 0, // SECONDS - how long the dialog should be displayed
|
||||
autodestroy: true,
|
||||
|
||||
open: null,
|
||||
close: null,
|
||||
buttons: [],
|
||||
|
||||
// draggable: false,
|
||||
// animate: true,
|
||||
// tabindex: -1,
|
||||
};
|
||||
|
||||
/**
|
||||
* Prepares the dialog
|
||||
*
|
||||
* @param {type} options
|
||||
* @returns the created dialog instance
|
||||
*/
|
||||
Bootstrap4Dialog.dialog = function(options) {
|
||||
var dialog;
|
||||
|
||||
var _options = $.extend(false, this.defaultOptions, options);
|
||||
|
||||
_options['show'] = false;
|
||||
|
||||
try {
|
||||
if (!_options['title'] && !_options['message'] && (!_options['buttons'] || !_options['buttons'].length)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var id = _options['id'] || 'modalWindow_' + uniqid();
|
||||
|
||||
var html =
|
||||
'<div id="' + id + '" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">'
|
||||
+ '<div class="modal-dialog" role="document">'
|
||||
+ '<div class="modal-content">';
|
||||
|
||||
if (_options['title']) {
|
||||
html +=
|
||||
|
||||
'<div class="modal-header rounded">'
|
||||
+ '<h6 class="modal-title"></h6>'
|
||||
+ '<button type="button" class="close" data-dismiss="modal" aria-label="Close">'
|
||||
+ '<span aria-hidden="true">×</span>'
|
||||
+ '</button>'
|
||||
+ '</div>'
|
||||
}
|
||||
|
||||
if (_options['message']) {
|
||||
html +=
|
||||
|
||||
'<div class="modal-body">'
|
||||
+ '</div>'
|
||||
}
|
||||
|
||||
if (_options['buttons'] && _options['buttons'].length) {
|
||||
html +=
|
||||
'<div class="modal-footer text-center">'
|
||||
//+ '<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>'
|
||||
//+ '<button type="button" class="btn btn-primary">Save changes</button>'
|
||||
+ '</div>'
|
||||
}
|
||||
|
||||
+ '</div>'
|
||||
+ '</div>'
|
||||
+ '</div>'
|
||||
;
|
||||
|
||||
$('body').append( html );
|
||||
|
||||
var _modal_container = $('#' + id);
|
||||
|
||||
// append title
|
||||
if (_options['title'] && _options['title'].length) {
|
||||
_modal_container.find('.modal-title').html( _options['title'] );
|
||||
}
|
||||
|
||||
// append message
|
||||
if (_options['message'] && _options['message'].length) {
|
||||
_modal_container.find('.modal-body').html( _options['message'] );
|
||||
}
|
||||
|
||||
if (_options['title'] && !_options['message'] && (!_options['buttons'] || !_options['buttons'].length)) {
|
||||
_modal_container.find('.modal-header').css({'border-bottom':'0px'});
|
||||
}
|
||||
|
||||
if (!_options['title'] && !_options['message'] && _options['buttons'] && _options['buttons'].length) {
|
||||
_modal_container.find('.modal-footer').css({'border-top':'0px'});
|
||||
}
|
||||
|
||||
if (_options['size'] && _options['size'].length) {
|
||||
_modal_container.find('.modal-dialog').addClass(_options.size);
|
||||
}
|
||||
|
||||
if (_options['centered']) {
|
||||
_modal_container.find('.modal-dialog').addClass('modal-dialog-centered');
|
||||
}
|
||||
|
||||
if (_options['scrollable']) {
|
||||
_modal_container.find('.modal-dialog').addClass('modal-dialog-scrollable');
|
||||
}
|
||||
|
||||
switch(true) {
|
||||
case _options['type'] == 'primary':
|
||||
_modal_container.find('.modal-header').addClass('bg-primary').find('.modal-title').addClass('text-white');
|
||||
_modal_container.find('.modal-body').addClass('text-primary');
|
||||
break;
|
||||
case _options['type'] == 'secondary':
|
||||
_modal_container.find('.modal-header').addClass('bg-secondary').find('.modal-title').addClass('text-white');
|
||||
_modal_container.find('.modal-body').addClass('text-secondary');
|
||||
break;
|
||||
case _options['type'] == 'success':
|
||||
_modal_container.find('.modal-header').addClass('bg-success').find('.modal-title').addClass('text-white');
|
||||
_modal_container.find('.modal-body').addClass('text-success');
|
||||
break;
|
||||
case _options['type'] == 'danger':
|
||||
_modal_container.find('.modal-header').addClass('bg-danger').find('.modal-title').addClass('text-white');
|
||||
_modal_container.find('.modal-body').addClass('text-danger');
|
||||
break;
|
||||
case _options['type'] == 'warning':
|
||||
_modal_container.find('.modal-header').addClass('bg-warning');
|
||||
_modal_container.find('.modal-body').addClass('text-warning');
|
||||
break;
|
||||
case _options['type'] == 'info':
|
||||
_modal_container.find('.modal-header').addClass('bg-info').find('.modal-title').addClass('text-white');
|
||||
_modal_container.find('.modal-body').addClass('text-info');
|
||||
break;
|
||||
case _options['type'] == 'light':
|
||||
_modal_container.find('.modal-header').addClass('bg-light').find('.modal-title').addClass('text-black');
|
||||
_modal_container.find('.modal-body').addClass('text-black');
|
||||
break;
|
||||
case _options['type'] == 'dark':
|
||||
_modal_container.find('.modal-header').addClass('bg-dark').find('.modal-title').addClass('text-white');
|
||||
_modal_container.find('.modal-body').addClass('text-dark');
|
||||
break;
|
||||
}
|
||||
|
||||
dialog = _modal_container.modal(_options);
|
||||
|
||||
// try set buttons
|
||||
try {
|
||||
// fooder
|
||||
var _footer = _modal_container.find('.modal-footer');
|
||||
|
||||
for(i in _options['buttons']) {
|
||||
var _button = _options['buttons'][i];
|
||||
|
||||
// append the button
|
||||
_footer.append('<button class="btn" />');
|
||||
|
||||
var _element_button = _footer.find('button').eq(i);
|
||||
|
||||
if (_button['id']) { _element_button.attr('id', _button['id']); }
|
||||
if (_button['label']) { _element_button.html(_button['label']); }
|
||||
if (_button['cssClass']) { _element_button.addClass(_button['cssClass']); }
|
||||
|
||||
// https://dzone.com/articles/why-does-javascript-loop-only-use-last-value
|
||||
// https://stackoverflow.com/a/17750253/1565790
|
||||
if (typeof(_button['action']) == 'function') {
|
||||
(function(button, f, dialog) {
|
||||
button.bind('click', function() { f(dialog, button); });
|
||||
})(_element_button, _button['action'], dialog);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(e) {console.log(e.message);}
|
||||
|
||||
// set handlers
|
||||
if (typeof(_options['open']) == 'function') {
|
||||
dialog.on('shown.bs.modal', _options['open']);
|
||||
}
|
||||
|
||||
if (typeof(_options['close']) == 'function') {
|
||||
dialog.on('hidden.bs.modal', _options['close']);
|
||||
}
|
||||
|
||||
if (_options['autodestroy']) {
|
||||
dialog.on('hidden.bs.modal', function() { destroy(dialog) });
|
||||
}
|
||||
|
||||
if (_options['duration']) {
|
||||
dialog.on('shown.bs.modal', function() {
|
||||
setTimeout(function() {
|
||||
dialog.modal('hide');
|
||||
}, parseFloat(_options['duration']) * 1000);
|
||||
});
|
||||
}
|
||||
|
||||
return dialog;
|
||||
}
|
||||
catch(e) {
|
||||
console.warn(e.message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays prepared dialog
|
||||
*
|
||||
* @param {type} options
|
||||
* @returns the created dialog instance
|
||||
*/
|
||||
Bootstrap4Dialog.show = function(options) {
|
||||
try {
|
||||
return this.dialog(options).modal('show');
|
||||
}
|
||||
catch(e) {
|
||||
console.warn(e.message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes dialog DOM instance
|
||||
*
|
||||
* @param object dialog
|
||||
*/
|
||||
destroy = function(dialog) {
|
||||
try {
|
||||
setTimeout(function() {
|
||||
dialog.remove();
|
||||
}, 200);
|
||||
}
|
||||
catch(e) {
|
||||
console.warn(e.message);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Generates uniqid
|
||||
*
|
||||
* @source - https://github.com/makeable/uuid-v4.js/blob/master/uuid-v4.js
|
||||
*/
|
||||
var uniqid = function () {
|
||||
var dec2hex = [];
|
||||
|
||||
for (var i = 0; i <= 15; i++) {
|
||||
dec2hex[i] = i.toString(16);
|
||||
}
|
||||
|
||||
var uuid = "";
|
||||
for (var i = 1; i <= 36; i++) {
|
||||
if (i === 9 || i === 14 || i === 19 || i === 24) {
|
||||
uuid += "-";
|
||||
} else if (i === 15) {
|
||||
uuid += 4;
|
||||
} else if (i === 20) {
|
||||
uuid += dec2hex[(Math.random() * 4) | (0 + 8)];
|
||||
} else {
|
||||
uuid += dec2hex[(Math.random() * 16) | 0];
|
||||
}
|
||||
}
|
||||
return uuid;
|
||||
};
|
||||
|
||||
return Bootstrap4Dialog;
|
||||
});
|
|
@ -1 +0,0 @@
|
|||
!function(a,d){"use strict";"undefined"!=typeof module&&module.exports?module.exports=d(require("jquery"),require("bootstrap")):"function"==typeof define&&define.amd?define("bootstrap4dialog",["jquery","bootstrap"],function(a){return d(a)}):a.Bootstrap4Dialog=d(a.jQuery)}(this?this:window,function(a){var d=function(d){a.extend(!0,this.defaultOptions,d)};d.TYPE_PRIMARY="primary",d.TYPE_SECONDARY="secondary",d.TYPE_SUCCESS="success",d.TYPE_DANGER="danger",d.TYPE_WARNING="warning",d.TYPE_INFO="info",d.TYPE_LIGHT="light",d.TYPE_DARK="dark",d.SIZE_SMALL="modal-sm",d.SIZE_MEDIUM="",d.SIZE_LARGE="modal-lg",d.SIZE_EXTRA_LARGE="modal-xl",d.BACKDROP_YES="true",d.BACKDROP_NO="",d.BACKDROP_STATIC="static",d.defaultOptions={title:"",message:"",type:d.TYPE_PRIMARY,size:d.SIZE_MEDIUM,keyboard:!0,focus:!0,scrollable:!1,centered:!1,backdrop:d.BACKDROP_YES,duration:0,autodestroy:!0,open:null,close:null,buttons:[]},d.dialog=function(d){var t,o=a.extend(!1,this.defaultOptions,d);o.show=!1;try{if(!(o.title||o.message||o.buttons&&o.buttons.length))return!1;var s=o.id||"modalWindow_"+e(),n='<div id="'+s+'" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog" role="document"><div class="modal-content">';o.title&&(n+='<div class="modal-header rounded"><h6 class="modal-title"></h6><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div>'),o.message&&(n+='<div class="modal-body"></div>'),o.buttons&&o.buttons.length&&(n+='<div class="modal-footer text-center"></div>'),a("body").append(n);var l=a("#"+s);switch(o.title&&o.title.length&&l.find(".modal-title").html(o.title),o.message&&o.message.length&&l.find(".modal-body").html(o.message),!o.title||o.message||o.buttons&&o.buttons.length||l.find(".modal-header").css({"border-bottom":"0px"}),!o.title&&!o.message&&o.buttons&&o.buttons.length&&l.find(".modal-footer").css({"border-top":"0px"}),o.size&&o.size.length&&l.find(".modal-dialog").addClass(o.size),o.centered&&l.find(".modal-dialog").addClass("modal-dialog-centered"),o.scrollable&&l.find(".modal-dialog").addClass("modal-dialog-scrollable"),!0){case"primary"==o.type:l.find(".modal-header").addClass("bg-primary").find(".modal-title").addClass("text-white"),l.find(".modal-body").addClass("text-primary");break;case"secondary"==o.type:l.find(".modal-header").addClass("bg-secondary").find(".modal-title").addClass("text-white"),l.find(".modal-body").addClass("text-secondary");break;case"success"==o.type:l.find(".modal-header").addClass("bg-success").find(".modal-title").addClass("text-white"),l.find(".modal-body").addClass("text-success");break;case"danger"==o.type:l.find(".modal-header").addClass("bg-danger").find(".modal-title").addClass("text-white"),l.find(".modal-body").addClass("text-danger");break;case"warning"==o.type:l.find(".modal-header").addClass("bg-warning"),l.find(".modal-body").addClass("text-warning");break;case"info"==o.type:l.find(".modal-header").addClass("bg-info").find(".modal-title").addClass("text-white"),l.find(".modal-body").addClass("text-info");break;case"light"==o.type:l.find(".modal-header").addClass("bg-light").find(".modal-title").addClass("text-black"),l.find(".modal-body").addClass("text-black");break;case"dark"==o.type:l.find(".modal-header").addClass("bg-dark").find(".modal-title").addClass("text-white"),l.find(".modal-body").addClass("text-dark")}t=l.modal(o);try{var r=l.find(".modal-footer");for(i in o.buttons){var c=o.buttons[i];r.append('<button class="btn" />');var m=r.find("button").eq(i);c.id&&m.attr("id",c.id),c.label&&m.html(c.label),c.cssClass&&m.addClass(c.cssClass),"function"==typeof c.action&&function(a,d,e){a.bind("click",function(){d(e,a)})}(m,c.action,t)}}catch(a){console.log(a.message)}return"function"==typeof o.open&&t.on("shown.bs.modal",o.open),"function"==typeof o.close&&t.on("hidden.bs.modal",o.close),o.autodestroy&&t.on("hidden.bs.modal",function(){destroy(t)}),o.duration&&t.on("shown.bs.modal",function(){setTimeout(function(){t.modal("hide")},1e3*parseFloat(o.duration))}),t}catch(a){console.warn(a.message)}},d.show=function(a){try{return this.dialog(a).modal("show")}catch(a){console.warn(a.message)}},destroy=function(a){try{setTimeout(function(){a.remove()},200)}catch(a){console.warn(a.message)}};var e=function(){for(var a=[],d=0;d<=15;d++)a[d]=d.toString(16);var e="";for(d=1;d<=36;d++)e+=9===d||14===d||19===d||24===d?"-":15===d?4:20===d?a[4*Math.random()|8]:a[16*Math.random()|0];return e};return d});
|
|
@ -1,219 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Bootstrap4Dialog Examples</title>
|
||||
|
||||
<!-- CSS -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css" integrity="sha512-+4zCK9k+qNFUR5X+cKL9EIR+ZOhtIloNl9GIKS57V1MyNsYpYcUrUeQc9vNfzsWfV28IaLL3i96P9sdNyeRssA==" crossorigin="anonymous" />
|
||||
|
||||
<!-- jQuery and JS bundle w/ Popper.js -->
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.min.js" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>
|
||||
<script src="../src/js/bootstrap4dialog.js?<?=time()?>"></script>
|
||||
|
||||
<style>
|
||||
html, body {min-height: 150vh;}
|
||||
body {font-size: 0.9rem;}
|
||||
pre {font-size: 0.8rem ; max-height: 200px; overflow: auto;}
|
||||
.code-sample {border-bottom: 1px solid #dee2e6!important; margin-bottom: 1rem !important;}
|
||||
</style>
|
||||
<!-- php -S localhost:8080 -->
|
||||
</head>
|
||||
<body class="py-3">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col col-lg-8 offset-lg-2">
|
||||
|
||||
<div class="code-sample">
|
||||
<h3>Dialog with Title & Message</h3>
|
||||
<div><a class="btn btn-primary run-code">Run code</a></div>
|
||||
<pre>
|
||||
<code>
|
||||
Bootstrap4Dialog.show({
|
||||
title: 'Sample Title 1',
|
||||
message: 'Message text goes here'
|
||||
})
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="code-sample">
|
||||
<h3>Static Danger Dialog with Title only</h3>
|
||||
<div><a class="btn btn-primary run-code">Run code</a></div>
|
||||
<pre>
|
||||
<code>
|
||||
Bootstrap4Dialog.show({
|
||||
title: 'Sample Title 2',
|
||||
type: Bootstrap4Dialog.TYPE_DANGER,
|
||||
backdrop: Bootstrap4Dialog.BACKDROP_STATIC
|
||||
})
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="code-sample">
|
||||
<h3>Warning Centered Dialog Message only, with 2 seconds duration</h3>
|
||||
<div><a class="btn btn-primary run-code">Run code</a></div>
|
||||
<pre>
|
||||
<code>
|
||||
Bootstrap4Dialog.show({
|
||||
message: 'Sample message will be hidden in 2 seconds',
|
||||
type: Bootstrap4Dialog.TYPE_WARNING,
|
||||
centered: true,
|
||||
duration: 2
|
||||
})
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="code-sample">
|
||||
<h3>Long Message Dialog without Backdrop</h3>
|
||||
<div><a class="btn btn-primary run-code">Run code</a></div>
|
||||
<pre>
|
||||
<code>
|
||||
Bootstrap4Dialog.show({
|
||||
title: 'Long message without backdrop',
|
||||
type: Bootstrap4Dialog.TYPE_DANGER,
|
||||
centered: true,
|
||||
backdrop: Bootstrap4Dialog.BACKDROP_NO,
|
||||
message: 'Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>'
|
||||
})
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="code-sample">
|
||||
<h3>Long Scrollable Message Dialog</h3>
|
||||
<div><a class="btn btn-primary run-code">Run code</a></div>
|
||||
<pre>
|
||||
<code>
|
||||
Bootstrap4Dialog.show({
|
||||
title: 'Long message text will disappears in 2 seconds',
|
||||
type: Bootstrap4Dialog.TYPE_DANGER,
|
||||
scrollable: true,
|
||||
message: 'Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>Lorem Ipsum dolor..<br>',
|
||||
})
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="code-sample">
|
||||
<h3>Multiple overlapping Dialogs</h3>
|
||||
<div><a class="btn btn-primary run-code">Run code</a></div>
|
||||
<pre>
|
||||
<code>
|
||||
Bootstrap4Dialog.show({
|
||||
title: 'Title 1',
|
||||
centered: true,
|
||||
type: Bootstrap4Dialog.TYPE_SUCCESS,
|
||||
});
|
||||
Bootstrap4Dialog.show({
|
||||
message: 'Message 2',
|
||||
type: Bootstrap4Dialog.TYPE_INFO,
|
||||
duration: 2
|
||||
})
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="code-sample">
|
||||
<h3>Large Message Dialog with callbacks</h3>
|
||||
<div><a class="btn btn-primary run-code">Run code</a></div>
|
||||
<pre>
|
||||
<code>
|
||||
Bootstrap4Dialog.show({
|
||||
title: 'Title 1',
|
||||
message: $('<div></div>').load('message.html'),
|
||||
centered: true,
|
||||
size: Bootstrap4Dialog.SIZE_LARGE,
|
||||
type: Bootstrap4Dialog.TYPE_DARK,
|
||||
open: function() {
|
||||
Bootstrap4Dialog.show({
|
||||
title: 'Dialog displayed',
|
||||
size: Bootstrap4Dialog.SIZE_SMALL,
|
||||
type: Bootstrap4Dialog.TYPE_LIGHT,
|
||||
duration: 0.5
|
||||
})
|
||||
},
|
||||
close: function() {
|
||||
Bootstrap4Dialog.show({
|
||||
message: 'Dialog closed',
|
||||
size: Bootstrap4Dialog.SIZE_SMALL,
|
||||
type: Bootstrap4Dialog.TYPE_LIGHT,
|
||||
backdrop: Bootstrap4Dialog.BACKDROP_NO,
|
||||
duration: 0.5
|
||||
})
|
||||
}
|
||||
});
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="code-sample">
|
||||
<h3>Dialog with Buttons</h3>
|
||||
<div><a class="btn btn-primary run-code">Run code</a></div>
|
||||
<pre>
|
||||
<code>
|
||||
Bootstrap4Dialog.show({
|
||||
title: 'Sample Title',
|
||||
message: 'Message text goes here',
|
||||
backdrop: Bootstrap4Dialog.BACKDROP_STATIC,
|
||||
open: function() {
|
||||
$('#btn-cancel-2').focus();
|
||||
},
|
||||
buttons: [
|
||||
{
|
||||
id: 'btn-cancel-2',
|
||||
label: 'Cancel',
|
||||
cssClass: 'btn btn-light',
|
||||
action: function(dialog) {
|
||||
dialog.modal('hide');
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'btn-submit-2',
|
||||
label: '<i class="fas fa-check"></i> Submit',
|
||||
cssClass: 'btn btn-sm btn-danger',
|
||||
action: function(dialog) {
|
||||
alert('fake form submittion..');
|
||||
dialog.modal('hide');
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="code-sample">
|
||||
<h3>Close the dialog manually from JavaScript</h3>
|
||||
<div><a class="btn btn-primary run-code">Run code</a></div>
|
||||
<pre>
|
||||
<code>
|
||||
var dialogForManualClose = Bootstrap4Dialog.show({
|
||||
title: 'Sample Title 1',
|
||||
message: 'Message text goes here'
|
||||
})
|
||||
|
||||
setTimeout(function() {
|
||||
dialogForManualClose.modal('hide');
|
||||
}, 3000)
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$('.run-code').click(function() {
|
||||
eval( $(this).parent().parent().find('code').html() )
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,102 +0,0 @@
|
|||
<pre>
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
Lorem Ipsum dolor..
|
||||
</pre>
|
|
@ -1,19 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
const gulp = require("gulp");
|
||||
const clean = require("gulp-clean");
|
||||
const minify = require("gulp-minify");
|
||||
|
||||
gulp.task("clean", function() {
|
||||
return gulp.src(["dist/**"]).pipe(clean({ allowEmpty: true }));
|
||||
});
|
||||
|
||||
gulp.task("dist", gulp.series("clean", function() {
|
||||
return gulp
|
||||
.src(["src/js/bootstrap4dialog.js"])
|
||||
.pipe(gulp.dest("dist/js"))
|
||||
.pipe(minify({ noSource: true, ext: ".min.js" }))
|
||||
.pipe(gulp.dest("dist/js"));
|
||||
}));
|
||||
|
||||
gulp.task("default", gulp.series("dist"));
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"name": "bootstrap4dialog",
|
||||
"version": "1.0.0",
|
||||
"description": "Bootstrap Modal for Bootstrap 4.*",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "GR <admin@admin.ge>",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"g": "^2.0.1",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-clean": "^0.4.0",
|
||||
"gulp-minify": "^3.1.0",
|
||||
"gulp-rename": "^2.0.0"
|
||||
}
|
||||
}
|
|
@ -1,322 +0,0 @@
|
|||
/**
|
||||
* Bootstrap Modal for Bootstrap 4.*
|
||||
*
|
||||
* @author GR <admin@admin.ge>, https://github.com/SUXUMI
|
||||
* @source https://github.com/SUXUMI/bootstrab4dialog
|
||||
* @description Bootstrap Modal for Bootstrap 4.*
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
(function (root, factory) {
|
||||
"use strict";
|
||||
|
||||
// https://github.com/umdjs/umd
|
||||
if (typeof module !== "undefined" && module.exports) {
|
||||
module.exports = factory(require("jquery"), require("bootstrap"));
|
||||
}
|
||||
else if (typeof define === "function" && define.amd) {
|
||||
define("bootstrap4dialog", ["jquery", "bootstrap"], function ($) {
|
||||
return factory($);
|
||||
});
|
||||
} else {
|
||||
root.Bootstrap4Dialog = factory(root.jQuery);
|
||||
}
|
||||
})(this ? this : window, function ($) {
|
||||
/**
|
||||
* Set default global options
|
||||
*
|
||||
* @param {} options
|
||||
*/
|
||||
var Bootstrap4Dialog = function (options) {
|
||||
$.extend(true, this.defaultOptions, options);
|
||||
};
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
Bootstrap4Dialog.TYPE_PRIMARY = "primary";
|
||||
Bootstrap4Dialog.TYPE_SECONDARY = "secondary";
|
||||
Bootstrap4Dialog.TYPE_SUCCESS = "success";
|
||||
Bootstrap4Dialog.TYPE_DANGER = "danger";
|
||||
Bootstrap4Dialog.TYPE_WARNING = "warning";
|
||||
Bootstrap4Dialog.TYPE_INFO = "info";
|
||||
Bootstrap4Dialog.TYPE_LIGHT = "light";
|
||||
Bootstrap4Dialog.TYPE_DARK = "dark";
|
||||
|
||||
Bootstrap4Dialog.SIZE_SMALL = "modal-sm";
|
||||
Bootstrap4Dialog.SIZE_MEDIUM = "";
|
||||
Bootstrap4Dialog.SIZE_LARGE = "modal-lg";
|
||||
Bootstrap4Dialog.SIZE_EXTRA_LARGE = "modal-xl";
|
||||
|
||||
Bootstrap4Dialog.BACKDROP_YES = "true";
|
||||
Bootstrap4Dialog.BACKDROP_NO = "";
|
||||
Bootstrap4Dialog.BACKDROP_STATIC = "static";
|
||||
|
||||
/**
|
||||
* Default options
|
||||
*/
|
||||
Bootstrap4Dialog.defaultOptions = {
|
||||
title: '',
|
||||
message: '',
|
||||
type: Bootstrap4Dialog.TYPE_PRIMARY,
|
||||
size: Bootstrap4Dialog.SIZE_MEDIUM,
|
||||
keyboard: true,
|
||||
focus: true,
|
||||
scrollable: false, // modal-dialog-scrollable
|
||||
centered: false, // modal-dialog-centered
|
||||
backdrop: Bootstrap4Dialog.BACKDROP_YES,
|
||||
duration: 0, // SECONDS - how long the dialog should be displayed
|
||||
autodestroy: true,
|
||||
|
||||
open: null,
|
||||
close: null,
|
||||
buttons: [],
|
||||
|
||||
// draggable: false,
|
||||
// animate: true,
|
||||
// tabindex: -1,
|
||||
};
|
||||
|
||||
/**
|
||||
* Prepares the dialog
|
||||
*
|
||||
* @param {type} options
|
||||
* @returns the created dialog instance
|
||||
*/
|
||||
Bootstrap4Dialog.dialog = function(options) {
|
||||
var dialog;
|
||||
|
||||
var _options = $.extend(false, this.defaultOptions, options);
|
||||
|
||||
_options['show'] = false;
|
||||
|
||||
try {
|
||||
if (!_options['title'] && !_options['message'] && (!_options['buttons'] || !_options['buttons'].length)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var id = _options['id'] || 'modalWindow_' + uniqid();
|
||||
|
||||
var html =
|
||||
'<div id="' + id + '" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">'
|
||||
+ '<div class="modal-dialog" role="document">'
|
||||
+ '<div class="modal-content">';
|
||||
|
||||
if (_options['title']) {
|
||||
html +=
|
||||
|
||||
'<div class="modal-header rounded">'
|
||||
+ '<h6 class="modal-title"></h6>'
|
||||
+ '<button type="button" class="close" data-dismiss="modal" aria-label="Close">'
|
||||
+ '<span aria-hidden="true">×</span>'
|
||||
+ '</button>'
|
||||
+ '</div>'
|
||||
}
|
||||
|
||||
if (_options['message']) {
|
||||
html +=
|
||||
|
||||
'<div class="modal-body">'
|
||||
+ '</div>'
|
||||
}
|
||||
|
||||
if (_options['buttons'] && _options['buttons'].length) {
|
||||
html +=
|
||||
'<div class="modal-footer text-center">'
|
||||
//+ '<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>'
|
||||
//+ '<button type="button" class="btn btn-primary">Save changes</button>'
|
||||
+ '</div>'
|
||||
}
|
||||
|
||||
+ '</div>'
|
||||
+ '</div>'
|
||||
+ '</div>'
|
||||
;
|
||||
|
||||
$('body').append( html );
|
||||
|
||||
var _modal_container = $('#' + id);
|
||||
|
||||
// append title
|
||||
if (_options['title'] && _options['title'].length) {
|
||||
_modal_container.find('.modal-title').html( _options['title'] );
|
||||
}
|
||||
|
||||
// append message
|
||||
if (_options['message'] && _options['message'].length) {
|
||||
_modal_container.find('.modal-body').html( _options['message'] );
|
||||
}
|
||||
|
||||
if (_options['title'] && !_options['message'] && (!_options['buttons'] || !_options['buttons'].length)) {
|
||||
_modal_container.find('.modal-header').css({'border-bottom':'0px'});
|
||||
}
|
||||
|
||||
if (!_options['title'] && !_options['message'] && _options['buttons'] && _options['buttons'].length) {
|
||||
_modal_container.find('.modal-footer').css({'border-top':'0px'});
|
||||
}
|
||||
|
||||
if (_options['size'] && _options['size'].length) {
|
||||
_modal_container.find('.modal-dialog').addClass(_options.size);
|
||||
}
|
||||
|
||||
if (_options['centered']) {
|
||||
_modal_container.find('.modal-dialog').addClass('modal-dialog-centered');
|
||||
}
|
||||
|
||||
if (_options['scrollable']) {
|
||||
_modal_container.find('.modal-dialog').addClass('modal-dialog-scrollable');
|
||||
}
|
||||
|
||||
switch(true) {
|
||||
case _options['type'] == 'primary':
|
||||
_modal_container.find('.modal-header').addClass('bg-primary').find('.modal-title').addClass('text-white');
|
||||
_modal_container.find('.modal-body').addClass('text-primary');
|
||||
break;
|
||||
case _options['type'] == 'secondary':
|
||||
_modal_container.find('.modal-header').addClass('bg-secondary').find('.modal-title').addClass('text-white');
|
||||
_modal_container.find('.modal-body').addClass('text-secondary');
|
||||
break;
|
||||
case _options['type'] == 'success':
|
||||
_modal_container.find('.modal-header').addClass('bg-success').find('.modal-title').addClass('text-white');
|
||||
_modal_container.find('.modal-body').addClass('text-success');
|
||||
break;
|
||||
case _options['type'] == 'danger':
|
||||
_modal_container.find('.modal-header').addClass('bg-danger').find('.modal-title').addClass('text-white');
|
||||
_modal_container.find('.modal-body').addClass('text-danger');
|
||||
break;
|
||||
case _options['type'] == 'warning':
|
||||
_modal_container.find('.modal-header').addClass('bg-warning');
|
||||
_modal_container.find('.modal-body').addClass('text-warning');
|
||||
break;
|
||||
case _options['type'] == 'info':
|
||||
_modal_container.find('.modal-header').addClass('bg-info').find('.modal-title').addClass('text-white');
|
||||
_modal_container.find('.modal-body').addClass('text-info');
|
||||
break;
|
||||
case _options['type'] == 'light':
|
||||
_modal_container.find('.modal-header').addClass('bg-light').find('.modal-title').addClass('text-black');
|
||||
_modal_container.find('.modal-body').addClass('text-black');
|
||||
break;
|
||||
case _options['type'] == 'dark':
|
||||
_modal_container.find('.modal-header').addClass('bg-dark').find('.modal-title').addClass('text-white');
|
||||
_modal_container.find('.modal-body').addClass('text-dark');
|
||||
break;
|
||||
}
|
||||
|
||||
dialog = _modal_container.modal(_options);
|
||||
|
||||
// try set buttons
|
||||
try {
|
||||
// fooder
|
||||
var _footer = _modal_container.find('.modal-footer');
|
||||
|
||||
for(i in _options['buttons']) {
|
||||
var _button = _options['buttons'][i];
|
||||
|
||||
// append the button
|
||||
_footer.append('<button class="btn" />');
|
||||
|
||||
var _element_button = _footer.find('button').eq(i);
|
||||
|
||||
if (_button['id']) { _element_button.attr('id', _button['id']); }
|
||||
if (_button['label']) { _element_button.html(_button['label']); }
|
||||
if (_button['cssClass']) { _element_button.addClass(_button['cssClass']); }
|
||||
|
||||
// https://dzone.com/articles/why-does-javascript-loop-only-use-last-value
|
||||
// https://stackoverflow.com/a/17750253/1565790
|
||||
if (typeof(_button['action']) == 'function') {
|
||||
(function(button, f, dialog) {
|
||||
button.bind('click', function() { f(dialog, button); });
|
||||
})(_element_button, _button['action'], dialog);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(e) {console.log(e.message);}
|
||||
|
||||
// set handlers
|
||||
if (typeof(_options['open']) == 'function') {
|
||||
dialog.on('shown.bs.modal', _options['open']);
|
||||
}
|
||||
|
||||
if (typeof(_options['close']) == 'function') {
|
||||
dialog.on('hidden.bs.modal', _options['close']);
|
||||
}
|
||||
|
||||
if (_options['autodestroy']) {
|
||||
dialog.on('hidden.bs.modal', function() { destroy(dialog) });
|
||||
}
|
||||
|
||||
if (_options['duration']) {
|
||||
dialog.on('shown.bs.modal', function() {
|
||||
setTimeout(function() {
|
||||
dialog.modal('hide');
|
||||
}, parseFloat(_options['duration']) * 1000);
|
||||
});
|
||||
}
|
||||
|
||||
return dialog;
|
||||
}
|
||||
catch(e) {
|
||||
console.warn(e.message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays prepared dialog
|
||||
*
|
||||
* @param {type} options
|
||||
* @returns the created dialog instance
|
||||
*/
|
||||
Bootstrap4Dialog.show = function(options) {
|
||||
try {
|
||||
return this.dialog(options).modal('show');
|
||||
}
|
||||
catch(e) {
|
||||
console.warn(e.message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes dialog DOM instance
|
||||
*
|
||||
* @param object dialog
|
||||
*/
|
||||
var destroy = function(dialog) {
|
||||
try {
|
||||
setTimeout(function() {
|
||||
dialog.remove();
|
||||
}, 200);
|
||||
}
|
||||
catch(e) {
|
||||
console.warn(e.message);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Generates uniqid
|
||||
*
|
||||
* @source - https://github.com/makeable/uuid-v4.js/blob/master/uuid-v4.js
|
||||
*/
|
||||
var uniqid = function () {
|
||||
var dec2hex = [];
|
||||
|
||||
for (var i = 0; i <= 15; i++) {
|
||||
dec2hex[i] = i.toString(16);
|
||||
}
|
||||
|
||||
var uuid = "";
|
||||
for (var i = 1; i <= 36; i++) {
|
||||
if (i === 9 || i === 14 || i === 19 || i === 24) {
|
||||
uuid += "-";
|
||||
} else if (i === 15) {
|
||||
uuid += 4;
|
||||
} else if (i === 20) {
|
||||
uuid += dec2hex[(Math.random() * 4) | (0 + 8)];
|
||||
} else {
|
||||
uuid += dec2hex[(Math.random() * 16) | 0];
|
||||
}
|
||||
}
|
||||
return uuid;
|
||||
};
|
||||
|
||||
return Bootstrap4Dialog;
|
||||
});
|
194
public_html/lib/myconfirm.js
Normal file
194
public_html/lib/myconfirm.js
Normal file
|
@ -0,0 +1,194 @@
|
|||
var myconfirm=function(opts) {
|
||||
BootstrapDialog.show({
|
||||
title: opts.title || 'Confirmation',
|
||||
message: opts.question || 'Confirmez-vous ?',
|
||||
autodestroy: true,
|
||||
cssClass: opts.css_class || 'modal-warning',
|
||||
type: opts.type || 'type-default',
|
||||
data: {
|
||||
oncancel: opts.oncancel,
|
||||
onconfirm: opts.onconfirm,
|
||||
data: opts.data,
|
||||
confirm: false,
|
||||
},
|
||||
buttons: [
|
||||
{
|
||||
label: opts.cancel_label || 'Annuler',
|
||||
action: function(dialog) {
|
||||
dialog.close();
|
||||
}
|
||||
},
|
||||
{
|
||||
label: opts.confirm_label || 'Valider',
|
||||
cssClass: 'btn-danger',
|
||||
action: function(dialog) {
|
||||
dialog.setData('confirm',true);
|
||||
dialog.close();
|
||||
}
|
||||
}
|
||||
],
|
||||
onhidden: function(dialog) {
|
||||
if (dialog.getData('confirm')) {
|
||||
if (jQuery.type(dialog.getData('onconfirm')) == 'function') {
|
||||
dialog.getData('onconfirm')(dialog.getData('data'));
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (jQuery.type(dialog.getData('oncancel')) == 'function') {
|
||||
dialog.getData('oncancel')(dialog.getData('data'));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var myalert=function(title,msg,opts) {
|
||||
if ($.type(opts) != "object") {
|
||||
opts={};
|
||||
}
|
||||
BootstrapDialog.show({
|
||||
title: title || opts.title || 'Erreur',
|
||||
message: msg,
|
||||
autodestroy: true,
|
||||
type: opts.type || 'type-danger',
|
||||
size: opts.size || 'size-normal',
|
||||
data: {
|
||||
data: opts.data,
|
||||
onclose: opts.onclose,
|
||||
},
|
||||
buttons: [
|
||||
{
|
||||
label: opts.btnLabel || 'OK',
|
||||
cssClass: opts.btnCssClass ||'btn-primary',
|
||||
action: function(dialog) {
|
||||
dialog.close();
|
||||
}
|
||||
},
|
||||
],
|
||||
onhidden: function(dialog) {
|
||||
if ($.type(dialog.getData('onclose')) == 'function') {
|
||||
dialog.getData('onclose')(dialog.getData('data'));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var myprompt=function(opts) {
|
||||
if ($.type(opts) != "object") {
|
||||
opts={};
|
||||
}
|
||||
|
||||
var onSubmitBtnClick = function(dialog) {
|
||||
dialog.setData('submited',true);
|
||||
var val = dialog.getModalBody().find('input').val();
|
||||
if (jQuery.type(dialog.getData('onsubmit')) == 'function') {
|
||||
if (!dialog.getData('onsubmit')(val, dialog.getData('data'))) {
|
||||
if (jQuery.type(dialog.getData('onerror')) == 'function') {
|
||||
dialog.getData('onerror')(val, dialog.getData('data'));
|
||||
}
|
||||
if (!dialog.getData('closeonerror')) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
dialog.close();
|
||||
};
|
||||
|
||||
BootstrapDialog.show({
|
||||
title: opts.title || 'Question',
|
||||
message: "<label for='myprompt_input'>"+(opts.label || "Merci de saisir votre réponse ci-dessous :")+"</label><input type='text' class='form-control' id='myprompt_input'/>",
|
||||
autodestroy: true,
|
||||
type: opts.type || 'type-info',
|
||||
size: opts.size || 'size-normal',
|
||||
data: {
|
||||
oncancel: opts.oncancel,
|
||||
onsubmit: opts.onsubmit,
|
||||
onerror: opts.onerror,
|
||||
closeonerror: opts.closeonerror || false,
|
||||
default_answer: opts.default_answer,
|
||||
onSubmitBtnClick: onSubmitBtnClick,
|
||||
data: opts.data,
|
||||
submited: false,
|
||||
},
|
||||
buttons: [
|
||||
{
|
||||
label: opts.cancel_label || 'Annuler',
|
||||
action: function(dialog) {
|
||||
dialog.close();
|
||||
}
|
||||
},
|
||||
{
|
||||
label: opts.submit_label || 'Valider',
|
||||
cssClass: 'btn-danger',
|
||||
action: onSubmitBtnClick
|
||||
}
|
||||
],
|
||||
onshow: function(dialog) {
|
||||
var input = dialog.getModalBody().find('input');
|
||||
input.on('keyup', function (e) {
|
||||
if (e.keyCode == 13) {
|
||||
dialog.getData('onSubmitBtnClick')(dialog);
|
||||
}
|
||||
});
|
||||
if (dialog.getData('default_answer')) {
|
||||
input.val(dialog.getData('default_answer'));
|
||||
}
|
||||
},
|
||||
onhidden: function(dialog) {
|
||||
if (!dialog.getData('submited') && jQuery.type(dialog.getData('oncancel')) == 'function') {
|
||||
dialog.getData('oncancel')(dialog.getData('data'));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var myloadingalert=function(msg,opts) {
|
||||
if ($.type(opts) != "object") {
|
||||
opts={};
|
||||
}
|
||||
BootstrapDialog.show({
|
||||
title: opts.title || 'Merci de patienter',
|
||||
message: msg,
|
||||
autodestroy: true,
|
||||
type: opts.type || 'type-info',
|
||||
size: opts.size || 'size-normal',
|
||||
closable: opts.closable || false,
|
||||
});
|
||||
};
|
||||
|
||||
$( document ).ready(function () {
|
||||
// Manage .myconfirm-link
|
||||
$('.myconfirm-link').click(function(event) {
|
||||
event.preventDefault();
|
||||
myconfirm({
|
||||
title: $(this).data("myconfirm-title") || "Confirmation",
|
||||
question: "<p><strong>"+($(this).data("myconfirm-question") || "Êtes-vous sûre ?")+"</strong></p>",
|
||||
onconfirm: function(data) {
|
||||
window.location = data.confirm_url;
|
||||
},
|
||||
data: {
|
||||
confirm_url: $(this).data('myconfirm-url')
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Manage .myconfirm-btn
|
||||
$('.myconfirm-btn').click(function(event) {
|
||||
if ($(this).data('myconfirm-btn-confirmed') == '1') {
|
||||
$(this).data('myconfirm-btn-confirmed', '');
|
||||
return true;
|
||||
}
|
||||
event.preventDefault();
|
||||
myconfirm({
|
||||
title: $(this).data("myconfirm-title") || "Confirmation",
|
||||
question: "<p><strong>"+($(this).data("myconfirm-question") || "Êtes-vous sûre ?")+"</strong></p>",
|
||||
onconfirm: function(data) {
|
||||
data.btn.data('myconfirm-btn-confirmed', 1);
|
||||
data.btn.click();
|
||||
},
|
||||
data: {
|
||||
btn: $(this)
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
|
@ -1 +0,0 @@
|
|||
fr_FR.UTF8.js
|
|
@ -1 +0,0 @@
|
|||
fr_FR.UTF8.js
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
fr_FR.UTF8.js
|
|
@ -1 +0,0 @@
|
|||
fr_FR.UTF8.js
|
|
@ -1 +0,0 @@
|
|||
fr_FR.UTF8.js
|
|
@ -88,11 +88,11 @@
|
|||
{/block}
|
||||
|
||||
|
||||
<!-- Jquery & Bootstrap -->
|
||||
<!-- Bootstrap -->
|
||||
|
||||
<script src="lib/jquery-3.4.1.min.js"></script>
|
||||
<script src="lib/bootstrap4/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
<!-- Other libs & JavaScript scripts -->
|
||||
{foreach $js as $file}
|
||||
<script language="javascript" src="{$file}"></script>
|
||||
{/foreach}
|
||||
|
|
4
templates/error_404.tpl
Normal file
4
templates/error_404.tpl
Normal file
|
@ -0,0 +1,4 @@
|
|||
{extends file='empty.tpl'}
|
||||
{block name="content"}
|
||||
<p class="center">{t}The requested page can not be found.{/t}</p>
|
||||
{/block}
|
|
@ -1,4 +0,0 @@
|
|||
{extends file='empty.tpl'}
|
||||
{block name="content"}
|
||||
<p class="center">{$message}</p>
|
||||
{/block}
|
|
@ -65,7 +65,7 @@
|
|||
<div class="row">
|
||||
{if $result.count>1}
|
||||
<div class="col-lg-3">
|
||||
<div role="status">{t count=$result.count 1=$result.first 2=$result.last 3=$result.count plural="Elements %1 to %2 on %3"}%3 element{/t}</div>
|
||||
<div role="status">{t 1=$result.first 2=$result.last 3=$result.count}Element(s) %1 to %2 on %3{/t}</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $result.nb_pages > 1}
|
||||
|
|
Loading…
Reference in a new issue