Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.12.2

Request #2236 Error messages using gettext
Submitted: 2004-08-27 09:19 UTC
From: joho at webbplatsen dot se Assigned: danielc
Status: Wont fix Package: DB
PHP Version: 4.3.7 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2004-08-27 09:19 UTC] joho at webbplatsen dot se
Description: ------------ I'm using DB(.php) 1.59 and was wondering if it wouldn't be a good idea to add gettext-wrappers around all error messages to prevent people from having to modify the actual class(es) to translate error messages. For example, the errorMessage() function maps error codes to error texts; in that mapping, would it not make sense to use _('already exists') instead of just 'already exists'. If no gettext is being used, it won't affect anything (or does PHP generate a RTE if the gettext extensions aren't compiled.. ?) Perhaps also, prefix the messages with _('PEARDB: already exists') so that you minimize the risk of running into conflicting translations.

Comments

 [2004-08-27 14:55 UTC] danielc
While allowing the messages to be changed would be nice, we will not be changing the text messages. Individual developers needing to translate items will have to figure out their own means, like their own custom patch to DB.php.
 [2004-08-29 18:35 UTC] joho at webbplatsen dot se
I thought one of the many reasons for using PEAR-stuff was to maintain some level of transparency; this transparency surely isn't just meant to the interface to other component such as XML, HTTP, databases, etc. The less I have to fiddle with the module code as a developer, the more likely I am to stay up to date with new releases and incorporate them into my projects. Oh well, it was worth a try, and my two cents..