From 7ccb65ea9ebf10e35c09bbebf8ffe1118d3fb0fb Mon Sep 17 00:00:00 2001
From: Andy Staudacher
Date: Tue, 9 Jun 2009 19:49:06 -0700
Subject: Fix for fetching l10n plural messages. Need to cast from stdclass to
array(), as I18n expects all messages to be either string or array.
---
modules/gallery/helpers/l10n_client.php | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
(limited to 'modules')
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
--
cgit v1.2.3
From 7e4fcb97cb4a575811c1e84ced07fbaf4d7ed7ba Mon Sep 17 00:00:00 2001
From: Andy Staudacher
Date: Tue, 9 Jun 2009 20:10:34 -0700
Subject: Fix HTML bug in l10n message
---
modules/gallery/views/admin_advanced_settings.html.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'modules')
diff --git a/modules/gallery/views/admin_advanced_settings.html.php b/modules/gallery/views/admin_advanced_settings.html.php
index 34abadea..b4dedaef 100644
--- a/modules/gallery/views/admin_advanced_settings.html.php
+++ b/modules/gallery/views/admin_advanced_settings.html.php
@@ -6,7 +6,7 @@
-
- = t("Change these values at your own risk!") ?>
+ = t("Change these values at your own risk!") ?>
--
cgit v1.2.3