From: Rafael C. <raf...@gm...> - 2014-05-21 19:00:30
|
Hi, The values of "typename" column of the table "systypes" are in English. They are used as they are in this column. Almost all of the terms do not appear in the dictionary of translations *.po. To translate this, I found two solutions: 1. Directly overwrite the database with the local language. 2. Create a script "Z_SysTypes.php" containing an array of these "typename" as line-to-translate, rebuild the languages files, and translate. E.g. Z_SysTypes.php: $SysType['0'] = _('Journal - GL'); $SysType['1'] = _('Payment - GL'); $SysType['2'] = _('Receipt - GL'); ... $SysType['42'] = _('Asset Category Change'); I want a general purpose solution to add to main code (not only for my local installations). What you you think is the best solution? Reviews? Recommendations? Suggestions? Best regards, Rafael. |
From: ExsonQu <hex...@gm...> - 2014-05-22 02:34:02
|
*Hi, Rafael,* You've brought up a great topic. There are others which should be translated such as roles etc. Create a file special for translation is great idea. And the challenge lays in that we have to lots files affected. Best regards! Exson -- View this message in context: http://weberp-accounting.1478800.n4.nabble.com/Translate-the-column-typename-of-the-table-systypes-of-the-database-tp4657452p4657454.html Sent from the web-ERP-developers mailing list archive at Nabble.com. |
From: Phil D. <ph...@lo...> - 2014-05-22 07:45:37
|
Yes this is a good point - there are a few places where we are using data from the DB that is displayed. I have resolved the item descriptions now. I am thinking we could use code like: echo _($myrow['typename') this would then resolve to something like _('Invoice') and get translated using the usual gettext process. then if we had within comments somewhere: /* _('Invoice') _('Credit Note') _('Receipt') . . . */ Then xgettext would extract these strings for translation in each of the translation files and gettext would have the data required to do the translation :-) Is this a plan? Phil Phil Daintree Logic Works Ltd - +64 (0)275 567890 http://www.logicworks.co.nz On 22/05/14 07:00, Rafael Chacón wrote: > Hi, > > The values of "typename" column of the table "systypes" are in > English. They are used as they are in this column. Almost all of the > terms do not appear in the dictionary of translations *.po. > > To translate this, I found two solutions: > > 1.Directly overwrite the database with the local language. > > 2. Create a script "Z_SysTypes.php" containing an array of these > "typename" as line-to-translate, rebuild the languages files, and > translate. E.g. > > Z_SysTypes.php: > $SysType['0'] = _('Journal - GL'); > $SysType['1'] = _('Payment - GL'); > $SysType['2'] = _('Receipt - GL'); > ... > $SysType['42'] = _('Asset Category Change'); > > > > I want a general purpose solution to add to main code (not only for my > local installations). > > What you you think is the best solution? Reviews? Recommendations? > Suggestions? > > Best regards, Rafael. > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > > > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers |
From: Phil D. <ph...@lo...> - 2014-05-22 08:17:24
|
Doesn't work within comments we would have to add some silly variables or something perhaps at the end of LanguageSetup.php ?? $NotUsed=_('Invoice'); $NotUsed=_('Credit note'); $NotUsed=_('GL - Journal'); $NotUsed=_('GL - Receipt'); etc Phil Phil Daintree Logic Works Ltd - +64 (0)275 567890 http://www.logicworks.co.nz On 22/05/14 19:45, Phil Daintree wrote: > Yes this is a good point - there are a few places where we are using > data from the DB that is displayed. I have resolved the item > descriptions now. > > I am thinking we could use code like: > > echo _($myrow['typename') > > this would then resolve to something like > > _('Invoice') > > and get translated using the usual gettext process. > > then if we had within comments somewhere: > > /* > _('Invoice') > _('Credit Note') > _('Receipt') > . > . > . > > */ > Then xgettext would extract these strings for translation in each of > the translation files and gettext would have the data required to do > the translation :-) > > Is this a plan? > Phil > > Phil Daintree > Logic Works Ltd - +64 (0)275 567890 > http://www.logicworks.co.nz > On 22/05/14 07:00, Rafael Chacón wrote: >> Hi, >> >> The values of "typename" column of the table "systypes" are in >> English. They are used as they are in this column. Almost all of the >> terms do not appear in the dictionary of translations *.po. >> >> To translate this, I found two solutions: >> >> 1.Directly overwrite the database with the local language. >> >> 2. Create a script "Z_SysTypes.php" containing an array of these >> "typename" as line-to-translate, rebuild the languages files, and >> translate. E.g. >> >> Z_SysTypes.php: >> $SysType['0'] = _('Journal - GL'); >> $SysType['1'] = _('Payment - GL'); >> $SysType['2'] = _('Receipt - GL'); >> ... >> $SysType['42'] = _('Asset Category Change'); >> >> >> >> I want a general purpose solution to add to main code (not only for >> my local installations). >> >> What you you think is the best solution? Reviews? Recommendations? >> Suggestions? >> >> Best regards, Rafael. >> >> >> ------------------------------------------------------------------------------ >> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >> Instantly run your Selenium tests across 300+ browser/OS combos. >> Get unparalleled scalability from the best Selenium testing platform available >> Simple to use. Nothing to install. Get started now for free." >> http://p.sf.net/sfu/SauceLabs >> >> >> _______________________________________________ >> Web-erp-developers mailing list >> Web...@li... >> https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > > > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers |
From: Phil D. <ph...@lo...> - 2014-05-22 08:20:02
|
Sorry Rafael ... my suggestion is obviously the same as your suggestion at 2 - sorry. Phil Phil Daintree Logic Works Ltd - +64 (0)275 567890 http://www.logicworks.co.nz On 22/05/14 07:00, Rafael Chacón wrote: > Hi, > > The values of "typename" column of the table "systypes" are in > English. They are used as they are in this column. Almost all of the > terms do not appear in the dictionary of translations *.po. > > To translate this, I found two solutions: > > 1.Directly overwrite the database with the local language. > > 2. Create a script "Z_SysTypes.php" containing an array of these > "typename" as line-to-translate, rebuild the languages files, and > translate. E.g. > > Z_SysTypes.php: > $SysType['0'] = _('Journal - GL'); > $SysType['1'] = _('Payment - GL'); > $SysType['2'] = _('Receipt - GL'); > ... > $SysType['42'] = _('Asset Category Change'); > > > > I want a general purpose solution to add to main code (not only for my > local installations). > > What you you think is the best solution? Reviews? Recommendations? > Suggestions? > > Best regards, Rafael. > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > > > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers |
From: Rafael C. <raf...@gm...> - 2014-05-22 19:01:22
|
Hi Phil, If we use translatable variables, I see 3 options: 1. Translatable variables in any script (e.g. the end of LanguageSetup.php). Pro: Translation. Cons: slow the script. 2. In a script called by install/index.php (or inside install/index). Pro: Read one time, no time delay in "operating" scripts. 3. In a "Z_SysTypes.php" script called: (a) by install/index.php as a database setup to load systypes table; (b) by "Utilities" menu as a re-set for the systypes table. Pro: An additional option. Code more clear and reusable. Cons: could slower the setup (two steps instead of one) ? Best regards, Rafael. 2014-05-22 2:19 GMT-06:00 Phil Daintree <ph...@lo...>: > Sorry Rafael ... my suggestion is obviously the same as your suggestion > at 2 - sorry. > > Phil > > Phil Daintree > Logic Works Ltd - +64 (0)275 567890http://www.logicworks.co.nz > > On 22/05/14 07:00, Rafael Chacón wrote: > > Hi, > > The values of "typename" column of the table "systypes" are in English. > They are used as they are in this column. Almost all of the terms do not > appear in the dictionary of translations *.po. > > To translate this, I found two solutions: > > 1. Directly overwrite the database with the local language. > > 2. Create a script "Z_SysTypes.php" containing an array of these > "typename" as line-to-translate, rebuild the languages files, and > translate. E.g. > > Z_SysTypes.php: > $SysType['0'] = _('Journal - GL'); > $SysType['1'] = _('Payment - GL'); > $SysType['2'] = _('Receipt - GL'); > ... > $SysType['42'] = _('Asset Category Change'); > > > > I want a general purpose solution to add to main code (not only for my > local installations). > > What you you think is the best solution? Reviews? Recommendations? > Suggestions? > > Best regards, Rafael. > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform available > Simple to use. Nothing to install. Get started now for free."http://p.sf.net/sfu/SauceLabs > > > > _______________________________________________ > Web-erp-developers mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform > available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > |
From: Phil D. <ph...@lo...> - 2014-05-23 06:52:32
|
Well we only really need the translation so yes if we have it in some Z script that would be as good as anywhere then whenever the system comes accross a _($myrow['typename']) the translation should be fine. We just need to grep/ack for $myrow['typename'] and replace with _($myrow['typename']) in echo/printf statements. The script doesn't really need to run at all - we just need the strings in the translation messages.po to be available for translation. Phil Phil Daintree Logic Works Ltd - +64 (0)275 567890 http://www.logicworks.co.nz On 23/05/14 07:01, Rafael Chacón wrote: > Hi Phil, > > If we use translatable variables, I see 3 options: > > 1. Translatable variables in any script (e.g. the end of LanguageSetup.php). > Pro: Translation. > Cons: slow the script. > > 2. In a script called by install/index.php (or inside install/index). > Pro: Read one time, no time delay in "operating" scripts. > > 3. In a "Z_SysTypes.php" script called: (a) by install/index.php as a > database setup to load systypes table; (b) by "Utilities" menu as a > re-set for the systypes table. > Pro: An additional option. Code more clear and reusable. > Cons: couldslower the setup (two steps instead of one)? > > Best regards, Rafael. > > > > 2014-05-22 2:19 GMT-06:00 Phil Daintree <ph...@lo... > <mailto:ph...@lo...>>: > > Sorry Rafael ... my suggestion is obviously the same as your > suggestion at 2 - sorry. > > Phil > > Phil Daintree > Logic Works Ltd -+64 (0)275 567890 <tel:%2B64%20%280%29275%20567890> > http://www.logicworks.co.nz > > On 22/05/14 07:00, Rafael Chacón wrote: >> Hi, >> >> The values of "typename" column of the table "systypes" are in >> English. They are used as they are in this column. Almost all of >> the terms do not appear in the dictionary of translations *.po. >> >> To translate this, I found two solutions: >> >> 1.Directly overwrite the database with the local language. >> >> 2. Create a script "Z_SysTypes.php" containing an array of these >> "typename" as line-to-translate, rebuild the languages files, and >> translate. E.g. >> >> Z_SysTypes.php: >> $SysType['0'] = _('Journal - GL'); >> $SysType['1'] = _('Payment - GL'); >> $SysType['2'] = _('Receipt - GL'); >> ... >> $SysType['42'] = _('Asset Category Change'); >> >> >> >> I want a general purpose solution to add to main code (not only >> for my local installations). >> >> What you you think is the best solution? Reviews? Recommendations? >> Suggestions? >> >> Best regards, Rafael. >> >> >> ------------------------------------------------------------------------------ >> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >> Instantly run your Selenium tests across 300+ browser/OS combos. >> Get unparalleled scalability from the best Selenium testing platform available >> Simple to use. Nothing to install. Get started now for free." >> http://p.sf.net/sfu/SauceLabs >> >> >> _______________________________________________ >> Web-erp-developers mailing list >> Web...@li... <mailto:Web...@li...> >> https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform > available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > <mailto:Web...@li...> > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > > > > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers |