diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-01-12 12:16:00 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-01-12 12:16:00 +0200 |
commit | ee98209ab84a338525e0dde9f62633bcf0b08078 (patch) | |
tree | ceea258c1cd6114278dbece609adf560d277dc86 /command.c | |
parent | 23e693d6d2e6d0da74b40ccb8a9f438a9dd846c2 (diff) | |
download | mpv-ee98209ab84a338525e0dde9f62633bcf0b08078.tar.bz2 mpv-ee98209ab84a338525e0dde9f62633bcf0b08078.tar.xz |
translations: add infrastructure for translated OSD messages
Add function set_osd_tmsg() which is a version of set_osd_msg that
translates its format argument. Pass OSD message strings in the
command.c property_osd_display table through mp_gtext before they're
used.
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -2297,12 +2297,12 @@ static int show_property_osd(MPContext *mpctx, const char *pname) else if (p->osd_progbar) { if (prop->type == CONF_TYPE_INT) { if (mp_property_do(pname, M_PROPERTY_GET, &r, mpctx) > 0) - set_osd_bar(mpctx, p->osd_progbar, p->osd_msg, + set_osd_bar(mpctx, p->osd_progbar, mp_gtext(p->osd_msg), prop->min, prop->max, r); } else if (prop->type == CONF_TYPE_FLOAT) { float f; if (mp_property_do(pname, M_PROPERTY_GET, &f, mpctx) > 0) - set_osd_bar(mpctx, p->osd_progbar, p->osd_msg, + set_osd_bar(mpctx, p->osd_progbar, mp_gtext(p->osd_msg), prop->min, prop->max, f); } else { mp_msg(MSGT_CPLAYER, MSGL_ERR, @@ -2316,8 +2316,8 @@ static int show_property_osd(MPContext *mpctx, const char *pname) char *val = mp_property_print(pname, mpctx); if (val) { int index = p - property_osd_display; - set_osd_msg(p->osd_id >= 0 ? p->osd_id : OSD_MSG_PROPERTY + index, - 1, opts->osd_duration, p->osd_msg, val); + set_osd_tmsg(p->osd_id >= 0 ? p->osd_id : OSD_MSG_PROPERTY + index, + 1, opts->osd_duration, p->osd_msg, val); free(val); } } |