[PATCH] OSD localization third try
patch updated... subject to comments again :-) PaulTT PS: if noone complains, because i already did the changes pointed out to me, i'll commit this tonite, ok?
On Fri, 4 Nov 2005 12:04:43 +0100 Paul TT <paultt@hackerjournal.it> wrote:
patch updated...
subject to comments again :-)
PaulTT
PS: if noone complains, because i already did the changes pointed out to me, i'll commit this tonite, ok?
applied
On Sat, Nov 05, 2005 at 11:54:26AM +0100, Paul TT wrote:
applied
Please add a note about this to the changelog file. Diego
Paul TT wrote:
patch updated...
subject to comments again :-) [...] #ifdef USE_DVDREAD if (vo_spudec && (demuxer->type != DEMUXER_TYPE_MATROSKA)) { if (dvdsub_id >= 0) { - char lang[5] = "none"; + char lang[5] = MSGTR_OSDnone; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ int code = 0; code = dvd_lang_from_sid(stream, dvdsub_id); if (code) { @@ -4155,17 +4155,17 @@ lang[1] = code; lang[2] = 0; } - snprintf(osd_text_tmp, 63, "Subtitles: (%d) %s", dvdsub_id, lang); + snprintf(osd_text_tmp, 63, MSGTR_OSDSubtitlesLanguage, dvdsub_id, lang); } } #endif
This is broken. What if the translation of 'none' is longer than 4 chars? Same for at least MSGTR_OSDunknown:
#ifdef HAVE_MATROSKA if (demuxer->type == DEMUXER_TYPE_MATROSKA) { - char lang[10] = "unknown"; + char lang[10] = MSGTR_OSDunknown; if (dvdsub_id >= 0) { demux_mkv_get_sub_lang(demuxer, dvdsub_id, lang, 9); lang[9] = 0; - snprintf(osd_text_tmp, 63, "Subtitles: (%d) %s", dvdsub_id, lang); + snprintf(osd_text_tmp, 63, MSGTR_OSDSubtitlesLanguage, dvdsub_id, lang); } } #endif
-- Tobias PGP: http://9ac7e0bc.uguu.de
Paul TT wrote:
patch updated...
subject to comments again :-)
With --encoding=utf-8 I get garbage for non-ascii characters on the OSD (looks like MPlayer's treating the string as iso-8859-1 anyway). Probably there needs to be some charset dependend iconv conversion in the OSD code. BTW __sub_osd_names[] in libvo/sub.c is probably also translatable. *looking at libvo/sub.c* Hmm, vo_update_text_osd() basically does "while (*(s++)) render_one_glyph(*s);", which is of course borken for multibyte-encodings like utf-8. -- Tobias PGP: http://9ac7e0bc.uguu.de
On Sat, 5 Nov 2005 19:14:15 +0100 Tobias Diedrich <ranma@tdiedrich.de> wrote:
Paul TT wrote:
patch updated...
subject to comments again :-)
With --encoding=utf-8 I get garbage for non-ascii characters on the OSD (looks like MPlayer's treating the string as iso-8859-1 anyway). Probably there needs to be some charset dependend iconv conversion in the OSD code.
i'm looking at it...
BTW __sub_osd_names[] in libvo/sub.c is probably also translatable.
done
*looking at libvo/sub.c*
Hmm, vo_update_text_osd() basically does "while (*(s++)) render_one_glyph(*s);", which is of course borken for multibyte-encodings like utf-8.
looking...
Paul TT wrote:
With --encoding=utf-8 I get garbage for non-ascii characters on the OSD (looks like MPlayer's treating the string as iso-8859-1 anyway). Probably there needs to be some charset dependend iconv conversion in the OSD code.
i'm looking at it...
Well, semidirty fix attached. -- Tobias PGP: http://9ac7e0bc.uguu.de
On Sun, Nov 06, 2005 at 03:40:01PM +0100, Tobias Diedrich wrote:
Paul TT wrote:
With --encoding=utf-8 I get garbage for non-ascii characters on the OSD (looks like MPlayer's treating the string as iso-8859-1 anyway). Probably there needs to be some charset dependend iconv conversion in the OSD code.
i'm looking at it...
Well, semidirty fix attached.
+_def_mp_help_is_utf8="#define MP_HELP_IS_UTF8 0" + _def_mp_help_is_utf8="#define MP_HELP_IS_UTF8 1" +$_def_mp_help_is_utf8
I'd prefer if you could call this MP_HELP_MULTIBYTE or similar. Otherwise the configure part looks OK. Diego
Diego Biurrun wrote:
On Sun, Nov 06, 2005 at 03:40:01PM +0100, Tobias Diedrich wrote:
Paul TT wrote:
With --encoding=utf-8 I get garbage for non-ascii characters on the OSD (looks like MPlayer's treating the string as iso-8859-1 anyway). Probably there needs to be some charset dependend iconv conversion in the OSD code.
i'm looking at it...
Well, semidirty fix attached.
+_def_mp_help_is_utf8="#define MP_HELP_IS_UTF8 0" + _def_mp_help_is_utf8="#define MP_HELP_IS_UTF8 1" +$_def_mp_help_is_utf8
I'd prefer if you could call this MP_HELP_MULTIBYTE or similar. Otherwise the configure part looks OK.
Well, the code enabled by this only deals with UTF8, other multibyte encodings are entirely different beasts. I'll rewrite it to use iconv when I find the time (Maybe Wednesday). -- Tobias PGP: http://9ac7e0bc.uguu.de
On Mon, 7 Nov 2005 19:40:41 +0100 Tobias Diedrich <ranma@tdiedrich.de> wrote:
Diego Biurrun wrote:
On Sun, Nov 06, 2005 at 03:40:01PM +0100, Tobias Diedrich wrote:
Paul TT wrote:
With --encoding=utf-8 I get garbage for non-ascii characters on the OSD (looks like MPlayer's treating the string as iso-8859-1 anyway). Probably there needs to be some charset dependend iconv conversion in the OSD code.
i'm looking at it...
Well, semidirty fix attached.
+_def_mp_help_is_utf8="#define MP_HELP_IS_UTF8 0" + _def_mp_help_is_utf8="#define MP_HELP_IS_UTF8 1" +$_def_mp_help_is_utf8
I'd prefer if you could call this MP_HELP_MULTIBYTE or similar. Otherwise the configure part looks OK.
Well, the code enabled by this only deals with UTF8, other multibyte encodings are entirely different beasts. I'll rewrite it to use iconv when I find the time (Maybe Wednesday).
good, i'll let you the iconv task, since i don't really know well how it works.... 10x
Hi, On Mon, Nov 07, 2005 at 07:40:41PM +0100, Tobias Diedrich wrote:
Well, the code enabled by this only deals with UTF8, other multibyte encodings are entirely different beasts. I'll rewrite it to use iconv when I find the time (Maybe Wednesday).
Keep in mind that e.g. MinGW does not have iconv, so IMHO avoid it if at all possible, Greetings, Reimar Döffinger
On Monday 07 November 2005 23:43, Reimar Döffinger wrote:
Keep in mind that e.g. MinGW does not have iconv, so IMHO avoid it if at all possible,
NetBSD also lacks iconv by default.
On Monday 07 November 2005 23:43, Reimar Döffinger wrote:
Keep in mind that e.g. MinGW does not have iconv, so IMHO avoid it if at all possible,
Er, disregard my last message about NetBSD and iconv. I was thinking of something else.
Reimar Döffinger wrote:
On Mon, Nov 07, 2005 at 07:40:41PM +0100, Tobias Diedrich wrote:
Well, the code enabled by this only deals with UTF8, other multibyte encodings are entirely different beasts. I'll rewrite it to use iconv when I find the time (Maybe Wednesday).
Keep in mind that e.g. MinGW does not have iconv, so IMHO avoid it if at all possible,
Ok, so how about a simple iconv implementation for osdep? See attached patch (Note: I know the configure check is lacking. i.e. IIRC at least on Solaris -liconv is needed). For MinGW maybe it could be extended to use native Windows charset conversion functions. -- Tobias PGP: http://9ac7e0bc.uguu.de
Tobias Diedrich wrote:
Reimar Döffinger wrote:
On Mon, Nov 07, 2005 at 07:40:41PM +0100, Tobias Diedrich wrote:
Well, the code enabled by this only deals with UTF8, other multibyte encodings are entirely different beasts. I'll rewrite it to use iconv when I find the time (Maybe Wednesday).
Keep in mind that e.g. MinGW does not have iconv, so IMHO avoid it if at all possible,
Ok, so how about a simple iconv implementation for osdep? See attached patch (Note: I know the configure check is lacking. i.e. IIRC at least on Solaris -liconv is needed). For MinGW maybe it could be extended to use native Windows charset conversion functions.
Any comments on this patch? -- The Wanderer Warning: Simply because I argue an issue does not mean I agree with any side of it. Secrecy is the beginning of tyranny.
The Wanderer wrote:
Tobias Diedrich wrote:
Reimar Döffinger wrote:
Keep in mind that e.g. MinGW does not have iconv, so IMHO avoid it if at all possible,
Ok, so how about a simple iconv implementation for osdep? See attached patch (Note: I know the configure check is lacking. i.e. IIRC at least on Solaris -liconv is needed). For MinGW maybe it could be extended to use native Windows charset conversion functions.
Any comments on this patch?
If no one requests otherwise (preferably, but not necessarily, by means of providing comment) within the next week, by the end of which this patch will be a month old, I'll consider it rejected. -- The Wanderer needs to get around to integrating the preexisting patch backlog into his own... Warning: Simply because I argue an issue does not mean I agree with any side of it. Secrecy is the beginning of tyranny.
On 12/10/2005 10:50 PM, The Wanderer wrote:
The Wanderer wrote:
Tobias Diedrich wrote:
Ok, so how about a simple iconv implementation for osdep? See attached patch (Note: I know the configure check is lacking. i.e. IIRC at least on Solaris -liconv is needed). For MinGW maybe it could be extended to use native Windows charset conversion functions.
Any comments on this patch?
If no one requests otherwise (preferably, but not necessarily, by means of providing comment) within the next week, by the end of which this patch will be a month old, I'll consider it rejected.
Having inadvertently given it three weeks instead, and seen no such request: patch dropped. -- The Wanderer Warning: Simply because I argue an issue does not mean I agree with any side of it. Secrecy is the beginning of tyranny.
On Monday, 02 January 2006 at 23:45, The Wanderer wrote:
On 12/10/2005 10:50 PM, The Wanderer wrote:
The Wanderer wrote:
Tobias Diedrich wrote:
Ok, so how about a simple iconv implementation for osdep? See attached patch (Note: I know the configure check is lacking. i.e. IIRC at least on Solaris -liconv is needed). For MinGW maybe it could be extended to use native Windows charset conversion functions.
Any comments on this patch?
If no one requests otherwise (preferably, but not necessarily, by means of providing comment) within the next week, by the end of which this patch will be a month old, I'll consider it rejected.
Having inadvertently given it three weeks instead, and seen no such request: patch dropped.
Too bad. The patch looked interesting. R. -- MPlayer RPMs maintainer: http://rpm.greysector.net/mplayer/ "I am Grey. I stand between the candle and the star. We are Grey. We stand between the darkness ... and the light." -- Delenn in Grey Council in Babylon 5:"Babylon Squared"
On 01/02/2006 07:39 PM, Dominik 'Rathann' Mierzejewski wrote:
On Monday, 02 January 2006 at 23:45, The Wanderer wrote:
On 12/10/2005 10:50 PM, The Wanderer wrote:
If no one requests otherwise (preferably, but not necessarily, by means of providing comment) within the next week, by the end of which this patch will be a month old, I'll consider it rejected.
Having inadvertently given it three weeks instead, and seen no such request: patch dropped.
Too bad. The patch looked interesting.
To my limited degree of comprehension, I agree - but I'm not competent to evaluate it, I'm reluctant to commit things which have not been evaluated, and no one else has stepped in in a month and a half. After a certain point, I have to either commit a patch on my own recognizance or conclude that no one thinks it's worth paying attention to; if people think that the wait should be longer, and/or that there should be more reminder pings, I can adjust things somewhat, but I also don't want to harass people excessively over any given patch. -- The Wanderer Warning: Simply because I argue an issue does not mean I agree with any side of it. Secrecy is the beginning of tyranny.
On Tuesday, 03 January 2006 at 01:57, The Wanderer wrote:
On 01/02/2006 07:39 PM, Dominik 'Rathann' Mierzejewski wrote:
On Monday, 02 January 2006 at 23:45, The Wanderer wrote:
On 12/10/2005 10:50 PM, The Wanderer wrote:
If no one requests otherwise (preferably, but not necessarily, by means of providing comment) within the next week, by the end of which this patch will be a month old, I'll consider it rejected.
Having inadvertently given it three weeks instead, and seen no such request: patch dropped.
Too bad. The patch looked interesting.
To my limited degree of comprehension, I agree - but I'm not competent to evaluate it, I'm reluctant to commit things which have not been evaluated, and no one else has stepped in in a month and a half. After a certain point, I have to either commit a patch on my own recognizance or conclude that no one thinks it's worth paying attention to; if people think that the wait should be longer, and/or that there should be more reminder pings, I can adjust things somewhat, but I also don't want to harass people excessively over any given patch.
Well, in this case I think it's worthwile to - as you say - harass people over the patch a bit longer. Over both patches, actually (OSD and iconv). Regards, R. -- MPlayer RPMs maintainer: http://rpm.greysector.net/mplayer/ "I am Grey. I stand between the candle and the star. We are Grey. We stand between the darkness ... and the light." -- Delenn in Grey Council in Babylon 5:"Babylon Squared"
Dominik 'Rathann' Mierzejewski wrote:
On Tuesday, 03 January 2006 at 01:57, The Wanderer wrote:
On 01/02/2006 07:39 PM, Dominik 'Rathann' Mierzejewski wrote:
Too bad. The patch looked interesting.
To my limited degree of comprehension, I agree - but I'm not competent to evaluate it, I'm reluctant to commit things which have not been evaluated, and no one else has stepped in in a month and a half. After a certain point, I have to either commit a patch on my own recognizance or conclude that no one thinks it's worth paying attention to; if people think that the wait should be longer, and/or that there should be more reminder pings, I can adjust things somewhat, but I also don't want to harass people excessively over any given patch.
Well, in this case I think it's worthwile to - as you say - harass people over the patch a bit longer. Over both patches, actually (OSD and iconv).
In line with that: Still no comments on either of these? (Thanks for mentioning that there *were* two different patches involved; I'd managed to lose the older one somehow.) -- The Wanderer Warning: Simply because I argue an issue does not mean I agree with any side of it. Secrecy is the beginning of tyranny.
On Wednesday, 16 November 2005 at 21:12, Tobias Diedrich wrote:
Reimar Döffinger wrote:
On Mon, Nov 07, 2005 at 07:40:41PM +0100, Tobias Diedrich wrote:
Well, the code enabled by this only deals with UTF8, other multibyte encodings are entirely different beasts. I'll rewrite it to use iconv when I find the time (Maybe Wednesday).
Keep in mind that e.g. MinGW does not have iconv, so IMHO avoid it if at all possible,
Ok, so how about a simple iconv implementation for osdep? See attached patch (Note: I know the configure check is lacking. i.e. IIRC at least on Solaris -liconv is needed).
Exactly. If you could fix it... And please remove debugging code as well (especially main(), even if it is #ifdef'd). Regards, R. -- MPlayer RPMs maintainer: http://rpm.greysector.net/mplayer/ "I am Grey. I stand between the candle and the star. We are Grey. We stand between the darkness ... and the light." -- Delenn in Grey Council in Babylon 5:"Babylon Squared"
Hi, On Sun, Nov 06, 2005 at 03:40:01PM +0100, Tobias Diedrich wrote:
Paul TT wrote:
With --encoding=utf-8 I get garbage for non-ascii characters on the OSD (looks like MPlayer's treating the string as iso-8859-1 anyway). Probably there needs to be some charset dependend iconv conversion in the OSD code.
i'm looking at it...
Well, semidirty fix attached.
I applied my version. OSD won't work when an encoding different that UTF-8 is used, but I honestly don't care much, IMHO we should make UTF8 default for everything really soon. Greetings, Reimar Döffinger
participants (7)
-
Diego Biurrun -
Dominik 'Rathann' Mierzejewski -
Jan Knutar -
Paul TT -
Reimar Döffinger -
The Wanderer -
Tobias Diedrich