diff --git a/include/class.topic.php b/include/class.topic.php index 2db12f15149955b4a485e3724e383084d24354a8..e4afba9c0cfee7a28352d3075d8489804ca7c7dc 100644 --- a/include/class.topic.php +++ b/include/class.topic.php @@ -291,6 +291,15 @@ class Topic extends VerySimpleModel { return $T != $tag ? $T : $default; }; + $localize_this = function($id, $default) use ($localize) { + if (!$localize) + return $default; + + $tag = _H("topic.name.{$id}"); + $T = CustomDataTranslation::translate($tag); + return $T != $tag ? $T : $default; + }; + // Resolve parent names foreach ($topics as $id=>$info) { $name = $localize_this($id, $info['topic']); diff --git a/include/staff/helptopic.inc.php b/include/staff/helptopic.inc.php index 027c5b48974f12d8de33e3960a4fbd962e667444..73db1e02235e16af3f67678d704d41a98c03908d 100644 --- a/include/staff/helptopic.inc.php +++ b/include/staff/helptopic.inc.php @@ -45,7 +45,6 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </td> <td> <input type="text" size="30" name="topic" value="<?php echo $info['topic']; ?>" - data-primary-lang="<?php echo $cfg->getPrimaryLanguage(); ?>" data-translate-tag="<?php echo $trans['name']; ?>"/> <span class="error">* <?php echo $errors['topic']; ?></span> <i class="help-tip icon-question-sign" href="#topic"></i> </td>