gMeasures not working in localized Puppies [almost solved]
gMeasures not working in localized Puppies [almost solved]
March 6, 2015, 22:11 EST. If confirmation feedback is positive, we have
a solution! BFN. musher0
~~~~~~~~~~~~~
Hello, people.
This in the context of that. If you care to read below my message on
that thread, you'll see very recent reactions by famous and various Puppy
personalities.
I ran a simple 100 centimeters test on rarsa's pConvert, python's gonvert
and gMeasures. I'll let the pictures do the talking...
The one attached below is from the gMeasures in Simplicity Linux-
Desktop-15.4_32-bit, an independent Puppy based on slacko-5.7.1.
gMeasures does'nt work there either.
In whatever Puppy, try this: type "100" in top left box, click centimeters in
the top middle box and then specify "inches" in the box below: a number
should appear to the left underneath the 100. It doesn't.
How much more proof do we need to remove the inefficient gMeasures
from our Puppies?
BFN.
musher0
a solution! BFN. musher0
~~~~~~~~~~~~~
Hello, people.
This in the context of that. If you care to read below my message on
that thread, you'll see very recent reactions by famous and various Puppy
personalities.
I ran a simple 100 centimeters test on rarsa's pConvert, python's gonvert
and gMeasures. I'll let the pictures do the talking...
The one attached below is from the gMeasures in Simplicity Linux-
Desktop-15.4_32-bit, an independent Puppy based on slacko-5.7.1.
gMeasures does'nt work there either.
In whatever Puppy, try this: type "100" in top left box, click centimeters in
the top middle box and then specify "inches" in the box below: a number
should appear to the left underneath the 100. It doesn't.
How much more proof do we need to remove the inefficient gMeasures
from our Puppies?
BFN.
musher0
- Attachments
-
- gMeasures-Simplicity-D154-32_2015-03-06_014501.png
- (20.61 KiB) Downloaded 632 times
Last edited by musher0 on Sat 07 Mar 2015, 03:14, edited 4 times in total.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
gmeasure works ok in carolina, it is from the wary repo.
- Attachments
-
- gmeasures-0.7.pet
- (23.16 KiB) Downloaded 562 times
-
- gmeasure.jpg
- (21.87 KiB) Downloaded 560 times
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
Hi, guys.
This may be the problem: my default LANG parameter is fr_CA.
From the README doc in the source file suggested by BK, you can read :
I did point # 1, but I couldn't find any decimal commas in the "main.c" file
at "AppReadWriteConfig()"... So it's going to be pretty tough to recompile
with non-existing commas!!!
Ah, Linux programs...
BFN.
musher0
This may be the problem: my default LANG parameter is fr_CA.
From the README doc in the source file suggested by BK, you can read :
fr_CA uses the comma as the decimal delimiter.Locales
=======
By default, gMeasures uses the "C" locale. If your locale uses a comma instead
of a decimal point, and you want a localized version of this program, here are
the steps to take:
1. In the main.c file, go to main() and uncomment the gtk_set_locale() line.
2. Also in the main.c file, go to AppReadWriteConfig() and replace the decimal
points in the defs array with commas.
3. Recompile the program.
I did point # 1, but I couldn't find any decimal commas in the "main.c" file
at "AppReadWriteConfig()"... So it's going to be pretty tough to recompile
with non-existing commas!!!
Ah, Linux programs...
BFN.
musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
musher0,
Thanks for finding the cause of the problem.
I suppose that a 'fix" would be to run gMeasures via a wrapper, say a script named 'gmeasureswrapper':
Not satisfactory though, for our non-English users.
I might modify the PET as above, but in the interests of international support, will have to consider one of the other units-converters for future quirkies.
Thanks for finding the cause of the problem.
I suppose that a 'fix" would be to run gMeasures via a wrapper, say a script named 'gmeasureswrapper':
Code: Select all
#!/bin/sh
LANG=C gmeasures
I might modify the PET as above, but in the interests of international support, will have to consider one of the other units-converters for future quirkies.
[url]https://bkhome.org/news/[/url]
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
I had a vague memory that gmeasures has been internationalised.
I think that rodin.s is our expert at internationalizing C programs.
Just did a search, found this:
http://www.murga-linux.com/puppy/viewtopic.php?t=95490
...that has gmeasures internationalized by robwoj44, but only a binary posted there.
I think that rodin.s is our expert at internationalizing C programs.
Just did a search, found this:
http://www.murga-linux.com/puppy/viewtopic.php?t=95490
...that has gmeasures internationalized by robwoj44, but only a binary posted there.
[url]https://bkhome.org/news/[/url]
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
Ah here it is, internationalised gmeasures source, by robwoj44:
http://www.murga-linux.com/puppy/viewto ... 440#819440
http://www.murga-linux.com/puppy/viewto ... 440#819440
[url]https://bkhome.org/news/[/url]
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
gMeasures is not working in localized Puppies
Never been using gmeasures though it is in every Puppy I have used so far.musher0 wrote:Hi, guys.
This may be the problem: my default LANG parameter is fr_CA.
From the README doc in the source file suggested by BK, you can read :
Quote:
Locales
=======
By default, gMeasures uses the "C" locale. If your locale uses a comma instead
of a decimal point, and you want a localized version of this program, here are
the steps to take:
1. In the main.c file, go to main() and uncomment the gtk_set_locale() line.
2. Also in the main.c file, go to AppReadWriteConfig() and replace the decimal
points in the defs array with commas.
3. Recompile the program.
fr_CA uses the comma as the decimal delimiter.
I did point # 1, but I couldn't find any decimal commas in the "main.c" file
at "AppReadWriteConfig()"... So it's going to be pretty tough to recompile
with non-existing commas!!!
Ah, Linux programs... Wink
BFN.
musher0
_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Isn't it needless to post this in Additional Software (PETs, n' stuff)?
Anyway, congrats, you have found a bug!
... and Puppy and BK is the wrong adress to report this bug.
Nobody has said you should find decimal commas:I couldn't find any decimal commas in the "main.c" file
at "AppReadWriteConfig()"...
Hope this "multiplication of a recipe" has not been needlessly.Paul Schuurmans in the README file in the source package of gmeasures-0.7 wrote: replace the decimal
points in the defs array with commas
If you would use jwm menu you could simply fix it by:
Code: Select all
sed -i 's/>gmeasures</\>LANG=C gmeasures\</' $HOME/.jwmrc
jwm -restart
---
Barry was faster....
Hello, L18L.
I see that you are happy oh so happy to have found fault with me!
You can certainly rejoice in the fact that I do not know the C language,
and that therefore I cannot pinpoint nor correct whatever needs to be
fixed in the C code to localize gMeasures properly.
Please feel free to add to the list of my known and unknown defects if
it makes you happy... I'm thick-skinned, and all for my fellow humans'
happiness.
I know the < LANG=C > prefix to commands, it can be used in any
launcher or menu, including pekwm's. But using it makes no sense in
the context of an internationalized distro.
The problem here is that the Puppy community has been presented with
a program that does not lend itself well to localization.
Another forum member using localized Puppies has just informed me
that gMeasures has other shortcomings: gMeasures can only convert
euros to guilders, not to other currencies, and seconds only to minutes,
not to hours or days, for example.
Of course BK is faster. (What BK is faster at you do not say,
however! So for the fun of it, I'll agree with you that he is a
generally faster person!)
In particular: he's a fast developer, and I'm simply an enthusiastic
amateur (actually, in this case, I'm fast becoming a "depressed"
amateur...).
It stands to logic that professionals shouldn't be pitted against amateurs.
Doing so is unfair, isn't it?
I should not have to spell out here that if "professional" programmers
such as those who programmed gMeasures truly had a professional
attitude, amateurs would not have to do what I'm having to do: play
critic because they've uncovered program bugs.
In any case, pConvert and gonvert brilliantly do what gMeasures fails to
do, and I am happy to have discovered them. I may not be a C
programmer at all, but I'm a damn good researcher.
So I stand my ground: for technical reasons, and now for human oh so
human reasons, gMeasures has to go.
Regards.
musher0
I see that you are happy oh so happy to have found fault with me!
You can certainly rejoice in the fact that I do not know the C language,
and that therefore I cannot pinpoint nor correct whatever needs to be
fixed in the C code to localize gMeasures properly.
Please feel free to add to the list of my known and unknown defects if
it makes you happy... I'm thick-skinned, and all for my fellow humans'
happiness.
I know the < LANG=C > prefix to commands, it can be used in any
launcher or menu, including pekwm's. But using it makes no sense in
the context of an internationalized distro.
The problem here is that the Puppy community has been presented with
a program that does not lend itself well to localization.
Another forum member using localized Puppies has just informed me
that gMeasures has other shortcomings: gMeasures can only convert
euros to guilders, not to other currencies, and seconds only to minutes,
not to hours or days, for example.
Of course BK is faster. (What BK is faster at you do not say,
however! So for the fun of it, I'll agree with you that he is a
generally faster person!)
In particular: he's a fast developer, and I'm simply an enthusiastic
amateur (actually, in this case, I'm fast becoming a "depressed"
amateur...).
It stands to logic that professionals shouldn't be pitted against amateurs.
Doing so is unfair, isn't it?
I should not have to spell out here that if "professional" programmers
such as those who programmed gMeasures truly had a professional
attitude, amateurs would not have to do what I'm having to do: play
critic because they've uncovered program bugs.
In any case, pConvert and gonvert brilliantly do what gMeasures fails to
do, and I am happy to have discovered them. I may not be a C
programmer at all, but I'm a damn good researcher.
So I stand my ground: for technical reasons, and now for human oh so
human reasons, gMeasures has to go.
Regards.
musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Or maybeBarryK wrote:I suppose that a 'fix" would be to run gMeasures via a wrapper, say a script named 'gmeasureswrapper':
Code: Select all
#!/bin/sh LANG=C gmeasures
Code: Select all
#!/bin/sh
LC_NUMERIC=C gmeasures
Hello, all.
The following goes beyond localisation, it is even more serious as it puts
into question the accuracy offered by gMeasures. I ran gMeasures with the
C locale and this is the conversion I get from kilgrams to pounds.
Taking as reference an old "Mathematical Tables from Handbook of
Chemistry and Physics" (1963), a kilogram weighs 2.204623 pounds.
The constant has not changed since then!
gonvert and pConvert get it right, not gMeasures, even with the use of the
C locale prefix.
gMeasures only multiplies by two (2).
I rest my case. Let's get rid of this program before its wrong results get
all of our users into trouble.
BFN.
musher0
The following goes beyond localisation, it is even more serious as it puts
into question the accuracy offered by gMeasures. I ran gMeasures with the
C locale and this is the conversion I get from kilgrams to pounds.
Taking as reference an old "Mathematical Tables from Handbook of
Chemistry and Physics" (1963), a kilogram weighs 2.204623 pounds.
The constant has not changed since then!
gonvert and pConvert get it right, not gMeasures, even with the use of the
C locale prefix.
gMeasures only multiplies by two (2).
I rest my case. Let's get rid of this program before its wrong results get
all of our users into trouble.
BFN.
musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Hmm... works fine here.
I've always liked gMeasures - a light little app that does what it does, just fine by me.
Bob
I've always liked gMeasures - a light little app that does what it does, just fine by me.
Bob
- Attachments
-
- gmeasures-precise571.jpeg
- gMeasures on Precise 5.7.1
- (36.68 KiB) Downloaded 404 times
Hi, bob.Moat wrote:Hmm... works fine here.
I've always liked gMeasures - a light little app that does what it does, just fine by me.
Bob
Thanks for your input.
What's your LANG parameter ? en_SOMETHING ?
That proves itself, doesn't it?
BFN.
musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Nope. Doesn't work.rcrsn51 wrote:Or maybeBarryK wrote:I suppose that a 'fix" would be to run gMeasures via a wrapper, say a script named 'gmeasureswrapper':
Code: Select all
#!/bin/sh LANG=C gmeasures
That might use the dot as the decimal separator regardless of locale, while honouring the translations.Code: Select all
#!/bin/sh LC_NUMERIC=C gmeasures
- Attachments
-
- how-much-more-proof-do-we-need_2015-03-06(2).jpg
- (28.63 KiB) Downloaded 420 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Yes - en_US. But wouldn't the fix be as easy as re-compiling the internationalized source from robwoj44, as Barry linked to above? Might be interesting to see if that resolves these issues or not.musher0 wrote:What's your LANG parameter ? en_SOMETHING ?
I'll have to give one of the alternates you posted a look-see, though!
Bob
Hello again, bob.Moat wrote:Yes - en_US. But wouldn't the fix be as easy as re-compiling the internationalized source from robwoj44, as Barry linked to above? Might be interesting to see if that resolves these issues or not.musher0 wrote:What's your LANG parameter ? en_SOMETHING ?
I'll have to give one of the alternates you posted a look-see, though!
Bob
Nope. I don't know what it is, but the "internationalized" version that I just
compiled from that source still says a kilo weighs only two pounds...
I didn't test every conversion, but this version still offers only guilders as
a conversion from euros.
I've finished banging my head on this one. BFN.
musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
From the few different languages I've tried with the wary repo version, it seems gMeasures is only correct in English.
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
I am testing robwoj44's gmeasures
This converts kilograms to pounds correctly;
# LANG=C ./gmeasures
Interesting this also correct (German uses the comma):
# LANG=de_DE ./gmeasures
But this gives the error reported by musher0:
# LANG=de_DE.UTF-8 ./gmeasures
also:
# LANG=de_DE.utf8 ./gmeasures
I will ask robwoj44 about it.
This converts kilograms to pounds correctly;
# LANG=C ./gmeasures
Interesting this also correct (German uses the comma):
# LANG=de_DE ./gmeasures
But this gives the error reported by musher0:
# LANG=de_DE.UTF-8 ./gmeasures
also:
# LANG=de_DE.utf8 ./gmeasures
I will ask robwoj44 about it.
[url]https://bkhome.org/news/[/url]