Yet another localization patch made by Jorma Karvonen. Fixes #7117.

Corrected a bit by me.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40540 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Siarzhuk Zharski
2011-02-16 21:27:21 +00:00
parent 87d10c126f
commit 26e9cef813
2 changed files with 25 additions and 21 deletions
@@ -10,6 +10,8 @@
#include "DataTranslations.h"
#include <stdio.h>
#include <Alert.h>
#include <Catalog.h>
#include <Directory.h>
@@ -51,7 +53,7 @@ DataTranslationsApplication::SetWindowCorner(const BPoint& leftTop)
void
DataTranslationsApplication::AboutRequested()
{
BAlert* alert = new BAlert(B_TRANSLATE("about"),
BAlert* alert = new BAlert(B_TRANSLATE("About"),
B_TRANSLATE("DataTranslations\n\twritten by Oliver Siebenmarck and"
" others\n\tCopyright 2002-2010, Haiku Inc. All rights reserved.\n"),
B_TRANSLATE("OK"));
@@ -72,10 +74,12 @@ DataTranslationsApplication::AboutRequested()
void
DataTranslationsApplication::_InstallError(const char* name, status_t status)
{
BString text(B_TRANSLATE("Could not install "));
text << name << ":\n" << strerror(status);
BString text;
snprintf(text.LockBuffer(512), 512,
B_TRANSLATE("Could not install %s:\n%s"), name, strerror(status));
text.UnlockBuffer();
BAlert* alert = new BAlert(B_TRANSLATE("DataTranslations - Error"),
text.String(), B_TRANSLATE("Ok"));
text.String(), B_TRANSLATE("OK"));
alert->Go();
}
@@ -102,9 +106,9 @@ DataTranslationsApplication::_Install(BDirectory& target, BEntry& entry)
void
DataTranslationsApplication::_NoTranslatorError(const char* name)
{
BString text(B_TRANSLATE("The item '"));
text << B_TRANSLATE("%name' does not appear to be a Translator and will"
" not be installed.");
BString text(
B_TRANSLATE("The item '%name' does not appear to be a Translator and "
"will not be installed."));
text.ReplaceAll("%name", name);
BAlert* alert = new BAlert("", text.String(), B_TRANSLATE("Ok"));
alert->Go();
@@ -152,10 +156,10 @@ DataTranslationsApplication::RefsReceived(BMessage* message)
}
if (target.Contains(ref.name)) {
BString string(B_TRANSLATE("An item named '"));
string << B_TRANSLATE("%name already exists in the "
BString string(
B_TRANSLATE("An item named '%name' already exists in the "
"Translators folder! Shall the existing translator be "
"overwritten?");
"overwritten?"));
string.ReplaceAll("%name", ref.name);
BAlert* alert = new BAlert(B_TRANSLATE("DataTranslations - Note"),
@@ -15,6 +15,8 @@
#include "IconView.h"
#include "TranslatorListView.h"
#include <stdio.h>
#include <Application.h>
#include <Alignment.h>
#include <Alert.h>
@@ -223,17 +225,15 @@ DataTranslationsWindow::_ShowInfoAlert(int32 id)
_GetTranslatorInfo(id, name, info, version, path);
BString message;
message << B_TRANSLATE("Name: %name \nVersion: ");
message.ReplaceAll("%name", name);
// Convert the version number into a readable format
message << (int)B_TRANSLATION_MAJOR_VERSION(version)
<< '.' << (int)B_TRANSLATION_MINOR_VERSION(version)
<< '.' << (int)B_TRANSLATION_REVISION_VERSION(version);
message << B_TRANSLATE("\nInfo: %info\n\nPath:\n") << path.Path() << "\n";
message.ReplaceAll("%info", info);
snprintf(message.LockBuffer(512), 512,
B_TRANSLATE("Name:\t%s \nVersion:\t%ld.%ld.%ld\nInfo:\t%s\n\nPath:\n%s\n"),
name, B_TRANSLATION_MAJOR_VERSION(version),
B_TRANSLATION_MINOR_VERSION(version),
B_TRANSLATION_REVISION_VERSION(version), info, path.Path());
message.UnlockBuffer();
BAlert* alert = new BAlert(B_TRANSLATE("info"), message.String(),
BAlert* alert = new BAlert(B_TRANSLATE("Info"), message.String(),
B_TRANSLATE("OK"));
BTextView *view = alert->TextView();
BFont font;
@@ -243,8 +243,8 @@ DataTranslationsWindow::_ShowInfoAlert(int32 id)
view->GetFont(&font);
font.SetFace(B_BOLD_FACE);
const char* labels[] = {B_TRANSLATE("Name:"), B_TRANSLATE("Version:"),
B_TRANSLATE("Info:"), B_TRANSLATE("Path:"), NULL};
const char* labels[] = { B_TRANSLATE("Name:"), B_TRANSLATE("Version:"),
B_TRANSLATE("Info:"), B_TRANSLATE("Path:"), NULL };
for (int32 i = 0; labels[i]; i++) {
int32 index = message.FindFirst(labels[i]);
view->SetFontAndColor(index, index + strlen(labels[i]), &font);