From humdinger <humdingerb@xxxxxxxxx>:
humdinger has uploaded this change for review. (
https://review.haiku-os.org/c/haiku/+/2686 ;)
Change subject: TextSearch: translate system name of the app
......................................................................
TextSearch: translate system name of the app
---
M src/apps/text_search/GlobalDefs.h
M src/apps/text_search/GrepWindow.cpp
2 files changed, 6 insertions(+), 4 deletions(-)
git pull ssh://git.haiku-os.org:22/haiku refs/changes/86/2686/1
diff --git a/src/apps/text_search/GlobalDefs.h
b/src/apps/text_search/GlobalDefs.h
index a1ad01d..50a4a27 100644
--- a/src/apps/text_search/GlobalDefs.h
+++ b/src/apps/text_search/GlobalDefs.h
@@ -7,7 +7,6 @@
#define APP_SIGNATURE "application/x-vnd.Haiku.TextSearch"
-#define APP_NAME "TextSearch"
#define PREFS_FILE "TextSearch"
#define HISTORY_LIMIT 20
diff --git a/src/apps/text_search/GrepWindow.cpp
b/src/apps/text_search/GrepWindow.cpp
index 1e5207b..ac53b1d 100644
--- a/src/apps/text_search/GrepWindow.cpp
+++ b/src/apps/text_search/GrepWindow.cpp
@@ -35,6 +35,9 @@
#define B_TRANSLATION_CONTEXT "GrepWindow"
+const char* kAppName = B_TRANSLATE_SYSTEM_NAME("TextSearch");
+
+
using std::nothrow;
static const bigtime_t kChangesPulseInterval = 150000;
@@ -385,13 +388,13 @@
} else
title = B_TRANSLATE("%appname% : %path%");
- title.ReplaceAll("%appname%", B_TRANSLATE(APP_NAME));
+ title.ReplaceAll("%appname%", kAppName);
title.ReplaceAll("%path%", path.Path());
}
}
if (!title.Length())
- title = B_TRANSLATE(APP_NAME);
+ title = kAppName;
SetTitle(title.String());
}
@@ -1383,7 +1386,7 @@
if (!_AreAllFoldersOpenInTracker(&folderList)) {
BString str1;
str1 << B_TRANSLATE("%APP_NAME couldn't open one or more
folders.");
- str1.ReplaceFirst("%APP_NAME",APP_NAME);
+ str1.ReplaceFirst("%APP_NAME", kAppName);
BAlert* alert = new BAlert(NULL, str1.String(),
B_TRANSLATE("OK"),
NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT);
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
--
To view, visit https://review.haiku-os.org/c/haiku/+/2686
To unsubscribe, or for help writing mail filters, visit
https://review.haiku-os.org/settings
Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: I2d120b8b92af8cecc8c55ed9ff8ed829f30456c2
Gerrit-Change-Number: 2686
Gerrit-PatchSet: 1
Gerrit-Owner: humdinger <humdingerb@xxxxxxxxx>
Gerrit-MessageType: newchange