Skip to content

Commit 342595b

Browse files
committed
fix translation for pdf and print button (#47)
1 parent 3dd4402 commit 342595b

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

system/modules/sharebuttons/classes/ShareButtons.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,12 @@ public function getNetworks(DataContainer $dc)
396396
unset($networks['pdf']);
397397
}
398398

399+
foreach ($networks as $network => &$label) {
400+
if (!empty($GLOBALS['TL_LANG']['sharebuttons']['networks'][$network])) {
401+
$label = $GLOBALS['TL_LANG']['sharebuttons']['networks'][$network];
402+
}
403+
}
404+
399405
return $networks;
400406
}
401407

system/modules/sharebuttons/config/config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
'reddit' => 'Reddit',
5656
'whatsapp' => 'WhatsApp',
5757
'print' => 'Print',
58-
'pdf' => 'Pdf'
58+
'pdf' => 'PDF'
5959
);
6060

6161
$GLOBALS['sharebuttons']['themes'] = array(

system/modules/sharebuttons/languages/de/default.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@
4242
$GLOBALS['TL_LANG']['CTE']['sharebuttons'] = array('Share buttons', 'Buttons zum teilen von Seitenlinks auf sozialen Netzwerken.');
4343
$GLOBALS['TL_LANG']['FMD']['sharebuttons'] = $GLOBALS['TL_LANG']['CTE']['sharebuttons'];
4444

45-
$GLOBALS['sharebuttons']['networks']['print'] = 'Drucken';
46-
$GLOBALS['sharebuttons']['networks']['pdf'] = 'PDF erzeugen';
45+
$GLOBALS['TL_LANG']['sharebuttons']['networks']['print'] = 'Drucken';
46+
$GLOBALS['TL_LANG']['sharebuttons']['networks']['pdf'] = 'PDF erzeugen';

system/modules/sharebuttons/languages/en/default.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@
4242
$GLOBALS['TL_LANG']['CTE']['sharebuttons'] = array('Share buttons', 'Social share buttons with optional theme.');
4343
$GLOBALS['TL_LANG']['FMD']['sharebuttons'] = $GLOBALS['TL_LANG']['CTE']['sharebuttons'];
4444

45-
$GLOBALS['sharebuttons']['networks']['pdf'] = 'create PDF';
45+
$GLOBALS['TL_LANG']['sharebuttons']['networks']['pdf'] = 'create PDF';

0 commit comments

Comments
 (0)