Kill iconv
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/tinygettext@7956 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
e5829c26f9
commit
090fc12b5c
@ -4,5 +4,5 @@ HEADER_SEARCH_PATHS = /usr/local/include /usr/include /Library/Frameworks/IrrFra
|
||||
|
||||
OTHER_CFLAGS = -Wall -DHAVE_OGGVORBIS=1 -DHAS_SOCKLEN_T -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAS_POLL=1 -DHAS_FCNTL=1 -DHAS_INET_PTON=1 -DHAS_INET_NTOP=1 -DHAS_MSGHDR_FLAGS=1 -DENABLE_NLS=1 -DHAVE_GETTEXT=1 -DHAVE_GLUT=1 -DHAVE_IRRLICHT=1 -DPACKAGE="\"supertuxkart\"" -D__MACOSX__=1 -DHAVE_RTT=0 -DENABLE_BIDI=1 -fvisibility=hidden -DVERSION=\"svn\"
|
||||
|
||||
OTHER_LDFLAGS = -liconv
|
||||
OTHER_LDFLAGS =
|
||||
LIBRARY_SEARCH_PATHS = /usr/local/lib /usr/lib
|
||||
|
@ -15,6 +15,7 @@
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
/*
|
||||
#include <ctype.h>
|
||||
#include <assert.h>
|
||||
#include <sstream>
|
||||
@ -144,5 +145,6 @@ IConv::convert(const std::string& text)
|
||||
}
|
||||
|
||||
} // namespace tinygettext
|
||||
*/
|
||||
|
||||
/* EOF */
|
||||
|
@ -14,6 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/*
|
||||
#ifndef HEADER_TINYGETTEXT_ICONV_HPP
|
||||
#define HEADER_TINYGETTEXT_ICONV_HPP
|
||||
|
||||
@ -67,5 +68,5 @@ private:
|
||||
} // namespace tinygettext
|
||||
|
||||
#endif
|
||||
|
||||
*/
|
||||
/* EOF */
|
||||
|
@ -53,8 +53,8 @@ POParser::POParser(const std::string& filename_, std::istream& in_, Dictionary&
|
||||
eof(false),
|
||||
big5(false),
|
||||
line_number(0),
|
||||
current_line(),
|
||||
conv()
|
||||
current_line()//,
|
||||
//conv()
|
||||
{
|
||||
}
|
||||
|
||||
@ -294,7 +294,7 @@ POParser::parse_header(const std::string& header)
|
||||
big5 = true;
|
||||
}
|
||||
|
||||
conv.set_charsets(from_charset, dict.get_charset());
|
||||
//conv.set_charsets(from_charset, dict.get_charset());
|
||||
}
|
||||
|
||||
bool
|
||||
@ -403,7 +403,7 @@ POParser::parse()
|
||||
if (number >= msgstr_num.size())
|
||||
msgstr_num.resize(number+1);
|
||||
|
||||
msgstr_num[number] = conv.convert(msgstr);
|
||||
msgstr_num[number] = msgstr; //conv.convert(msgstr);
|
||||
goto next;
|
||||
}
|
||||
else
|
||||
@ -442,7 +442,7 @@ POParser::parse()
|
||||
std::cout << "msgid \"" << msgid << "\"" << std::endl;
|
||||
std::cout << "msgid_plural \"" << msgid_plural << "\"" << std::endl;
|
||||
for(std::vector<std::string>::size_type i = 0; i < msgstr_num.size(); ++i)
|
||||
std::cout << "msgstr[" << i << "] \"" << conv.convert(msgstr_num[i]) << "\"" << std::endl;
|
||||
std::cout << "msgstr[" << i << "] \"" << msgstr_num[i] /*conv.convert(msgstr_num[i])*/ << "\"" << std::endl;
|
||||
std::cout << std::endl;
|
||||
}
|
||||
}
|
||||
@ -460,16 +460,16 @@ POParser::parse()
|
||||
if (use_fuzzy || !fuzzy)
|
||||
{
|
||||
if (has_msgctxt)
|
||||
dict.add_translation(msgctxt, msgid, conv.convert(msgstr));
|
||||
dict.add_translation(msgctxt, msgid, msgstr /*conv.convert(msgstr)*/);
|
||||
else
|
||||
dict.add_translation(msgid, conv.convert(msgstr));
|
||||
dict.add_translation(msgid, msgstr /*conv.convert(msgstr)*/);
|
||||
}
|
||||
|
||||
if (0)
|
||||
{
|
||||
std::cout << (fuzzy?"fuzzy":"not-fuzzy") << std::endl;
|
||||
std::cout << "msgid \"" << msgid << "\"" << std::endl;
|
||||
std::cout << "msgstr \"" << conv.convert(msgstr) << "\"" << std::endl;
|
||||
std::cout << "msgstr \"" << msgstr /*conv.convert(msgstr)*/ << "\"" << std::endl;
|
||||
std::cout << std::endl;
|
||||
}
|
||||
}
|
||||
|
@ -19,8 +19,9 @@
|
||||
#define HEADER_TINYGETTEXT_PO_PARSER_HPP
|
||||
|
||||
#include <iosfwd>
|
||||
#include <string>
|
||||
|
||||
#include "iconv.hpp"
|
||||
//#include "iconv.hpp"
|
||||
|
||||
namespace tinygettext {
|
||||
|
||||
@ -41,7 +42,7 @@ private:
|
||||
int line_number;
|
||||
std::string current_line;
|
||||
|
||||
IConv conv;
|
||||
//IConv conv;
|
||||
|
||||
POParser(const std::string& filename, std::istream& in_, Dictionary& dict_, bool use_fuzzy = true);
|
||||
~POParser();
|
||||
|
Loading…
x
Reference in New Issue
Block a user