Re: [Monetdb-developers] [Monetdb-checkins] MonetDB5/src/mal mal_authorize.mx, , 1.73, 1.74 mal_client.mx, , 1.195, 1.196 mal_debugger.mx, , 1.263, 1.264 mal_exception.mx, , 1.54, 1.55 mal_factory.mx, , 1.87, 1.88 mal_interpreter.mx, , 1.302, 1.303 mal_linker.mx, , 1.110, 1.111 mal_profiler.mx, , 1.128, 1.129 mal_sabaoth.mx, , 1.53, 1.54 mal_scenario.mx, , 1.123, 1.124 mal_session.mx, , 1.195, 1.196
On 16-05-2009 18:26:25 +0000, Martin Kersten wrote:
Update of /cvsroot/monetdb/MonetDB5/src/mal In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27406
Modified Files: mal_authorize.mx mal_client.mx mal_debugger.mx mal_exception.mx mal_factory.mx mal_interpreter.mx mal_linker.mx mal_profiler.mx mal_sabaoth.mx mal_scenario.mx mal_session.mx Log Message: Collecting the exception/errors messages in one place leads to easier detection of duplicates and can be used later for internationalization efforts
Why not do it the gettext way, in that case? Yes, i am fully aware of gettext. It is a multi-step process, first condense..... and gettext() performs translations based on strings e.g. the ones now identified.
U mal_linker.mx Index: mal_linker.mx =================================================================== RCS file: /cvsroot/monetdb/MonetDB5/src/mal/mal_linker.mx,v retrieving revision 1.110 retrieving revision 1.111 diff -u -d -r1.110 -r1.111 --- mal_linker.mx 7 Jan 2009 14:15:12 -0000 1.110 +++ mal_linker.mx 16 May 2009 18:26:23 -0000 1.111 @@ -251,7 +251,7 @@
if (fullname == NULL) { if( flag) - throw(LOADER, "loadLibrary", "%s: file not found", filename); + throw(LOADER, "loadLibrary", RUNTIME_FILE_NOT_FOUND, filename);
I think this is prone to errors and mistakes, since you no longer know how many %X are in the constant, of what type, etc.
Fabian Groffen wrote: true... see how many are really needed after condensation
I do think consistency is good, I doubt about translations, but I think this approach is a good solution. Please look into gettext, see applications like mutt for an example how to use it.
------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Monetdb-checkins mailing list Monetdb-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-checkins
On 16-05-2009 22:28:29 +0200, Martin Kersten wrote:
Why not do it the gettext way, in that case? Yes, i am fully aware of gettext. It is a multi-step process, first condense..... and gettext() performs translations based on strings e.g. the ones now identified.
So after gettext you have to reverse this step again...
I think this is prone to errors and mistakes, since you no longer know how many %X are in the constant, of what type, etc. true... see how many are really needed after condensation
Perhaps this is *not* a good thing to throw in just before a code freeze?
Fabian Groffen wrote:
On 16-05-2009 22:28:29 +0200, Martin Kersten wrote:
Why not do it the gettext way, in that case? Yes, i am fully aware of gettext. It is a multi-step process, first condense..... and gettext() performs translations based on strings e.g. the ones now identified.
So after gettext you have to reverse this step again... no, gettext performs a string-based lookup only. There is no requirement that this should be an abbreviated one
I think this is prone to errors and mistakes, since you no longer know how many %X are in the constant, of what type, etc. true... see how many are really needed after condensation
Perhaps this is *not* a good thing to throw in just before a code freeze?
Yes, a concerted check on error messages is needed. There are a limited number of changes
------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-developers
On 16-05-2009 22:49:17 +0200, Martin Kersten wrote:
Fabian Groffen wrote:
On 16-05-2009 22:28:29 +0200, Martin Kersten wrote:
Why not do it the gettext way, in that case? Yes, i am fully aware of gettext. It is a multi-step process, first condense..... and gettext() performs translations based on strings e.g. the ones now identified.
So after gettext you have to reverse this step again... no, gettext performs a string-based lookup only. There is no requirement that this should be an abbreviated one
_("the string that is translated") Point was, readability and less obfuscation.
Perhaps this is *not* a good thing to throw in just before a code freeze? Yes, a concerted check on error messages is needed. There are a limited number of changes
Another thing, if you need the same message a lot of times, you can probably be more specific to *improve* your error messages.
Fabian Groffen wrote:
On 16-05-2009 22:49:17 +0200, Martin Kersten wrote:
Fabian Groffen wrote:
On 16-05-2009 22:28:29 +0200, Martin Kersten wrote:
Why not do it the gettext way, in that case? Yes, i am fully aware of gettext. It is a multi-step process, first condense..... and gettext() performs translations based on strings e.g. the ones now identified. So after gettext you have to reverse this step again... no, gettext performs a string-based lookup only. There is no requirement that this should be an abbreviated one
_("the string that is translated")
Point was, readability and less obfuscation.
Perhaps this is *not* a good thing to throw in just before a code freeze? Yes, a concerted check on error messages is needed. There are a limited number of changes
Another thing, if you need the same message a lot of times, you can if there are a lot of the same messages, then they should be assembled in an indexed catalog table.
probably be more specific to *improve* your error messages. yes, or more specific in the commentary.
As indicated in mal_exception, the target is to enforce a style, e.g. to evolve to GENERIC SPECIFIC ADVICE string defs where appropriate. 50% of the code has been handled (in 2 hours)
------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-developers
<QA> On 16-05-2009 23:08:54 +0200, Martin Kersten wrote:
Another thing, if you need the same message a lot of times, you can probably be more specific to *improve* your error messages. yes, or more specific in the commentary.
That will help users, of course.
As indicated in mal_exception, the target is to enforce a style, e.g. to evolve to GENERIC SPECIFIC ADVICE string defs where appropriate.
50% of the code has been handled (in 2 hours)
... and at least 1 error introduced, probably going to introduce another avalanche of problems, and of course delaying the feature release by an undefined amount of time, which ends the circle. Why not just do this for the next feature release, when there is plenty of time to experiment, think and fix all the problems and regressions you're going to introduce? </QA>
participants (2)
-
Fabian Groffen
-
Martin Kersten