From 6a5f5ce1579ed27649c8537bfdeb67e97f531289 Mon Sep 17 00:00:00 2001
From: AndreasErgenzinger <andreas.ergenzinger@gmx.de>
Date: Wed, 17 Apr 2013 10:29:32 +0200
Subject: [PATCH] merge translations with those from theme

---
 lib/l10n.php | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/l10n.php b/lib/l10n.php
index 315e326b29..7aef653ef7 100644
--- a/lib/l10n.php
+++ b/lib/l10n.php
@@ -125,6 +125,15 @@ class OC_L10N{
 				include strip_tags($i18ndir).strip_tags($lang).'.php';
 				if(isset($TRANSLATIONS) && is_array($TRANSLATIONS)) {
 					$this->translations = $TRANSLATIONS;
+					//merge with translations from theme
+                                        $theme = OC_Config::getValue( "theme" );
+                                        if (!is_null($theme)) {
+                                                $transFile = OC::$SERVERROOT.'/themes/'.$theme.substr($transFile, strlen(OC::$SERVERROOT));
+                                                if (file_exists($transFile)) {
+                                                        include $transFile;
+                                                        $this->translations = array_merge($this->translations, $TRANSLATIONS);
+                                                }
+                                        }
 				}
 			}
 
-- 
GitLab