> On Oct. 13, 2016, 6:58 a.m., Anthony Fieroni wrote:
> >

> Second, i don't think library should provide strings to translate, it's an 
> application job.

`QIODevice` provides an `errorString` method (although I don't know if it is 
translated) and I think other frameworks do so too, as well. I think I could 
provide an `error` method returning an enum as well, but the `errorString` 
method is very important to me because it provides more detail on the error 
than an error code.


> On Oct. 13, 2016, 6:58 a.m., Anthony Fieroni wrote:
> > src/karchive.h, line 292
> > <https://git.reviewboard.kde.org/r/129170/diff/1/?file=482073#file482073line292>
> >
> >     First of all you must not provide const char interface and you must use 
> > i18n in all strings.
> >     Second, i don't think library should provide strings to translate, it's 
> > an application job.
> >     So about me, like a programmer not a maintainer, interface should be 
> > setErrorCode and client application can show user help string.
> 
> Luigi Toscano wrote:
>     Apart from the discussion of whether embedding the strings in the library 
> makes sense or not (maybe no), *if* this is accepted, the string should use 
> the Qt system and not (unfortunately) ki18n, because KArchive is a Tier 1 
> framework:
>     
> https://community.kde.org/Frameworks/Frameworks_Localization_Policy#Qt_installation_code

Thanks, Luigi. I'll work on that and update the patch.


- Romário


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129170/#review99969
-----------------------------------------------------------


On Oct. 13, 2016, 4:45 a.m., Romário Rios wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129170/
> -----------------------------------------------------------
> 
> (Updated Oct. 13, 2016, 4:45 a.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: karchive
> 
> 
> Description
> -------
> 
> This method is similar to `QIODevice::errorString()`. I added a public 
> `errorString()` method and a protected `setErrorString()` method, to allow 
> `KArchive`'s subclasses to implement their own error messages. I also 
> implemented most error messages from most subclasses.
> 
> 
> Diffs
> -----
> 
>   autotests/karchivetest.cpp d0fbf41 
>   src/k7zip.cpp 692b1db 
>   src/kar.cpp 7204fb1 
>   src/karchive.h b528a4a 
>   src/karchive.cpp a1a160a 
>   src/karchive_p.h 256620d 
>   src/krcc.cpp 1947dd6 
>   src/ktar.cpp f70b155 
>   src/kzip.cpp 94d4276 
> 
> Diff: https://git.reviewboard.kde.org/r/129170/diff/
> 
> 
> Testing
> -------
> 
> I added `QVERIFY` calls after all errors in `karchivetests.cpp`. Perhaps 
> we'll need more tests, but I'm not sure how to make an archive to fail in 
> some specific way aside from the very basics ("file not found", etc.).
> 
> 
> Thanks,
> 
> Romário Rios
> 
>

Reply via email to