[Supertux-Commit] [tinygettext commit] r158 - tags/tinygettext-supertux/src

codesite-noreply at google.com codesite-noreply at google.com
Wed Mar 4 17:51:39 PST 2009


Author: man.is.allan
Date: Wed Mar  4 17:50:51 2009
New Revision: 158

Modified:
    tags/tinygettext-supertux/src/tinygettext.cpp

Log:
Fix tinygettext (backport changes from r57)


Modified: tags/tinygettext-supertux/src/tinygettext.cpp
==============================================================================
--- tags/tinygettext-supertux/src/tinygettext.cpp	(original)
+++ tags/tinygettext-supertux/src/tinygettext.cpp	Wed Mar  4 17:50:51 2009
@@ -662,7 +662,8 @@

    void tokenize_po()
      {
-      while((token = nextToken()) != TOKEN_EOF)
+      token = nextToken();
+      while(token != TOKEN_EOF)
          {
            if(!expectToken("'msgid' keyword", TOKEN_KEYWORD) | 
| !expectContent("'msgid' keyword", "msgid")) break;

@@ -693,6 +694,7 @@
                    msgstr_plural[num] = convert(tokenContent, from_charset,  
to_charset);
                  }
                dict.add_translation(current_msgid, current_msgid_plural,  
msgstr_plural);
+              // No nextToken()
              }
            else
              {
@@ -710,6 +712,7 @@
                  {
                    dict.add_translation(current_msgid,  
convert(tokenContent, from_charset, to_charset));
                  }
+              token = nextToken();
              }
          }
      }
@@ -760,6 +763,7 @@
            }

            // Read more strings?
+          nextChar();
            skipSpace();
          } while(c == '"');
          return TOKEN_CONTENT;


More information about the Supertux-Commit mailing list