]> git.saurik.com Git - wxWidgets.git/commitdiff
wxrc -g should output filenames in Unix format.
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 30 May 2010 16:53:20 +0000 (16:53 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 30 May 2010 16:53:20 +0000 (16:53 +0000)
It is customary in C source code and xgettext has problems with
backslahes in #line comments.

Fixes #10727.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

utils/wxrc/wxrc.cpp

index 7f9abc5aa7bdcfc2d388c5fb67be6dd79292d120..853359afbaac68f2158455653e8694400c9401c3 100644 (file)
@@ -844,9 +844,12 @@ void XmlResApp::OutputGettext()
 
     for (ExtractedStrings::const_iterator i = str.begin(); i != str.end(); ++i)
     {
 
     for (ExtractedStrings::const_iterator i = str.begin(); i != str.end(); ++i)
     {
+        const wxFileName filename(i->filename);
+
         wxString s;
         wxString s;
+        s.Printf("#line %d \"%s\"\n",
+                 i->lineNo, filename.GetFullPath(wxPATH_UNIX));
 
 
-        s.Printf("#line %d \"%s\"\n", i->lineNo, i->filename);
         fout.Write(s);
         fout.Write("_(\"" + i->str + "\");\n");
     }
         fout.Write(s);
         fout.Write("_(\"" + i->str + "\");\n");
     }