Code

Added locale location fix
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 9 Apr 2008 07:24:31 +0000 (07:24 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 9 Apr 2008 07:24:31 +0000 (07:24 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10289 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/debian/patches/00list [new file with mode: 0644]
gosa-core/debian/patches/04_fix_locale_location.dpatch [new file with mode: 0755]

diff --git a/gosa-core/debian/patches/00list b/gosa-core/debian/patches/00list
new file mode 100644 (file)
index 0000000..3f4c930
--- /dev/null
@@ -0,0 +1,5 @@
+00list
+01_fix_smarty_location.dpatch
+02_fix_template_location.dpatch
+03_fix_class_mapping.dpatch
+04_fix_locale_location.dpatch
diff --git a/gosa-core/debian/patches/04_fix_locale_location.dpatch b/gosa-core/debian/patches/04_fix_locale_location.dpatch
new file mode 100755 (executable)
index 0000000..c86009a
--- /dev/null
@@ -0,0 +1,48 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04_fix_locale_location.dpatch by  <cajus@localhost>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad gosa-core~/include/php_setup.inc gosa-core/include/php_setup.inc
+--- gosa-core~/include/php_setup.inc   2008-03-17 23:52:36.000000000 +0100
++++ gosa-core/include/php_setup.inc    2008-04-09 09:22:55.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-core~/update-gosa gosa-core/update-gosa
+--- gosa-core~/update-gosa     2008-04-02 15:58:24.000000000 +0200
++++ gosa-core/update-gosa      2008-04-09 09:22:31.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 ".implode(" ", $po_files)." > compiled/${language}/LC_MESSAGES/messages.po)", $val);
++              system ("(cd ".LOCALE_DIR." && msgcat ".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);