# # # patch "ChangeLog" # from [542f13abe668f42e6dfd6575991b7228e69a3b82] # to [25afb31b84b8e88cfac359e535c2fd472639a133] # # patch "ui.cc" # from [598c63106fd791bd380d6059f0590053dc0658cf] # to [0a12afee5f6761be5a6bbc873763c9d7a7929bf4] # # patch "ui.hh" # from [54e338a229263f639a30d54e6695bcb1d99b7d6a] # to [3513a0d7b22db094276be4f903876150906caa3d] # ============================================================ --- ChangeLog 542f13abe668f42e6dfd6575991b7228e69a3b82 +++ ChangeLog 25afb31b84b8e88cfac359e535c2fd472639a133 @@ -1,5 +1,10 @@ 2006-04-07 Benoît Dejean + * ui.{cc,hh}: Use untranslated ticker name as key in ui.tickers + to prevent buggy translations from crashing monotone. + +2006-04-07 Benoît Dejean + * po/fr.po: Fixed. 2006-04-07 Benoît Dejean ============================================================ --- ui.cc 598c63106fd791bd380d6059f0590053dc0658cf +++ ui.cc 0a12afee5f6761be5a6bbc873763c9d7a7929bf4 @@ -32,28 +32,29 @@ total(0), kilocount(kilocount), use_total(false), - name(tickname), + keyname(tickname), + name(_(tickname.c_str())), shortname(s) { - I(ui.tickers.find(tickname) == ui.tickers.end()); - ui.tickers.insert(make_pair(tickname,this)); + I(ui.tickers.find(keyname) == ui.tickers.end()); + ui.tickers.insert(make_pair(keyname, this)); } ticker::~ticker() { - I(ui.tickers.find(name) != ui.tickers.end()); + I(ui.tickers.find(keyname) != ui.tickers.end()); if (ui.some_tick_is_dirty) { ui.write_ticks(); } - ui.tickers.erase(name); + ui.tickers.erase(keyname); ui.finish_ticking(); } void ticker::operator++() { - I(ui.tickers.find(name) != ui.tickers.end()); + I(ui.tickers.find(keyname) != ui.tickers.end()); ticks++; ui.some_tick_is_dirty = true; if (ticks % mod == 0) @@ -63,7 +64,7 @@ void ticker::operator+=(size_t t) { - I(ui.tickers.find(name) != ui.tickers.end()); + I(ui.tickers.find(keyname) != ui.tickers.end()); size_t old = ticks; ticks += t; ============================================================ --- ui.hh 54e338a229263f639a30d54e6695bcb1d99b7d6a +++ ui.hh 3513a0d7b22db094276be4f903876150906caa3d @@ -26,7 +26,8 @@ size_t total; bool kilocount; bool use_total; - std::string name; + std::string keyname; + std::string name; // translated name std::string shortname; ticker(std::string const & n, std::string const & s, size_t mod = 64, bool kilocount=false);