From: skaill <sk...@ro...> - 2004-09-07 17:39:40
|
Well, I guess as far as testing we should pill up each changed script and see if all the English words displayed still appear properly. This makes sure we didn't do anything horrible with the string splittings, we haven't hard coded a variable name in single quotes, etc. Steve ----- Original Message ----- From: "Phil Daintree" <we...@pa...> To: <web...@li...> Sent: Monday, September 06, 2004 3:43 AM Subject: Re: [Web-erp-developers] Re: input & goods received mods > Steve, > > That script looks fine - I have tested and updated the CVS. > > This is a difficulty with the approach - we can only xgettext the > strings to translate having modified the code to perform the translation > - so we cannot actually test the translation code works until we create > the messages.po file get the msgstr translated and create a messages.mo > file. I have proved the concept though and if you update your cvs and > switch to italian you should see my foolish translations of a couple of > menu items! As I get these scripts I will extract the strings and build > up our messages.po file ready for translation. > > In our case the modification of the scripts as you describe is required > first - the translation itself is not testable until we have a > messages.po and all the strings have been translated - also a massive > job! > > That is interesting that you had to include session.inc before $title > was set. This doesn't appear necessary in php 5 and I have not done this > in the scripts I have modified - I will go back and modify them. I > thought it would be necessary initially. > > The only other thing I would like to acheive is to convert to Jesse's > DB_query with the additional parameters - this actually reduces a fair > amount of repeated code - wish I'd thought of it before really. Need to > be a little careful inside pdf scripts though. > > > > Phil > > > On Mon, 2004-09-06 at 03:30, skaill wrote: > > Hi Phil, > > > > Here's my first Multilanguage file. It is BankAccounts. Would you be able > > to check it out and let me know if I'm doing everything right. What I > > understand is > > > > 1) Change all the strings to be encapsulated by the _() translation function > > call. These would be in echo and printf statements as well as comparisons > > possibly but one must be careful about them. Also table column headers, > > field labels and such within the html. > > > > 2) Check to make sure any submits are using isset to avoid translation. > > I'm assuming here that you haven't overloaded multiple submit buttons with > > the same name but different values. > > > > 3) Changing the double quotes to single quotes for strings wherever possible > > and breaking the strings into pieces where there are variables. > > > > One concern I have is how to test this properly. I went as far as putting > > my changes up on our test site and the page looks fine but it isn't doing > > any real translation, it's just coming back with the English. Who is > > creating the actual language file that we could use to test? > > > > I ran into two problems and one could be because I haven't updated my cvs in > > a day or two. > > > > 1) It gave an error the first time it encountered a call to _() saying the > > function didn't exist. I modified the gettext part in session.inc to > > > > if (!function_exists('gettext')){ > > function _($text){ > > return $text; > > } > > } else { > > function _($text) { > > return gettext($text); > > } > > } > > > > 2) The $title variable is at the top of each script but the include for > > session.inc that defines the _() function is afterward. So, if you change > > $title to _($title) there is an error about undefined function. I fixed it > > by moving the $title below the session.inc include but before the header.inc > > which uses $title! > > > > I know my message is long but I want to get this right from the start > > instead of having to go back through all the files I do a second time. That > > wouldn't be fun :O > > > > Steve > > > > ----- Original Message ----- > > From: "Phil Daintree" <we...@pa...> > > To: <web...@li...> > > Sent: Sunday, September 05, 2004 4:30 AM > > Subject: [Web-erp-developers] Re: input & goods received mods > > > > > > > Huge enthusiasm boost!! > > > Thanks Jesse. > > > > > > I came accross a couple of links that were stuffed by the change to ' > > > rather than " and a missed < somewhere but so easy to apply with a diff > > > and the files themselves - it is just a question of reviewing the diff > > > and copying the file!! > > > > > > Would you have any more time for other scripts perhaps staying with the > > > controlled/serialized stuff?? > > > > > > StockAdjustments.php > > > StockAdjustmentsControlled.php > > > StockTransferControlled.php > > > StockTransfers.php > > > > > > > > > For the benefit of the rest of the crew ... these are now in CVS - all > > > gettextified thanks to Jesse > > > > > > GoodsReceived.php > > > GoodsReceivedControlled.php > > > and accompanying includes > > > includes/InputSerialItems.php > > > includes/InputSerialItemsKeyed.php > > > includes/InputSerialItemsFile.php > > > > > > > > > I also managed to enslist Victor off the user list and he has _ified > > > > > > Customers.php > > > > > > Together with my own meagre efforts: > > > > > > AccountGroups.php > > > AgedDebtors.php includes/PDFAgedDebtorsPageHeader.inc > > > AgedSuppliers.php includes/PDFAgedSuppliersPageHeader.inc > > > > > > So we are rattling through them! > > > > > > Phil > > > > > > > > > On Sun, 2004-09-05 at 18:17, Jesse Peterson wrote: > > > > I've attached a diff of my changes as well as the full files. > > > > > > > > Most all of the changes are for translations and changing "s to 's. The > > > > form setting 'enctype' that fixed my upload issue is included, and a > > > > small error in an upgrade script is as well. > > > > > > > > These changes are against cvs pulled around 9/14 16:19 EDT. > > > > > > > > > > > > jesse > > > > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by BEA Weblogic Workshop > > > FREE Java Enterprise J2EE developer tools! > > > Get your free copy of BEA WebLogic Workshop 8.1 today. > > > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > > _______________________________________________ > > > Web-erp-developers mailing list > > > Web...@li... > > > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers |