Compare commits

...

3 commits

Author SHA1 Message Date
Benjamin Renard
9030a2ba79
Update translations 2023-11-20 19:42:47 +01:00
Benjamin Renard
abbfd70319
Tpl: add display_ajax_error() helper method 2023-11-20 19:42:47 +01:00
Benjamin Renard
174ff2bb36
Db: add count() helper method 2023-11-20 19:42:46 +01:00
5 changed files with 341 additions and 143 deletions

View file

@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2023-04-22 18:48+0200\n"
"POT-Creation-Date: 2023-11-20 17:34+0000\n"
"PO-Revision-Date: \n"
"Last-Translator: Benjamin Renard <brenard@easter-eggs.com>\n"
"Language-Team: \n"
@ -9,22 +9,28 @@ msgstr ""
"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"
"X-Generator: Poedit 3.2.2\n"
#: Tpl.php:437
#: Tpl.php:446
msgid "No template specified."
msgstr "Aucun template spécifié."
#: Tpl.php:471
#: Tpl.php:477
msgid "An error occurred while displaying this page."
msgstr "Une erreur est survenue en affichant cette page."
#: Tpl.php:871
#: Tpl.php:567
msgid "Unexpected error occured. If problem persist, please contact support."
msgstr ""
"Une erreur inconnue est survenue. Si le problème persiste, merci de prendre "
"contact avec le support."
#: Tpl.php:896
msgid "Unkwown"
msgstr "Inconnu"
#: Db.php:80
#: Db.php:78
msgid "Unable to connect to the database."
msgstr "Impossible de se connecter à la base de données."
@ -32,7 +38,7 @@ msgstr "Impossible de se connecter à la base de données."
msgid "Invalid username or password."
msgstr "Nom d'utilisateur ou mot de passe invalide."
#: Auth/Form.php:92
#: Auth/Form.php:91
msgid "Sign in"
msgstr "Connexion"
@ -86,7 +92,7 @@ msgstr ""
"Une erreur inconnue est survenue. Si le problème persiste, merci de prendre "
"contact avec le support."
#: Url.php:262
#: Url.php:263
msgid ""
"Unable to determine the requested page. If the problem persists, please "
"contact support."
@ -94,7 +100,7 @@ msgstr ""
"Impossible de déterminer la page demandée. Si le problème persiste, merci de "
"prendre contact avec le support."
#: Url.php:416
#: Url.php:411
msgid ""
"Unable to determine the requested page (loop detected). If the problem "
"persists, please contact support."
@ -102,15 +108,15 @@ 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:446
#: Url.php:440
msgid "This request cannot be processed."
msgstr "Cette requête ne peut être traitée."
#: Url.php:456
#: Url.php:450
msgid "Authentication required but fail to authenticate you."
msgstr "Authentification requise mais impossible pour vous authentifier."
#: Url.php:475
#: Url.php:469
msgid "This request could not be processed correctly."
msgstr "Cette requête n'a put être traitée correctement."
@ -136,6 +142,8 @@ msgid ""
"the application.\n"
"\n"
"Additionnal parameters:\n"
" -p/--public-url Define the public URL (default: based on "
"listen address)\n"
" -P/--enable-profiler Enable Xdebug profiler\n"
" -O/--profiler-output [path] Xdebug profiler output directory path"
msgstr ""
@ -143,60 +151,62 @@ msgstr ""
"à PHP pour servir l'application.\n"
"\n"
"Paramètres additionnels :\n"
" -p/--public-url Définir l'URL publique (par défaut:\n"
" définie à partir de l'adresse d'écoute)\n"
" -P/--enable-profiler Activer le profilter Xdebug\n"
" -O/--profiler-output [path] Chemin du dossier de sortie du profiler\n"
" Xdebug"
#: Cli.php:94
#: Cli.php:95
#, php-format
msgid "The CLI command '%s' already exists."
msgstr "La commande CLI '%s' n'existe pas."
#: Cli.php:99
#: Cli.php:100
#, 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:131
#: Cli.php:132
#, php-format
msgid "Usage: %s [-h] [-qd] command\n"
msgstr "Utilisation: %s [-h] [-qd] commande\n"
#: Cli.php:132
#: Cli.php:133
msgid " -h Show this message\n"
msgstr " -h Affiche ce message\n"
#: Cli.php:133
#: Cli.php:134
msgid " -q / -d Quiet/Debug mode\n"
msgstr " -q / -d Mode silencieux/debug\n"
#: Cli.php:134
#: Cli.php:135
msgid " --trace Trace mode (the most verbose)\n"
msgstr " --trace Mode trace (le plus verbeux)\n"
#: Cli.php:135
#: Cli.php:136
msgid " -l / --log-file Overwrite log file specified in configuration\n"
msgstr ""
" -l / --log-file Redéfinir le fichier de journalisation à utiliser à la "
"place de celui défini dans la configuration\n"
#: Cli.php:136
#: Cli.php:137
msgid " -C / --console Enable log on console\n"
msgstr " -C / --console Activer la journalisation dans la console\n"
#: Cli.php:137
#: Cli.php:138
msgid " command Command to run\n"
msgstr " command La commande à exécuter\n"
#: Cli.php:139
#: Cli.php:140
msgid "Available commands:\n"
msgstr "Commandes disponibles:\n"
#: Cli.php:189
#: Cli.php:191
msgid "Only one command could be executed !"
msgstr "Une seul commande peut-être exécutée !"
#: Cli.php:226
#: Cli.php:227
#, php-format
msgid ""
"Invalid parameter \"%s\".\n"
@ -206,44 +216,44 @@ msgstr ""
"Note : Les paramètres/arguments de la requête doivent être placés après "
"celle-ci."
#: Cli.php:251
#: Cli.php:252
#, php-format
msgid "An exception occured running command %s"
msgstr "Une exception est survenue en exécutant la commande %s"
#: Cli.php:319
#: Cli.php:327
msgid "The PHP XDEBUG extension is missing."
msgstr "L'extension PHP XDEBUG ne semble pas installée."
#: Cli.php:330
#: Cli.php:336
#, php-format
msgid "Invalid profiler output directory \"%s\": not found"
msgstr "Dossier de sortie du profiler invalide \"%s\" : introuvable"
#: Cli.php:337
#: Cli.php:341
#, php-format
msgid "Invalid profiler output directory \"%s\": not writeable"
msgstr ""
"Dossier de sortie du profiler invalide \"%s\" : non-accessible en écriture"
#: Cli.php:349
#: Cli.php:350
#, php-format
msgid "Invalid parameter \"%s\""
msgstr "Paramètre \"%s\" invalide"
#: Cli.php:362
#: Cli.php:361
msgid ""
"Invalid listen address specify. Must be in formart host:port (or :port)."
"Invalid listen address specify. Must be in format host:port, host or :port."
msgstr ""
"Adresse d'écoute spécifiée invalide. Elle doit être au format hôte:port (ou :"
"port)."
#: Cli.php:372
#: Cli.php:369
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:379
#: Cli.php:376
msgid ""
"Invalid listen port specified. Must be a positive integer between 1 and "
"65535."
@ -251,13 +261,13 @@ msgstr ""
"Port d'écoute spécifié invalide. Il doit s'agir d'un entier positif entre 1 "
"et 65535."
#: Cli.php:423
#: Cli.php:418
msgid "Can't invoke bash. Can't ask password prompt."
msgstr ""
"Impossible d'utiliser bash. Impossible de demander à l'utilisateur de saisir "
"un mot de passe."
#: Cli.php:426
#: Cli.php:421
msgid "Please enter password:"
msgstr "Merci de saisir le mot de passe :"
@ -290,19 +300,19 @@ msgstr "ns"
msgid "Less than 1%s"
msgstr "Moins de 1%s"
#: App.php:241 I18n.php:118
#: App.php:239 I18n.php:118
msgid "Hello world !"
msgstr "Bonjour tout le monde !"
#: App.php:243
#: App.php:241
msgid "Hello world!"
msgstr "Salut tout le monde !"
#: App.php:254
#: App.php:252
msgid "Disconnected"
msgstr "Déconnecté"
#: App.php:256
#: App.php:254
msgid "You are now disconnected."
msgstr "Vous êtes maintenant déconnecté."
@ -346,34 +356,99 @@ 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:347
#: I18n.php:168
msgid "Initialize a new locale for translation."
msgstr "Initialiser un nouvelle locale pour traduction."
#: I18n.php:170
msgid "This command could be used to initialize a new locale for translation."
msgstr ""
"Cette commande peut-être utilisée pour initialiser une nouvelle locale pour "
"traduction."
#: I18n.php:367
msgid "You must provide the locale to initialize as unique and first argument."
msgstr ""
"Vous devez fournir la locale à initialiser comme unique et premier argument."
#: I18n.php:370 I18n.php:377
#, php-format
msgid "Invalid locale %s."
msgstr "Locale \"%s\" invalide."
#: I18n.php:375
msgid "Fail to list valid locales."
msgstr "Une erreur est survenue en listant les locales valides."
#: I18n.php:386
#, php-format
msgid "Locale %s directory created (%s)."
msgstr "Dossier de la locale %s créé (%s)."
#: I18n.php:388
#, php-format
msgid "Fail to create locale %s directory (%s)."
msgstr "Une erreur est survenue en créant le dossier de la locale %s (%s)."
#: I18n.php:391
#, php-format
msgid "Locale %s directory already exist (%s)."
msgstr "Le dossier de la locale %s existe déjà (%s)."
#: I18n.php:398
#, php-format
msgid "Locale %s LC_MESSAGES directory created (%s)."
msgstr "Dossier LC_MESSAGES de la locale %s créé (%s)."
#: I18n.php:402
#, php-format
msgid "Fail to create locale %s LC_MESSAGES directory (%s)."
msgstr ""
"Une erreur est survenue en créant le dossier LC_MESSAGE de la locale %s (%s)."
#: I18n.php:406
#, php-format
msgid "Locale %s LC_MESSAGES directory already exist (%s)."
msgstr "Le dossier LC_MESSAGES de la locale %s existe déjà (%s)."
#: I18n.php:430
#, php-format
msgid "Locale %s PO file created (%s)."
msgstr "Fichier PO de la locale %s créé (%s)."
#: I18n.php:434
#, php-format
msgid "Locale %s PO file already exist (%s)."
msgstr "Le fichier PO de la locale %s existe déjà (%s)."
#: I18n.php:468
msgid "Fail to list EesyPHP PHP files."
msgstr "Une erreur est survenue en listant les fichiers PHP d'EesyPHP."
#: I18n.php:367
#: I18n.php:488
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:384
#: I18n.php:505
msgid "Fail to list application PHP files."
msgstr "Une erreur est survenue en listant les fichiers PHP de l'application."
#: I18n.php:404
#: I18n.php:525
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:420
#: I18n.php:542
#, 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:442
#: I18n.php:564
#, php-format
msgid ""
"Fail to extract messages from JS files in the directory of static files '%s' "
@ -382,7 +457,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:464
#: I18n.php:586
#, php-format
msgid ""
"Fail to extract messages from templates directory '%s' using tsmarty2c.php "
@ -391,100 +466,100 @@ msgstr ""
"Impossible d'extraire les messages depuis le dossier de templates '%s' en "
"utilisant le script tsmarty2c.php."
#: I18n.php:500
#: I18n.php:622
msgid "Fail to merge messages using msgcat."
msgstr "Impossible de fusionner les messages en utilisant msgcat."
#: I18n.php:514
#: I18n.php:636
#, php-format
msgid "Compendium file %s not found."
msgstr "Fichier compendium %s introuvable."
#: I18n.php:525
#: I18n.php:645
#, 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:537 I18n.php:647
#: I18n.php:657 I18n.php:766
#, php-format
msgid "Lang directory '%s' found"
msgstr "Dossier de langue '%s' trouvé"
#: I18n.php:543 I18n.php:653
#: I18n.php:663 I18n.php:772
#, 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:558
#: I18n.php:678
#, 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:576
#: I18n.php:696
#, 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:582 I18n.php:661
#: I18n.php:702 I18n.php:780
#, 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:589 I18n.php:716
#: I18n.php:709 I18n.php:835
#, php-format
msgid "Fail to open root lang directory (%s)."
msgstr "Impossible d'ouvrir le dossier racine des langues (%s)."
#: I18n.php:617
#: I18n.php:736
#, php-format
msgid "Lang alias symlink found: %s -> %s"
msgstr "Lien symbolique d'alias de langue trouvé : %s -> %s"
#: I18n.php:624
#: I18n.php:743
#, php-format
msgid "JS catalog symlink for %s -> %s created (%s)"
msgstr "Lien symbolique de catalogue JS pour %s -> %s créé (%s)"
#: I18n.php:628
#: I18n.php:747
#, 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:634
#: I18n.php:753
#, 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:639
#: I18n.php:758
#, 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:674
#: I18n.php:793
#, 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:686
#: I18n.php:805
#, php-format
msgid "Include core translated messages from %s PO file"
msgstr "Inclusion des messages traduits (core) depuis le fichier PO %s"
#: I18n.php:693
#: I18n.php:812
#, php-format
msgid ""
"Core PO file %s not found: can not include its translated messages in "
@ -493,17 +568,17 @@ msgstr ""
"Le fichier PO core %s est introuvable : impossible d'inclure ses messages "
"traduits dans le catalogue JSON résultant."
#: I18n.php:699
#: I18n.php:818
#, 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:704
#: I18n.php:823
#, 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:709
#: I18n.php:828
#, php-format
msgid "%s JS catalog writed (%s)."
msgstr "Catalogue JS %s créé (%s)."
@ -581,15 +656,15 @@ msgstr "Merci de patienter pendant le traitement de votre requête."
msgid "Are you sure?"
msgstr "Êtes-vous sure ?"
#: templates/login.tpl:20 templates/login.tpl:21
#: templates/login.tpl:19 templates/login.tpl:20
msgid "Username"
msgstr "Nom d'utilisateur"
#: templates/login.tpl:26 templates/login.tpl:27
#: templates/login.tpl:24 templates/login.tpl:25
msgid "Password"
msgstr "Mot de passe"
#: templates/login.tpl:33
#: templates/login.tpl:32
msgid "Remember username"
msgstr "Mémoriser nom d'utilisateur"

View file

@ -1,24 +1,28 @@
msgid ""
msgstr ""
"POT-Creation-Date: 2023-04-22 18:48+0200\n"
"PO-Revision-Date: 2023-04-22 18:48+0200\n"
"POT-Creation-Date: 2023-11-20 17:34+0000\n"
"PO-Revision-Date: 2023-11-20 17:34+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: Tpl.php:437
#: Tpl.php:446
msgid "No template specified."
msgstr ""
#: Tpl.php:471
#: Tpl.php:477
msgid "An error occurred while displaying this page."
msgstr ""
#: Tpl.php:871
#: Tpl.php:567
msgid "Unexpected error occured. If problem persist, please contact support."
msgstr ""
#: Tpl.php:896
msgid "Unkwown"
msgstr ""
#: Db.php:80
#: Db.php:78
msgid "Unable to connect to the database."
msgstr ""
@ -26,7 +30,7 @@ msgstr ""
msgid "Invalid username or password."
msgstr ""
#: Auth/Form.php:92
#: Auth/Form.php:91
msgid "Sign in"
msgstr ""
@ -76,27 +80,27 @@ msgstr ""
msgid "An unknown error occurred. If problem persist, please contact support."
msgstr ""
#: Url.php:262
#: Url.php:263
msgid ""
"Unable to determine the requested page. If the problem persists, please "
"contact support."
msgstr ""
#: Url.php:416
#: Url.php:411
msgid ""
"Unable to determine the requested page (loop detected). If the problem "
"persists, please contact support."
msgstr ""
#: Url.php:446
#: Url.php:440
msgid "This request cannot be processed."
msgstr ""
#: Url.php:456
#: Url.php:450
msgid "Authentication required but fail to authenticate you."
msgstr ""
#: Url.php:475
#: Url.php:469
msgid "This request could not be processed correctly."
msgstr ""
@ -120,108 +124,110 @@ msgid ""
"the application.\n"
"\n"
"Additionnal parameters:\n"
" -p/--public-url Define the public URL (default: based on "
"listen address)\n"
" -P/--enable-profiler Enable Xdebug profiler\n"
" -O/--profiler-output [path] Xdebug profiler output directory path"
msgstr ""
#: Cli.php:94
#: Cli.php:95
#, php-format
msgid "The CLI command '%s' already exists."
msgstr ""
#: Cli.php:99
#: Cli.php:100
#, php-format
msgid "The CLI command '%s' handler is not callable !"
msgstr ""
#: Cli.php:131
#: Cli.php:132
#, php-format
msgid "Usage: %s [-h] [-qd] command\n"
msgstr ""
#: Cli.php:132
#: Cli.php:133
msgid " -h Show this message\n"
msgstr ""
#: Cli.php:133
#: Cli.php:134
msgid " -q / -d Quiet/Debug mode\n"
msgstr ""
#: Cli.php:134
#: Cli.php:135
msgid " --trace Trace mode (the most verbose)\n"
msgstr ""
#: Cli.php:135
#: Cli.php:136
msgid " -l / --log-file Overwrite log file specified in configuration\n"
msgstr ""
#: Cli.php:136
#: Cli.php:137
msgid " -C / --console Enable log on console\n"
msgstr ""
#: Cli.php:137
#: Cli.php:138
msgid " command Command to run\n"
msgstr ""
#: Cli.php:139
#: Cli.php:140
msgid "Available commands:\n"
msgstr ""
#: Cli.php:189
#: Cli.php:191
msgid "Only one command could be executed !"
msgstr ""
#: Cli.php:226
#: Cli.php:227
#, php-format
msgid ""
"Invalid parameter \"%s\".\n"
"Note: Command's parameter/argument must be place after the command."
msgstr ""
#: Cli.php:251
#: Cli.php:252
#, php-format
msgid "An exception occured running command %s"
msgstr ""
#: Cli.php:319
#: Cli.php:327
msgid "The PHP XDEBUG extension is missing."
msgstr ""
#: Cli.php:330
#: Cli.php:336
#, php-format
msgid "Invalid profiler output directory \"%s\": not found"
msgstr ""
#: Cli.php:337
#: Cli.php:341
#, php-format
msgid "Invalid profiler output directory \"%s\": not writeable"
msgstr ""
#: Cli.php:349
#: Cli.php:350
#, php-format
msgid "Invalid parameter \"%s\""
msgstr ""
#: Cli.php:362
#: Cli.php:361
msgid ""
"Invalid listen address specify. Must be in formart host:port (or :port)."
"Invalid listen address specify. Must be in format host:port, host or :port."
msgstr ""
#: Cli.php:372
#: Cli.php:369
msgid "Invalid listen host specified. Must be an IPv4 or IPv6 address."
msgstr ""
#: Cli.php:379
#: Cli.php:376
msgid ""
"Invalid listen port specified. Must be a positive integer between 1 and "
"65535."
msgstr ""
#: Cli.php:423
#: Cli.php:418
msgid "Can't invoke bash. Can't ask password prompt."
msgstr ""
#: Cli.php:426
#: Cli.php:421
msgid "Please enter password:"
msgstr ""
@ -254,19 +260,19 @@ msgstr ""
msgid "Less than 1%s"
msgstr ""
#: App.php:241 I18n.php:118
#: App.php:239 I18n.php:118
msgid "Hello world !"
msgstr ""
#: App.php:243
#: App.php:241
msgid "Hello world!"
msgstr ""
#: App.php:254
#: App.php:252
msgid "Disconnected"
msgstr ""
#: App.php:256
#: App.php:254
msgid "You are now disconnected."
msgstr ""
@ -301,138 +307,199 @@ msgid ""
"directories to MO files and as JS catalogs in locales directory."
msgstr ""
#: I18n.php:347
msgid "Fail to list EesyPHP PHP files."
#: I18n.php:168
msgid "Initialize a new locale for translation."
msgstr ""
#: I18n.php:170
msgid "This command could be used to initialize a new locale for translation."
msgstr ""
#: I18n.php:367
msgid "You must provide the locale to initialize as unique and first argument."
msgstr ""
#: I18n.php:370 I18n.php:377
#, php-format
msgid "Invalid locale %s."
msgstr ""
#: I18n.php:375
msgid "Fail to list valid locales."
msgstr ""
#: I18n.php:386
#, php-format
msgid "Locale %s directory created (%s)."
msgstr ""
#: I18n.php:388
#, php-format
msgid "Fail to create locale %s directory (%s)."
msgstr ""
#: I18n.php:391
#, php-format
msgid "Locale %s directory already exist (%s)."
msgstr ""
#: I18n.php:398
#, php-format
msgid "Locale %s LC_MESSAGES directory created (%s)."
msgstr ""
#: I18n.php:402
#, php-format
msgid "Fail to create locale %s LC_MESSAGES directory (%s)."
msgstr ""
#: I18n.php:406
#, php-format
msgid "Locale %s LC_MESSAGES directory already exist (%s)."
msgstr ""
#: I18n.php:430
#, php-format
msgid "Locale %s PO file created (%s)."
msgstr ""
#: I18n.php:434
#, php-format
msgid "Locale %s PO file already exist (%s)."
msgstr ""
#: I18n.php:468
msgid "Fail to list EesyPHP PHP files."
msgstr ""
#: I18n.php:488
msgid "Fail to extract messages from EesyPHP PHP files using xgettext."
msgstr ""
#: I18n.php:384
#: I18n.php:505
msgid "Fail to list application PHP files."
msgstr ""
#: I18n.php:404
#: I18n.php:525
msgid "Fail to extract messages from PHP files using xgettext."
msgstr ""
#: I18n.php:420
#: I18n.php:542
#, php-format
msgid "Fail to list JS files in the directory of static files '%s'."
msgstr ""
#: I18n.php:442
#: I18n.php:564
#, php-format
msgid ""
"Fail to extract messages from JS files in the directory of static files '%s' "
"using xgettext."
msgstr ""
#: I18n.php:464
#: I18n.php:586
#, php-format
msgid ""
"Fail to extract messages from templates directory '%s' using tsmarty2c.php "
"script."
msgstr ""
#: I18n.php:500
#: I18n.php:622
msgid "Fail to merge messages using msgcat."
msgstr ""
#: I18n.php:514
#: I18n.php:636
#, php-format
msgid "Compendium file %s not found."
msgstr ""
#: I18n.php:525
#: I18n.php:645
#, php-format
msgid "POT file not found (%s). Please run extract_messages first."
msgstr ""
#: I18n.php:537 I18n.php:647
#: I18n.php:657 I18n.php:766
#, php-format
msgid "Lang directory '%s' found"
msgstr ""
#: I18n.php:543 I18n.php:653
#: I18n.php:663 I18n.php:772
#, php-format
msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it."
msgstr ""
#: I18n.php:558
#: I18n.php:678
#, php-format
msgid "Fail to init messages in %s PO file using msginit (%s)."
msgstr ""
#: I18n.php:576
#: I18n.php:696
#, php-format
msgid "Fail to update messages in %s PO file using msgmerge (%s)."
msgstr ""
#: I18n.php:582 I18n.php:661
#: I18n.php:702 I18n.php:780
#, php-format
msgid "PO file not found in lang '%s' directory, ignore it."
msgstr ""
#: I18n.php:589 I18n.php:716
#: I18n.php:709 I18n.php:835
#, php-format
msgid "Fail to open root lang directory (%s)."
msgstr ""
#: I18n.php:617
#: I18n.php:736
#, php-format
msgid "Lang alias symlink found: %s -> %s"
msgstr ""
#: I18n.php:624
#: I18n.php:743
#, php-format
msgid "JS catalog symlink for %s -> %s created (%s)"
msgstr ""
#: I18n.php:628
#: I18n.php:747
#, php-format
msgid "Fail to create JS catalog symlink for %s -> %s (%s)"
msgstr ""
#: I18n.php:634
#: I18n.php:753
#, php-format
msgid "JS catalog symlink for %s -> %s already exist (%s)"
msgstr ""
#: I18n.php:639
#: I18n.php:758
#, php-format
msgid "JS catalog file for %s already exist, but it's not a symlink to %s (%s)"
msgstr ""
#: I18n.php:674
#: I18n.php:793
#, php-format
msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)."
msgstr ""
#: I18n.php:686
#: I18n.php:805
#, php-format
msgid "Include core translated messages from %s PO file"
msgstr ""
#: I18n.php:693
#: I18n.php:812
#, php-format
msgid ""
"Core PO file %s not found: can not include its translated messages in "
"resulting JSON catalog."
msgstr ""
#: I18n.php:699
#: I18n.php:818
#, php-format
msgid "Fail to open %s JS catalog file in write mode (%s)."
msgstr ""
#: I18n.php:704
#: I18n.php:823
#, php-format
msgid "Fail to write %s JS catalog in file (%s)."
msgstr ""
#: I18n.php:709
#: I18n.php:828
#, php-format
msgid "%s JS catalog writed (%s)."
msgstr ""
@ -504,15 +571,15 @@ msgstr ""
msgid "Are you sure?"
msgstr ""
#: templates/login.tpl:20 templates/login.tpl:21
#: templates/login.tpl:19 templates/login.tpl:20
msgid "Username"
msgstr ""
#: templates/login.tpl:26 templates/login.tpl:27
#: templates/login.tpl:24 templates/login.tpl:25
msgid "Password"
msgstr ""
#: templates/login.tpl:33
#: templates/login.tpl:32
msgid "Remember username"
msgstr ""

View file

@ -196,6 +196,34 @@ class Db {
return false;
}
/**
* Helper to retreive a count from a table of the database
* @param string $table The table name
* @param array|string $where WHERE clause(s) as expected by Envms\FluentPDO\Query
* @param array|string|null $what What to count (optional, default: "*")
* @param array<array{0: 'LEFT'|'RIGHT'|'INNER'|'OUTER'|'FULL', 1: string, 2: string}>|array{0: 'LEFT'|'RIGHT'|'INNER'|'OUTER'|'FULL', 1: string, 2: string} $joins Join specification as array (see apply_joins())
* @return int|false
*/
public function count($table, $where, $what=null, $joins=null) {
try {
$query = $this -> fpdo -> from($table) -> where($where);
if ($joins)
self :: apply_joins($query, $joins);
$query -> select(null) -> select(sprintf("COUNT(%s) as count", $what?$what:"*"));
if ($query->execute() === false)
return false;
$return = $query->fetchAll();
if (is_array($return) && count($return) == 1)
return $return[0]["count"];
}
catch (Exception $e) {
self :: _log_simple_select_query_error(
false, $table, $e, $where, null, null, null, $joins
);
}
return false;
}
/**
* Mapping of JOIN type with corresponding query object method
* @var array<string,string>

View file

@ -524,16 +524,21 @@ class Tpl {
/**
* Display AJAX return
* @param array|null $data AJAX returned data (optional)
* @param int|null $error_code HTTP error code (optional, default: 400 if not $data['success'])
* @param bool $pretty AJAX returned data
* (optional, default: true if $_REQUEST['pretty'] is set, False otherwise)
* @return never
*/
public static function display_ajax_return($data=null, $pretty=false) {
public static function display_ajax_return($data=null, $error_code=null, $pretty=false) {
if (!is_array($data))
$data = array();
// Adjust HTTP error code on unsuccessfull request
elseif (isset($data['success']) && !$data['success'] && http_response_code() == 200)
http_response_code(400);
// Adjust HTTP error code on unsuccessfull request (or if custom error code is provided)
if (
$error_code
|| (isset($data['success']) && !$data['success'] && http_response_code() == 200)
)
http_response_code($error_code ? $error_code : 400);
$data['messages'] = self :: get_messages();
if (!$data['messages']) unset($data['messages']);
@ -550,6 +555,29 @@ class Tpl {
exit();
}
/**
* Display AJAX error
* @param string|null $error Error message (optional)
* @param int|null $error_code HTTP error code (optional, default: 400)
* @param bool $pretty AJAX returned data
* (optional, default: true if $_REQUEST['pretty'] is set, False otherwise)
* @return never
*/
public static function display_ajax_error($error=null, $error_code=null, $pretty=false) {
self :: display_ajax_return(
array(
'success' => false,
'error' => (
$error?
$error:
I18n::_("Unexpected error occured. If problem persist, please contact support.")
),
),
$error_code,
$pretty
);
}
/**
* Handle a fatal error
* @param string $error The error message
@ -576,7 +604,7 @@ class Tpl {
// Handle API mode
if (Url :: api_mode())
self :: display_ajax_return(array('success' => false, 'error' => $error));
self :: display_ajax_error($error);
self :: assign('fatal_error', $error);
self :: display('fatal_error.tpl');