[longomatch] Enable translations when working with cerbero
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Enable translations when working with cerbero
- Date: Mon, 27 Apr 2015 22:22:17 +0000 (UTC)
commit 868bdcc66dfd3367e4120f8ba221ce549127ae02
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Apr 24 21:35:21 2015 +0200
Enable translations when working with cerbero
LongoMatch.Services/CoreServices.cs | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/LongoMatch.Services/CoreServices.cs b/LongoMatch.Services/CoreServices.cs
index 4956809..8455f09 100644
--- a/LongoMatch.Services/CoreServices.cs
+++ b/LongoMatch.Services/CoreServices.cs
@@ -74,10 +74,21 @@ namespace LongoMatch.Services
g_setenv ("LANGUAGE", Config.Lang.Replace ("-", "_"), true);
#endif
}
-
- /* Init internationalization support */
- Catalog.Init (Constants.SOFTWARE_NAME.ToLower (), Config.RelativeToPrefix
("share/locale"));
+ InitTranslations ();
+
+ }
+ public static void InitTranslations ()
+ {
+ string localesDir = Config.RelativeToPrefix ("share/locale");
+
+ if (!Directory.Exists (localesDir)) {
+ localesDir = Path.Combine (
+ Environment.GetEnvironmentVariable ("CERBERO_PREFIX"),
+ "share", "locale");
+ }
+ /* Init internationalization support */
+ Catalog.Init (Constants.SOFTWARE_NAME.ToLower (), localesDir);
}
public static void Start (IGUIToolkit guiToolkit, IMultimediaToolkit multimediaToolkit)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]