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

Postby sfxcc » 27.01.2012, 15:38

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 Dev Team
Zeos Dev Team
Posts: 1701
Joined: 31.03.2011, 22:38

Postby EgonHugeist » 24.02.2012, 20:48

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...
King regards, Michael

You want to help? 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

Postby rrkarlo » 10.07.2012, 13:04

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 Dev Team
Zeos Dev Team
Posts: 1701
Joined: 31.03.2011, 22:38

Postby EgonHugeist » 10.07.2012, 16:46

rrkarlo,

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

Michael
King regards, Michael

You want to help? 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

Postby rrkarlo » 10.07.2012, 20:35

If, question is for me, answer is yes.

User avatar
EgonHugeist
Zeos Dev Team
Zeos Dev Team
Posts: 1701
Joined: 31.03.2011, 22:38

Postby EgonHugeist » 10.07.2012, 22:22

rrkarlo,

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

Michael
King regards, Michael

You want to help? 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: 65
Joined: 12.12.2009, 07:27

Postby Pitfiend » 11.07.2012, 20:03

may it be possible to add a language property in the zconnection component?

User avatar
EgonHugeist
Zeos Dev Team
Zeos Dev Team
Posts: 1701
Joined: 31.03.2011, 22:38

Postby EgonHugeist » 12.07.2012, 11:25

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
King regards, Michael

You want to help? 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: 65
Joined: 12.12.2009, 07:27

Postby Pitfiend » 13.07.2012, 00:48

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 Dev Team
Zeos Dev Team
Posts: 1701
Joined: 31.03.2011, 22:38

Postby EgonHugeist » 13.07.2012, 07:06

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
King regards, Michael

You want to help? 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: 65
Joined: 12.12.2009, 07:27

Postby Pitfiend » 14.07.2012, 04:12

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 Dev Team
Zeos Dev Team
Posts: 1701
Joined: 31.03.2011, 22:38

Postby EgonHugeist » 14.07.2012, 16:35

Pitfiend,

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

Michael
King regards, Michael

You want to help? 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

Postby sfxcc » 28.08.2012, 16:01

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 Dev Team
Zeos Dev Team
Posts: 1701
Joined: 31.03.2011, 22:38

Postby EgonHugeist » 30.08.2012, 02:09

sfxcc,

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

You want to help? 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:

Postby mdaems » 09.10.2012, 01:13

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


Return to “Feature Requests”

Who is online

Users browsing this forum: No registered users and 1 guest