From 75b491d42a025123fdada01f610290ba363fbf78 Mon Sep 17 00:00:00 2001 From: konrad Date: Wed, 30 Dec 2009 11:21:38 +0000 Subject: [PATCH] localized enum strings made l10n of wobs easier git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@377 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- woc/qtout.cpp | 22 ++++++++++++++++++---- 1 files changed, 18 insertions(+), 4 deletions(-) diff --git a/woc/qtout.cpp b/woc/qtout.cpp index b59687d..487c594 100644 --- a/woc/qtout.cpp +++ b/woc/qtout.cpp @@ -201,6 +201,20 @@ void WocQtClientOut::classEnums(const WocClass&cls,QFile&hdr,QFile&src,QString c scd+="\tif(e=="+ev[j].name+")return \""+ev[j].name+"\";\n"; } scd+="\treturn \"\";\n}\n"; + //localized string converters + hcd+="\tstatic "+k[i]+" locstr2"+k[i]+"(QString,bool*ok=0);\n"; + hcd+="\tstatic QString "+k[i]+"2locstr("+k[i]+");\n"; + scd+=cn+"::"+k[i]+" "+cn+"::locstr2"+k[i]+"(QString s,bool*ok)\n{\n"; + scd+="\ts=s.toLower();if(ok)*ok=true;\n"; + for(int j=0;j