[Fusionforge-commits] r16176 - in trunk/src: common/include etc/config.ini.d

Franck VILLAUME nerville at fusionforge.org
Wed Aug 29 20:47:30 CEST 2012


Author: nerville
Date: 2012-08-29 20:47:30 +0200 (Wed, 29 Aug 2012)
New Revision: 16176

Modified:
   trunk/src/common/include/config-vars.php
   trunk/src/common/include/gettext.php
   trunk/src/etc/config.ini.d/defaults.ini
Log:
add gettext_path config var, set default to /usr/share/locale

Modified: trunk/src/common/include/config-vars.php
===================================================================
--- trunk/src/common/include/config-vars.php	2012-08-29 18:35:21 UTC (rev 16175)
+++ trunk/src/common/include/config-vars.php	2012-08-29 18:47:30 UTC (rev 16176)
@@ -4,6 +4,7 @@
  *
  * Copyright 2010, Roland Mas
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
+ * Copyright 2012, Franck Villaume - TrivialDev
  *
  * This file is part of FusionForge. FusionForge is free software;
  * you can redistribute it and/or modify it under the terms of the
@@ -155,7 +156,7 @@
 	forge_set_config_item_bool ('use_rdf', 'core') ;
 	forge_define_config_item ('installation_environment', 'core', $GLOBALS['sys_install_type']) ;
 	forge_define_config_item ('user_default_shell', 'core', '/bin/bash') ;
-
+	forge_define_config_item('gettext_path', 'core', $GLOBALS['sys_gettext_path']);
 }
 
 // Arch plugin

Modified: trunk/src/common/include/gettext.php
===================================================================
--- trunk/src/common/include/gettext.php	2012-08-29 18:35:21 UTC (rev 16175)
+++ trunk/src/common/include/gettext.php	2012-08-29 18:47:30 UTC (rev 16176)
@@ -5,6 +5,7 @@
  * Copyright 1999-2001, VA Linux Systems, Inc.
  * Copyright 2003-2004, Guillaume Smet
  * Copyright 2007-2009, Roland Mas
+ * Copyright 2012, Franck Villaume - TrivialDev
  *
  * This file is part of FusionForge. FusionForge is free software;
  * you can redistribute it and/or modify it under the terms of the
@@ -217,8 +218,8 @@
 function setup_gettext_from_locale ($locale) {
 	setlocale(LC_ALL, $locale);
 
-	if (isset($GLOBALS['sys_gettext_path'])) {
-		bindtextdomain('fusionforge', $GLOBALS['sys_gettext_path']);
+	if (forge_get_config('gettext_path') || isset($GLOBALS['sys_gettext_path'])) {
+		bindtextdomain('fusionforge', forge_get_config('gettext_path'));
 	} else {
 		bindtextdomain('fusionforge', '/usr/share/locale/');
 	}

Modified: trunk/src/etc/config.ini.d/defaults.ini
===================================================================
--- trunk/src/etc/config.ini.d/defaults.ini	2012-08-29 18:35:21 UTC (rev 16175)
+++ trunk/src/etc/config.ini.d/defaults.ini	2012-08-29 18:47:30 UTC (rev 16176)
@@ -85,5 +85,6 @@
 allow_project_without_template = yes
 use_webdav = no
 user_default_shell = "/bin/bash"
+gettext_path = "/usr/share/locale"
 
 scm_single_host = yes




More information about the Fusionforge-commits mailing list