aboutsummaryrefslogtreecommitdiff
path: root/mod/developers/start.php
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-07-02 19:22:07 -0400
committercash <cash.costello@gmail.com>2011-07-02 19:22:07 -0400
commita60e2d661f8895ed643b5c0b38e18add806a6883 (patch)
treea72f408a5073bfc3cdd91fe55b6e3d648e7bf2a8 /mod/developers/start.php
parent9342a351b331b378f1282794218ff9b26d278ce2 (diff)
downloadelgg-a60e2d661f8895ed643b5c0b38e18add806a6883.tar.gz
elgg-a60e2d661f8895ed643b5c0b38e18add806a6883.tar.bz2
Fixes #3500 added setting for raw string display
Diffstat (limited to 'mod/developers/start.php')
-rw-r--r--mod/developers/start.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/mod/developers/start.php b/mod/developers/start.php
index 23b82d9db..b864bca1e 100644
--- a/mod/developers/start.php
+++ b/mod/developers/start.php
@@ -40,6 +40,12 @@ function developers_process_settings() {
elgg_register_plugin_hook_handler('debug', 'log', array($cache, 'insertDump'));
elgg_extend_view('page/elements/foot', 'developers/log');
}
+
+ if (elgg_get_plugin_setting('show_strings', 'developers') == 1) {
+ // first and last in case a plugin registers a translation in an init method
+ register_elgg_event_handler('init', 'system', 'developers_clear_strings', 1000);
+ register_elgg_event_handler('init', 'system', 'developers_clear_strings', 1);
+ }
}
function developers_setup_menu() {
@@ -51,6 +57,17 @@ function developers_setup_menu() {
}
/**
+* Clear all the strings so the raw descriptor strings are displayed
+*/
+function developers_clear_strings() {
+ global $CONFIG;
+
+ $language = get_language();
+ $CONFIG->translations[$language] = array();
+ $CONFIG->translations['en'] = array();
+}
+
+/**
* Serve the theme preview pages
*
* @param array $page