Commit b5fe4124 authored by merlinofchaos's avatar merlinofchaos
Browse files

#251897 (by Jose Reyero): Fixes to translation.

parent a5719d47
......@@ -502,15 +502,15 @@ function advanced_help_get_topics() {
if (!empty($info)) {
// Get translated titles:
global $language;
if (file_exists("$module_path/translations/help/$language->language/module.help.ini")) {
$translation = parse_ini_file("$module_path/translations/help/$language->language/module.help.ini", TRUE);
if (file_exists("$module_path/translations/help/$language->language/$module.help.ini")) {
$translation = parse_ini_file("$module_path/translations/help/$language->language/$module.help.ini", TRUE);
}
foreach ($info as $name => $topic) {
// Each topic should have a name, a title, a file and of course the path.
$file = !empty($topic['file']) ? $topic['file'] : $name;
$topics[$module][$name] = array(
'name' => $name,
'title' => !empty($translation['name']['title']) ? $translation['name']['title'] : $topic['title'],
'title' => !empty($translation[$name]['title']) ? $translation[$name]['title'] : $topic['title'],
'weight' => isset($topic['weight']) ? $topic['weight'] : 0,
'parent' => isset($topic['parent']) ? $topic['parent'] : 0,
'file' => $file . '.html', // require extension
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment