Ticket #7117: datatranslations-localization-update.patch

File datatranslations-localization-update.patch, 3.2 KB (added by Karvjorm, 13 years ago)

A Datatranslations localization patch

  • src/preferences/datatranslations/DataTranslationsWindow.cpp

     
    223223    _GetTranslatorInfo(id, name, info, version, path);
    224224
    225225    BString message;
    226     message << B_TRANSLATE("Name: %name \nVersion: ");
     226    message << B_TRANSLATE("Name: %name \nVersion:") << " ";
    227227    message.ReplaceAll("%name", name);
    228228
    229229    // Convert the version number into a readable format
    230     message << (int)B_TRANSLATION_MAJOR_VERSION(version)
    231         << '.' << (int)B_TRANSLATION_MINOR_VERSION(version)
    232         << '.' << (int)B_TRANSLATION_REVISION_VERSION(version);
     230    message << static_cast<int>B_TRANSLATION_MAJOR_VERSION(version)
     231        << '.' << static_cast<int>B_TRANSLATION_MINOR_VERSION(version)
     232        << '.' << static_cast<int>B_TRANSLATION_REVISION_VERSION(version);
    233233    message << B_TRANSLATE("\nInfo: %info\n\nPath:\n") << path.Path() << "\n";
    234234    message.ReplaceAll("%info", info);
    235235
    236     BAlert* alert = new BAlert(B_TRANSLATE("info"), message.String(),
     236    BAlert* alert = new BAlert("info", message.String(),
    237237        B_TRANSLATE("OK"));
    238238    BTextView *view = alert->TextView();
    239239    BFont font;
  • src/preferences/datatranslations/DataTranslations.cpp

     
    5151void
    5252DataTranslationsApplication::AboutRequested()
    5353{
    54     BAlert* alert = new BAlert(B_TRANSLATE("about"),
     54    BAlert* alert = new BAlert("about",
    5555        B_TRANSLATE("DataTranslations\n\twritten by Oliver Siebenmarck and"
    5656        " others\n\tCopyright 2002-2010, Haiku Inc. All rights reserved.\n"),
    5757        B_TRANSLATE("OK"));
     
    7272void
    7373DataTranslationsApplication::_InstallError(const char* name, status_t status)
    7474{
    75     BString text(B_TRANSLATE("Could not install "));
    76     text << name << ":\n" << strerror(status);
     75    BString text(B_TRANSLATE("Could not install"));
     76    text << " " << name << ":\n" << strerror(status);
    7777    BAlert* alert = new BAlert(B_TRANSLATE("DataTranslations - Error"),
    78         text.String(), B_TRANSLATE("Ok"));
     78        text.String(), B_TRANSLATE("OK"));
    7979    alert->Go();
    8080}
    8181
     
    102102void
    103103DataTranslationsApplication::_NoTranslatorError(const char* name)
    104104{
    105     BString text(B_TRANSLATE("The item '"));
    106     text << B_TRANSLATE("%name' does not appear to be a Translator and will"
    107         " not be installed.");
     105    BString text(
     106        B_TRANSLATE("The item '%name' does not appear to be a Translator and "
     107        "will not be installed."));
    108108    text.ReplaceAll("%name", name);
    109109    BAlert* alert = new BAlert("", text.String(), B_TRANSLATE("Ok"));
    110110    alert->Go();
     
    152152        }
    153153
    154154        if (target.Contains(ref.name)) {
    155             BString string(B_TRANSLATE("An item named '"));
    156             string << B_TRANSLATE("%name already exists in the "
     155            BString string(
     156                B_TRANSLATE("An item named '%name' already exists in the "
    157157                "Translators folder! Shall the existing translator be "
    158                 "overwritten?");
     158                "overwritten?"));
    159159            string.ReplaceAll("%name", ref.name);
    160160
    161161            BAlert* alert = new BAlert(B_TRANSLATE("DataTranslations - Note"),