summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/l10n_client.php
diff options
context:
space:
mode:
authorjhilden <jakobhilden@gmail.com>2009-06-10 00:10:18 -0400
committerjhilden <jakobhilden@gmail.com>2009-06-10 00:10:18 -0400
commitdab0799b6557b7ea2ac5e5a262bae4ecf054b80e (patch)
tree56948e93b9c3644e75b148c6bae1384d932074b7 /modules/gallery/helpers/l10n_client.php
parentf1c91ab9779542f1605476bc52c57d5f14294e97 (diff)
parentf55686c7ef2ca5f3c2c78588e39ac717064c5e09 (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/helpers/l10n_client.php')
-rw-r--r--modules/gallery/helpers/l10n_client.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/gallery/helpers/l10n_client.php b/modules/gallery/helpers/l10n_client.php
index 33f23857..20f81ecc 100644
--- a/modules/gallery/helpers/l10n_client.php
+++ b/modules/gallery/helpers/l10n_client.php
@@ -123,7 +123,12 @@ class l10n_client_Core {
$key = $message_data->key;
$locale = $message_data->locale;
$revision = $message_data->rev;
- $translation = serialize(json_decode($message_data->translation));
+ $translation = json_decode($message_data->translation);
+ if (!is_string($translation)) {
+ // Normalize stdclass to array
+ $translation = (array) $translation;
+ }
+ $translation = serialize($translation);
// @todo Should we normalize the incoming_translations table into messages(id, key, message)
// and incoming_translations(id, translation, locale, revision)? Or just allow