|
|||
|
.NET, Delphi, ... - Sisulizer Localization Tool Support > Technical Support (You need to be registered at the forum to write) > Bugs and Quirks in Sisulizer > slmake: option to return errorcode > 0 for 'warnings'
|
| Moderated by: Renate.Reinartz, Markus.Kreisel, Jaakko.Salmenius, Ilkka.Salmenius | Page: 1 2 |
|
|||||||||||||||
| slmake: option to return errorcode > 0 for 'warnings' - Bugs and Quirks in Sisulizer - Technical Support (You need to be registered at the forum to write) - .NET, Delphi, ... - Sisulizer Localization Tool Support | |||||||||||||||||
| Author | Post | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||||||
|
daniel Member
|
i noticed that the commandline util slmake returns errorcode 0 even when a validate task returns some errors/warnings. it does return an errorcode 1 when for example a file is missing. i'm guessing this is not a bug because validate sees it's output as warnings and not errors. so here is my request: can an option be added to the validate task to return with an errorcode > 0 when validate encounters something? for example i want to let our automated build fail when validate encounters an ' inconsistent format string' warning.
|
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
Renate.Reinartz Administrator
|
Hi Daniel, I am not sure if I got your suggestion right. Currently slmake returns: 0 if there are no error or warning items in the log. 1 if there is at least on error item in the log. 2 if there is at least on warning item in the log. Do I got it right, that you want slmake to return 2 for a warning given by the validation settings in the slp? I will cross-check that with R&D. Best regards, Renate
____________________ http://www.sisulizer.de - Three simple steps to localize |
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
daniel Member
|
hi renate, ah, then it is a bug: even though there are warnings the errorcode is still 0...
|
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
Renate.Reinartz Administrator
|
Hi Daniel, I see. I moved the thread to our Bugs and Quirks section. Our R&D will take a closer look next week. Just for the case. Are you using Build 2.0.283? Best regards, Renate
____________________ http://www.sisulizer.de - Three simple steps to localize |
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
Jaakko.Salmenius Administrator
|
SlMake has only two result codes: 0 = no errors 1 = at least one error So if there is a warning SlMake returns 0. This is from SlMake's help SlMake version 2008 (Build 283) Copyrights © 2005-2009 Sisulizer Ltd. Syntax: SlMake <tasks> project [-q] [-h] Contain one or more tasks and their options. Possible tasks are: add Add a new source and create a new project if needed create Create localized items. You can also use build instead duplicate Translate duplicate strings exchange Create an exchange package export Export data to a file fillpseudo Fill pseudo translation import Import data to project remove Remove unused items removepseudo Remove pseudo translation report Create a report scan Scan project translate Translate strings using translation engines validate Validate original or translated values If no task is given the create task is performed. project Sisulizer project file (.slp) to be processed -q Quiet mode. Only errors are shown. -h Show detailed help about a task. Examples: Show detailed help about the import task SlMake import -h Result code is 0 if successful and 1 if an error occured. Jaakko
____________________ http://www.sisulizer.com - Three simple steps to localize |
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
daniel Member
|
ok, so what renate said in her reply (errorcode 2 if there is at least one warning item in the log) is not true, and my intitial remark about warnings not resulting in an errorcode > 0 is? then i would like to make a request for that! :-)
|
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
Markus.Kreisel Administrator
|
Hi, Renate was referencing to: http://forum.sisulizer.com/view_topic.php?id=787 We are a little bit puzzled ourself in the moment. It seems the return value 2 never materialized :-) Sorry for the confusion. Markus
____________________ http://www.sisulizer.com - Three simple steps to localize |
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
Jaakko.Salmenius Administrator
|
There was an idea to implement 0, 1, 2 codes where 2 would be warning. However it was not implemented. The reason is that 0 and 1 were already taken (0 = OK and 1 = error). Using 2 as warning that is much less severe as 1 that was for errors would be illogical. I would have also broke many build process that we expecting nozero to be an error. I am open to an ideas that would be possible to pass information about warning. One choice would be an option (e.g. -w) that would change the result code from (0/1) to (0/1/2) where 0 = no errors and warnings 1 = warnings but no errors 2 = errors and possibly also warnings Jaakko
____________________ http://www.sisulizer.com - Three simple steps to localize |
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
daniel Member
|
yes jaakko, that suggestion would work great for me!
|
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
Jaakko.Salmenius Administrator
|
I added -w option to SlMake in build 284. -w Result code is 2 if errors, 1 if warnings and 0 if successful. Otherwise result code is 1 if errors and 0 in other cases. If you want three value error code to be given use -w option. SlMake scan -w MyProject.slp Jaakko
____________________ http://www.sisulizer.com - Three simple steps to localize |
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
daniel Member
|
great stuff, and thumbs up for all your quick replys and implementation. where/when can i download build 284?
|
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
Jaakko.Salmenius Administrator
|
Today or tomorrow. If you join Sisulizer mailing list http://www.sisulizer.com/support/mailinglist.shtml you will be automatically notificated when a new build is ready to be downloaded. Jaakko
____________________ http://www.sisulizer.com - Three simple steps to localize |
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
daniel Member
|
ok, will do. thanks and keep up the good work!
|
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
daniel Member
|
hello again, just installed setup build 284 and unfortunately it seems that this version does not include slmake.exe...
|
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
Markus.Kreisel Administrator
|
You are right. We are working on that. Markus
____________________ http://www.sisulizer.com - Three simple steps to localize |
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
Jaakko.Salmenius Administrator
|
SlMake data in Sisulizer 284 setup was invalid and setup did not install that. I am currently uploading 285 that has valid SlMake. Jaakko
____________________ http://www.sisulizer.com - Three simple steps to localize |
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
daniel Member
|
ok, 285 now indeed includes slmake again. but i still get an errorcode of 0, even though there are warnings (missing translations & inconsistent format string, etc) and the -w option is used: SLMake validate -w -lang:de;en;fr apc.slp or SLMake validate -lang:de;en;fr apc.slp -w
|
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
Jaakko.Salmenius Administrator
|
This is because validate command does not return any error code. It is always 0. Current SlMake generates the result code based on the log file. If it contanins errors SlMake returns error code, if log contains warnings SlMake returns warning code. Validation does not add warnings to log but note level items. This is why returns code is always 0. I will implement warnigs code for valudation task if there are more than one item. Jaakko
____________________ http://www.sisulizer.com - Three simple steps to localize |
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
Jaakko.Salmenius Administrator
|
daniel wrote: SLMake validate -w -lang:de;en;fr apc.slp Options must be before SLP file. I implemented warning exit code to validate task. The new feature will be in build 286. It will come out sometimes next month. Jaakko
____________________ http://www.sisulizer.com - Three simple steps to localize |
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
daniel Member
|
aha, well that explains it...but like i mentioned in my 1st post, i was interested in the warnings of the validate task, so i'll try out #286 as soon as it is released, thanks again.
|
||||||||||||||||
| |||||||||||||||||
| Current time is 10:08 am | Page: 1 2 |
| .NET, Delphi, ... - Sisulizer Localization Tool Support > Technical Support (You need to be registered at the forum to write) > Bugs and Quirks in Sisulizer > slmake: option to return errorcode > 0 for 'warnings' | |
Sisulizer software localization tool - Three simple steps to localize