[dasher: 38/61] Win32. ngettext does not exist on Windows.



commit 4860e77f7bead52080c4a5c82a6fad1cefd61081
Author: Ada Majorek <amajorek google com>
Date:   Fri Jan 6 21:44:20 2017 -0800

    Win32. ngettext does not exist on Windows.
    
    Partial rollback of
    https://github.com/ipomoena/dasher/commit/b5595c7d10c8d1de1f586e8ad5f7c42563f57377

 Src/DasherCore/MandarinAlphMgr.cpp |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/Src/DasherCore/MandarinAlphMgr.cpp b/Src/DasherCore/MandarinAlphMgr.cpp
index 93fc790..f1c6d71 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());
+      "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]