Error Exception only english
Moderators: gto, cipto_kh, EgonHugeist, mdaems
Error Exception only english
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
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 ..
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
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/
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/
Error messages
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';
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';
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
rrkarlo,
a good point. Can we handle this as feature request?
Michael
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/
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/
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
rrkarlo,
Thank you for your reply. Feature request added to todo-list.
Michael
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/
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/
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
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
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/
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/
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.
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.
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
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
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/
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/
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Pitfiend,
Cool! Nice to know! I'll do the golden rest for the FPC. Thank you for your constribution.
Michael
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/
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/
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.
{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 ..
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
sfxcc,
Sérgio, are you able to attach a patch? Work overload....
Sérgio, are you able to attach a patch? Work overload....
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/
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/