aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-05-20 20:49:06 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-05-20 20:49:06 -0700
commit3763f74a104d5a9b91b3ddba5dd091640672e9bf (patch)
tree90883fc46613327fd17ebb19912d270e51664a2b /include/bbcode.php
parentc10a4ca9c7422e2d68b3222e5c1a605ff6f456d6 (diff)
parent62df06b3d6b2e56d271b69bebf8427caa715dd16 (diff)
downloadvolse-hubzilla-3763f74a104d5a9b91b3ddba5dd091640672e9bf.tar.gz
volse-hubzilla-3763f74a104d5a9b91b3ddba5dd091640672e9bf.tar.bz2
volse-hubzilla-3763f74a104d5a9b91b3ddba5dd091640672e9bf.zip
Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts: include/items.php include/text.php mod/item.php view/nl/messages.po
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 260240a44..1239e5497 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].
*