Update all the _( to dgettext ("domframework"

Update locales


git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@5271 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2019-05-13 08:36:47 +00:00
parent b54fc6baa0
commit 5fcd1731fd
12 changed files with 703 additions and 511 deletions

View File

@@ -38,30 +38,33 @@ class dbjson
500);
$pos = strpos ($dsn, "://");
if ($pos === false)
throw new \Exception (_("No DSN provided to dbjson"), 500);
throw new \Exception (dgettext("domframework",
"No DSN provided to dbjson"), 500);
if (substr ($dsn, 0, $pos) !== "dbjson")
throw new \Exception (_("Invalid database type provided in dbjson"), 500);
throw new \Exception (dgettext("domframework",
"Invalid database type provided in dbjson"), 500);
$this->dbfile = substr ($dsn, $pos+3);
$directory = dirname ($this->dbfile);
if (! file_exists ($directory))
@mkdir ($directory, 0777, true);
if (! file_exists ($directory))
throw new \Exception (sprintf (_("Directory '%s' doesn't exists"),
$directory), 500);
throw new \Exception (sprintf (dgettext("domframework",
"Directory '%s' doesn't exists"), $directory), 500);
if (! file_exists ($this->dbfile))
{
if (! is_readable ($directory))
throw new \Exception (sprintf (
_("Directory '%s' not writeable and dbfile '%s' not exists"),
$directory, $this->dbfile), 500);
dgettext("domframework",
"Directory '%s' not writeable and dbfile '%s' not exists"),
$directory, $this->dbfile), 500);
touch ($this->dbfile);
}
if (! is_readable ($this->dbfile))
throw new \Exception(sprintf (_("File '%s' not readable"), $this->dbfile),
500);
throw new \Exception(sprintf (dgettext("domframework",
"File '%s' not readable"), $this->dbfile), 500);
if (! is_writeable ($this->dbfile))
throw new \Exception(sprintf (_("File '%s' not readable"), $this->dbfile),
500);
throw new \Exception(sprintf (dgettext("domframework",
"File '%s' not readable"), $this->dbfile), 500);
$this->dsn = $dsn;
$this->dbfile = $this->dbfile;
}