summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Philipp2012-03-01 11:50:02 (GMT)
committer Peter Philipp2012-03-01 11:50:02 (GMT)
commit232cbbd44949fd92031eb36774fcd407bb332680 (patch)
treeea1bfe13a39f187179a21baa2a4a159818e51650
parent0aa0dc2c8924e6a6bf4bade4b512167900e26b42 (diff)
Fixed translation replacement.
-rw-r--r--i18n_panels.module15
1 files changed, 11 insertions, 4 deletions
diff --git a/i18n_panels.module b/i18n_panels.module
index f09478d..80aae3f 100644
--- a/i18n_panels.module
+++ b/i18n_panels.module
@@ -127,10 +127,12 @@ function i18n_panels_panels_pane_prerender($pane) {
unset($translation_object->uuid, $translation_object->i18n_settings);
foreach ($translation_object as $i18n_setting => $translated_setting) {
if ($i18n_setting != 'panels_i18n_settings') {
- if (!isset($translated_setting['string'])) {
- $translated_setting['string'] = $translated_setting;
+ if (!is_array($translated_setting)) {
+ $pane->configuration[$i18n_setting] = $translated_setting;
+ }
+ else {
+ $pane->configuration[$i18n_setting] = $translated_setting['string'];
}
- $pane->configuration[$i18n_setting] = $translated_setting['string'];
}
}
}
@@ -181,7 +183,12 @@ function i18n_panels_panels_delete_display($did) {
*/
function i18n_panels_panels_pre_render(&$display, $renderer) {
$translation = i18n_string_object_translate('display_configuration', $display);
- $display->title = $translation->title;
+ if (is_array($translation->title)) {
+ $display->title = $translation->title['string'];
+ }
+ else {
+ $display->title = $translation->title;
+ }
}