Thread: [Noffle-devel] internationalization of noffle pseudo articles
Brought to you by:
bears
From: <joh...@gm...> - 2003-03-24 23:11:33
|
Hi Folks I think I could assist in internationalization of the noffle-pseude-articles (those messages getting return in pseudo.c). With this patch it would be possible to have a french, german and english version of e.g. the "article marked for download". There are some decisions I would like to get examined before I start to code. +I would suggest to have a file in /etc/noffle/noffle.articles.{ccTLD}, {ccTLD} being the country-Top-Level-Domain for the country generally associated with that language, e.g. de for german, fr for france ... Problem: The are maybe some languages which are not specific to a country (what was the Top-Level-Domain for Esperanto again ;-) ) and maybe in some country more than language is officially used. I agree that the filename noffle.articles is quite long. But bear in mind, that we also need a manpage for this file and it would be quite ... arrogant for noffle to demand such a general word for its manpage Question: How shall we determine which user gets his message in which language. Should there be a global "noffle-now-be-german"-switch in the config-file ? Should we default german pseudo messages for e.g. de.*-newsgroups ? This noffle.articles.{ccTLD} file would have the folloing format message_entry = ' < ' message-designator ' > ' \n message-text message-designator = 'text' message-text = 'text' I decided against the standart varX = valueY syntax because I think a big part in message-text will be newline caracters and the escaping those would not really help to make the file more readable. I also decided against the windows-init-file-syntax [section1] foo bar because I have seen in in the pseudo messages are also a lot of [s and ]s. But actually I am not really happy with this syntax. I'll think over it again. Maybe someone else has a good idea. So long... Johannes Madel |
From: Jim H. <jim...@ac...> - 2003-03-24 23:53:31
|
On 24-Mar-2003 joh...@gm... wrote: > I think I could assist in internationalization of the > noffle-pseude-articles (those messages getting return in pseudo.c). > With this patch it would be possible to have a french, german and > english version of e.g. the "article marked for download". > > There are some decisions I would like to get examined before I start to code. > > +I would suggest to have a file in /etc/noffle/noffle.articles.{ccTLD}, > {ccTLD} being the country-Top-Level-Domain for the country generally > associated with that language, e.g. de for german, fr for france ... > I think it would be easier to have one file per message, perhaps filed under a language-specific directory, e.g. /etc/noffle/templates.en_GB/general_info. Specify the language in the config file, or pick it up from the environment (LANG) if it is not specified in the config. Then see if a file exists in this order (for LANG=en_GB): templates.en_GB/filename, templates.en/filename, templates/filename. Keep the current hard-coded defaults in case none are found. Describe the template format in a new man page noffle.template. > Problem: The are maybe some languages which are not specific to a > country (what was the Top-Level-Domain for Esperanto again ;-) ) and > maybe in some country more than language is officially used. > Question: How shall we determine which user gets his message in which > language. Should there be a global "noffle-now-be-german"-switch in the > config-file ? Should we default german pseudo messages for e.g. > de.*-newsgroups ? I don't think we can do anything about trying to decide on a per-user basis. NNTP tells us nothing about the user. Environments that need to support multiple languages amongst their users will simply have to have multi-lingual messages. > This noffle.articles.{ccTLD} file would have the folloing format > message_entry = ' < ' message-designator ' > ' \n message-text > message-designator = 'text' > message-text = 'text' Having each message in its own file saves all sorts of syntax. We can just have the message pretty much as it will appear (once a few extra headers are added). Subject: [ NOFFLE: Article counter inconsistent ] This group's article counter is not consistent. Probably the remote news server ... Don't forget that we need to be able to insert values into the messages, e.g. the 'retrieve failed' message. I suggest this is done by some sort of variable substitution, e.g. (for the inconsistent count message): Group: $GROUP Remote first article number: $REMOTE_FIRST Remote last article number: $REMOTE_LAST Remove next article number: $REMOTE_NEXT Refetching from article: $REFETCH_FROM -- Jim Hague - jim...@in... (Work), ji...@be... (Play) Never trust a computer you can't lift or you don't control. |
From: <joh...@gm...> - 2003-03-25 09:15:45
|
Hi Folks another question: Why dont we just put a file into /usr/share/locale/{language}/ (under debian), next to all those other *.mo files ? So long... Johannes Madel |
From: <joh...@gm...> - 2003-03-25 09:18:07
|
Hi Folks I forgot, that the templates should be editable by the user, so forget about that "lets-put-it-in-an-mo-file"...:-) So long... Johannes Madel |
From: <joh...@gm...> - 2003-03-25 14:22:44
|
On Mon, Mar 24, 2003 at 11:53:26PM -0000, Jim Hague wrote: > On 24-Mar-2003 joh...@gm... wrote: > > I think I could assist in internationalization of the > > noffle-pseude-articles (those messages getting return in pseudo.c). > > With this patch it would be possible to have a french, german and > > english version of e.g. the "article marked for download". > > > > There are some decisions I would like to get examined before I start to code. > > > > +I would suggest to have a file in /etc/noffle/noffle.articles.{ccTLD}, > > {ccTLD} being the country-Top-Level-Domain for the country generally > > associated with that language, e.g. de for german, fr for france ... > > > I think it would be easier to have one file per message, perhaps filed under a > language-specific directory, e.g. /etc/noffle/templates.en_GB/general_info. > Specify the language in the config file, or pick it up from the environment > (LANG) if it is not specified in the config. Then see if a file exists in > this order (for LANG=en_GB): templates.en_GB/filename, templates.en/filename, > templates/filename. Keep the current hard-coded defaults in case none are > found. But than we have to ensure that the user has a directory in /etc/, not just a file. We would have to change CONFIGFILE to CONFIGDIR and of course make some minor corrections now and then. So long... Johannes Madel |
From: Jim H. <jim...@ac...> - 2003-03-25 14:53:33
|
On 25-Mar-2003 joh...@gm... wrote: > But than we have to ensure that the user has a directory in /etc/, not > just a file. We would have to change CONFIGFILE to CONFIGDIR and of > course make some minor corrections now and then. True. But Debian have already moved that way, and there's no reason we can't look for noffle.conf in /etc/noffle and then /etc to keep backwards compatability. -- Jim Hague - jim...@in... (Work), ji...@be... (Play) Never trust a computer you can't lift. |