[translations] Translating module names?
Gabor Hojtsy
gabor at hojtsy.hu
Tue Jun 19 08:26:31 UTC 2007
Cog Rusty wrote:
> On 6/19/07, Derek Wright <drupal at dwwright.net> wrote:
>> http://drupal.org/node/152375
>>
>> Huh? I thought you weren't supposed to put dynamic strings in t().
>>
>> What's the party line on translating module names that appear in the
>> interface? D5 core doesn't do this on the modules page, it seems...
>> it just reads whatever is in the .info files and displays that.
>
> I don't know whether there is a party line but it doesn't make sense
> to translate the module names which appear in the
> "/admin/build/modules" page. That page is supposed to be used by the
> site administrator for finding and enabling modules. The names must be
> unambiguous.
Everywhere else they are translated, and they are not ambiguous. It was
definitely possible before to translate module names even on the module
list page.
> This becomes even worse if a translation of some insignificant module
> overwrites such a translated string.
Well, you need to trust the translators. They put code into their plural
formulas which will be eval()-ed on all your page views (although there
is a syntax check to try to prevent problems there, which might or might
not be worked around by an evil guy :), they can translate 'enabled' to
'disabled' and vice versa. A translation "of some insignificant module"
can break anything on your site in terms of string changes.
> On the other hand, sometimes a string same as a module's name appears
> in a menu, which we would like to translate. The current absence of a
> t() in the module names which appear in "/admin/build/modules" is a
> good thing because it allows us to translate a module name everywhere
> else if we want to.
Allows us? How does it allow us?
BTW I am not against putting the original module name to a visible
place. Module names and module file names are already not in concert,
lots of them use abbreviations or expanded names. Like core has
translation.module which is named "Content translation". With the
multiple directories where modules can reside (and given you don't know
the file name for sure) also makes hard to find a module on your own
installation for starters, not even reaching to a project page.
To help this situation, we can put a 'title="'. t('Original module name:
%name, location: %path', array('%name' => $name, '%path' => $path)) .
'"' onto the module list items for example (and let the module names be
translated).
Gabor
More information about the translations
mailing list