Hallo, Jorma On Sat, 12 Feb 2011 21:43:44 +0200, Jorma Karvonen wrote:
DiskUsage was one of the missing application listed in GCI. It is localized in #7169 two weeks ago, but nobody is interested in to review or commit it.
Regarding diskUsage: I just re-post here my comment in Trac for possible discussion here:
=====From my point of view, this patch is unacceptable. The problem is a way the DiskUsage application work with strings. Typical Haiku applications, as you know, use string literals in the source code. But DiskUsage uses string resources to store this info. Look into DiskUsage.rdef for details.
Frankly speaking the work with resources in Haiku is not so perfect asother parts of it. Another possible problem is a memory leaks - I see no free calls for loaded string resources. And last problem - is the way you
trying to workaround the translation task: {{{ kVolMenuLabel = LoadString("STR_VM_LABEL"); + if (strncmp(kVolMenuLabel, "Volume:", sizeof("Volume:")) == 0) + kVolMenuLabel = (char *)B_TRANSLATE("Volume:"); + }}} it looks like an OVER-complication. :-( So I propose you to move away mentioned string resources from DiskUsage.rdef, and replace corresponding calls of "LoadString" in Common.cpp with those strings wrapped in B_TRANSLATE macros.PS: In my opinion, "color" and "int" can be also moved from DiskUsage.rdef
to Common.cpp. It makes the code a bit more simpler. ;-) =====So, please do proposed refactoring of the DiskUsage application code. Good luck!
-- Kind Regards, S.Zharski