Simplify use of translated strings in BAboutWindow.
* avoid duplicate initialization of variables by joining the expressions.
This commit is contained in:
parent
468f826656
commit
2bcc7f40c3
@ -29,11 +29,11 @@ BAboutWindow::BAboutWindow(const char *appName, int32 firstCopyrightYear,
|
|||||||
{
|
{
|
||||||
fAppName = new BString(appName);
|
fAppName = new BString(appName);
|
||||||
|
|
||||||
const char* copyright = B_TRANSLATE_MARK("Copyright " B_UTF8_COPYRIGHT
|
const char* copyright = gSystemCatalog.GetString(
|
||||||
" %years% Haiku, Inc.");
|
B_TRANSLATE_MARK("Copyright " B_UTF8_COPYRIGHT " %years% Haiku, Inc."),
|
||||||
const char* writtenBy = B_TRANSLATE_MARK("Written by:");
|
"AboutWindow");
|
||||||
copyright = gSystemCatalog.GetString(copyright, "AboutWindow");
|
const char* writtenBy = gSystemCatalog.GetString(
|
||||||
writtenBy = gSystemCatalog.GetString(writtenBy, "AboutWindow");
|
B_TRANSLATE_MARK("Written by:"), "AboutWindow");
|
||||||
|
|
||||||
// Get current year
|
// Get current year
|
||||||
time_t tp;
|
time_t tp;
|
||||||
@ -75,10 +75,10 @@ BAboutWindow::~BAboutWindow()
|
|||||||
void
|
void
|
||||||
BAboutWindow::Show()
|
BAboutWindow::Show()
|
||||||
{
|
{
|
||||||
const char* aboutTitle = B_TRANSLATE_MARK("About" B_UTF8_ELLIPSIS);
|
const char* aboutTitle = gSystemCatalog.GetString(
|
||||||
const char* closeLabel = B_TRANSLATE_MARK("Close");
|
B_TRANSLATE_MARK("About" B_UTF8_ELLIPSIS), "AboutWindow");
|
||||||
aboutTitle = gSystemCatalog.GetString(aboutTitle, "AboutWindow");
|
const char* closeLabel = gSystemCatalog.GetString(
|
||||||
closeLabel = gSystemCatalog.GetString(closeLabel, "AboutWindow");
|
B_TRANSLATE_MARK("Close"), "AboutWindow");
|
||||||
|
|
||||||
BAlert *alert = new BAlert(aboutTitle, fText->String(), closeLabel);
|
BAlert *alert = new BAlert(aboutTitle, fText->String(), closeLabel);
|
||||||
BTextView *view = alert->TextView();
|
BTextView *view = alert->TextView();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user