function advanced_help_get_module_name($module) {
  $settings = advanced_help_get_settings();
  if (isset($settings[$module]['name'])) {
    $name = $settings[$module]['name'];
  }
  else {
    $info = db_fetch_object(db_query("SELECT * FROM {system} WHERE name = '%s'", $module));
    $info = unserialize($info->info);
    $name = t($info['name']); <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  }
  return $name;
}

As I know Drupal core does not translate module names, so the line 351 should be changed to

    $name = $info['name'];
CommentFileSizeAuthor
#1 368201_module_name_translated.patch600 bytespasqualle

Comments

pasqualle’s picture

Status: Active » Needs review
StatusFileSize
new600 bytes

and the patch

hass’s picture

Module names in menus are very often translated... For example Books -> Bücher in German. The only page where module names are not translated is on the modules page themself as I know.

pasqualle’s picture

actually it is 'Books' in the menu item and the module name is 'Book', but even if the menu item would be 'Book' it is still not a module name. So it is good to translate that.

The module name can be easily differentiated. If you use the $info['name'] string that is a module name. Module names are not translated, as you perfectly pointed out with an example (page admin/build/modules)..

redndahead’s picture

Help does not translate names so nor should we. I'll patch this before making a new release.

hass’s picture

Nope, we need to be able to translate module names in general, see #3. I tend to won't fix.

redndahead’s picture

Unless I am misreading it seems that Pasqualle is saying that they aren't normally translated. If I enable a module I'm going to look for the same module name when looking for the help.

pasqualle’s picture

@hass: can you explain? I still think module names should not be displayed as translated..
You can translate strings which are same as module names..

hass’s picture

Status: Needs review » Closed (won't fix)

In German we translate module names. It's very common in core. Module names are often English and people may not understand the meaning. If a module is named "Bücher" in German they are searching the help for "Bücher" (de) - not "Books" (en). I know the rule not to translate module names, but it's something nobody follows in core. Menu items are normally translated, but help texts often use the untranslated names, but this hardly depends on context. If you do not like to translate it in your language - you can simply copy the English to the German value - today and you are also done. If a string is wrongly translated you might have an context sensitive issue - what is really different one. This is why it's planned to have context's in the t() function for D7 (see #334283: Add msgctxt-type context to t()).

So if we describe functionality in help texts we may use the real modules name to make it easier for users to search on d.o and for *no* other reason. Translating module names is on the end of the day a usability issue in your site as people do not understand English words and their meaning - and on the other side with untranslated module names we'd like to help developers to search for the right words on d.o. The last is not that important if they are able to see the untranslated module name on their modules page. Not translating menu items into the correct language results in very bad user experience and we don't do it.

As already said - if you don't like to translate a module name you can keep or copy over the English value to the translation, but keep it translatable for others that think it's better to translate. Not all people in the world learn or speak English... and we shouldn't keep them out only because someone they are working for made a decision for Drupal.

pasqualle’s picture

Status: Closed (won't fix) » Active

if you don't like to translate a module name you can keep or copy over the English value to the translation

no, no, no

I want to translate Books to Bücher, and I want Bücher in menu items, but if the string is a module name, then I don't want to display it as translated.. Here in this case, advanced help displays a string which comes from a module name $info['name'].

example:
$info['name'] = 'Books' -> display as Books
menu item: 'Books' -> display as Bücher

redndahead’s picture

Status: Active » Closed (won't fix)

Let me see if I understand you correctly haas. Even though currently in core you cannot get a module name translated you think it should be able to be translated. i.e. the module listing page. The names of those modules should be translated.

So since you feel core admin/build/modules names should be translated that advanced help should use translated module names.

While I can see your point here is my thinking on why core will not possibly ever translate modules names. When you search d.o the module name is in English. When you download the module the directory name is in English. When you go to enable the module you should be looking for the same name of the item that you downloaded.

Now back to the topic at hand.

Advanced help is a Help system. So lets find our audience. If I am the builder of the site I pretty much need to speak a little bit of English to get the site started. The site maintainer will already have all the menu items translated so the site maintainer does not have to speak any English.
Does the help files apply to the site builder? Yes.
Does the help files apply to the site maintainer? Yes.
Is there any downside to translating the module names? I don't really see any.
Are the module names going to be translated in the help system for D7? More than likely.

So to sum up. Even though I said that if you enable the module you are going to be looking for the same module name in the help, that is not our only audience. So haas you've convinced me.

Marking as won't fix. Pasqualle, rebuttal?

pasqualle’s picture

This is the main issue about module name translation: #152375: Implement translatable module names (with context)

current status: D6 module names are not displayed as translated
future: maybe in D7

redndahead’s picture

Yeah let's get ahead of the game and maybe be an example of why it's important. Thanks for the link Pasqualle