Skip to content

Commit

Permalink
fix translation for pdf and print button (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzmg committed Feb 26, 2021
1 parent 3dd4402 commit 342595b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions system/modules/sharebuttons/classes/ShareButtons.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,12 @@ public function getNetworks(DataContainer $dc)
unset($networks['pdf']);
}

foreach ($networks as $network => &$label) {
if (!empty($GLOBALS['TL_LANG']['sharebuttons']['networks'][$network])) {
$label = $GLOBALS['TL_LANG']['sharebuttons']['networks'][$network];
}
}

return $networks;
}

Expand Down
2 changes: 1 addition & 1 deletion system/modules/sharebuttons/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
'reddit' => 'Reddit',
'whatsapp' => 'WhatsApp',
'print' => 'Print',
'pdf' => 'Pdf'
'pdf' => 'PDF'
);

$GLOBALS['sharebuttons']['themes'] = array(
Expand Down
4 changes: 2 additions & 2 deletions system/modules/sharebuttons/languages/de/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@
$GLOBALS['TL_LANG']['CTE']['sharebuttons'] = array('Share buttons', 'Buttons zum teilen von Seitenlinks auf sozialen Netzwerken.');
$GLOBALS['TL_LANG']['FMD']['sharebuttons'] = $GLOBALS['TL_LANG']['CTE']['sharebuttons'];

$GLOBALS['sharebuttons']['networks']['print'] = 'Drucken';
$GLOBALS['sharebuttons']['networks']['pdf'] = 'PDF erzeugen';
$GLOBALS['TL_LANG']['sharebuttons']['networks']['print'] = 'Drucken';
$GLOBALS['TL_LANG']['sharebuttons']['networks']['pdf'] = 'PDF erzeugen';
2 changes: 1 addition & 1 deletion system/modules/sharebuttons/languages/en/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@
$GLOBALS['TL_LANG']['CTE']['sharebuttons'] = array('Share buttons', 'Social share buttons with optional theme.');
$GLOBALS['TL_LANG']['FMD']['sharebuttons'] = $GLOBALS['TL_LANG']['CTE']['sharebuttons'];

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

0 comments on commit 342595b

Please sign in to comment.