[development] translation for the installer?

Gabor Hojtsy gabor at hojtsy.hu
Fri Jul 14 21:25:31 UTC 2006


Mark, this seemed to be a good observation first, but then I looked into 
it. t() is in common.inc. The installer bootstraps into 
DRUPAL_BOOTSTRAP_CONFIGURATION, which is the first bootstrap phase. 
common.inc is only loaded in DRUPAL_BOOTSTRAP_FULL which is the last 
phase, and obviously never reached in install time. This is not a problem 
actually, as we need another function as I will explain elsewhere in this 
thread.

Gabor

On Fri, 14 Jul 2006, mark burdett wrote:

> t() calls locale(), If the locale module is not loaded by the
> installer then locale() could be defined as needed..
>
> --mark
>
> On 7/14/06, Gerhard Killesreiter <gerhard at killesreiter.de> wrote:
>> Jeremy Andrews wrote:
>>> On Fri, 14 Jul 2006 15:45:35 +0200 (CEST)
>>> Gabor Hojtsy <gabor at hojtsy.hu> wrote:
>>> 
>>>>  - come up with some custom process of providing
>>>> translations for the installer, like a simple key->value
>>>> pair text file.
>>> 
>>> When I started the installer patch, my intention for
>>> translations was to emulate the t() function (under a
>>> different name), loading translations from a text file rather
>>> than the database, with a simple key-value pair as you
>>> describe.
>>> 
>>> Where you run into a problem is when there's shared messages,
>>> ie as is desired by the requirements api which could also be
>>> used by Drupal itself when enabling modules, as well as by
>>> the installer during initial setup.  Any text displayed by
>>> Drupal is already wrapped in t(), so I think the logical
>>> thing to do is to expand t() to support both reading mappings
>>> from text fiels in addition to from the database.  Then t()
>>> could be consistently used in all code, including the
>>> installer.
>> 
>> t() is called at least several dozen times per page, any complication
>> should be avoided. The installer is a one time thing and should not
>> impact the running of the site.
>> 
>> Cheers,
>> Gerhard
>> 
>>> 
>>> Cheers,
>>> -Jeremy
>>> 
>> 
>> 
>
>
> -- 
> mark burdett
> mark at goodstorm.com
> +1 (415) 341-2815 [mobile]
> +1 (415) 223-0305 [office]
> http://www.goodstorm.com/
> 835 Terry Francois St
> San Francisco CA 94158-2209
>


More information about the development mailing list