[dasher] Windows build fix: windows doesn't have ngettext() - c.f. 80046f44



commit 435b49768eda053b865fa9d09f4138aa71271044
Author: Patrick Welche <prlw1 cam ac uk>
Date:   Fri Feb 1 18:15:57 2013 +0000

    Windows build fix: windows doesn't have ngettext() - c.f. 80046f44

 Src/DasherCore/MandarinAlphMgr.cpp |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/Src/DasherCore/MandarinAlphMgr.cpp b/Src/DasherCore/MandarinAlphMgr.cpp
index 93fc790..9566ed8 100644
--- a/Src/DasherCore/MandarinAlphMgr.cpp
+++ b/Src/DasherCore/MandarinAlphMgr.cpp
@@ -238,12 +238,18 @@ void CMandarinAlphMgr::CMandarinTrainer::Train(CAlphabetMap::SymbolStream &syms)
     bHavePy=false; strPy.clear();
   }
   if (unannotated.size()) {
+    // AM_GLIB_GNU_GETTEXT sets HAVE_GETTEXT if it finds a version of gettext
+    // which includes ngettext() - there is no separate HAVE_NGETTEXT.
     ///TRANSLATORS: first string will be the filename; after the end of the string,
     /// some number of output (e.g. Chinese) characters will be appended,
     /// the number of which is the integer here
+#ifdef HAVE_GETTEXT
     const char* msg = ngettext("In file %s, the following %i symbol appeared without annotations saying how it should be entered, but it can be entered in several ways. Dasher will not be able to learn how you want to enter this symbol:",
                                "In file %s, the following %i symbols appeared without annotations saying how they should be entered, but each can be entered in several ways. Dasher will not be able to learn how you want to enter these symbols:",
                                unannotated.size());
+#else
+    const char* msg = _("In file %s, the following %i symbols appeared without annotations saying how they should be entered, but each can be entered in several ways. Dasher will not be able to learn how you want to enter these symbols:");
+#endif
     char *buf(new char[strlen(msg) + GetDesc().length() + 10]);
     sprintf(buf, msg, GetDesc().c_str(), unannotated.size());
     ostringstream withChars;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]