[TikiWiki-commits] [Git][tikiwiki/tiki][master] [ENH] Custom Translations: Improve error messages
"luci \(@luciash\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <69441a6c8abb4_2a17fb2441899@gitlab-sidekiq-low-urgency-cpu-bound-v2-547b5c788f-s8jrc.mail> |
luci pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
6b5007a5 by Bruno Kambere at 2025-12-18T15:05:59+00:00
[ENH] Custom Translations: Improve error messages
---
* [ENH] Custom Translations: Improve error messages
See merge request tikiwiki/tiki!9247
- - - - -
1 changed file:
- lib/core/Services/Language/Utilities.php
Changes:
=====================================
lib/core/Services/Language/Utilities.php
=====================================
@@ -212,7 +212,7 @@ class Services_Language_Utilities
$langDirIsReadable = is_readable($directory);
if (! $langDirIsReadable) {
- throw new Services_Exception(tra('The language directory is not readable'), 400);
+ throw new Services_Exception(tr('The language directory %0 is missing or not readable. Please ask the administrator to check its existence and permissions.', $directory), 400);
} else {
return $langDirIsReadable;
}
@@ -233,7 +233,7 @@ class Services_Language_Utilities
$langDirIsWritable = is_writable($directory);
if (! $langDirIsWritable) {
- throw new Services_Exception(tra('The language directory is not writeable'), 400);
+ throw new Services_Exception(tr('The language directory %0 is missing or not writable. Please ask the administrator to check its existence and permissions.', $directory), 400);
} else {
return $langDirIsWritable;
}
@@ -337,10 +337,10 @@ class Services_Language_Utilities
//write the strings to custom.php file
if (! ($fp = fopen($custom_file, 'w+'))) {
- throw new Services_Exception(tra('Can not fopen custom.php'), 400);
+ throw new Services_Exception(tra('Can not read custom.php translation file. Please ask the administrator to check its existence and permissions.'), 400);
} else {
if (! fwrite($fp, $custom_code)) {
- throw new Services_Exception(tra('Can not fwrite custom.php'), 400);
+ throw new Services_Exception(tra('Can not write custom.php translation file. Please ask the administrator to check its existence and permissions.'), 400);
}
fclose($fp);
return true;
@@ -428,10 +428,10 @@ class Services_Language_Utilities
{
//validate input
if (! is_array($sourceStringTranslationSet)) {
- throw new Services_Exception(tr('Source string translation set is not an array'), 400);
+ throw new Services_Exception(tr('The source translation set is missing or invalid. Please ask the administrator to verify the translation file.'), 400);
}
if (! is_array($targetStringTranslationSet)) {
- throw new Services_Exception(tr('Target string translation set is not an array'), 400);
+ throw new Services_Exception(tr('The target translation set is missing or invalid. Please ask the administrator to verify the translation file.'), 400);
}
//merge means that existing translations in the target are replaced and new ones are added to the set
if ($process_type === 'merge') {
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/6b5007a5f73f82fa697805d7eafcee9d89f3a606
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/6b5007a5f73f82fa697805d7eafcee9d89f3a606
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs