hrev54332 adds 1 changeset to branch 'master'
old head: 437e3c1c068fa84621711d4977eefe427ec0f2c6
new head: f4352262989a54c7e18d0ad82861279088525ab3
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=f4352262989a+%5E437e3c1c068f
----------------------------------------------------------------------------
f4352262989a: Trivial additions for localization of strings
Signed-off-by: Rob Gill <rrobgill@xxxxxxxxxxxxxx>
Change-Id: I078f2de99c6461a937f4c645b65d5caf06d54dcb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2925
Reviewed-by: Adrien Destugues <pulkomandy@xxxxxxxxx>
[ Rob Gill <rrobgill@xxxxxxxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev54332
Commit: f4352262989a54c7e18d0ad82861279088525ab3
URL: https://git.haiku-os.org/haiku/commit/?id=f4352262989a
Author: Rob Gill <rrobgill@xxxxxxxxxxxxxx>
Date: Wed Jun 17 07:21:50 2020 UTC
Committer: Kacper Kasper <kacperkasper@xxxxxxxxx>
Commit-Date: Fri Jun 19 20:57:21 2020 UTC
----------------------------------------------------------------------------
4 files changed, 11 insertions(+), 8 deletions(-)
src/apps/clock/cl_view.cpp | 11 +++++++----
src/apps/icon-o-matic/gui/SavePanel.cpp | 2 +-
src/apps/overlayimage/OverlayView.cpp | 4 ++--
src/apps/screenshot/ScreenshotWindow.cpp | 2 +-
----------------------------------------------------------------------------
diff --git a/src/apps/clock/cl_view.cpp b/src/apps/clock/cl_view.cpp
index 9f56caa35a..3c96234f01 100644
--- a/src/apps/clock/cl_view.cpp
+++ b/src/apps/clock/cl_view.cpp
@@ -10,6 +10,7 @@
#include <Alert.h>
#include <Bitmap.h>
+#include <Catalog.h>
#include <Debug.h>
#include <Dragger.h>
#include <Entry.h>
@@ -19,6 +20,8 @@
#include <time.h>
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "Clock"
TOffscreenView::TOffscreenView(BRect frame, const char *name, short mRadius,
short hRadius, short offset, long face, bool show)
@@ -345,10 +348,10 @@ TOnscreenView::MessageReceived(BMessage *msg)
switch(msg->what) {
case B_ABOUT_REQUESTED:
{
- BAlert *alert = new BAlert("About Clock",
- "Clock (The Replicant version)\n\n(C)2002, 2003
OpenBeOS,\n"
- "2004 - 2007, Haiku, Inc.\n\nOriginally coded
by the folks "
- "at Be.\n Copyright Be Inc., 1991 - 1998",
"OK");
+ BAlert *alert = new BAlert(B_TRANSLATE("About Clock"),
B_TRANSLATE(
+ "Clock (The Replicant version)\n\nCopyright
2002-2020 "
+ "Haiku, Inc.\n\nOriginally coded by the folks "
+ "at Be.\n Copyright 1991-1998, Be Inc."),
B_TRANSLATE("OK"));
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
alert->Go();
} break;
diff --git a/src/apps/icon-o-matic/gui/SavePanel.cpp
b/src/apps/icon-o-matic/gui/SavePanel.cpp
index 4fcf1a1ad8..18707e32dc 100644
--- a/src/apps/icon-o-matic/gui/SavePanel.cpp
+++ b/src/apps/icon-o-matic/gui/SavePanel.cpp
@@ -373,7 +373,7 @@ SavePanel::_ExportSettings()
// // Build a window around this translator's configuration view
// status_t err = roster->MakeConfigurationView(item->id, NULL, &view,
&rect);
// if (err < B_OK || view == NULL) {
-// BAlert *alert = new BAlert(NULL, strerror(err), "OK");
+// BAlert *alert = new BAlert(NULL, strerror(err),
B_TRANSLATE("OK"));
// alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
// alert->Go();
// } else {
diff --git a/src/apps/overlayimage/OverlayView.cpp
b/src/apps/overlayimage/OverlayView.cpp
index 17e6b442c5..5a43447e6a 100644
--- a/src/apps/overlayimage/OverlayView.cpp
+++ b/src/apps/overlayimage/OverlayView.cpp
@@ -166,11 +166,11 @@ void
OverlayView::OverlayAboutRequested()
{
BAlert *alert = new BAlert("about",
- "OverlayImage\n"
+ B_TRANSLATE("OverlayImage\n"
"Copyright 1999-2010\n\n\t"
"originally by Seth Flaxman\n\t"
"modified by Hartmuth Reh\n\t"
- "further modified by Humdinger\n",
+ "further modified by Humdinger\n"),
"OK");
BTextView *view = alert->TextView();
BFont font;
diff --git a/src/apps/screenshot/ScreenshotWindow.cpp
b/src/apps/screenshot/ScreenshotWindow.cpp
index ecfcd4bc1b..4c7fcaf252 100644
--- a/src/apps/screenshot/ScreenshotWindow.cpp
+++ b/src/apps/screenshot/ScreenshotWindow.cpp
@@ -706,7 +706,7 @@ ScreenshotWindow::_ShowSettings(bool activate)
translator, NULL, &view, &rect);
if (status != B_OK || view == NULL) {
// TODO: proper translation, better error dialog
- BAlert* alert = new BAlert(NULL, strerror(status), "OK");
+ BAlert* alert = new BAlert(NULL, strerror(status),
B_TRANSLATE("OK"));
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
alert->Go();
} else if (fSettingsWindow != NULL) {