aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-05-20 18:48:05 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-05-20 18:48:05 -0700
commitc55d13a836c9f62f6beac97899bc2b3f788c7bcc (patch)
treeea5dede6e13e2e49a4327c9a10d3303c3d5bd140 /include
parent6466774b6e6ed72ea1cc57cbc76e451205934aca (diff)
parenta7d39cf654cd193ab9088a34df01217776de0a33 (diff)
downloadvolse-hubzilla-c55d13a836c9f62f6beac97899bc2b3f788c7bcc.tar.gz
volse-hubzilla-c55d13a836c9f62f6beac97899bc2b3f788c7bcc.tar.bz2
volse-hubzilla-c55d13a836c9f62f6beac97899bc2b3f788c7bcc.zip
Merge https://github.com/redmatrix/redmatrix into pending_merge
Diffstat (limited to 'include')
-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].
*