#5907: Packageinstaller localization patch -------------------------------------------------+-------------------------- Reporter: Karvjorm | Owner: sil2100 Type: enhancement | Status: new Priority: normal | Milestone: R1 Component: Applications/PackageInstaller | Version: R1/alpha1 Keywords: packageinstaller localization patch | Blockedby: Platform: All | Blocking: -------------------------------------------------+-------------------------- Comment(by stippi): Thanks again! With this patch, the ballance is different, it seems fine to translate most printf()s and fprintf()s like you did, but again it looks like some are just debugging messages. You've tried to find a solution for the string construction when a target item already exists. I think it would be better to make ItemKind() not return a string at all, but a uint32 or something indicating the type. It's a case of mixing model and GUI too much. Then you can use a switch statement for the ItemKind(), and repeat the full string for each kind with a %s where the name is to appear. This is the only way to be really flexible with the translation. Something like this: {{{ const char* formatString; switch (item.ItemKind()) { case kItemKindLink: formatString = TR("The link named %s already exists on your system..."); break; case kItemKindFolder: formatString = TR("The folder named %s already exists on your system..."); break; ... } char buffer[512]; snprintf(buffer, sizeof(buffer), formatString, path.Leaf()); BAlert ... }}} Also, I would replace any occurances of "Yes" and "No" with the respective actions. In this case "Remeber" and "Ask again". This way one mostly doesn't need to read the text, especially not the second time. The string construction with regards to the available disk space is also problematic. Maybe a format string like "(%s free)" is again a good solution. This allows a translation to Thanks for working on these! -- Ticket URL: <http://dev.haiku-os.org/ticket/5907#comment:1> Haiku <http://dev.haiku-os.org> Haiku - the operating system.