summaryrefslogtreecommitdiffstats
path: root/03_fix_locale_location.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2010-05-23 13:13:03 +0200
committerRemi Collet <fedora@famillecollet.com>2010-05-23 13:13:03 +0200
commit1cf882aff9f282f79a75d9078a42ff75b640d855 (patch)
tree9e81523c42f56ebb686ab2e4ce1d5c5c8c94d29c /03_fix_locale_location.patch
parent73389078895930be498ea01bcf06bfa6fed2a9e1 (diff)
start cleaning
Diffstat (limited to '03_fix_locale_location.patch')
-rw-r--r--03_fix_locale_location.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/03_fix_locale_location.patch b/03_fix_locale_location.patch
new file mode 100644
index 0000000..148a9d0
--- /dev/null
+++ b/03_fix_locale_location.patch
@@ -0,0 +1,41 @@
+diff -urNad gosa-2.6.0+svn11288~/include/php_setup.inc gosa-2.6.0+svn11288/include/php_setup.inc
+--- gosa-2.6.0+svn11288~/include/php_setup.inc 2008-06-11 15:55:59.000000000 +0200
++++ gosa-2.6.0+svn11288/include/php_setup.inc 2008-06-11 15:56:00.000000000 +0200
+@@ -20,7 +20,7 @@
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+-define ("LOCALE_DIR", dirname(dirname(__FILE__))."/locale/compiled");
++define ("LOCALE_DIR", "/var/cache/gosa/locale");
+
+ function gosaRaiseError($errno, $errstr, $errfile, $errline)
+ {
+diff -urNad gosa-2.6.0+svn11288~/update-gosa gosa-2.6.0+svn11288/update-gosa
+--- gosa-2.6.0+svn11288~/update-gosa 2008-06-11 15:55:59.000000000 +0200
++++ gosa-2.6.0+svn11288/update-gosa 2008-06-11 16:02:30.000000000 +0200
+@@ -169,20 +169,20 @@
+
+ /* For each language, merge the target .mo to the compiled directory. */
+ foreach ($languages as $language => $po_files){
+- if (!is_dir(LOCALE_DIR."/compiled/${language}/LC_MESSAGES")){
+- if (!mkdir (LOCALE_DIR."/compiled/${language}/LC_MESSAGES", 0755, TRUE)){
+- echo "Failed to create '".LOCALE_DIR."/compiled/${language}/LC_MESSAGES'- aborted";
++ if (!is_dir("/var/cache/gosa/locale/${language}/LC_MESSAGES")){
++ if (!mkdir ("/var/cache/gosa/locale/${language}/LC_MESSAGES", 0755, TRUE)){
++ echo "Failed to create '/var/cache/gosa/locale/${language}/LC_MESSAGES'- aborted";
+ exit (3);
+ }
+ }
+
+ /* Cat all these po files into one single file */
+- system ("(cd ".LOCALE_DIR." && msgcat --use-first ".implode(" ", $po_files)." > compiled/${language}/LC_MESSAGES/messages.po)", $val);
++ system ("(cd ".LOCALE_DIR." && msgcat --use-first ".implode(" ", $po_files)." > /var/cache/gosa/locale/${language}/LC_MESSAGES/messages.po)", $val);
+ if ($val != 0){
+ echo "Merging of message files failed - aborted";
+ exit (4);
+ }
+- system ("(cd ".LOCALE_DIR."/compiled/${language}/LC_MESSAGES && msgfmt -o messages.mo messages.po && rm messages.po)", $val);
++ system ("(cd /var/cache/gosa/locale/${language}/LC_MESSAGES && msgfmt -o messages.mo messages.po && rm messages.po)", $val);
+ if ($val != 0){
+ echo "Compiling of message files failed - aborted";
+ exit (5);