From: <rc...@us...> - 2016-05-01 15:05:37
|
Revision: 7502 http://sourceforge.net/p/web-erp/reponame/7502 Author: rchacon Date: 2016-05-01 15:05:34 +0000 (Sun, 01 May 2016) Log Message: ----------- Fix directory name and default language file name. Modified Paths: -------------- trunk/Z_poAddLanguage.php trunk/doc/Change.log Modified: trunk/Z_poAddLanguage.php =================================================================== --- trunk/Z_poAddLanguage.php 2016-04-29 23:57:28 UTC (rev 7501) +++ trunk/Z_poAddLanguage.php 2016-05-01 15:05:34 UTC (rev 7502) @@ -1,5 +1,6 @@ <?php /* $Id$*/ +/* Allows a new language po file to be created */ /* Steve Kitchen/Kaill */ @@ -20,9 +21,9 @@ $ViewTopic = "SpecialUtilities"; $BookMark = "Z_poAddLanguage";// Anchor's id in the manual's html document. include('includes/header.inc'); -echo '<p class="page_title_text"><img alt="" src="' . $RootPath . '/css/' . $Theme . - '/images/maintenance.png" title="' . - _('Add a New Language to the System') . '" />' . ' ' . +echo '<p class="page_title_text"><img alt="" src="' . $RootPath . '/css/' . $Theme . + '/images/maintenance.png" title="' . + _('Add a New Language to the System') . '" />' . ' ' . _('Add a New Language to the System') . '</p>'; /* Your webserver user MUST have read/write access to here, otherwise you'll be wasting your time */ @@ -32,7 +33,7 @@ echo '<br /> ' . _('Current language is') . ' ' . $_SESSION['Language']; $DefaultLanguage = 'en_GB';// The default language is English-United Kingdom (British English). -$PathToDefault = './locale/' . $DefaultLanguage . '/LC_MESSAGES/messages.po'; +$PathToDefault = './locale/' . $DefaultLanguage . '.utf8/LC_MESSAGES/messages.pot'; if (isset($_POST['submit']) AND isset($_POST['NewLanguage'])) { @@ -57,8 +58,8 @@ if (!file_exists('./locale/' . $_POST['NewLanguage'])) { prnMsg (_('Attempting to create the new language file') . '.....<br />', 'info', ' '); - $Result = mkdir('./locale/' . $_POST['NewLanguage']); - $Result = mkdir('./locale/' . $_POST['NewLanguage'] . '/LC_MESSAGES'); + $Result = mkdir('./locale/' . $_POST['NewLanguage'] . '.utf8'); + $Result = mkdir('./locale/' . $_POST['NewLanguage'] . '.utf8/LC_MESSAGES'); } else { prnMsg(_('This language cannot be added because it already exists!'),'error'); echo '</form>'; @@ -67,7 +68,7 @@ exit; } - $PathToNewLanguage = './locale/' . $_POST['NewLanguage'] . '/LC_MESSAGES/messages.po'; + $PathToNewLanguage = './locale/' . $_POST['NewLanguage'] . '.utf8/LC_MESSAGES/messages.po'; $Result = copy($PathToDefault, $PathToNewLanguage); prnMsg (_('Done. You should now change to your newly created language from the user settings link above. Then you can edit the new language file header and use the language module editor to translate the system strings'), 'info'); Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2016-04-29 23:57:28 UTC (rev 7501) +++ trunk/doc/Change.log 2016-05-01 15:05:34 UTC (rev 7502) @@ -1,5 +1,6 @@ webERP Change Log +01/05/2016 RChacon: In Z_poAddLanguage.php, fix directory name and default language file name. 29/4/16 RChacon: In includes/DateFunctions.inc, add year in long date and time in locale format. 26/4/16 Phil committed for Tim: apparently only change required for PHP7 see http://www.weberp.org/forum/showthread.php?tid=2733&pid=7132#pid7132 25/4/16 RChacon: In Payments.php, allow to input a customised gltrans.narrative, supptrans.suppreference and supptrans.transtext. |