MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / getLocalString

Method getLocalString

src/common/Bundle.cpp:134–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132static std::set<std::string> unmapped;
133
134std::string Bundle::getLocalString(const std::string& key) const {
135 if (key == "") { return key; }
136 BundleStringMap::const_iterator it = mappings.find(key);
137 if (it != mappings.end()) {
138 return it->second;
139 }
140 else {
141 if (BZDB.getDebug()) {
142 if (unmapped.find(key) == unmapped.end()) {
143 unmapped.insert(key);
144 debugf(1, "Unmapped Locale String: %s\n", stripAnsiCodes(key));
145 }
146 }
147 return key;
148 }
149}
150
151std::string Bundle::formatMessage(const std::string& key, const std::vector<std::string> *parms) const {
152 std::string messageIn = getLocalString(key);

Callers 15

notifyBzfKeyMapChangedFunction · 0.80
handleMessageFunction · 0.80
getLabelMethod · 0.80
setAlertMethod · 0.80
setRestartKeyLabelMethod · 0.80
makeHelpStringMethod · 0.80
renderStatusMethod · 0.80
getStringMethod · 0.80
updateTeamTextureMethod · 0.80
localBZDBCallbackMethod · 0.80
renderTeamScoresMethod · 0.80
renderScoreboardMethod · 0.80

Calls 6

debugfFunction · 0.85
stripAnsiCodesFunction · 0.85
getDebugMethod · 0.80
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected