summaryrefslogtreecommitdiff
path: root/resources/views/admin
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2022-01-24 14:31:42 +0000
committerGreg Roach <greg@subaqua.co.uk>2022-01-24 14:31:42 +0000
commit7b30610bdbe446efd1a5af081b1960eed3847c58 (patch)
tree6716883f7efe137e27e9b368143fa8c836b27998 /resources/views/admin
parentad40cb91c38cc41363ce741af80a1fe9a0978005 (diff)
downloadwebtrees-7b30610bdbe446efd1a5af081b1960eed3847c58.tar.gz
webtrees-7b30610bdbe446efd1a5af081b1960eed3847c58.tar.bz2
webtrees-7b30610bdbe446efd1a5af081b1960eed3847c58.zip
Fix: #3413, Replace: #3417 - allow translation of title/description for disabled custom modules
Diffstat (limited to 'resources/views/admin')
-rw-r--r--resources/views/admin/components.phtml2
-rw-r--r--resources/views/admin/modules.phtml4
2 files changed, 3 insertions, 3 deletions
diff --git a/resources/views/admin/components.phtml b/resources/views/admin/components.phtml
index 5295af3925..cf48848d4c 100644
--- a/resources/views/admin/components.phtml
+++ b/resources/views/admin/components.phtml
@@ -54,7 +54,7 @@ use Illuminate\Support\Collection;
<th scope="col">
<input type="hidden" name="order[]" value="<?= e($module->name()) ?>">
<span title="<?= e(strip_tags($module->description())) ?>">
- <?= $module->title() ?>
+ <?= $module instanceof ModuleCustomInterface ? $module->customTranslations(I18N::languageTag())[$module->title()] ?? $module->title() : $module->title() ?>
</span>
<?php if ($module instanceof ModuleConfigInterface) : ?>
<?php if ($module->isEnabled()) : ?>
diff --git a/resources/views/admin/modules.phtml b/resources/views/admin/modules.phtml
index 60a591a493..2fba32e374 100644
--- a/resources/views/admin/modules.phtml
+++ b/resources/views/admin/modules.phtml
@@ -130,13 +130,13 @@ use Illuminate\Support\Collection;
<?php foreach ($modules as $module) : ?>
<tr>
<th scope="row" dir="auto">
- <?= $module->title() ?>
+ <?= $module instanceof ModuleCustomInterface ? $module->customTranslations(I18N::languageTag())[$module->title()] ?? $module->title() : $module->title() ?>
</th>
<td class="text-center" data-sort="<?= $module->isEnabled() ?>">
<?= view('components/checkbox', ['label' => '', 'name' => 'status-' . $module->name(), 'checked' => $module->isEnabled()]) ?>
</td>
<td>
- <?= $module->description() ?>
+ <?= $module instanceof ModuleCustomInterface ? $module->customTranslations(I18N::languageTag())[$module->description()] ?? $module->description() : $module->description() ?>
<?php if ($module instanceof ModuleCustomInterface) : ?>
<?= view('admin/custom-module-info', ['module' => $module]) ?>
<?php endif ?>