* Localized AboutSystem

* Added polish translation made by me
* Added myself & Hubert Hareńczyk to polish translators
* Corrected my last name
* Honor 80lines
* Style cleanup



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35439 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Artur Wyszynski
2010-02-09 12:35:31 +00:00
parent 73c30018b6
commit 54b738a10a
4 changed files with 257 additions and 124 deletions
+61
View File
@@ -0,0 +1,61 @@
1 polish x-vnd.Haiku-About 620382499
Travis Geiselbrecht (and his NewOS kernel)\n AboutView Travis Geiselbrecht (i jego kernela NewOS)\n
%ld Processors: AboutView Liczba procesorów %ld:
Michael Phipps (project founder)\n\n AboutView Michael Phipps (fundatora projektu)\n\n
The Haiku-Ports team\n AboutView Zespółu Haiku-Ports\n
Website, marketing & documentation:\n AboutView Strona WWW, marketing i dokumentacja:\n
%s%lld hour AboutView %s%lld godzina
... and the many community members making donations!\n\n AboutView … i wielu innych członków społeczności robiących dotację!\n\n
\nPolish\n\n AboutView \nPolski\n\n
\nJapanese\n\n AboutView \nJapoński\n\n
\nFinnish\n\n AboutView \nFiński\n\n
Revision AboutView Rewizja
\nDutch\n\n AboutView \nHoldenderski\n\n
Source Code: AboutView Kod źródłowy:
Processor: AboutView Procesor:
Kernel: AboutView Kernel:
%lld day AboutView %lld dni
\nHungarian\n\n AboutView \nWęgierski\n\n
\nGerman\n\n AboutView \nNiemiecki\n\n
Contributors:\n AboutView Współpracownicy:\n
Unknown AboutView Nieznany
\nBulgarian\n\n AboutView \nBułgarski\n\n
\nPortuguese\n\n AboutView \nPortugalski\n\n
%s%lld minute AboutView %s%lld minuta
\n… and probably some more we forgot to mention (sorry!)\n\n AboutView \n… i prawdopodobnie paru innych, o których zapomnieliśmy wspomnieć (przepraszamy!)\n\n
%.2f GHz AboutView %.2f GHz
The BeGeistert team\n\n AboutView Zespółu BeGeistert\n\n
%s%lld minutes AboutView %s%lld minuty
Memory: AboutView Pamięć:
%s%lld second AboutView %s%lld sekunda
Past maintainers:\n AboutView Wcześniejsi współpracownicy:\n
The code that is unique to Haiku, especially the kernel and all code that applications may link against, is distributed under the terms of the AboutView Kod źródłowy unikalny dla Haiku, szczególnie jądra systemu i aplikacji z nim rozprowadzanych, dystrybuowany jest pod warunkami
\n\nSpecial thanks to:\n AboutView \n\nSpecjalne podziękowania dla:\n
Copyright Utilities Prawa autorskie
Licenses: AboutView Licencje:
. Some system libraries contain third party code distributed under the LGPL license. You can find the copyrights to third party code below.\n\n AboutView . Niektóre biblioteki systemowe zawieraja oprogramowanie objęte licencją LGPL. Prawa autorskie do nich można znaleźć poniżej.\n\n
%s%lld seconds AboutView %s%lld sekundy
License Utilities Licencja
\nCopyrights\n\n AboutView \nPrawa autorskie\n\n
\nUkrainian\n\n AboutView \nUkraiński\n\n
\nLituanian\n\n AboutView \nLitewski\n\n
Current maintainers:\n AboutView Obecni wspołpracownicy:\n
Time running: AboutView Czas działania:
MIT license AboutView licencji MIT
%s%lld hours AboutView %s%lld godzin
%lld days AboutView %lld dni
The Haikuware team and their bounty program\n AboutView Zespółu Haikuware i ich program bounty\n
About this system AboutWindow O systemie
Version: AboutView Wersja:
\nRussian\n\n AboutView \nRosyjski\n\n
\nItalian\n\n AboutView \nWłoski\n\n
SourceURL Utilities Adres źródłowy
\nFrench\n\n AboutView \nFrancuski\n\n
\nEsperanto\n\n AboutView \nEsperanto\n\n
\nSwedish\n\n AboutView \nSzwedzki\n\n
%ld MHz AboutView %ld MHz
The copyright to the Haiku code is property of Haiku, Inc. or of the respective authors where expressly noted in the source.\n\n AboutView Prawa autorskie kodu źródłowego Haiku są własnością Haiku, Inc. lub autorów wymienionych w kodzie źródłowym..\n\n
[Click a license name to read the respective license.]\n\n AboutView [Kliknij nazwę licencji, aby ją przeczytać.]\n\n
%d MB total, %d MB used (%d%%) AboutView %d MB łącznie, %d MB użyte (%d%%)
License: AboutView Licencja:
Translations:\n AboutView Tłumaczenia na język:\n
+139 -82
View File
@@ -45,6 +45,9 @@
#include <AutoDeleter.h> #include <AutoDeleter.h>
#include <cpu_type.h> #include <cpu_type.h>
#include <Catalog.h>
#include <Locale.h>
#include "HyperTextActions.h" #include "HyperTextActions.h"
#include "HyperTextView.h" #include "HyperTextView.h"
#include "Utilities.h" #include "Utilities.h"
@@ -68,11 +71,15 @@ static const rgb_color kHaikuYellow = { 255, 176, 0, 255 };
static const rgb_color kLinkBlue = { 80, 80, 200, 255 }; static const rgb_color kLinkBlue = { 80, 80, 200, 255 };
class AboutApp : public BApplication { class AboutApp : public BApplication {
public: public:
AboutApp(); AboutApp();
private:
BCatalog fCatalog;
}; };
class AboutWindow : public BWindow { class AboutWindow : public BWindow {
public: public:
AboutWindow(); AboutWindow();
@@ -80,6 +87,7 @@ public:
virtual bool QuitRequested(); virtual bool QuitRequested();
}; };
class LogoView : public BView { class LogoView : public BView {
public: public:
LogoView(); LogoView();
@@ -94,10 +102,12 @@ private:
BBitmap* fLogo; BBitmap* fLogo;
}; };
class CropView : public BView { class CropView : public BView {
public: public:
CropView(BView* target, int32 left, int32 top, CropView(BView* target, int32 left,
int32 right, int32 bottom); int32 top, int32 right,
int32 bottom);
virtual ~CropView(); virtual ~CropView();
virtual BSize MinSize(); virtual BSize MinSize();
@@ -113,6 +123,7 @@ private:
int32 fCropBottom; int32 fCropBottom;
}; };
class AboutView : public BView { class AboutView : public BView {
public: public:
AboutView(); AboutView();
@@ -130,10 +141,10 @@ public:
const StringVector& sources, const StringVector& sources,
const char* url); const char* url);
void AddCopyrightEntry(const char* name, void AddCopyrightEntry(const char* name,
const char* text, const char* url = NULL); const char* text,
const char* url = NULL);
void PickRandomHaiku(); void PickRandomHaiku();
private: private:
typedef std::map<std::string, PackageCredit*> PackageCreditMap; typedef std::map<std::string, PackageCredit*> PackageCreditMap;
@@ -165,7 +176,9 @@ private:
AboutApp::AboutApp() AboutApp::AboutApp()
: BApplication("application/x-vnd.Haiku-About") : BApplication("application/x-vnd.Haiku-About")
{ {
AboutWindow* window = new AboutWindow(); be_locale->GetAppCatalog(&fCatalog);
AboutWindow *window = new(std::nothrow) AboutWindow();
if (window)
window->Show(); window->Show();
} }
@@ -173,9 +186,12 @@ AboutApp::AboutApp()
// #pragma mark - // #pragma mark -
#undef TR_CONTEXT
#define TR_CONTEXT "AboutWindow"
AboutWindow::AboutWindow() AboutWindow::AboutWindow()
: BWindow(BRect(0, 0, 500, 300), "About this system", B_TITLED_WINDOW, : BWindow(BRect(0, 0, 500, 300), TR("About this system"),
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));
AddChild(new AboutView()); AddChild(new AboutView());
@@ -185,8 +201,7 @@ AboutWindow::AboutWindow()
ResizeTo(max_c(size.width, Bounds().Width()), ResizeTo(max_c(size.width, Bounds().Width()),
max_c(size.height, Bounds().Height())); max_c(size.height, Bounds().Height()));
MoveTo((BScreen().Frame().Width() - Bounds().Width()) / 2, CenterOnScreen();
(BScreen().Frame().Height() - Bounds().Height()) / 2 );
} }
@@ -314,6 +329,8 @@ CropView::DoLayout()
// #pragma mark - AboutView // #pragma mark - AboutView
#undef TR_CONTEXT
#define TR_CONTEXT "AboutView"
AboutView::AboutView() AboutView::AboutView()
: BView("aboutview", B_WILL_DRAW | B_PULSE_NEEDED), : BView("aboutview", B_WILL_DRAW | B_PULSE_NEEDED),
@@ -330,7 +347,7 @@ AboutView::AboutView()
// OS Version // OS Version
char string[1024]; char string[1024];
strcpy(string, "Unknown"); strcpy(string, TR("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;
@@ -355,7 +372,9 @@ AboutView::AboutView()
if (sscanf(unameInfo.version, "r%ld", &revision) == 1) { if (sscanf(unameInfo.version, "r%ld", &revision) == 1) {
char version[16]; char version[16];
snprintf(version, sizeof(version), "%ld", revision); snprintf(version, sizeof(version), "%ld", revision);
strlcat(string, " (Revision ", sizeof(string)); strlcat(string, " (", sizeof(string));
strlcat(string, TR("Revision"), sizeof(string));
strlcat(string, " ", sizeof(string));
strlcat(string, version, sizeof(string)); strlcat(string, version, sizeof(string));
strlcat(string, ")", sizeof(string)); strlcat(string, ")", sizeof(string));
} }
@@ -377,10 +396,11 @@ AboutView::AboutView()
// CPU count, type and clock speed // CPU count, type and clock speed
char processorLabel[256]; char processorLabel[256];
if (systemInfo.cpu_count > 1) { if (systemInfo.cpu_count > 1) {
snprintf(processorLabel, sizeof(processorLabel), "%ld Processors:", snprintf(processorLabel, sizeof(processorLabel),
systemInfo.cpu_count); TR("%ld Processors:"), systemInfo.cpu_count);
} else } else
strlcpy(processorLabel, "Processor:", sizeof(processorLabel)); strlcpy(processorLabel, TR("Processor:"),
sizeof(processorLabel));
BString cpuType; BString cpuType;
cpuType << get_cpu_vendor_string(systemInfo.cpu_type) cpuType << get_cpu_vendor_string(systemInfo.cpu_type)
@@ -392,9 +412,9 @@ AboutView::AboutView()
int32 clockSpeed = get_rounded_cpu_speed(); int32 clockSpeed = get_rounded_cpu_speed();
if (clockSpeed < 1000) if (clockSpeed < 1000)
sprintf(string,"%ld MHz", clockSpeed); sprintf(string, TR("%ld MHz"), clockSpeed);
else else
sprintf(string,"%.2f GHz", clockSpeed / 1000.0f); sprintf(string, TR("%.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,
@@ -431,7 +451,7 @@ AboutView::AboutView()
.AddGroup(B_VERTICAL) .AddGroup(B_VERTICAL)
.Add(new LogoView()) .Add(new LogoView())
.AddGroup(B_VERTICAL) .AddGroup(B_VERTICAL)
.Add(_CreateLabel("oslabel", "Version:")) .Add(_CreateLabel("oslabel", TR("Version:")))
.Add(versionView) .Add(versionView)
#if __GNUC__ != 2 #if __GNUC__ != 2
.Add(gccView) .Add(gccView)
@@ -441,13 +461,14 @@ AboutView::AboutView()
.Add(cpuView) .Add(cpuView)
.Add(frequencyView) .Add(frequencyView)
.AddStrut(offset) .AddStrut(offset)
.Add(_CreateLabel("memlabel", "Memory:")) .Add(_CreateLabel("memlabel", TR("Memory:")))
.Add(fMemView) .Add(fMemView)
.AddStrut(offset) .AddStrut(offset)
.Add(_CreateLabel("kernellabel", "Kernel:")) .Add(_CreateLabel("kernellabel", TR("Kernel:")))
.Add(kernelView) .Add(kernelView)
.AddStrut(offset) .AddStrut(offset)
.Add(_CreateLabel("uptimelabel", "Time running:")) .Add(_CreateLabel("uptimelabel",
TR("Time running:")))
.Add(fUptimeView) .Add(fUptimeView)
.SetInsets(5, 5, 5, 5) .SetInsets(5, 5, 5, 5)
.End() .End()
@@ -502,7 +523,8 @@ AboutView::Pulse()
fUptimeView->SetText(UptimeToString(string, sizeof(string))); fUptimeView->SetText(UptimeToString(string, sizeof(string)));
fMemView->SetText(MemUsageToString(string, sizeof(string), &info)); fMemView->SetText(MemUsageToString(string, sizeof(string), &info));
if (fScrollRunner == NULL && system_time() > fLastActionTime + 10000000) { if (fScrollRunner == NULL
&& system_time() > fLastActionTime + 10000000) {
BMessage message(SCROLL_CREDITS_VIEW); BMessage message(SCROLL_CREDITS_VIEW);
//fScrollRunner = new BMessageRunner(this, &message, 25000, -1); //fScrollRunner = new BMessageRunner(this, &message, 25000, -1);
} }
@@ -515,7 +537,8 @@ AboutView::MessageReceived(BMessage* msg)
switch (msg->what) { switch (msg->what) {
case SCROLL_CREDITS_VIEW: case SCROLL_CREDITS_VIEW:
{ {
BScrollBar* scrollBar = fCreditsView->ScrollBar(B_VERTICAL); BScrollBar* scrollBar =
fCreditsView->ScrollBar(B_VERTICAL);
if (scrollBar == NULL) if (scrollBar == NULL)
break; break;
float max, min; float max, min;
@@ -543,7 +566,8 @@ AboutView::AddCopyrightEntry(const char* name, const char* text,
void void
AboutView::AddCopyrightEntry(const char* name, const char* text, AboutView::AddCopyrightEntry(const char* name, const char* text,
const StringVector& licenses, const StringVector& sources, const char* url) const StringVector& licenses, const StringVector& sources,
const char* url)
{ {
BFont font(be_bold_font); BFont font(be_bold_font);
//font.SetSize(be_bold_font->Size()); //font.SetSize(be_bold_font->Size());
@@ -558,9 +582,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("Licenses: "); fCreditsView->Insert(TR("Licenses: "));
else else
fCreditsView->Insert("License: "); fCreditsView->Insert(TR("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);
@@ -584,7 +608,7 @@ AboutView::AddCopyrightEntry(const char* name, const char* text,
} }
if (sources.CountStrings() > 0) { if (sources.CountStrings() > 0) {
fCreditsView->Insert("Source Code: "); fCreditsView->Insert(TR("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);
@@ -598,7 +622,8 @@ AboutView::AddCopyrightEntry(const char* name, const char* text,
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL,
&kLinkBlue); &kLinkBlue);
fCreditsView->InsertHyperText(urlName, new URLAction(urlAddress)); fCreditsView->InsertHyperText(urlName,
new URLAction(urlAddress));
} }
fCreditsView->Insert("\n"); fCreditsView->Insert("\n");
@@ -609,8 +634,10 @@ AboutView::AddCopyrightEntry(const char* name, const char* text,
BString urlAddress; BString urlAddress;
parse_named_url(url, urlName, urlAddress); parse_named_url(url, urlName, urlAddress);
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kLinkBlue); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL,
fCreditsView->InsertHyperText(urlName, new URLAction(urlAddress)); &kLinkBlue);
fCreditsView->InsertHyperText(urlName,
new URLAction(urlAddress));
fCreditsView->Insert("\n"); fCreditsView->Insert("\n");
} }
fCreditsView->Insert("\n"); fCreditsView->Insert("\n");
@@ -714,10 +741,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("The copyright to the Haiku code is property of " fCreditsView->Insert(TR("The copyright to the Haiku code is property of "
"Haiku, Inc. or of the respective authors where expressly noted " "Haiku, Inc. or of the respective authors where expressly noted "
"in the source." "in the source."
"\n\n"); "\n\n"));
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kLinkBlue); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kLinkBlue);
fCreditsView->InsertHyperText("http://www.haiku-os.org", fCreditsView->InsertHyperText("http://www.haiku-os.org",
@@ -728,7 +755,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("Current maintainers:\n"); fCreditsView->Insert(TR("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(
@@ -766,13 +793,13 @@ AboutView::_CreateCreditsView()
"Oliver Tappe\n" "Oliver Tappe\n"
"Gerasim Troeglazov\n" "Gerasim Troeglazov\n"
"Ingo Weinhold\n" "Ingo Weinhold\n"
"Artur Wyszynski\n" "Artur Wyszyński\n"
"Clemens Zeidler\n" "Clemens Zeidler\n"
"Siarzhuk Zharski\n" "Siarzhuk Zharski\n"
"\n"); "\n");
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
fCreditsView->Insert("Past maintainers:\n"); fCreditsView->Insert(TR("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(
@@ -799,7 +826,7 @@ AboutView::_CreateCreditsView()
"\n"); "\n");
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
fCreditsView->Insert("Website, marketing & documentation:\n"); fCreditsView->Insert(TR("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(
@@ -814,7 +841,7 @@ AboutView::_CreateCreditsView()
"\n"); "\n");
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
fCreditsView->Insert("Contributors:\n"); fCreditsView->Insert(TR("Contributors:\n"));
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert( fCreditsView->Insert(
@@ -894,46 +921,47 @@ AboutView::_CreateCreditsView()
"Gerald Zajac\n" "Gerald Zajac\n"
"Łukasz Zemczak\n" "Łukasz Zemczak\n"
"JiSheng Zhang\n" "JiSheng Zhang\n"
"Zhao Shuai\n" "Zhao Shuai\n");
"\n" B_UTF8_ELLIPSIS " and probably some more we forgot to mention " fCreditsView->Insert(
"(sorry!)" TR("\n" B_UTF8_ELLIPSIS
"\n\n"); " and probably some more we forgot to mention (sorry!)"
"\n\n"));
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
fCreditsView->Insert("Translations:\n"); fCreditsView->Insert(TR("Translations:\n"));
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
fCreditsView->Insert("\nBulgarian\n\n"); fCreditsView->Insert(TR("\nBulgarian\n\n"));
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert( fCreditsView->Insert(
"cssvb94\n" "cssvb94\n"
); );
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
fCreditsView->Insert("\nDutch\n\n"); fCreditsView->Insert(TR("\nDutch\n\n"));
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert( fCreditsView->Insert(
"Meanwhile\n" "Meanwhile\n"
); );
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
fCreditsView->Insert("\nEsperanto\n\n"); fCreditsView->Insert(TR("\nEsperanto\n\n"));
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert( fCreditsView->Insert(
"Travis D. Reed (Dancxjo)\n" "Travis D. Reed (Dancxjo)\n"
); );
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
fCreditsView->Insert("\nFinnish\n\n"); fCreditsView->Insert(TR("\nFinnish\n\n"));
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert( fCreditsView->Insert(
"Jaakko Leikas (Garjala)\n" "Jaakko Leikas (Garjala)\n"
); );
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
fCreditsView->Insert("\nFrench\n\n"); fCreditsView->Insert(TR("\nFrench\n\n"));
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert( fCreditsView->Insert(
"Adrien Destugues (PulkoMandy)\n" "Adrien Destugues (PulkoMandy)\n"
); );
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
fCreditsView->Insert("\nGerman\n\n"); fCreditsView->Insert(TR("\nGerman\n\n"));
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert( fCreditsView->Insert(
"Colin Günther\n" "Colin Günther\n"
@@ -941,65 +969,72 @@ AboutView::_CreateCreditsView()
"leszek\n" "leszek\n"
); );
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
fCreditsView->Insert("\nHungarian\n\n"); fCreditsView->Insert(TR("\nHungarian\n\n"));
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert( fCreditsView->Insert(
"miqlas\n" "miqlas\n"
); );
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
fCreditsView->Insert("\nItalian\n\n"); fCreditsView->Insert(TR("\nItalian\n\n"));
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert( fCreditsView->Insert(
"Andrea Bernardi\n" "Andrea Bernardi\n"
); );
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
fCreditsView->Insert("\nJapanese\n\n"); fCreditsView->Insert(TR("\nJapanese\n\n"));
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert( fCreditsView->Insert(
"The JPBE.net user group\n" "The JPBE.net user group\n"
); );
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
fCreditsView->Insert("\nLituanian\n\n"); fCreditsView->Insert(TR("\nLituanian\n\n"));
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert( fCreditsView->Insert(
"Algirdas Buckus\n" "Algirdas Buckus\n"
); );
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
fCreditsView->Insert("\nPortuguese\n\n"); fCreditsView->Insert(TR("\nPolish\n\n"));
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert(
"Artur Wyszyński\n"
"Hubert Hareńczyk\n"
);
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
fCreditsView->Insert(TR("\nPortuguese\n\n"));
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert( fCreditsView->Insert(
"Marcos Alves (Xeon3D)\n" "Marcos Alves (Xeon3D)\n"
); );
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
fCreditsView->Insert("\nRussian\n\n"); fCreditsView->Insert(TR("\nRussian\n\n"));
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert( fCreditsView->Insert(
"StoroZ Gneva\n" "StoroZ Gneva\n"
); );
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
fCreditsView->Insert("\nSwedish\n\n"); fCreditsView->Insert(TR("\nSwedish\n\n"));
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert( fCreditsView->Insert(
"Johan Holmberg\n" "Johan Holmberg\n"
); );
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
fCreditsView->Insert("\nUkrainian\n\n"); fCreditsView->Insert(TR("\nUkrainian\n\n"));
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert( fCreditsView->Insert(
"Alex Rudyk (totish)\n" "Alex Rudyk (totish)\n"
); );
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
fCreditsView->Insert("Special thanks to:\n"); fCreditsView->Insert(TR("\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("Travis Geiselbrecht (and his NewOS kernel)\n"); fCreditsView->Insert(TR("Travis Geiselbrecht (and his NewOS kernel)\n"));
fCreditsView->Insert("Michael Phipps (project founder)\n\n"); fCreditsView->Insert(TR("Michael Phipps (project founder)\n\n"));
fCreditsView->Insert("The Haiku-Ports team\n"); fCreditsView->Insert(TR("The Haiku-Ports team\n"));
fCreditsView->Insert("The Haikuware team and their bounty program\n"); fCreditsView->Insert(TR("The Haikuware team and their bounty program\n"));
fCreditsView->Insert("The BeGeistert team\n\n"); fCreditsView->Insert(TR("The BeGeistert team\n\n"));
fCreditsView->Insert("... and the many community members making " fCreditsView->Insert(TR("... and the many community members making "
"donations!\n\n"); "donations!\n\n"));
// copyrights for various projects we use // copyrights for various projects we use
@@ -1009,21 +1044,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("\nCopyrights\n\n"); fCreditsView->Insert(TR("\nCopyrights\n\n"));
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert("[Click a license name to read the respective " fCreditsView->Insert(TR("[Click a license name to read the respective "
"license.]\n\n"); "license.]\n\n"));
// Haiku license // Haiku license
fCreditsView->Insert("The code that is unique to Haiku, especially the " fCreditsView->Insert(TR("The code that is unique to Haiku, especially the "
"kernel and all code that applications may link against, is " "kernel and all code that applications may link against, is "
"distributed under the terms of the "); "distributed under the terms of the "));
fCreditsView->InsertHyperText("MIT license", fCreditsView->InsertHyperText(TR("MIT license"),
new OpenFileAction(mitPath.Path())); new OpenFileAction(mitPath.Path()));
fCreditsView->Insert(". Some system libraries contain third party code " fCreditsView->Insert(TR(". Some system libraries contain third party code "
"distributed under the LGPL license. You can find the copyrights " "distributed under the LGPL license. You can find the copyrights "
"to third party code below.\n\n"); "to third party code below.\n\n"));
// GNU copyrights // GNU copyrights
AddCopyrightEntry("The GNU Project", AddCopyrightEntry("The GNU Project",
@@ -1483,7 +1518,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, "%d MB total, %d MB used (%d%%)", snprintf(string, size, TR("%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));
@@ -1511,25 +1546,47 @@ UptimeToString(char string[], size_t size)
char* str = string; char* str = string;
if (days) { if (days) {
str += snprintf(str, size, "%lld day%s",days, days > 1 ? "s" : ""); if (days > 1) {
str += snprintf(str, size, TR("%lld days"), days);
} else {
str += snprintf(str, size, TR("%lld day"), days);
}
} }
if (hours) { if (hours) {
str += snprintf(str, size - strlen(string), "%s%lld hour%s", if (hours > 1) {
str != string ? ", " : "", str += snprintf(str, size - strlen(string),
hours, hours > 1 ? "s" : ""); TR("%s%lld hours"),
str != string ? ", " : "", hours);
} else {
str += snprintf(str, size - strlen(string),
TR("%s%lld hour"),
str != string ? ", " : "", hours);
}
} }
if (minutes) { if (minutes) {
str += snprintf(str, size - strlen(string), "%s%lld minute%s", if (minutes > 1) {
str != string ? ", " : "", str += snprintf(str, size - strlen(string),
minutes, minutes > 1 ? "s" : ""); TR("%s%lld minutes"),
str != string ? ", " : "", minutes);
} else {
str += snprintf(str, size - strlen(string),
TR("%s%lld minute"),
str != string ? ", " : "", minutes);
}
} }
if (seconds || str == string) { if (seconds || str == string) {
// Haiku would be well-known to boot very fast. // Haiku would be well-known to boot very fast.
// Let's be ready to handle below minute uptime, zero second included ;-) // Let's be ready to handle below minute uptime, zero second included ;-)
str += snprintf(str, size - strlen(string), "%s%lld second%s", if (seconds > 1) {
str != string ? ", " : "", str += snprintf(str, size - strlen(string),
seconds, seconds > 1 ? "s" : ""); TR("%s%lld seconds"),
str != string ? ", " : "", seconds);
} else {
str += snprintf(str, size - strlen(string),
TR("%s%lld second"),
str != string ? ", " : "", seconds);
}
} }
return string; return string;
+10 -1
View File
@@ -19,10 +19,19 @@ Application AboutSystem :
HyperTextActions.cpp HyperTextActions.cpp
HyperTextView.cpp HyperTextView.cpp
Utilities.cpp Utilities.cpp
: $(TARGET_LIBSTDC++) be translation : $(TARGET_LIBSTDC++) be translation liblocale.so
: AboutSystem.rdef : AboutSystem.rdef
; ;
DoCatalogs Fonts :
x-vnd.Haiku-About
:
AboutSystem.cpp
Utilities.cpp
: en.catalog
: pl.catkeys
;
Includes [ FGristFiles AboutSystem.rdef ] : [ FGristFiles "HAIKU logo - black on white - tiny.png" ] ; Includes [ FGristFiles AboutSystem.rdef ] : [ FGristFiles "HAIKU logo - black on white - tiny.png" ] ;
SEARCH on [ FGristFiles "HAIKU logo - black on white - tiny.png" ] SEARCH on [ FGristFiles "HAIKU logo - black on white - tiny.png" ]
= [ FDirName $(HAIKU_TOP) data artwork ] ; = [ FDirName $(HAIKU_TOP) data artwork ] ;
+9 -3
View File
@@ -12,9 +12,15 @@
#define va_copy __va_copy #define va_copy __va_copy
#endif #endif
#include <Catalog.h>
#include <Locale.h>
#include <Message.h> #include <Message.h>
#undef TR_CONTEXT
#define TR_CONTEXT "Utilities"
BString BString
trim_string(const char* string, size_t len) trim_string(const char* string, size_t len)
{ {
@@ -231,9 +237,9 @@ PackageCredit::PackageCredit(const BMessage& packageDescription)
url = NULL; url = NULL;
fPackageName = package; fPackageName = package;
fCopyrights.SetTo(packageDescription, "Copyright", COPYRIGHT_STRING); fCopyrights.SetTo(packageDescription, TR("Copyright"), COPYRIGHT_STRING);
fLicenses.SetTo(packageDescription, "License"); fLicenses.SetTo(packageDescription, TR("License"));
fSources.SetTo(packageDescription, "SourceURL"); fSources.SetTo(packageDescription, TR("SourceURL"));
fURL = url; fURL = url;
} }