diff options
author | Cash Costello <cash.costello@gmail.com> | 2012-07-14 17:39:40 -0700 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2012-07-14 17:39:40 -0700 |
commit | 78038be5795f3e766907694651c9ecaa12f3d0ef (patch) | |
tree | aecfa3729451b0e9b5a5f1a07821ff7397887ba3 | |
parent | cf151b55922b638feeeb9477b1d5dea764f4427b (diff) | |
parent | 185b73174fbd39e4b47c27f19839329438b8f3c2 (diff) | |
download | elgg-78038be5795f3e766907694651c9ecaa12f3d0ef.tar.gz elgg-78038be5795f3e766907694651c9ecaa12f3d0ef.tar.bz2 |
Merge pull request #305 from sembrestels/elgg_echo_log
Fixes #4004. elgg_logging when a language key is missing.
-rw-r--r-- | engine/lib/languages.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engine/lib/languages.php b/engine/lib/languages.php index 15c48f902..219917b29 100644 --- a/engine/lib/languages.php +++ b/engine/lib/languages.php @@ -50,8 +50,11 @@ function elgg_echo($message_key, $args = array(), $language = "") { $string = $CONFIG->translations[$language][$message_key]; } else if (isset($CONFIG->translations["en"][$message_key])) { $string = $CONFIG->translations["en"][$message_key]; + $lang = $CONFIG->translations["en"][$language]; + elgg_log(sprintf('Missing %s translation for "%s" language key', $lang, $message_key), 'NOTICE'); } else { $string = $message_key; + elgg_log(sprintf('Missing English translation for "%s" language key', $message_key), 'WARNING'); } // only pass through if we have arguments to allow backward compatibility |