[support] local.module and filtering strings

Mohammed Al-shar' mohammed at atexplorer.com
Mon Oct 23 23:31:12 UTC 2006


hi Gerhard!

I know about the po edit tool and I actually already use it whenever I am 
interested in translating a module or part of it. but I am talking about the 
modules that don't interest me, sometimes all I need to translate is the 
"dynamic strings" that drupal generates, and it could be time consuming to 
look through all the untranslated strings that I ignored to hunt those 
"dynamic strings. and I have to go through them all, because drupal seems to 
have no logic in organizing those strings.

let me give you an example, I want to use parts of the views module, if I 
install it I'll get 300 something strings and I am not interested in 
translated a single string of them. but they already added more than 300 
untranslated strings to the local.module that will be placed in different 
location through the pages that display untranslated strings. see how 
tiresome it is now to go through this big number of strings to look for the 
ones that interest you?

Regards,
Mohammed al-shar'
----- Original Message ----- 
From: "Gerhard Killesreiter" <gerhard at killesreiter.de>
To: <support at drupal.org>
Sent: Tuesday, October 24, 2006 1:53 AM
Subject: Re: [support] local.module and filtering strings


> Mohammed Al-shar' wrote:
>
> Hi Mohammed!
>
>> I am building a multi lingual site and is constantly checking the strings 
>> that need to be translated in the local.module
>>
>> the problem with this is that whenever I add a new module it adds its 
>> strings to the untranslated terms, and local.module display untranslated 
>> strings randomly.
>>
>> is there a way to filter strings that belong say to a certain module? or 
>> have local.module display strings sorted by module??
>>
>
> I think that locale.module is the wrong tool for this job. If you look
> at the contrib cvs repository you will notice that some modules come
> with translations in several languages. The file format we use for
> distribution of such translations is the PO file format used by the GNU
> gettext tool.
>
> We have a script (extractor.php) that extracts the strings that need
> translation from the module file. The script is delivered with the
> Drupal translation templates. You can run it on any module and will get
> a POT template. You can use this template with a PO editor such as PO
> edit to translate all the strings to whatever lannguage you want. And
> then you load a fresh copy and translate to the next language. Then, you
> can upload your translations directly after you installed your module.
> This way you won't see untranslated strings from the start.
>
> To be fair: What I described is an ideal scenario. In reality there are
> some strings which are created dynamically which won't be caught by the
> extractor script. Also, some contributions authors don't use Drupal's
> translation mechanism correctly.
>
> But I think it is a good start.
>
>> the reason why I want to do this, is because there are strings that i am 
>> not interested in translating because they are used mainly for 
>> administration and the admin of the site, myself, has no problem with 
>> English.
>
> In the PO editor you can always chose which strings to translate.
>
> Cheers,
> Gerhard
> -- 
> [ Drupal support list | http://lists.drupal.org/ ]
>
>
> 



More information about the support mailing list