aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/js_strings.php30
-rw-r--r--include/plugin.php26
-rw-r--r--include/text.php36
3 files changed, 56 insertions, 36 deletions
diff --git a/include/js_strings.php b/include/js_strings.php
new file mode 100644
index 000000000..8de789b33
--- /dev/null
+++ b/include/js_strings.php
@@ -0,0 +1,30 @@
+<?php
+
+function js_strings() {
+ return replace_macros(get_markup_template('js_strings.tpl'), array(
+ '$delitem' => t('Delete this item?'),
+ '$comment' => t('Comment'),
+ '$showmore' => t('show more'),
+ '$showfewer' => t('show fewer'),
+
+ '$t01' => ((t('timeago.prefixAgo') != 'timeago.prefixAgo') ? t('timeago.prefixAgo') : 'null'),
+ '$t02' => ((t('timeago.suffixAgo') != 'timeago.suffixAgo') ? t('timeago.suffixAgo') : 'null'),
+ '$t03' => t('ago'),
+ '$t04' => t('from now'),
+ '$t05' => t('less than a minute'),
+ '$t06' => t('about a minute'),
+ '$t07' => t('%d minutes'),
+ '$t08' => t('about an hour'),
+ '$t09' => t('about %d hours'),
+ '$t10' => t('a day'),
+ '$t11' => t('%d days'),
+ '$t12' => t('about a month'),
+ '$t13' => t('%d months'),
+ '$t14' => t('about a year'),
+ '$t15' => t('%d years'),
+ '$t16' => t(' '), // wordSeparator
+ '$t17' => ((t('timeago.numbers') != 'timeago.numbers') ? t('timeago.numbers') : '[]')
+
+
+ ));
+} \ No newline at end of file
diff --git a/include/plugin.php b/include/plugin.php
index 2460e8ad6..9555268f7 100644
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -485,3 +485,29 @@ function theme_include($file) {
}
return '';
}
+
+
+
+if(! function_exists('get_intltext_template')) {
+function get_intltext_template($s) {
+ global $a;
+
+ if(! isset($a->language))
+ $a->language = 'en';
+
+ if(file_exists("view/{$a->language}/$s"))
+ return file_get_contents("view/{$a->language}/$s");
+ elseif(file_exists("view/en/$s"))
+ return file_get_contents("view/en/$s");
+ else
+ return file_get_contents("view/$s");
+}}
+
+if(! function_exists('get_markup_template')) {
+function get_markup_template($s) {
+
+ $x = theme_include($s);
+ if($x)
+ return file_get_contents($x);
+}}
+
diff --git a/include/text.php b/include/text.php
index bddded7ee..f6c403388 100644
--- a/include/text.php
+++ b/include/text.php
@@ -387,42 +387,6 @@ function photo_new_resource() {
}}
-if(! function_exists('get_intltext_template')) {
-function get_intltext_template($s) {
- global $a;
-
- if(! isset($a->language))
- $a->language = 'en';
-
- if(file_exists("view/{$a->language}/$s"))
- return file_get_contents("view/{$a->language}/$s");
- elseif(file_exists("view/en/$s"))
- return file_get_contents("view/en/$s");
- else
- return file_get_contents("view/$s");
-}}
-
-if(! function_exists('get_markup_template')) {
-function get_markup_template($s) {
- $a=get_app();
- $theme = current_theme();
-
- if(file_exists("view/theme/$theme/tpl/$s"))
- return file_get_contents("view/theme/$theme/tpl/$s");
- elseif(file_exists("view/theme/$theme/$s"))
- return file_get_contents("view/theme/$theme/$s");
- elseif (x($a->theme_info,"extends") && file_exists("view/theme/".$a->theme_info["extends"]."/tpl/$s"))
- return file_get_contents("view/theme/".$a->theme_info["extends"]."/tpl/$s");
- elseif (x($a->theme_info,"extends") && file_exists("view/theme/".$a->theme_info["extends"]."/$s"))
- return file_get_contents("view/theme/".$a->theme_info["extends"]."/$s");
- elseif(file_exists("view/tpl/$s"))
- return file_get_contents("view/tpl/$s");
- else
- return file_get_contents("view/$s");
-
-}}
-
-