Ticket #7767: Tracker_alert_label_to_verb.diff

File Tracker_alert_label_to_verb.diff, 5.2 KB (added by jscipione, 13 years ago)

Several people on the mailing list commented that they didn't like the word "OK" and would prefer a properly descriptive verb instead. This patch changes "Do It" to an action verb such as "Rename". I did my darndest to make sure that this would still translate correctly. I also did some 80 char limit fixes. Lastly I got rid of the OS_NAME #define and just use the word "Haiku" in the messages.

  • src/kits/tracker/FSUtils.cpp

    diff --git src/kits/tracker/FSUtils.cpp src/kits/tracker/FSUtils.cpp
    index 1af1220..11a05b0 100644
    bool DirectoryMatches(const BEntry *, const char *additionalPath,  
    135135
    136136status_t empty_trash(void *);
    137137
    138 #ifdef __HAIKU__
    139     #define OS_NAME "Haiku"
    140 #else
    141     #define OS_NAME "BeOS"
    142 #endif
    143 
    144138
    145139static const char* kDeleteConfirmationStr =
    146140    B_TRANSLATE_MARK("Are you sure you want to delete the "
    enum {  
    612606
    613607
    614608bool
    615 ConfirmChangeIfWellKnownDirectory(const BEntry *entry, const char *ifYouDoAction,
    616     const char *toDoAction, bool dontAsk, int32 *confirmedAlready)
     609ConfirmChangeIfWellKnownDirectory(const BEntry *entry,
     610    const char *ifYouDoAction, const char *toDoAction,
     611    bool dontAsk, int32 *confirmedAlready)
    617612{
    618613    // Don't let the user casually move/change important files/folders
    619614    //
    ConfirmChangeIfWellKnownDirectory(const BEntry *entry, const char *ifYouDoAction  
    638633    if (DirectoryMatchesOrContains(entry, B_SYSTEM_DIRECTORY)) {
    639634        warning.SetTo(
    640635            B_TRANSLATE("If you %ifYouDoAction the system folder or its "
    641             "contents, you won't be able to boot " OS_NAME "! Are you sure you "
    642             "want to do this? To %toDoAction the system folder or its contents "
    643             "anyway, hold down the Shift key and click \"Do it\"."));
     636            "contents, you won't be able to boot Haiku! Are you sure you "
     637            "want to do this? To %toDoAction the system folder or its "
     638            "contents anyway, hold down the Shift key and click "
     639            "\"%toDoAction\"."));
    644640    } else if (DirectoryMatches(entry, B_COMMON_DIRECTORY)) {
    645641        warning.SetTo(
    646             B_TRANSLATE("If you %ifYouDoAction the common folder, " OS_NAME
    647             " may not behave properly! Are you sure you want to do this? "
     642            B_TRANSLATE("If you %ifYouDoAction the common folder, Haiku "
     643            "may not behave properly! Are you sure you want to do this? "
    648644            "To %toDoAction the common folder anyway, hold down the "
    649             "Shift key and click \"Do it\"."));
     645            "Shift key and click \"%toDoAction\"."));
    650646    } else if (DirectoryMatches(entry, B_USER_DIRECTORY)) {
    651647        warning .SetTo(
    652             B_TRANSLATE("If you %ifYouDoAction the home folder, " OS_NAME
    653             " may not behave properly! Are you sure you want to do this? "
     648            B_TRANSLATE("If you %ifYouDoAction the home folder, Haiku "
     649            "may not behave properly! Are you sure you want to do this? "
    654650            "To %toDoAction the home folder anyway, hold down the "
    655             "Shift key and click \"Do it\"."));
     651            "Shift key and click \"%toDoAction\"."));
    656652    } else if (DirectoryMatchesOrContains(entry, B_USER_CONFIG_DIRECTORY)
    657653        || DirectoryMatchesOrContains(entry, B_COMMON_SETTINGS_DIRECTORY)) {
    658654
    ConfirmChangeIfWellKnownDirectory(const BEntry *entry, const char *ifYouDoAction  
    661657            || DirectoryMatchesOrContains(entry, "beos_mime",
    662658                B_COMMON_SETTINGS_DIRECTORY)) {
    663659            warning.SetTo(
    664                 B_TRANSLATE("If you %ifYouDoAction the mime settings, " OS_NAME
    665                 " may not behave properly! Are you sure you want to do this? "
    666                 "To %toDoAction the mime settings anyway, click \"Do it\"."));
     660                B_TRANSLATE("If you %ifYouDoAction the mime settings, Haiku "
     661                "may not behave properly! Are you sure you want to do this? "
     662                "To %toDoAction the mime settings anyway, click "
     663                "\"%toDoAction\"."));
    667664            requireOverride = false;
    668665        } else if (DirectoryMatches(entry, B_USER_CONFIG_DIRECTORY)) {
    669666            warning.SetTo(
    670                 B_TRANSLATE("If you %ifYouDoAction the config folder, " OS_NAME
    671                 " may not behave properly! Are you sure you want to do this? "
    672                 "To %toDoAction the config folder anyway, click \"Do it\"."));
     667                B_TRANSLATE("If you %ifYouDoAction the config folder, Haiku "
     668                "may not behave properly! Are you sure you want to do this? "
     669                "To %toDoAction the config folder anyway, click "
     670                "\"%toDoAction\"."));
    673671            requireOverride = false;
    674672        } else if (DirectoryMatches(entry, B_USER_SETTINGS_DIRECTORY)
    675673            || DirectoryMatches(entry, B_COMMON_SETTINGS_DIRECTORY)) {
    676674            warning.SetTo(
    677                 B_TRANSLATE("If you %ifYouDoAction the settings folder, " OS_NAME
    678                 " may not behave properly! Are you sure you want to do this? "
    679                 "To %toDoAction the settings folder anyway, click \"Do it\"."));
     675                B_TRANSLATE("If you %ifYouDoAction the settings folder, Haiku "
     676                "may not behave properly! Are you sure you want to do this? "
     677                "To %toDoAction the settings folder anyway, click "
     678                "\"%toDoAction\"."));
    680679            requireOverride = false;
    681680        }
    682681    }
    ConfirmChangeIfWellKnownDirectory(const BEntry *entry, const char *ifYouDoAction  
    694693
    695694    warning.ReplaceFirst("%ifYouDoAction", ifYouDoAction);
    696695    warning.ReplaceFirst("%toDoAction", toDoAction);
     696    warning.ReplaceLast("%toDoAction",
     697        BString(toDoAction).Capitalize().String());
     698
     699    BString buttonLabel(B_TRANSLATE_COMMENT("%toDoAction",
     700        "Action label for the button, e.g. Rename"));
     701    buttonLabel.ReplaceFirst("%toDoAction",
     702        BString(toDoAction).Capitalize().String());
    697703
    698704    OverrideAlert *alert = new OverrideAlert("", warning.String(),
    699         B_TRANSLATE("Do it"), (requireOverride ? B_SHIFT_KEY : 0),
     705        buttonLabel.String(), (requireOverride ? B_SHIFT_KEY : 0),
    700706        B_TRANSLATE("Cancel"), 0, NULL, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
    701707    alert->SetShortcut(1, B_ESCAPE);
    702708    if (alert->Go() == 1) {