tstring Ui::msg(string key) { if(messages.count(key)) return messages[key].empty() ? tocurenc(key) : messages[key]; else return tocurenc(key); }
tstring Downloader::msg(string key) { tstring res; if(ui) res = ui->msg(key); else return tocurenc(key); int errcode = _ttoi(res.c_str()); if(errcode > 0) return tstrprintf(msg("HTTP error %d"), errcode); return res; }