On Thu, Jan 31, 2008 at 04:18:38PM +0200, Nikolay Bachiyski wrote:
> 2008/1/22, Lionel Elie Mamane <[EMAIL PROTECTED]>:
>> On Tue, Jan 22, 2008 at 09:14:40PM +0200, Nikolay Bachiyski wrote:
>>> 2008/1/22, Lionel Elie Mamane <[EMAIL PROTECTED]>:

>>>> Well, we would like to have as much translated as is feasible without
>>>> duplicating the whole code.

>>>> What I would be OK with is a scheme where we have one copy of the
>>>> code (with English strings or placeholders like
>>>> @WP_STRING_ERR_NO_CONFIG@), (...)  and then we automatically
>>>> produce the localised versions by statically replacing the
>>>> strings/placeholders in the code.

>>> (...) I don't want to make WordPress depend on a build stage.

>> It would have to depend on a build stage only for developers.

>>> Also, after we have once replaced them, we are losing the actual
>>> placeholders and upgrades can be a nightmare.

>> The actual placeholders can be left inside specially-formatted PHP
>> comments instead of being purely replaced.

> However, I like the idea of specially-formatted comments -- something like:

> wp_die(/*WP_I18N_NOWPCONF*/"There doesn't seem to be a
> <code>wp-config.php</code> file..."/*/WP_I18N_NOWPCONF*/");

> Thus we can put these strings into the mo file and replace them on the
> localized package build stage.

I realised we didn't discuss in what language the l10n build stage
should be written in. I guess you don't want anything exotic to your
eyes (such as OCaml), that much is clear, but e.g. do you want that
stage to be easily doable on Microsoft Windows? I see two choices that
I'd expect you could find reasonable:

 - UNIX /bin/sh shell script, using sed, gettext.sh, etc, if it is OK
   for the l10n build stage to run only on Unix (and clones) and
   possibly MS Windows with cygwin (or other Unix compatibility layer)
   installed.

 - PHP, if it has to run on Microsoft Windows without Unix
   compatibility layer.

I'm starting a shell script "proof of concept" implementation after
breakfast.

I'm schoinobates on FreeNode IRC. Feel free to msg me there to discuss
a point or the other.

-- 
Lionel



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to