Updated to use B_TRANSLATE* macros. relates to #5408.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36662 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -298,7 +298,7 @@ AboutApp::AboutApp()
|
|||||||
#define TR_CONTEXT "AboutWindow"
|
#define TR_CONTEXT "AboutWindow"
|
||||||
|
|
||||||
AboutWindow::AboutWindow()
|
AboutWindow::AboutWindow()
|
||||||
: BWindow(BRect(0, 0, 500, 300), TR("About this system"),
|
: BWindow(BRect(0, 0, 500, 300), B_TRANSLATE("About this system"),
|
||||||
B_TITLED_WINDOW, B_AUTO_UPDATE_SIZE_LIMITS | B_NOT_ZOOMABLE)
|
B_TITLED_WINDOW, B_AUTO_UPDATE_SIZE_LIMITS | B_NOT_ZOOMABLE)
|
||||||
{
|
{
|
||||||
SetLayout(new BGroupLayout(B_VERTICAL));
|
SetLayout(new BGroupLayout(B_VERTICAL));
|
||||||
@@ -455,7 +455,7 @@ AboutView::AboutView()
|
|||||||
// OS Version
|
// OS Version
|
||||||
|
|
||||||
char string[1024];
|
char string[1024];
|
||||||
strcpy(string, TR("Unknown"));
|
strcpy(string, B_TRANSLATE("Unknown"));
|
||||||
|
|
||||||
// the version is stored in the BEOS:APP_VERSION attribute of libbe.so
|
// the version is stored in the BEOS:APP_VERSION attribute of libbe.so
|
||||||
BPath path;
|
BPath path;
|
||||||
@@ -481,7 +481,7 @@ AboutView::AboutView()
|
|||||||
char version[16];
|
char version[16];
|
||||||
snprintf(version, sizeof(version), "%ld", revision);
|
snprintf(version, sizeof(version), "%ld", revision);
|
||||||
strlcat(string, " (", sizeof(string));
|
strlcat(string, " (", sizeof(string));
|
||||||
strlcat(string, TR("Revision"), sizeof(string));
|
strlcat(string, B_TRANSLATE("Revision"), sizeof(string));
|
||||||
strlcat(string, " ", sizeof(string));
|
strlcat(string, " ", sizeof(string));
|
||||||
strlcat(string, version, sizeof(string));
|
strlcat(string, version, sizeof(string));
|
||||||
strlcat(string, ")", sizeof(string));
|
strlcat(string, ")", sizeof(string));
|
||||||
@@ -496,7 +496,8 @@ AboutView::AboutView()
|
|||||||
BEntry gccFourHybrid("/boot/system/lib/gcc2/libstdc++.r4.so");
|
BEntry gccFourHybrid("/boot/system/lib/gcc2/libstdc++.r4.so");
|
||||||
BEntry gccTwoHybrid("/boot/system/lib/gcc4/libsupc++.so");
|
BEntry gccTwoHybrid("/boot/system/lib/gcc4/libsupc++.so");
|
||||||
if (gccFourHybrid.Exists() || gccTwoHybrid.Exists())
|
if (gccFourHybrid.Exists() || gccTwoHybrid.Exists())
|
||||||
snprintf(string, sizeof(string), TR("GCC %d Hybrid"), __GNUC__);
|
snprintf(string, sizeof(string), B_TRANSLATE("GCC %d Hybrid"),
|
||||||
|
__GNUC__);
|
||||||
else
|
else
|
||||||
snprintf(string, sizeof(string), "GCC %d", __GNUC__);
|
snprintf(string, sizeof(string), "GCC %d", __GNUC__);
|
||||||
|
|
||||||
@@ -508,9 +509,9 @@ AboutView::AboutView()
|
|||||||
char processorLabel[256];
|
char processorLabel[256];
|
||||||
if (systemInfo.cpu_count > 1) {
|
if (systemInfo.cpu_count > 1) {
|
||||||
snprintf(processorLabel, sizeof(processorLabel),
|
snprintf(processorLabel, sizeof(processorLabel),
|
||||||
TR("%ld Processors:"), systemInfo.cpu_count);
|
B_TRANSLATE("%ld Processors:"), systemInfo.cpu_count);
|
||||||
} else
|
} else
|
||||||
strlcpy(processorLabel, TR("Processor:"),
|
strlcpy(processorLabel, B_TRANSLATE("Processor:"),
|
||||||
sizeof(processorLabel));
|
sizeof(processorLabel));
|
||||||
|
|
||||||
BString cpuType;
|
BString cpuType;
|
||||||
@@ -523,9 +524,9 @@ AboutView::AboutView()
|
|||||||
|
|
||||||
int32 clockSpeed = get_rounded_cpu_speed();
|
int32 clockSpeed = get_rounded_cpu_speed();
|
||||||
if (clockSpeed < 1000)
|
if (clockSpeed < 1000)
|
||||||
sprintf(string, TR("%ld MHz"), clockSpeed);
|
sprintf(string, B_TRANSLATE("%ld MHz"), clockSpeed);
|
||||||
else
|
else
|
||||||
sprintf(string, TR("%.2f GHz"), clockSpeed / 1000.0f);
|
sprintf(string, B_TRANSLATE("%.2f GHz"), clockSpeed / 1000.0f);
|
||||||
|
|
||||||
BStringView* frequencyView = new BStringView("frequencytext", string);
|
BStringView* frequencyView = new BStringView("frequencytext", string);
|
||||||
frequencyView->SetExplicitAlignment(BAlignment(B_ALIGN_LEFT,
|
frequencyView->SetExplicitAlignment(BAlignment(B_ALIGN_LEFT,
|
||||||
@@ -562,7 +563,7 @@ AboutView::AboutView()
|
|||||||
.AddGroup(B_VERTICAL)
|
.AddGroup(B_VERTICAL)
|
||||||
.Add(new LogoView())
|
.Add(new LogoView())
|
||||||
.AddGroup(B_VERTICAL)
|
.AddGroup(B_VERTICAL)
|
||||||
.Add(_CreateLabel("oslabel", TR("Version:")))
|
.Add(_CreateLabel("oslabel", B_TRANSLATE("Version:")))
|
||||||
.Add(versionView)
|
.Add(versionView)
|
||||||
.Add(gccView)
|
.Add(gccView)
|
||||||
.AddStrut(offset)
|
.AddStrut(offset)
|
||||||
@@ -570,14 +571,14 @@ AboutView::AboutView()
|
|||||||
.Add(cpuView)
|
.Add(cpuView)
|
||||||
.Add(frequencyView)
|
.Add(frequencyView)
|
||||||
.AddStrut(offset)
|
.AddStrut(offset)
|
||||||
.Add(_CreateLabel("memlabel", TR("Memory:")))
|
.Add(_CreateLabel("memlabel", B_TRANSLATE("Memory:")))
|
||||||
.Add(fMemView)
|
.Add(fMemView)
|
||||||
.AddStrut(offset)
|
.AddStrut(offset)
|
||||||
.Add(_CreateLabel("kernellabel", TR("Kernel:")))
|
.Add(_CreateLabel("kernellabel", B_TRANSLATE("Kernel:")))
|
||||||
.Add(kernelView)
|
.Add(kernelView)
|
||||||
.AddStrut(offset)
|
.AddStrut(offset)
|
||||||
.Add(_CreateLabel("uptimelabel",
|
.Add(_CreateLabel("uptimelabel",
|
||||||
TR("Time running:")))
|
B_TRANSLATE("Time running:")))
|
||||||
.Add(fUptimeView)
|
.Add(fUptimeView)
|
||||||
.SetInsets(5, 5, 5, 5)
|
.SetInsets(5, 5, 5, 5)
|
||||||
.End()
|
.End()
|
||||||
@@ -691,9 +692,9 @@ AboutView::AddCopyrightEntry(const char* name, const char* text,
|
|||||||
|
|
||||||
if (licenses.CountStrings() > 0) {
|
if (licenses.CountStrings() > 0) {
|
||||||
if (licenses.CountStrings() > 1)
|
if (licenses.CountStrings() > 1)
|
||||||
fCreditsView->Insert(TR("Licenses: "));
|
fCreditsView->Insert(B_TRANSLATE("Licenses: "));
|
||||||
else
|
else
|
||||||
fCreditsView->Insert(TR("License: "));
|
fCreditsView->Insert(B_TRANSLATE("License: "));
|
||||||
|
|
||||||
for (int32 i = 0; i < licenses.CountStrings(); i++) {
|
for (int32 i = 0; i < licenses.CountStrings(); i++) {
|
||||||
const char* license = licenses.StringAt(i);
|
const char* license = licenses.StringAt(i);
|
||||||
@@ -717,7 +718,7 @@ AboutView::AddCopyrightEntry(const char* name, const char* text,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sources.CountStrings() > 0) {
|
if (sources.CountStrings() > 0) {
|
||||||
fCreditsView->Insert(TR("Source Code: "));
|
fCreditsView->Insert(B_TRANSLATE("Source Code: "));
|
||||||
|
|
||||||
for (int32 i = 0; i < sources.CountStrings(); i++) {
|
for (int32 i = 0; i < sources.CountStrings(); i++) {
|
||||||
const char* source = sources.StringAt(i);
|
const char* source = sources.StringAt(i);
|
||||||
@@ -850,9 +851,10 @@ AboutView::_CreateCreditsView()
|
|||||||
fCreditsView->Insert(string);
|
fCreditsView->Insert(string);
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
||||||
fCreditsView->Insert(TR("The copyright to the Haiku code is property of "
|
fCreditsView->Insert(B_TRANSLATE("The copyright to the Haiku code is "
|
||||||
"Haiku, Inc. or of the respective authors where expressly noted "
|
"property of Haiku, Inc. or of the respective authors where expressly "
|
||||||
"in the source. Haiku and the Haiku logo are trademarks of Haiku, Inc."
|
"noted in the source. Haiku and the Haiku logo are trademarks of "
|
||||||
|
"Haiku, Inc."
|
||||||
"\n\n"));
|
"\n\n"));
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kLinkBlue);
|
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kLinkBlue);
|
||||||
@@ -864,7 +866,7 @@ AboutView::_CreateCreditsView()
|
|||||||
font.SetFace(B_BOLD_FACE | B_ITALIC_FACE);
|
font.SetFace(B_BOLD_FACE | B_ITALIC_FACE);
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
|
||||||
fCreditsView->Insert(TR("Current maintainers:\n"));
|
fCreditsView->Insert(B_TRANSLATE("Current maintainers:\n"));
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
||||||
fCreditsView->Insert(
|
fCreditsView->Insert(
|
||||||
@@ -909,7 +911,7 @@ AboutView::_CreateCreditsView()
|
|||||||
"\n");
|
"\n");
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
|
||||||
fCreditsView->Insert(TR("Past maintainers:\n"));
|
fCreditsView->Insert(B_TRANSLATE("Past maintainers:\n"));
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
||||||
fCreditsView->Insert(
|
fCreditsView->Insert(
|
||||||
@@ -936,7 +938,7 @@ AboutView::_CreateCreditsView()
|
|||||||
"\n");
|
"\n");
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
|
||||||
fCreditsView->Insert(TR("Website, marketing & documentation:\n"));
|
fCreditsView->Insert(B_TRANSLATE("Website, marketing & documentation:\n"));
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
||||||
fCreditsView->Insert(
|
fCreditsView->Insert(
|
||||||
@@ -950,7 +952,7 @@ AboutView::_CreateCreditsView()
|
|||||||
"\n");
|
"\n");
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
|
||||||
fCreditsView->Insert(TR("Contributors:\n"));
|
fCreditsView->Insert(B_TRANSLATE("Contributors:\n"));
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
||||||
fCreditsView->Insert(
|
fCreditsView->Insert(
|
||||||
@@ -1041,12 +1043,12 @@ AboutView::_CreateCreditsView()
|
|||||||
"JiSheng Zhang\n"
|
"JiSheng Zhang\n"
|
||||||
"Zhao Shuai\n");
|
"Zhao Shuai\n");
|
||||||
fCreditsView->Insert(
|
fCreditsView->Insert(
|
||||||
TR("\n" B_UTF8_ELLIPSIS
|
B_TRANSLATE("\n" B_UTF8_ELLIPSIS
|
||||||
" and probably some more we forgot to mention (sorry!)"
|
" and probably some more we forgot to mention (sorry!)"
|
||||||
"\n\n"));
|
"\n\n"));
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
|
||||||
fCreditsView->Insert(TR("Translations:\n"));
|
fCreditsView->Insert(B_TRANSLATE("Translations:\n"));
|
||||||
|
|
||||||
BLanguage* lang;
|
BLanguage* lang;
|
||||||
BString langName;
|
BString langName;
|
||||||
@@ -1078,16 +1080,23 @@ AboutView::_CreateCreditsView()
|
|||||||
}
|
}
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
|
||||||
fCreditsView->Insert(TR("\n\nSpecial thanks to:\n"));
|
fCreditsView->Insert(B_TRANSLATE("\n\nSpecial thanks to:\n"));
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
||||||
fCreditsView->Insert(TR("Travis Geiselbrecht (and his NewOS kernel)\n"));
|
fCreditsView->Insert(
|
||||||
fCreditsView->Insert(TR("Michael Phipps (project founder)\n\n"));
|
B_TRANSLATE("Travis Geiselbrecht (and his NewOS kernel)\n"));
|
||||||
fCreditsView->Insert(TR("The Haiku-Ports team\n"));
|
fCreditsView->Insert(
|
||||||
fCreditsView->Insert(TR("The Haikuware team and their bounty program\n"));
|
B_TRANSLATE("Michael Phipps (project founder)\n\n"));
|
||||||
fCreditsView->Insert(TR("The BeGeistert team\n"));
|
fCreditsView->Insert(
|
||||||
fCreditsView->Insert(TR("Google & their Google Summer of Code program\n\n"));
|
B_TRANSLATE("The Haiku-Ports team\n"));
|
||||||
fCreditsView->Insert(TR("... and the many people making donations!\n\n"));
|
fCreditsView->Insert(
|
||||||
|
B_TRANSLATE("The Haikuware team and their bounty program\n"));
|
||||||
|
fCreditsView->Insert(
|
||||||
|
B_TRANSLATE("The BeGeistert team\n"));
|
||||||
|
fCreditsView->Insert(
|
||||||
|
B_TRANSLATE("Google & their Google Summer of Code program\n\n"));
|
||||||
|
fCreditsView->Insert(
|
||||||
|
B_TRANSLATE("... and the many people making donations!\n\n"));
|
||||||
|
|
||||||
// copyrights for various projects we use
|
// copyrights for various projects we use
|
||||||
|
|
||||||
@@ -1097,21 +1106,21 @@ AboutView::_CreateCreditsView()
|
|||||||
font.SetSize(be_bold_font->Size() + 4);
|
font.SetSize(be_bold_font->Size() + 4);
|
||||||
font.SetFace(B_BOLD_FACE);
|
font.SetFace(B_BOLD_FACE);
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
||||||
fCreditsView->Insert(TR("\nCopyrights\n\n"));
|
fCreditsView->Insert(B_TRANSLATE("\nCopyrights\n\n"));
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
||||||
fCreditsView->Insert(TR("[Click a license name to read the respective "
|
fCreditsView->Insert(B_TRANSLATE("[Click a license name to read the "
|
||||||
"license.]\n\n"));
|
"respective license.]\n\n"));
|
||||||
|
|
||||||
// Haiku license
|
// Haiku license
|
||||||
fCreditsView->Insert(TR("The code that is unique to Haiku, especially the "
|
fCreditsView->Insert(B_TRANSLATE("The code that is unique to Haiku, "
|
||||||
"kernel and all code that applications may link against, is "
|
"especially the kernel and all code that applications may link "
|
||||||
"distributed under the terms of the "));
|
"against, is distributed under the terms of the "));
|
||||||
fCreditsView->InsertHyperText(TR("MIT license"),
|
fCreditsView->InsertHyperText(B_TRANSLATE("MIT license"),
|
||||||
new OpenFileAction(mitPath.Path()));
|
new OpenFileAction(mitPath.Path()));
|
||||||
fCreditsView->Insert(TR(". Some system libraries contain third party code "
|
fCreditsView->Insert(B_TRANSLATE(". Some system libraries contain third "
|
||||||
"distributed under the LGPL license. You can find the copyrights "
|
"party code distributed under the LGPL license. You can find the "
|
||||||
"to third party code below.\n\n"));
|
"copyrights to third party code below.\n\n"));
|
||||||
|
|
||||||
// GNU copyrights
|
// GNU copyrights
|
||||||
AddCopyrightEntry("The GNU Project",
|
AddCopyrightEntry("The GNU Project",
|
||||||
@@ -1659,7 +1668,7 @@ AboutView::_AddPackageCredit(const PackageCredit& package)
|
|||||||
static const char*
|
static const char*
|
||||||
MemUsageToString(char string[], size_t size, system_info* info)
|
MemUsageToString(char string[], size_t size, system_info* info)
|
||||||
{
|
{
|
||||||
snprintf(string, size, TR("%d MB total, %d MB used (%d%%)"),
|
snprintf(string, size, B_TRANSLATE("%d MB total, %d MB used (%d%%)"),
|
||||||
int(info->max_pages / 256.0f + 0.5f),
|
int(info->max_pages / 256.0f + 0.5f),
|
||||||
int(info->used_pages / 256.0f + 0.5f),
|
int(info->used_pages / 256.0f + 0.5f),
|
||||||
int(100 * info->used_pages / info->max_pages));
|
int(100 * info->used_pages / info->max_pages));
|
||||||
|
|||||||
Reference in New Issue
Block a user