aboutsummaryrefslogtreecommitdiffstats
path: root/include/language.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-05-12 17:06:47 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-05-12 17:06:47 -0700
commit19706705965ffa40799f1e2ca6c061f00eff74b6 (patch)
tree221377b7753f8f82c77458bcf95a9ead5e842db5 /include/language.php
parent5dcdb676fd075eb1cbf8a81a572444dd7b2e9eca (diff)
downloadvolse-hubzilla-19706705965ffa40799f1e2ca6c061f00eff74b6.tar.gz
volse-hubzilla-19706705965ffa40799f1e2ca6c061f00eff74b6.tar.bz2
volse-hubzilla-19706705965ffa40799f1e2ca6c061f00eff74b6.zip
replace project name with $product or $Product in strings to avoid merge issues across different project names. Currently a place-holder. The strings themselves have not yet been modified.
Diffstat (limited to 'include/language.php')
-rw-r--r--include/language.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/include/language.php b/include/language.php
index 1e8528dc1..0af72142f 100644
--- a/include/language.php
+++ b/include/language.php
@@ -159,13 +159,26 @@ function t($s, $ctx = '') {
if (x($a->strings, $cs)) {
$t = $a->strings[$cs];
- return is_array($t) ? $t[0] : $t;
+ return ((is_array($t)) ? translate_product($t[0]) : translate_product($t));
}
- return $s;
+ return translate_product($s);
}
/**
+ * @brief translate product name
+ * Merging strings from different project names is problematic so we'll do that with a string replacement
+ */
+
+function translate_product($s) {
+
+ return str_replace(array('$product','$Product'),array(RED_PLATFORM,ucfirst(RED_PLATFORM)),$s);
+
+}
+
+
+
+/**
* @brief
*
* @param string $singular