From 07f5140771388c9e0c8a99b0dd2e5d950bdb173b Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Thu, 14 Oct 2021 15:16:42 +1100 Subject: moving h-source subdir out. --- Library/Lang/Eng/DbCondStrings.php | 34 ++++++++++++++ Library/Lang/Eng/Generic.php | 48 +++++++++++++++++++ Library/Lang/Eng/ModelStrings.php | 36 ++++++++++++++ Library/Lang/Eng/UploadStrings.php | 45 ++++++++++++++++++ Library/Lang/Eng/ValCondStrings.php | 93 +++++++++++++++++++++++++++++++++++++ Library/Lang/Eng/index.html | 1 + 6 files changed, 257 insertions(+) create mode 100644 Library/Lang/Eng/DbCondStrings.php create mode 100644 Library/Lang/Eng/Generic.php create mode 100644 Library/Lang/Eng/ModelStrings.php create mode 100644 Library/Lang/Eng/UploadStrings.php create mode 100644 Library/Lang/Eng/ValCondStrings.php create mode 100644 Library/Lang/Eng/index.html (limited to 'Library/Lang/Eng') diff --git a/Library/Lang/Eng/DbCondStrings.php b/Library/Lang/Eng/DbCondStrings.php new file mode 100644 index 0000000..e4196b6 --- /dev/null +++ b/Library/Lang/Eng/DbCondStrings.php @@ -0,0 +1,34 @@ +. + +if (!defined('EG')) die('Direct access not allowed!'); + +//error strings in the case database conditions are not satisfied +class Lang_Eng_DbCondStrings { + + //get the error string in the case that the value of the field $field is already present in the table $table + public function getNotUniqueString($field) + { + return "
The value of ". $field ." is already present. Please choose a different value.
\n"; + } + +} diff --git a/Library/Lang/Eng/Generic.php b/Library/Lang/Eng/Generic.php new file mode 100644 index 0000000..bb0ab99 --- /dev/null +++ b/Library/Lang/Eng/Generic.php @@ -0,0 +1,48 @@ +. + +if (!defined('EG')) die('Direct access not allowed!'); + +//generic strings +class Lang_Eng_Generic +{ + + //English to English + public $translations = array( + 'edit' => 'edit', + 'delete' => 'delete', + 'move up' => 'move up', + 'move down' => 'move down', + 'associate' => 'associate', + ); + + public function gtext($string) + { + if (array_key_exists($string,$this->translations)) + { + return $this->translations[$string]; + } + + return $string; + } + +} diff --git a/Library/Lang/Eng/ModelStrings.php b/Library/Lang/Eng/ModelStrings.php new file mode 100644 index 0000000..fa741a2 --- /dev/null +++ b/Library/Lang/Eng/ModelStrings.php @@ -0,0 +1,36 @@ +. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Lang_Eng_ModelStrings extends Lang_ResultStrings { + + public $string = array( + "error" => "
Query error: Contact the administrator!
\n", + "executed" => "
Operation executed!
\n", + "associate" => "
Referential integrity problem: record associated to some other record in a child table. Break the association before.
\n", + "no-id" => "
Alert: record identifier not defined!
\n", + "not-linked" => "
The Item is not associated : you can't dissociate it
", + "linked" => "
The Item is already associated: you can't associate it another time
" + ); + +} diff --git a/Library/Lang/Eng/UploadStrings.php b/Library/Lang/Eng/UploadStrings.php new file mode 100644 index 0000000..2ae4c9b --- /dev/null +++ b/Library/Lang/Eng/UploadStrings.php @@ -0,0 +1,45 @@ +. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Lang_Eng_UploadStrings extends Lang_ResultStrings { + + public $string = array( + "error" => "
Error: verify the permissions of the file/directory
\n", + "executed" => "
Operation executed!
\n", + "not-child" => "
The selected directory is not a child of the base directory
\n", + "not-dir" => "
The selected directory is not a directory
\n", + "not-empty" => "
The selected directory is not empty
\n", + "no-folder-specified" => "
No folder has been specified
\n", + "no-file-specified" => "
No file has been specified
\n", + "not-writable" => "
The folder is not writable
\n", + "not-writable-file" => "
The file is not writable
\n", + "dir-exists" => "
The directory is already present in the current folder
\n", + "no-upload-file" => "
There is no file to upload
\n", + "size-over" => "
The size of the file is too big
\n", + "not-allowed-ext" => "
The extension of the file you want to upload is not allowed
\n", + "not-allowed-mime-type" => "
The MIME type of the file you want to upload is not allowed
\n", + "file-exists" => "
The file is already present in the current folder
\n" + ); + +} diff --git a/Library/Lang/Eng/ValCondStrings.php b/Library/Lang/Eng/ValCondStrings.php new file mode 100644 index 0000000..42e70d8 --- /dev/null +++ b/Library/Lang/Eng/ValCondStrings.php @@ -0,0 +1,93 @@ +. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Lang_Eng_ValCondStrings { + + //if the element is not defined + public function getNotDefinedResultString($element) + { + return "
". $element ." not defined!
\n"; + } + + //if the elements are not equal + public function getNotEqualResultString($element) + { + return "
Different values: $element
\n"; + } + + //if the element is not alphabetic + public function getNotAlphabeticResultString($element) + { + return "
".$element." has to be alphabetic
\n"; + } + + //if the element is not alphanumeric + public function getNotAlphanumericResultString($element) + { + return "
".$element." has to be alphanumeric
\n"; + } + + //if the element is not a decimal digit + public function getNotDecimalDigitResultString($element) + { + return "
".$element." has to be a decimal digit
\n"; + } + + //if the element has the mail format + public function getNotMailFormatResultString($element) + { + return "
".$element." doesn't seem an e-mail address
\n"; + } + + //if the element is numeric + public function getNotNumericResultString($element) + { + return "
".$element." has to be a numeric
\n"; + } + + //if the element (string) length exceeds the value of characters (defined by $maxLength) + public function getLengthExceedsResultString($element,$maxLength) + { + return "
".$element." exceeds the value of $maxLength characters
\n"; + } + + //if the element is one of the strings indicated by $stringList (a comma-separated list of strings) + public function getIsForbiddenStringResultString($element,$stringList) + { + return "
".$element." can't be one of the following strings: $stringList
\n"; + } + + //if the element is not one of the strings indicated by $stringList (a comma-separated list of strings) + public function getIsNotStringResultString($element,$stringList) + { + return "
".$element." has to be one of the following strings: $stringList
\n"; + } + + //if the element is not one of the strings indicated by $stringList (a comma-separated list of strings) + public function getDoesntMatchResultString($element,$regExp) + { + return "
".$element." has to match the following regular expression: $regExp
\n"; + } + +} diff --git a/Library/Lang/Eng/index.html b/Library/Lang/Eng/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/Library/Lang/Eng/index.html @@ -0,0 +1 @@ + -- cgit v1.2.3