#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)
Change History (7)
by , 15 years ago
Attachment: | packageinstallerLocalization.patch added |
---|
comment:1 by , 15 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 , 15 years ago
Attachment: | packageinstallerLocalization.2.patch added |
---|
A localization patch for packageinsteller application.
comment:2 by , 15 years ago
An updated localization patch for the Packageinstaller application. I did not notice to replace the previous one. Sorry.
comment:3 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → in-progress |
comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | in-progress → closed |
Patch applied in hrev36618. Thanks a bunch!
Localization patch for the PackageInstaller application