From e837cdea65858f969e8d4c2e0b5900ba83dab4fa Mon Sep 17 00:00:00 2001 From: Vadim Kurland Date: Fri, 25 Sep 2009 22:50:14 +0000 Subject: [PATCH] fixes #437 - got rid of "_()" everywhere (finally) --- build_num | 2 +- config.h.in | 1 - src/fwbedit/fwbedit.cpp | 20 ++--- src/fwbedit/new_object.cpp | 94 +++++++++++----------- src/fwbedit/repair_tree.cpp | 2 +- src/ipfw/ipfw.cpp | 14 ++-- src/iptlib/NATCompiler_ipt.cpp | 34 ++++---- src/iptlib/OSConfigurator_linux24.cpp | 8 +- src/iptlib/PolicyCompiler_PrintRule.cpp | 8 +- src/iptlib/PolicyCompiler_ipt.cpp | 4 +- src/iptlib/RoutingCompiler_ipt_writers.cpp | 6 +- src/pf/pf.cpp | 10 +-- src/pflib/CompilerDriver_ipfw_run.cpp | 8 +- src/pflib/CompilerDriver_pf_run.cpp | 12 +-- src/pflib/NATCompiler_ipf.cpp | 26 +++--- src/pflib/NATCompiler_pf.cpp | 40 ++++----- src/pflib/OSConfigurator_bsd.cpp | 2 +- src/pflib/OSConfigurator_freebsd.cpp | 4 +- src/pflib/OSConfigurator_macosx.cpp | 4 +- src/pflib/OSConfigurator_openbsd.cpp | 6 +- src/pflib/OSConfigurator_solaris.cpp | 10 +-- src/pflib/PolicyCompiler_ipf.cpp | 2 +- src/pflib/PolicyCompiler_ipfw.cpp | 2 +- src/pflib/PolicyCompiler_pf.cpp | 16 ++-- 24 files changed, 168 insertions(+), 167 deletions(-) diff --git a/build_num b/build_num index ecd52b379..a307e9009 100644 --- a/build_num +++ b/build_num @@ -1 +1 @@ -#define BUILD_NUM 1505 +#define BUILD_NUM 1506 diff --git a/config.h.in b/config.h.in index 45bc9cda5..beccdf76b 100644 --- a/config.h.in +++ b/config.h.in @@ -116,5 +116,4 @@ using namespace std; # define VSNPRINTF _vsnprintf #endif -#define _(x) x diff --git a/src/fwbedit/fwbedit.cpp b/src/fwbedit/fwbedit.cpp index a5ff98deb..75359ce5a 100644 --- a/src/fwbedit/fwbedit.cpp +++ b/src/fwbedit/fwbedit.cpp @@ -120,18 +120,18 @@ class UpgradePredicate: public XMLTools::UpgradePredicate virtual bool operator()(const string&) const { bool res=false; - cout << _("Data file has been created in the old version of Firewall Builder.") << endl << flush; + cout << "Data file has been created in the old version of Firewall Builder." << endl << flush; if (autoupgrade_flag) { - cout << _("Do you want to convert it? (Y)") << endl; + cout << "Do you want to convert it? (Y/n)" << endl; int a = getchar(); if (a=='y' || a=='Y' || a=='\n' ) res= true; } else { - cout << _("Use option '-u' to upgrade the file. Alternatively,\nfwbuilder GUI can convert it.") << endl; + cout << "Use option '-u' to upgrade the file. Alternatively,\nfwbuilder GUI can convert it." << endl; } - if (res) cout << _("Upgrading the file now ...") << endl; + if (res) cout << "Upgrading the file now ..." << endl; return res; } }; @@ -574,7 +574,7 @@ int main(int argc, char * const *argv) } else if (cmd == UPGRADE) { - cout << _("File upgraded; current data format version: ") + cout << "File upgraded; current data format version: " << libfwbuilder::Constants::getDataFormatVersion() << endl; } else if (cmd == NEWOBJECT) @@ -615,8 +615,8 @@ int main(int argc, char * const *argv) exit(-1); } FWObject *grp = groups.front(); - cout << _("Adding object '") << obj->getName() - << _("' to the group '") << grp->getName() + cout << "Adding object '" << obj->getName() + << "' to the group '" << grp->getName() << "'" << endl; grp->addRef(obj); } @@ -630,8 +630,8 @@ int main(int argc, char * const *argv) exit(-1); } FWObject *grp = groups.front(); - cout << _("Removing object '") << obj->getName() - << _("' from the group '") << grp->getName() + cout << "Removing object '" << obj->getName() + << "' from the group '" << grp->getName() << "'" << endl; grp->removeRef(obj); } @@ -658,7 +658,7 @@ int main(int argc, char * const *argv) cerr << ex.what(); exit(1); } catch (...) { - cerr << _("Unsupported exception"); + cerr << "Unsupported exception"; exit(1); } diff --git a/src/fwbedit/new_object.cpp b/src/fwbedit/new_object.cpp index 8786dcf23..fc1e6591f 100644 --- a/src/fwbedit/new_object.cpp +++ b/src/fwbedit/new_object.cpp @@ -218,7 +218,7 @@ bool testPlatform(const string &pl, const string &os) string str; if (platforms.empty() || ( platforms.size()==1 && platforms.front()=="unknown" )) { - cout << _("Failed to load list of supported platforms") << endl; + cout << "Failed to load list of supported platforms" << endl; exit(1); } for (vector::iterator i=platforms.begin();i!=platforms.end();i++) @@ -331,7 +331,7 @@ void _modObject(FWObject *nobj, const string &comment_txt, operands ops) } } - cout << _("Address: ") << addr1 << endl; + cout << "Address: " << addr1 << endl; if (!addr2.empty()) cout << "Netmask: " << addr2 << endl; Address *o = Address::cast(nobj); @@ -365,8 +365,8 @@ void _modObject(FWObject *nobj, const string &comment_txt, operands ops) notEnoughAttributesError(); } - cout << _("DNS Record: ") << dnsrec << endl; - cout << _("Run time: ") << runtime << endl; + cout << "DNS Record: " << dnsrec << endl; + cout << "Run time: " << runtime << endl; DNSName *o=DNSName::cast(nobj); o->setSourceName(dnsrec); @@ -384,8 +384,8 @@ void _modObject(FWObject *nobj, const string &comment_txt, operands ops) notEnoughAttributesError(); } - cout << _("Range start: ") << addr1 << endl - << _("Range end: ") << addr2 << endl; + cout << "Range start: " << addr1 << endl + << "Range end: " << addr2 << endl; AddressRange *o=AddressRange::cast(nobj); o->setRangeStart(InetAddr(addr1)); @@ -407,8 +407,8 @@ void _modObject(FWObject *nobj, const string &comment_txt, operands ops) notEnoughAttributesError(); } - cout << _("Address: ") << addr1 << endl - << _("Netmask: ") << addr2 << endl; + cout << "Address: " << addr1 << endl + << "Netmask: " << addr2 << endl; Network *o=Network::cast(nobj); o->setAddress(InetAddr(addr1)); @@ -425,8 +425,8 @@ void _modObject(FWObject *nobj, const string &comment_txt, operands ops) notEnoughAttributesError(); } - cout << _("Address: ") << addr1 << endl - << _("Netmask: ") << addr2 << endl; + cout << "Address: " << addr1 << endl + << "Netmask: " << addr2 << endl; NetworkIPv6 *o=NetworkIPv6::cast(nobj); o->setAddress(InetAddr(AF_INET6, addr1)); @@ -446,8 +446,8 @@ void _modObject(FWObject *nobj, const string &comment_txt, operands ops) notEnoughAttributesError(); } - cout << _("Platform: ") << platform << endl - << _("Host OS: ") << hostOS << endl; + cout << "Platform: " << platform << endl + << "Host OS: " << hostOS << endl; if (testPlatform(platform, hostOS)) { @@ -481,14 +481,14 @@ void _modObject(FWObject *nobj, const string &comment_txt, operands ops) QDate date; int m,h,d,mn,y,dw; - cout << _("Activate a rule on:") << endl - << _("Time: ") << time1 << endl - << _("Date: ") << date1 << endl - << _("Day of week:") << day1 << endl - << _("Deactivate a rule on:") << endl - << _("Time: ") << time2 << endl - << _("Date: ") << date2 << endl - << _("Day of week:") << day2 << endl; + cout << "Activate a rule on:" << endl + << "Time: " << time1 << endl + << "Date: " << date1 << endl + << "Day of week:" << day1 << endl + << "Deactivate a rule on:" << endl + << "Time: " << time2 << endl + << "Date: " << date2 << endl + << "Day of week:" << day2 << endl; Interval *o=Interval::cast(nobj); if (time1 == "") @@ -567,13 +567,13 @@ void _modObject(FWObject *nobj, const string &comment_txt, operands ops) if (security=="") { - cout << _("Security level is mandatory attribute.") << endl; + cout << "Security level is mandatory attribute." << endl; } else { - cout << _("Security level: ") << security << endl - << _("Address type: ") << addrtype << endl - << _("Management interface: ") << management << endl; + cout << "Security level: " << security << endl + << "Address type: " << addrtype << endl + << "Management interface: " << management << endl; Interface *o = Interface::cast(nobj); int sl = atoi(security.c_str()); @@ -603,15 +603,15 @@ void _modObject(FWObject *nobj, const string &comment_txt, operands ops) notEnoughAttributesError(); } - cout << _("Source port range:") << endl - << _("Start: ") << addr1 << endl - << _("End: ") << addr2 << endl - << _("Destination port range:") << endl - << _("Start: ") << addr3 << endl - << _("End: ") << addr4 << endl - << _("TCP Flags: ") << endl - << _("Mask: ") << tcpflags_mask << endl - << _("Settings: ") << tcpflags_bits << endl; + cout << "Source port range:" << endl + << "Start: " << addr1 << endl + << "End: " << addr2 << endl + << "Destination port range:" << endl + << "Start: " << addr3 << endl + << "End: " << addr4 << endl + << "TCP Flags: " << endl + << "Mask: " << tcpflags_mask << endl + << "Settings: " << tcpflags_bits << endl; TCPService *o=TCPService::cast(nobj); @@ -671,12 +671,12 @@ void _modObject(FWObject *nobj, const string &comment_txt, operands ops) notEnoughAttributesError(); } - cout << _("Source port range:") << endl - << _("Start: ") << addr1 << endl - << _("End: ") << addr2 << endl - << _("Destination port range:") << endl - << _("Start: ") << addr3 << endl - << _("End: ") << addr4 << endl; + cout << "Source port range:" << endl + << "Start: " << addr1 << endl + << "End: " << addr2 << endl + << "Destination port range:" << endl + << "Start: " << addr3 << endl + << "End: " << addr4 << endl; UDPService *o=UDPService::cast(nobj); @@ -697,8 +697,8 @@ void _modObject(FWObject *nobj, const string &comment_txt, operands ops) notEnoughAttributesError(); } - cout << _("ICMP type: ") << ICMPtype << endl - << _("ICMP code: ") << ICMPcode << endl; + cout << "ICMP type: " << ICMPtype << endl + << "ICMP code: " << ICMPcode << endl; ICMPService *o=ICMPService::cast(nobj); o->setInt("type",atoi(ICMPtype.c_str())); @@ -715,8 +715,8 @@ void _modObject(FWObject *nobj, const string &comment_txt, operands ops) notEnoughAttributesError(); } - cout << _("Protocol number: ") << protocol << endl - << _("Flags: ") << bitmap << endl; + cout << "Protocol number: " << protocol << endl + << "Flags: " << bitmap << endl; IPService *o=IPService::cast(nobj); o->setInt("protocol_num",atoi(protocol.c_str())); @@ -792,8 +792,8 @@ void newObject(FWObjectDatabase *objdb, cout << "Adding a new object to '" << parent <<"': " << endl - << _("Type: ") << objtype << endl - << _("Name: ") << name << endl; + << "Type: " << objtype << endl + << "Name: " << name << endl; FWObject *nobj = createObject(objdb, objtype, parent); @@ -870,8 +870,8 @@ void delObject(FWObjectDatabase *objdb, const string &object) for (list::iterator it=objects.begin(); it!=objects.end(); ++it) { FWObject *obj = *it; - cout << _("Removing object '") << obj->getName() - << _("' from the tree.") << endl; + cout << "Removing object '" << obj->getName() + << "' from the tree." << endl; objdb->removeAllInstances(obj); } } diff --git a/src/fwbedit/repair_tree.cpp b/src/fwbedit/repair_tree.cpp index f7c755828..3a3cb6119 100644 --- a/src/fwbedit/repair_tree.cpp +++ b/src/fwbedit/repair_tree.cpp @@ -65,7 +65,7 @@ void testAndFix(FWObjectDatabase *objdb, void checkAndRepairTree(FWObjectDatabase *objdb) { - cout << _("Check and repair tree structure:") << endl; + cout << "Check and repair tree structure:" << endl; FWObject *root=objdb; FWObject *nlib; string lib_name; diff --git a/src/ipfw/ipfw.cpp b/src/ipfw/ipfw.cpp index 868a16d4c..b14dc346f 100644 --- a/src/ipfw/ipfw.cpp +++ b/src/ipfw/ipfw.cpp @@ -79,16 +79,16 @@ class UpgradePredicate: public XMLTools::UpgradePredicate public: virtual bool operator()(const string&) const { - cout << _("Data file has been created in the old version of Firewall Builder. Use fwbuilder GUI to convert it.") << endl; + cout << "Data file has been created in the old version of Firewall Builder. Use fwbuilder GUI to convert it." << endl; return false; } }; void usage(const char *name) { - cout << _("Firewall Builder: policy compiler for ipfw") << endl; - cout << _("Version ") << VERSION << RELEASE_NUM << endl; - cout << _("Usage: ") << name << " [-x] [-v] [-V] [-f filename.xml] [-o output.fw] [-d destdir] [-m] firewall_object_name" << endl; + cout << "Firewall Builder: policy compiler for ipfw" << endl; + cout << "Version " << VERSION << RELEASE_NUM << endl; + cout << "Usage: " << name << " [-x] [-v] [-V] [-f filename.xml] [-o output.fw] [-d destdir] [-m] firewall_object_name" << endl; } int main(int argc, char **argv) @@ -150,7 +150,7 @@ int main(int argc, char **argv) /* load the data file */ UpgradePredicate upgrade_predicate; - cout << _(" *** Loading data ..."); + cout << " *** Loading data ..."; objdb->setReadOnly( false ); objdb->load( sysfname, &upgrade_predicate, librespath); @@ -162,7 +162,7 @@ int main(int argc, char **argv) objdb->setFileName(filename); objdb->reIndex(); - cout << _(" done\n"); + cout << " done\n"; FWObject *slib = objdb->getById(FWObjectDatabase::STANDARD_LIB_ID); if (slib && slib->isReadOnly()) slib->setReadOnly(false); @@ -194,7 +194,7 @@ int main(int argc, char **argv) cerr << ex.what(); return 1; } catch (...) { - cerr << _("Unsupported exception"); + cerr << "Unsupported exception"; return 1; } diff --git a/src/iptlib/NATCompiler_ipt.cpp b/src/iptlib/NATCompiler_ipt.cpp index 90dc3c566..63500d2cf 100644 --- a/src/iptlib/NATCompiler_ipt.cpp +++ b/src/iptlib/NATCompiler_ipt.cpp @@ -498,33 +498,33 @@ bool NATCompiler_ipt::VerifyRules::processNext() if (tsrc->getNeg()) compiler->abort( rule, - _("Can not use negation in translated source ")); + "Can not use negation in translated source "); if (tdst->getNeg()) compiler->abort( rule, - _("Can not use negation in translated destination.")); + "Can not use negation in translated destination."); if (tsrv->getNeg()) compiler->abort( rule, - _("Can not use negation in translated service.")); + "Can not use negation in translated service."); if (tsrv->size()!=1) compiler->abort( rule, - _("Translated service should be 'Original' or should contain single object.")); + "Translated service should be 'Original' or should contain single object."); if ( Group::cast( compiler->getFirstTSrv(rule) )!=NULL) compiler->abort( rule, - _("Can not use group in translated service.")); + "Can not use group in translated service."); if (rule->getRuleType()==NATRule::LB) compiler->abort( rule, - _("Load balancing rules are not supported.")); + "Load balancing rules are not supported."); if (rule->getRuleType()==NATRule::SNAT ) @@ -533,7 +533,7 @@ bool NATCompiler_ipt::VerifyRules::processNext() if ( ! tsrc->isAny() && Network::cast(o1)!=NULL) compiler->abort( rule, - _("Can not use network object in translated source.")); + "Can not use network object in translated source."); } @@ -545,7 +545,7 @@ bool NATCompiler_ipt::VerifyRules::processNext() a1->getNetmaskPtr()->getLength() != a2->getNetmaskPtr()->getLength() ) compiler->abort( rule, - _("Original and translated source should both be networks of the same size.")); + "Original and translated source should both be networks of the same size."); } if (rule->getRuleType()==NATRule::DNetnat && !tsrc->isAny() ) @@ -556,11 +556,11 @@ bool NATCompiler_ipt::VerifyRules::processNext() a1->getNetmaskPtr()->getLength() != a2->getNetmaskPtr()->getLength() ) compiler->abort( rule, - _("Original and translated destination should both be networks of the same size .")); + "Original and translated destination should both be networks of the same size ."); } - Service *osrv_obj = compiler->getFirstOSrv(rule); - Service *tsrv_obj = compiler->getFirstTSrv(rule); +// Service *osrv_obj = compiler->getFirstOSrv(rule); +// Service *tsrv_obj = compiler->getFirstTSrv(rule); return true; } @@ -587,12 +587,12 @@ bool NATCompiler_ipt::VerifyRules2::processNext() if (osrv->isAny() && ! tsrv->isAny()) compiler->abort( rule, - _("Can not use service object in Translated Service if Original Service is 'Any'.")); + "Can not use service object in Translated Service if Original Service is 'Any'."); if (!tsrv->isAny() && s1->getProtocolNumber()!=s2->getProtocolNumber()) compiler->abort( rule, - _("Translated Service should be either 'Original' or should contain object of the same type as Original Service.")); + "Translated Service should be either 'Original' or should contain object of the same type as Original Service."); } return true; } @@ -764,7 +764,7 @@ bool NATCompiler_ipt::addVirtualAddress::processNext() compiler->warning( rule, - string(_("Adding of virtual address for address range is not implemented (object ")) + + string("Adding of virtual address for address range is not implemented (object ") + a->getName() + ")" ); } else compiler->osconfigurator->addVirtualAddressForNAT( a ); @@ -995,7 +995,8 @@ bool NATCompiler_ipt::ReplaceFirewallObjectsTSrc::processNext() { char errmsg[1024]; sprintf(errmsg, -_("Could not find suitable interface for the NAT rule %s. Perhaps all interfaces are unnumbered?"), + "Could not find suitable interface for the NAT rule %s. " + "Perhaps all interfaces are unnumbered?", rule->getLabel().c_str() ); compiler->abort(rule, errmsg); } @@ -1165,7 +1166,8 @@ void NATCompiler_ipt::checkForDynamicInterfacesOfOtherObjects::findDynamicInterf cerr << endl; #endif char errstr[2048]; - sprintf(errstr,_("Can not build rule using dynamic interface '%s' of the object '%s' because its address in unknown."), + sprintf(errstr, "Can not build rule using dynamic interface '%s' " + "of the object '%s' because its address in unknown.", ifs->getName().c_str(), ifs->getParent()->getName().c_str()); diff --git a/src/iptlib/OSConfigurator_linux24.cpp b/src/iptlib/OSConfigurator_linux24.cpp index abfc817e6..fa21b8989 100644 --- a/src/iptlib/OSConfigurator_linux24.cpp +++ b/src/iptlib/OSConfigurator_linux24.cpp @@ -181,9 +181,9 @@ void OSConfigurator_linux24::addVirtualAddressForNAT(const Network *nw) virtual_addresses.push_back( *(nw->getAddressPtr()) ); registerVirtualAddressForNat(); } else - warning(_("Can not add virtual address ") + + warning("Can not add virtual address " + nw->getAddressPtr()->toString() + - _(" (object ") + nw->getName() + ")" ); + " (object " + nw->getName() + ")" ); } } } @@ -220,9 +220,9 @@ void OSConfigurator_linux24::addVirtualAddressForNAT(const Address *addr) virtual_addresses.push_back(*(addr->getAddressPtr())); registerVirtualAddressForNat(); } else - warning(_("Can not add virtual address ") + + warning("Can not add virtual address " + addr->getAddressPtr()->toString() + - _(" (object ") + addr->getName() + ")" ); + " (object " + addr->getName() + ")" ); } return; } diff --git a/src/iptlib/PolicyCompiler_PrintRule.cpp b/src/iptlib/PolicyCompiler_PrintRule.cpp index 60d515e61..8262c93ab 100644 --- a/src/iptlib/PolicyCompiler_PrintRule.cpp +++ b/src/iptlib/PolicyCompiler_PrintRule.cpp @@ -541,7 +541,7 @@ string PolicyCompiler_ipt::PrintRule::_printLogPrefix(const string &rule_num, const string &interf, const string &chain, const string &ruleset, - const string &rule_label, + const string& , const string &prefix) { string s = prefix; @@ -1397,19 +1397,19 @@ string PolicyCompiler_ipt::PrintRule::PolicyRuleToString(PolicyRule *rule) ref=srcrel->front(); Address *src=Address::cast(FWReference::cast(ref)->getPointer()); if(src==NULL) - throw FWException(_("Broken SRC in ")+rule->getLabel()); + throw FWException(string("Broken SRC in ") + rule->getLabel()); RuleElementDst *dstrel=rule->getDst(); ref=dstrel->front(); Address *dst=Address::cast(FWReference::cast(ref)->getPointer()); if(dst==NULL) - throw FWException(_("Broken DST in ")+rule->getLabel()); + throw FWException(string("Broken DST in ") + rule->getLabel()); RuleElementSrv *srvrel=rule->getSrv(); ref=srvrel->front(); Service *srv=Service::cast(FWReference::cast(ref)->getPointer()); if(srv==NULL) - throw FWException(_("Broken SRV in ")+rule->getLabel()); + throw FWException(string("Broken SRV in ") + rule->getLabel()); std::ostringstream command_line; diff --git a/src/iptlib/PolicyCompiler_ipt.cpp b/src/iptlib/PolicyCompiler_ipt.cpp index a8df58116..b432b0ba8 100644 --- a/src/iptlib/PolicyCompiler_ipt.cpp +++ b/src/iptlib/PolicyCompiler_ipt.cpp @@ -2497,10 +2497,10 @@ bool PolicyCompiler_ipt::specialCaseWithFW1::processNext() // RuleElementSrc *srcrel=rule->getSrc(); Address *src =compiler->getFirstSrc(rule); - if(src==NULL) throw(_("Broken SRC in rule ")+rule->getLabel()); + if(src==NULL) throw(string("Broken SRC in rule ") + rule->getLabel()); // RuleElementDst *dstrel=rule->getDst(); Address *dst =compiler->getFirstDst(rule); - if(dst==NULL) throw(_("Broken DST in rule ")+rule->getLabel()); + if(dst==NULL) throw(string("Broken DST in rule ") + rule->getLabel()); if (!src->isAny() && !dst->isAny() && compiler->complexMatch(src,compiler->fw) && diff --git a/src/iptlib/RoutingCompiler_ipt_writers.cpp b/src/iptlib/RoutingCompiler_ipt_writers.cpp index 82630f33f..6204a86cc 100644 --- a/src/iptlib/RoutingCompiler_ipt_writers.cpp +++ b/src/iptlib/RoutingCompiler_ipt_writers.cpp @@ -263,7 +263,7 @@ string RoutingCompiler_ipt::PrintRule::RoutingRuleToString(RoutingRule *rule) ref=dstrel->front(); Address *dst=Address::cast(FWReference::cast(ref)->getPointer()); if(dst==NULL) - throw FWException(_("Broken DST in ")+rule->getLabel()); + throw FWException(string("Broken DST in ")+rule->getLabel()); ostringstream command_line; @@ -307,7 +307,7 @@ string RoutingCompiler_ipt::PrintRule::_printRGtw(RoutingRule *rule) ref = gtwrel->front(); Address *gtw = Address::cast(FWReference::cast(ref)->getPointer()); if(gtw==NULL) - throw FWException(_("Broken GTW in ")+rule->getLabel()); + throw FWException(string("Broken GTW in ")+rule->getLabel()); string gateway = _printAddr(gtw); @@ -335,7 +335,7 @@ string RoutingCompiler_ipt::PrintRule::_printRDst(RoutingRule *rule) ref=dstrel->front(); Address *dst=Address::cast(FWReference::cast(ref)->getPointer()); if(dst==NULL) - throw FWException(_("Broken DST in ")+rule->getLabel()); + throw FWException(string("Broken DST in ")+rule->getLabel()); return _printAddr(dst); } diff --git a/src/pf/pf.cpp b/src/pf/pf.cpp index 01400ae22..d33a0c39f 100644 --- a/src/pf/pf.cpp +++ b/src/pf/pf.cpp @@ -58,16 +58,16 @@ class UpgradePredicate: public XMLTools::UpgradePredicate public: virtual bool operator()(const string&) const { - cout << _("Data file has been created in the old version of Firewall Builder. Use fwbuilder GUI to convert it.") << endl; + cout << "Data file has been created in the old version of Firewall Builder. Use fwbuilder GUI to convert it." << endl; return false; } }; void usage(const char *name) { - cout << _("Firewall Builder: policy compiler for OpenBSD PF") << endl; - cout << _("Version ") << VERSION << RELEASE_NUM << endl; - cout << _("Usage: ") << name << " [-x] [-v] [-V] [-f filename.xml] [-o output.fw] [-d destdir] [-m] [-4|-6] firewall_object_name" << endl; + cout << "Firewall Builder: policy compiler for OpenBSD PF" << endl; + cout << "Version " << VERSION << RELEASE_NUM << endl; + cout << "Usage: " << name << " [-x] [-v] [-V] [-f filename.xml] [-o output.fw] [-d destdir] [-m] [-4|-6] firewall_object_name" << endl; } @@ -178,7 +178,7 @@ int main(int argc, char **argv) cerr << ex.what(); return 1; } catch (...) { - cerr << _("Unsupported exception"); + cerr << "Unsupported exception"; return 1; } diff --git a/src/pflib/CompilerDriver_ipfw_run.cpp b/src/pflib/CompilerDriver_ipfw_run.cpp index 949b3e679..770b86559 100644 --- a/src/pflib/CompilerDriver_ipfw_run.cpp +++ b/src/pflib/CompilerDriver_ipfw_run.cpp @@ -130,7 +130,7 @@ string CompilerDriver_ipfw::run(const std::string &cluster_id, oscnf = std::auto_ptr(new OSConfigurator_freebsd(objdb , fw, false)); if (oscnf.get()==NULL) - throw FWException(_("Unrecognized host OS ")+fw->getStr("host_OS")+" (family "+family+")"); + throw FWException("Unrecognized host OS "+fw->getStr("host_OS")+" (family "+family+")"); oscnf->prolog(); @@ -327,12 +327,12 @@ string CompilerDriver_ipfw::run(const std::string &cluster_id, script << "#!/bin/sh " << shell_dbg << endl << endl; - script << _("#\n\ + script << "#\n\ # This is automatically generated file. DO NOT MODIFY !\n\ #\n\ -# Firewall Builder fwb_ipfw v") << VERSION << "-" << RELEASE_NUM << _(" \n\ +# Firewall Builder fwb_ipfw v" << VERSION << "-" << RELEASE_NUM << " \n\ #\n\ -# Generated ") << timestr << " " << tzname[stm->tm_isdst] << _(" by ") +# Generated " << timestr << " " << tzname[stm->tm_isdst] << " by " << user_name << "\n#\n"; script << MANIFEST_MARKER << "* " << QFileInfo(fw_file_name).fileName(); diff --git a/src/pflib/CompilerDriver_pf_run.cpp b/src/pflib/CompilerDriver_pf_run.cpp index baa1187f1..e108db99a 100644 --- a/src/pflib/CompilerDriver_pf_run.cpp +++ b/src/pflib/CompilerDriver_pf_run.cpp @@ -151,7 +151,7 @@ string CompilerDriver_pf::run(const std::string &cluster_id, objdb , fw, false)); if (oscnf.get()==NULL) - throw FWException(_("Unrecognized host OS ") + + throw FWException("Unrecognized host OS " + fw->getStr("host_OS")+" (family "+family+")"); oscnf->prolog(); @@ -489,12 +489,12 @@ string CompilerDriver_pf::run(const std::string &cluster_id, script << "#!/bin/sh "; script << shell_dbg << "\n"; - script << _("#\n\ + script << "#\n\ # This is automatically generated file. DO NOT MODIFY !\n\ #\n\ -# Firewall Builder fwb_pf v") << VERSION << "-" << RELEASE_NUM << _(" \n\ +# Firewall Builder fwb_pf v" << VERSION << "-" << RELEASE_NUM << " \n\ #\n\ -# Generated ") << timestr << " " << tzname[stm->tm_isdst] << _(" by ") +# Generated " << timestr << " " << tzname[stm->tm_isdst] << " by " << user_name << "\n#\n"; info("Output file name: " + fw_file_name.toStdString()); @@ -541,8 +541,8 @@ string CompilerDriver_pf::run(const std::string &cluster_id, script << "\n"; script << "log '"; - script << _("Activating firewall script generated ") - << timestr << " " << _(" by ") + script << "Activating firewall script generated " + << timestr << " " << " by " << user_name; script << "'" << "\n"; diff --git a/src/pflib/NATCompiler_ipf.cpp b/src/pflib/NATCompiler_ipf.cpp index 1b7f1442d..e69118495 100644 --- a/src/pflib/NATCompiler_ipf.cpp +++ b/src/pflib/NATCompiler_ipf.cpp @@ -74,32 +74,32 @@ bool NATCompiler_ipf::VerifyRules::processNext() RuleElementTSrv *tsrv=rule->getTSrv(); assert(tsrv); if (rule->getRuleType()==NATRule::DNAT && odst->size()!=1) - throw FWException(_("There should be no more than one object in original destination in the rule ")+rule->getLabel()); + throw FWException("There should be no more than one object in original destination in the rule "+rule->getLabel()); // if (rule->getRuleType()==NATRule::SNAT && tsrc->size()!=1) -// throw FWException(_("There should be no more than one object in translated source in the rule ")+rule->getLabel()); +// throw FWException("There should be no more than one object in translated source in the rule "+rule->getLabel()); if (rule->getRuleType()==NATRule::DNAT && osrv->isAny()) - throw FWException(_("Service must be specified for destination translation rule. Rule ")+rule->getLabel()); + throw FWException("Service must be specified for destination translation rule. Rule "+rule->getLabel()); if (tsrv->size()!=1) - throw FWException(_("Translated service should be 'Original' or should contain single object. Rule: ")+rule->getLabel()); + throw FWException("Translated service should be 'Original' or should contain single object. Rule: "+rule->getLabel()); FWObject *o=tsrv->front(); if (FWReference::cast(o)!=NULL) o=FWReference::cast(o)->getPointer(); if ( Group::cast(o)!=NULL) - throw FWException(_("Can not use group in translated service. Rule ")+rule->getLabel()); + throw FWException("Can not use group in translated service. Rule "+rule->getLabel()); #if 0 if (rule->getRuleType()==NATRule::SNAT ) { if ( tsrc->size()!=1) - throw FWException(_("There should be no more than one object in translated source in the rule ")+rule->getLabel()); + throw FWException("There should be no more than one object in translated source in the rule "+rule->getLabel()); // Address* o1=tsrc->getFirst(true); // if ( ! tsrc->isAny() && Network::cast(o1)!=NULL) -// throw FWException(_("Can not use network object in translated source. Rule ")+rule->getLabel()); +// throw FWException("Can not use network object in translated source. Rule "+rule->getLabel()); } #endif @@ -108,7 +108,7 @@ bool NATCompiler_ipf::VerifyRules::processNext() Network *a2=Network::cast(compiler->getFirstTSrc(rule)); if ( a1==NULL || a2==NULL || a1->getNetmaskPtr()->getLength()!=a2->getNetmaskPtr()->getLength() ) - throw FWException(_("Original and translated source should both be networks of the same size . Rule ")+rule->getLabel()); + throw FWException("Original and translated source should both be networks of the same size . Rule "+rule->getLabel()); } if (rule->getRuleType()==NATRule::DNetnat && !tsrc->isAny() ) { @@ -116,17 +116,17 @@ bool NATCompiler_ipf::VerifyRules::processNext() Network *a2=Network::cast(compiler->getFirstTDst(rule)); if ( a1==NULL || a2==NULL || a1->getNetmaskPtr()->getLength()!=a2->getNetmaskPtr()->getLength() ) - throw FWException(_("Original and translated destination should both be networks of the same size . Rule ")+rule->getLabel()); + throw FWException("Original and translated destination should both be networks of the same size . Rule "+rule->getLabel()); } if (osrc->getNeg() || odst->getNeg() || osrv->getNeg()) - throw FWException(_("Negation in NAT rules is not supported. Rule ")+rule->getLabel()); + throw FWException("Negation in NAT rules is not supported. Rule "+rule->getLabel()); // if (rule->getRuleType()==NATRule::NONAT) -// throw FWException(_("Unsupported translation. Rule ")+rule->getLabel()); +// throw FWException("Unsupported translation. Rule "+rule->getLabel()); return true; } @@ -302,9 +302,9 @@ bool NATCompiler_ipf::AssignInterface::processNext() default: ; } - throw FWException(_("Could not assign NAT rule to the interface. Perhaps one of the \n\ + throw FWException("Could not assign NAT rule to the interface. Perhaps one of the \n\ objects has address which does not belong to any subnet the firewall has interface on. \n\ - Rule: ")+rule->getLabel()); + Rule: "+rule->getLabel()); return true; } diff --git a/src/pflib/NATCompiler_pf.cpp b/src/pflib/NATCompiler_pf.cpp index 5e321c59a..603486851 100644 --- a/src/pflib/NATCompiler_pf.cpp +++ b/src/pflib/NATCompiler_pf.cpp @@ -223,7 +223,7 @@ bool NATCompiler_pf::NATRuleType::processNext() return true; } - compiler->abort(rule, _("Unsupported translation.")); + compiler->abort(rule, "Unsupported translation."); return false; } @@ -348,59 +348,59 @@ bool NATCompiler_pf::VerifyRules::processNext() RuleElementTSrv *tsrv=rule->getTSrv(); assert(tsrv); // if (rule->getRuleType()==NATRule::LB) -// compiler->abort(_("Load balancing rules are not supported. Rule ")+rule->getLabel()); +// compiler->abort("Load balancing rules are not supported. Rule "+rule->getLabel()); if (rule->getRuleType()==NATRule::DNAT && odst->size()!=1) compiler->abort( rule, - _("There should be no more than one object in original destination")); + "There should be no more than one object in original destination"); // if (rule->getRuleType()==NATRule::SNAT && tsrc->size()!=1) -// compiler->abort(_("There should be no more than one object in translated source in the rule ")+rule->getLabel()); +// compiler->abort("There should be no more than one object in translated source in the rule "+rule->getLabel()); if (osrv->getNeg()) compiler->abort( rule, - _("Negation in original service is not supported.")); + "Negation in original service is not supported."); /* bug #1276083: "Destination NAT rules". this restriction is not * true at least as of OpenBSD 3.5 * if (rule->getRuleType()==NATRule::DNAT && osrv->isAny()) - compiler->abort(_("Service must be specified for destination translation rule. Rule ")+rule->getLabel()); + compiler->abort("Service must be specified for destination translation rule. Rule "+rule->getLabel()); */ if (rule->getRuleType()==NATRule::DNAT && osrv->isAny() && !tsrv->isAny()) compiler->abort( rule, - _("Can not translate 'any' into a specific service.")); + "Can not translate 'any' into a specific service."); if (tsrc->getNeg()) compiler->abort( rule, - _("Can not use negation in translated source.")); + "Can not use negation in translated source."); if (tdst->getNeg()) compiler->abort( rule, - _("Can not use negation in translated destination.")); + "Can not use negation in translated destination."); if (tsrv->getNeg()) compiler->abort( rule, - _("Can not use negation in translated service.")); + "Can not use negation in translated service."); if (tsrv->size()!=1) compiler->abort( rule, - _("Translated service should be 'Original' or should contain single object.")); + "Translated service should be 'Original' or should contain single object."); FWObject *o=tsrv->front(); if (FWReference::cast(o)!=NULL) o=FWReference::cast(o)->getPointer(); @@ -409,14 +409,14 @@ bool NATCompiler_pf::VerifyRules::processNext() compiler->abort( rule, - _("Can not use group in translated service.")); + "Can not use group in translated service."); #if 0 if (rule->getRuleType()==NATRule::SNAT ) { Address* o1=compiler->getFirstTSrc(rule); if ( Network::cast(o1)!=NULL || AddressRange::cast(o1)!=NULL ) - compiler->abort(_("Can not use network or address range object in translated source. Rule ")+rule->getLabel()); + compiler->abort("Can not use network or address range object in translated source. Rule "+rule->getLabel()); } #endif @@ -441,14 +441,14 @@ bool NATCompiler_pf::VerifyRules::processNext() compiler->abort( rule, - _("There should be no more than one object in translated destination")); + "There should be no more than one object in translated destination"); Address* o1=compiler->getFirstTDst(rule); if ( Network::cast(o1)!=NULL || AddressRange::cast(o1)!=NULL ) compiler->abort( rule, - _("Can not use network or address range object in translated destination.")); + "Can not use network or address range object in translated destination."); } @@ -461,7 +461,7 @@ bool NATCompiler_pf::VerifyRules::processNext() compiler->abort( rule, - _("Original and translated source should both be networks of the same size.")); + "Original and translated source should both be networks of the same size."); } if (rule->getRuleType()==NATRule::DNetnat && !tsrc->isAny() ) @@ -473,7 +473,7 @@ bool NATCompiler_pf::VerifyRules::processNext() compiler->abort( rule, - _("Original and translated destination should both be networks of the same size.")); + "Original and translated destination should both be networks of the same size."); } return true; @@ -761,7 +761,7 @@ bool NATCompiler_pf::ReplaceFirewallObjectsTSrc::processNext() { char errmsg[1024]; sprintf(errmsg, -_("Could not find suitable interface for the NAT rule %s. Perhaps all interfaces are unnumbered?"), +"Could not find suitable interface for the NAT rule %s. Perhaps all interfaces are unnumbered?", rule->getLabel().c_str() ); compiler->abort(rule, errmsg); } @@ -811,7 +811,7 @@ bool NATCompiler_pf::ReplaceObjectsTDst::processNext() if (loopback_address==NULL) { char errstr[1024]; - sprintf(errstr, _("Can not configure redirection NAT rule %s because loopback interface is missing.") , + sprintf(errstr, "Can not configure redirection NAT rule %s because loopback interface is missing." , rule->getLabel().c_str() ); compiler->abort(rule, errstr); } @@ -992,7 +992,7 @@ void NATCompiler_pf::checkForDynamicInterfacesOfOtherObjects::findDynamicInterfa { char errstr[2048]; sprintf(errstr, - _("Can not build rule using dynamic interface '%s' of the object '%s' because its address in unknown."), + "Can not build rule using dynamic interface '%s' of the object '%s' because its address in unknown.", ifs->getName().c_str(), ifs->getParent()->getName().c_str()); diff --git a/src/pflib/OSConfigurator_bsd.cpp b/src/pflib/OSConfigurator_bsd.cpp index 61ce93c3b..91c383732 100644 --- a/src/pflib/OSConfigurator_bsd.cpp +++ b/src/pflib/OSConfigurator_bsd.cpp @@ -78,7 +78,7 @@ void OSConfigurator_bsd::addVirtualAddressForNAT(const Address *addr) virtual_addresses.push_back(*(addr->getAddressPtr())); } else - warning(_("Can not add virtual address ") + + warning("Can not add virtual address " + addr->getAddressPtr()->toString() ); } } diff --git a/src/pflib/OSConfigurator_freebsd.cpp b/src/pflib/OSConfigurator_freebsd.cpp index 0d1d2bf82..556bf7219 100644 --- a/src/pflib/OSConfigurator_freebsd.cpp +++ b/src/pflib/OSConfigurator_freebsd.cpp @@ -66,7 +66,7 @@ void OSConfigurator_freebsd::processFirewallOptions() s=options->getStr("freebsd_ip_sourceroute"); if (!s.empty()) { if (s!="0" && s!="1") - throw FWException(_("Illegal value for OS parameter freebsd_ip_sourceroute: '")+s+"'"); + throw FWException("Illegal value for OS parameter freebsd_ip_sourceroute: '"+s+"'"); output << "$SYSCTL -w net.inet.ip.sourceroute=" << s << endl; } @@ -74,7 +74,7 @@ void OSConfigurator_freebsd::processFirewallOptions() s=options->getStr("freebsd_ip_redirect"); if (!s.empty()) { if (s!="0" && s!="1") - throw FWException(_("Illegal value for OS parameter freebsd_ip_redirect: '")+s+"'"); + throw FWException("Illegal value for OS parameter freebsd_ip_redirect: '"+s+"'"); output << "$SYSCTL -w net.inet.ip.redirect=" << s << endl; } diff --git a/src/pflib/OSConfigurator_macosx.cpp b/src/pflib/OSConfigurator_macosx.cpp index 24f983383..8a7474da0 100644 --- a/src/pflib/OSConfigurator_macosx.cpp +++ b/src/pflib/OSConfigurator_macosx.cpp @@ -58,7 +58,7 @@ void OSConfigurator_macosx::processFirewallOptions() s=options->getStr("macosx_ip_sourceroute"); if (!s.empty()) { if (s!="0" && s!="1") - throw FWException(_("Illegal value for OS parameter macosx_ip_sourceroute: '")+s+"'"); + throw FWException("Illegal value for OS parameter macosx_ip_sourceroute: '"+s+"'"); output << "$SYSCTL -w net.inet.ip.sourceroute=" << s << endl; } @@ -66,7 +66,7 @@ void OSConfigurator_macosx::processFirewallOptions() s=options->getStr("macosx_ip_redirect"); if (!s.empty()) { if (s!="0" && s!="1") - throw FWException(_("Illegal value for OS parameter macosx_ip_redirect: '")+s+"'"); + throw FWException("Illegal value for OS parameter macosx_ip_redirect: '"+s+"'"); output << "$SYSCTL -w net.inet.ip.redirect=" << s << endl; } diff --git a/src/pflib/OSConfigurator_openbsd.cpp b/src/pflib/OSConfigurator_openbsd.cpp index b4e057391..cefe5df6f 100644 --- a/src/pflib/OSConfigurator_openbsd.cpp +++ b/src/pflib/OSConfigurator_openbsd.cpp @@ -52,7 +52,7 @@ void OSConfigurator_openbsd::processFirewallOptions() s=options->getStr("openbsd_ip_directed_broadcast"); if (!s.empty()) { if (s!="0" && s!="1") - throw FWException(_("Illegal value for OS parameter openbsd_ip_directed_broadcast: '")+s+"'"); + throw FWException("Illegal value for OS parameter openbsd_ip_directed_broadcast: '"+s+"'"); output << "$SYSCTL -w net.inet.ip.directed-broadcast=" << s << endl; } @@ -76,7 +76,7 @@ void OSConfigurator_openbsd::processFirewallOptions() s=options->getStr("openbsd_ip_sourceroute"); if (!s.empty()) { if (s!="0" && s!="1") - throw FWException(_("Illegal value for OS parameter openbsd_ip_sourceroute: '")+s+"'"); + throw FWException("Illegal value for OS parameter openbsd_ip_sourceroute: '"+s+"'"); output << "$SYSCTL -w net.inet.ip.sourceroute=" << s << endl; } @@ -84,7 +84,7 @@ void OSConfigurator_openbsd::processFirewallOptions() s=options->getStr("openbsd_ip_redirect"); if (!s.empty()) { if (s!="0" && s!="1") - throw FWException(_("Illegal value for OS parameter openbsd_ip_redirect: '")+s+"'"); + throw FWException("Illegal value for OS parameter openbsd_ip_redirect: '"+s+"'"); output << "$SYSCTL -w net.inet.ip.redirect=" << s << endl; } diff --git a/src/pflib/OSConfigurator_solaris.cpp b/src/pflib/OSConfigurator_solaris.cpp index 861ea17a4..441906c4e 100644 --- a/src/pflib/OSConfigurator_solaris.cpp +++ b/src/pflib/OSConfigurator_solaris.cpp @@ -58,7 +58,7 @@ void OSConfigurator_solaris::processFirewallOptions() s=options->getStr("solaris_ip_ignore_redirect"); if (!s.empty()) { if (s!="0" && s!="1") - throw FWException(_("Illegal value for OS parameter solaris_ip_ignore_redirect: '")+s+"'"); + throw FWException("Illegal value for OS parameter solaris_ip_ignore_redirect: '"+s+"'"); output << "ndd -set /dev/ip ip_ignore_redirect " << s << endl; } @@ -66,7 +66,7 @@ void OSConfigurator_solaris::processFirewallOptions() s=options->getStr("solaris_ip_respond_to_echo_broadcast"); if (!s.empty()) { if (s!="0" && s!="1") - throw FWException(_("Illegal value for OS parameter solaris_ip_respond_to_echo_broadcast: '")+s+"'"); + throw FWException("Illegal value for OS parameter solaris_ip_respond_to_echo_broadcast: '"+s+"'"); output << "ndd -set /dev/ip ip_respond_to_echo_broadcast " << s << endl; } @@ -74,7 +74,7 @@ void OSConfigurator_solaris::processFirewallOptions() s=options->getStr("solaris_ip_forward_directed_broadcasts"); if (!s.empty()) { if (s!="0" && s!="1") - throw FWException(_("Illegal value for OS parameter solaris_ip_forward_directed_broadcasts: '")+s+"'"); + throw FWException("Illegal value for OS parameter solaris_ip_forward_directed_broadcasts: '"+s+"'"); output << "ndd -set /dev/ip ip_forward_directed_broadcasts " << s << endl; } @@ -82,7 +82,7 @@ void OSConfigurator_solaris::processFirewallOptions() s=options->getStr("solaris_ip_forward_src_routed"); if (!s.empty()) { if (s!="0" && s!="1") - throw FWException(_("Illegal value for OS parameter solaris_ip_forward_src_routed: '")+s+"'"); + throw FWException("Illegal value for OS parameter solaris_ip_forward_src_routed: '"+s+"'"); output << "ndd -set /dev/ip ip_forward_src_routed " << s << endl; } @@ -113,7 +113,7 @@ void OSConfigurator_solaris::addVirtualAddressForNAT(const Address *addr) virtual_addresses.push_back(*(addr->getAddressPtr())); } else - warning(_("Can not add virtual address ") + + warning("Can not add virtual address " + addr->getAddressPtr()->toString() ); } } diff --git a/src/pflib/PolicyCompiler_ipf.cpp b/src/pflib/PolicyCompiler_ipf.cpp index 773acc3dc..f83f60d43 100644 --- a/src/pflib/PolicyCompiler_ipf.cpp +++ b/src/pflib/PolicyCompiler_ipf.cpp @@ -203,7 +203,7 @@ bool PolicyCompiler_ipf::doSrvNegation::processNext() RuleElementSrv *srv=rule->getSrv(); if (srv->getNeg()) { - throw FWException(_("Negation in Srv is not implemented. Rule: ")+rule->getLabel()); + throw FWException("Negation in Srv is not implemented. Rule: "+rule->getLabel()); return false; } tmp_queue.push_back(rule); diff --git a/src/pflib/PolicyCompiler_ipfw.cpp b/src/pflib/PolicyCompiler_ipfw.cpp index 91b43554c..ec1a4df96 100644 --- a/src/pflib/PolicyCompiler_ipfw.cpp +++ b/src/pflib/PolicyCompiler_ipfw.cpp @@ -235,7 +235,7 @@ bool PolicyCompiler_ipfw::doSrvNegation::processNext() RuleElementSrv *srv=rule->getSrv(); if (srv->getNeg()) { - throw FWException(_("Negation in Srv is not implemented. Rule: ")+rule->getLabel()); + throw FWException("Negation in Srv is not implemented. Rule: "+rule->getLabel()); return false; } tmp_queue.push_back(rule); diff --git a/src/pflib/PolicyCompiler_pf.cpp b/src/pflib/PolicyCompiler_pf.cpp index 729bd390e..8d06ecac1 100644 --- a/src/pflib/PolicyCompiler_pf.cpp +++ b/src/pflib/PolicyCompiler_pf.cpp @@ -59,7 +59,7 @@ string PolicyCompiler_pf::myPlatformName() { return "pf"; } int PolicyCompiler_pf::prolog() { if (fw->getStr("platform")!=myPlatformName() ) - abort(_("Unsupported platform ") + fw->getStr("platform") ); + abort("Unsupported platform " + fw->getStr("platform") ); list l2=fw->getByType(Interface::TYPENAME); for (list::iterator i=l2.begin(); i!=l2.end(); ++i) @@ -74,7 +74,7 @@ int PolicyCompiler_pf::prolog() { char errstr[256]; sprintf(errstr, - _("Dynamic interface %s should not have an IP address object attached to it. This IP address object will be ignored."), + "Dynamic interface %s should not have an IP address object attached to it. This IP address object will be ignored.", iface->getName().c_str() ); warning(errstr ); for (list::iterator j=l3.begin(); j!=l3.end(); ++j) @@ -263,7 +263,7 @@ bool PolicyCompiler_pf::splitIfFirewallInSrc::processNext() FWObject *obj = NULL; // if (FWReference::cast(o)!=NULL) obj=FWReference::cast(o)->getPointer(); if (FWReference::cast(o)!=NULL) obj=FWReference::cast(o)->getPointer(); - if (obj==NULL) throw FWException(_("Broken Src object in rule: ")+rule->getLabel()); + if (obj==NULL) throw FWException("Broken Src object in rule: "+rule->getLabel()); if (obj->getId()==compiler->getFwId()) { fw_in_src=o; // can not remove right now because remove invalidates iterator @@ -308,7 +308,7 @@ bool PolicyCompiler_pf::splitIfFirewallInDst::processNext() FWObject *obj = NULL; // if (FWReference::cast(o)!=NULL) obj=FWReference::cast(o)->getPointer(); if (FWReference::cast(o)!=NULL) obj=FWReference::cast(o)->getPointer(); - if (obj==NULL) throw FWException(_("Broken Dst in rule: ")+rule->getLabel()); + if (obj==NULL) throw FWException("Broken Dst in rule: "+rule->getLabel()); if (obj->getId()==compiler->getFwId()) { fw_in_dst=o; // can not remove right now because remove invalidates iterator @@ -440,7 +440,7 @@ void PolicyCompiler_pf::addDefaultPolicyRule() { char errstr[256]; sprintf(errstr, - _("Invalid address for the backup ssh access: '%s'"), + "Invalid address for the backup ssh access: '%s'", mgmt_addr.c_str()); abort(errstr); } @@ -562,7 +562,7 @@ bool PolicyCompiler_pf::ProcessScrubOption::processNext() ruleopt->setBool("scrub",false); tmp_queue.push_back(rule); - throw FWException(_("Rule option 'scrub' is supported only for rules with action 'Accept'. Rule: ")+rule->getLabel()); + throw FWException("Rule option 'scrub' is supported only for rules with action 'Accept'. Rule: "+rule->getLabel()); return true; } @@ -701,7 +701,7 @@ bool PolicyCompiler_pf::doSrvNegation::processNext() RuleElementSrv *srv=rule->getSrv(); if (srv->getNeg()) { - throw FWException(_("Negation in Srv is not implemented. Rule: ")+rule->getLabel()); + throw FWException("Negation in Srv is not implemented. Rule: "+rule->getLabel()); return true; } tmp_queue.push_back(rule); @@ -790,7 +790,7 @@ void PolicyCompiler_pf::checkForDynamicInterfacesOfOtherObjects::findDynamicInte ! ifs->getParent()->getBool("pf_table") ) { char errstr[2048]; - sprintf(errstr,_("Can not build rule using dynamic interface '%s' of the object '%s' because its address in unknown. Rule %s"), + sprintf(errstr,"Can not build rule using dynamic interface '%s' of the object '%s' because its address in unknown. Rule %s", ifs->getName().c_str(), ifs->getParent()->getName().c_str(), rule->getLabel().c_str() );