diff --git a/composer.json b/composer.json index 7f6716d..4c1c896 100644 --- a/composer.json +++ b/composer.json @@ -4,6 +4,7 @@ "pear/console_table": "^1.3", "brenard/php-unidecode": "dev-master", "smarty-gettext/smarty-gettext": "^1.6", - "smarty-gettext/tsmarty2c": "^0.2.1" + "smarty-gettext/tsmarty2c": "^0.2.1", + "sepia/po-parser": "^6.0" } } diff --git a/composer.lock b/composer.lock index 26c5eed..e2c479e 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "a04f1f6d9c33a934cf0fe14d26de9ae7", + "content-hash": "59b3a756d6d1647fc36968d2cd8edf9b", "packages": [ { "name": "brenard/php-unidecode", @@ -79,6 +79,10 @@ "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" }, { @@ -182,24 +186,28 @@ "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.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.4.0" }, "type": "library", "autoload": { @@ -228,9 +236,63 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "source": "https://github.com/php-fig/container/tree/1.1.2" }, - "time": "2021-03-05T17:36:06+00:00" + "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" }, { "name": "smarty-gettext/smarty-gettext", @@ -293,16 +355,16 @@ }, { "name": "smarty-gettext/tsmarty2c", - "version": "0.2.1", + "version": "0.2.2", "source": { "type": "git", "url": "https://github.com/smarty-gettext/tsmarty2c.git", - "reference": "84b342e6fb7b4b5b3e92e732635f3b0bbc217649" + "reference": "fb899c70757f868cc3ee47824b04332b1ed02ea8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/smarty-gettext/tsmarty2c/zipball/84b342e6fb7b4b5b3e92e732635f3b0bbc217649", - "reference": "84b342e6fb7b4b5b3e92e732635f3b0bbc217649", + "url": "https://api.github.com/repos/smarty-gettext/tsmarty2c/zipball/fb899c70757f868cc3ee47824b04332b1ed02ea8", + "reference": "fb899c70757f868cc3ee47824b04332b1ed02ea8", "shasum": "" }, "require": { @@ -340,9 +402,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.1" + "source": "https://github.com/smarty-gettext/tsmarty2c/tree/0.2.2" }, - "time": "2020-11-11T21:40:04+00:00" + "time": "2021-12-24T11:57:46+00:00" }, { "name": "smarty/smarty", @@ -408,26 +470,26 @@ }, { "name": "symfony/console", - "version": "v5.3.4", + "version": "v5.4.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "ebd610dacd40d75b6a12bf64b5ccd494fc7d6ab1" + "reference": "900275254f0a1a2afff1ab0e11abd5587a10e1d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/ebd610dacd40d75b6a12bf64b5ccd494fc7d6ab1", - "reference": "ebd610dacd40d75b6a12bf64b5ccd494fc7d6ab1", + "url": "https://api.github.com/repos/symfony/console/zipball/900275254f0a1a2afff1ab0e11abd5587a10e1d6", + "reference": "900275254f0a1a2afff1ab0e11abd5587a10e1d6", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.8", + "symfony/polyfill-php73": "^1.9", "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2", - "symfony/string": "^5.1" + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.1|^6.0" }, "conflict": { "psr/log": ">=3", @@ -442,12 +504,12 @@ }, "require-dev": { "psr/log": "^1|^2", - "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" + "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" }, "suggest": { "psr/log": "For using the console logger", @@ -487,7 +549,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.3.4" + "source": "https://github.com/symfony/console/tree/v5.4.7" }, "funding": [ { @@ -503,20 +565,20 @@ "type": "tidelift" } ], - "time": "2021-07-26T16:33:26+00:00" + "time": "2022-03-31T17:09:19+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.4.0", + "version": "v2.5.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", "shasum": "" }, "require": { @@ -525,7 +587,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -554,7 +616,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.4.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.1" }, "funding": [ { @@ -570,24 +632,25 @@ "type": "tidelift" } ], - "time": "2021-03-23T23:28:01+00:00" + "time": "2022-01-02T09:53:40+00:00" }, { "name": "symfony/finder", - "version": "v5.3.4", + "version": "v5.4.3", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "17f50e06018baec41551a71a15731287dbaab186" + "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/17f50e06018baec41551a71a15731287dbaab186", - "reference": "17f50e06018baec41551a71a15731287dbaab186", + "url": "https://api.github.com/repos/symfony/finder/zipball/231313534dded84c7ecaa79d14bc5da4ccb69b7d", + "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d", "shasum": "" }, "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-php80": "^1.16" }, "type": "library", @@ -616,7 +679,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.3.4" + "source": "https://github.com/symfony/finder/tree/v5.4.3" }, "funding": [ { @@ -632,25 +695,28 @@ "type": "tidelift" } ], - "time": "2021-07-23T15:54:19+00:00" + "time": "2022-01-26T16:34:36+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.23.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + "reference": "30885182c981ab175d4d034db0f6f469898070ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", + "reference": "30885182c981ab175d4d034db0f6f469898070ab", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-ctype": "*" + }, "suggest": { "ext-ctype": "For best performance" }, @@ -665,12 +731,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -695,7 +761,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" }, "funding": [ { @@ -711,20 +777,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2021-10-20T20:35:02+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.23.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab" + "reference": "81b86b50cf841a64252b439e738e97f4a34e2783" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/24b72c6baa32c746a4d0840147c9715e42bb68ab", - "reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783", + "reference": "81b86b50cf841a64252b439e738e97f4a34e2783", "shasum": "" }, "require": { @@ -744,12 +810,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -776,7 +842,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.25.0" }, "funding": [ { @@ -792,11 +858,11 @@ "type": "tidelift" } ], - "time": "2021-05-27T09:17:38+00:00" + "time": "2021-11-23T21:10:46+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.23.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -825,12 +891,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -860,7 +926,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0" }, "funding": [ { @@ -880,21 +946,24 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.23.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1" + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2df51500adbaebdc4c38dea4c89a2e131c45c8a1", - "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-mbstring": "*" + }, "suggest": { "ext-mbstring": "For best performance" }, @@ -909,12 +978,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -940,7 +1009,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" }, "funding": [ { @@ -956,20 +1025,20 @@ "type": "tidelift" } ], - "time": "2021-05-27T09:27:20+00:00" + "time": "2021-11-30T18:21:41+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.23.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" + "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", + "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", "shasum": "" }, "require": { @@ -986,12 +1055,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -1019,7 +1088,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.25.0" }, "funding": [ { @@ -1035,20 +1104,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2021-06-05T21:20:04+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.23.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0" + "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/eca0bf41ed421bed1b57c4958bab16aa86b757d0", - "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", "shasum": "" }, "require": { @@ -1065,12 +1134,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -1102,7 +1171,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" }, "funding": [ { @@ -1118,25 +1187,29 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-03-04T08:16:47+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.4.0", + "version": "v2.5.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" + "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", - "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/24d9dc654b83e91aa59f9d167b131bc3b5bea24c", + "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c", "shasum": "" }, "require": { "php": ">=7.2.5", - "psr/container": "^1.1" + "psr/container": "^1.1", + "symfony/deprecation-contracts": "^2.1|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" }, "suggest": { "symfony/service-implementation": "" @@ -1144,7 +1217,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -1181,7 +1254,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.4.0" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.1" }, "funding": [ { @@ -1197,20 +1270,20 @@ "type": "tidelift" } ], - "time": "2021-04-01T10:43:52+00:00" + "time": "2022-03-13T20:07:29+00:00" }, { "name": "symfony/string", - "version": "v5.3.3", + "version": "v5.4.3", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1" + "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1", - "reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1", + "url": "https://api.github.com/repos/symfony/string/zipball/92043b7d8383e48104e411bc9434b260dbeb5a10", + "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10", "shasum": "" }, "require": { @@ -1221,20 +1294,23 @@ "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", - "symfony/http-client": "^4.4|^5.0", + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/http-client": "^4.4|^5.0|^6.0", "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0" + "symfony/var-exporter": "^4.4|^5.0|^6.0" }, "type": "library", "autoload": { - "psr-4": { - "Symfony\\Component\\String\\": "" - }, "files": [ "Resources/functions.php" ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, "exclude-from-classmap": [ "/Tests/" ] @@ -1264,7 +1340,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.3.3" + "source": "https://github.com/symfony/string/tree/v5.4.3" }, "funding": [ { @@ -1280,7 +1356,7 @@ "type": "tidelift" } ], - "time": "2021-06-27T11:44:38+00:00" + "time": "2022-01-02T09:53:40+00:00" } ], "packages-dev": [], @@ -1293,5 +1369,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.3.0" } diff --git a/includes/cli.php b/includes/cli.php index e8e8b8a..1419810 100644 --- a/includes/cli.php +++ b/includes/cli.php @@ -378,191 +378,3 @@ 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.") -); diff --git a/includes/core.php b/includes/core.php index 36675a0..3165c2f 100644 --- a/includes/core.php +++ b/includes/core.php @@ -49,6 +49,7 @@ $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'); diff --git a/includes/translation-cli.php b/includes/translation-cli.php new file mode 100644 index 0000000..268c4e1 --- /dev/null +++ b/includes/translation-cli.php @@ -0,0 +1,404 @@ +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', sprintf( + _("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', 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; + } + + $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', sprintf( + _("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', sprintf( + _("Fail to update messages in %s PO file using msgmerge (%s)."), + $lang, $po_file) + ); + $error = True; + } + } + elseif (!$created) { + logging('DEBUG', sprintf( + _("PO file not found in lang '%s' directory, ignore it."), + $lang) + ); + } + } + 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 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', sprintf(_("Lang alias symlink found: %s -> %s"), $lang, $real_lang_dir)); + + // Create JSON catalog symlink (if not exists) + $json_link = "$root_dir_path/public_html/translations/$lang.json"; + $link_target = "$real_lang_dir.json"; + if (!file_exists($json_link)) { + if (symlink($link_target, $json_link)) { + logging( + 'INFO', + sprintf( + _("JSON catalog symlink for %s -> %s created (%s)"), + $lang, $real_lang_dir, $json_link) + ); + } + else { + logging( + 'ERROR', + sprintf( + _("Fail to create JSON catalog symlink for %s -> %s (%s)"), + $lang, $real_lang_dir, $json_link) + ); + $error = True; + } + } + elseif (readlink($json_link) == $link_target) { + logging( + 'DEBUG', + sprintf( + _("JSON catalog symlink for %s -> %s already exist (%s)"), + $lang, $real_lang_dir, $json_link) + ); + } + else { + logging( + 'WARNING', + sprintf( + _("JSON catalog file for %s already exist, but it's not a symlink to %s (%s)"), + $lang, $real_lang_dir, $json_link) + ); + $error = True; + } + 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; + } + + // Compile messages from PO file to JSON catalog file + $json_catalog = po2json($lang, $po_file); + $json_file = "$root_dir_path/public_html/translations/$lang.json"; + if(!$fd = fopen($json_file, 'w')) { + logging('ERROR', sprintf( + _("Fail to open %s JSON catalog file in write mode (%s)."), + $lang, $json_file) + ); + $error = True; + } + elseif (fwrite($fd, $json_catalog) === false) { + logging('ERROR', sprintf( + _("Fail to write %s JSON catalog in file (%s)."), + $lang, $json_file) + ); + $error = True; + } + else { + logging('INFO', sprintf( + _("%s JSON catalog writed (%s)."), + $lang, $json_file) + ); + } + } + 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 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." + ) +); diff --git a/includes/translation.php b/includes/translation.php index d042381..07c6982 100644 --- a/includes/translation.php +++ b/includes/translation.php @@ -3,13 +3,13 @@ // Gettext text domain define('TEXT_DOMAIN', 'DEFAULT'); -/* +/** * List available translation languages * - * @param[in] $as_locales boolean If true, locale names will be return instead - * of primary languages (optional, default: false) + * @param $as_locales boolean If true, locale names will be return instead + * of primary languages (optional, default: false) * - * @retval array Array of available translation languages (or locales) + * @return 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[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 + * @param $lang string The translation language + * @param $default string|null Default locale name to return if any available translation + * locales matched with the specified language + * (optional, default: $default_locale) + * @return string Corresponding locale */ function lang2locale($lang, $default=null) { global $default_locale; @@ -56,21 +56,27 @@ function lang2locale($lang, $default=null) { return $default; } -// Helper function: just mark message to translation +/** + * Helper function: just mark message for translation + * + * @param string $msg The message to translate + * + * @return string The message without transformation + */ function ___($msg) { return $msg; } -/* +/** * Initialize translation system * * Detect best translation language and configure the translation * system. * - * @retval void + * @return void */ function init_translation() { - global $root_dir_path, $root_lang_dir, $default_locale; + global $root_dir_path, $root_lang_dir, $default_locale, $smarty; $root_lang_dir = "$root_dir_path/lang"; if (!class_exists('Locale')) { @@ -132,4 +138,12 @@ 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 + $json_translation_file = "translations/$lang.json"; + if (php_sapi_name() != "cli" && is_file("$root_dir_path/public_html/$json_translation_file")) { + add_js_file("lib/babel.js"); + add_js_file("js/translation.js"); + $smarty->assign('lang', $lang); + } } diff --git a/lang/fr_FR.UTF8/LC_MESSAGES/DEFAULT.mo b/lang/fr_FR.UTF8/LC_MESSAGES/DEFAULT.mo index b03fd9f..2fef8c7 100644 Binary files a/lang/fr_FR.UTF8/LC_MESSAGES/DEFAULT.mo and b/lang/fr_FR.UTF8/LC_MESSAGES/DEFAULT.mo differ diff --git a/lang/fr_FR.UTF8/LC_MESSAGES/DEFAULT.po b/lang/fr_FR.UTF8/LC_MESSAGES/DEFAULT.po index dda2096..f6cef8e 100644 --- a/lang/fr_FR.UTF8/LC_MESSAGES/DEFAULT.po +++ b/lang/fr_FR.UTF8/LC_MESSAGES/DEFAULT.po @@ -1,3 +1,17 @@ +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: 2022-04-24 16:39+0200\n" +"PO-Revision-Date: \n" +"Last-Translator: Benjamin Renard \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." @@ -22,7 +36,7 @@ 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:134 +#: /home/brenard/dev/eesyphp/includes/translation.php:140 msgid "Hello world !" msgstr "Bonjour tout le monde !" @@ -39,7 +53,6 @@ msgstr "" "merci de prendre contact avec le support." #: /home/brenard/dev/eesyphp/includes/url-public.php:96 -#: /home/brenard/dev/eesyphp/templates/search.tpl:22 msgid "Search" msgstr "Rechercher" @@ -150,6 +163,181 @@ msgstr "Refusé" msgid "Archived" msgstr "Archivé" +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:51 +msgid "Fail to list PHP files." +msgstr "Impossible de lister les fichiers PHP." + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:68 +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:78 +msgid "Fail to list JS files." +msgstr "Impossible de lister les fichiers JS." + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:95 +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:108 +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:134 +msgid "Fail to merge messages using msgcat." +msgstr "Impossible de fusionner les messages en utilisant msgcat." + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:139 +msgid "Extract messages that need to be translated" +msgstr "Extraire les messages devant être traduit" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:141 +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:159 +#, php-format +msgid "Compendium file %s not found." +msgstr "Fichier compendium %s introuvable." + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:171 +#, 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:186 +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:325 +#, php-format +msgid "Lang directory '%s' found" +msgstr "Dossier de langue '%s' trouvé" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:193 +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:332 +#, 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:210 +#, 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:230 +#, 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:238 +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:342 +#, 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:247 +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:390 +#, 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:252 +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:254 +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:281 +#, 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:291 +#, 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:299 +#, 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:309 +#, 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:317 +#, 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:356 +#, 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:367 +#, 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:374 +#, 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:381 +#, php-format +msgid "%s JSON catalog writed (%s)." +msgstr "Catalogue JSON %s créé (%s)." + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:396 +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:401 +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:12 #, php-format msgid "" @@ -388,127 +576,54 @@ msgid "-m/--max-age Item expiration limit (in days, optional)" msgstr "" "-m/--max-age Limite d'expiration des éléments (en secondes, optionnel)" -#: /home/brenard/dev/eesyphp/includes/cli.php:393 -msgid "Fail to list PHP files." -msgstr "Impossible de lister les fichiers PHP." +#: /home/brenard/dev/eesyphp/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: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:5 +msgid "Do you confirm?" +msgstr "Confirmez-vous ?" -#: /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:11 +#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:108 +msgid "Cancel" +msgstr "Annuler" -#: /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:17 +#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:114 +msgid "Validate" +msgstr "Valider" -#: /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:44 +msgid "Error" +msgstr "Erreur" -#: /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:52 +msgid "OK" +msgstr "OK" -#: /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:91 +msgid "Question" +msgstr "Question" -#: /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:92 +msgid "Please enter your answer below:" +msgstr "Merci de saisir vos réponses ci-dessous :" -#: /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:143 +msgid "Please wait" +msgstr "Merci de patienter" -#: /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/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: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/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/templates/form.tpl:7 #: /home/brenard/dev/eesyphp/templates/search.tpl:36 @@ -610,8 +725,10 @@ msgid "No item found." msgstr "Aucun élément trouvé." #: /home/brenard/dev/eesyphp/templates/search.tpl:68 -msgid "Element(s) %1 to %2 on %3" -msgstr "Élément(s) %1 à %2 sur %3" +msgid "%3 element" +msgid_plural "Elements %1 to %2 on %3" +msgstr[0] "%3 élément" +msgstr[1] "Éléments %1 à %2 sur %3" #: /home/brenard/dev/eesyphp/templates/error_404.tpl:3 msgid "The requested page can not be found." @@ -644,3 +761,31 @@ 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" diff --git a/lang/headers.pot b/lang/headers.pot new file mode 100644 index 0000000..33a554c --- /dev/null +++ b/lang/headers.pot @@ -0,0 +1,7 @@ +msgid "" +msgstr "" +"POT-Creation-Date: 2022-04-24 16:39+0200\n" +"PO-Revision-Date: 2022-04-24 16:39+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" \ No newline at end of file diff --git a/lang/js-messages.pot b/lang/js-messages.pot new file mode 100644 index 0000000..936dcef --- /dev/null +++ b/lang/js-messages.pot @@ -0,0 +1,48 @@ +#: /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 "" diff --git a/lang/messages.pot b/lang/messages.pot index 1b657a4..95ea5c6 100644 --- a/lang/messages.pot +++ b/lang/messages.pot @@ -1,3 +1,11 @@ +msgid "" +msgstr "" +"POT-Creation-Date: 2022-04-24 16:39+0200\n" +"PO-Revision-Date: 2022-04-24 16:39+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 "" @@ -22,7 +30,7 @@ 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:134 +#: /home/brenard/dev/eesyphp/includes/translation.php:140 msgid "Hello world !" msgstr "" @@ -37,7 +45,6 @@ msgid "" msgstr "" #: /home/brenard/dev/eesyphp/includes/url-public.php:96 -#: /home/brenard/dev/eesyphp/templates/search.tpl:22 msgid "Search" msgstr "" @@ -144,6 +151,151 @@ msgstr "" msgid "Archived" msgstr "" +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:51 +msgid "Fail to list PHP files." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:68 +msgid "Fail to extract messages from PHP files using xgettext." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:78 +msgid "Fail to list JS files." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:95 +msgid "Fail to extract messages from JS files using xgettext." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:108 +msgid "" +"Fail to extract messages from template files using tsmarty2c.php script." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:134 +msgid "Fail to merge messages using msgcat." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:139 +msgid "Extract messages that need to be translated" +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:141 +msgid "This command could be used to generate/update lang/messages.pot file." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:159 +#, php-format +msgid "Compendium file %s not found." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:171 +#, php-format +msgid "POT file not found (%s). Please run extract_messages first." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:186 +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:325 +#, php-format +msgid "Lang directory '%s' found" +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:193 +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:332 +#, php-format +msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:210 +#, php-format +msgid "Fail to init messages in %s PO file using msginit (%s)." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:230 +#, php-format +msgid "Fail to update messages in %s PO file using msgmerge (%s)." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:238 +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:342 +#, php-format +msgid "PO file not found in lang '%s' directory, ignore it." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:247 +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:390 +#, php-format +msgid "Fail to open root lang directory (%s)." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:252 +msgid "Update messages in translation PO lang files" +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:254 +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:281 +#, php-format +msgid "Lang alias symlink found: %s -> %s" +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:291 +#, php-format +msgid "JSON catalog symlink for %s -> %s created (%s)" +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:299 +#, php-format +msgid "Fail to create JSON catalog symlink for %s -> %s (%s)" +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:309 +#, php-format +msgid "JSON catalog symlink for %s -> %s already exist (%s)" +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:317 +#, 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:356 +#, 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:367 +#, php-format +msgid "Fail to open %s JSON catalog file in write mode (%s)." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:374 +#, php-format +msgid "Fail to write %s JSON catalog in file (%s)." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:381 +#, php-format +msgid "%s JSON catalog writed (%s)." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:396 +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:401 +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:12 #, php-format msgid "" @@ -366,95 +518,55 @@ msgstr "" 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." +#: /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/includes/cli.php:410 -msgid "Fail to extract messages from PHP files using xgettext." +#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:5 +msgid "Do you confirm?" msgstr "" -#: /home/brenard/dev/eesyphp/includes/cli.php:421 -msgid "" -"Fail to extract messages from template files using tsmarty2c.php script." +#: /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/includes/cli.php:431 -msgid "Fail to merge messages using msgcat." +#: /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/includes/cli.php:436 -msgid "Extract messages that need to be translated" +#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:44 +msgid "Error" msgstr "" -#: /home/brenard/dev/eesyphp/includes/cli.php:438 -msgid "This command could be used to generate/update lang/messages.pot file." +#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:52 +msgid "OK" msgstr "" -#: /home/brenard/dev/eesyphp/includes/cli.php:449 -#, php-format -msgid "POT file not found (%s). Please run extract_messages first." +#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:91 +msgid "Question" msgstr "" -#: /home/brenard/dev/eesyphp/includes/cli.php:460 -#: /home/brenard/dev/eesyphp/includes/cli.php:519 -#, php-format -msgid "Lang directory '%s' found" +#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:92 +msgid "Please enter your answer below:" 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." +#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:143 +msgid "Please wait" 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." +#: /home/brenard/dev/eesyphp/public_html/js/myconfirm.js:144 +msgid "Please wait while your request is being processed." msgstr "" -#: /home/brenard/dev/eesyphp/includes/cli.php:489 -#, php-format -msgid "Fail to update messages in %s PO file using msgmerge (%s)." +#: /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 "" -#: /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 @@ -552,8 +664,10 @@ msgid "No item found." msgstr "" #: /home/brenard/dev/eesyphp/templates/search.tpl:68 -msgid "Element(s) %1 to %2 on %3" -msgstr "" +msgid "%3 element" +msgid_plural "Elements %1 to %2 on %3" +msgstr[0] "" +msgstr[1] "" #: /home/brenard/dev/eesyphp/templates/error_404.tpl:3 msgid "The requested page can not be found." diff --git a/lang/php-messages.pot b/lang/php-messages.pot index 3157996..1df1fad 100644 --- a/lang/php-messages.pot +++ b/lang/php-messages.pot @@ -22,7 +22,7 @@ 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:134 +#: /home/brenard/dev/eesyphp/includes/translation.php:140 msgid "Hello world !" msgstr "" @@ -143,6 +143,151 @@ msgstr "" msgid "Archived" msgstr "" +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:51 +msgid "Fail to list PHP files." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:68 +msgid "Fail to extract messages from PHP files using xgettext." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:78 +msgid "Fail to list JS files." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:95 +msgid "Fail to extract messages from JS files using xgettext." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:108 +msgid "" +"Fail to extract messages from template files using tsmarty2c.php script." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:134 +msgid "Fail to merge messages using msgcat." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:139 +msgid "Extract messages that need to be translated" +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:141 +msgid "This command could be used to generate/update lang/messages.pot file." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:159 +#, php-format +msgid "Compendium file %s not found." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:171 +#, php-format +msgid "POT file not found (%s). Please run extract_messages first." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:186 +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:325 +#, php-format +msgid "Lang directory '%s' found" +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:193 +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:332 +#, php-format +msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:210 +#, php-format +msgid "Fail to init messages in %s PO file using msginit (%s)." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:230 +#, php-format +msgid "Fail to update messages in %s PO file using msgmerge (%s)." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:238 +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:342 +#, php-format +msgid "PO file not found in lang '%s' directory, ignore it." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:247 +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:390 +#, php-format +msgid "Fail to open root lang directory (%s)." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:252 +msgid "Update messages in translation PO lang files" +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:254 +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:281 +#, php-format +msgid "Lang alias symlink found: %s -> %s" +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:291 +#, php-format +msgid "JSON catalog symlink for %s -> %s created (%s)" +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:299 +#, php-format +msgid "Fail to create JSON catalog symlink for %s -> %s (%s)" +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:309 +#, php-format +msgid "JSON catalog symlink for %s -> %s already exist (%s)" +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:317 +#, 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:356 +#, 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:367 +#, php-format +msgid "Fail to open %s JSON catalog file in write mode (%s)." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:374 +#, php-format +msgid "Fail to write %s JSON catalog in file (%s)." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:381 +#, php-format +msgid "%s JSON catalog writed (%s)." +msgstr "" + +#: /home/brenard/dev/eesyphp/includes/translation-cli.php:396 +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:401 +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:12 #, php-format msgid "" @@ -364,89 +509,3 @@ msgstr "" #: /home/brenard/dev/eesyphp/includes/cli.php:378 msgid "-m/--max-age Item expiration limit (in days, optional)" msgstr "" - -#: /home/brenard/dev/eesyphp/includes/cli.php:393 -msgid "Fail to list PHP files." -msgstr "" - -#: /home/brenard/dev/eesyphp/includes/cli.php:410 -msgid "Fail to extract messages from PHP files using xgettext." -msgstr "" - -#: /home/brenard/dev/eesyphp/includes/cli.php:421 -msgid "" -"Fail to extract messages from template files using tsmarty2c.php script." -msgstr "" - -#: /home/brenard/dev/eesyphp/includes/cli.php:431 -msgid "Fail to merge messages using msgcat." -msgstr "" - -#: /home/brenard/dev/eesyphp/includes/cli.php:436 -msgid "Extract messages that need to be translated" -msgstr "" - -#: /home/brenard/dev/eesyphp/includes/cli.php:438 -msgid "This command could be used to generate/update lang/messages.pot file." -msgstr "" - -#: /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 "" diff --git a/lang/templates-messages.pot b/lang/templates-messages.pot index 2e9328d..266ee98 100644 --- a/lang/templates-messages.pot +++ b/lang/templates-messages.pot @@ -102,8 +102,10 @@ msgid "No item found." msgstr "" #: /home/brenard/dev/eesyphp/templates/search.tpl:68 -msgid "Element(s) %1 to %2 on %3" -msgstr "" +msgid "%3 element" +msgid_plural "Elements %1 to %2 on %3" +msgstr[0] "" +msgstr[1] "" #: /home/brenard/dev/eesyphp/templates/error_404.tpl:3 msgid "The requested page can not be found." diff --git a/public_html/js/translation.js b/public_html/js/translation.js new file mode 100644 index 0000000..3e4d084 --- /dev/null +++ b/public_html/js/translation.js @@ -0,0 +1,26 @@ +/* +* I18n +*/ +var lang = null; +var translations; + +function _(string) { + var translated = translations.gettext(string); + return (translated !== '') ? translated : string; +} + + +function ngettext(singular, plural, n) { + return translations.ngettext(singular, plural, n); +} + + +$(document).ready( function() { + // Load Gettext translations + var catalog = {}; + $.getJSON('translations/'+lang+'.json', function(data) { + catalog = data; + }).always(function() { + translations = babel.Translations.load(catalog).install(); + }); +}); diff --git a/public_html/lib/babel.js b/public_html/lib/babel.js new file mode 100644 index 0000000..5aff8f0 --- /dev/null +++ b/public_html/lib/babel.js @@ -0,0 +1,160 @@ +/** + * 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; + }); + } + +}; diff --git a/public_html/translations/fr.json b/public_html/translations/fr.json new file mode 120000 index 0000000..181ecc9 --- /dev/null +++ b/public_html/translations/fr.json @@ -0,0 +1 @@ +fr_FR.UTF8.json \ No newline at end of file diff --git a/public_html/translations/fr_FR.UTF-8.json b/public_html/translations/fr_FR.UTF-8.json new file mode 120000 index 0000000..181ecc9 --- /dev/null +++ b/public_html/translations/fr_FR.UTF-8.json @@ -0,0 +1 @@ +fr_FR.UTF8.json \ No newline at end of file diff --git a/public_html/translations/fr_FR.UTF8.json b/public_html/translations/fr_FR.UTF8.json new file mode 100644 index 0000000..2618a17 --- /dev/null +++ b/public_html/translations/fr_FR.UTF8.json @@ -0,0 +1 @@ +{"messages":{"Invalid element identifier.":"Identifiant d'\u00e9l\u00e9ment invalide.","Item #% s not found.":"L'\u00e9l\u00e9ment #%s est introuvable.","Smarty version not supported.":"Une erreur est survenue en affichant cette page.","No template specified.":"Aucun template sp\u00e9cifi\u00e9.","An error occurred while viewing this page.":"Une erreur est survenue en affichant cette page.","Hello world !":"Bonjour tout le monde !","Any":"Peu importe","An error occurred while listing the items. If the problem persists, please contact support.":"Une erreur est survenue en listant les \u00e9l\u00e9ments. Si le probl\u00e8me persiste, merci de prendre contact avec le support.","Search":"Rechercher","Element %s":"\u00c9l\u00e9ment %s","The element '% s' has been created.":"L'\u00e9l\u00e9ment '%s' a bien \u00e9t\u00e9 cr\u00e9\u00e9.","An error occurred while saving this item.":"Une erreur est survenue en enregistrant cet \u00e9l\u00e9ment.","There are errors preventing this item from being saved. Please correct them before attempting to add this item.":"Des erreurs emp\u00eachent l'enregistrement de cet \u00e9l\u00e9ment. Merci de les corriger avant de tenter d'ajouter cet \u00e9l\u00e9ment.","New":"Nouveau","You cannot edit this item.":"Vous ne pouvez pas modifier cet \u00e9l\u00e9ment.","You have not made any changes to element '% s'.":"Vous n'avez apport\u00e9 aucune modification \u00e0 l'\u00e9l\u00e9ment '%s'.","The element '% s' has been updated successfully.":"L'\u00e9l\u00e9ment '%s' a bien \u00e9t\u00e9 mise \u00e0 jour.","An error occurred while updating this item.":"Une erreur est survenue en mettant \u00e0 jour cet \u00e9l\u00e9ment.","There are errors preventing this item from being saved. Please correct them before attempting to save your changes.":"Des erreurs emp\u00eachent l'enregistrement de cet \u00e9l\u00e9ment. Merci de les corriger avant de tenter d'enregistrer vos modifications.","Element %s: Modification":"\u00c9l\u00e9ment %s : Modification","This item is already archived.":"Cet \u00e9l\u00e9ment est d\u00e9j\u00e0 archiv\u00e9.","You cannot archive this item.":"Vous ne pouvez pas archiver cet \u00e9l\u00e9ment.","The element '% s' has been archived successfully.":"L'\u00e9l\u00e9ment '%s' a bien \u00e9t\u00e9 archiv\u00e9.","An error occurred while archiving this item.":"Une erreur est survenue en archivant cet \u00e9l\u00e9ment.","You cannot delete this item.":"Vous ne pouvez pas supprimer cet \u00e9l\u00e9ment.","The element '% s' has been deleted successfully.":"L'\u00e9l\u00e9ment '%s' a bien \u00e9t\u00e9 supprim\u00e9.","An error occurred while deleting this item.":"Une erreur est survenue en supprimant cet \u00e9l\u00e9ment.","Unable to connect to the database.":"Impossible de se connecter \u00e0 la base de donn\u00e9es.","Pending":"En attente","Validated":"Valid\u00e9","Refused":"Refus\u00e9","Archived":"Archiv\u00e9","Fail to list PHP files.":"Impossible de lister les fichiers PHP.","Fail to extract messages from PHP files using xgettext.":"Impossible d'extraire les messages depuis les fichiers PHP en utilisant xgettext.","Fail to list JS files.":"Impossible de lister les fichiers JS.","Fail to extract messages from JS files using xgettext.":"Impossible d'extraire les messages depuis les fichiers JS en utilisant xgettext.","Fail to extract messages from template files using tsmarty2c.php script.":"Impossible d'extraire les messages depuis les fichiers template en utilisant le script tsmarty2c.php.","Fail to merge messages using msgcat.":"Impossible de fusionner les messages en utilisant msgcat.","Extract messages that need to be translated":"Extraire les messages devant \u00eatre traduit","This command could be used to generate\/update lang\/messages.pot file.":"Cette commande peut-\u00eatre utilis\u00e9e pour g\u00e9n\u00e9rer\/mettre \u00e0 jour le fichier lang\/messages.pot.","Compendium file %s not found.":"Fichier compendium %s introuvable.","POT file not found (%s). Please run extract_messages first.":"Fichier POT introuvable (%s). Merci de lancer la commande extract_messages pour commencer.","Lang directory '%s' found":"Dossier de langue '%s' trouv\u00e9","LC_MESSAGES directory not found in lang '%s' directory, ignore it.":"Le dossier LC_MESSAGES est introuvable dans le dossier de langue '%s', on l'ignore.","Fail to init messages in %s PO file using msginit (%s).":"Impossible d'initialiser les messages dans le fichier PO %s en utilisant msginit (%s).","Fail to update messages in %s PO file using msgmerge (%s).":"Impossible de mettre \u00e0 jour les messages dans les fichiers PO %s en utilisant msgmerge (%s).","PO file not found in lang '%s' directory, ignore it.":"Le fichier PO est introuvable dans le dossier de langue '%s', on l'ignore.","Fail to open root lang directory (%s).":"Impossible d'ouvrir le dossier racine des langues (%s).","Update messages in translation PO lang files":"Mettre \u00e0 jour les messages dans les fichiers de traduction PO existants","This command could be used to init\/update PO files in lang\/*\/LC_MESSAGES directories.":"Cette commande peut-\u00eatre utilis\u00e9e pour initialiser\/mettre \u00e0 jour les fichiers PO les dossiers lang\/*\/LC_MESSAGES.","Lang alias symlink found: %s -> %s":"Lien symbolique d'alias de langue trouv\u00e9 : %s -> %s","JSON catalog symlink for %s -> %s created (%s)":"Lien symbolique de catalogue JSON pour %s -> %s cr\u00e9\u00e9 (%s)","Fail to create JSON catalog symlink for %s -> %s (%s)":"Impossible de cr\u00e9er le lien symbolique de catalogue JSON pour %s -> %s (%s)","JSON catalog symlink for %s -> %s already exist (%s)":"Le lien symbolique du catalogue JSON pour %s -> %s existe d\u00e9j\u00e0 (%s)","JSON catalog file for %s already exist, but it's not a symlink to %s (%s)":"Le catalogue JSON pour %s existe, mais il ne s'agit par d'un lien symbolique vers %s (%s)","Fail to compile messages from %s PO file as MO file using msgfmt (%s).":"Impossible de compiler les messages depuis le fichier PO %s en tant que fichier MO en utilisant msgfmt (%s).","Fail to open %s JSON catalog file in write mode (%s).":"Impossible d'ouvrir le catalogue JSON %s en mode \u00e9criture (%s).","Fail to write %s JSON catalog in file (%s).":"Impossible d'\u00e9crire le fichier du catalogue JSON %s (%s).","%s JSON catalog writed (%s).":"Catalogue JSON %s cr\u00e9\u00e9 (%s).","Compile messages from existing translation PO lang files to corresponding MO files and JSON catalogs":"Compiler les messages depuis les fichiers PO de traduction existants vers les fichiers MO et les catalogues JSON correspondant","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.":"Cette commande peut-\u00eatre utilis\u00e9e pour compiler les fichiers PO dans les dossiers lang\/*\/LC_MESSAGES en fichiers MO and en tant que catalogues JSON dans public_html\/translations.","\n\n\nMail initialy intended for %s.":"\n\n\nMail originalement destin\u00e9 \u00e0 %s.","Whoops ! Page not found":"Oups ! Page introuvable","Unable to determine the requested page. If the problem persists, please contact support.":"Impossible de d\u00e9terminer la page demand\u00e9e. Si le probl\u00e8me persiste, merci de prendre contact avec le support.","Unable to determine the requested page (loop detected). If the problem persists, please contact support.":"Impossible de d\u00e9terminer la page demand\u00e9e (boucle d\u00e9tect\u00e9e). Si le probl\u00e8me persiste, merci de prendre contact avec le support.","This request cannot be processed.":"Cette requ\u00eate ne peut \u00eatre trait\u00e9e.","This request could not be processed correctly.":"Cette requ\u00eate n'a put \u00eatre trait\u00e9e correctement.","The CLI command '%s' already exists.":"La commande CLI '%s' n'existe pas.","The CLI command '%s' handler is not callable !":"La fonction impl\u00e9mentant la commande CLI '%s' n'est pas ex\u00e9cutable !","Usage: %s [-h] [-qd] command\n":"Utilisation: %s [-h] [-qd] commande\n"," -h Show this message\n":" -h Affiche ce message\n"," -q \/ -d Quiet\/Debug mode\n":" -q \/ -d Mode silencieux\/debug\n"," --trace Trace mode (the most verbose)\n":" --trace Mode trace (le plus verbeux)\n"," command Command to run\n":" command La commande \u00e0 ex\u00e9cuter\n","Available commands:\n":"Commandes disponibles:\n","Only one command could be executed !":"Une seul commande peut-\u00eatre ex\u00e9cut\u00e9e !","Invalid parameter \"%s\".\nNote: Command's parameter\/argument must be place after the command.":"Param\u00e8tre \"%s\" invalide.\nNote : Les param\u00e8tres\/arguments de la requ\u00eate doivent \u00eatre plac\u00e9s apr\u00e8s celle-ci.","An exception occured running command %s":"Une exception est survenue en ex\u00e9cutant la commande %s","Item #%s:\n":"\u00c9l\u00e9ment #%s :\n","ID: %s":"ID : %s","Name: '%s'":"Nom : %s","Date: %s":"Date : %s","Description: %s":"Description : %s","Not set":"Non-d\u00e9fini","Status: %s":"Statut : %s","No item.\n":"Aucun \u00e9l\u00e9ment.\n","%d item(s)":"%d \u00e9l\u00e9ment(s)","List\/search items":"Lister\/rechercher les \u00e9l\u00e9ments","[patterns]":"[mots cl\u00e9s]","-o|--orderby Ordering list criterion. Possible values:":"-o|--orderby Crit\u00e8re de tri de la liste. Valeurs possibles :","-r|--reverse Reverse order":"-r|--reverse Ordre inverse","-s|--status Filter on status. Possible values:":"-s|--status Filtrer sur le statut. Valeurs possibles :","You must provide a valid ID.":"Vous devez fournir un ID valide.","Item #%s not found.":"\u00c9l\u00e9ment #%s introuvable.","Show item":"Voir un \u00e9l\u00e9ment","[ID]":"[ID]","You must provide item ID.":"Vous devez fournir un ID valide.","Invalid item ID":"ID d'\u00e9l\u00e9ment invalide","Are you sure you want to delete this item? Type 'yes' to continue: ":"\u00cates-vous s\u00fbre de vouloir supprimer cet \u00e9l\u00e9ment ? Taper 'yes' pour continuer : ","User cancel":"L'utilisateur a annul\u00e9","An error occured deleting item #%d.":"Une erreur est survenue en supprimant l'\u00e9l\u00e9ment #%d.","Delete item":"Supprimer un \u00e9l\u00e9ment","[item ID]":"[ID de l'\u00e9l\u00e9ment]","Export items (as CSV)":"Exporter les \u00e9l\u00e9ments (au format CSV)","[output file path]":"[chemin du fichier de sortie]","Restore items (from CSV)":"Restaurer les \u00e9l\u00e9ments (depuis un fichier CSV)","[input file path]":"[chemin du fichier d'entr\u00e9e]","Cron to handle item expiration":"Cron g\u00e9rant l'expiration des \u00e9l\u00e9ments","-j\/--just-try Just-try mode : do not really removed expired item(s)":"-j\/--just-try Mode just-try : Ne supprime pas r\u00e9ellement les \u00e9l\u00e9ments expir\u00e9s","-m\/--max-age Item expiration limit (in days, optional)":"-m\/--max-age Limite d'expiration des \u00e9l\u00e9ments (en secondes, optionnel)","Confirmation":"Confirmation","Do you confirm?":"Confirmez-vous ?","Cancel":"Annuler","Validate":"Valider","Error":"Erreur","OK":"OK","Question":"Question","Please enter your answer below:":"Merci de saisir vos r\u00e9ponses ci-dessous :","Please wait":"Merci de patienter","Please wait while your request is being processed.":"Merci de patienter pendant le traitement de votre requ\u00eate.","Are you sure?":"\u00cates-vous sure ?","Name":"Nom","Status":"Statut","Description":"Description","Back":"Retour","Save":"Enregistrer","Add":"Ajouter","A fatal error has occurred and it is preventing this application from working properly. Please try again later or contact support.":"Une erreur fatale est survenue et celle-ci emp\u00eache cette application de fonctionner correctement. Merci de r\u00e9essayer ult\u00e9rieurement ou de prendre contact avec le service support.","Error: %1":"Erreur : %1","Pattern":"Mot cl\u00e9","Nb by page":"Nb par page","Reset":"R\u00e9initialiser","Date":"Date","Actions":"Actions","View":"Voir","Modify":"Modifier","Are you sure you want to archive this item?":"\u00cates-vous s\u00fbre de vouloir archiver cet \u00e9l\u00e9ment ?","Archive":"Archiver","Are you sure you want to delete this item?":"\u00cates-vous s\u00fbre de vouloir supprimer cet \u00e9l\u00e9ment ?","Delete":"Supprimer","No item found.":"Aucun \u00e9l\u00e9ment trouv\u00e9.","%3 element":[null,"Elements %1 to %2 on %3"],"The requested page can not be found.":"La page demand\u00e9e est introuvable.","Creation date":"Date de cr\u00e9ation","Unspecified.":"Non-sp\u00e9cifi\u00e9.","Hello, world!":"Bonjour tout le monde !","This is a simple app to show the different possibilities and basic functionality.":"Ceci est une simple application pour montrer les diff\u00e9rentes possibilit\u00e9s et les fonctionnalit\u00e9s de base.","This app contains some demo pages:":"Cette application contient quelques pages de d\u00e9mo :","Search page":"Page de recherche","Update messages in existing translation PO lang files":"Mettre \u00e0 jour les messages dans les fichiers de traduction PO existants","This command could be used to update PO files in lang\/*\/LC_MESSAGES directories.":"Cette commande peut-\u00eatre utilis\u00e9e pour mettre \u00e0 jour les fichiers PO les dossiers lang\/*\/LC_MESSAGES.","Compile messages from existing translation PO lang files to corresponding MO files":"Compiler les messages depuis les fichiers PO de traduction existants vers les fichiers MO correspondant","This command could be used to compile PO files in lang\/*\/LC_MESSAGES directories to MO files.":"Cette commande peut-\u00eatre utilis\u00e9e pour compiler les fichiers PO dans les dossiers lang\/*\/LC_MESSAGES en fichiers MO.","Element(s) %1 to %2 on %3":"\u00c9l\u00e9ment(s) %1 \u00e0 %2 sur %3"},"locale":"fr_FR.UTF8","domain":"DEFAULT","plural_expr":"(n > 1)"} \ No newline at end of file diff --git a/public_html/translations/fr_FR.json b/public_html/translations/fr_FR.json new file mode 120000 index 0000000..181ecc9 --- /dev/null +++ b/public_html/translations/fr_FR.json @@ -0,0 +1 @@ +fr_FR.UTF8.json \ No newline at end of file diff --git a/public_html/translations/fr_FR.utf-8.json b/public_html/translations/fr_FR.utf-8.json new file mode 120000 index 0000000..181ecc9 --- /dev/null +++ b/public_html/translations/fr_FR.utf-8.json @@ -0,0 +1 @@ +fr_FR.UTF8.json \ No newline at end of file diff --git a/public_html/translations/fr_FR.utf8.json b/public_html/translations/fr_FR.utf8.json new file mode 120000 index 0000000..181ecc9 --- /dev/null +++ b/public_html/translations/fr_FR.utf8.json @@ -0,0 +1 @@ +fr_FR.UTF8.json \ No newline at end of file diff --git a/templates/empty.tpl b/templates/empty.tpl index 3f202d6..0737fde 100644 --- a/templates/empty.tpl +++ b/templates/empty.tpl @@ -97,5 +97,12 @@ {/foreach} + + + diff --git a/templates/search.tpl b/templates/search.tpl index 655e440..1efe03a 100644 --- a/templates/search.tpl +++ b/templates/search.tpl @@ -65,7 +65,7 @@
{if $result.count>1}
-
{t 1=$result.first 2=$result.last 3=$result.count}Element(s) %1 to %2 on %3{/t}
+
{t count=$result.count 1=$result.first 2=$result.last 3=$result.count plural="Elements %1 to %2 on %3"}%3 element{/t}
{/if} {if $result.nb_pages > 1}