[MPlayer-dev-eng] Re: [PATCH] OSD localization third try

Tobias Diedrich ranma at tdiedrich.de
Sat Nov 5 18:08:48 CET 2005


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




More information about the MPlayer-dev-eng mailing list