RE: Strings db (comments requested)

2001-10-03 Thread Wizard
. Parrot presently has about 200 strings that are targets. Here's what I propose: A standard library that allows loading of a strings db at run-time based upon a defined order of variable testing. This might mean that the library would getenv a variable, then check for a command-line option, then check

RE: Strings db (comments requested)

2001-10-03 Thread Angel Faus
Hi Grant, Just as a suggestion, i would use the PO format (already used by other tools than gettext, like KDE) so we get for free all the catalog manager tools (like Kbabel, which is very nice, by the way). And maybe error codes output could be just another target language. So: fprintf(stderr,

RE: Strings db

2001-09-26 Thread Wizard
Damien Neil [mailto:[EMAIL PROTECTED]] wrote: This is a far more error-prone interface in a number of ways (...) I don't believe that with the proper tools and rules that this system will be any more difficult to manage. All of the things that you stated as disadvantages could be countered

RE: Strings db

2001-09-25 Thread Wizard
I've been looking over the gettext implementation, and I'm not sure that I entirely like it, but let me know if this sounds like I've been programming to long. (Maybe I'm misreading the document) The gettext API uses strings as msgid. What this means is that in order to get a translated string,

RE: Strings db

2001-09-25 Thread Michael Maraist
and a call to the API would be: char *label = gettext( This feels strange\n ); Does you idea allow for: int msgid = txtToMsgid( This feels strange\n ); char *label = msgidToRes( msgid ); In addition to the above, since this affords compile-time optimizations? I'm not following this thread

RE: Strings db

2001-09-25 Thread Wizard
Michael Maraist [mailto:[EMAIL PROTECTED]] wrote: Does you idea allow for: int msgid = txtToMsgid( This feels strange\n ); char *label = msgidToRes( msgid ); I'm not sure that I understand your question. This is not my idea, but GNU's gettext tools. I, myself, am not thrilled with this

RE: Strings db

2001-09-25 Thread Wizard
Michael Maraist [mailto:[EMAIL PROTECTED]] wrote: ... but I'm assuming it involves (among other things) displaying locale-based error messages. I'm not sure how the catalog would be determined, but I would suggest another mechanism other than locale. Rather, I'd suggest a user-specific

Re: Strings db

2001-09-25 Thread Michael L Maraist
Wizard wrote: Michael Maraist [mailto:[EMAIL PROTECTED]] wrote: Does you idea allow for: int msgid = txtToMsgid( This feels strange\n ); char *label = msgidToRes( msgid ); I'm not sure that I understand your question. This is not my idea, but GNU's gettext tools. I, myself, am not

RE: Strings db

2001-09-25 Thread Wizard
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] wrote: You quoted something similar to my text above and said you didn't like it. I believe mostly because it involved reading external files, but also because of the concept of the message-id. Actually, the thing that I didn't like was using an

Re: Strings db

2001-09-25 Thread Damien Neil
On Tue, Sep 25, 2001 at 07:29:01PM -0700, Wizard wrote: Actually, the thing that I didn't like was using an actual string as the message_id. I would have expected something more in the way of: char *err = get_text_string( THREAD_EXCEPTION_117, \ THREAD

RE: Strings db

2001-09-24 Thread Wizard
Some questions about implementation: which scenarios?: 1. external text-file strings (name=value?) chosen at run-time 2. Parrot build-time embedded strings (language chosen at configure) Do we want to break the messages into sets, such that 256 is 'fatal', 256 to 511 is 'warning', 512 to 767 is

RE: Strings db

2001-09-24 Thread Dan Sugalski
At 09:42 AM 9/24/2001 -0700, Wizard wrote: Some questions about implementation: which scenarios?: 1. external text-file strings (name=value?) chosen at run-time 2. Parrot build-time embedded strings (language chosen at configure) Do we want to break the messages into sets, such that 256 is

RE: Strings db

2001-09-24 Thread Wizard
GNU does offer the gettext tools library for just such a purpose. I don't know how it will translate to the various platforms however, and it likely is a major overkill for what we are trying to do. http://www.gnu.org/manual/gettext/html_mono/gettext.html#SEC2 - Purpose It might make sense to

RE: Strings db

2001-09-24 Thread Michael Maraist
GNU does offer the gettext tools library for just such a purpose. I don't know how it will translate to the various platforms however, and it likely is a major overkill for what we are trying to do. http://www.gnu.org/manual/gettext/html_mono/gettext.html#SEC2 - Purpose It might make sense

RE: Strings db

2001-09-24 Thread Wizard
Michael Maraist wrote: But wouldn't that make parrot GPL'd? Yes, Yes it would. (cup o' coffee and a sux donut, please.) Never mind. I'll take a look at the docs and look around some more and see what other clever ideas we can't use. Grant M.

Re: Strings db

2001-09-24 Thread Josh Wilmes
We could use the bsd gettext though, couldn't we? --Josh At 12:49 on 09/24/2001 PDT, Wizard [EMAIL PROTECTED] wrote: Michael Maraist wrote: But wouldn't that make parrot GPL'd? Yes, Yes it would. (cup o' coffee and a sux donut, please.) Never mind. I'll take a look at the docs and look

RE: Strings db

2001-09-24 Thread Dan Sugalski
At 12:38 PM 9/24/2001 -0400, Michael Maraist wrote: GNU does offer the gettext tools library for just such a purpose. I don't know how it will translate to the various platforms however, and it likely is a major overkill for what we are trying to do.

Re: Strings db

2001-09-24 Thread Paolo Molaro
On 09/24/01 Michael Maraist wrote: GNU does offer the gettext tools library for just such a purpose. I don't know how it will translate to the various platforms however, and it likely is a major overkill for what we are trying to do.

Re: Strings db

2001-09-24 Thread Dan Sugalski
At 08:42 PM 9/24/2001 +0200, Paolo Molaro wrote: On 09/24/01 Michael Maraist wrote: GNU does offer the gettext tools library for just such a purpose. I don't know how it will translate to the various platforms however, and it likely is a major overkill for what we are trying to do.

RE: Strings db

2001-09-24 Thread Mattia Barbon
GNU does offer the gettext tools library for just such a purpose. I don't know how it will translate to the various platforms however, and it likely is a major overkill for what we are trying to do. http://www.gnu.org/manual/gettext/html_mono/gettext.html#SEC2 - Purpose It might make

Re: Strings db

2001-09-23 Thread Simon Cozens
On Sun, Sep 23, 2001 at 08:42:51PM -0700, Wizard wrote: Is Parrot to have a strings db for error and UI strings (i18n)? Parrot should not be outputting that many errors or UI strings. However, those that it does should go through I18N, yes. If so, it should probably go on the TODO list

Re: Strings db

2001-09-23 Thread Dan Sugalski
At 01:32 AM 9/24/2001 +0100, Simon Cozens wrote: On Sun, Sep 23, 2001 at 08:42:51PM -0700, Wizard wrote: Is Parrot to have a strings db for error and UI strings (i18n)? Parrot should not be outputting that many errors or UI strings. However, those that it does should go through I18N, yes. So