I18n: Split translated messages of core and app in discting gettext domains
This commit is contained in:
parent
9213ae076f
commit
73dc860972
35 changed files with 1550 additions and 1077 deletions
|
@ -30,5 +30,8 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "^1.9"
|
||||
}
|
||||
},
|
||||
"bin": [
|
||||
"eesyphp"
|
||||
]
|
||||
}
|
||||
|
|
9
eesyphp
Executable file
9
eesyphp
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
use EesyPHP\App;
|
||||
use EesyPHP\Cli;
|
||||
|
||||
require __DIR__."/vendor/autoload.php";
|
||||
App::init(null, null, __DIR__);
|
||||
Cli :: handle_args();
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -1,7 +1,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: 2023-02-13 02:58+0100\n"
|
||||
"POT-Creation-Date: 2023-02-14 00:22+0100\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: Benjamin Renard <brenard@zionetrix.net>\n"
|
||||
"Language-Team: \n"
|
||||
|
@ -12,377 +12,6 @@ msgstr ""
|
|||
"X-Generator: Poedit 2.4.2\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#: Cli.php:34
|
||||
#, php-format
|
||||
msgid "The CLI command '%s' already exists."
|
||||
msgstr "La commande CLI '%s' n'existe pas."
|
||||
|
||||
#: Cli.php:39
|
||||
#, php-format
|
||||
msgid "The CLI command '%s' handler is not callable !"
|
||||
msgstr "La fonction implémentant la commande CLI '%s' n'est pas exécutable !"
|
||||
|
||||
#: Cli.php:71
|
||||
#, php-format
|
||||
msgid "Usage: %s [-h] [-qd] command\n"
|
||||
msgstr "Utilisation: %s [-h] [-qd] commande\n"
|
||||
|
||||
#: Cli.php:72
|
||||
msgid " -h Show this message\n"
|
||||
msgstr " -h Affiche ce message\n"
|
||||
|
||||
#: Cli.php:73
|
||||
msgid " -q / -d Quiet/Debug mode\n"
|
||||
msgstr " -q / -d Mode silencieux/debug\n"
|
||||
|
||||
#: Cli.php:74
|
||||
msgid " --trace Trace mode (the most verbose)\n"
|
||||
msgstr " --trace Mode trace (le plus verbeux)\n"
|
||||
|
||||
#: Cli.php:75
|
||||
msgid " command Command to run\n"
|
||||
msgstr " command La commande à exécuter\n"
|
||||
|
||||
#: Cli.php:77
|
||||
msgid "Available commands:\n"
|
||||
msgstr "Commandes disponibles:\n"
|
||||
|
||||
#: Cli.php:125
|
||||
msgid "Only one command could be executed !"
|
||||
msgstr "Une seul commande peut-être exécutée !"
|
||||
|
||||
#: Cli.php:153
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Invalid parameter \"%s\".\n"
|
||||
"Note: Command's parameter/argument must be place after the command."
|
||||
msgstr ""
|
||||
"Paramètre \"%s\" invalide.\n"
|
||||
"Note : Les paramètres/arguments de la requête doivent être placés après "
|
||||
"celle-ci."
|
||||
|
||||
#: Cli.php:178
|
||||
#, php-format
|
||||
msgid "An exception occured running command %s"
|
||||
msgstr "Une exception est survenue en exécutant la commande %s"
|
||||
|
||||
#: Db.php:74
|
||||
msgid "Unable to connect to the database."
|
||||
msgstr "Impossible de se connecter à la base de données."
|
||||
|
||||
#: Email.php:141
|
||||
#, php-format
|
||||
msgid "</hr><p><small>Mail initialy intended for %s.</small></p>"
|
||||
msgstr "</hr><p><small>Email initialement destiné à %s.</small></p>"
|
||||
|
||||
#: Email.php:142
|
||||
#, php-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"Mail initialy intended for %s."
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"Mail originalement destiné à %s."
|
||||
|
||||
#: Email.php:178
|
||||
#, php-format
|
||||
msgid "<p><small>%s: %s</small></p>"
|
||||
msgstr "<p><small>%s: %s</small></p>"
|
||||
|
||||
#: Email.php:179
|
||||
#, php-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"%s: %s"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"%s: %s"
|
||||
|
||||
#: Tpl.php:339
|
||||
msgid "No template specified."
|
||||
msgstr "Aucun template spécifié."
|
||||
|
||||
#: Tpl.php:370
|
||||
msgid "An error occurred while displaying this page."
|
||||
msgstr "Une erreur est survenue en affichant cette page."
|
||||
|
||||
#: Url.php:141
|
||||
msgid "Bad request"
|
||||
msgstr "Mauvaise requête"
|
||||
|
||||
#: Url.php:142
|
||||
msgid "Invalid request."
|
||||
msgstr "Requête invalide."
|
||||
|
||||
#: Url.php:145
|
||||
msgid "Authentication required"
|
||||
msgstr "Authentification requise"
|
||||
|
||||
#: Url.php:146
|
||||
msgid "You have to be authenticated to access to this page."
|
||||
msgstr "Vous devez être authentifié pour accéder à cette page."
|
||||
|
||||
#: Url.php:149
|
||||
msgid "Access denied"
|
||||
msgstr "Accès interdit"
|
||||
|
||||
#: Url.php:150
|
||||
msgid ""
|
||||
"You do not have access to this application. If you think this is an error, "
|
||||
"please contact support."
|
||||
msgstr ""
|
||||
"Vous n'avez pas accès à cette application. Si vous pensez qu'il s'agit d'une "
|
||||
"erreur, merci de prendre contact avec le support."
|
||||
|
||||
#: Url.php:153
|
||||
msgid "Whoops ! Page not found"
|
||||
msgstr "Oups ! Page introuvable"
|
||||
|
||||
#: Url.php:154
|
||||
msgid "The requested page can not be found."
|
||||
msgstr "La page demandée est introuvable."
|
||||
|
||||
#: Url.php:162
|
||||
msgid "Error"
|
||||
msgstr "Erreur"
|
||||
|
||||
#: Url.php:163
|
||||
msgid "An unknown error occurred. If problem persist, please contact support."
|
||||
msgstr ""
|
||||
"Une erreur inconnue est survenue. Si le problème persiste, merci de prendre "
|
||||
"contact avec le support."
|
||||
|
||||
#: Url.php:226
|
||||
msgid ""
|
||||
"Unable to determine the requested page. If the problem persists, please "
|
||||
"contact support."
|
||||
msgstr ""
|
||||
"Impossible de déterminer la page demandée. Si le problème persiste, merci de "
|
||||
"prendre contact avec le support."
|
||||
|
||||
#: Url.php:376
|
||||
msgid ""
|
||||
"Unable to determine the requested page (loop detected). If the problem "
|
||||
"persists, please contact support."
|
||||
msgstr ""
|
||||
"Impossible de déterminer la page demandée (boucle détectée). Si le problème "
|
||||
"persiste, merci de prendre contact avec le support."
|
||||
|
||||
#: Url.php:407
|
||||
msgid "This request cannot be processed."
|
||||
msgstr "Cette requête ne peut être traitée."
|
||||
|
||||
#: Url.php:420
|
||||
msgid ""
|
||||
"Authentication required but force_authentication function is not defined."
|
||||
msgstr ""
|
||||
"Authentification requise mais la fonction force_authentication n'est pas "
|
||||
"définie."
|
||||
|
||||
#: Url.php:429
|
||||
msgid "This request could not be processed correctly."
|
||||
msgstr "Cette requête n'a put être traitée correctement."
|
||||
|
||||
#: I18n.php:114 App.php:120
|
||||
msgid "Hello world !"
|
||||
msgstr "Bonjour tout le monde !"
|
||||
|
||||
#: I18n.php:130
|
||||
msgid "Extract messages that need to be translated"
|
||||
msgstr "Extraire les messages devant être traduit"
|
||||
|
||||
#: I18n.php:132
|
||||
msgid ""
|
||||
"This command could be used to generate/update locales/messages.pot file."
|
||||
msgstr ""
|
||||
"Cette commande peut-être utilisée pour générer/mettre à jour le fichier "
|
||||
"locales/messages.pot."
|
||||
|
||||
#: I18n.php:138
|
||||
msgid "Update messages in translation PO lang files"
|
||||
msgstr ""
|
||||
"Mettre à jour les messages dans les fichiers de traduction PO existants"
|
||||
|
||||
#: I18n.php:140
|
||||
msgid ""
|
||||
"This command could be used to init/update PO files in locales/*/LC_MESSAGES "
|
||||
"directories."
|
||||
msgstr ""
|
||||
"Cette commande peut-être utilisée pour initialiser/mettre à jour les "
|
||||
"fichiers PO dans les dossiers locales/*/LC_MESSAGES."
|
||||
|
||||
#: I18n.php:147
|
||||
msgid ""
|
||||
"Compile messages from existing translation PO lang files to corresponding MO "
|
||||
"files and JS catalogs"
|
||||
msgstr ""
|
||||
"Compiler les messages depuis les fichiers PO de traduction existants vers "
|
||||
"les fichiers MO et les catalogues JS correspondant"
|
||||
|
||||
#: I18n.php:152
|
||||
msgid ""
|
||||
"This command could be used to compile PO files in locales/*/LC_MESSAGES "
|
||||
"directories to MO files and as JS catalogs in locales directory."
|
||||
msgstr ""
|
||||
"Cette commande peut-être utilisée pour compiler les fichiers PO dans les "
|
||||
"dossiers locales/*/LC_MESSAGES and les catalogues JS dans le dossier locales."
|
||||
|
||||
#: I18n.php:277
|
||||
msgid "Fail to list EesyPHP PHP files."
|
||||
msgstr "Une erreur est survenue en listant les fichiers PHP d'EesyPHP."
|
||||
|
||||
#: I18n.php:297
|
||||
msgid "Fail to extract messages from EesyPHP PHP files using xgettext."
|
||||
msgstr ""
|
||||
"Une erreur est survenue en extrayant les messages depuis les fichiers PHP "
|
||||
"d'EesyPHP en utilisant xgettext."
|
||||
|
||||
#: I18n.php:309
|
||||
msgid "Fail to list application PHP files."
|
||||
msgstr "Une erreur est survenue en listant les fichiers PHP de l'application."
|
||||
|
||||
#: I18n.php:329
|
||||
msgid "Fail to extract messages from PHP files using xgettext."
|
||||
msgstr ""
|
||||
"Impossible d'extraire les messages depuis les fichiers PHP en utilisant "
|
||||
"xgettext."
|
||||
|
||||
#: I18n.php:342
|
||||
#, php-format
|
||||
msgid "Fail to list JS files in the directory of static files '%s'."
|
||||
msgstr ""
|
||||
"Une erreur est survenue en listant les fichiers JS dans le dossier des "
|
||||
"fichiers statiques '%s'."
|
||||
|
||||
#: I18n.php:364
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Fail to extract messages from JS files in the directory of static files '%s' "
|
||||
"using xgettext."
|
||||
msgstr ""
|
||||
"Une erreur est survenue en extrayant les messages depuis les fichiers JS du "
|
||||
"dossier des fichiers statiques '%s' en utilisant xgettext."
|
||||
|
||||
#: I18n.php:384
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Fail to extract messages from templates directory '%s' using tsmarty2c.php "
|
||||
"script."
|
||||
msgstr ""
|
||||
"Impossible d'extraire les messages depuis le dossier de templates '%s' en "
|
||||
"utilisant le script tsmarty2c.php."
|
||||
|
||||
#: I18n.php:420
|
||||
msgid "Fail to merge messages using msgcat."
|
||||
msgstr "Impossible de fusionner les messages en utilisant msgcat."
|
||||
|
||||
#: I18n.php:434
|
||||
#, php-format
|
||||
msgid "Compendium file %s not found."
|
||||
msgstr "Fichier compendium %s introuvable."
|
||||
|
||||
#: I18n.php:441
|
||||
#, 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."
|
||||
|
||||
#: I18n.php:453 I18n.php:561
|
||||
#, php-format
|
||||
msgid "Lang directory '%s' found"
|
||||
msgstr "Dossier de langue '%s' trouvé"
|
||||
|
||||
#: I18n.php:459 I18n.php:567
|
||||
#, 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."
|
||||
|
||||
#: I18n.php:474
|
||||
#, 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)."
|
||||
|
||||
#: I18n.php:492
|
||||
#, 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)."
|
||||
|
||||
#: I18n.php:498 I18n.php:575
|
||||
#, 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."
|
||||
|
||||
#: I18n.php:505 I18n.php:615
|
||||
#, php-format
|
||||
msgid "Fail to open root lang directory (%s)."
|
||||
msgstr "Impossible d'ouvrir le dossier racine des langues (%s)."
|
||||
|
||||
#: I18n.php:531
|
||||
#, php-format
|
||||
msgid "Lang alias symlink found: %s -> %s"
|
||||
msgstr "Lien symbolique d'alias de langue trouvé : %s -> %s"
|
||||
|
||||
#: I18n.php:538
|
||||
#, php-format
|
||||
msgid "JS catalog symlink for %s -> %s created (%s)"
|
||||
msgstr "Lien symbolique de catalogue JS pour %s -> %s créé (%s)"
|
||||
|
||||
#: I18n.php:542
|
||||
#, php-format
|
||||
msgid "Fail to create JS catalog symlink for %s -> %s (%s)"
|
||||
msgstr ""
|
||||
"Impossible de créer le lien symbolique de catalogue JS pour %s -> %s (%s)"
|
||||
|
||||
#: I18n.php:548
|
||||
#, php-format
|
||||
msgid "JS catalog symlink for %s -> %s already exist (%s)"
|
||||
msgstr "Le lien symbolique du catalogue JS pour %s -> %s existe déjà (%s)"
|
||||
|
||||
#: I18n.php:553
|
||||
#, php-format
|
||||
msgid "JS catalog file for %s already exist, but it's not a symlink to %s (%s)"
|
||||
msgstr ""
|
||||
"Le catalogue JS pour %s existe, mais il ne s'agit par d'un lien symbolique "
|
||||
"vers %s (%s)"
|
||||
|
||||
#: I18n.php:588
|
||||
#, 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)."
|
||||
|
||||
#: I18n.php:598
|
||||
#, php-format
|
||||
msgid "Fail to open %s JS catalog file in write mode (%s)."
|
||||
msgstr "Impossible d'ouvrir le catalogue JS %s en mode écriture (%s)."
|
||||
|
||||
#: I18n.php:603
|
||||
#, php-format
|
||||
msgid "Fail to write %s JS catalog in file (%s)."
|
||||
msgstr "Impossible d'écrire le fichier du catalogue JS %s (%s)."
|
||||
|
||||
#: I18n.php:608
|
||||
#, php-format
|
||||
msgid "%s JS catalog writed (%s)."
|
||||
msgstr "Catalogue JS %s créé (%s)."
|
||||
|
||||
#: App.php:122
|
||||
msgid "Hello world!"
|
||||
msgstr "Salut tout le monde !"
|
||||
|
||||
#: includes/cli.php:23
|
||||
#, php-format
|
||||
msgid "Item #%s:\n"
|
||||
|
@ -654,47 +283,6 @@ msgstr "L'élément '%s' a bien été supprimé."
|
|||
msgid "An error occurred while deleting this item."
|
||||
msgstr "Une erreur est survenue en supprimant cet élément."
|
||||
|
||||
#: static/js/myconfirm.js:4 static/js/myconfirm.js:171
|
||||
#: static/js/myconfirm.js:200
|
||||
msgid "Confirmation"
|
||||
msgstr "Confirmation"
|
||||
|
||||
#: static/js/myconfirm.js:5
|
||||
msgid "Do you confirm?"
|
||||
msgstr "Confirmez-vous ?"
|
||||
|
||||
#: static/js/myconfirm.js:11 static/js/myconfirm.js:108
|
||||
msgid "Cancel"
|
||||
msgstr "Annuler"
|
||||
|
||||
#: static/js/myconfirm.js:17 static/js/myconfirm.js:114
|
||||
msgid "Validate"
|
||||
msgstr "Valider"
|
||||
|
||||
#: static/js/myconfirm.js:52
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: static/js/myconfirm.js:91
|
||||
msgid "Question"
|
||||
msgstr "Question"
|
||||
|
||||
#: static/js/myconfirm.js:92
|
||||
msgid "Please enter your answer below:"
|
||||
msgstr "Merci de saisir vos réponses ci-dessous :"
|
||||
|
||||
#: static/js/myconfirm.js:143
|
||||
msgid "Please wait"
|
||||
msgstr "Merci de patienter"
|
||||
|
||||
#: static/js/myconfirm.js:144
|
||||
msgid "Please wait while your request is being processed."
|
||||
msgstr "Merci de patienter pendant le traitement de votre requête."
|
||||
|
||||
#: static/js/myconfirm.js:172 static/js/myconfirm.js:201
|
||||
msgid "Are you sure?"
|
||||
msgstr "Êtes-vous sure ?"
|
||||
|
||||
#: templates/show.tpl:5 templates/search.tpl:36 templates/form.tpl:7
|
||||
msgid "Name"
|
||||
msgstr "Nom"
|
||||
|
@ -800,114 +388,3 @@ msgstr "Page de recherche"
|
|||
#: templates/form.tpl:36
|
||||
msgid "Save"
|
||||
msgstr "Enregistrer"
|
||||
|
||||
#: templates/fatal_error.tpl:5
|
||||
msgid ""
|
||||
"A fatal error has occurred and it is preventing this application from "
|
||||
"working properly. Please try again later or contact support."
|
||||
msgstr ""
|
||||
"Une erreur fatale est survenue et celle-ci empêche cette application de "
|
||||
"fonctionner correctement. Merci de réessayer ultérieurement ou de prendre "
|
||||
"contact avec le service support."
|
||||
|
||||
#: templates/fatal_error.tpl:7
|
||||
msgid "Error: %1"
|
||||
msgstr "Erreur : %1"
|
||||
|
||||
#: templates/homepage.tpl:6
|
||||
msgid ""
|
||||
"This is the default page of a new app using EesyPHP framework. Register your "
|
||||
"own templates directory and create a <em>homepage.tpl</em> file to overwrite "
|
||||
"it. You could also overwrite the URL handler for the root of the web "
|
||||
"application."
|
||||
msgstr ""
|
||||
"Il s'agit de la page par défaut d'une nouvelle application utilisant le "
|
||||
"framework EesyPHP. Configurez votre propre dossier de templates et créer le "
|
||||
"fichier <em>homepage.tpl</em> pour l'écraser. Vous pouvez également écraser "
|
||||
"le gestionnaire de l'URL racine de l'application web."
|
||||
|
||||
#~ 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."
|
||||
|
||||
#~ 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."
|
||||
|
||||
#~ msgid ""
|
||||
#~ "This command could be used to compile PO files in lang/*/LC_MESSAGES "
|
||||
#~ "directories to MO files and as JS 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 JS "
|
||||
#~ "dans public_html/translations."
|
||||
|
||||
#, php-format
|
||||
#~ msgid "Fail to list JS files in '%s' static directory."
|
||||
#~ msgstr ""
|
||||
#~ "Une erreur est survenue en listant les fichiers JS dans le dossier des "
|
||||
#~ "fichiers statiques '%s'."
|
||||
|
||||
#, php-format
|
||||
#~ msgid ""
|
||||
#~ "Fail to extract messages from JS files in '%s' static directory using "
|
||||
#~ "xgettext."
|
||||
#~ msgstr ""
|
||||
#~ "Impossible d'extraire les messages depuis les fichiers JS dans le dossier "
|
||||
#~ "des fichiers statiques '%s' en utilisant xgettext."
|
||||
|
||||
#~ msgid "Smarty version not supported."
|
||||
#~ msgstr "Une erreur est survenue en affichant cette page."
|
||||
|
||||
#~ msgid "An error occurred while viewing this page."
|
||||
#~ msgstr "Une erreur est survenue en affichant cette page."
|
||||
|
||||
#~ msgid "Fail to list PHP files."
|
||||
#~ msgstr "Impossible de lister les fichiers PHP."
|
||||
|
||||
#~ msgid "Fail to list JS files."
|
||||
#~ msgstr "Impossible de lister les fichiers JS."
|
||||
|
||||
#~ msgid "Fail to extract messages from JS files using xgettext."
|
||||
#~ msgstr ""
|
||||
#~ "Impossible d'extraire les messages depuis les fichiers JS en utilisant "
|
||||
#~ "xgettext."
|
||||
|
||||
#~ 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."
|
||||
|
||||
#~ msgid "Update messages in existing translation PO lang files"
|
||||
#~ msgstr ""
|
||||
#~ "Mettre à jour les messages dans les fichiers de traduction PO existants"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "This command could be used to update PO files in lang/*/LC_MESSAGES "
|
||||
#~ "directories."
|
||||
#~ msgstr ""
|
||||
#~ "Cette commande peut-être utilisée pour mettre à jour les fichiers PO les "
|
||||
#~ "dossiers lang/*/LC_MESSAGES."
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Compile messages from existing translation PO lang files to corresponding "
|
||||
#~ "MO files"
|
||||
#~ msgstr ""
|
||||
#~ "Compiler les messages depuis les fichiers PO de traduction existants vers "
|
||||
#~ "les fichiers MO correspondant"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "This command could be used to compile PO files in lang/*/LC_MESSAGES "
|
||||
#~ "directories to MO files."
|
||||
#~ msgstr ""
|
||||
#~ "Cette commande peut-être utilisée pour compiler les fichiers PO dans les "
|
||||
#~ "dossiers lang/*/LC_MESSAGES en fichiers MO."
|
||||
|
||||
#~ msgid "Element(s) %1 to %2 on %3"
|
||||
#~ msgstr "Élément(s) %1 à %2 sur %3"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"POT-Creation-Date: 2023-02-13 03:00+0100\n"
|
||||
"PO-Revision-Date: 2023-02-13 03:00+0100\n"
|
||||
"POT-Creation-Date: 2023-02-14 01:18+0100\n"
|
||||
"PO-Revision-Date: 2023-02-14 01:18+0100\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
|
@ -1,330 +1,11 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"POT-Creation-Date: 2023-02-13 03:00+0100\n"
|
||||
"PO-Revision-Date: 2023-02-13 03:00+0100\n"
|
||||
"POT-Creation-Date: 2023-02-14 01:18+0100\n"
|
||||
"PO-Revision-Date: 2023-02-14 01:18+0100\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: Cli.php:34
|
||||
#, php-format
|
||||
msgid "The CLI command '%s' already exists."
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:39
|
||||
#, php-format
|
||||
msgid "The CLI command '%s' handler is not callable !"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:71
|
||||
#, php-format
|
||||
msgid "Usage: %s [-h] [-qd] command\n"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:72
|
||||
msgid " -h Show this message\n"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:73
|
||||
msgid " -q / -d Quiet/Debug mode\n"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:74
|
||||
msgid " --trace Trace mode (the most verbose)\n"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:75
|
||||
msgid " command Command to run\n"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:77
|
||||
msgid "Available commands:\n"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:125
|
||||
msgid "Only one command could be executed !"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:153
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Invalid parameter \"%s\".\n"
|
||||
"Note: Command's parameter/argument must be place after the command."
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:178
|
||||
#, php-format
|
||||
msgid "An exception occured running command %s"
|
||||
msgstr ""
|
||||
|
||||
#: Db.php:74
|
||||
msgid "Unable to connect to the database."
|
||||
msgstr ""
|
||||
|
||||
#: Email.php:141
|
||||
#, php-format
|
||||
msgid "</hr><p><small>Mail initialy intended for %s.</small></p>"
|
||||
msgstr ""
|
||||
|
||||
#: Email.php:142
|
||||
#, php-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"Mail initialy intended for %s."
|
||||
msgstr ""
|
||||
|
||||
#: Email.php:178
|
||||
#, php-format
|
||||
msgid "<p><small>%s: %s</small></p>"
|
||||
msgstr ""
|
||||
|
||||
#: Email.php:179
|
||||
#, php-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"%s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: Tpl.php:339
|
||||
msgid "No template specified."
|
||||
msgstr ""
|
||||
|
||||
#: Tpl.php:370
|
||||
msgid "An error occurred while displaying this page."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:141
|
||||
msgid "Bad request"
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:142
|
||||
msgid "Invalid request."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:145
|
||||
msgid "Authentication required"
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:146
|
||||
msgid "You have to be authenticated to access to this page."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:149
|
||||
msgid "Access denied"
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:150
|
||||
msgid ""
|
||||
"You do not have access to this application. If you think this is an error, "
|
||||
"please contact support."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:153
|
||||
msgid "Whoops ! Page not found"
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:154
|
||||
msgid "The requested page can not be found."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:162
|
||||
msgid "Error"
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:163
|
||||
msgid "An unknown error occurred. If problem persist, please contact support."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:226
|
||||
msgid ""
|
||||
"Unable to determine the requested page. If the problem persists, please "
|
||||
"contact support."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:376
|
||||
msgid ""
|
||||
"Unable to determine the requested page (loop detected). If the problem "
|
||||
"persists, please contact support."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:407
|
||||
msgid "This request cannot be processed."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:420
|
||||
msgid ""
|
||||
"Authentication required but force_authentication function is not defined."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:429
|
||||
msgid "This request could not be processed correctly."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:114 App.php:120
|
||||
msgid "Hello world !"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:130
|
||||
msgid "Extract messages that need to be translated"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:132
|
||||
msgid ""
|
||||
"This command could be used to generate/update locales/messages.pot file."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:138
|
||||
msgid "Update messages in translation PO lang files"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:140
|
||||
msgid ""
|
||||
"This command could be used to init/update PO files in locales/*/LC_MESSAGES "
|
||||
"directories."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:147
|
||||
msgid ""
|
||||
"Compile messages from existing translation PO lang files to corresponding MO "
|
||||
"files and JS catalogs"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:152
|
||||
msgid ""
|
||||
"This command could be used to compile PO files in locales/*/LC_MESSAGES "
|
||||
"directories to MO files and as JS catalogs in locales directory."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:277
|
||||
msgid "Fail to list EesyPHP PHP files."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:297
|
||||
msgid "Fail to extract messages from EesyPHP PHP files using xgettext."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:309
|
||||
msgid "Fail to list application PHP files."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:329
|
||||
msgid "Fail to extract messages from PHP files using xgettext."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:342
|
||||
#, php-format
|
||||
msgid "Fail to list JS files in the directory of static files '%s'."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:364
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Fail to extract messages from JS files in the directory of static files '%s' "
|
||||
"using xgettext."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:384
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Fail to extract messages from templates directory '%s' using tsmarty2c.php "
|
||||
"script."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:420
|
||||
msgid "Fail to merge messages using msgcat."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:434
|
||||
#, php-format
|
||||
msgid "Compendium file %s not found."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:441
|
||||
#, php-format
|
||||
msgid "POT file not found (%s). Please run extract_messages first."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:453 I18n.php:561
|
||||
#, php-format
|
||||
msgid "Lang directory '%s' found"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:459 I18n.php:567
|
||||
#, php-format
|
||||
msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:474
|
||||
#, php-format
|
||||
msgid "Fail to init messages in %s PO file using msginit (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:492
|
||||
#, php-format
|
||||
msgid "Fail to update messages in %s PO file using msgmerge (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:498 I18n.php:575
|
||||
#, php-format
|
||||
msgid "PO file not found in lang '%s' directory, ignore it."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:505 I18n.php:615
|
||||
#, php-format
|
||||
msgid "Fail to open root lang directory (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:531
|
||||
#, php-format
|
||||
msgid "Lang alias symlink found: %s -> %s"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:538
|
||||
#, php-format
|
||||
msgid "JS catalog symlink for %s -> %s created (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:542
|
||||
#, php-format
|
||||
msgid "Fail to create JS catalog symlink for %s -> %s (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:548
|
||||
#, php-format
|
||||
msgid "JS catalog symlink for %s -> %s already exist (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:553
|
||||
#, php-format
|
||||
msgid "JS catalog file for %s already exist, but it's not a symlink to %s (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:588
|
||||
#, php-format
|
||||
msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:598
|
||||
#, php-format
|
||||
msgid "Fail to open %s JS catalog file in write mode (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:603
|
||||
#, php-format
|
||||
msgid "Fail to write %s JS catalog in file (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:608
|
||||
#, php-format
|
||||
msgid "%s JS catalog writed (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: App.php:122
|
||||
msgid "Hello world!"
|
||||
msgstr ""
|
||||
|
||||
#: includes/cli.php:23
|
||||
#, php-format
|
||||
msgid "Item #%s:\n"
|
||||
|
@ -585,47 +266,6 @@ msgstr ""
|
|||
msgid "An error occurred while deleting this item."
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:4 static/js/myconfirm.js:171
|
||||
#: static/js/myconfirm.js:200
|
||||
msgid "Confirmation"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:5
|
||||
msgid "Do you confirm?"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:11 static/js/myconfirm.js:108
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:17 static/js/myconfirm.js:114
|
||||
msgid "Validate"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:52
|
||||
msgid "OK"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:91
|
||||
msgid "Question"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:92
|
||||
msgid "Please enter your answer below:"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:143
|
||||
msgid "Please wait"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:144
|
||||
msgid "Please wait while your request is being processed."
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:172 static/js/myconfirm.js:201
|
||||
msgid "Are you sure?"
|
||||
msgstr ""
|
||||
|
||||
#: templates/show.tpl:5 templates/search.tpl:36 templates/form.tpl:7
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
@ -729,21 +369,3 @@ msgstr ""
|
|||
#: templates/form.tpl:36
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
|
||||
#: templates/fatal_error.tpl:5
|
||||
msgid ""
|
||||
"A fatal error has occurred and it is preventing this application from "
|
||||
"working properly. Please try again later or contact support."
|
||||
msgstr ""
|
||||
|
||||
#: templates/fatal_error.tpl:7
|
||||
msgid "Error: %1"
|
||||
msgstr ""
|
||||
|
||||
#: templates/homepage.tpl:6
|
||||
msgid ""
|
||||
"This is the default page of a new app using EesyPHP framework. Register your "
|
||||
"own templates directory and create a <em>homepage.tpl</em> file to overwrite "
|
||||
"it. You could also overwrite the URL handler for the root of the web "
|
||||
"application."
|
||||
msgstr ""
|
||||
|
|
1
locales/fr
Symbolic link
1
locales/fr
Symbolic link
|
@ -0,0 +1 @@
|
|||
fr_FR.UTF8
|
1
locales/fr.js
Symbolic link
1
locales/fr.js
Symbolic link
|
@ -0,0 +1 @@
|
|||
fr_FR.UTF8.js
|
1
locales/fr_FR
Symbolic link
1
locales/fr_FR
Symbolic link
|
@ -0,0 +1 @@
|
|||
fr_FR.UTF8
|
1
locales/fr_FR.UTF-8
Symbolic link
1
locales/fr_FR.UTF-8
Symbolic link
|
@ -0,0 +1 @@
|
|||
fr_FR.UTF8
|
1
locales/fr_FR.UTF-8.js
Symbolic link
1
locales/fr_FR.UTF-8.js
Symbolic link
|
@ -0,0 +1 @@
|
|||
fr_FR.UTF8.js
|
1
locales/fr_FR.UTF8.js
Normal file
1
locales/fr_FR.UTF8.js
Normal file
File diff suppressed because one or more lines are too long
BIN
locales/fr_FR.UTF8/LC_MESSAGES/EESYPHP.mo
Normal file
BIN
locales/fr_FR.UTF8/LC_MESSAGES/EESYPHP.mo
Normal file
Binary file not shown.
462
locales/fr_FR.UTF8/LC_MESSAGES/EESYPHP.po
Normal file
462
locales/fr_FR.UTF8/LC_MESSAGES/EESYPHP.po
Normal file
|
@ -0,0 +1,462 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: 2023-02-14 01:17+0100\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: Benjamin Renard <brenard@zionetrix.net>\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"
|
||||
|
||||
#: Cli.php:34
|
||||
#, php-format
|
||||
msgid "The CLI command '%s' already exists."
|
||||
msgstr "La commande CLI '%s' n'existe pas."
|
||||
|
||||
#: Cli.php:39
|
||||
#, php-format
|
||||
msgid "The CLI command '%s' handler is not callable !"
|
||||
msgstr "La fonction implémentant la commande CLI '%s' n'est pas exécutable !"
|
||||
|
||||
#: Cli.php:71
|
||||
#, php-format
|
||||
msgid "Usage: %s [-h] [-qd] command\n"
|
||||
msgstr "Utilisation: %s [-h] [-qd] commande\n"
|
||||
|
||||
#: Cli.php:72
|
||||
msgid " -h Show this message\n"
|
||||
msgstr " -h Affiche ce message\n"
|
||||
|
||||
#: Cli.php:73
|
||||
msgid " -q / -d Quiet/Debug mode\n"
|
||||
msgstr " -q / -d Mode silencieux/debug\n"
|
||||
|
||||
#: Cli.php:74
|
||||
msgid " --trace Trace mode (the most verbose)\n"
|
||||
msgstr " --trace Mode trace (le plus verbeux)\n"
|
||||
|
||||
#: Cli.php:75
|
||||
msgid " command Command to run\n"
|
||||
msgstr " command La commande à exécuter\n"
|
||||
|
||||
#: Cli.php:77
|
||||
msgid "Available commands:\n"
|
||||
msgstr "Commandes disponibles:\n"
|
||||
|
||||
#: Cli.php:125
|
||||
msgid "Only one command could be executed !"
|
||||
msgstr "Une seul commande peut-être exécutée !"
|
||||
|
||||
#: Cli.php:153
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Invalid parameter \"%s\".\n"
|
||||
"Note: Command's parameter/argument must be place after the command."
|
||||
msgstr ""
|
||||
"Paramètre \"%s\" invalide.\n"
|
||||
"Note : Les paramètres/arguments de la requête doivent être placés après "
|
||||
"celle-ci."
|
||||
|
||||
#: Cli.php:178
|
||||
#, php-format
|
||||
msgid "An exception occured running command %s"
|
||||
msgstr "Une exception est survenue en exécutant la commande %s"
|
||||
|
||||
#: Db.php:74
|
||||
msgid "Unable to connect to the database."
|
||||
msgstr "Impossible de se connecter à la base de données."
|
||||
|
||||
#: Email.php:141
|
||||
#, php-format
|
||||
msgid "</hr><p><small>Mail initialy intended for %s.</small></p>"
|
||||
msgstr "</hr><p><small>Email initialement destiné à %s.</small></p>"
|
||||
|
||||
#: Email.php:142
|
||||
#, php-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"Mail initialy intended for %s."
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"Mail originalement destiné à %s."
|
||||
|
||||
#: Email.php:178
|
||||
#, php-format
|
||||
msgid "<p><small>%s: %s</small></p>"
|
||||
msgstr "<p><small>%s: %s</small></p>"
|
||||
|
||||
#: Email.php:179
|
||||
#, php-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"%s: %s"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"%s: %s"
|
||||
|
||||
#: Tpl.php:355
|
||||
msgid "No template specified."
|
||||
msgstr "Aucun template spécifié."
|
||||
|
||||
#: Tpl.php:386
|
||||
msgid "An error occurred while displaying this page."
|
||||
msgstr "Une erreur est survenue en affichant cette page."
|
||||
|
||||
#: Url.php:141
|
||||
msgid "Bad request"
|
||||
msgstr "Mauvaise requête"
|
||||
|
||||
#: Url.php:142
|
||||
msgid "Invalid request."
|
||||
msgstr "Requête invalide."
|
||||
|
||||
#: Url.php:145
|
||||
msgid "Authentication required"
|
||||
msgstr "Authentification requise"
|
||||
|
||||
#: Url.php:146
|
||||
msgid "You have to be authenticated to access to this page."
|
||||
msgstr "Vous devez être authentifié pour accéder à cette page."
|
||||
|
||||
#: Url.php:149
|
||||
msgid "Access denied"
|
||||
msgstr "Accès interdit"
|
||||
|
||||
#: Url.php:150
|
||||
msgid ""
|
||||
"You do not have access to this application. If you think this is an error, "
|
||||
"please contact support."
|
||||
msgstr ""
|
||||
"Vous n'avez pas accès à cette application. Si vous pensez qu'il s'agit d'une "
|
||||
"erreur, merci de prendre contact avec le support."
|
||||
|
||||
#: Url.php:153
|
||||
msgid "Whoops ! Page not found"
|
||||
msgstr "Oups ! Page introuvable"
|
||||
|
||||
#: Url.php:154
|
||||
msgid "The requested page can not be found."
|
||||
msgstr "La page demandée est introuvable."
|
||||
|
||||
#: Url.php:162
|
||||
msgid "Error"
|
||||
msgstr "Erreur"
|
||||
|
||||
#: Url.php:163
|
||||
msgid "An unknown error occurred. If problem persist, please contact support."
|
||||
msgstr ""
|
||||
"Une erreur inconnue est survenue. Si le problème persiste, merci de prendre "
|
||||
"contact avec le support."
|
||||
|
||||
#: Url.php:226
|
||||
msgid ""
|
||||
"Unable to determine the requested page. If the problem persists, please "
|
||||
"contact support."
|
||||
msgstr ""
|
||||
"Impossible de déterminer la page demandée. Si le problème persiste, merci de "
|
||||
"prendre contact avec le support."
|
||||
|
||||
#: Url.php:376
|
||||
msgid ""
|
||||
"Unable to determine the requested page (loop detected). If the problem "
|
||||
"persists, please contact support."
|
||||
msgstr ""
|
||||
"Impossible de déterminer la page demandée (boucle détectée). Si le problème "
|
||||
"persiste, merci de prendre contact avec le support."
|
||||
|
||||
#: Url.php:407
|
||||
msgid "This request cannot be processed."
|
||||
msgstr "Cette requête ne peut être traitée."
|
||||
|
||||
#: Url.php:420
|
||||
msgid ""
|
||||
"Authentication required but force_authentication function is not defined."
|
||||
msgstr ""
|
||||
"Authentification requise mais la fonction force_authentication n'est pas "
|
||||
"définie."
|
||||
|
||||
#: Url.php:429
|
||||
msgid "This request could not be processed correctly."
|
||||
msgstr "Cette requête n'a put être traitée correctement."
|
||||
|
||||
#: I18n.php:122 App.php:120
|
||||
msgid "Hello world !"
|
||||
msgstr "Bonjour tout le monde !"
|
||||
|
||||
#: I18n.php:142
|
||||
msgid "Extract messages that need to be translated"
|
||||
msgstr "Extraire les messages devant être traduit"
|
||||
|
||||
#: I18n.php:144
|
||||
msgid ""
|
||||
"This command could be used to generate/update locales/messages.pot file."
|
||||
msgstr ""
|
||||
"Cette commande peut-être utilisée pour générer/mettre à jour le fichier "
|
||||
"locales/messages.pot."
|
||||
|
||||
#: I18n.php:150
|
||||
msgid "Update messages in translation PO lang files"
|
||||
msgstr ""
|
||||
"Mettre à jour les messages dans les fichiers de traduction PO existants"
|
||||
|
||||
#: I18n.php:152
|
||||
msgid ""
|
||||
"This command could be used to init/update PO files in locales/*/LC_MESSAGES "
|
||||
"directories."
|
||||
msgstr ""
|
||||
"Cette commande peut-être utilisée pour initialiser/mettre à jour les "
|
||||
"fichiers PO dans les dossiers locales/*/LC_MESSAGES."
|
||||
|
||||
#: I18n.php:159
|
||||
msgid ""
|
||||
"Compile messages from existing translation PO lang files to corresponding MO "
|
||||
"files and JS catalogs"
|
||||
msgstr ""
|
||||
"Compiler les messages depuis les fichiers PO de traduction existants vers "
|
||||
"les fichiers MO et les catalogues JS correspondant"
|
||||
|
||||
#: I18n.php:164
|
||||
msgid ""
|
||||
"This command could be used to compile PO files in locales/*/LC_MESSAGES "
|
||||
"directories to MO files and as JS catalogs in locales directory."
|
||||
msgstr ""
|
||||
"Cette commande peut-être utilisée pour compiler les fichiers PO dans les "
|
||||
"dossiers locales/*/LC_MESSAGES and les catalogues JS dans le dossier locales."
|
||||
|
||||
#: I18n.php:336
|
||||
msgid "Fail to list EesyPHP PHP files."
|
||||
msgstr "Une erreur est survenue en listant les fichiers PHP d'EesyPHP."
|
||||
|
||||
#: I18n.php:356
|
||||
msgid "Fail to extract messages from EesyPHP PHP files using xgettext."
|
||||
msgstr ""
|
||||
"Une erreur est survenue en extrayant les messages depuis les fichiers PHP "
|
||||
"d'EesyPHP en utilisant xgettext."
|
||||
|
||||
#: I18n.php:369
|
||||
msgid "Fail to list application PHP files."
|
||||
msgstr "Une erreur est survenue en listant les fichiers PHP de l'application."
|
||||
|
||||
#: I18n.php:389
|
||||
msgid "Fail to extract messages from PHP files using xgettext."
|
||||
msgstr ""
|
||||
"Impossible d'extraire les messages depuis les fichiers PHP en utilisant "
|
||||
"xgettext."
|
||||
|
||||
#: I18n.php:405
|
||||
#, php-format
|
||||
msgid "Fail to list JS files in the directory of static files '%s'."
|
||||
msgstr ""
|
||||
"Une erreur est survenue en listant les fichiers JS dans le dossier des "
|
||||
"fichiers statiques '%s'."
|
||||
|
||||
#: I18n.php:427
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Fail to extract messages from JS files in the directory of static files '%s' "
|
||||
"using xgettext."
|
||||
msgstr ""
|
||||
"Une erreur est survenue en extrayant les messages depuis les fichiers JS du "
|
||||
"dossier des fichiers statiques '%s' en utilisant xgettext."
|
||||
|
||||
#: I18n.php:449
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Fail to extract messages from templates directory '%s' using tsmarty2c.php "
|
||||
"script."
|
||||
msgstr ""
|
||||
"Impossible d'extraire les messages depuis le dossier de templates '%s' en "
|
||||
"utilisant le script tsmarty2c.php."
|
||||
|
||||
#: I18n.php:485
|
||||
msgid "Fail to merge messages using msgcat."
|
||||
msgstr "Impossible de fusionner les messages en utilisant msgcat."
|
||||
|
||||
#: I18n.php:502
|
||||
#, php-format
|
||||
msgid "Compendium file %s not found."
|
||||
msgstr "Fichier compendium %s introuvable."
|
||||
|
||||
#: I18n.php:513
|
||||
#, 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."
|
||||
|
||||
#: I18n.php:525 I18n.php:636
|
||||
#, php-format
|
||||
msgid "Lang directory '%s' found"
|
||||
msgstr "Dossier de langue '%s' trouvé"
|
||||
|
||||
#: I18n.php:531 I18n.php:642
|
||||
#, 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."
|
||||
|
||||
#: I18n.php:546
|
||||
#, 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)."
|
||||
|
||||
#: I18n.php:564
|
||||
#, 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)."
|
||||
|
||||
#: I18n.php:570 I18n.php:650
|
||||
#, 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."
|
||||
|
||||
#: I18n.php:577 I18n.php:690
|
||||
#, php-format
|
||||
msgid "Fail to open root lang directory (%s)."
|
||||
msgstr "Impossible d'ouvrir le dossier racine des langues (%s)."
|
||||
|
||||
#: I18n.php:606
|
||||
#, php-format
|
||||
msgid "Lang alias symlink found: %s -> %s"
|
||||
msgstr "Lien symbolique d'alias de langue trouvé : %s -> %s"
|
||||
|
||||
#: I18n.php:613
|
||||
#, php-format
|
||||
msgid "JS catalog symlink for %s -> %s created (%s)"
|
||||
msgstr "Lien symbolique de catalogue JS pour %s -> %s créé (%s)"
|
||||
|
||||
#: I18n.php:617
|
||||
#, php-format
|
||||
msgid "Fail to create JS catalog symlink for %s -> %s (%s)"
|
||||
msgstr ""
|
||||
"Impossible de créer le lien symbolique de catalogue JS pour %s -> %s (%s)"
|
||||
|
||||
#: I18n.php:623
|
||||
#, php-format
|
||||
msgid "JS catalog symlink for %s -> %s already exist (%s)"
|
||||
msgstr "Le lien symbolique du catalogue JS pour %s -> %s existe déjà (%s)"
|
||||
|
||||
#: I18n.php:628
|
||||
#, php-format
|
||||
msgid "JS catalog file for %s already exist, but it's not a symlink to %s (%s)"
|
||||
msgstr ""
|
||||
"Le catalogue JS pour %s existe, mais il ne s'agit par d'un lien symbolique "
|
||||
"vers %s (%s)"
|
||||
|
||||
#: I18n.php:663
|
||||
#, 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)."
|
||||
|
||||
#: I18n.php:673
|
||||
#, php-format
|
||||
msgid "Fail to open %s JS catalog file in write mode (%s)."
|
||||
msgstr "Impossible d'ouvrir le catalogue JS %s en mode écriture (%s)."
|
||||
|
||||
#: I18n.php:678
|
||||
#, php-format
|
||||
msgid "Fail to write %s JS catalog in file (%s)."
|
||||
msgstr "Impossible d'écrire le fichier du catalogue JS %s (%s)."
|
||||
|
||||
#: I18n.php:683
|
||||
#, php-format
|
||||
msgid "%s JS catalog writed (%s)."
|
||||
msgstr "Catalogue JS %s créé (%s)."
|
||||
|
||||
#: App.php:122
|
||||
msgid "Hello world!"
|
||||
msgstr "Salut tout le monde !"
|
||||
|
||||
#: static/js/myconfirm.js:4 static/js/myconfirm.js:171
|
||||
#: static/js/myconfirm.js:200
|
||||
msgid "Confirmation"
|
||||
msgstr "Confirmation"
|
||||
|
||||
#: static/js/myconfirm.js:5
|
||||
msgid "Do you confirm?"
|
||||
msgstr "Confirmez-vous ?"
|
||||
|
||||
#: static/js/myconfirm.js:11 static/js/myconfirm.js:108
|
||||
msgid "Cancel"
|
||||
msgstr "Annuler"
|
||||
|
||||
#: static/js/myconfirm.js:17 static/js/myconfirm.js:114
|
||||
msgid "Validate"
|
||||
msgstr "Valider"
|
||||
|
||||
#: static/js/myconfirm.js:52
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: static/js/myconfirm.js:91
|
||||
msgid "Question"
|
||||
msgstr "Question"
|
||||
|
||||
#: static/js/myconfirm.js:92
|
||||
msgid "Please enter your answer below:"
|
||||
msgstr "Merci de saisir vos réponses ci-dessous :"
|
||||
|
||||
#: static/js/myconfirm.js:143
|
||||
msgid "Please wait"
|
||||
msgstr "Merci de patienter"
|
||||
|
||||
#: static/js/myconfirm.js:144
|
||||
msgid "Please wait while your request is being processed."
|
||||
msgstr "Merci de patienter pendant le traitement de votre requête."
|
||||
|
||||
#: static/js/myconfirm.js:172 static/js/myconfirm.js:201
|
||||
msgid "Are you sure?"
|
||||
msgstr "Êtes-vous sure ?"
|
||||
|
||||
#: templates/fatal_error.tpl:3
|
||||
msgid "Oops..."
|
||||
msgstr "Oups..."
|
||||
|
||||
#: templates/fatal_error.tpl:5
|
||||
msgid ""
|
||||
"A fatal error has occurred and it is preventing this application from "
|
||||
"working properly. Please try again later or contact support."
|
||||
msgstr ""
|
||||
"Une erreur fatale est survenue et celle-ci empêche cette application de "
|
||||
"fonctionner correctement. Merci de réessayer ultérieurement ou de prendre "
|
||||
"contact avec le service support."
|
||||
|
||||
#: templates/fatal_error.tpl:7
|
||||
msgid "Error: %1"
|
||||
msgstr "Erreur : %1"
|
||||
|
||||
#: templates/fatal_error.tpl:9
|
||||
msgid "Back"
|
||||
msgstr "Retour"
|
||||
|
||||
#: templates/homepage.tpl:5
|
||||
msgid "Hello, world!"
|
||||
msgstr "Bonjour tout le monde !"
|
||||
|
||||
#: templates/homepage.tpl:6
|
||||
msgid ""
|
||||
"This is the default page of a new app using EesyPHP framework. Register your "
|
||||
"own templates directory and create a <em>homepage.tpl</em> file to overwrite "
|
||||
"it. You could also overwrite the URL handler for the root of the web "
|
||||
"application."
|
||||
msgstr ""
|
||||
"Il s'agit de la page par défaut d'une nouvelle application utilisant le "
|
||||
"framework EesyPHP. Configurez votre propre dossier de templates et créer le "
|
||||
"fichier <em>homepage.tpl</em> pour l'écraser. Vous pouvez également écraser "
|
||||
"le gestionnaire de l'URL racine de l'application web."
|
1
locales/fr_FR.js
Symbolic link
1
locales/fr_FR.js
Symbolic link
|
@ -0,0 +1 @@
|
|||
fr_FR.UTF8.js
|
1
locales/fr_FR.utf-8
Symbolic link
1
locales/fr_FR.utf-8
Symbolic link
|
@ -0,0 +1 @@
|
|||
fr_FR.UTF8
|
1
locales/fr_FR.utf-8.js
Symbolic link
1
locales/fr_FR.utf-8.js
Symbolic link
|
@ -0,0 +1 @@
|
|||
fr_FR.UTF8.js
|
1
locales/fr_FR.utf8
Symbolic link
1
locales/fr_FR.utf8
Symbolic link
|
@ -0,0 +1 @@
|
|||
fr_FR.UTF8
|
1
locales/fr_FR.utf8.js
Symbolic link
1
locales/fr_FR.utf8.js
Symbolic link
|
@ -0,0 +1 @@
|
|||
fr_FR.UTF8.js
|
7
locales/headers.pot
Normal file
7
locales/headers.pot
Normal file
|
@ -0,0 +1,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"POT-Creation-Date: 2023-02-14 01:17+0100\n"
|
||||
"PO-Revision-Date: 2023-02-14 01:17+0100\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
44
locales/js-0-messages.pot
Normal file
44
locales/js-0-messages.pot
Normal file
|
@ -0,0 +1,44 @@
|
|||
#: static/js/myconfirm.js:4 static/js/myconfirm.js:171
|
||||
#: static/js/myconfirm.js:200
|
||||
msgid "Confirmation"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:5
|
||||
msgid "Do you confirm?"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:11 static/js/myconfirm.js:108
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:17 static/js/myconfirm.js:114
|
||||
msgid "Validate"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:44
|
||||
msgid "Error"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:52
|
||||
msgid "OK"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:91
|
||||
msgid "Question"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:92
|
||||
msgid "Please enter your answer below:"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:143
|
||||
msgid "Please wait"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:144
|
||||
msgid "Please wait while your request is being processed."
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:172 static/js/myconfirm.js:201
|
||||
msgid "Are you sure?"
|
||||
msgstr ""
|
397
locales/messages.pot
Normal file
397
locales/messages.pot
Normal file
|
@ -0,0 +1,397 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"POT-Creation-Date: 2023-02-14 01:17+0100\n"
|
||||
"PO-Revision-Date: 2023-02-14 01:17+0100\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: Cli.php:34
|
||||
#, php-format
|
||||
msgid "The CLI command '%s' already exists."
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:39
|
||||
#, php-format
|
||||
msgid "The CLI command '%s' handler is not callable !"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:71
|
||||
#, php-format
|
||||
msgid "Usage: %s [-h] [-qd] command\n"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:72
|
||||
msgid " -h Show this message\n"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:73
|
||||
msgid " -q / -d Quiet/Debug mode\n"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:74
|
||||
msgid " --trace Trace mode (the most verbose)\n"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:75
|
||||
msgid " command Command to run\n"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:77
|
||||
msgid "Available commands:\n"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:125
|
||||
msgid "Only one command could be executed !"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:153
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Invalid parameter \"%s\".\n"
|
||||
"Note: Command's parameter/argument must be place after the command."
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:178
|
||||
#, php-format
|
||||
msgid "An exception occured running command %s"
|
||||
msgstr ""
|
||||
|
||||
#: Db.php:74
|
||||
msgid "Unable to connect to the database."
|
||||
msgstr ""
|
||||
|
||||
#: Email.php:141
|
||||
#, php-format
|
||||
msgid "</hr><p><small>Mail initialy intended for %s.</small></p>"
|
||||
msgstr ""
|
||||
|
||||
#: Email.php:142
|
||||
#, php-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"Mail initialy intended for %s."
|
||||
msgstr ""
|
||||
|
||||
#: Email.php:178
|
||||
#, php-format
|
||||
msgid "<p><small>%s: %s</small></p>"
|
||||
msgstr ""
|
||||
|
||||
#: Email.php:179
|
||||
#, php-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"%s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: Tpl.php:355
|
||||
msgid "No template specified."
|
||||
msgstr ""
|
||||
|
||||
#: Tpl.php:386
|
||||
msgid "An error occurred while displaying this page."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:141
|
||||
msgid "Bad request"
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:142
|
||||
msgid "Invalid request."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:145
|
||||
msgid "Authentication required"
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:146
|
||||
msgid "You have to be authenticated to access to this page."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:149
|
||||
msgid "Access denied"
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:150
|
||||
msgid ""
|
||||
"You do not have access to this application. If you think this is an error, "
|
||||
"please contact support."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:153
|
||||
msgid "Whoops ! Page not found"
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:154
|
||||
msgid "The requested page can not be found."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:162
|
||||
msgid "Error"
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:163
|
||||
msgid "An unknown error occurred. If problem persist, please contact support."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:226
|
||||
msgid ""
|
||||
"Unable to determine the requested page. If the problem persists, please "
|
||||
"contact support."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:376
|
||||
msgid ""
|
||||
"Unable to determine the requested page (loop detected). If the problem "
|
||||
"persists, please contact support."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:407
|
||||
msgid "This request cannot be processed."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:420
|
||||
msgid ""
|
||||
"Authentication required but force_authentication function is not defined."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:429
|
||||
msgid "This request could not be processed correctly."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:122 App.php:120
|
||||
msgid "Hello world !"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:142
|
||||
msgid "Extract messages that need to be translated"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:144
|
||||
msgid ""
|
||||
"This command could be used to generate/update locales/messages.pot file."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:150
|
||||
msgid "Update messages in translation PO lang files"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:152
|
||||
msgid ""
|
||||
"This command could be used to init/update PO files in locales/*/LC_MESSAGES "
|
||||
"directories."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:159
|
||||
msgid ""
|
||||
"Compile messages from existing translation PO lang files to corresponding MO "
|
||||
"files and JS catalogs"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:164
|
||||
msgid ""
|
||||
"This command could be used to compile PO files in locales/*/LC_MESSAGES "
|
||||
"directories to MO files and as JS catalogs in locales directory."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:336
|
||||
msgid "Fail to list EesyPHP PHP files."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:356
|
||||
msgid "Fail to extract messages from EesyPHP PHP files using xgettext."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:369
|
||||
msgid "Fail to list application PHP files."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:389
|
||||
msgid "Fail to extract messages from PHP files using xgettext."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:405
|
||||
#, php-format
|
||||
msgid "Fail to list JS files in the directory of static files '%s'."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:427
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Fail to extract messages from JS files in the directory of static files '%s' "
|
||||
"using xgettext."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:449
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Fail to extract messages from templates directory '%s' using tsmarty2c.php "
|
||||
"script."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:485
|
||||
msgid "Fail to merge messages using msgcat."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:502
|
||||
#, php-format
|
||||
msgid "Compendium file %s not found."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:513
|
||||
#, php-format
|
||||
msgid "POT file not found (%s). Please run extract_messages first."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:525 I18n.php:636
|
||||
#, php-format
|
||||
msgid "Lang directory '%s' found"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:531 I18n.php:642
|
||||
#, php-format
|
||||
msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:546
|
||||
#, php-format
|
||||
msgid "Fail to init messages in %s PO file using msginit (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:564
|
||||
#, php-format
|
||||
msgid "Fail to update messages in %s PO file using msgmerge (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:570 I18n.php:650
|
||||
#, php-format
|
||||
msgid "PO file not found in lang '%s' directory, ignore it."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:577 I18n.php:690
|
||||
#, php-format
|
||||
msgid "Fail to open root lang directory (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:606
|
||||
#, php-format
|
||||
msgid "Lang alias symlink found: %s -> %s"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:613
|
||||
#, php-format
|
||||
msgid "JS catalog symlink for %s -> %s created (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:617
|
||||
#, php-format
|
||||
msgid "Fail to create JS catalog symlink for %s -> %s (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:623
|
||||
#, php-format
|
||||
msgid "JS catalog symlink for %s -> %s already exist (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:628
|
||||
#, php-format
|
||||
msgid "JS catalog file for %s already exist, but it's not a symlink to %s (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:663
|
||||
#, php-format
|
||||
msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:673
|
||||
#, php-format
|
||||
msgid "Fail to open %s JS catalog file in write mode (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:678
|
||||
#, php-format
|
||||
msgid "Fail to write %s JS catalog in file (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:683
|
||||
#, php-format
|
||||
msgid "%s JS catalog writed (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: App.php:122
|
||||
msgid "Hello world!"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:4 static/js/myconfirm.js:171
|
||||
#: static/js/myconfirm.js:200
|
||||
msgid "Confirmation"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:5
|
||||
msgid "Do you confirm?"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:11 static/js/myconfirm.js:108
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:17 static/js/myconfirm.js:114
|
||||
msgid "Validate"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:52
|
||||
msgid "OK"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:91
|
||||
msgid "Question"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:92
|
||||
msgid "Please enter your answer below:"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:143
|
||||
msgid "Please wait"
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:144
|
||||
msgid "Please wait while your request is being processed."
|
||||
msgstr ""
|
||||
|
||||
#: static/js/myconfirm.js:172 static/js/myconfirm.js:201
|
||||
msgid "Are you sure?"
|
||||
msgstr ""
|
||||
|
||||
#: templates/fatal_error.tpl:3
|
||||
msgid "Oops..."
|
||||
msgstr ""
|
||||
|
||||
#: templates/fatal_error.tpl:5
|
||||
msgid ""
|
||||
"A fatal error has occurred and it is preventing this application from "
|
||||
"working properly. Please try again later or contact support."
|
||||
msgstr ""
|
||||
|
||||
#: templates/fatal_error.tpl:7
|
||||
msgid "Error: %1"
|
||||
msgstr ""
|
||||
|
||||
#: templates/fatal_error.tpl:9
|
||||
msgid "Back"
|
||||
msgstr ""
|
||||
|
||||
#: templates/homepage.tpl:5
|
||||
msgid "Hello, world!"
|
||||
msgstr ""
|
||||
|
||||
#: templates/homepage.tpl:6
|
||||
msgid ""
|
||||
"This is the default page of a new app using EesyPHP framework. Register your "
|
||||
"own templates directory and create a <em>homepage.tpl</em> file to overwrite "
|
||||
"it. You could also overwrite the URL handler for the root of the web "
|
||||
"application."
|
||||
msgstr ""
|
318
locales/php-messages.pot
Normal file
318
locales/php-messages.pot
Normal file
|
@ -0,0 +1,318 @@
|
|||
#: Cli.php:34
|
||||
#, php-format
|
||||
msgid "The CLI command '%s' already exists."
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:39
|
||||
#, php-format
|
||||
msgid "The CLI command '%s' handler is not callable !"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:71
|
||||
#, php-format
|
||||
msgid "Usage: %s [-h] [-qd] command\n"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:72
|
||||
msgid " -h Show this message\n"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:73
|
||||
msgid " -q / -d Quiet/Debug mode\n"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:74
|
||||
msgid " --trace Trace mode (the most verbose)\n"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:75
|
||||
msgid " command Command to run\n"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:77
|
||||
msgid "Available commands:\n"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:125
|
||||
msgid "Only one command could be executed !"
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:153
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Invalid parameter \"%s\".\n"
|
||||
"Note: Command's parameter/argument must be place after the command."
|
||||
msgstr ""
|
||||
|
||||
#: Cli.php:178
|
||||
#, php-format
|
||||
msgid "An exception occured running command %s"
|
||||
msgstr ""
|
||||
|
||||
#: Db.php:74
|
||||
msgid "Unable to connect to the database."
|
||||
msgstr ""
|
||||
|
||||
#: Email.php:141
|
||||
#, php-format
|
||||
msgid "</hr><p><small>Mail initialy intended for %s.</small></p>"
|
||||
msgstr ""
|
||||
|
||||
#: Email.php:142
|
||||
#, php-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"Mail initialy intended for %s."
|
||||
msgstr ""
|
||||
|
||||
#: Email.php:178
|
||||
#, php-format
|
||||
msgid "<p><small>%s: %s</small></p>"
|
||||
msgstr ""
|
||||
|
||||
#: Email.php:179
|
||||
#, php-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"%s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: Tpl.php:355
|
||||
msgid "No template specified."
|
||||
msgstr ""
|
||||
|
||||
#: Tpl.php:386
|
||||
msgid "An error occurred while displaying this page."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:141
|
||||
msgid "Bad request"
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:142
|
||||
msgid "Invalid request."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:145
|
||||
msgid "Authentication required"
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:146
|
||||
msgid "You have to be authenticated to access to this page."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:149
|
||||
msgid "Access denied"
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:150
|
||||
msgid ""
|
||||
"You do not have access to this application. If you think this is an error, "
|
||||
"please contact support."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:153
|
||||
msgid "Whoops ! Page not found"
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:154
|
||||
msgid "The requested page can not be found."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:162
|
||||
msgid "Error"
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:163
|
||||
msgid "An unknown error occurred. If problem persist, please contact support."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:226
|
||||
msgid ""
|
||||
"Unable to determine the requested page. If the problem persists, please "
|
||||
"contact support."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:376
|
||||
msgid ""
|
||||
"Unable to determine the requested page (loop detected). If the problem "
|
||||
"persists, please contact support."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:407
|
||||
msgid "This request cannot be processed."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:420
|
||||
msgid ""
|
||||
"Authentication required but force_authentication function is not defined."
|
||||
msgstr ""
|
||||
|
||||
#: Url.php:429
|
||||
msgid "This request could not be processed correctly."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:122 App.php:120
|
||||
msgid "Hello world !"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:142
|
||||
msgid "Extract messages that need to be translated"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:144
|
||||
msgid ""
|
||||
"This command could be used to generate/update locales/messages.pot file."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:150
|
||||
msgid "Update messages in translation PO lang files"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:152
|
||||
msgid ""
|
||||
"This command could be used to init/update PO files in locales/*/LC_MESSAGES "
|
||||
"directories."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:159
|
||||
msgid ""
|
||||
"Compile messages from existing translation PO lang files to corresponding MO "
|
||||
"files and JS catalogs"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:164
|
||||
msgid ""
|
||||
"This command could be used to compile PO files in locales/*/LC_MESSAGES "
|
||||
"directories to MO files and as JS catalogs in locales directory."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:336
|
||||
msgid "Fail to list EesyPHP PHP files."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:356
|
||||
msgid "Fail to extract messages from EesyPHP PHP files using xgettext."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:369
|
||||
msgid "Fail to list application PHP files."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:389
|
||||
msgid "Fail to extract messages from PHP files using xgettext."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:405
|
||||
#, php-format
|
||||
msgid "Fail to list JS files in the directory of static files '%s'."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:427
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Fail to extract messages from JS files in the directory of static files '%s' "
|
||||
"using xgettext."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:449
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Fail to extract messages from templates directory '%s' using tsmarty2c.php "
|
||||
"script."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:485
|
||||
msgid "Fail to merge messages using msgcat."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:502
|
||||
#, php-format
|
||||
msgid "Compendium file %s not found."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:513
|
||||
#, php-format
|
||||
msgid "POT file not found (%s). Please run extract_messages first."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:525 I18n.php:636
|
||||
#, php-format
|
||||
msgid "Lang directory '%s' found"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:531 I18n.php:642
|
||||
#, php-format
|
||||
msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:546
|
||||
#, php-format
|
||||
msgid "Fail to init messages in %s PO file using msginit (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:564
|
||||
#, php-format
|
||||
msgid "Fail to update messages in %s PO file using msgmerge (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:570 I18n.php:650
|
||||
#, php-format
|
||||
msgid "PO file not found in lang '%s' directory, ignore it."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:577 I18n.php:690
|
||||
#, php-format
|
||||
msgid "Fail to open root lang directory (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:606
|
||||
#, php-format
|
||||
msgid "Lang alias symlink found: %s -> %s"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:613
|
||||
#, php-format
|
||||
msgid "JS catalog symlink for %s -> %s created (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:617
|
||||
#, php-format
|
||||
msgid "Fail to create JS catalog symlink for %s -> %s (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:623
|
||||
#, php-format
|
||||
msgid "JS catalog symlink for %s -> %s already exist (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:628
|
||||
#, php-format
|
||||
msgid "JS catalog file for %s already exist, but it's not a symlink to %s (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:663
|
||||
#, php-format
|
||||
msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:673
|
||||
#, php-format
|
||||
msgid "Fail to open %s JS catalog file in write mode (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:678
|
||||
#, php-format
|
||||
msgid "Fail to write %s JS catalog in file (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: I18n.php:683
|
||||
#, php-format
|
||||
msgid "%s JS catalog writed (%s)."
|
||||
msgstr ""
|
||||
|
||||
#: App.php:122
|
||||
msgid "Hello world!"
|
||||
msgstr ""
|
32
locales/templates-0-messages.pot
Normal file
32
locales/templates-0-messages.pot
Normal file
|
@ -0,0 +1,32 @@
|
|||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
#: templates/fatal_error.tpl:3
|
||||
msgid "Oops..."
|
||||
msgstr ""
|
||||
|
||||
#: templates/fatal_error.tpl:5
|
||||
msgid ""
|
||||
"A fatal error has occurred and it is preventing this application from "
|
||||
"working properly. Please try again later or contact support."
|
||||
msgstr ""
|
||||
|
||||
#: templates/fatal_error.tpl:7
|
||||
msgid "Error: %1"
|
||||
msgstr ""
|
||||
|
||||
#: templates/fatal_error.tpl:9
|
||||
msgid "Back"
|
||||
msgstr ""
|
||||
|
||||
#: templates/homepage.tpl:5
|
||||
msgid "Hello, world!"
|
||||
msgstr ""
|
||||
|
||||
#: templates/homepage.tpl:6
|
||||
msgid ""
|
||||
"This is the default page of a new app using EesyPHP framework. Register your "
|
||||
"own templates directory and create a <em>homepage.tpl</em> file to overwrite "
|
||||
"it. You could also overwrite the URL handler for the root of the web "
|
||||
"application."
|
||||
msgstr ""
|
|
@ -34,7 +34,7 @@ class App {
|
|||
Config::register_extra_variable('root_directory_path', $root_directory_path);
|
||||
|
||||
$config_file = Config::replace_variables($config_file);
|
||||
if (!Config::load($config_file)) {
|
||||
if ($config_file && !Config::load($config_file)) {
|
||||
Log::fatal('Fail to load configuration file (%s)', $config_file);
|
||||
exit(1);
|
||||
}
|
||||
|
@ -117,9 +117,9 @@ class App {
|
|||
*/
|
||||
public static function handle_homepage($request) {
|
||||
if (Tpl::initialized())
|
||||
Tpl :: display("homepage.tpl", _("Hello world !"));
|
||||
Tpl :: display("homepage.tpl", I18n::_("Hello world !"));
|
||||
else
|
||||
echo "<h1>"._("Hello world!")."</h1>";
|
||||
echo "<h1>".I18n::_("Hello world!")."</h1>";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
30
src/Cli.php
30
src/Cli.php
|
@ -31,12 +31,12 @@ class Cli {
|
|||
public static function add_command($command, $handler, $short_desc, $usage_args=null, $long_desc=null,
|
||||
$override=false) {
|
||||
if (array_key_exists($command, self :: $commands) && !$override) {
|
||||
Log :: error(_("The CLI command '%s' already exists."), $command);
|
||||
Log :: error(I18n::_("The CLI command '%s' already exists."), $command);
|
||||
return False;
|
||||
}
|
||||
|
||||
if (!is_callable($handler)) {
|
||||
Log :: error(_("The CLI command '%s' handler is not callable !"), $command);
|
||||
Log :: error(I18n::_("The CLI command '%s' handler is not callable !"), $command);
|
||||
return False;
|
||||
}
|
||||
|
||||
|
@ -68,13 +68,13 @@ class Cli {
|
|||
|
||||
if ($error)
|
||||
echo "$error\n\n";
|
||||
printf(_("Usage: %s [-h] [-qd] command\n"), basename($argv[0]));
|
||||
echo _(" -h Show this message\n");
|
||||
echo _(" -q / -d Quiet/Debug mode\n");
|
||||
echo _(" --trace Trace mode (the most verbose)\n");
|
||||
echo _(" command Command to run\n");
|
||||
echo(I18n::_("Usage: %s [-h] [-qd] command\n", basename($argv[0])));
|
||||
echo I18n::_(" -h Show this message\n");
|
||||
echo I18n::_(" -q / -d Quiet/Debug mode\n");
|
||||
echo I18n::_(" --trace Trace mode (the most verbose)\n");
|
||||
echo I18n::_(" command Command to run\n");
|
||||
echo "\n";
|
||||
echo _("Available commands:\n");
|
||||
echo I18n::_("Available commands:\n");
|
||||
|
||||
foreach (self :: $commands as $command => $info) {
|
||||
if (self :: $command && $command != self :: $command)
|
||||
|
@ -82,21 +82,21 @@ class Cli {
|
|||
echo (
|
||||
" ".str_replace(
|
||||
"\n", "\n ",
|
||||
wordwrap("$command : "._($info['short_desc'])))
|
||||
wordwrap("$command : ".I18n::_($info['short_desc'])))
|
||||
."\n\n");
|
||||
echo (
|
||||
" ".basename($argv[0])." $command ".
|
||||
($info['usage_args']?_($info['usage_args']):'').
|
||||
($info['usage_args']?I18n::_($info['usage_args']):'').
|
||||
"\n");
|
||||
if ($info['long_desc']) {
|
||||
if (is_array($info['long_desc'])) {
|
||||
$lines = array();
|
||||
foreach ($info['long_desc'] as $line)
|
||||
$lines[] = _($line);
|
||||
$lines[] = I18n::_($line);
|
||||
$info['long_desc'] = implode("\n", $lines);
|
||||
}
|
||||
else
|
||||
$info['long_desc'] = _($info['long_desc']);
|
||||
$info['long_desc'] = I18n::_($info['long_desc']);
|
||||
|
||||
echo "\n ".str_replace("\n", "\n ", wordwrap($info['long_desc']))."\n";
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ class Cli {
|
|||
if (!self :: $command)
|
||||
self :: $command = $args[$i];
|
||||
else
|
||||
self :: usage(_("Only one command could be executed !"));
|
||||
self :: usage(I18n::_("Only one command could be executed !"));
|
||||
}
|
||||
else {
|
||||
switch($args[$i]) {
|
||||
|
@ -149,7 +149,7 @@ class Cli {
|
|||
$command_args[] = $args[$i];
|
||||
else
|
||||
self :: usage(
|
||||
_(
|
||||
I18n::_(
|
||||
"Invalid parameter \"%s\".\nNote: Command's parameter/argument must be place ".
|
||||
"after the command."
|
||||
), $args[$i]
|
||||
|
@ -175,7 +175,7 @@ class Cli {
|
|||
exit($result?0:1);
|
||||
}
|
||||
catch(Exception $e) {
|
||||
Log :: exception($e, _("An exception occured running command %s"), self :: $command);
|
||||
Log :: exception($e, I18n::_("An exception occured running command %s"), self :: $command);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ class Db {
|
|||
}
|
||||
catch(Exception $e) {
|
||||
Log :: error("Fail to connect to DB (DSN : '%s') : %s", $dsn, $e->getMessage());
|
||||
Log :: fatal(_('Unable to connect to the database.'));
|
||||
Log :: fatal(I18n::_('Unable to connect to the database.'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -138,8 +138,8 @@ class Email {
|
|||
$msg .= sprintf(
|
||||
(
|
||||
$html?
|
||||
_("</hr><p><small>Mail initialy intended for %s.</small></p>"):
|
||||
_("\n\n\nMail initialy intended for %s.")
|
||||
I18n::_("</hr><p><small>Mail initialy intended for %s.</small></p>"):
|
||||
I18n::_("\n\n\nMail initialy intended for %s.")
|
||||
),
|
||||
(is_array($to)?implode(',', $to):$to));
|
||||
$headers["X-Orig-To"] = $to;
|
||||
|
@ -175,8 +175,8 @@ class Email {
|
|||
$msg .= sprintf(
|
||||
(
|
||||
$html?
|
||||
_("<p><small>%s: %s</small></p>"):
|
||||
_("\n%s: %s")
|
||||
I18n::_("<p><small>%s: %s</small></p>"):
|
||||
I18n::_("\n%s: %s")
|
||||
),
|
||||
strtoupper($header),
|
||||
(is_array($headers[$header])?implode(',', $headers[$header]):$headers[$header]));
|
||||
|
|
307
src/I18n.php
307
src/I18n.php
|
@ -5,9 +5,18 @@ namespace EesyPHP;
|
|||
use Locale;
|
||||
|
||||
class I18n {
|
||||
// Gettext text domain
|
||||
// Gettext application text domain
|
||||
public const TEXT_DOMAIN = 'DEFAULT';
|
||||
|
||||
// Gettext core text domain
|
||||
public const CORE_TEXT_DOMAIN = 'EESYPHP';
|
||||
|
||||
/**
|
||||
* The core root directory path of translation files
|
||||
* @var string
|
||||
*/
|
||||
protected static string $core_root_path = __DIR__.'/../locales';
|
||||
|
||||
/**
|
||||
* The root directory path of translation files
|
||||
* @var string
|
||||
|
@ -42,7 +51,7 @@ class I18n {
|
|||
self :: $root_path = $root_path;
|
||||
|
||||
if (is_null($default_locale))
|
||||
self :: $default_locale = App::get('i18n.default_locale', null, 'string');
|
||||
$default_locale = App::get('i18n.default_locale', null, 'string');
|
||||
if (!is_null($default_locale))
|
||||
self :: $default_locale = $default_locale;
|
||||
|
||||
|
@ -108,10 +117,13 @@ class I18n {
|
|||
Log :: error("An error occured setting locale to '$locale'");
|
||||
|
||||
// Configure and set the text domain
|
||||
$fullpath = bindtextdomain(self :: CORE_TEXT_DOMAIN, self :: $core_root_path);
|
||||
Log :: trace("Core text domain %s fullpath is '%s'.", self :: CORE_TEXT_DOMAIN, $fullpath);
|
||||
Log :: trace("Test: ".self::_('Hello world !'));
|
||||
|
||||
$fullpath = bindtextdomain(self :: TEXT_DOMAIN, self :: $root_path);
|
||||
Log :: trace("Text domain fullpath is '$fullpath'.");
|
||||
Log :: trace("Text domain is '".textdomain(self :: TEXT_DOMAIN)."'.");
|
||||
Log :: trace("Test: "._('Hello world !'));
|
||||
Log :: trace("Default text domain %s fullpath is '%s'.", self :: TEXT_DOMAIN, $fullpath);
|
||||
Log :: trace("Default text domain is '".textdomain(self :: TEXT_DOMAIN)."'.");
|
||||
|
||||
// JS translation file
|
||||
if (
|
||||
|
@ -207,11 +219,54 @@ class I18n {
|
|||
return $default;
|
||||
}
|
||||
|
||||
/*
|
||||
********************************************************************
|
||||
* Translations helpers *
|
||||
********************************************************************
|
||||
*/
|
||||
|
||||
/**
|
||||
* Helper function: just mark message for translation
|
||||
*
|
||||
* Translate a message using gettext
|
||||
* @param string $message The string to translate
|
||||
* @param array $extra_args Extra arguments used to compute the message using sprintf
|
||||
* @return string The translated and computed message
|
||||
*/
|
||||
public static function _(string $message, ...$extra_args) {
|
||||
$return = dgettext(self :: CORE_TEXT_DOMAIN, $message);
|
||||
// If extra arguments passed, format message using sprintf
|
||||
if ($extra_args) {
|
||||
$return = call_user_func_array(
|
||||
'sprintf',
|
||||
array_merge(array($return), $extra_args)
|
||||
);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Translate a message with singular and plural forms using gettext
|
||||
* @param string $singular The singular message to translate
|
||||
* @param string $plural The plural message to translate
|
||||
* @param int $count The item count to determine if the singular or the plural forms must to be
|
||||
* used
|
||||
* @param array $extra_args Extra arguments used to compute the message using sprintf
|
||||
* @return string The translated and computed message
|
||||
*/
|
||||
public static function ngettext(string $singular, string $plural, int $count, ...$extra_args) {
|
||||
$return = dngettext(self :: CORE_TEXT_DOMAIN, $singular, $plural, $count);
|
||||
// If extra arguments passed, format message using sprintf
|
||||
if ($extra_args) {
|
||||
$return = call_user_func_array(
|
||||
'sprintf',
|
||||
array_merge(array($return), $extra_args)
|
||||
);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Just mark message for translation
|
||||
* @param string $msg The message to translate
|
||||
*
|
||||
* @return string The message without transformation
|
||||
*/
|
||||
public static function ___($msg) {
|
||||
|
@ -263,74 +318,82 @@ class I18n {
|
|||
* @return void
|
||||
*/
|
||||
public static function cli_extract_messages($command_args) {
|
||||
$core_mode = in_array('--core', $command_args);
|
||||
$root_path = $core_mode?self::$core_root_path:self::$root_path;
|
||||
|
||||
// Store list of generated POT files
|
||||
$pot_files = array();
|
||||
|
||||
// List EesyPHP PHP files to parse
|
||||
$eesyphp_php_files = run_external_command(
|
||||
array('find', '-name', "'*.php'"),
|
||||
null, // no STDIN data
|
||||
false, // do not escape command args (already done)
|
||||
__DIR__ // Run from EesyPHP src directory
|
||||
);
|
||||
if (!is_array($eesyphp_php_files) || $eesyphp_php_files[0] != 0) {
|
||||
Log :: fatal(_("Fail to list EesyPHP PHP files."));
|
||||
if ($core_mode) {
|
||||
// List EesyPHP PHP files to parse
|
||||
$eesyphp_php_files = run_external_command(
|
||||
array('find', '-name', "'*.php'"),
|
||||
null, // no STDIN data
|
||||
false, // do not escape command args (already done)
|
||||
__DIR__ // Run from EesyPHP src directory
|
||||
);
|
||||
if (!is_array($eesyphp_php_files) || $eesyphp_php_files[0] != 0) {
|
||||
Log :: fatal(self::_("Fail to list EesyPHP PHP files."));
|
||||
}
|
||||
|
||||
// Extract messages from EesyPHP PHP files using xgettext
|
||||
$pot_file = "$root_path/php-messages.pot";
|
||||
$result = run_external_command(
|
||||
array(
|
||||
"xgettext",
|
||||
"--from-code utf-8",
|
||||
"--language=PHP",
|
||||
"-o", $pot_file, // Output
|
||||
"--omit-header", // No POT header
|
||||
"--keyword=___", // Handle custom ___() translation function
|
||||
"--files=-" // Read files to parse from STDIN
|
||||
),
|
||||
$eesyphp_php_files[1], // Pass PHP files list via STDIN
|
||||
true, // Escape parameters
|
||||
__DIR__ // Run from EesyPHP src directory
|
||||
);
|
||||
if (!is_array($result) || $result[0] != 0)
|
||||
Log :: fatal(self::_("Fail to extract messages from EesyPHP PHP files using xgettext."));
|
||||
if (is_file($pot_file))
|
||||
$pot_files[] = $pot_file;
|
||||
}
|
||||
else {
|
||||
// List application PHP files to parse
|
||||
$php_files = run_external_command(
|
||||
array('find', '-name', "'*.php'"),
|
||||
null, // no STDIN data
|
||||
false, // do not escape command args (already done)
|
||||
App :: root_directory_path() // Run from Application root directory
|
||||
);
|
||||
if (!is_array($php_files) || $php_files[0] != 0) {
|
||||
Log :: fatal(self::_("Fail to list application PHP files."));
|
||||
}
|
||||
|
||||
// Extract messages from EesyPHP PHP files using xgettext
|
||||
$pot_file = self :: $root_path."/eesyphp-messages.pot";
|
||||
$result = run_external_command(
|
||||
array(
|
||||
"xgettext",
|
||||
"--from-code utf-8",
|
||||
"--language=PHP",
|
||||
"-o", $pot_file, // Output
|
||||
"--omit-header", // No POT header
|
||||
"--keyword=___", // Handle custom ___() translation function
|
||||
"--files=-" // Read files to parse from STDIN
|
||||
),
|
||||
$eesyphp_php_files[1], // Pass PHP files list via STDIN
|
||||
true, // Escape parameters
|
||||
__DIR__ // Run from EesyPHP src directory
|
||||
);
|
||||
if (!is_array($result) || $result[0] != 0)
|
||||
Log :: fatal(_("Fail to extract messages from EesyPHP PHP files using xgettext."));
|
||||
if (is_file($pot_file))
|
||||
$pot_files[] = $pot_file;
|
||||
|
||||
// List application PHP files to parse
|
||||
$php_files = run_external_command(
|
||||
array('find', '-name', "'*.php'"),
|
||||
null, // no STDIN data
|
||||
false, // do not escape command args (already done)
|
||||
App :: root_directory_path() // Run from Application root directory
|
||||
);
|
||||
if (!is_array($php_files) || $php_files[0] != 0) {
|
||||
Log :: fatal(_("Fail to list application PHP files."));
|
||||
// Extract messages from PHP files using xgettext
|
||||
$pot_file = "$root_path/php-messages.pot";
|
||||
$result = run_external_command(
|
||||
array(
|
||||
"xgettext",
|
||||
"--from-code utf-8",
|
||||
"--language=PHP",
|
||||
"-o", $pot_file, // 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
|
||||
true, // Escape parameters
|
||||
App :: root_directory_path() // Run from EesyPHP src directory
|
||||
);
|
||||
if (!is_array($result) || $result[0] != 0)
|
||||
Log :: fatal(self::_("Fail to extract messages from PHP files using xgettext."));
|
||||
$pot_files[] = "$root_path/php-messages.pot";
|
||||
}
|
||||
|
||||
// Extract messages from PHP files using xgettext
|
||||
$pot_file = self :: $root_path."/php-messages.pot";
|
||||
$result = run_external_command(
|
||||
array(
|
||||
"xgettext",
|
||||
"--from-code utf-8",
|
||||
"--language=PHP",
|
||||
"-o", $pot_file, // 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
|
||||
true, // Escape parameters
|
||||
App :: root_directory_path() // Run from EesyPHP src directory
|
||||
);
|
||||
if (!is_array($result) || $result[0] != 0)
|
||||
Log :: fatal(_("Fail to extract messages from PHP files using xgettext."));
|
||||
$pot_files[] = self :: $root_path."/php-messages.pot";
|
||||
|
||||
// Extract messages from JS files using xgettext in each registered static directories
|
||||
foreach(Tpl::static_directories() as $idx => $static_directory) {
|
||||
if ($core_mode && $static_directory != Tpl::$core_static_directory) continue;
|
||||
if (!$core_mode && $static_directory == Tpl::$core_static_directory) continue;
|
||||
// List JS files to parse
|
||||
$result = run_external_command(
|
||||
array('find', escapeshellarg(basename($static_directory)), '-name', "'*.js'"),
|
||||
|
@ -339,12 +402,12 @@ class I18n {
|
|||
dirname($static_directory) // Run from parent directory
|
||||
);
|
||||
if (!is_array($result) || $result[0] != 0) {
|
||||
Log :: fatal(_("Fail to list JS files in the directory of static files '%s'."), $static_directory);
|
||||
Log :: fatal(self::_("Fail to list JS files in the directory of static files '%s'."), $static_directory);
|
||||
return;
|
||||
}
|
||||
|
||||
// Extract messages from JS files using xgettext
|
||||
$pot_file = self :: $root_path."/js-$idx-messages.pot";
|
||||
$pot_file = "$root_path/js-$idx-messages.pot";
|
||||
$result = run_external_command(
|
||||
array(
|
||||
"xgettext",
|
||||
|
@ -361,7 +424,7 @@ class I18n {
|
|||
);
|
||||
if (!is_array($result) || $result[0] != 0)
|
||||
Log :: fatal(
|
||||
_("Fail to extract messages from JS files in the directory of static files '%s' using xgettext."),
|
||||
self::_("Fail to extract messages from JS files in the directory of static files '%s' using xgettext."),
|
||||
$static_directory);
|
||||
if (is_file($pot_file))
|
||||
$pot_files[] = $pot_file;
|
||||
|
@ -369,6 +432,8 @@ class I18n {
|
|||
|
||||
if (Tpl :: initialized()) {
|
||||
foreach (Tpl :: templates_directories() as $idx => $templates_directory) {
|
||||
if ($core_mode && $templates_directory != Tpl::$core_templates_directory) continue;
|
||||
if (!$core_mode && $templates_directory == Tpl::$core_templates_directory) continue;
|
||||
// Extract messages from templates files using tsmarty2c.php
|
||||
$result = run_external_command(
|
||||
array(
|
||||
|
@ -381,11 +446,11 @@ class I18n {
|
|||
);
|
||||
if (!is_array($result) || $result[0] != 0)
|
||||
Log :: fatal(
|
||||
_("Fail to extract messages from templates directory '%s' using tsmarty2c.php script."),
|
||||
self::_("Fail to extract messages from templates directory '%s' using tsmarty2c.php script."),
|
||||
$templates_directory
|
||||
);
|
||||
if (!$result[1]) continue;
|
||||
$pot_file = self :: $root_path."/templates-$idx-messages.pot";
|
||||
$pot_file = "$root_path/templates-$idx-messages.pot";
|
||||
$fd = fopen($pot_file, 'w');
|
||||
fwrite($fd, $result[1]);
|
||||
fclose($fd);
|
||||
|
@ -393,7 +458,7 @@ class I18n {
|
|||
}
|
||||
}
|
||||
|
||||
$fd = fopen(self :: $root_path."/headers.pot", 'w');
|
||||
$fd = fopen("$root_path/headers.pot", 'w');
|
||||
$headers = array(
|
||||
'msgid ""',
|
||||
'msgstr ""',
|
||||
|
@ -411,13 +476,13 @@ class I18n {
|
|||
array(
|
||||
'msgcat',
|
||||
"-t", "utf-8", "--use-first",
|
||||
"-o", self :: $root_path."/messages.pot",
|
||||
self :: $root_path."/headers.pot",
|
||||
"-o", "$root_path/messages.pot",
|
||||
"$root_path/headers.pot",
|
||||
),
|
||||
$pot_files
|
||||
));
|
||||
if (!is_array($result) || $result[0] != 0)
|
||||
Log :: fatal(_("Fail to merge messages using msgcat."));
|
||||
Log :: fatal(self::_("Fail to merge messages using msgcat."));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -428,40 +493,47 @@ class I18n {
|
|||
* @return bool
|
||||
*/
|
||||
public static function cli_update_messages($command_args) {
|
||||
$core_mode = false;
|
||||
$compendium_args = array();
|
||||
foreach ($command_args as $path) {
|
||||
if (!file_exists($path))
|
||||
Log :: fatal(_("Compendium file %s not found."), $path);
|
||||
$compendium_args[] = '-C';
|
||||
$compendium_args[] = $path;
|
||||
foreach ($command_args as $arg) {
|
||||
if ($arg == '--core')
|
||||
$core_mode = true;
|
||||
else if (!file_exists($arg))
|
||||
Log :: fatal(self::_("Compendium file %s not found."), $arg);
|
||||
else {
|
||||
$compendium_args[] = '-C';
|
||||
$compendium_args[] = $arg;
|
||||
}
|
||||
}
|
||||
$domain = $core_mode?self::CORE_TEXT_DOMAIN:self::TEXT_DOMAIN;
|
||||
$root_path = $core_mode?self::$core_root_path:self::$root_path;
|
||||
|
||||
$pot_file = self :: $root_path."/messages.pot";
|
||||
$pot_file = "$root_path/messages.pot";
|
||||
if (!is_file($pot_file))
|
||||
Log :: fatal(_("POT file not found (%s). Please run extract_messages first."), $pot_file);
|
||||
Log :: fatal(self::_("POT file not found (%s). Please run extract_messages first."), $pot_file);
|
||||
|
||||
if ($dh = opendir(self :: $root_path)) {
|
||||
if ($dh = opendir($root_path)) {
|
||||
$error = False;
|
||||
while (($file = readdir($dh)) !== false) {
|
||||
if (
|
||||
!is_dir(self :: $root_path . '/' . $file) ||
|
||||
!is_dir("$root_path/$file") ||
|
||||
in_array($file, array('.', '..')) ||
|
||||
is_link(self :: $root_path . '/' . $file)
|
||||
is_link("$root_path/$file")
|
||||
)
|
||||
continue;
|
||||
|
||||
Log :: debug(_("Lang directory '%s' found"), $file);
|
||||
Log :: debug(self::_("Lang directory '%s' found"), $file);
|
||||
|
||||
// Check LC_MESSAGES directory exists
|
||||
$lang = $file;
|
||||
$lang_dir = self :: $root_path . '/' . $file . '/LC_MESSAGES' ;
|
||||
$lang_dir = "$root_path/$file/LC_MESSAGES" ;
|
||||
if (!is_dir($lang_dir)) {
|
||||
Log :: debug(_("LC_MESSAGES directory not found in lang '%s' directory, ignore it."),
|
||||
Log :: debug(self::_("LC_MESSAGES directory not found in lang '%s' directory, ignore it."),
|
||||
$lang);
|
||||
continue;
|
||||
}
|
||||
|
||||
$po_file = $lang_dir . '/' . self :: TEXT_DOMAIN . '.po';
|
||||
$po_file = "$lang_dir/$domain.po";
|
||||
$created = false;
|
||||
if (!is_file($po_file)) {
|
||||
// Init PO file from POT file using msginit
|
||||
|
@ -471,7 +543,7 @@ class I18n {
|
|||
if (is_array($result) && $result[0] == 0) {
|
||||
$created = true;
|
||||
} else {
|
||||
Log :: error(_("Fail to init messages in %s PO file using msginit (%s)."),
|
||||
Log :: error(self::_("Fail to init messages in %s PO file using msginit (%s)."),
|
||||
$lang, $po_file);
|
||||
$error = True;
|
||||
}
|
||||
|
@ -489,20 +561,20 @@ class I18n {
|
|||
)
|
||||
);
|
||||
if (!is_array($result) || $result[0] != 0) {
|
||||
Log :: error(_("Fail to update messages in %s PO file using msgmerge (%s)."),
|
||||
Log :: error(self::_("Fail to update messages in %s PO file using msgmerge (%s)."),
|
||||
$lang, $po_file);
|
||||
$error = True;
|
||||
}
|
||||
}
|
||||
elseif (!$created) {
|
||||
Log :: debug(_("PO file not found in lang '%s' directory, ignore it."), $lang);
|
||||
Log :: debug(self::_("PO file not found in lang '%s' directory, ignore it."), $lang);
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
return !$error;
|
||||
}
|
||||
|
||||
Log :: fatal(_("Fail to open root lang directory (%s)."), App :: root_directory_path());
|
||||
Log :: fatal(self::_("Fail to open root lang directory (%s)."), App :: root_directory_path());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -514,43 +586,46 @@ class I18n {
|
|||
* @return bool
|
||||
*/
|
||||
public static function cli_compile_messages($command_args) {
|
||||
if ($dh = opendir(self :: $root_path)) {
|
||||
$core_mode = in_array('--core', $command_args);
|
||||
$domain = $core_mode?self::CORE_TEXT_DOMAIN:self::TEXT_DOMAIN;
|
||||
$root_path = $core_mode?self::$core_root_path:self::$root_path;
|
||||
if ($dh = opendir($root_path)) {
|
||||
$error = False;
|
||||
while (($file = readdir($dh)) !== false) {
|
||||
if (
|
||||
!is_dir(self :: $root_path . '/' . $file) ||
|
||||
!is_dir("$root_path/$file") ||
|
||||
in_array($file, array('.', '..'))
|
||||
)
|
||||
continue;
|
||||
|
||||
if (is_link(self :: $root_path . '/' . $file)) {
|
||||
$real_lang_dir = readlink(self :: $root_path . '/' . $file);
|
||||
if (dirname($real_lang_dir) != '.' || !is_dir(self :: $root_path . '/' . $real_lang_dir))
|
||||
if (is_link("$root_path/$file")) {
|
||||
$real_lang_dir = readlink("$root_path/$file");
|
||||
if (dirname($real_lang_dir) != '.' || !is_dir("$root_path/$real_lang_dir"))
|
||||
continue;
|
||||
$lang = $file;
|
||||
Log :: debug(_("Lang alias symlink found: %s -> %s"), $lang, $real_lang_dir);
|
||||
Log :: debug(self::_("Lang alias symlink found: %s -> %s"), $lang, $real_lang_dir);
|
||||
|
||||
// Create JS catalog symlink (if not exists)
|
||||
$js_link = self :: $root_path."/$lang.js";
|
||||
$js_link = "$root_path/$lang.js";
|
||||
$link_target = "$real_lang_dir.js";
|
||||
if (!file_exists($js_link)) {
|
||||
if (symlink($link_target, $js_link)) {
|
||||
Log :: info(_("JS catalog symlink for %s -> %s created (%s)"),
|
||||
Log :: info(self::_("JS catalog symlink for %s -> %s created (%s)"),
|
||||
$lang, $real_lang_dir, $js_link);
|
||||
}
|
||||
else {
|
||||
Log :: error(_("Fail to create JS catalog symlink for %s -> %s (%s)"),
|
||||
Log :: error(self::_("Fail to create JS catalog symlink for %s -> %s (%s)"),
|
||||
$lang, $real_lang_dir, $js_link);
|
||||
$error = True;
|
||||
}
|
||||
}
|
||||
elseif (readlink($js_link) == $link_target) {
|
||||
Log :: debug(_("JS catalog symlink for %s -> %s already exist (%s)"),
|
||||
Log :: debug(self::_("JS catalog symlink for %s -> %s already exist (%s)"),
|
||||
$lang, $real_lang_dir, $js_link);
|
||||
}
|
||||
else {
|
||||
Log :: warning(
|
||||
_("JS catalog file for %s already exist, but it's not a symlink to %s (%s)"),
|
||||
self::_("JS catalog file for %s already exist, but it's not a symlink to %s (%s)"),
|
||||
$lang, $real_lang_dir, $js_link
|
||||
);
|
||||
$error = True;
|
||||
|
@ -558,21 +633,21 @@ class I18n {
|
|||
continue;
|
||||
}
|
||||
|
||||
Log :: debug(_("Lang directory '%s' found"), $file);
|
||||
Log :: debug(self::_("Lang directory '%s' found"), $file);
|
||||
|
||||
// Check LC_MESSAGES directory exists
|
||||
$lang = $file;
|
||||
$lang_dir = self :: $root_path . '/' . $file . '/LC_MESSAGES' ;
|
||||
$lang_dir = "$root_path/$file/LC_MESSAGES" ;
|
||||
if (!is_dir($lang_dir)) {
|
||||
Log :: debug(_("LC_MESSAGES directory not found in lang '%s' directory, ignore it."),
|
||||
Log :: debug(self::_("LC_MESSAGES directory not found in lang '%s' directory, ignore it."),
|
||||
$lang);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Test .PO file is present
|
||||
$po_file = $lang_dir . '/' . self :: TEXT_DOMAIN . '.po';
|
||||
$po_file = "$lang_dir/$domain.po";
|
||||
if (!is_file($po_file)) {
|
||||
Log :: debug(_("PO file not found in lang '%s' directory, ignore it."),
|
||||
Log :: debug(self::_("PO file not found in lang '%s' directory, ignore it."),
|
||||
$lang);
|
||||
continue;
|
||||
}
|
||||
|
@ -585,7 +660,7 @@ class I18n {
|
|||
);
|
||||
if (!is_array($result) || $result[0] != 0) {
|
||||
Log :: error(
|
||||
_("Fail to compile messages from %s PO file as MO file using msgfmt (%s)."),
|
||||
self::_("Fail to compile messages from %s PO file as MO file using msgfmt (%s)."),
|
||||
$lang, $po_file
|
||||
);
|
||||
$error = True;
|
||||
|
@ -593,26 +668,26 @@ class I18n {
|
|||
|
||||
// Compile messages from PO file to JS catalog file
|
||||
$js_catalog = self :: po2json($lang, $po_file);
|
||||
$js_file = self :: $root_path."/$lang.js";
|
||||
$js_file = "$root_path/$lang.js";
|
||||
if(!$fd = fopen($js_file, 'w')) {
|
||||
Log :: error(_("Fail to open %s JS catalog file in write mode (%s)."),
|
||||
Log :: error(self::_("Fail to open %s JS catalog file in write mode (%s)."),
|
||||
$lang, $js_file);
|
||||
$error = True;
|
||||
}
|
||||
elseif (fwrite($fd, sprintf("translations_data = %s;", $js_catalog)) === false) {
|
||||
Log :: error(_("Fail to write %s JS catalog in file (%s)."),
|
||||
Log :: error(self::_("Fail to write %s JS catalog in file (%s)."),
|
||||
$lang, $js_file);
|
||||
$error = True;
|
||||
}
|
||||
else {
|
||||
Log :: info(_("%s JS catalog writed (%s)."), $lang, $js_file);
|
||||
Log :: info(self::_("%s JS catalog writed (%s)."), $lang, $js_file);
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
|
||||
return !$error;
|
||||
}
|
||||
Log :: fatal(_("Fail to open root lang directory (%s)."), App :: root_directory_path());
|
||||
Log :: fatal(self::_("Fail to open root lang directory (%s)."), App :: root_directory_path());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ class SentryIntegration {
|
|||
'id' => isset($auth_user) && $auth_user?$auth_user['uid']:null,
|
||||
'email' => isset($auth_user) && $auth_user?$auth_user['mail']:null,
|
||||
'segment' => isset($auth_user) && $auth_user?$auth_user['type']:null,
|
||||
'ip_address' => $_SERVER['REMOTE_ADDR'],
|
||||
'ip_address' => php_sapi_name()=='cli'?null:$_SERVER['REMOTE_ADDR'],
|
||||
]);
|
||||
});
|
||||
|
||||
|
|
32
src/Tpl.php
32
src/Tpl.php
|
@ -21,6 +21,12 @@ class Tpl {
|
|||
*/
|
||||
public static $smarty_security_policy = null;
|
||||
|
||||
/**
|
||||
* Core Smarty templates directory
|
||||
* @var string
|
||||
*/
|
||||
public static string $core_templates_directory;
|
||||
|
||||
/**
|
||||
* Smarty templates directories path with their priority
|
||||
* @var array<string,int>
|
||||
|
@ -39,6 +45,12 @@ class Tpl {
|
|||
*/
|
||||
public static bool $_debug_ajax;
|
||||
|
||||
/**
|
||||
* Core static directory
|
||||
* @var string|null
|
||||
*/
|
||||
public static $core_static_directory = null;
|
||||
|
||||
/**
|
||||
* Static directories path with their priority
|
||||
* @var array<string,array>
|
||||
|
@ -86,8 +98,8 @@ class Tpl {
|
|||
public static function init($templates_dir=null, $templates_c_dir=null, $debug_ajax=null,
|
||||
$static_root_url=null) {
|
||||
// Handle templates directories
|
||||
$default_templates_directory = realpath(__DIR__."/../templates");
|
||||
self :: register_templates_directory($default_templates_directory);
|
||||
self :: $core_templates_directory = realpath(__DIR__."/../templates");
|
||||
self :: register_templates_directory(self :: $core_templates_directory);
|
||||
if (is_null($templates_dir))
|
||||
$templates_dir = App::get('templates.directory', null, 'string');
|
||||
if ($templates_dir) {
|
||||
|
@ -127,7 +139,7 @@ class Tpl {
|
|||
if (substr($unique_name, -1) == '/')
|
||||
$unique_name = substr($unique_name, 0, -1);
|
||||
}
|
||||
$templates_c_dir = sys_get_temp_dir().str_replace(
|
||||
$templates_c_dir = sys_get_temp_dir().'/'.str_replace(
|
||||
'/', '_', "eesyphp_templates_cache_$unique_name"
|
||||
);
|
||||
if (!is_dir($templates_c_dir) && !mkdir($templates_c_dir)) {
|
||||
|
@ -138,7 +150,7 @@ class Tpl {
|
|||
}
|
||||
}
|
||||
self :: $smarty = new Smarty();
|
||||
self :: $smarty->setTemplateDir($default_templates_directory);
|
||||
self :: $smarty->setTemplateDir(self :: $core_templates_directory);
|
||||
self :: $smarty->setCompileDir($templates_c_dir);
|
||||
self :: $smarty->registerResource('Tpl', new TplSmartyResource());
|
||||
if (is_null($debug_ajax))
|
||||
|
@ -154,8 +166,8 @@ class Tpl {
|
|||
if (substr($static_root_url, -1) != '/')
|
||||
$static_root_url = "$static_root_url/";
|
||||
self :: $static_root_url = $static_root_url;
|
||||
$default_static_directory = realpath(__DIR__."/../static");
|
||||
self :: register_static_directory($default_static_directory, 100);
|
||||
self :: $core_static_directory = realpath(__DIR__."/../static");
|
||||
self :: register_static_directory(self :: $core_static_directory, 100);
|
||||
self :: register_function('static_url', array('EesyPHP\\Tpl', 'smarty_static_url'));
|
||||
|
||||
foreach(App :: get('templates.static_directories', array(), 'array') as $path)
|
||||
|
@ -322,6 +334,10 @@ class Tpl {
|
|||
self :: assign('css', self :: $css_files);
|
||||
self :: assign('js', self :: $js_files);
|
||||
|
||||
// I18n text domains
|
||||
self :: assign('CORE_TEXT_DOMAIN', I18n :: CORE_TEXT_DOMAIN);
|
||||
self :: assign('TEXT_DOMAIN', I18n :: TEXT_DOMAIN);
|
||||
|
||||
// Authenticated user info
|
||||
if (isset($auth_user))
|
||||
self :: assign('auth_user', $auth_user);
|
||||
|
@ -336,7 +352,7 @@ class Tpl {
|
|||
*/
|
||||
public static function display($template, $pagetitle=null, ...$extra_args) {
|
||||
if (!$template) {
|
||||
Log :: fatal(_("No template specified."));
|
||||
Log :: fatal(I18n::_("No template specified."));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -367,7 +383,7 @@ class Tpl {
|
|||
catch (Exception $e) {
|
||||
Log :: exception($e, "Smarty - An exception occured displaying template '$template'");
|
||||
if ($template != 'fatal_error.tpl')
|
||||
Log :: fatal(_("An error occurred while displaying this page."));
|
||||
Log :: fatal(I18n::_("An error occurred while displaying this page."));
|
||||
return;
|
||||
}
|
||||
unset($_SESSION['errors']);
|
||||
|
|
30
src/Url.php
30
src/Url.php
|
@ -138,20 +138,20 @@ class Url {
|
|||
public static function error_page($request=null, $error_code=null) {
|
||||
$http_errors = array(
|
||||
400 => array(
|
||||
'pagetitle' => _("Bad request"),
|
||||
'message' => _("Invalid request."),
|
||||
'pagetitle' => I18n::_("Bad request"),
|
||||
'message' => I18n::_("Invalid request."),
|
||||
),
|
||||
401 => array(
|
||||
'pagetitle' => _("Authentication required"),
|
||||
'message' => _("You have to be authenticated to access to this page."),
|
||||
'pagetitle' => I18n::_("Authentication required"),
|
||||
'message' => I18n::_("You have to be authenticated to access to this page."),
|
||||
),
|
||||
403 => array(
|
||||
'pagetitle' => _("Access denied"),
|
||||
'message' => _("You do not have access to this application. If you think this is an error, please contact support."),
|
||||
'pagetitle' => I18n::_("Access denied"),
|
||||
'message' => I18n::_("You do not have access to this application. If you think this is an error, please contact support."),
|
||||
),
|
||||
404 => array(
|
||||
'pagetitle' => _("Whoops ! Page not found"),
|
||||
'message' => _("The requested page can not be found."),
|
||||
'pagetitle' => I18n::_("Whoops ! Page not found"),
|
||||
'message' => I18n::_("The requested page can not be found."),
|
||||
),
|
||||
);
|
||||
$error_code = ($error_code?intval($error_code):400);
|
||||
|
@ -159,8 +159,8 @@ class Url {
|
|||
$error = $http_errors[intval($error_code)];
|
||||
else
|
||||
$error = array(
|
||||
'pagetitle' => _('Error'),
|
||||
'message' => _('An unknown error occurred. If problem persist, please contact support.'),
|
||||
'pagetitle' => I18n::_('Error'),
|
||||
'message' => I18n::_('An unknown error occurred. If problem persist, please contact support.'),
|
||||
);
|
||||
http_response_code($error_code);
|
||||
|
||||
|
@ -223,7 +223,7 @@ class Url {
|
|||
$current_url = self :: get_current_url();
|
||||
if ($current_url === false) {
|
||||
Log :: fatal(
|
||||
_('Unable to determine the requested page. '.
|
||||
I18n::_('Unable to determine the requested page. '.
|
||||
'If the problem persists, please contact support.')
|
||||
);
|
||||
exit();
|
||||
|
@ -373,7 +373,7 @@ class Url {
|
|||
// Prevent loop
|
||||
if (isset($_SESSION['last_redirect']) && $_SESSION['last_redirect'] == $url)
|
||||
Log :: fatal(
|
||||
_('Unable to determine the requested page (loop detected). '.
|
||||
I18n::_('Unable to determine the requested page (loop detected). '.
|
||||
'If the problem persists, please contact support.'));
|
||||
else
|
||||
$_SESSION['last_redirect'] = $url;
|
||||
|
@ -404,7 +404,7 @@ class Url {
|
|||
Log :: error(
|
||||
"URL handler function %s does not exists !",
|
||||
format_callable($request -> handler));
|
||||
Log :: fatal(_("This request cannot be processed."));
|
||||
Log :: fatal(I18n::_("This request cannot be processed."));
|
||||
}
|
||||
|
||||
if ($request -> api_mode)
|
||||
|
@ -417,7 +417,7 @@ class Url {
|
|||
if (function_exists('force_authentication'))
|
||||
force_authentication();
|
||||
else
|
||||
Log :: fatal(_("Authentication required but force_authentication function is not defined."));
|
||||
Log :: fatal(I18n::_("Authentication required but force_authentication function is not defined."));
|
||||
|
||||
try {
|
||||
call_user_func($request -> handler, $request);
|
||||
|
@ -426,7 +426,7 @@ class Url {
|
|||
Log :: exception(
|
||||
$e, "An exception occured running URL handler function %s()",
|
||||
format_callable($request -> handler));
|
||||
Log :: fatal(_("This request could not be processed correctly."));
|
||||
Log :: fatal(I18n::_("This request could not be processed correctly."));
|
||||
}
|
||||
$sentry_span->finish();
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{extends file='Tpl:empty.tpl'}
|
||||
{block name="content"}
|
||||
<h1 class="center">Oops ...</h1>
|
||||
<h1 class="center">{t domain=$CORE_TEXT_DOMAIN}Oops...{/t}</h1>
|
||||
|
||||
<p class="center">{t}A fatal error has occurred and it is preventing this application from working properly. Please try again later or contact support.{/t}</p>
|
||||
<p class="center">{t domain=$CORE_TEXT_DOMAIN}A fatal error has occurred and it is preventing this application from working properly. Please try again later or contact support.{/t}</p>
|
||||
|
||||
<p class='fatal_error_msg'>{t 1=$fatal_error}Error: %1{/t}</p>
|
||||
<p class='fatal_error_msg'>{t 1=$fatal_error domain=$CORE_TEXT_DOMAIN}Error: %1{/t}</p>
|
||||
|
||||
<div class="center"><a href="javascript:history.back()" class="btn btn-primary"><i class="fa fa-undo"></i> {t}Back{/t}</a></div>
|
||||
<div class="center"><a href="javascript:history.back()" class="btn btn-primary"><i class="fa fa-undo"></i> {t domain=$CORE_TEXT_DOMAIN}Back{/t}</a></div>
|
||||
{/block}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{block name="pagetitle"}{/block}
|
||||
{block name="content"}
|
||||
<div class="jumbotron">
|
||||
<h1 class="display-4">{t}Hello, world!{/t}</h1>
|
||||
<p class="lead">{t escape=off}This is the default page of a new app using EesyPHP framework. Register your own templates directory and create a <em>homepage.tpl</em> file to overwrite it. You could also overwrite the URL handler for the root of the web application.{/t}</p>
|
||||
<h1 class="display-4">{t domain=$CORE_TEXT_DOMAIN}Hello, world!{/t}</h1>
|
||||
<p class="lead">{t escape=off domain=$CORE_TEXT_DOMAIN}This is the default page of a new app using EesyPHP framework. Register your own templates directory and create a <em>homepage.tpl</em> file to overwrite it. You could also overwrite the URL handler for the root of the web application.{/t}</p>
|
||||
</div>
|
||||
{/block}
|
||||
|
|
Loading…
Reference in a new issue