Mercurial > mplayer.hg
changeset 21066:6196ba31e97e
MSGTRs for libass
author | kraymer |
---|---|
date | Sun, 19 Nov 2006 22:35:17 +0000 |
parents | 32839ebb8182 |
children | baf2e8bed3d1 |
files | help/help_mp-en.h libass/ass.c libass/ass_bitmap.c libass/ass_cache.c libass/ass_fontconfig.c libass/ass_render.c libass/mputils.h |
diffstat | 7 files changed, 106 insertions(+), 48 deletions(-) [+] |
line wrap: on
line diff
--- a/help/help_mp-en.h Sun Nov 19 22:15:59 2006 +0000 +++ b/help/help_mp-en.h Sun Nov 19 22:35:17 2006 +0000 @@ -1962,3 +1962,61 @@ #define MSGTR_RADIO_DriverV4L "[radio] Using V4Lv1 radio interface.\n" #define MSGTR_RADIO_DriverBSDBT848 "[radio] Using *BSD BT848 radio interface.\n" +// ================================== LIBASS ==================================== + +// ass_bitmap.c +#define MSGTR_LIBASS_FT_Glyph_To_BitmapError "[ass] FT_Glyph_To_Bitmap error %d \n" +#define MSGTR_LIBASS_UnsupportedPixelMode "[ass] Unsupported pixel mode: %d\n" + +// ass.c +#define MSGTR_LIBASS_NoStyleNamedXFoundUsingY "[ass] [%p] Warning: no style named '%s' found, using '%s'\n" +#define MSGTR_LIBASS_BadTimestamp "[ass] bad timestamp\n" +#define MSGTR_LIBASS_BadEncodedDataSize "[ass] bad encoded data size\n" +#define MSGTR_LIBASS_FontLineTooLong "[ass] Font line too long: %d, %s\n" +#define MSGTR_LIBASS_EventFormatHeaderMissing "[ass] Event format header missing\n" +#define MSGTR_LIBASS_ErrorOpeningIconvDescriptor "[ass] error opening iconv descriptor.\n" +#define MSGTR_LIBASS_ErrorRecodingFile "[ass] error recoding file.\n" +#define MSGTR_LIBASS_FopenFailed "[ass] ass_read_file(%s): fopen failed\n" +#define MSGTR_LIBASS_FseekFailed "[ass] ass_read_file(%s): fseek failed\n" +#define MSGTR_LIBASS_RefusingToLoadSubtitlesLargerThan10M "[ass] ass_read_file(%s): Refusing to load subtitles larger than 10M\n" +#define MSGTR_LIBASS_ReadFailed "Read failed, %d: %s\n" +#define MSGTR_LIBASS_AddedSubtitleFileMemory "[ass] Added subtitle file: <memory> (%d styles, %d events)\n" +#define MSGTR_LIBASS_AddedSubtitleFileFname "[ass] Added subtitle file: %s (%d styles, %d events)\n" +#define MSGTR_LIBASS_FailedToCreateDirectory "[ass] Failed to create directory %s\n" +#define MSGTR_LIBASS_NotADirectory "[ass] Not a directory: %s\n" + +// ass_cache.c +#define MSGTR_LIBASS_TooManyFonts "[ass] Too many fonts\n" +#define MSGTR_LIBASS_ErrorOpeningFont "[ass] Error opening font: %s, %d\n" + +// ass_fontconfig.c +#define MSGTR_LIBASS_SelectedFontFamilyIsNotTheRequestedOne "[ass] fontconfig: Selected font family is not the requested one: '%s' != '%s'\n" +#define MSGTR_LIBASS_UsingDefaultFontFamily "[ass] fontconfig_select: Using default font family: (%s, %d, %d) -> %s, %d\n" +#define MSGTR_LIBASS_UsingDefaultFont "[ass] fontconfig_select: Using default font: (%s, %d, %d) -> %s, %d\n" +#define MSGTR_LIBASS_UsingArialFontFamily "[æss] fontconfig_select: Using 'Arial' font family: (%s, %d, %d) -> %s, %d\n" +#define MSGTR_LIBASS_FcInitLoadConfigAndFontsFailed "[ass] FcInitLoadConfigAndFonts failed.\n" +#define MSGTR_LIBASS_UpdatingFontCache "[ass] Updating font cache.\n" +#define MSGTR_LIBASS_BetaVersionsOfFontconfigAreNotSupported "[ass] Beta versions of fontconfig are not supported.\n[ass] Update before reporting any bugs.\n" +#define MSGTR_LIBASS_FcStrSetAddFailed "[ass] FcStrSetAdd failed.\n" +#define MSGTR_LIBASS_FcDirScanFailed "[ass] FcDirScan failed.\n" +#define MSGTR_LIBASS_FcDirSave "[ass] FcDirSave failed.\n" +#define MSGTR_LIBASS_FcConfigAppFontAddDirFailed "[ass] FcConfigAppFontAddDir failed\n" +#define MSGTR_LIBASS_FontconfigDisabledDefaultFontWillBeUsed "[ass] Fontconfig disabled, only default font will be used.\n" + +// ass_render.c +#define MSGTR_LIBASS_NeitherPlayResXNorPlayResYDefined "[ass] Neither PlayResX nor PlayResY defined. Assuming 384x288.\n" +#define MSGTR_LIBASS_PlayResYUndefinedSettingY "[ass] PlayResY undefined, setting %d.\n" +#define MSGTR_LIBASS_PlayResXUndefinedSettingX "[ass] PlayResX undefined, setting %d.\n" +#define MSGTR_LIBASS_FT_Init_FreeTypeFailed "[ass] FT_Init_FreeType failed.\n" +#define MSGTR_LIBASS_Init "[ass] Init\n" +#define MSGTR_LIBASS_InitFailed "[ass] Init failed.\n" +#define MSGTR_LIBASS_BadCommand "[ass] Bad command: %c%c\n" +#define MSGTR_LIBASS_ErrorLoadingGlyph "[ass] Error loading glyph.\n" +#define MSGTR_LIBASS_FT_Glyph_Stroke_Error "[ass] FT_Glyph_Stroke error %d \n" +#define MSGTR_LIBASS_UnknownEffectType_InternalError "[ass] Unknown effect type (internal error)\n" +#define MSGTR_LIBASS_NoStyleFound "[ass] No style found!\n" +#define MSGTR_LIBASS_EmptyEvent "[ass] Empty event!\n" +#define MSGTR_LIBASS_MAX_GLYPHS_Reached "[ass] MAX_GLYPHS reached: event %d, start = %llu, duration = %llu\n Text = %s\n" +#define MSGTR_LIBASS_EventHeightHasChanged "[ass] Warnung! Event height has changed! \n" +#define MSGTR_LIBASS_TooManySimultaneousEvents "[ass] Too many simultaneous events!\n" +
--- a/libass/ass.c Sun Nov 19 22:15:59 2006 +0000 +++ b/libass/ass.c Sun Nov 19 22:35:17 2006 +0000 @@ -167,7 +167,7 @@ return i; } i = track->default_style; - mp_msg(MSGT_ASS, MSGL_WARN, "[%p] Warning: no style named '%s' found, using '%s'\n", track, name, track->styles[i].Name); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_NoStyleNamedXFoundUsingY, track, name, track->styles[i].Name); return i; // use the first style } @@ -182,7 +182,7 @@ long long tm; int res = sscanf(p, "%1d:%2d:%2d.%2d", &h, &m, &s, &ms); if (res < 4) { - mp_msg(MSGT_ASS, MSGL_WARN, "bad timestamp\n"); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_BadTimestamp); return 0; } tm = ((h * 60 + m) * 60 + s) * 1000 + ms * 10; @@ -553,7 +553,7 @@ mp_msg(MSGT_ASS, MSGL_V, "font: %d bytes encoded data \n", track->parser_priv->fontdata_used); size = track->parser_priv->fontdata_used; if (size % 4 == 1) { - mp_msg(MSGT_ASS, MSGL_ERR, "bad encoded data size\n"); + mp_msg(MSGT_ASS, MSGL_ERR, MSGTR_LIBASS_BadEncodedDataSize); goto error_decode_font; } buf = malloc(size / 4 * 3 + 2); @@ -607,7 +607,7 @@ len = strlen(str); if (len > 80) { - mp_msg(MSGT_ASS, MSGL_WARN, "Font line too long: %d, %s\n", len, str); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FontLineTooLong, len, str); return 0; } if (track->parser_priv->fontdata_used + len > track->parser_priv->fontdata_size) { @@ -747,7 +747,7 @@ ass_event_t* event; if (!track->event_format) { - mp_msg(MSGT_ASS, MSGL_WARN, "Event format header missing\n"); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_EventFormatHeaderMissing); return; } @@ -811,7 +811,7 @@ if ((icdsc = iconv_open (tocp, cp_tmp)) != (iconv_t)(-1)){ mp_msg(MSGT_ASS,MSGL_V,"LIBSUB: opened iconv descriptor.\n"); } else - mp_msg(MSGT_ASS,MSGL_ERR,"LIBSUB: error opening iconv descriptor.\n"); + mp_msg(MSGT_ASS,MSGL_ERR,MSGTR_LIBASS_ErrorOpeningIconvDescriptor); #ifdef HAVE_ENCA if (cp_tmp) free(cp_tmp); #endif @@ -839,7 +839,7 @@ osize += size; oleft += size; } else { - mp_msg(MSGT_ASS, MSGL_WARN, "LIBSUB: error recoding file.\n"); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_ErrorRecodingFile); return NULL; } } @@ -872,12 +872,12 @@ FILE* fp = fopen(fname, "rb"); if (!fp) { - mp_msg(MSGT_ASS, MSGL_WARN, "ass_read_file(%s): fopen failed\n", fname); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FopenFailed, fname); return 0; } res = fseek(fp, 0, SEEK_END); if (res == -1) { - mp_msg(MSGT_ASS, MSGL_WARN, "ass_read_file(%s): fseek failed\n", fname); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FseekFailed, fname); fclose(fp); return 0; } @@ -886,7 +886,7 @@ rewind(fp); if (sz > 10*1024*1024) { - mp_msg(MSGT_ASS, MSGL_INFO, "ass_read_file(%s): Refusing to load subtitles larger than 10M\n", fname); + mp_msg(MSGT_ASS, MSGL_INFO, MSGTR_LIBASS_RefusingToLoadSubtitlesLargerThan10M, fname); fclose(fp); return 0; } @@ -899,7 +899,7 @@ do { res = fread(buf + bytes_read, 1, sz - bytes_read, fp); if (res <= 0) { - mp_msg(MSGT_ASS, MSGL_INFO, "Read failed, %d: %s\n", errno, strerror(errno)); + mp_msg(MSGT_ASS, MSGL_INFO, MSGTR_LIBASS_ReadFailed, errno, strerror(errno)); fclose(fp); free(buf); return 0; @@ -975,7 +975,7 @@ if (!track) return 0; - mp_msg(MSGT_ASS, MSGL_INFO, "LIBASS: added subtitle file: <memory> (%d styles, %d events)\n", track->n_styles, track->n_events); + mp_msg(MSGT_ASS, MSGL_INFO, MSGTR_LIBASS_AddedSubtitleFileMemory, track->n_styles, track->n_events); return track; } @@ -1011,7 +1011,7 @@ track->name = strdup(fname); - mp_msg(MSGT_ASS, MSGL_INFO, "LIBASS: added subtitle file: %s (%d styles, %d events)\n", fname, track->n_styles, track->n_events); + mp_msg(MSGT_ASS, MSGL_INFO, MSGTR_LIBASS_AddedSubtitleFileFname, fname, track->n_styles, track->n_events); // dump_events(forced_tid); return track; @@ -1110,10 +1110,10 @@ res = mkdir(fonts_dir); #endif if (res) { - mp_msg(MSGT_ASS, MSGL_WARN, "Failed to create: %s\n", fonts_dir); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FailedToCreateDirectory, fonts_dir); } } else if (!S_ISDIR(st.st_mode)) { - mp_msg(MSGT_ASS, MSGL_WARN, "Not a directory: %s\n", fonts_dir); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_NotADirectory, fonts_dir); } fname = validate_fname((char*)name);
--- a/libass/ass_bitmap.c Sun Nov 19 22:15:59 2006 +0000 +++ b/libass/ass_bitmap.c Sun Nov 19 22:35:17 2006 +0000 @@ -163,14 +163,14 @@ error = FT_Glyph_To_Bitmap(&glyph, FT_RENDER_MODE_NORMAL, 0, 0); if (error) { - mp_msg(MSGT_ASS, MSGL_WARN, "FT_Glyph_To_Bitmap error %d \n", error); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FT_Glyph_To_BitmapError, error); return 0; } bg = (FT_BitmapGlyph)glyph; bit = &(bg->bitmap); if (bit->pixel_mode != FT_PIXEL_MODE_GRAY) { - mp_msg(MSGT_ASS, MSGL_WARN, "Unsupported pixel mode: %d\n", (int)(bit->pixel_mode)); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_UnsupportedPixelMode, (int)(bit->pixel_mode)); FT_Done_Glyph(glyph); return 0; }
--- a/libass/ass_cache.c Sun Nov 19 22:15:59 2006 +0000 +++ b/libass/ass_cache.c Sun Nov 19 22:35:17 2006 +0000 @@ -96,7 +96,7 @@ } if (face_cache_size == MAX_FACE_CACHE_SIZE) { - mp_msg(MSGT_ASS, MSGL_FATAL, "Too many fonts\n"); + mp_msg(MSGT_ASS, MSGL_FATAL, MSGTR_LIBASS_TooManyFonts); return 1; } @@ -105,7 +105,7 @@ error = FT_New_Face(library, path, index, face); if (error) { if (!no_more_font_messages) - mp_msg(MSGT_ASS, MSGL_WARN, "Error opening font: %s, %d\n", path, index); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_ErrorOpeningFont, path, index); no_more_font_messages = 1; return 1; }
--- a/libass/ass_fontconfig.c Sun Nov 19 22:15:59 2006 +0000 +++ b/libass/ass_fontconfig.c Sun Nov 19 22:35:17 2006 +0000 @@ -101,7 +101,7 @@ return 0; if (strcasecmp((const char*)val_s, family) != 0) - mp_msg(MSGT_ASS, MSGL_WARN, "fontconfig: selected font family is not the requested one: '%s' != '%s'\n", + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_SelectedFontFamilyIsNotTheRequestedOne, (const char*)val_s, family); result = FcPatternGetString(rpat, FC_FILE, 0, &val_s); @@ -128,20 +128,20 @@ if (!res && priv->family_default) { res = _select_font(priv, priv->family_default, bold, italic, index); if (res && !no_more_font_messages) - mp_msg(MSGT_ASS, MSGL_WARN, "fontconfig_select: using default font family: (%s, %d, %d) -> %s, %d\n", + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_UsingDefaultFontFamily, family, bold, italic, res, *index); } if (!res && priv->path_default) { res = priv->path_default; *index = priv->index_default; if (!no_more_font_messages) - mp_msg(MSGT_ASS, MSGL_WARN, "fontconfig_select: using default font: (%s, %d, %d) -> %s, %d\n", + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_UsingDefaultFont, family, bold, italic, res, *index); } if (!res) { res = _select_font(priv, "Arial", bold, italic, index); if (res && !no_more_font_messages) - mp_msg(MSGT_ASS, MSGL_WARN, "fontconfig_select: using 'Arial' font family: (%s, %d, %d) -> %s, %d\n", + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_UsingArialFontFamily, family, bold, italic, res, *index); } if (res) @@ -168,17 +168,16 @@ priv->config = FcConfigGetCurrent(); if (!priv->config) { - mp_msg(MSGT_ASS, MSGL_FATAL, "FcInitLoadConfigAndFonts failed\n"); + mp_msg(MSGT_ASS, MSGL_FATAL, MSGTR_LIBASS_FcInitLoadConfigAndFontsFailed); return 0; } if (FcDirCacheValid((const FcChar8 *)dir) == FcFalse) { - mp_msg(MSGT_ASS, MSGL_INFO, "[ass] Updating font cache\n"); + mp_msg(MSGT_ASS, MSGL_INFO, MSGTR_LIBASS_UpdatingFontCache); if (FcGetVersion() >= 20390 && FcGetVersion() < 20400) mp_msg(MSGT_ASS, MSGL_WARN, - "[ass] beta versions of fontconfig are not supported\n" - " update before reporting any bugs\n"); + MSGTR_LIBASS_BetaVersionsOfFontconfigAreNotSupported); // FontConfig >= 2.4.0 updates cache automatically in FcConfigAppFontAddDir() if (FcGetVersion() < 20390) { FcFontSet* fcs; @@ -187,19 +186,19 @@ fss = FcStrSetCreate(); rc = FcStrSetAdd(fss, (const FcChar8*)dir); if (!rc) { - mp_msg(MSGT_ASS, MSGL_WARN, "FcStrSetAdd failed\n"); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FcStrSetAddFailed); goto ErrorFontCache; } rc = FcDirScan(fcs, fss, NULL, FcConfigGetBlanks(priv->config), (const FcChar8 *)dir, FcFalse); if (!rc) { - mp_msg(MSGT_ASS, MSGL_WARN, "FcDirScan failed\n"); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FcDirScanFailed); goto ErrorFontCache; } rc = FcDirSave(fcs, fss, (const FcChar8 *)dir); if (!rc) { - mp_msg(MSGT_ASS, MSGL_WARN, "FcDirSave failed\n"); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FcDirSave); goto ErrorFontCache; } ErrorFontCache: @@ -209,7 +208,7 @@ rc = FcConfigAppFontAddDir(priv->config, (const FcChar8*)dir); if (!rc) { - mp_msg(MSGT_ASS, MSGL_WARN, "FcConfigAppFontAddDir failed\n"); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FcConfigAppFontAddDirFailed); } priv->family_default = family ? strdup(family) : 0; @@ -236,7 +235,7 @@ { fc_instance_t* priv; - mp_msg(MSGT_ASS, MSGL_WARN, "Fontconfig disabled, only default font will be used\n"); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FontconfigDisabledDefaultFontWillBeUsed); priv = calloc(1, sizeof(fc_instance_t));
--- a/libass/ass_render.c Sun Nov 19 22:15:59 2006 +0000 +++ b/libass/ass_render.c Sun Nov 19 22:35:17 2006 +0000 @@ -203,7 +203,7 @@ if (track->PlayResX && track->PlayResY) return; if (!track->PlayResX && !track->PlayResY) { - mp_msg(MSGT_ASS, MSGL_WARN, "Neither PlayResX nor PlayResY defined. Assuming 384x288. \n"); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_NeitherPlayResXNorPlayResYDefined); track->PlayResX = 384; track->PlayResY = 288; } else { @@ -211,10 +211,10 @@ frame_context.orig_height / frame_context.width; if (!track->PlayResY) { track->PlayResY = track->PlayResX / orig_aspect + .5; - mp_msg(MSGT_ASS, MSGL_WARN, "PlayResY undefined, setting %d \n", track->PlayResY); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_PlayResYUndefinedSettingY, track->PlayResY); } else if (!track->PlayResX) { track->PlayResX = track->PlayResY * orig_aspect + .5; - mp_msg(MSGT_ASS, MSGL_WARN, "PlayResX undefined, setting %d \n", track->PlayResX); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_PlayResXUndefinedSettingX, track->PlayResX); } } } @@ -231,7 +231,7 @@ error = FT_Init_FreeType( &ft ); if ( error ) { - mp_msg(MSGT_ASS, MSGL_FATAL, "FT_Init_FreeType failed\n"); + mp_msg(MSGT_ASS, MSGL_FATAL, MSGTR_LIBASS_FT_Init_FreeTypeFailed); goto ass_init_exit; } @@ -253,8 +253,8 @@ text_info.glyphs = calloc(MAX_GLYPHS, sizeof(glyph_info_t)); ass_init_exit: - if (priv) mp_msg(MSGT_ASS, MSGL_INFO, "[ass] Init\n"); - else mp_msg(MSGT_ASS, MSGL_ERR, "[ass] Init failed\n"); + if (priv) mp_msg(MSGT_ASS, MSGL_INFO, MSGTR_LIBASS_Init); + else mp_msg(MSGT_ASS, MSGL_ERR, MSGTR_LIBASS_InitFailed); return priv; } @@ -960,7 +960,7 @@ switch (cmd) { case 'c': change_color(render_context.c + cidx, val, pwr); break; case 'a': change_alpha(render_context.c + cidx, val >> 24, pwr); break; - default: mp_msg(MSGT_ASS, MSGL_WARN, "Bad command: %c%c\n", n, cmd); break; + default: mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_BadCommand, n, cmd); break; } mp_msg(MSGT_ASS, MSGL_DBG2, "single c/a at %f: %c%c = %X \n", pwr, n, cmd, render_context.c[cidx]); } else if (mystrcmp(&p, "r")) { @@ -1239,7 +1239,7 @@ error = FT_Load_Glyph(render_context.face, index, FT_LOAD_NO_BITMAP ); if (error) { - mp_msg(MSGT_ASS, MSGL_WARN, "Error loading glyph\n"); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_ErrorLoadingGlyph); return error; } @@ -1254,7 +1254,7 @@ #endif error = FT_Get_Glyph(render_context.face->glyph, &(info->glyph)); if (error) { - mp_msg(MSGT_ASS, MSGL_WARN, "Error getting glyph\n"); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_ErrorLoadingGlyph); return error; } @@ -1265,7 +1265,7 @@ info->outline_glyph = info->glyph; error = FT_Glyph_Stroke( &(info->outline_glyph), render_context.stroker, 0 ); // don't destroy original if (error) { - mp_msg(MSGT_ASS, MSGL_WARN, "FT_Glyph_Stroke error %d \n", error); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FT_Glyph_Stroke_Error, error); } } else { info->outline_glyph = 0; @@ -1493,7 +1493,7 @@ dt /= (tm_end - tm_start); x = x_start + (x_end - x_start) * dt; } else { - mp_msg(MSGT_ASS, MSGL_ERR, "Unknown effect type (internal error) \n"); + mp_msg(MSGT_ASS, MSGL_ERR, MSGTR_LIBASS_UnknownEffectType_InternalError); continue; } @@ -1586,11 +1586,11 @@ int device_x = 0, device_y = 0; if (event->Style >= frame_context.track->n_styles) { - mp_msg(MSGT_ASS, MSGL_WARN, "No style found!\n"); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_NoStyleFound); return 1; } if (!event->Text) { - mp_msg(MSGT_ASS, MSGL_WARN, "Empty event!\n"); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_EmptyEvent); return 1; } @@ -1620,7 +1620,7 @@ use_kerning = FT_HAS_KERNING(render_context.face); if (text_info.length >= MAX_GLYPHS) { - mp_msg(MSGT_ASS, MSGL_WARN, "\nMAX_GLYPHS reached: event %d, start = %llu, duration = %llu\n Text = %s\n", + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_MAX_GLYPHS_Reached, (int)(event - frame_context.track->events), event->Start, event->Duration, event->Text); break; } @@ -2129,7 +2129,7 @@ s.a = priv->top; s.b = priv->top + priv->height; if (priv->height != imgs[i].height) { // no, it's not - mp_msg(MSGT_ASS, MSGL_WARN, "Achtung! Event height has changed! \n"); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_EventHeightHasChanged); priv->top = 0; priv->height = 0; } @@ -2195,7 +2195,7 @@ rc = ass_render_event(event, eimg + cnt); if (!rc) ++cnt; } else { - mp_msg(MSGT_ASS, MSGL_WARN, "Too many simultaneous events \n"); + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_TooManySimultaneousEvents); break; } }
--- a/libass/mputils.h Sun Nov 19 22:15:59 2006 +0000 +++ b/libass/mputils.h Sun Nov 19 22:35:17 2006 +0000 @@ -2,6 +2,7 @@ #define __ASS_MPUTILS_H__ #include "mp_msg.h" +#include "help_mp.h" #include "libvo/font_load.h" // for blur() #include "subreader.h" // for guess_buffer_cp #include "libvo/sub.h" // for utf8_get_char