Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#5907 closed enhancement (fixed)

Packageinstaller localization patch

Reported by: Karvjorm Owned by: stippi
Priority: normal Milestone: R1
Component: Applications/PackageInstaller Version: R1/alpha1
Keywords: packageinstaller localization patch Cc: Karvjorm
Blocked By: Blocking:
Platform: All

Description

Here is a localization patch for packageinstaller application.

Attachments (2)

packageinstallerLocalization.patch (23.1 KB ) - added by Karvjorm 14 years ago.
Localization patch for the PackageInstaller application
packageinstallerLocalization.2.patch (28.3 KB ) - added by Karvjorm 14 years ago.
A localization patch for packageinsteller application.

Download all attachments as: .zip

Change History (7)

by Karvjorm, 14 years ago

Localization patch for the PackageInstaller application

comment:1 by stippi, 14 years ago

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!

by Karvjorm, 14 years ago

A localization patch for packageinsteller application.

comment:2 by Karvjorm, 14 years ago

An updated localization patch for the Packageinstaller application. I did not notice to replace the previous one. Sorry.

comment:3 by stippi, 14 years ago

Owner: changed from sil2100 to stippi
Status: newin-progress

comment:4 by stippi, 14 years ago

Resolution: fixed
Status: in-progressclosed

Patch applied in hrev36618. Thanks a bunch!

Note: See TracTickets for help on using tickets.