[wp-hackers] Fixed pre-gettext strings in one dedicated file
Alex Günsche
ag.ml2008 at zirona.com
Tue Mar 11 12:25:43 GMT 2008
Hi,
Currently, there are a couple of files with pre-gettext strings that
need to be translated directly:
http://codex.wordpress.org/Files_For_Direct_Translation#List_of_Files_to_Translate
Now, the code in these files changes, while the few strings that are
required before gettext is loaded, almost never change. Still, with
every little WP update, these files need to be reviewed, and if
necessary, the translation must be merged into the new file. This is not
much, but nevertheless tedious work.
How about the following:
These few strings that almost never change, while the files containing
them change quite frequently, should go to a dedicated file and set as
constants.
For example in wp-db.php:
<?php
require_once '../wp-includes/direct_translations.php';
// maybe check if WPDB_ERR_SELECT_DB is set and fallback
$this->bail(WPDB_ERR_SELECT_DB);
?>
This way, there would have to be only *one* file to be overwritten by
locale versions, and it would be a file that contains no actual code to
execute. This would significantly reduce (if not eliminate) the risk
that a locale version uses an obsolete or badly patched file. It makes
even more sense as the TinyMCE messages don't need to be translated
directly anymore.
What do you think, is this worth creating a Trac ticket?
Regards,
Alex
--
Alex Günsche, Zirona OpenSource-Consulting
Blogs: http://www.zirona.com/ | http://www.regularimpressions.net
*** Want to test the shiny new release of InstantUpgrade? ***
http://www.zirona.com/blog/software/instantupgrade-10-beta/
More information about the wp-hackers
mailing list