Ejemplo n.º 1
0
tstring Ui::msg(string key)
{
    if(messages.count(key))
        return messages[key].empty() ? tocurenc(key) : messages[key];
    else
        return tocurenc(key);
}
Ejemplo n.º 2
0
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;
}