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:
@@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
#include "DataTranslations.h"
|
#include "DataTranslations.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
#include <Catalog.h>
|
#include <Catalog.h>
|
||||||
#include <Directory.h>
|
#include <Directory.h>
|
||||||
@@ -51,7 +53,7 @@ DataTranslationsApplication::SetWindowCorner(const BPoint& leftTop)
|
|||||||
void
|
void
|
||||||
DataTranslationsApplication::AboutRequested()
|
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"
|
B_TRANSLATE("DataTranslations\n\twritten by Oliver Siebenmarck and"
|
||||||
" others\n\tCopyright 2002-2010, Haiku Inc. All rights reserved.\n"),
|
" others\n\tCopyright 2002-2010, Haiku Inc. All rights reserved.\n"),
|
||||||
B_TRANSLATE("OK"));
|
B_TRANSLATE("OK"));
|
||||||
@@ -72,10 +74,12 @@ DataTranslationsApplication::AboutRequested()
|
|||||||
void
|
void
|
||||||
DataTranslationsApplication::_InstallError(const char* name, status_t status)
|
DataTranslationsApplication::_InstallError(const char* name, status_t status)
|
||||||
{
|
{
|
||||||
BString text(B_TRANSLATE("Could not install "));
|
BString text;
|
||||||
text << name << ":\n" << strerror(status);
|
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"),
|
BAlert* alert = new BAlert(B_TRANSLATE("DataTranslations - Error"),
|
||||||
text.String(), B_TRANSLATE("Ok"));
|
text.String(), B_TRANSLATE("OK"));
|
||||||
alert->Go();
|
alert->Go();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,9 +106,9 @@ DataTranslationsApplication::_Install(BDirectory& target, BEntry& entry)
|
|||||||
void
|
void
|
||||||
DataTranslationsApplication::_NoTranslatorError(const char* name)
|
DataTranslationsApplication::_NoTranslatorError(const char* name)
|
||||||
{
|
{
|
||||||
BString text(B_TRANSLATE("The item '"));
|
BString text(
|
||||||
text << B_TRANSLATE("%name' does not appear to be a Translator and will"
|
B_TRANSLATE("The item '%name' does not appear to be a Translator and "
|
||||||
" not be installed.");
|
"will not be installed."));
|
||||||
text.ReplaceAll("%name", name);
|
text.ReplaceAll("%name", name);
|
||||||
BAlert* alert = new BAlert("", text.String(), B_TRANSLATE("Ok"));
|
BAlert* alert = new BAlert("", text.String(), B_TRANSLATE("Ok"));
|
||||||
alert->Go();
|
alert->Go();
|
||||||
@@ -152,10 +156,10 @@ DataTranslationsApplication::RefsReceived(BMessage* message)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (target.Contains(ref.name)) {
|
if (target.Contains(ref.name)) {
|
||||||
BString string(B_TRANSLATE("An item named '"));
|
BString string(
|
||||||
string << B_TRANSLATE("%name already exists in the "
|
B_TRANSLATE("An item named '%name' already exists in the "
|
||||||
"Translators folder! Shall the existing translator be "
|
"Translators folder! Shall the existing translator be "
|
||||||
"overwritten?");
|
"overwritten?"));
|
||||||
string.ReplaceAll("%name", ref.name);
|
string.ReplaceAll("%name", ref.name);
|
||||||
|
|
||||||
BAlert* alert = new BAlert(B_TRANSLATE("DataTranslations - Note"),
|
BAlert* alert = new BAlert(B_TRANSLATE("DataTranslations - Note"),
|
||||||
|
|||||||
@@ -15,6 +15,8 @@
|
|||||||
#include "IconView.h"
|
#include "IconView.h"
|
||||||
#include "TranslatorListView.h"
|
#include "TranslatorListView.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Alignment.h>
|
#include <Alignment.h>
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
@@ -223,17 +225,15 @@ DataTranslationsWindow::_ShowInfoAlert(int32 id)
|
|||||||
_GetTranslatorInfo(id, name, info, version, path);
|
_GetTranslatorInfo(id, name, info, version, path);
|
||||||
|
|
||||||
BString message;
|
BString message;
|
||||||
message << B_TRANSLATE("Name: %name \nVersion: ");
|
|
||||||
message.ReplaceAll("%name", name);
|
|
||||||
|
|
||||||
// Convert the version number into a readable format
|
// Convert the version number into a readable format
|
||||||
message << (int)B_TRANSLATION_MAJOR_VERSION(version)
|
snprintf(message.LockBuffer(512), 512,
|
||||||
<< '.' << (int)B_TRANSLATION_MINOR_VERSION(version)
|
B_TRANSLATE("Name:\t%s \nVersion:\t%ld.%ld.%ld\nInfo:\t%s\n\nPath:\n%s\n"),
|
||||||
<< '.' << (int)B_TRANSLATION_REVISION_VERSION(version);
|
name, B_TRANSLATION_MAJOR_VERSION(version),
|
||||||
message << B_TRANSLATE("\nInfo: %info\n\nPath:\n") << path.Path() << "\n";
|
B_TRANSLATION_MINOR_VERSION(version),
|
||||||
message.ReplaceAll("%info", info);
|
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"));
|
B_TRANSLATE("OK"));
|
||||||
BTextView *view = alert->TextView();
|
BTextView *view = alert->TextView();
|
||||||
BFont font;
|
BFont font;
|
||||||
@@ -243,8 +243,8 @@ DataTranslationsWindow::_ShowInfoAlert(int32 id)
|
|||||||
view->GetFont(&font);
|
view->GetFont(&font);
|
||||||
font.SetFace(B_BOLD_FACE);
|
font.SetFace(B_BOLD_FACE);
|
||||||
|
|
||||||
const char* labels[] = {B_TRANSLATE("Name:"), B_TRANSLATE("Version:"),
|
const char* labels[] = { B_TRANSLATE("Name:"), B_TRANSLATE("Version:"),
|
||||||
B_TRANSLATE("Info:"), B_TRANSLATE("Path:"), NULL};
|
B_TRANSLATE("Info:"), B_TRANSLATE("Path:"), NULL };
|
||||||
for (int32 i = 0; labels[i]; i++) {
|
for (int32 i = 0; labels[i]; i++) {
|
||||||
int32 index = message.FindFirst(labels[i]);
|
int32 index = message.FindFirst(labels[i]);
|
||||||
view->SetFontAndColor(index, index + strlen(labels[i]), &font);
|
view->SetFontAndColor(index, index + strlen(labels[i]), &font);
|
||||||
|
|||||||
Reference in New Issue
Block a user