From eb6734a48ba859856b59165e2600a359738d5827 Mon Sep 17 00:00:00 2001 From: Emily Mabrey Date: Thu, 22 Jul 2021 20:37:07 -0400 Subject: [PATCH] Move `XO(...)` outside `#ifdef` Placing `XO` usage inside pre-processor blocks is not consistenly translatable. Signed-off-by: Emily Mabrey --- src/AboutDialog.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/AboutDialog.cpp b/src/AboutDialog.cpp index 15e94cde1..dbe9baadd 100644 --- a/src/AboutDialog.cpp +++ b/src/AboutDialog.cpp @@ -47,14 +47,20 @@ hold information about a credit item in the Credits list // RevisionIdent contains the REV_TIME and REV_LONG defines from git commit information #include "RevisionIdent.h" +//This needs to be outside the #ifdef or it won't end up in the POT file consistently +static wxString NoDateTimeText = XO("Unknown date and time").Translation(); + #ifndef REV_TIME -#define REV_TIME "unknown date and time" +#define REV_TIME NoDateTimeText #endif +//This needs to be outside the #ifdef or it won't end up in the POT file consistently +static wxString NoRevisionText = XO("No revision identifier was provided").Translation(); + #ifdef REV_LONG #define REV_IDENT wxString( "[[https://github.com/tenacityteam/tenacity/commit/" )+ REV_LONG + "|" + wxString( REV_LONG ).Left(6) + "]] of " + REV_TIME #else -#define REV_IDENT (XO("No revision identifier was provided").Translation()) +#define REV_IDENT (NoRevisionText) #endif // To substitute into many other translatable strings