We forgot to upload the PO file when installing new language. Used when GETTEXT is...
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Thu, 13 Sep 2007 20:43:39 +0000 (20:43 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Thu, 13 Sep 2007 20:43:39 +0000 (20:43 +0000)
CHANGELOG.txt
admin/inst_lang.php

index 01cb0a179624e87fba938aa55112b9984df7a5f8..44395e06e38a02d0a2881f54dbe941eec1a6d7a6 100644 (file)
@@ -19,6 +19,10 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+14-Sep-2007 Joe Hunt
+ # We forgot to upload the PO file when installing new language. Used when GETTEXT is not installed on Server.
+ $ /admin/inst_lang.php
 10-Sep-2007 Joe Hunt
  ! Changed Bank Address field from text to textarea (multirows)
  $ /gl/manage/bank_accounts.php
index e5eae2e79f727338021d532a3bcf2dfd123f1c04..b076cc02d1bf1892d1553cc7ce6fc7b45056c276 100644 (file)
@@ -165,6 +165,14 @@ function handle_submit()
        if (is_uploaded_file($_FILES['uploadfile']['tmp_name']))
        {
                $file1 = $_FILES['uploadfile']['tmp_name'];
+               $file2 = $directory . "/LC_MESSAGES/".$_POST['code'].".po";
+               if (file_exists($file2))
+                       unlink($file2);
+               move_uploaded_file($file1, $file2);
+       }
+       if (is_uploaded_file($_FILES['uploadfile2']['tmp_name']))
+       {
+               $file1 = $_FILES['uploadfile2']['tmp_name'];
                $file2 = $directory . "/LC_MESSAGES/".$_POST['code'].".mo";
                if (file_exists($file2))
                        unlink($file2);
@@ -305,10 +313,11 @@ function display_language_edit($selected_id)
 
        yesno_list_row(_("Right To Left"), 'rtl', null, "", "", false);
 
-       label_row(_("Language File"), "<input name='uploadfile' type='file'>");
+       label_row(_("Language File") . " (PO)", "<input name='uploadfile' type='file'>");
+       label_row(_("Language File") . " (MO)", "<input name='uploadfile2' type='file'>");
 
        end_table(0);
-       display_note(_("Select your language MO file from your local harddisk."), 0, 1);
+       display_note(_("Select your language files from your local harddisk."), 0, 1);
        echo "<center><input onclick='javascript:updateLanguage()' type='button' style='width:150' value='". _("Save"). "'>";