* Fix a small bug in BLanguage::GetName
* Use BLanguage in AboutSystem to get the names of the languages in the credit list, no need to add useless work for the translators * Add some contributors to the credits for japanese translation git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35864 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -48,7 +48,9 @@
|
|||||||
#include <cpu_type.h>
|
#include <cpu_type.h>
|
||||||
|
|
||||||
#include <Catalog.h>
|
#include <Catalog.h>
|
||||||
|
#include <Language.h>
|
||||||
#include <Locale.h>
|
#include <Locale.h>
|
||||||
|
#include <LocaleRoster.h>
|
||||||
|
|
||||||
#include "HyperTextActions.h"
|
#include "HyperTextActions.h"
|
||||||
#include "HyperTextView.h"
|
#include "HyperTextView.h"
|
||||||
@@ -932,39 +934,90 @@ AboutView::_CreateCreditsView()
|
|||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
|
||||||
fCreditsView->Insert(TR("Translations:\n"));
|
fCreditsView->Insert(TR("Translations:\n"));
|
||||||
|
|
||||||
|
// TODO : sort languages alphabetically using collators
|
||||||
|
BLanguage* lang;
|
||||||
|
BString langName;
|
||||||
|
|
||||||
|
be_locale_roster->GetLanguage(&lang, "bg");
|
||||||
|
langName.Truncate(0);
|
||||||
|
lang->GetName(&langName);
|
||||||
|
delete lang;
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
||||||
fCreditsView->Insert(TR("\nBulgarian\n"));
|
fCreditsView->Insert("\n");
|
||||||
|
fCreditsView->Insert(langName);
|
||||||
|
fCreditsView->Insert("\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"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
be_locale_roster->GetLanguage(&lang, "nl");
|
||||||
|
langName.Truncate(0);
|
||||||
|
lang->GetName(&langName);
|
||||||
|
delete lang;
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
||||||
fCreditsView->Insert(TR("\nDutch\n"));
|
fCreditsView->Insert("\n");
|
||||||
|
fCreditsView->Insert(langName);
|
||||||
|
fCreditsView->Insert("\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"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
be_locale_roster->GetLanguage(&lang, "eo");
|
||||||
|
langName.Truncate(0);
|
||||||
|
lang->GetName(&langName);
|
||||||
|
delete lang;
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
||||||
fCreditsView->Insert(TR("\nEsperanto\n"));
|
fCreditsView->Insert("\n");
|
||||||
|
fCreditsView->Insert(langName);
|
||||||
|
fCreditsView->Insert("\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"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
be_locale_roster->GetLanguage(&lang, "fi");
|
||||||
|
langName.Truncate(0);
|
||||||
|
lang->GetName(&langName);
|
||||||
|
delete lang;
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
||||||
fCreditsView->Insert(TR("\nFinnish\n"));
|
fCreditsView->Insert("\n");
|
||||||
|
fCreditsView->Insert(langName);
|
||||||
|
fCreditsView->Insert("\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"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
be_locale_roster->GetLanguage(&lang, "fr");
|
||||||
|
langName.Truncate(0);
|
||||||
|
lang->GetName(&langName);
|
||||||
|
delete lang;
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
||||||
fCreditsView->Insert(TR("\nFrench\n"));
|
fCreditsView->Insert("\n");
|
||||||
|
fCreditsView->Insert(langName);
|
||||||
|
fCreditsView->Insert("\n");
|
||||||
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
||||||
fCreditsView->Insert(
|
fCreditsView->Insert(
|
||||||
"Jean-Loïc Charroud\n"
|
"Jean-Loïc Charroud\n"
|
||||||
"Adrien Destugues (PulkoMandy)\n"
|
"Adrien Destugues (PulkoMandy)\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
be_locale_roster->GetLanguage(&lang, "de");
|
||||||
|
langName.Truncate(0);
|
||||||
|
lang->GetName(&langName);
|
||||||
|
delete lang;
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
||||||
fCreditsView->Insert(TR("\nGerman\n"));
|
fCreditsView->Insert("\n");
|
||||||
|
fCreditsView->Insert(langName);
|
||||||
|
fCreditsView->Insert("\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"
|
||||||
@@ -974,46 +1027,104 @@ AboutView::_CreateCreditsView()
|
|||||||
"Matthias Spreiter\n"
|
"Matthias Spreiter\n"
|
||||||
"svend\n"
|
"svend\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
be_locale_roster->GetLanguage(&lang, "hu");
|
||||||
|
langName.Truncate(0);
|
||||||
|
lang->GetName(&langName);
|
||||||
|
delete lang;
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
||||||
fCreditsView->Insert(TR("\nHungarian\n"));
|
fCreditsView->Insert("\n");
|
||||||
|
fCreditsView->Insert(langName);
|
||||||
|
fCreditsView->Insert("\n");
|
||||||
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
||||||
fCreditsView->Insert(
|
fCreditsView->Insert(
|
||||||
"Zoltán Mizsei (miqlas)\n"
|
"Zoltán Mizsei (miqlas)\n"
|
||||||
"Zoltán Szabó (Bird)\n"
|
"Zoltán Szabó (Bird)\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
be_locale_roster->GetLanguage(&lang, "it");
|
||||||
|
langName.Truncate(0);
|
||||||
|
lang->GetName(&langName);
|
||||||
|
delete lang;
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
||||||
fCreditsView->Insert(TR("\nItalian\n"));
|
fCreditsView->Insert("\n");
|
||||||
|
fCreditsView->Insert(langName);
|
||||||
|
fCreditsView->Insert("\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"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
be_locale_roster->GetLanguage(&lang, "ja");
|
||||||
|
langName.Truncate(0);
|
||||||
|
lang->GetName(&langName);
|
||||||
|
delete lang;
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
||||||
fCreditsView->Insert(TR("\nJapanese\n"));
|
fCreditsView->Insert("\n");
|
||||||
|
fCreditsView->Insert(langName);
|
||||||
|
fCreditsView->Insert("\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"
|
||||||
|
"Takashi Murai\n"
|
||||||
|
"Jorge G. Mare (Koki)\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
be_locale_roster->GetLanguage(&lang, "lt");
|
||||||
|
langName.Truncate(0);
|
||||||
|
lang->GetName(&langName);
|
||||||
|
delete lang;
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
||||||
fCreditsView->Insert(TR("\nLituanian\n"));
|
fCreditsView->Insert("\n");
|
||||||
|
fCreditsView->Insert(langName);
|
||||||
|
fCreditsView->Insert("\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"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
be_locale_roster->GetLanguage(&lang, "pl");
|
||||||
|
langName.Truncate(0);
|
||||||
|
lang->GetName(&langName);
|
||||||
|
delete lang;
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
||||||
fCreditsView->Insert(TR("\nPolish\n"));
|
fCreditsView->Insert("\n");
|
||||||
|
fCreditsView->Insert(langName);
|
||||||
|
fCreditsView->Insert("\n");
|
||||||
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
||||||
fCreditsView->Insert(
|
fCreditsView->Insert(
|
||||||
"Artur Wyszyński\n"
|
"Artur Wyszyński\n"
|
||||||
"Hubert Hareńczyk\n"
|
"Hubert Hareńczyk\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
be_locale_roster->GetLanguage(&lang, "pt");
|
||||||
|
langName.Truncate(0);
|
||||||
|
lang->GetName(&langName);
|
||||||
|
delete lang;
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
||||||
fCreditsView->Insert(TR("\nPortuguese\n"));
|
fCreditsView->Insert("\n");
|
||||||
|
fCreditsView->Insert(langName);
|
||||||
|
fCreditsView->Insert("\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"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
be_locale_roster->GetLanguage(&lang, "ru");
|
||||||
|
langName.Truncate(0);
|
||||||
|
lang->GetName(&langName);
|
||||||
|
delete lang;
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
||||||
fCreditsView->Insert(TR("\nRussian\n"));
|
fCreditsView->Insert("\n");
|
||||||
|
fCreditsView->Insert(langName);
|
||||||
|
fCreditsView->Insert("\n");
|
||||||
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
||||||
fCreditsView->Insert(
|
fCreditsView->Insert(
|
||||||
"Tatyana Fursic (iceid)\n"
|
"Tatyana Fursic (iceid)\n"
|
||||||
@@ -1023,24 +1134,48 @@ AboutView::_CreateCreditsView()
|
|||||||
"Reznikov Sergei (Diver)\n"
|
"Reznikov Sergei (Diver)\n"
|
||||||
"Michael Smirnov\n"
|
"Michael Smirnov\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
be_locale_roster->GetLanguage(&lang, "es");
|
||||||
|
langName.Truncate(0);
|
||||||
|
lang->GetName(&langName);
|
||||||
|
delete lang;
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
||||||
fCreditsView->Insert(TR("\nSpanish\n"));
|
fCreditsView->Insert("\n");
|
||||||
|
fCreditsView->Insert(langName);
|
||||||
|
fCreditsView->Insert("\n");
|
||||||
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
|
||||||
fCreditsView->Insert(
|
fCreditsView->Insert(
|
||||||
"Nicolás C (CapitanPico)\n"
|
"Nicolás C (CapitanPico)\n"
|
||||||
"Oscar Carballal (oscarcp)\n"
|
"Oscar Carballal (oscarcp)\n"
|
||||||
"Miguel Zúñiga González (miguel~1.mx)\n"
|
"Miguel Zúñiga González (miguel~1.mx)\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
be_locale_roster->GetLanguage(&lang, "sv");
|
||||||
|
langName.Truncate(0);
|
||||||
|
lang->GetName(&langName);
|
||||||
|
delete lang;
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
||||||
fCreditsView->Insert(TR("\nSwedish\n"));
|
fCreditsView->Insert("\n");
|
||||||
|
fCreditsView->Insert(langName);
|
||||||
|
fCreditsView->Insert("\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"
|
||||||
"Jimmy Olsson (phalax)\n"
|
"Jimmy Olsson (phalax)\n"
|
||||||
"Victor Widell\n"
|
"Victor Widell\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
be_locale_roster->GetLanguage(&lang, "uk");
|
||||||
|
langName.Truncate(0);
|
||||||
|
lang->GetName(&langName);
|
||||||
|
delete lang;
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
||||||
fCreditsView->Insert(TR("\nUkrainian\n"));
|
fCreditsView->Insert("\n");
|
||||||
|
fCreditsView->Insert(langName);
|
||||||
|
fCreditsView->Insert("\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"
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ BLanguage::GetName(BString* name)
|
|||||||
// TODO: This will return the language not in the current be_app_catalog,
|
// TODO: This will return the language not in the current be_app_catalog,
|
||||||
// but in the current system wide language! Don't know the exact reason.
|
// but in the current system wide language! Don't know the exact reason.
|
||||||
UnicodeString s;
|
UnicodeString s;
|
||||||
fICULocale->getDisplayName(s);
|
fICULocale->getDisplayLanguage(s);
|
||||||
BStringByteSink converter(name);
|
BStringByteSink converter(name);
|
||||||
s.toUTF8(converter);
|
s.toUTF8(converter);
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|||||||
Reference in New Issue
Block a user