From c0d5825b50f162526e28ab6ffa9f59454901e2ae Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 30 Oct 2011 08:33:54 +0000 Subject: [PATCH] Move string constants out of ifdef blocks so they can be collected by collectcatkeys. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42991 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../mail_daemon/outbound_protocols/smtp/ConfigView.cpp | 9 ++++++--- src/apps/deskbar/BeMenu.cpp | 10 +++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/add-ons/mail_daemon/outbound_protocols/smtp/ConfigView.cpp b/src/add-ons/mail_daemon/outbound_protocols/smtp/ConfigView.cpp index d1b877d8b3..1477401cb6 100644 --- a/src/add-ons/mail_daemon/outbound_protocols/smtp/ConfigView.cpp +++ b/src/add-ons/mail_daemon/outbound_protocols/smtp/ConfigView.cpp @@ -43,10 +43,13 @@ SMTPConfigView::SMTPConfigView(MailAddonSettings& settings, #endif ) { + static const char* kUnencryptedStr = B_TRANSLATE_MARK("Unencrypted"); + static const char* kSSLStr = B_TRANSLATE_MARK("SSL"); + static const char* kSTARTTLSStr = B_TRANSLATE_MARK("STARTTLS"); #ifdef USE_SSL - AddFlavor(B_TRANSLATE("Unencrypted")); - AddFlavor(B_TRANSLATE("SSL")); - AddFlavor(B_TRANSLATE("STARTTLS")); + AddFlavor(B_TRANSLATE_NOCOLLECT(kUnencryptedStr)); + AddFlavor(B_TRANSLATE(kSSLStr)); + AddFlavor(B_TRANSLATE(kSTARTTLSStr)); #endif AddAuthMethod(B_TRANSLATE("None"), false); diff --git a/src/apps/deskbar/BeMenu.cpp b/src/apps/deskbar/BeMenu.cpp index 69ab0125a1..6017f44094 100644 --- a/src/apps/deskbar/BeMenu.cpp +++ b/src/apps/deskbar/BeMenu.cpp @@ -244,13 +244,13 @@ TBeMenu::AddStandardBeMenuItems() AddSeparatorItem(); } -#ifdef HAIKU_DISTRO_COMPATIBILITY_OFFICIAL +// One of them is used if HAIKU_DISTRO_COMPATIBILITY_OFFICIAL, and the other if +// not. However, we want both of them to end up in the catalog, so we have to +// put them outside of the ifdef block. static const char* kAboutHaikuMenuItemStr = B_TRANSLATE_MARK( "About Haiku"); -#else static const char* kAboutThisSystemMenuItemStr = B_TRANSLATE_MARK( "About this system"); -#endif item = new BMenuItem( #ifdef HAIKU_DISTRO_COMPATIBILITY_OFFICIAL @@ -305,9 +305,9 @@ TBeMenu::AddStandardBeMenuItems() item->SetEnabled(!dragging); shutdownMenu->AddItem(item); -#ifdef APM_SUPPORT + // String outside of ifdef block for collectcatkeys purposes static const char* kSuspendMenuItemStr = B_TRANSLATE_MARK("Suspend"); - +#ifdef APM_SUPPORT if (_kapm_control_(APM_CHECK_ENABLED) == B_OK) { item = new BMenuItem(B_TRANSLATE_NOCOLLECT(kSuspendMenuItemStr), new BMessage(kSuspendSystem));