Error Exception only english

Freature requests from users for ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist, mdaems

sfxcc
Senior Boarder
Senior Boarder
Posts: 95
Joined: 13.05.2010, 18:48

Error Exception only english

Post by sfxcc »

Can you add support to number identification of a exeception.

If we want to show the error to the user it show in english and much user dont understand and to convert it so if we want to use other language a id number it was ok because we could show our own exception window.



thanks
where's the code ..
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

look to Zeos.inc there are lang-definitions by using compiler directives. The most Exception-Strings are in ZMessages.pas. You can complete them for your language and post it in the forum. Then we can commit them...
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
rrkarlo
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 10.07.2012, 11:17

Error messages

Post by rrkarlo »

In file zmessages.pas you can handle zeos messages. But server messages are defined here:
http://dev.mysql.com/doc/refman//5.5/en ... server.htm
with error code numbers. That messages you can additionaly explain. Server messages in Zeos.inc. are defined as:
SSQLError1 = 'SQL Error: %s';
SSQLError2 = 'SQL Error: %s Code: %d';
SSQLError3 = 'SQL Error: %s Code: %d SQL: %s';
SSQLError4 = 'SQL Error: %s Code: %d Message: %s';
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

rrkarlo,

a good point. Can we handle this as feature request?

Michael
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
rrkarlo
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 10.07.2012, 11:17

Post by rrkarlo »

If, question is for me, answer is yes.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

rrkarlo,

Thank you for your reply. Feature request added to todo-list.

Michael
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
User avatar
Pitfiend
Senior Boarder
Senior Boarder
Posts: 68
Joined: 12.12.2009, 07:27

Post by Pitfiend »

may it be possible to add a language property in the zconnection component?
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

Pitfiend,

Everything might be possible. How do we handle unneeded resource strings in this case?
Feel motivated to help and attach a patch.

There is a lot of other things to to in background. We've fixed zoo many alltime Zeos issues. Our rev-counter increases daily....

Michael
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
User avatar
Pitfiend
Senior Boarder
Senior Boarder
Posts: 68
Joined: 12.12.2009, 07:27

Post by Pitfiend »

String resources can be loaded from a file (one file for each language, just the Zeos strings, trying to load messages for every every sql engine is an unneeded pain). If no string file available, you use the default language, english.

That way you don't overload the lib with unneeded resources, and the developers can translate from english to their native language. Only trouble I can see, is to not provide that files to the end user, in any case they still get messages in english.

Will try to make some helpers to allow Zeos to switch languages. Only one question: Are all the strings available as resources? take in mind that if any is still hardcoded then this task is unworthy.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

Pitfiend,

Getting some help word be great. I would. Like to say 99% of the Messages are available in the ZMessages.pas. It might be possible that there are some view in other uses too. If you see some, define them as constant or add them to your file...

Michael
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
User avatar
Pitfiend
Senior Boarder
Senior Boarder
Posts: 68
Joined: 12.12.2009, 07:27

Post by Pitfiend »

I foresee a minor trouble, there are some specific errors por FPC. I'm not used to FPC, neither know if the resource reassignment will work. Anyway will write the helpers for Delphi, maybe you can fix it for FPC.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

Pitfiend,

Cool! Nice to know! I'll do the golden rest for the FPC. Thank you for your constribution.

Michael
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
sfxcc
Senior Boarder
Senior Boarder
Posts: 95
Joined: 13.05.2010, 18:48

Post by sfxcc »

Can you replace the resourcestring with
{DEFINE ENGLISH}
{IFFDEF ENGLISH} {$I EnglishResource}

var cMyErrorMessage1= rResourceErrorMessage1;
var cMyErrorMessage2= rResourceErrorMessage2;
var cMyErrorMessage3= rResourceErrorMessage3;
var cMyErrorMessage4= rResourceErrorMessage4;
var cMyErrorMessage5= rResourceErrorMessage5;
var cMyErrorMessage6= rResourceErrorMessage6;

and if we want change the variable on the fly we can change language on the fly to another language, is better and easy to do ('Still use the existing resourcestrings') the prob is ecery time update zeos ill have to do this.

So can you set it on base.
where's the code ..
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

sfxcc,

Sérgio, are you able to attach a patch? Work overload.... :doc:
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Anything happened in this domain?
Please make sure we don't really want to add required files to our users deliverables by default. So at least one laguage ressource should be built in. If the built in one can be definede in zeos.inc, that would be even better.

Mark
Image
Post Reply