Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Patch by Yuri Chornoivan to make the rest of LogError message transla…

…table.
  • Loading branch information...
commit 6428f593c2f3102440633842aeaca433383a9962 1 parent 2f0ac45
michal-n authored
View
2  fontforge/bezctx_ff.c
@@ -23,7 +23,7 @@ static void
nancheck(bezctx_ff *bc) {
if ( !bc->gotnans ) {
- LogError("Spiros did not converge" );
+ LogError(_("Spiros did not converge") );
bc->gotnans = true;
}
}
View
2  fontforge/dumppfa.c
@@ -629,7 +629,7 @@ static void dumpPattern(void (*dumpchar)(int ch,void *data), void *data,
/* and can't live in the content stream, so they are done elsewhere */
} else {
if ( pattern_sc==NULL )
- LogError("No glyph named %s, used as a pattern in %s\n", pat->pattern, sc->name);
+ LogError(_("No glyph named %s, used as a pattern in %s\n"), pat->pattern, sc->name);
PatternSCBounds(pattern_sc,&b);
dumpf(dumpchar,data, "<<\n" );
View
4 fontforge/featurefile.c
@@ -90,7 +90,7 @@ static void dump_glyphbyname(FILE *out, SplineFont *sf, char *name) {
SplineChar *sc = SFGetChar(sf,-1,name);
if ( sc==NULL )
- LogError( "No glyph named %s.", name );
+ LogError(_("No glyph named %s."), name );
if ( sc==NULL || sc->parent->cidmaster==NULL )
fprintf( out, "\\%s", name );
else
@@ -128,7 +128,7 @@ static void dump_glyphnamelist(FILE *out, SplineFont *sf, char *names) {
ch = *pt; *pt = '\0';
sc2 = SFGetChar(sf,-1,start);
if ( sc2==NULL ) {
- LogError( "No CID named %s", start);
+ LogError(_("No CID named %s"), start);
nm = start;
} else {
sprintf( cidbuf, "\\%d", sc2->orig_pos );
View
4 fontforge/freetype.c
@@ -195,7 +195,7 @@ return( false );
/* Here we are compiled with an old library, so if the dynamic one is new we fail */
if ( FreeTypeAtLeast(2,3,5)) {
if ( !complained ) {
- LogError("This version of FontForge expects freetype 2.3.4 or less.");
+ LogError(_("This version of FontForge expects freetype 2.3.4 or less."));
complained = true;
}
return( false );
@@ -203,7 +203,7 @@ return( false );
#else
if ( !FreeTypeAtLeast(2,3,5)) {
if ( !complained ) {
- LogError("This version of FontForge expects freetype 2.3.5 or more.");
+ LogError(_("This version of FontForge expects freetype 2.3.5 or more."));
complained = true;
}
return( false );
View
28 fontforge/fvfonts.c
@@ -316,7 +316,7 @@ static AnchorPoint *AnchorPointsDuplicate(AnchorPoint *base,SplineChar *sc) {
break;
cur->anchor = ac;
if ( ac==NULL ) {
- LogError( "No matching AnchorClass for %s", base->anchor->name);
+ LogError(_("No matching AnchorClass for %s"), base->anchor->name);
chunkfree(cur,sizeof(AnchorPoint));
} else {
if ( head==NULL )
@@ -1433,48 +1433,48 @@ static void LayerInterpolate(Layer *to,Layer *base,Layer *other,real amount,Spli
if ( base->dofill==other->dofill )
to->dofill = base->dofill;
else
- LogError( "Different settings on whether to fill in layer %d of %s\n", lc, sc->name );
+ LogError(_("Different settings on whether to fill in layer %d of %s\n"), lc, sc->name );
if ( base->fill_brush.col==COLOR_INHERITED && other->fill_brush.col==COLOR_INHERITED )
to->fill_brush.col = COLOR_INHERITED;
else if ( base->fill_brush.col!=COLOR_INHERITED && other->fill_brush.col!=COLOR_INHERITED )
to->fill_brush.col = InterpColor( base->fill_brush.col,other->fill_brush.col, amount );
else
- LogError( "Different settings on whether to inherit fill color in layer %d of %s\n", lc, sc->name );
+ LogError(_("Different settings on whether to inherit fill color in layer %d of %s\n"), lc, sc->name );
if ( base->fill_brush.opacity<0 && other->fill_brush.opacity<0 )
to->fill_brush.opacity = WIDTH_INHERITED;
else if ( base->fill_brush.opacity>=0 && other->fill_brush.opacity>=0 )
to->fill_brush.opacity = base->fill_brush.opacity + amount*(other->fill_brush.opacity-base->fill_brush.opacity);
else
- LogError( "Different settings on whether to inherit fill opacity in layer %d of %s\n", lc, sc->name );
+ LogError(_("Different settings on whether to inherit fill opacity in layer %d of %s\n"), lc, sc->name );
if ( base->stroke_pen.brush.col==COLOR_INHERITED && other->stroke_pen.brush.col==COLOR_INHERITED )
to->stroke_pen.brush.col = COLOR_INHERITED;
else if ( base->stroke_pen.brush.col!=COLOR_INHERITED && other->stroke_pen.brush.col!=COLOR_INHERITED )
to->stroke_pen.brush.col = InterpColor( base->stroke_pen.brush.col,other->stroke_pen.brush.col, amount );
else
- LogError( "Different settings on whether to inherit fill color in layer %d of %s\n", lc, sc->name );
+ LogError(_("Different settings on whether to inherit fill color in layer %d of %s\n"), lc, sc->name );
if ( base->stroke_pen.brush.opacity<0 && other->stroke_pen.brush.opacity<0 )
to->stroke_pen.brush.opacity = WIDTH_INHERITED;
else if ( base->stroke_pen.brush.opacity>=0 && other->stroke_pen.brush.opacity>=0 )
to->stroke_pen.brush.opacity = base->stroke_pen.brush.opacity + amount*(other->stroke_pen.brush.opacity-base->stroke_pen.brush.opacity);
else
- LogError( "Different settings on whether to inherit stroke opacity in layer %d of %s\n", lc, sc->name );
+ LogError(_("Different settings on whether to inherit stroke opacity in layer %d of %s\n"), lc, sc->name );
if ( base->stroke_pen.width<0 && other->stroke_pen.width<0 )
to->stroke_pen.width = WIDTH_INHERITED;
else if ( base->stroke_pen.width>=0 && other->stroke_pen.width>=0 )
to->stroke_pen.width = base->stroke_pen.width + amount*(other->stroke_pen.width-base->stroke_pen.width);
else
- LogError( "Different settings on whether to inherit stroke width in layer %d of %s\n", lc, sc->name );
+ LogError(_("Different settings on whether to inherit stroke width in layer %d of %s\n"), lc, sc->name );
if ( base->stroke_pen.linecap==other->stroke_pen.linecap )
to->stroke_pen.linecap = base->stroke_pen.linecap;
else
- LogError( "Different settings on stroke linecap in layer %d of %s\n", lc, sc->name );
+ LogError(_("Different settings on stroke linecap in layer %d of %s\n"), lc, sc->name );
if ( base->stroke_pen.linejoin==other->stroke_pen.linejoin )
to->stroke_pen.linejoin = base->stroke_pen.linejoin;
else
- LogError( "Different settings on stroke linejoin in layer %d of %s\n", lc, sc->name );
+ LogError(_("Different settings on stroke linejoin in layer %d of %s\n"), lc, sc->name );
if ( base->fill_brush.gradient!=NULL || other->fill_brush.gradient!=NULL ||
base->stroke_pen.brush.gradient!=NULL || other->stroke_pen.brush.gradient!=NULL )
- LogError( "I can't even imagine how to attempt to interpolate gradients in layer %d of %s\n", lc, sc->name );
+ LogError(_("I can't even imagine how to attempt to interpolate gradients in layer %d of %s\n"), lc, sc->name );
#if 0
if ( base->fill_brush.pattern!=NULL && other->fill_brush.pattern!=NULL &&
strcmp(base->fill_brush.pattern,other->fill_brush.pattern)==0 )
@@ -1482,7 +1482,7 @@ static void LayerInterpolate(Layer *to,Layer *base,Layer *other,real amount,Spli
else
#endif
if ( base->fill_brush.pattern!=NULL || other->fill_brush.pattern!=NULL )
- LogError( "Different fill patterns in layer %d of %s\n", lc, sc->name );
+ LogError(_("Different fill patterns in layer %d of %s\n"), lc, sc->name );
#if 0
if ( base->stroke_pen.brush.pattern!=NULL && other->stroke_pen.brush.pattern!=NULL &&
strcmp(base->stroke_pen.brush.pattern,other->stroke_pen.brush.pattern)==0 )
@@ -1490,12 +1490,12 @@ static void LayerInterpolate(Layer *to,Layer *base,Layer *other,real amount,Spli
else
#endif
if ( base->stroke_pen.brush.pattern!=NULL || other->stroke_pen.brush.pattern!=NULL )
- LogError( "Different stroke patterns in layer %d of %s\n", lc, sc->name );
+ LogError(_("Different stroke patterns in layer %d of %s\n"), lc, sc->name );
to->splines = SplineSetsInterpolate(base->splines,other->splines,amount,sc);
to->refs = InterpRefs(base->refs,other->refs,amount,sc);
if ( base->images!=NULL || other->images!=NULL )
- LogError( "I can't even imagine how to attempt to interpolate images in layer %d of %s\n", lc, sc->name );
+ LogError(_("I can't even imagine how to attempt to interpolate images in layer %d of %s\n"), lc, sc->name );
}
#endif
@@ -1524,7 +1524,7 @@ return( NULL );
if ( base->parent->multilayer && other->parent->multilayer ) {
int lc = base->layer_cnt;
if ( lc!=other->layer_cnt ) {
- LogError( "Different numbers of layers in %s\n", base->name );
+ LogError(_("Different numbers of layers in %s\n"), base->name );
if ( other->layer_cnt<lc ) lc = other->layer_cnt;
}
if ( lc>2 ) {
View
2  fontforge/fvimportbdf.c
@@ -1238,7 +1238,7 @@ return( 0 );
}
}
if ( ftell(pk)!=char_end ) {
- LogError( "The character, %d, was not read properly (or pk file is in bad format)\n At %ld should be %d, off by %ld\n", cc, ftell(pk), char_end, ftell(pk)-char_end );
+ LogError(_("The character, %d, was not read properly (or pk file is in bad format)\n At %ld should be %d, off by %ld\n"), cc, ftell(pk), char_end, ftell(pk)-char_end );
fseek(pk,char_end,SEEK_SET);
}
/* printf( "\n" ); */
View
24 fontforge/parsettf.c
@@ -1991,7 +1991,7 @@ return;
LogError(_("A point in GID %d is outside the glyph bounding box\n"), sc->orig_pos );
info->bad_glyph_data = true;
if ( !(info->openflags&of_fontlint) )
- LogError(" Subsequent errors will not be reported.\n" );
+ LogError(_(" Subsequent errors will not be reported.\n") );
info->gbbcomplain = true;
}
}
@@ -2014,7 +2014,7 @@ return;
LogError(_("A point in GID %d is outside the glyph bounding box\n"), sc->orig_pos );
info->bad_glyph_data = true;
if ( !(info->openflags&of_fontlint) )
- LogError(" Subsequent errors will not be reported.\n" );
+ LogError(_(" Subsequent errors will not be reported.\n") );
info->gbbcomplain = true;
}
}
@@ -2225,7 +2225,7 @@ return( sc );
LogError(_("Glyph bounding box data exceeds font bounding box data for GID %d\n"), gid );
info->bad_glyph_data = true;
if ( !(info->openflags&of_fontlint) )
- LogError(" Subsequent errors will not be reported.\n" );
+ LogError(_(" Subsequent errors will not be reported.\n") );
info->bbcomplain = true;
}
}
@@ -3161,7 +3161,7 @@ static void readcffprivate(FILE *ttf, struct topdicts *td, struct ttfinfo *info)
while ( ftell(ttf)<end ) {
if ( feof(ttf) ) {
- LogError("End of file found when reading private dictionary.\n" );
+ LogError(_("End of file found when reading private dictionary.\n") );
break;
}
sp = 0;
@@ -4047,22 +4047,22 @@ static void readttfwidths(FILE *ttf,struct ttfinfo *info) {
if ( lastwidth>info->advanceWidthMax && info->hhea_start!=0 ) {
if ( !info->wdthcomplain || (info->openflags&of_fontlint)) {
if ( info->fontname!=NULL && sc->name!=NULL )
- LogError("In %s, the advance width (%d) for glyph %s is greater than the maximum (%d)\n",
+ LogError(_("In %s, the advance width (%d) for glyph %s is greater than the maximum (%d)\n"),
info->fontname, lastwidth, sc->name, info->advanceWidthMax );
else
- LogError("In GID %d the advance width (%d) is greater than the stated maximum (%d)\n",
+ LogError(_("In GID %d the advance width (%d) is greater than the stated maximum (%d)\n"),
i, lastwidth, info->advanceWidthMax );
if ( !(info->openflags&of_fontlint) )
- LogError(" Subsequent errors will not be reported.\n" );
+ LogError(_(" Subsequent errors will not be reported.\n") );
info->wdthcomplain = true;
}
}
if ( check_width_consistency && sc->width!=lastwidth ) {
if ( info->fontname!=NULL && sc->name!=NULL )
- LogError("In %s, in glyph %s, 'CFF ' advance width (%d) and\n 'hmtx' width (%d) do not match. (Subsequent mismatches will not be reported)\n",
+ LogError(_("In %s, in glyph %s, 'CFF ' advance width (%d) and\n 'hmtx' width (%d) do not match. (Subsequent mismatches will not be reported)\n"),
info->fontname, sc->name, sc->width, lastwidth );
else
- LogError("In GID %d, 'CFF ' advance width (%d) and 'hmtx' width (%d) do not match.\n (Subsequent mismatches will not be reported)\n",
+ LogError(_("In GID %d, 'CFF ' advance width (%d) and 'hmtx' width (%d) do not match.\n (Subsequent mismatches will not be reported)\n"),
i, sc->width, lastwidth );
info->bad_metrics = true;
check_width_consistency = false;
@@ -4174,7 +4174,7 @@ return( enc );
static int badencoding(struct ttfinfo *info) {
if ( !info->bad_cmap ) {
- LogError("Bad encoding information in 'cmap' table.");
+ LogError(_("Bad encoding information in 'cmap' table."));
info->bad_cmap = true;
}
return( -1 );
@@ -5090,10 +5090,10 @@ static void readttfos2metrics(FILE *ttf,struct ttfinfo *info) {
}
if ( info->os2_version==0 ) {
- LogError("Windows will reject fonts with an OS/2 version number of 0\n");
+ LogError(_("Windows will reject fonts with an OS/2 version number of 0\n"));
info->bad_os2_version = true;
} else if ( info->os2_version==1 && info->cff_start!=0 ) {
- LogError("Windows will reject otf (cff) fonts with an OS/2 version number of 1\n");
+ LogError(_("Windows will reject otf (cff) fonts with an OS/2 version number of 1\n"));
info->bad_os2_version = true;
}
}
View
6 fontforge/parsettfatt.c
@@ -5508,7 +5508,7 @@ return;
if ( variants!=0 )
ttf_math_read_variants(ttf,info,info->math_start+variants,justinuse);
if ( ftell(ttf)>info->g_bounds ) {
- LogError("MATH table extends beyond table bounds");
+ LogError(_("MATH table extends beyond table bounds"));
info->bad_ot = true;
}
info->g_bounds = 0;
@@ -5632,7 +5632,7 @@ return;
tot = coordcnt = getushort(ttf);
if ( coordcnt!=curBase->baseline_cnt ) {
info->bad_ot = true;
- LogError( "!!!!! Coord count (%d) for '%c%c%c%c' script does not match base tag count (%d) in 'BASE' table\n",
+ LogError(_("!!!!! Coord count (%d) for '%c%c%c%c' script does not match base tag count (%d) in 'BASE' table\n"),
coordcnt,
bs[i].tag>>24, bs[i].tag>>16, bs[i].tag>>8, bs[i].tag,
curBase->baseline_cnt );
@@ -5650,7 +5650,7 @@ return;
curScript->baseline_pos[j] = (short) getushort(ttf);
if ( format!=1 && format!=2 && format!=3 ) {
info->bad_ot = true;
- LogError("!!!!! Bad Base Coord format (%d) for '%c%c%c%c' in '%c%c%c%c' script in 'BASE' table\n",
+ LogError(_("!!!!! Bad Base Coord format (%d) for '%c%c%c%c' in '%c%c%c%c' script in 'BASE' table\n"),
format,
curBase->baseline_tags[j]>>24, curBase->baseline_tags[j]>>16, curBase->baseline_tags[j]>>8, curBase->baseline_tags[j],
bs[i].tag>>24, bs[i].tag>>16, bs[i].tag>>8, bs[i].tag );
View
14 fontforge/parsettfbmf.c
@@ -95,7 +95,7 @@ return;
/* metrics from EBLC */
/* Do nothing here */
if ( metrics==NULL ) {
- LogError( "Unexpected use of bitmap format 5, no metrics are appearant\n" );
+ LogError(_("Unexpected use of bitmap format 5, no metrics are appearant\n"));
info->bad_embedded_bitmap = true;
/*fseek(ttf,len,SEEK_CUR);*/
return;
@@ -104,17 +104,17 @@ return;
/* format 3 is obsolete */
/* format 4 is compressed apple and I'm not supporting it (Nor is MS) */
if ( imageformat==3 && !info->obscomplain ) {
- LogError( "This font contains bitmaps in the obsolete format 3 (And I can't read them)\n" );
+ LogError(_("This font contains bitmaps in the obsolete format 3 (And I can't read them)\n") );
info->bad_embedded_bitmap = true;
info->obscomplain = true;
} else if ( imageformat==4 ) {
/* Apple doesn't describe it (fully) in their spec. */
/* MS doesn't support it (and doesn't describe) */
/* Adobe doesn't describe it (and says MS doesn't support it) */
- LogError( "This font contains bitmaps in Apple's compressed format 4 (And I don't support that)\n" );
+ LogError(_("This font contains bitmaps in Apple's compressed format 4 (And I don't support that)\n"));
info->cmpcomplain = true;
} else if ( !info->unkcomplain ) {
- LogError( "This font contains bitmaps in a format %d that I've never heard of\n", imageformat );
+ LogError(_("This font contains bitmaps in a format %d that I've never heard of\n"), imageformat );
info->bad_embedded_bitmap = true;
info->unkcomplain = true;
}
@@ -267,7 +267,7 @@ static void BdfCRefFixup(BDFFont *bdf, int gid, int *warned, struct ttfinfo *inf
prev = head;
} else if ( !*warned ) {
/* Glyphs aren't named yet */
- LogError("Glyph %d in bitmap strike %d pixels refers to a missing glyph (%d)",
+ LogError(_("Glyph %d in bitmap strike %d pixels refers to a missing glyph (%d)"),
gid, bdf->pixelsize, head->gid );
info->bad_embedded_bitmap = true;
*warned = true;
@@ -369,7 +369,7 @@ static void readttfbitmapfont(FILE *ttf,struct ttfinfo *info,
last = getushort(ttf);
moreoff = getlong(ttf);
if ( last<first ) {
- LogError( "Bad format of subtable %d (of %d) in bloc/EBLC of strike with pixelsize=%d. First=%d, last=%d.\n",
+ LogError(_("Bad format of subtable %d (of %d) in bloc/EBLC of strike with pixelsize=%d. First=%d, last=%d.\n"),
j, head->numIndexSubTables, bdf->pixelsize, first, last );
info->bad_embedded_bitmap = true;
continue;
@@ -461,7 +461,7 @@ static void readttfbitmapfont(FILE *ttf,struct ttfinfo *info,
free(glyphs);
break;
default:
- LogError("Didn't understand index format: %d\n", indexformat );
+ LogError(_("Didn't understand index format: %d\n"), indexformat );
info->bad_embedded_bitmap = true;
break;
}
View
4 fontforge/plugins.c
@@ -57,13 +57,13 @@ void LoadPlugin(char *dynamic_lib_name) {
}
plugin = dlopen(dynamic_lib_name,RTLD_LAZY);
if ( plugin==NULL ) {
- LogError("Failed to dlopen: %s\n%s", dynamic_lib_name, dlerror());
+ LogError(_("Failed to dlopen: %s\n%s"), dynamic_lib_name, dlerror());
free(freeme);
return;
}
init = (int (*)(void)) dlsym(plugin,"FontForgeInit");
if ( init==NULL ) {
- LogError("Failed to find init function in %s", dynamic_lib_name);
+ LogError(_("Failed to find init function in %s"), dynamic_lib_name);
dlclose(plugin);
free(freeme);
return;
View
2  fontforge/print.c
@@ -536,7 +536,7 @@ static void pdf_BrushCheck(PI *pi,struct glyph_res *gr,struct brush *brush,
int lenpos, lenstart, len;
if ( pattern_sc==NULL )
- LogError("No glyph named %s, used as a pattern in %s\n", pat->pattern, sc->name);
+ LogError(_("No glyph named %s, used as a pattern in %s\n"), pat->pattern, sc->name);
PatternSCBounds(pattern_sc,&b);
if ( gr->pattern_cnt>=gr->pattern_max ) {
View
12 fontforge/python.c
@@ -6046,13 +6046,13 @@ return( -1 );
&lx,&ly,&rx,&ry,&ux,&uy ))
return( -1 );
if ( ux == 0 && uy == 0 ) {
- LogError( "Invalid unit vector has been specified. The hint is ignored.\n" );
+ LogError(_("Invalid unit vector has been specified. The hint is ignored.\n"));
continue;
} else if ( ux == 0 ) {
- LogError( "Use the \'vhint\' property to specify a vertical hint.\n" );
+ LogError(_("Use the \'vhint\' property to specify a vertical hint.\n"));
continue;
} else if ( uy == 0 ) {
- LogError( "Use the \'hhint\' property to specify a horizontal hint.\n" );
+ LogError(_("Use the \'hhint\' property to specify a horizontal hint.\n"));
continue;
}
cur = chunkalloc(sizeof(DStemInfo));
@@ -7480,7 +7480,7 @@ return( NULL );
PyTuple_SetItem(ret,i,Py_None);
/* The important things here should not be translated. We hope the user will */
/* never see this. Let's not translate it at all */
- LogError( "Unexpected PST type in GetPosSub (%d).\n", pst->type );
+ LogError(_("Unexpected PST type in GetPosSub (%d).\n"), pst->type );
break;
case pst_position:
PyTuple_SetItem(ret,cnt,Py_BuildValue("(ssiiii)",
@@ -16818,7 +16818,7 @@ void PyFF_ScriptFile(FontViewBase *fv,SplineChar *sc, char *filename) {
if ( fv!=NULL )
layer_active_in_ui = fv->active_layer;
if ( fp==NULL )
- LogError( "Can't open %s", filename );
+ LogError(_("Can't open %s"), filename );
else {
PyRun_SimpleFile(fp,filename);
fclose(fp);
@@ -16915,7 +16915,7 @@ void PyFF_CallDictFunc(PyObject *dict,char *key,char *argtypes, ... ) {
(func = PyMapping_GetItemString(dict,key))==NULL )
return;
if ( !PyCallable_Check(func)) {
- LogError( "%s: Is not callable", key );
+ LogError(_("%s: Is not callable"), key );
Py_DECREF(func);
return;
}
View
2  fontforge/pythonui.c
@@ -87,7 +87,7 @@ return;
/* Oh. An error. How fun. See below */;
else if ( !PyInt_Check(result)) {
char *menu_item_name = u2utf8_copy(mi->ti.text);
- LogError( "Return from enabling function for menu item %s must be boolean", menu_item_name );
+ LogError(_("Return from enabling function for menu item %s must be boolean"), menu_item_name );
free( menu_item_name );
mi->ti.disabled = true;
} else
View
2  fontforge/scripting.c
@@ -7673,7 +7673,7 @@ static void bGetPosSub(Context *c) {
ret->vals[cnt].type = v_void;
/* The important things here should not be translated. We hope the user will */
/* never see this. Let's not translate it at all */
- LogError( "Unexpected PST type in GetPosSub (%d).\n", pst->type );
+ LogError(_("Unexpected PST type in GetPosSub (%d).\n"), pst->type );
break;
case pst_position:
temp->argc = 6;
View
22 fontforge/sfd.c
@@ -3119,7 +3119,7 @@ static void SFDGetTtfInstrs(FILE *sfd, SplineChar *sc) {
}
static void tterr(void *rubbish, char *message, int pos) {
- LogError( "When loading tt instrs from sfd: %s\n", message );
+ LogError(_("When loading tt instrs from sfd: %s\n"), message );
}
static void SFDGetTtInstrs(FILE *sfd, SplineChar *sc) {
@@ -3815,7 +3815,7 @@ static AnchorPoint *SFDReadAnchorPoints(FILE *sfd,SplineChar *sc,AnchorPoint *la
name = SFDReadUTF7Str(sfd);
if ( name==NULL ) {
- LogError( "Anchor Point with no class name: %s", sc->name );
+ LogError(_("Anchor Point with no class name: %s"), sc->name );
return( lastap );
}
for ( an=sc->parent->anchor; an!=NULL && strcmp(an->name,name)!=0; an=an->next );
@@ -3857,7 +3857,7 @@ return( lastap );
}
}
if ( ap->anchor==NULL || ap->type==-1 ) {
- LogError( "Bad Anchor Point: %s", sc->name );
+ LogError(_("Bad Anchor Point: %s"), sc->name );
AnchorPointsFree(ap);
return( lastap );
}
@@ -4519,11 +4519,11 @@ return( NULL );
struct lookup_subtable *sub;
if ( sf->sfd_version<2 )
- LogError( "Found an new style kerning pair inside a version 1 (or lower) sfd file.\n" );
+ LogError(_("Found an new style kerning pair inside a version 1 (or lower) sfd file.\n") );
while ( fscanf(sfd,"%d %d", &index, &off )==2 ) {
sub = SFFindLookupSubtableAndFreeName(sf,SFDReadUTF7Str(sfd));
if ( sub==NULL ) {
- LogError( "KernPair with no subtable name.\n" );
+ LogError(_("KernPair with no subtable name.\n"));
break;
}
kp = chunkalloc(sizeof(KernPair1));
@@ -4954,7 +4954,7 @@ static void SFDFixupBitmapRefs( BDFFont *bdf ) {
BCMakeDependent( bc,rbc );
prev = head;
} else {
- LogError("Glyph %d in bitmap strike %d pixels refers to a missing glyph (%d)",
+ LogError(_("Glyph %d in bitmap strike %d pixels refers to a missing glyph (%d)"),
bc->orig_pos, bdf->pixelsize, head->gid );
if ( prev == NULL ) bc->refs = next;
else prev->next = next;
@@ -5156,7 +5156,7 @@ static void SFDFixupRefs(SplineFont *sf) {
rprev = refs;
if ( refs->use_my_metrics ) {
if ( sc->width != refs->sc->width ) {
- LogError("Bad sfd file. Glyph %s has width %d even though it should be\n bound to the width of %s which is %d.\n",
+ LogError(_("Bad sfd file. Glyph %s has width %d even though it should be\n bound to the width of %s which is %d.\n"),
sc->name, sc->width, refs->sc->name, refs->sc->width );
sc->width = refs->sc->width;
}
@@ -5436,7 +5436,7 @@ static void SFDGetNameList(FILE *sfd, char *tok, SplineFont *sf) {
geteol(sfd,tok);
nl = NameListByName(tok);
if ( nl==NULL )
- LogError( "Failed to find NameList: %s", tok);
+ LogError(_("Failed to find NameList: %s"), tok);
else
sf->for_new_glyphs = nl;
}
@@ -6861,9 +6861,9 @@ exit(1);
kc->subtable->kc = kc;
else {
if ( kc->subtable==NULL )
- LogError("Bad SFD file, missing subtable in kernclass defn.\n" );
+ LogError(_("Bad SFD file, missing subtable in kernclass defn.\n") );
else
- LogError("Bad SFD file, two kerning classes assigned to the same subtable: %s\n", kc->subtable->subtable_name );
+ LogError(_("Bad SFD file, two kerning classes assigned to the same subtable: %s\n"), kc->subtable->subtable_name );
kc->subtable = NULL;
}
}
@@ -7319,7 +7319,7 @@ return( -1 );
/* perculate through to users before I introduce the new format so there */
/* will be fewer complaints when it happens */
if ( dval!=0 && dval!=1 && dval!=2.0 && dval!=3.0 && dval!=4.0 ) {
- LogError("Bad SFD Version number %.1f", dval );
+ LogError(_("Bad SFD Version number %.1f"), dval );
return( -1 );
}
ch = nlgetc(sfd); ungetc(ch,sfd);
View
2  fontforge/spiro.c
@@ -86,7 +86,7 @@ return;
_TaggedSpiroCPsToBezier = (void (*)(spiro_cp *spiros,bezctx *bc)) dlsym(libspiro,"TaggedSpiroCPsToBezier");
if ( _TaggedSpiroCPsToBezier==NULL ) {
- LogError("Hmm. This system has a libspiro, but it doesn't contain the entry points\nfontforge needs. Must be something else.\n");
+ LogError(_("Hmm. This system has a libspiro, but it doesn't contain the entry points\nfontforge needs. Must be something else.\n"));
} else
has_spiro = true;
}
View
14 fontforge/svg.c
@@ -495,7 +495,7 @@ static void svg_dumppattern(FILE *file,struct pattern *pattern,
patsubname = strconcat3(scname,"-",pattern->pattern);
svg_dumpscdefs(file,pattern_sc,patsubname,false);
} else
- LogError("No glyph named %s, used as a pattern in %s\n", pattern->pattern, scname);
+ LogError(_("No glyph named %s, used as a pattern in %s\n"), pattern->pattern, scname);
fprintf( file, " <pattern " );
if ( nested==NULL )
@@ -2249,7 +2249,7 @@ static void xmlParseColorSource(xmlNodePtr top,char *name,DBounds *bbox,
*_grad = NULL; *_epat = NULL;
if ( colour_source==NULL )
- LogError("Could not find Color Source with id %s.", name );
+ LogError(_("Could not find Color Source with id %s."), name );
else if ( (islinear = _xmlStrcmp(colour_source->name,(xmlChar *) "linearGradient")==0) ||
_xmlStrcmp(colour_source->name,(xmlChar *) "radialGradient")==0 ) {
struct gradient *grad = chunkalloc(sizeof(struct gradient));
@@ -2390,10 +2390,10 @@ static void xmlParseColorSource(xmlNodePtr top,char *name,DBounds *bbox,
}
}
} else if ( _xmlStrcmp(colour_source->name,(xmlChar *) "pattern")==0 ) {
- LogError("FontForge does not currently parse pattern Color Sources (%s).",
+ LogError(_("FontForge does not currently parse pattern Color Sources (%s)."),
name );
} else {
- LogError("Color Source with id %s had an unexpected type %s.",
+ LogError(_("Color Source with id %s had an unexpected type %s."),
name, (char *) colour_source->name );
}
}
@@ -2605,7 +2605,7 @@ return( NULL );
strcmp(mimetype,"image/bmp")==0 )
/* These we support (if we've got the libraries) */;
else {
- LogError("Unsupported mime type in data URI: %s\n", mimetype );
+ LogError(_("Unsupported mime type in data URI: %s\n"), mimetype );
return( NULL );
}
tmp = tmpfile();
@@ -2669,7 +2669,7 @@ static Entity *SVGParseImage(xmlNodePtr svg) {
if ( val==NULL )
return( NULL );
if ( strncmp((char *) val,"data:",5)!=0 ) {
- LogError("FontForge only supports embedded images in data: URIs\n");
+ LogError(_("FontForge only supports embedded images in data: URIs\n"));
free(val);
return( NULL ); /* I can only handle data URIs */
}
@@ -2912,7 +2912,7 @@ return( NULL );
}
free(eret);
} else
- LogError("Could not find clippath named %s.", name );
+ LogError(_("Could not find clippath named %s."), name );
_xmlFree(name);
}
View
22 fontforge/ttfspecial.c
@@ -1009,7 +1009,7 @@ return; /* Bad version number */
else
info->chars[j]->comment = pfed_read_ucs2_len(ttf,base+offset,next-offset);
if ( info->chars[j]->comment == NULL )
- LogError("Invalid comment string (negative length?) in 'PfEd' table for glyph %s.",
+ LogError(_("Invalid comment string (negative length?) in 'PfEd' table for glyph %s."),
info->chars[j]->name );
}
}
@@ -1074,7 +1074,7 @@ return; /* Bad version number */
}
if ( ss[j].subs_off!=0 ) {
if ( !sub->anchor_classes )
- LogError("Whoops, attempt to name anchors in a subtable which doesn't contain any\n");
+ LogError(_("Whoops, attempt to name anchors in a subtable which doesn't contain any\n"));
else {
fseek(ttf,base+ss[j].subs_off,SEEK_SET);
a = getushort(ttf);
@@ -1098,13 +1098,13 @@ return; /* Bad version number */
}
/* I guess it's ok for some subtables to be unnamed, so no check for sub!=NULL */
if ( j<s )
- LogError("Whoops, more names than subtables of lookup %s\n", otl->lookup_name );
+ LogError(_("Whoops, more names than subtables of lookup %s\n"), otl->lookup_name );
free(ss);
}
}
/* I guess it's ok for some lookups to be unnamed, so no check for otf!=NULL */
if ( i<n )
- LogError("Whoops, more names than lookups\n" );
+ LogError(_("Whoops, more names than lookups\n") );
free(ls);
}
@@ -1116,7 +1116,7 @@ return( (float) (short) getushort(ttf));
else if ( mod==V_F )
return( getlong(ttf)/256.0 );
else {
- LogError( "Bad data type in contour verb in 'PfEd'\n");
+ LogError(_("Bad data type in contour verb in 'PfEd'\n"));
return( 0 );
}
}
@@ -1132,7 +1132,7 @@ static void pfed_read_normal_contour(FILE *ttf,SplineSet *ss,
verb = getc(ttf);
if ( COM_VERB(verb)!=V_MoveTo ) {
- LogError("Whoops, contours must begin with a move to\n" );
+ LogError(_("Whoops, contours must begin with a move to\n") );
ss->first = ss->last = SplinePointCreate(0,0);
return;
}
@@ -1143,7 +1143,7 @@ return;
verb = getc(ttf);
v = COM_VERB(verb); m = COM_MOD(verb);
if ( m==3 ) {
- LogError("Bad data modifier in contour command in 'PfEd'\n" );
+ LogError(_("Bad data modifier in contour command in 'PfEd'\n") );
break;
}
if ( verb==V_Close || verb==V_End )
@@ -1216,7 +1216,7 @@ return;
sp->prevcp.y = current->nextcp.y+offy1;
sp->noprevcp = false;
} else {
- LogError("Whoops, unexpected verb in contour %d.%d\n", v, m );
+ LogError(_("Whoops, unexpected verb in contour %d.%d\n"), v, m );
break;
}
SplineMake(current,sp,type==2);
@@ -1253,7 +1253,7 @@ static void pfed_read_spiro_contour(FILE *ttf,SplineSet *ss,
if ( ch!=SPIRO_OPEN_CONTOUR && ch!=SPIRO_CORNER && ch!=SPIRO_G4 &&
ch!=SPIRO_G2 && ch!=SPIRO_LEFT && ch!=SPIRO_RIGHT &&
ch!=SPIRO_END && ch!=SPIRO_CLOSE_CONTOUR ) {
- LogError("Whoops, bad spiro command %d\n", ch);
+ LogError(_("Whoops, bad spiro command %d\n"), ch);
break;
}
if ( ss->spiro_cnt>=ss->spiro_max )
@@ -1307,7 +1307,7 @@ static void pfed_read_glyph_layer(FILE *ttf,struct ttfinfo *info,Layer *ly,
cur->transform[j] = getlong(ttf)/32768.0;
gid = getushort(ttf);
if ( gid>=info->glyph_cnt ) {
- LogError("Bad glyph reference in layer info.\n");
+ LogError(_("Bad glyph reference in layer info.\n"));
break;
}
cur->sc = info->chars[gid];
@@ -1337,7 +1337,7 @@ static void pfed_read_glyph_layer(FILE *ttf,struct ttfinfo *info,Layer *ly,
pfed_read_spiro_contour(ttf,ss,base+contours[i].data_off,type);
ss = ss->next;
} else
- LogError("Whoops, Ran out of spiros\n");
+ LogError(_("Whoops, Ran out of spiros\n"));
}
}
free(contours);
View
4 fontforge/ufo.c
@@ -1082,7 +1082,7 @@ return( Py_BuildValue("d",val));
free(contents);
return( ret );
}
- LogError("Unknown python type <%s> when reading UFO/GLIF lib data.", (char *) entry->name);
+ LogError(_("Unknown python type <%s> when reading UFO/GLIF lib data."), (char *) entry->name);
free( contents );
return( NULL );
}
@@ -1722,7 +1722,7 @@ return( NULL );
glyphdir = buildname(basedir,"glyphs");
glyphlist = buildname(glyphdir,"contents.plist");
if ( !GFileExists(glyphlist)) {
- LogError( "No glyphs directory or no contents file\n" );
+ LogError(_("No glyphs directory or no contents file\n") );
free(glyphlist);
return( NULL );
}
View
2  htdocs/changelog.html
@@ -52,6 +52,8 @@ <H1 ALIGN=Center>
<LI>
<B>UI fixes and additions:</B>
<LI>
+ Improved translation coverage for error messages.
+ <LI>
Improved rendering of GTabSet.
<LI>
Fixed mnemonics clash (<I><U>N</U>ext</I> &amp; <I>Glyph <U>N</U>ame</I>)
Please sign in to comment.
Something went wrong with that request. Please try again.