aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-05-20 08:34:40 +0200
committerMario Vavti <mario@mariovavti.com>2015-05-20 08:34:40 +0200
commit578d21120a4aa43b4f42837af60dcbbea481a260 (patch)
treee7c3351cb7daa1770bfa310d902796941563bb70 /include/bbcode.php
parentfe00d29047da1cb99cbc06af938268ec9e6a8fcb (diff)
downloadvolse-hubzilla-578d21120a4aa43b4f42837af60dcbbea481a260.tar.gz
volse-hubzilla-578d21120a4aa43b4f42837af60dcbbea481a260.tar.bz2
volse-hubzilla-578d21120a4aa43b4f42837af60dcbbea481a260.zip
make design elements translateable
Diffstat (limited to 'include/bbcode.php')
-rw-r--r--include/bbcode.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index c6d756cdd..1f5a65399 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -175,12 +175,29 @@ function bb_parse_element($match) {
$j = json_decode(base64url_decode($match[1]),true);
if ($j) {
- $o = EOL . '<a href="#" onclick="importElement(\'' . $match[1] . '\'); return false;" >' . t('Install ' . $j['type'] . ' element: ') . $j['pagetitle'] . '</a>' . EOL;
+ $text = sprintf( t('Install %s element: '), translate_design_element($j['type'])) . $j['pagetitle'];
+ $o = EOL . '<a href="#" onclick="importElement(\'' . $match[1] . '\'); return false;" >' . $text . '</a>' . EOL;
}
return $o;
}
+function translate_design_element($type) {
+ switch($type) {
+ case 'webpage':
+ $ret = t('webpage');
+ break;
+ case 'layout':
+ $ret = t('layout');
+ break;
+ case 'block':
+ $ret = t('block');
+ break;
+ }
+
+ return $ret;
+}
+
/**
* @brief Returns an QR-code image from a value given in $match[1].
*