Subject: lang_defs.h

From: Jakson Aquino <[email-masked]>
Date: Sun, 6 Feb 2005 18:45:04 -0300 (ART)

Hello All,

On May 21, 2001, Andreas Beyer wrote:
> I got a message from someone who would like o write
a Spanish
> translation of StatistX. I don't think it is wise to
expand the
> translation-via-macros method to an infinite number
of languages. 

I agree with Andreas Beyer. It seems that lang_defs.h
was created as a way of internationalizing statist.
However, it's not practical to have messages written
directly in the source code in more than two
languages. Thus, I think that we don't need the file
lang_defs.h anymore. I'm submitting a patch where,
with some deletions and with no addition, the program
is compiling as before, but without using the file
lang_defs.h.

To be sure that no bug was introduced, I succesfully
recompiled and ran statist 5 times: 

Linux: English, German, and gettext.
DOS  : English, and German. 

DLL are files used by dos and windows, right? While
reading info pages for gettext, I found the following
passage which implies that gettext can be used under
DOS:

   "To convert a PO file to a `.dll' file, the 
    `msgfmt' program can be used with the option
    `--csharp'.  The result will be a `.dll' 
    file containing a subclass of 
    `GettextResourceSet', which itself is a
     subclass of `ResourceSet'.  To convert a 
    `.dll' file containing a `GettextResourceSet'
    subclass back to a PO file, the `msgunfmt' 
    program can be used with the option `--csharp'."

I had made an attempting of creating a .dll file, but
I got the following error:

[jakson@localhost po]$ msgfmt --csharp -l pt_BR -d
/temp --verbose pt_BR.po
msgfmt: C# compiler not found, try installing pnet
msgfmt: compilation of C# class failed, please try
--verbose
353 translated messages, 18 fuzzy translations.
[jakson@localhost po]$ 

Is anyone interested in internationalizing Statist for
DOS? I will not become responsible for such a task,
because it's not easy to me, and because I'm already
satisfied with Linux.

Best regards,

Jakson

__________________________________________________
Converse com seus amigos em tempo real com o Yahoo! Messenger 
http://br.download.yahoo.com/messenger/ 

diff -Naur old/gettext.h new/gettext.h
--- old/gettext.h	2005-02-05 22:59:54.192337288 -0200
+++ new/gettext.h	2005-02-05 23:00:16.776903912 -0200
@@ -14,9 +14,7 @@
 #define STATIST_GETTEXT_HEADER
 
 #ifdef NO_GETTEXT
-	#include "lang_defs.h"
-	
-	#if LANG == LANG_DE
+	#ifdef LANG_DE
 		#define _(english, german) (german)
 		#define N_(english, german) (german)
 	#else
diff -Naur old/Makefile new/Makefile
--- old/Makefile	2005-02-05 23:02:44.658422504 -0200
+++ new/Makefile	2005-02-05 23:03:09.595631472 -0200
@@ -17,7 +17,7 @@
 # you can add	LANG=LANG_EN or LANG=LANG_DE to the make arguments
 # Command line arguments to make override the default (which is in here)
 LANG=LANG_DE
-LANGUAGE=-DLANG=$(LANG)
+LANGUAGE=-D$(LANG)
 
 #decide between "main", "shlib" and "lib"
 all: main

---

From: Bernhard Reiter <[email-masked]>
Date: Mon, 7 Feb 2005 10:52:44 +0100

Hi Jakson,

On Sun, Feb 06, 2005 at 06:45:04PM -0300, Jakson Aquino wrote:
> > translation of StatistX. I don't think it is wise to expand the
> > translation-via-macros method to an infinite number of languages. 
> 
> I agree with Andreas Beyer. 

You probably also saw my answer in 2001:
http://intevation.de/pipermail/statist-list/2001/000009.html

This is why we improved the gettext mechanisms since then.

> It seems that lang_defs.h

The idea behind this was, to keep statist as simple 
and small as possible. Now that we have two languages
in the source code, I think we should just keep them
there and use gettext for the additional ones.
The ideal solution would be that someone makes a special version 
of gettext so that we can extract the German translation directly
from the source. ;)

I'll look at the patch, 
it is probably fine to just have two possibilities
in the source code and simplify it.

> DLL are files used by dos and windows, right? 

AFAIK yes. 

> While

Let us wait until somebody jumps up for DOS,
if possible I do not want to break the possibilities
that statist has under DOS, but I have not used them myself
since a very long while.

---

From: Bernhard Reiter <[email-masked]>
Date: Wed, 23 Feb 2005 19:30:00 +0100

Hi Jakson,

the patch is in CVS now.
Note that you have missed the DEBUG section in statist.c which did
not directly compile when debugging is turned on with you patch. ;)

Thanks again for contributing of course.
There are still more patches from you in the queue, I know. :)

	Bernhard