From 66cee0d24df461c852390d127f2fe47d7ac04897 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Tue, 28 Feb 2023 01:15:11 +0100 Subject: [PATCH] Cli: add serve command --- locales/fr_FR.UTF8.js | 2 +- locales/fr_FR.UTF8/LC_MESSAGES/EESYPHP.mo | Bin 11268 -> 12803 bytes locales/fr_FR.UTF8/LC_MESSAGES/EESYPHP.po | 142 +++++++++++++++------- locales/headers.pot | 4 +- locales/messages.pot | 133 +++++++++++++------- locales/php-messages.pot | 129 +++++++++++++------- src/Check.php | 32 +++++ src/Cli.php | 68 ++++++++++- 8 files changed, 371 insertions(+), 139 deletions(-) diff --git a/locales/fr_FR.UTF8.js b/locales/fr_FR.UTF8.js index 74c40b7..912eb85 100644 --- a/locales/fr_FR.UTF8.js +++ b/locales/fr_FR.UTF8.js @@ -1 +1 @@ -translations_data = {"messages":{"The CLI command '%s' already exists.":"La commande CLI '%s' n'existe pas.","The CLI command '%s' handler is not callable !":"La fonction impl\u00e9mentant la commande CLI '%s' n'est pas ex\u00e9cutable !","Usage: %s [-h] [-qd] command\n":"Utilisation: %s [-h] [-qd] commande\n"," -h Show this message\n":" -h Affiche ce message\n"," -q \/ -d Quiet\/Debug mode\n":" -q \/ -d Mode silencieux\/debug\n"," --trace Trace mode (the most verbose)\n":" --trace Mode trace (le plus verbeux)\n"," command Command to run\n":" command La commande \u00e0 ex\u00e9cuter\n","Available commands:\n":"Commandes disponibles:\n","Only one command could be executed !":"Une seul commande peut-\u00eatre ex\u00e9cut\u00e9e !","Invalid parameter \"%s\".\nNote: Command's parameter\/argument must be place after the command.":"Param\u00e8tre \"%s\" invalide.\nNote : Les param\u00e8tres\/arguments de la requ\u00eate doivent \u00eatre plac\u00e9s apr\u00e8s celle-ci.","An exception occured running command %s":"Une exception est survenue en ex\u00e9cutant la commande %s","Unable to connect to the database.":"Impossible de se connecter \u00e0 la base de donn\u00e9es.","<\/hr>

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

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

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

%s: %s<\/small><\/p>","\n%s: %s":"\n%s: %s","No template specified.":"Aucun template sp\u00e9cifi\u00e9.","An error occurred while displaying this page.":"Une erreur est survenue en affichant cette page.","Bad request":"Mauvaise requ\u00eate","Invalid request.":"Requ\u00eate invalide.","Authentication required":"Authentification requise","You have to be authenticated to access to this page.":"Vous devez \u00eatre authentifi\u00e9 pour acc\u00e9der \u00e0 cette page.","Access denied":"Acc\u00e8s interdit","You do not have access to this application. If you think this is an error, please contact support.":"Vous n'avez pas acc\u00e8s \u00e0 cette application. Si vous pensez qu'il s'agit d'une erreur, merci de prendre contact avec le support.","Whoops ! Page not found":"Oups ! Page introuvable","The requested page can not be found.":"La page demand\u00e9e est introuvable.","Error":"Erreur","An unknown error occurred. If problem persist, please contact support.":"Une erreur inconnue est survenue. Si le probl\u00e8me persiste, merci de prendre contact avec le support.","Unable to determine the requested page. If the problem persists, please contact support.":"Impossible de d\u00e9terminer la page demand\u00e9e. Si le probl\u00e8me persiste, merci de prendre contact avec le support.","Unable to determine the requested page (loop detected). If the problem persists, please contact support.":"Impossible de d\u00e9terminer la page demand\u00e9e (boucle d\u00e9tect\u00e9e). Si le probl\u00e8me persiste, merci de prendre contact avec le support.","This request cannot be processed.":"Cette requ\u00eate ne peut \u00eatre trait\u00e9e.","Authentication required but force_authentication function is not defined.":"Authentification requise mais la fonction force_authentication n'est pas d\u00e9finie.","This request could not be processed correctly.":"Cette requ\u00eate n'a put \u00eatre trait\u00e9e correctement.","Hello world !":"Bonjour tout le monde !","Extract messages that need to be translated":"Extraire les messages devant \u00eatre traduit","This command could be used to generate\/update locales\/messages.pot file.":"Cette commande peut-\u00eatre utilis\u00e9e pour g\u00e9n\u00e9rer\/mettre \u00e0 jour le fichier locales\/messages.pot.","Update messages in translation PO lang files":"Mettre \u00e0 jour les messages dans les fichiers de traduction PO existants","This command could be used to init\/update PO files in locales\/*\/LC_MESSAGES directories.":"Cette commande peut-\u00eatre utilis\u00e9e pour initialiser\/mettre \u00e0 jour les fichiers PO dans les dossiers locales\/*\/LC_MESSAGES.","Compile messages from existing translation PO lang files to corresponding MO files and JS catalogs":"Compiler les messages depuis les fichiers PO de traduction existants vers les fichiers MO et les catalogues JS correspondant","This command could be used to compile PO files in locales\/*\/LC_MESSAGES directories to MO files and as JS catalogs in locales directory.":"Cette commande peut-\u00eatre utilis\u00e9e pour compiler les fichiers PO dans les dossiers locales\/*\/LC_MESSAGES and les catalogues JS dans le dossier locales.","Fail to list EesyPHP PHP files.":"Une erreur est survenue en listant les fichiers PHP d'EesyPHP.","Fail to extract messages from EesyPHP PHP files using xgettext.":"Une erreur est survenue en extrayant les messages depuis les fichiers PHP d'EesyPHP en utilisant xgettext.","Fail to list application PHP files.":"Une erreur est survenue en listant les fichiers PHP de l'application.","Fail to extract messages from PHP files using xgettext.":"Impossible d'extraire les messages depuis les fichiers PHP en utilisant xgettext.","Fail to list JS files in the directory of static files '%s'.":"Une erreur est survenue en listant les fichiers JS dans le dossier des fichiers statiques '%s'.","Fail to extract messages from JS files in the directory of static files '%s' using xgettext.":"Une erreur est survenue en extrayant les messages depuis les fichiers JS du dossier des fichiers statiques '%s' en utilisant xgettext.","Fail to extract messages from templates directory '%s' using tsmarty2c.php script.":"Impossible d'extraire les messages depuis le dossier de templates '%s' en utilisant le script tsmarty2c.php.","Fail to merge messages using msgcat.":"Impossible de fusionner les messages en utilisant msgcat.","Compendium file %s not found.":"Fichier compendium %s introuvable.","POT file not found (%s). Please run extract_messages first.":"Fichier POT introuvable (%s). Merci de lancer la commande extract_messages pour commencer.","Lang directory '%s' found":"Dossier de langue '%s' trouv\u00e9","LC_MESSAGES directory not found in lang '%s' directory, ignore it.":"Le dossier LC_MESSAGES est introuvable dans le dossier de langue '%s', on l'ignore.","Fail to init messages in %s PO file using msginit (%s).":"Impossible d'initialiser les messages dans le fichier PO %s en utilisant msginit (%s).","Fail to update messages in %s PO file using msgmerge (%s).":"Impossible de mettre \u00e0 jour les messages dans les fichiers PO %s en utilisant msgmerge (%s).","PO file not found in lang '%s' directory, ignore it.":"Le fichier PO est introuvable dans le dossier de langue '%s', on l'ignore.","Fail to open root lang directory (%s).":"Impossible d'ouvrir le dossier racine des langues (%s).","Lang alias symlink found: %s -> %s":"Lien symbolique d'alias de langue trouv\u00e9 : %s -> %s","JS catalog symlink for %s -> %s created (%s)":"Lien symbolique de catalogue JS pour %s -> %s cr\u00e9\u00e9 (%s)","Fail to create JS catalog symlink for %s -> %s (%s)":"Impossible de cr\u00e9er le lien symbolique de catalogue JS pour %s -> %s (%s)","JS catalog symlink for %s -> %s already exist (%s)":"Le lien symbolique du catalogue JS pour %s -> %s existe d\u00e9j\u00e0 (%s)","JS catalog file for %s already exist, but it's not a symlink to %s (%s)":"Le catalogue JS pour %s existe, mais il ne s'agit par d'un lien symbolique vers %s (%s)","Fail to compile messages from %s PO file as MO file using msgfmt (%s).":"Impossible de compiler les messages depuis le fichier PO %s en tant que fichier MO en utilisant msgfmt (%s).","Fail to open %s JS catalog file in write mode (%s).":"Impossible d'ouvrir le catalogue JS %s en mode \u00e9criture (%s).","Fail to write %s JS catalog in file (%s).":"Impossible d'\u00e9crire le fichier du catalogue JS %s (%s).","%s JS catalog writed (%s).":"Catalogue JS %s cr\u00e9\u00e9 (%s).","Hello world!":"Salut tout le monde !","Confirmation":"Confirmation","Do you confirm?":"Confirmez-vous ?","Cancel":"Annuler","Validate":"Valider","OK":"OK","Question":"Question","Please enter your answer below:":"Merci de saisir vos r\u00e9ponses ci-dessous :","Please wait":"Merci de patienter","Please wait while your request is being processed.":"Merci de patienter pendant le traitement de votre requ\u00eate.","Are you sure?":"\u00cates-vous sure ?","Oops...":"Oups...","A fatal error has occurred and it is preventing this application from working properly. Please try again later or contact support.":"Une erreur fatale est survenue et celle-ci emp\u00eache cette application de fonctionner correctement. Merci de r\u00e9essayer ult\u00e9rieurement ou de prendre contact avec le service support.","Error: %1":"Erreur : %1","Back":"Retour","Hello, world!":"Bonjour tout le monde !","This is the default page of a new app using EesyPHP framework. Register your own templates directory and create a homepage.tpl<\/em> file to overwrite it. You could also overwrite the URL handler for the root of the web application.":"Il s'agit de la page par d\u00e9faut d'une nouvelle application utilisant le framework EesyPHP. Configurez votre propre dossier de templates et cr\u00e9er le fichier homepage.tpl<\/em> pour l'\u00e9craser. Vous pouvez \u00e9galement \u00e9craser le gestionnaire de l'URL racine de l'application web."},"locale":"fr_FR.UTF8","domain":"DEFAULT","plural_expr":"(n > 1)"}; \ No newline at end of file +translations_data = {"messages":{"Create a new project using EesyPHP framework":"Cr\u00e9er un nouveau projet utilisant le framework EesyPHP","This command could be used to easily build the structure of a new project using the EesyPHP framework.":"Cette commande peut-\u00eatre utilis\u00e9e pour construire facilement la structure d'un nouveau projet utilisant le framework EesyPHP.","Start the PHP built-in HTTP server to serve the application":"D\u00e9marrer le service HTTP int\u00e9gr\u00e9 \u00e0 PHP pour servir l'application","This command could be used to start the PHP built-in HTTP server to serve the application.":"Cette commande peut-\u00eatre utilis\u00e9e pour d\u00e9marrer le service HTTP int\u00e9gr\u00e9 \u00e0 PHP pour servir l'application.","The CLI command '%s' already exists.":"La commande CLI '%s' n'existe pas.","The CLI command '%s' handler is not callable !":"La fonction impl\u00e9mentant la commande CLI '%s' n'est pas ex\u00e9cutable !","Usage: %s [-h] [-qd] command\n":"Utilisation: %s [-h] [-qd] commande\n"," -h Show this message\n":" -h Affiche ce message\n"," -q \/ -d Quiet\/Debug mode\n":" -q \/ -d Mode silencieux\/debug\n"," --trace Trace mode (the most verbose)\n":" --trace Mode trace (le plus verbeux)\n"," command Command to run\n":" command La commande \u00e0 ex\u00e9cuter\n","Available commands:\n":"Commandes disponibles:\n","Only one command could be executed !":"Une seul commande peut-\u00eatre ex\u00e9cut\u00e9e !","Invalid parameter \"%s\".\nNote: Command's parameter\/argument must be place after the command.":"Param\u00e8tre \"%s\" invalide.\nNote : Les param\u00e8tres\/arguments de la requ\u00eate doivent \u00eatre plac\u00e9s apr\u00e8s celle-ci.","An exception occured running command %s":"Une exception est survenue en ex\u00e9cutant la commande %s","This command only accept one argument: the listen address in format \"host:port\" or \":port\" (= 0.0.0.0:port).":"Cette commande n'accepte qu'un seul param\u00e8tre : l'adresse d'\u00e9coute au format \"h\u00f4te:port\" ou \":port\" (= 0.0.0.0:port).","Invalid listen address specify. Must be in formart host:port (or :port).":"Adresse d'\u00e9coute sp\u00e9cifi\u00e9e invalide. Elle doit \u00eatre au format h\u00f4te:port (ou :port).","Invalid listen host specified. Must be an IPv4 or IPv6 address.":"H\u00f4te d'\u00e9coute sp\u00e9cifi\u00e9 invalide. Il doit s'agir d'une adresse IPv4 ou IPv6.","Invalid listen port specified. Must be a positive integer between 1 and 65535.":"Port d'\u00e9coute sp\u00e9cifi\u00e9 invalide. Il doit s'agir d'un entier positif entre 1 et 65535.","Unable to connect to the database.":"Impossible de se connecter \u00e0 la base de donn\u00e9es.","Invalid username or password.":"Nom d'utilisateur ou mot de passe invalide.","Sign in":"Connexion","Authentication required":"Authentification requise","Access denied":"Acc\u00e8s interdit","You must login to access this page.":"Vous devez vous connecter pour acc\u00e9der \u00e0 cette page.","<\/hr>

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

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

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

%s: %s<\/small><\/p>","\n%s: %s":"\n%s: %s","No template specified.":"Aucun template sp\u00e9cifi\u00e9.","An error occurred while displaying this page.":"Une erreur est survenue en affichant cette page.","Bad request":"Mauvaise requ\u00eate","Invalid request.":"Requ\u00eate invalide.","You have to be authenticated to access to this page.":"Vous devez \u00eatre authentifi\u00e9 pour acc\u00e9der \u00e0 cette page.","You do not have access to this application. If you think this is an error, please contact support.":"Vous n'avez pas acc\u00e8s \u00e0 cette application. Si vous pensez qu'il s'agit d'une erreur, merci de prendre contact avec le support.","Whoops ! Page not found":"Oups ! Page introuvable","The requested page can not be found.":"La page demand\u00e9e est introuvable.","Error":"Erreur","An unknown error occurred. If problem persist, please contact support.":"Une erreur inconnue est survenue. Si le probl\u00e8me persiste, merci de prendre contact avec le support.","Unable to determine the requested page. If the problem persists, please contact support.":"Impossible de d\u00e9terminer la page demand\u00e9e. Si le probl\u00e8me persiste, merci de prendre contact avec le support.","Unable to determine the requested page (loop detected). If the problem persists, please contact support.":"Impossible de d\u00e9terminer la page demand\u00e9e (boucle d\u00e9tect\u00e9e). Si le probl\u00e8me persiste, merci de prendre contact avec le support.","This request cannot be processed.":"Cette requ\u00eate ne peut \u00eatre trait\u00e9e.","Authentication required but fail to authenticate you.":"Authentification requise mais impossible pour vous authentifier.","This request could not be processed correctly.":"Cette requ\u00eate n'a put \u00eatre trait\u00e9e correctement.","Hello world !":"Bonjour tout le monde !","Extract messages that need to be translated":"Extraire les messages devant \u00eatre traduit","This command could be used to generate\/update locales\/messages.pot file.":"Cette commande peut-\u00eatre utilis\u00e9e pour g\u00e9n\u00e9rer\/mettre \u00e0 jour le fichier locales\/messages.pot.","Update messages in translation PO lang files":"Mettre \u00e0 jour les messages dans les fichiers de traduction PO existants","This command could be used to init\/update PO files in locales\/*\/LC_MESSAGES directories.":"Cette commande peut-\u00eatre utilis\u00e9e pour initialiser\/mettre \u00e0 jour les fichiers PO dans les dossiers locales\/*\/LC_MESSAGES.","Compile messages from existing translation PO lang files to corresponding MO files and JS catalogs":"Compiler les messages depuis les fichiers PO de traduction existants vers les fichiers MO et les catalogues JS correspondant","This command could be used to compile PO files in locales\/*\/LC_MESSAGES directories to MO files and as JS catalogs in locales directory.":"Cette commande peut-\u00eatre utilis\u00e9e pour compiler les fichiers PO dans les dossiers locales\/*\/LC_MESSAGES and les catalogues JS dans le dossier locales.","Fail to list EesyPHP PHP files.":"Une erreur est survenue en listant les fichiers PHP d'EesyPHP.","Fail to extract messages from EesyPHP PHP files using xgettext.":"Une erreur est survenue en extrayant les messages depuis les fichiers PHP d'EesyPHP en utilisant xgettext.","Fail to list application PHP files.":"Une erreur est survenue en listant les fichiers PHP de l'application.","Fail to extract messages from PHP files using xgettext.":"Impossible d'extraire les messages depuis les fichiers PHP en utilisant xgettext.","Fail to list JS files in the directory of static files '%s'.":"Une erreur est survenue en listant les fichiers JS dans le dossier des fichiers statiques '%s'.","Fail to extract messages from JS files in the directory of static files '%s' using xgettext.":"Une erreur est survenue en extrayant les messages depuis les fichiers JS du dossier des fichiers statiques '%s' en utilisant xgettext.","Fail to extract messages from templates directory '%s' using tsmarty2c.php script.":"Impossible d'extraire les messages depuis le dossier de templates '%s' en utilisant le script tsmarty2c.php.","Fail to merge messages using msgcat.":"Impossible de fusionner les messages en utilisant msgcat.","Compendium file %s not found.":"Fichier compendium %s introuvable.","POT file not found (%s). Please run extract_messages first.":"Fichier POT introuvable (%s). Merci de lancer la commande extract_messages pour commencer.","Lang directory '%s' found":"Dossier de langue '%s' trouv\u00e9","LC_MESSAGES directory not found in lang '%s' directory, ignore it.":"Le dossier LC_MESSAGES est introuvable dans le dossier de langue '%s', on l'ignore.","Fail to init messages in %s PO file using msginit (%s).":"Impossible d'initialiser les messages dans le fichier PO %s en utilisant msginit (%s).","Fail to update messages in %s PO file using msgmerge (%s).":"Impossible de mettre \u00e0 jour les messages dans les fichiers PO %s en utilisant msgmerge (%s).","PO file not found in lang '%s' directory, ignore it.":"Le fichier PO est introuvable dans le dossier de langue '%s', on l'ignore.","Fail to open root lang directory (%s).":"Impossible d'ouvrir le dossier racine des langues (%s).","Lang alias symlink found: %s -> %s":"Lien symbolique d'alias de langue trouv\u00e9 : %s -> %s","JS catalog symlink for %s -> %s created (%s)":"Lien symbolique de catalogue JS pour %s -> %s cr\u00e9\u00e9 (%s)","Fail to create JS catalog symlink for %s -> %s (%s)":"Impossible de cr\u00e9er le lien symbolique de catalogue JS pour %s -> %s (%s)","JS catalog symlink for %s -> %s already exist (%s)":"Le lien symbolique du catalogue JS pour %s -> %s existe d\u00e9j\u00e0 (%s)","JS catalog file for %s already exist, but it's not a symlink to %s (%s)":"Le catalogue JS pour %s existe, mais il ne s'agit par d'un lien symbolique vers %s (%s)","Fail to compile messages from %s PO file as MO file using msgfmt (%s).":"Impossible de compiler les messages depuis le fichier PO %s en tant que fichier MO en utilisant msgfmt (%s).","Fail to open %s JS catalog file in write mode (%s).":"Impossible d'ouvrir le catalogue JS %s en mode \u00e9criture (%s).","Fail to write %s JS catalog in file (%s).":"Impossible d'\u00e9crire le fichier du catalogue JS %s (%s).","%s JS catalog writed (%s).":"Catalogue JS %s cr\u00e9\u00e9 (%s).","Hello world!":"Salut tout le monde !","Disconnected":"D\u00e9connect\u00e9","You are now disconnected.":"Vous \u00eates maintenant d\u00e9connect\u00e9.","Confirmation":"Confirmation","Do you confirm?":"Confirmez-vous ?","Cancel":"Annuler","Validate":"Valider","OK":"OK","Question":"Question","Please enter your answer below:":"Merci de saisir vos r\u00e9ponses ci-dessous :","Please wait":"Merci de patienter","Please wait while your request is being processed.":"Merci de patienter pendant le traitement de votre requ\u00eate.","Are you sure?":"\u00cates-vous sure ?","Oops...":"Oups...","A fatal error has occurred and it is preventing this application from working properly. Please try again later or contact support.":"Une erreur fatale est survenue et celle-ci emp\u00eache cette application de fonctionner correctement. Merci de r\u00e9essayer ult\u00e9rieurement ou de prendre contact avec le service support.","Error: %1":"Erreur : %1","Back":"Retour","Hello, world!":"Bonjour tout le monde !","This is the default page of a new app using EesyPHP framework. Register your own templates directory and create a homepage.tpl<\/em> file to overwrite it. You could also overwrite the URL handler for the root of the web application.":"Il s'agit de la page par d\u00e9faut d'une nouvelle application utilisant le framework EesyPHP. Configurez votre propre dossier de templates et cr\u00e9er le fichier homepage.tpl<\/em> pour l'\u00e9craser. Vous pouvez \u00e9galement \u00e9craser le gestionnaire de l'URL racine de l'application web.","Sign out":"D\u00e9connexion","Username":"Nom d'utilisateur","Password":"Mot de passe","Submit":"Envoyer","Logout":"D\u00e9connexion","Connection":"Connexion","Authentication required but force_authentication function is not defined.":"Authentification requise mais la fonction force_authentication n'est pas d\u00e9finie."},"locale":"fr_FR.UTF8","domain":"EESYPHP","plural_expr":"(n > 1)"}; \ No newline at end of file diff --git a/locales/fr_FR.UTF8/LC_MESSAGES/EESYPHP.mo b/locales/fr_FR.UTF8/LC_MESSAGES/EESYPHP.mo index f14d14cef44eef2f0020edc44529143de0988bd0..bfb904ef16f4b2956958fd82dbc2cbdd071b876f 100644 GIT binary patch delta 3414 zcmbu=TWl0n7{KuZ1*}E6xT2s)59P94mvU*5O1TK73o5pXQU%57?r9m^?yPeupvDCu zMtwpzfQg!DR6#?% zSKu66glkad-Hi|8vv@I1u2O2YQbje7PLdOM;VOI><${m!a{L18@K3xHXAW0t2rfhZ zR1-fEYb#11ZPRMqHc1+K(q#*1(s?!;Mm1h2(!um&ez!upS+(@f_wv~VzP zLy7o4l$<|<3-BObgI^%&R^t-U8`mJKtFFa)xEAH#ccR??Xgq!#<^Cs8Qg$N2`pbj9 z?T!8PRlNBgNKAnDT%-QO5gFit0I(iH@M;_-&klAD}G# zAGiiLX{EN{i}($Vu5FB`;Enh|JpK?1jFVH9qHfg_I1^vO^|Jp@&{@HWImsvh z4{v6C2qo8prbS=6dXz8QEjSnpC^_~}miB3sm3RTAIDbP~$?LdCR;&#rfL(YE?!!u+ zuRfu3A%2c>!?(B+|3H~|A$PM#YALS5_ITWbPcZIBnaA*2?f5N9Zqu`<7knSL;ey$` z0L6L;d1rN$EmE9M=T|ziZzs*+tA@9tEZOIn#_Op-R$1*uDWL=WR zqvrBu!^f~5`;q5{X>Gwu+HhJ%;+8k%KDC-wJ|xdoD299O)m{;-X2+=EIzjpo8!JPN!Cr?K=N5W)|Wddc`6_5xbUdpcXZrujg|D=6!)dd z<&a{$CG157%#IGzycTbuNsY~yyvb6rJHq11Vl_?jJeekk6pd7@I7S z+!g*t`Il}JZ3B%|hu?e%4@xThUW~*$X+>%$%sqtv^N|8vDg%z|X?3(Uv_{%uT9U?& ziV73?G7lUh;@-M}GtrKsjKUouwQwCx)A;TwOEPyGoy%x)uwzJkRaNP5<%Hf-7p$zf zbcJgy-)Kwc%~oA-oh>Hgm)=c`?QI<1Us252o^SHn%4S{TdD<(OjNP$4rEds4U$+}= z=XHnUc3G~kH#?r+P;lr?b6g$vrl-{Ee7BXevpSwgE{bQdP4@IWR$i}e>0Y3@6YI+l zY&mCw@BvX6XHTFDj%WLJx5VU|PU8}uzts@@Ty5pEy1uS%eqHLdk-rXZ@FiS-v(YW- z7Tq4$Ie#|qkzTj1MSI5W=2qW{df`=8p^&pPmTx=x-k(QL8`Nwp&(3WR@63i*c)lBC z{J=HZ={S2Ob>P|g&hVlp<87A*cDPoT+3L7=mzE@SX-wjgQd44F(fjW~rPR93wx=^r zSC_n~lP5MSlQ9LKKACkpgD#Wz8^S35k7>t9zTq?-^QL9#)Le*<@c&#tA4fuRzc4u(^{Q zg=JwMQMYCHJruc$?FTR(PZA1PB=0$wu delta 2078 zcmX}sTTE0}6vpv27e){YItZdx5vzkDC@83aRf;+&m)e4IH|PWsTZ}OpqYvoVg14rr zsRUY0BOrHDA5Q1-^|gSS@YX_=FFVE*IxT{ zxA!!LANsw0Mr$QLB;L5q!Z;eo8*OBQSr*<$UiO-|9Q4GS&B8@E6Kik=cH(qAip6*y z^}nO|HICy4*p*zM6O~8 zhcF2XxJa(T6s$t6tpyXb)NOPY@HdsaK`_lw&H)(4PM|PobHc}H{dbGJ8?a}^ppQaI%TP5Pw^D0*bcMN`r!rCO77uy z97kOrN{g-dIw~ViP!smCOqqhJoeWe4@-c*!ScsQUTl9B2`OkFmL$0332Z4;(imGt| z<4vdx97IiI0Cn9hR8>F5kI~CrG%m+qunpN2OXDcy<2+RD)ME#Jha|_Ihw1Pi=Hu*? zVJ2$kTT!XpkGe37O7-`siJZbN{2f&@#oS#6kzKSp)bHC-Ti1y>xDR*Wd91{63i#+dy@^}!6|TT~_Eifzf$WxD zh>gQ`gU&8KxQo<<1zFxgY{CXSjBD@#7GoA0SBEXAy}W|V(f&b_X&x%ijk8c&n1#w* z6>7zG*o*_1r1L*cN2&3#v6?^umf~7eF&#plNp>8S;$GAro<-(l7cq!~&e$K|;l#KI zLpX$8Sdh>^x7hBl~kc&js#p&*&_{xlFeQ8&DY;#r0Uj?3knVqiW$gY67=WDZPs< z-u}ZwIGOa7;7MGDw~_l=6Tu}`K&&Hl&#;d-t*VINe(zh5o}OA1a`cF;biP^RSb;jC zTFJYX=X7RcC80V{acdIVG8P_fs)t;Hb!+{xGq0l4DyXYy!BN=Jwt;tLLCs5OkJWfo zSPh|SSJT!lCbT7LJSw71nOjS!mQ+{eL@l9Ks{6On(c@Pwj_^c#vGd&M^u;GmU)B4W z)8{!7J>RRHvCh1j3d~Jt8_Ec^>KM`I#b){{UTY^>h>aT1w4bVSYUzE8r&mQJ659WF zZ4;dYLbaeak@%F*X;9N~R7;K=i2uS9NlhB`M6OMG\n" "Language-Team: \n" @@ -12,46 +12,70 @@ msgstr "" "X-Generator: Poedit 2.4.2\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: Cli.php:34 +#: Cli.php:44 +msgid "Create a new project using EesyPHP framework" +msgstr "Créer un nouveau projet utilisant le framework EesyPHP" + +#: Cli.php:47 +msgid "" +"This command could be used to easily build the structure of a new project " +"using the EesyPHP framework." +msgstr "" +"Cette commande peut-être utilisée pour construire facilement la structure " +"d'un nouveau projet utilisant le framework EesyPHP." + +#: Cli.php:55 +msgid "Start the PHP built-in HTTP server to serve the application" +msgstr "Démarrer le service HTTP intégré à PHP pour servir l'application" + +#: Cli.php:58 +msgid "" +"This command could be used to start the PHP built-in HTTP server to serve " +"the application." +msgstr "" +"Cette commande peut-être utilisée pour démarrer le service HTTP intégré à " +"PHP pour servir l'application." + +#: Cli.php:89 #, php-format msgid "The CLI command '%s' already exists." msgstr "La commande CLI '%s' n'existe pas." -#: Cli.php:39 +#: Cli.php:94 #, 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 +#: Cli.php:126 #, php-format msgid "Usage: %s [-h] [-qd] command\n" msgstr "Utilisation: %s [-h] [-qd] commande\n" -#: Cli.php:72 +#: Cli.php:127 msgid " -h Show this message\n" msgstr " -h Affiche ce message\n" -#: Cli.php:73 +#: Cli.php:128 msgid " -q / -d Quiet/Debug mode\n" msgstr " -q / -d Mode silencieux/debug\n" -#: Cli.php:74 +#: Cli.php:129 msgid " --trace Trace mode (the most verbose)\n" msgstr " --trace Mode trace (le plus verbeux)\n" -#: Cli.php:75 +#: Cli.php:130 msgid " command Command to run\n" msgstr " command La commande à exécuter\n" -#: Cli.php:77 +#: Cli.php:132 msgid "Available commands:\n" msgstr "Commandes disponibles:\n" -#: Cli.php:125 +#: Cli.php:182 msgid "Only one command could be executed !" msgstr "Une seul commande peut-être exécutée !" -#: Cli.php:153 +#: Cli.php:210 #, php-format msgid "" "Invalid parameter \"%s\".\n" @@ -61,20 +85,48 @@ msgstr "" "Note : Les paramètres/arguments de la requête doivent être placés après " "celle-ci." -#: Cli.php:178 +#: Cli.php:235 #, php-format msgid "An exception occured running command %s" msgstr "Une exception est survenue en exécutant la commande %s" +#: Cli.php:296 +msgid "" +"This command only accept one argument: the listen address in format \"host:" +"port\" or \":port\" (= 0.0.0.0:port)." +msgstr "" +"Cette commande n'accepte qu'un seul paramètre : l'adresse d'écoute au format " +"\"hôte:port\" ou \":port\" (= 0.0.0.0:port)." + +#: Cli.php:307 +msgid "" +"Invalid listen address specify. Must be in formart host:port (or :port)." +msgstr "" +"Adresse d'écoute spécifiée invalide. Elle doit être au format hôte:port (ou :" +"port)." + +#: Cli.php:317 +msgid "Invalid listen host specified. Must be an IPv4 or IPv6 address." +msgstr "" +"Hôte d'écoute spécifié invalide. Il doit s'agir d'une adresse IPv4 ou IPv6." + +#: Cli.php:324 +msgid "" +"Invalid listen port specified. Must be a positive integer between 1 and " +"65535." +msgstr "" +"Port d'écoute spécifié invalide. Il doit s'agir d'un entier positif entre 1 " +"et 65535." + #: Db.php:74 msgid "Unable to connect to the database." msgstr "Impossible de se connecter à la base de données." -#: Auth/Form.php:32 +#: Auth/Form.php:33 msgid "Invalid username or password." msgstr "Nom d'utilisateur ou mot de passe invalide." -#: Auth/Form.php:64 +#: Auth/Form.php:65 msgid "Sign in" msgstr "Connexion" @@ -122,11 +174,11 @@ msgstr "" "\n" "%s: %s" -#: Tpl.php:394 +#: Tpl.php:405 msgid "No template specified." msgstr "Aucun template spécifié." -#: Tpl.php:425 +#: Tpl.php:438 msgid "An error occurred while displaying this page." msgstr "Une erreur est survenue en affichant cette page." @@ -196,7 +248,7 @@ msgstr "Authentification requise mais impossible pour vous authentifier." msgid "This request could not be processed correctly." msgstr "Cette requête n'a put être traitée correctement." -#: I18n.php:122 App.php:124 +#: I18n.php:122 App.php:181 msgid "Hello world !" msgstr "Bonjour tout le monde !" @@ -240,34 +292,34 @@ 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:341 +#: I18n.php:340 msgid "Fail to list EesyPHP PHP files." msgstr "Une erreur est survenue en listant les fichiers PHP d'EesyPHP." -#: I18n.php:361 +#: I18n.php:360 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:378 +#: I18n.php:377 msgid "Fail to list application PHP files." msgstr "Une erreur est survenue en listant les fichiers PHP de l'application." -#: I18n.php:398 +#: I18n.php:397 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:414 +#: I18n.php:413 #, 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:436 +#: I18n.php:435 #, php-format msgid "" "Fail to extract messages from JS files in the directory of static files '%s' " @@ -276,7 +328,7 @@ msgstr "" "Une erreur est survenue en extrayant les messages depuis les fichiers JS du " "dossier des fichiers statiques '%s' en utilisant xgettext." -#: I18n.php:458 +#: I18n.php:457 #, php-format msgid "" "Fail to extract messages from templates directory '%s' using tsmarty2c.php " @@ -285,118 +337,118 @@ msgstr "" "Impossible d'extraire les messages depuis le dossier de templates '%s' en " "utilisant le script tsmarty2c.php." -#: I18n.php:494 +#: I18n.php:493 msgid "Fail to merge messages using msgcat." msgstr "Impossible de fusionner les messages en utilisant msgcat." -#: I18n.php:511 +#: I18n.php:507 #, php-format msgid "Compendium file %s not found." msgstr "Fichier compendium %s introuvable." -#: I18n.php:522 +#: I18n.php:518 #, 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:534 I18n.php:645 +#: I18n.php:530 I18n.php:640 #, php-format msgid "Lang directory '%s' found" msgstr "Dossier de langue '%s' trouvé" -#: I18n.php:540 I18n.php:651 +#: I18n.php:536 I18n.php:646 #, 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:555 +#: I18n.php:551 #, 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:573 +#: I18n.php:569 #, 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:579 I18n.php:659 +#: I18n.php:575 I18n.php:654 #, 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:586 I18n.php:699 +#: I18n.php:582 I18n.php:694 #, php-format msgid "Fail to open root lang directory (%s)." msgstr "Impossible d'ouvrir le dossier racine des langues (%s)." -#: I18n.php:615 +#: I18n.php:610 #, php-format msgid "Lang alias symlink found: %s -> %s" msgstr "Lien symbolique d'alias de langue trouvé : %s -> %s" -#: I18n.php:622 +#: I18n.php:617 #, php-format msgid "JS catalog symlink for %s -> %s created (%s)" msgstr "Lien symbolique de catalogue JS pour %s -> %s créé (%s)" -#: I18n.php:626 +#: I18n.php:621 #, 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:632 +#: I18n.php:627 #, 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:637 +#: I18n.php:632 #, 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:672 +#: I18n.php:667 #, 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:682 +#: I18n.php:677 #, 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:687 +#: I18n.php:682 #, 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:692 +#: I18n.php:687 #, php-format msgid "%s JS catalog writed (%s)." msgstr "Catalogue JS %s créé (%s)." -#: App.php:126 +#: App.php:183 msgid "Hello world!" msgstr "Salut tout le monde !" -#: App.php:137 +#: App.php:194 msgid "Disconnected" msgstr "Déconnecté" -#: App.php:139 +#: App.php:196 msgid "You are now disconnected." msgstr "Vous êtes maintenant déconnecté." diff --git a/locales/headers.pot b/locales/headers.pot index fd294eb..496c405 100644 --- a/locales/headers.pot +++ b/locales/headers.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" -"POT-Creation-Date: 2023-02-25 17:17+0100\n" -"PO-Revision-Date: 2023-02-25 17:17+0100\n" +"POT-Creation-Date: 2023-02-28 01:28+0100\n" +"PO-Revision-Date: 2023-02-28 01:28+0100\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" \ No newline at end of file diff --git a/locales/messages.pot b/locales/messages.pot index 4e36062..019ea78 100644 --- a/locales/messages.pot +++ b/locales/messages.pot @@ -1,71 +1,112 @@ msgid "" msgstr "" -"POT-Creation-Date: 2023-02-25 17:17+0100\n" -"PO-Revision-Date: 2023-02-25 17:17+0100\n" +"POT-Creation-Date: 2023-02-28 01:28+0100\n" +"PO-Revision-Date: 2023-02-28 01:28+0100\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: Cli.php:34 +#: Cli.php:44 +msgid "Create a new project using EesyPHP framework" +msgstr "" + +#: Cli.php:47 +msgid "" +"This command could be used to easily build the structure of a new project " +"using the EesyPHP framework." +msgstr "" + +#: Cli.php:55 +msgid "Start the PHP built-in HTTP server to serve the application" +msgstr "" + +#: Cli.php:58 +msgid "" +"This command could be used to start the PHP built-in HTTP server to serve " +"the application." +msgstr "" + +#: Cli.php:89 #, php-format msgid "The CLI command '%s' already exists." msgstr "" -#: Cli.php:39 +#: Cli.php:94 #, php-format msgid "The CLI command '%s' handler is not callable !" msgstr "" -#: Cli.php:71 +#: Cli.php:126 #, php-format msgid "Usage: %s [-h] [-qd] command\n" msgstr "" -#: Cli.php:72 +#: Cli.php:127 msgid " -h Show this message\n" msgstr "" -#: Cli.php:73 +#: Cli.php:128 msgid " -q / -d Quiet/Debug mode\n" msgstr "" -#: Cli.php:74 +#: Cli.php:129 msgid " --trace Trace mode (the most verbose)\n" msgstr "" -#: Cli.php:75 +#: Cli.php:130 msgid " command Command to run\n" msgstr "" -#: Cli.php:77 +#: Cli.php:132 msgid "Available commands:\n" msgstr "" -#: Cli.php:125 +#: Cli.php:182 msgid "Only one command could be executed !" msgstr "" -#: Cli.php:153 +#: Cli.php:210 #, php-format msgid "" "Invalid parameter \"%s\".\n" "Note: Command's parameter/argument must be place after the command." msgstr "" -#: Cli.php:178 +#: Cli.php:235 #, php-format msgid "An exception occured running command %s" msgstr "" +#: Cli.php:296 +msgid "" +"This command only accept one argument: the listen address in format \"host:" +"port\" or \":port\" (= 0.0.0.0:port)." +msgstr "" + +#: Cli.php:307 +msgid "" +"Invalid listen address specify. Must be in formart host:port (or :port)." +msgstr "" + +#: Cli.php:317 +msgid "Invalid listen host specified. Must be an IPv4 or IPv6 address." +msgstr "" + +#: Cli.php:324 +msgid "" +"Invalid listen port specified. Must be a positive integer between 1 and " +"65535." +msgstr "" + #: Db.php:74 msgid "Unable to connect to the database." msgstr "" -#: Auth/Form.php:32 +#: Auth/Form.php:33 msgid "Invalid username or password." msgstr "" -#: Auth/Form.php:64 +#: Auth/Form.php:65 msgid "Sign in" msgstr "" @@ -107,11 +148,11 @@ msgid "" "%s: %s" msgstr "" -#: Tpl.php:394 +#: Tpl.php:405 msgid "No template specified." msgstr "" -#: Tpl.php:425 +#: Tpl.php:438 msgid "An error occurred while displaying this page." msgstr "" @@ -173,7 +214,7 @@ msgstr "" msgid "This request could not be processed correctly." msgstr "" -#: I18n.php:122 App.php:124 +#: I18n.php:122 App.php:181 msgid "Hello world !" msgstr "" @@ -208,139 +249,139 @@ msgid "" "directories to MO files and as JS catalogs in locales directory." msgstr "" -#: I18n.php:341 +#: I18n.php:340 msgid "Fail to list EesyPHP PHP files." msgstr "" -#: I18n.php:361 +#: I18n.php:360 msgid "Fail to extract messages from EesyPHP PHP files using xgettext." msgstr "" -#: I18n.php:378 +#: I18n.php:377 msgid "Fail to list application PHP files." msgstr "" -#: I18n.php:398 +#: I18n.php:397 msgid "Fail to extract messages from PHP files using xgettext." msgstr "" -#: I18n.php:414 +#: I18n.php:413 #, php-format msgid "Fail to list JS files in the directory of static files '%s'." msgstr "" -#: I18n.php:436 +#: I18n.php:435 #, php-format msgid "" "Fail to extract messages from JS files in the directory of static files '%s' " "using xgettext." msgstr "" -#: I18n.php:458 +#: I18n.php:457 #, php-format msgid "" "Fail to extract messages from templates directory '%s' using tsmarty2c.php " "script." msgstr "" -#: I18n.php:494 +#: I18n.php:493 msgid "Fail to merge messages using msgcat." msgstr "" -#: I18n.php:511 +#: I18n.php:507 #, php-format msgid "Compendium file %s not found." msgstr "" -#: I18n.php:522 +#: I18n.php:518 #, php-format msgid "POT file not found (%s). Please run extract_messages first." msgstr "" -#: I18n.php:534 I18n.php:645 +#: I18n.php:530 I18n.php:640 #, php-format msgid "Lang directory '%s' found" msgstr "" -#: I18n.php:540 I18n.php:651 +#: I18n.php:536 I18n.php:646 #, php-format msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it." msgstr "" -#: I18n.php:555 +#: I18n.php:551 #, php-format msgid "Fail to init messages in %s PO file using msginit (%s)." msgstr "" -#: I18n.php:573 +#: I18n.php:569 #, php-format msgid "Fail to update messages in %s PO file using msgmerge (%s)." msgstr "" -#: I18n.php:579 I18n.php:659 +#: I18n.php:575 I18n.php:654 #, php-format msgid "PO file not found in lang '%s' directory, ignore it." msgstr "" -#: I18n.php:586 I18n.php:699 +#: I18n.php:582 I18n.php:694 #, php-format msgid "Fail to open root lang directory (%s)." msgstr "" -#: I18n.php:615 +#: I18n.php:610 #, php-format msgid "Lang alias symlink found: %s -> %s" msgstr "" -#: I18n.php:622 +#: I18n.php:617 #, php-format msgid "JS catalog symlink for %s -> %s created (%s)" msgstr "" -#: I18n.php:626 +#: I18n.php:621 #, php-format msgid "Fail to create JS catalog symlink for %s -> %s (%s)" msgstr "" -#: I18n.php:632 +#: I18n.php:627 #, php-format msgid "JS catalog symlink for %s -> %s already exist (%s)" msgstr "" -#: I18n.php:637 +#: I18n.php:632 #, php-format msgid "JS catalog file for %s already exist, but it's not a symlink to %s (%s)" msgstr "" -#: I18n.php:672 +#: I18n.php:667 #, php-format msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)." msgstr "" -#: I18n.php:682 +#: I18n.php:677 #, php-format msgid "Fail to open %s JS catalog file in write mode (%s)." msgstr "" -#: I18n.php:687 +#: I18n.php:682 #, php-format msgid "Fail to write %s JS catalog in file (%s)." msgstr "" -#: I18n.php:692 +#: I18n.php:687 #, php-format msgid "%s JS catalog writed (%s)." msgstr "" -#: App.php:126 +#: App.php:183 msgid "Hello world!" msgstr "" -#: App.php:137 +#: App.php:194 msgid "Disconnected" msgstr "" -#: App.php:139 +#: App.php:196 msgid "You are now disconnected." msgstr "" diff --git a/locales/php-messages.pot b/locales/php-messages.pot index 1d3e629..5a93686 100644 --- a/locales/php-messages.pot +++ b/locales/php-messages.pot @@ -1,63 +1,104 @@ -#: Cli.php:34 +#: Cli.php:44 +msgid "Create a new project using EesyPHP framework" +msgstr "" + +#: Cli.php:47 +msgid "" +"This command could be used to easily build the structure of a new project " +"using the EesyPHP framework." +msgstr "" + +#: Cli.php:55 +msgid "Start the PHP built-in HTTP server to serve the application" +msgstr "" + +#: Cli.php:58 +msgid "" +"This command could be used to start the PHP built-in HTTP server to serve " +"the application." +msgstr "" + +#: Cli.php:89 #, php-format msgid "The CLI command '%s' already exists." msgstr "" -#: Cli.php:39 +#: Cli.php:94 #, php-format msgid "The CLI command '%s' handler is not callable !" msgstr "" -#: Cli.php:71 +#: Cli.php:126 #, php-format msgid "Usage: %s [-h] [-qd] command\n" msgstr "" -#: Cli.php:72 +#: Cli.php:127 msgid " -h Show this message\n" msgstr "" -#: Cli.php:73 +#: Cli.php:128 msgid " -q / -d Quiet/Debug mode\n" msgstr "" -#: Cli.php:74 +#: Cli.php:129 msgid " --trace Trace mode (the most verbose)\n" msgstr "" -#: Cli.php:75 +#: Cli.php:130 msgid " command Command to run\n" msgstr "" -#: Cli.php:77 +#: Cli.php:132 msgid "Available commands:\n" msgstr "" -#: Cli.php:125 +#: Cli.php:182 msgid "Only one command could be executed !" msgstr "" -#: Cli.php:153 +#: Cli.php:210 #, php-format msgid "" "Invalid parameter \"%s\".\n" "Note: Command's parameter/argument must be place after the command." msgstr "" -#: Cli.php:178 +#: Cli.php:235 #, php-format msgid "An exception occured running command %s" msgstr "" +#: Cli.php:296 +msgid "" +"This command only accept one argument: the listen address in format \"host:" +"port\" or \":port\" (= 0.0.0.0:port)." +msgstr "" + +#: Cli.php:307 +msgid "" +"Invalid listen address specify. Must be in formart host:port (or :port)." +msgstr "" + +#: Cli.php:317 +msgid "Invalid listen host specified. Must be an IPv4 or IPv6 address." +msgstr "" + +#: Cli.php:324 +msgid "" +"Invalid listen port specified. Must be a positive integer between 1 and " +"65535." +msgstr "" + #: Db.php:74 msgid "Unable to connect to the database." msgstr "" -#: Auth/Form.php:32 +#: Auth/Form.php:33 msgid "Invalid username or password." msgstr "" -#: Auth/Form.php:64 +#: Auth/Form.php:65 msgid "Sign in" msgstr "" @@ -99,11 +140,11 @@ msgid "" "%s: %s" msgstr "" -#: Tpl.php:394 +#: Tpl.php:405 msgid "No template specified." msgstr "" -#: Tpl.php:425 +#: Tpl.php:438 msgid "An error occurred while displaying this page." msgstr "" @@ -165,7 +206,7 @@ msgstr "" msgid "This request could not be processed correctly." msgstr "" -#: I18n.php:122 App.php:124 +#: I18n.php:122 App.php:181 msgid "Hello world !" msgstr "" @@ -200,138 +241,138 @@ msgid "" "directories to MO files and as JS catalogs in locales directory." msgstr "" -#: I18n.php:341 +#: I18n.php:340 msgid "Fail to list EesyPHP PHP files." msgstr "" -#: I18n.php:361 +#: I18n.php:360 msgid "Fail to extract messages from EesyPHP PHP files using xgettext." msgstr "" -#: I18n.php:378 +#: I18n.php:377 msgid "Fail to list application PHP files." msgstr "" -#: I18n.php:398 +#: I18n.php:397 msgid "Fail to extract messages from PHP files using xgettext." msgstr "" -#: I18n.php:414 +#: I18n.php:413 #, php-format msgid "Fail to list JS files in the directory of static files '%s'." msgstr "" -#: I18n.php:436 +#: I18n.php:435 #, php-format msgid "" "Fail to extract messages from JS files in the directory of static files '%s' " "using xgettext." msgstr "" -#: I18n.php:458 +#: I18n.php:457 #, php-format msgid "" "Fail to extract messages from templates directory '%s' using tsmarty2c.php " "script." msgstr "" -#: I18n.php:494 +#: I18n.php:493 msgid "Fail to merge messages using msgcat." msgstr "" -#: I18n.php:511 +#: I18n.php:507 #, php-format msgid "Compendium file %s not found." msgstr "" -#: I18n.php:522 +#: I18n.php:518 #, php-format msgid "POT file not found (%s). Please run extract_messages first." msgstr "" -#: I18n.php:534 I18n.php:645 +#: I18n.php:530 I18n.php:640 #, php-format msgid "Lang directory '%s' found" msgstr "" -#: I18n.php:540 I18n.php:651 +#: I18n.php:536 I18n.php:646 #, php-format msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it." msgstr "" -#: I18n.php:555 +#: I18n.php:551 #, php-format msgid "Fail to init messages in %s PO file using msginit (%s)." msgstr "" -#: I18n.php:573 +#: I18n.php:569 #, php-format msgid "Fail to update messages in %s PO file using msgmerge (%s)." msgstr "" -#: I18n.php:579 I18n.php:659 +#: I18n.php:575 I18n.php:654 #, php-format msgid "PO file not found in lang '%s' directory, ignore it." msgstr "" -#: I18n.php:586 I18n.php:699 +#: I18n.php:582 I18n.php:694 #, php-format msgid "Fail to open root lang directory (%s)." msgstr "" -#: I18n.php:615 +#: I18n.php:610 #, php-format msgid "Lang alias symlink found: %s -> %s" msgstr "" -#: I18n.php:622 +#: I18n.php:617 #, php-format msgid "JS catalog symlink for %s -> %s created (%s)" msgstr "" -#: I18n.php:626 +#: I18n.php:621 #, php-format msgid "Fail to create JS catalog symlink for %s -> %s (%s)" msgstr "" -#: I18n.php:632 +#: I18n.php:627 #, php-format msgid "JS catalog symlink for %s -> %s already exist (%s)" msgstr "" -#: I18n.php:637 +#: I18n.php:632 #, php-format msgid "JS catalog file for %s already exist, but it's not a symlink to %s (%s)" msgstr "" -#: I18n.php:672 +#: I18n.php:667 #, php-format msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)." msgstr "" -#: I18n.php:682 +#: I18n.php:677 #, php-format msgid "Fail to open %s JS catalog file in write mode (%s)." msgstr "" -#: I18n.php:687 +#: I18n.php:682 #, php-format msgid "Fail to write %s JS catalog in file (%s)." msgstr "" -#: I18n.php:692 +#: I18n.php:687 #, php-format msgid "%s JS catalog writed (%s)." msgstr "" -#: App.php:126 +#: App.php:183 msgid "Hello world!" msgstr "" -#: App.php:137 +#: App.php:194 msgid "Disconnected" msgstr "" -#: App.php:139 +#: App.php:196 msgid "You are now disconnected." msgstr "" diff --git a/src/Check.php b/src/Check.php index 73374c8..ecc6f33 100644 --- a/src/Check.php +++ b/src/Check.php @@ -75,6 +75,38 @@ class Check { return true; } + public static function ip_address($ip, $allow_private_ip_address=true, $allow_reserved_ip_address=true, + $ipv4_only=false, $ipv6_only=false) { + $flag = null; + if ($ipv4_only) + $flag |= FILTER_FLAG_IPV4; + + if ($ipv6_only) + $flag |= FILTER_FLAG_IPV6; + + if (!isset($allow_private_ip_address) || !$allow_private_ip_address) + $flag |= FILTER_FLAG_NO_PRIV_RANGE; + + if (!isset($allow_reserved_ip_address) || !$allow_reserved_ip_address) + $flag |= FILTER_FLAG_NO_RES_RANGE; + + if (!is_null($flag)) + return (bool)filter_var($ip, FILTER_VALIDATE_IP, $flag); + else + return (bool)filter_var($ip, FILTER_VALIDATE_IP); + } + + public static function tcp_or_udp_port($value) { + if (!is_int($value)) { + if (!preg_match('/^[0-9]+$/', $value)) + return false; + $value = intval($value); + } + if ($value <= 0) return false; + if ($value > 65635) return false; + return true; + } + public static function is_empty($val) { switch(gettype($val)) { case "boolean": diff --git a/src/Cli.php b/src/Cli.php index 7abc260..c611380 100644 --- a/src/Cli.php +++ b/src/Cli.php @@ -30,7 +30,7 @@ class Cli { } return self :: $core_mode; } - + /** * On CLI set core mode hook * @param \EesyPHP\HookEvent $event @@ -48,6 +48,17 @@ class Cli { "EesyPHP framework.") ); } + else { + self :: add_command( + 'serve', + array('\\EesyPHP\\Cli', 'cli_serve'), + I18n :: ___("Start the PHP built-in HTTP server to serve the application"), + null, + I18n :: ___( + "This command could be used to start the PHP built-in HTTP server to serve the ". + "application.") + ); + } } /** @@ -272,4 +283,59 @@ class Cli { echo "done. Start coding!\n"; } + /** + * Command to start PHP built-in HTTP server to serve the EesyPHP project + * + * @param array $command_args The command arguments + * @return void + */ + public static function cli_serve($command_args) { + if (count($command_args) > 1) { + self :: usage( + I18n::_( + 'This command only accept one argument: the listen address in format "host:port" or '. + '":port" (= 0.0.0.0:port).') + ); + return; + } + + // Check listen address + $listen_address = ($command_args?$command_args[0]:'127.0.0.1:8000'); + $parts = explode(':', $listen_address); + if (count($parts) != 2) { + self :: usage( + I18n::_('Invalid listen address specify. Must be in formart host:port (or :port).') + ); + return; + } + + if (empty($parts[0])) { + $parts[0] = '0.0.0.0'; + } + else if (!Check::ip_address($parts[0])) { + self :: usage( + I18n::_('Invalid listen host specified. Must be an IPv4 or IPv6 address.') + ); + return; + } + + if (!Check::tcp_or_udp_port($parts[1])) { + self :: usage( + I18n::_('Invalid listen port specified. Must be a positive integer between 1 and 65535.') + ); + return; + } + $listen_address = implode(':', $parts); + + $public_html = App::get('root_directory_path')."/public_html"; + chdir($public_html) or die( + sprintf( + 'Fail to enter in the public_html directory of the application (%s).', + $public_html + ) + ); + passthru(PHP_BINARY." -S $listen_address index.php", $exit_code); + exit($exit_code); + } + }