Commit 9a0fcb94 authored by Akira TAGOH's avatar Akira TAGOH

Add the ruleset description support

Trying to address what these configuration files really do.
This change allows to see the short description that mention
the purpose of the content in the config file and obtain
them through API.

This change also encourage one who want to make some UI for
the user-specific configuration management. it is the main
purpose of this change for me though.

Aside from that, I've also made programs translatable. so
we see more dependencies on the build time for gettext,
and itstool to generate PO from xml.
parent 0c149259
......@@ -22,8 +22,9 @@
# PERFORMANCE OF THIS SOFTWARE.
SUBDIRS=fontconfig fc-case fc-lang src \
fc-cache fc-cat fc-list fc-match fc-pattern fc-query fc-scan \
fc-validate conf.d test
fc-cache fc-cat fc-conflist fc-list fc-match \
fc-pattern fc-query fc-scan fc-validate conf.d \
po po-conf test
if ENABLE_DOCS
SUBDIRS += doc
endif
......@@ -31,11 +32,12 @@ endif
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = \
fontconfig.pc.in \
fonts.conf.in \
config.rpath \
fontconfig.pc.in \
fonts.conf.in \
fonts.dtd \
fontconfig.spec.in \
fontconfig.spec \
fontconfig.spec.in \
fontconfig.spec \
fontconfig-zip.in \
config-fixups.h
CLEANFILES = fonts.conf
......
......@@ -49,6 +49,8 @@ AUTOCONF=${AUTOCONF-autoconf}
GPERF=${GPERF-gperf}
PYTHON=${PYTHON-python}
LIBTOOLIZE_FLAGS="--copy --force"
GETTEXTIZE=${GETTEXTIZE-gettextize}
GETTEXTIZE_FLAGS="--force"
DIE=0
......@@ -84,7 +86,13 @@ if $have_libtool ; then : ; else
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
fi
($GETTEXTIZE --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have gettext installed to compile $PROJECT."
echo "Install the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile $PROJECT."
......@@ -133,6 +141,9 @@ if test -z "$AUTOGEN_SUBDIR_MODE" -a -z "$NOCONFIGURE"; then
fi
fi
echo Running $GETTEXTIZE $GETTEXTIZE_FLAGS
$GETTEXTIZE $GETTEXTIZE_FLAGS
echo Running $ACLOCAL $ACLOCAL_FLAGS
$ACLOCAL $ACLOCAL_FLAGS
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Enable autohinter</description>
<!-- Use the Autohinter -->
<match target="pattern">
<!--
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Set hintfull to hintstyle</description>
<match target="pattern">
<!--
This configuration is available on the major desktop environments.
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Set hintmedium to hintstyle</description>
<match target="pattern">
<!--
This configuration is available on the major desktop environments.
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Set hintnone to hintstyle</description>
<match target="pattern">
<!--
This configuration is available on the major desktop environments.
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Set hintslight to hintstyle</description>
<match target="pattern">
<!--
This configuration is available on the major desktop environments.
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Disable sub-pixel rendering</description>
<!-- Disable sub-pixel rendering -->
<match target="pattern">
<!--
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Bitmap scaling</description>
<!--
If font is bitmap, calculate scale factor.
Note that color bitmap fonts have scalable=true, while
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Enable sub-pixel rendering with the BGR stripes layout</description>
<!-- Enable sub-pixel rendering -->
<match target="pattern">
<!--
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Enable sub-pixel rendering with the RGB stripes layout</description>
<!-- Enable sub-pixel rendering -->
<match target="pattern">
<!--
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Enable sub-pixel rendering with the vertical BGR stripes layout</description>
<!-- Enable sub-pixel rendering -->
<match target="pattern">
<!--
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Enable sub-pixel rendering with the vertical RGB stripes layout</description>
<!-- Enable sub-pixel rendering -->
<match target="pattern">
<!--
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Disable hinting</description>
<!-- Disable hinting -->
<match target="pattern">
<!--
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Use lcddefault as default for LCD filter</description>
<!-- Use lcddefault as default for LCD filter -->
<match target="pattern">
<!--
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Use lcdlegacy as default for LCD filter</description>
<!-- Use lcdlegacy as default for LCD filter -->
<match target="pattern">
<!--
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Use lcdlight as default for LCD filter</description>
<!-- Use lcdlight as default for LCD filter -->
<match target="pattern">
<!--
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Disable hinting for Bitstream Vera fonts when the size is less than 8ppem</description>
<!--
The Bitstream Vera fonts have GASP entries suggesting that hinting be
disabled below 8 ppem, but FreeType ignores those, preferring to use
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Disable hinting for CJK fonts</description>
<!-- We can't hint CJK fonts well, so turn off hinting for CJK fonts. -->
<match target="font">
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Set substitutions for similar/metric-compatible families</description>
<!--
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Set substitutions for non-Latin fonts</description>
<!--
Mark common families with their generics so we'll get
something reasonable
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Set substitutions for emoji/math fonts</description>
<!-- Keep in sync with 60-generic.conf -->
<!-- Emoji -->
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Set substitutions for Latin fonts</description>
<!--
Mark common families with their generics so we'll get
something reasonable
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Add sans-serif to the family when no generic name</description>
<!--
If the font still has no generic name, add sans-serif
-->
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Load per-user customization files</description>
<!--
Load per-user customization files where stored on XDG Base Directory
specification compliant places. it should be usually:
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Load local customization file</description>
<!-- Load local system customization file -->
<include ignore_missing="yes">local.conf</include>
</fontconfig>
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Set preferable fonts for emoji/math fonts</description>
<!-- Keep in sync with 45-generic.conf -->
<!-- Emoji -->
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Set preferable fonts for Latin</description>
<alias>
<family>serif</family>
<prefer>
......
......@@ -31,6 +31,10 @@
2008 Behdad Esfahbod: Cleanup. Add fantasy and cursive.
-->
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<!-- Deprecated fonts are discouraged -->
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<alias>
<family>serif</family>
<prefer>
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Set preferable fonts for non-Latin</description>
<alias>
<family>serif</family>
<prefer>
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<alias>
<family>serif</family>
<prefer>
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Reject bitmap fonts</description>
<!-- Reject bitmap fonts -->
<selectfont>
<rejectfont>
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Accept bitmap fonts</description>
<!-- Accept bitmap fonts -->
<selectfont>
<acceptfont>
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<!-- Fix-ups for Delicious family -->
<!-- Delicious 'heavy' variant says its Medium weight -->
......
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<!--
Artificial oblique for fonts without an italic or oblique version
-->
......
......@@ -89,6 +89,20 @@ AC_SUBST(LIBT_CURRENT_MINUS_AGE)
PKGCONFIG_REQUIRES=
PKGCONFIG_REQUIRES_PRIVATELY=
dnl ==========================================================================
dnl gettext stuff
dnl ==========================================================================
GETTEXT_PACKAGE=$PACKAGE
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
AM_GNU_GETTEXT([external])
AC_PATH_PROG(ITSTOOL, [itstool])
if test -z "$ITSTOOL"; then
AC_MSG_ERROR([The itstool were not found. Please install itstool.])
fi
dnl ==========================================================================
case "$host" in
......@@ -732,6 +746,7 @@ src/Makefile
conf.d/Makefile
fc-cache/Makefile
fc-cat/Makefile
fc-conflist/Makefile
fc-list/Makefile
fc-match/Makefile
fc-pattern/Makefile
......@@ -740,6 +755,8 @@ fc-scan/Makefile
fc-validate/Makefile
doc/Makefile
doc/version.sgml
po/Makefile.in
po-conf/Makefile.in
test/Makefile
fontconfig.spec
fontconfig.pc
......
......@@ -410,3 +410,38 @@ this function calls FcConfigSetCurrent() internally.
@SINCE@ 2.10.92
@@
@RET@ void
@FUNC@ FcConfigFileInfoIterInit
@TYPE1@ FcConfig * @ARG1@ config
@TYPE2@ FcConfigFileInfoIter * @ARG2@ iter
@PURPOSE@ Initialize the iterator
@DESC@
Initialize 'iter' with the first iterator in the config file information list.
@SINCE@ 2.12.91
@@
@RET@ FcBool
@FUNC@ FcConfigFileInfoIterNext
@TYPE1@ FcConfig * @ARG1@ config
@TYPE2@ FcConfigFileInfoIter * @ARG2@ iter
@PURPOSE@ Set the iterator to point to the next list
@DESC@
Set 'iter' to point to the next node in the config file information list.
If there is no next node, FcFalse is returned.
@SINCE@ 2.12.91
@@
@RET@ FcBool
@FUNC@ FcConfigFileInfoIterGet
@TYPE1@ FcConfig * @ARG1@ config
@TYPE2@ FcConfigFileInfoIter * @ARG2@ iter
@TYPE3@ FcChar8 ** @ARG3@ name
@TYPE4@ FcChar8 ** @ARG4@ description
@TYPE5@ FcBool * @ARG5@ enabled
@PURPOSE@ Obtain the configuration file information
@DESC@
Obtain the filename, the description and the flag whether it is enabled or not
for 'iter' where points to current configuration file information.
If the iterator is invalid, FcFalse is returned.
@SINCE@ 2.12.91
@@
......@@ -49,6 +49,14 @@
#undef STRICT
#endif
#ifdef ENABLE_NLS
#include <libintl.h>
#define _(x) (dgettext(GETTEXT_PACKAGE, x))
#else
#define dgettext(d, s) (s)
#define _(x) (x)
#endif
#ifndef O_BINARY
#define O_BINARY 0
#endif
......@@ -87,34 +95,34 @@ usage (char *program, int error)
{
FILE *file = error ? stderr : stdout;
#if HAVE_GETOPT_LONG
fprintf (file, "usage: %s [-EfrsvVh] [-y SYSROOT] [--error-on-no-fonts] [--force|--really-force] [--sysroot=SYSROOT] [--system-only] [--verbose] [--version] [--help] [dirs]\n",
fprintf (file, _("usage: %s [-EfrsvVh] [-y SYSROOT] [--error-on-no-fonts] [--force|--really-force] [--sysroot=SYSROOT] [--system-only] [--verbose] [--version] [--help] [dirs]\n"),
program);
#else
fprintf (file, "usage: %s [-EfrsvVh] [-y SYSROOT] [dirs]\n",
fprintf (file, _("usage: %s [-EfrsvVh] [-y SYSROOT] [dirs]\n"),
program);
#endif
fprintf (file, "Build font information caches in [dirs]\n"
"(all directories in font configuration by default).\n");
fprintf (file, _("Build font information caches in [dirs]\n"
"(all directories in font configuration by default).\n"));
fprintf (file, "\n");
#if HAVE_GETOPT_LONG
fprintf (file, " -E, --error-on-no-fonts raise an error if no fonts in a directory\n");
fprintf (file, " -f, --force scan directories with apparently valid caches\n");
fprintf (file, " -r, --really-force erase all existing caches, then rescan\n");
fprintf (file, " -s, --system-only scan system-wide directories only\n");
fprintf (file, " -y, --sysroot=SYSROOT prepend SYSROOT to all paths for scanning\n");
fprintf (file, " -v, --verbose display status information while busy\n");
fprintf (file, " -V, --version display font config version and exit\n");
fprintf (file, " -h, --help display this help and exit\n");
fprintf (file, _(" -E, --error-on-no-fonts raise an error if no fonts in a directory\n"));
fprintf (file, _(" -f, --force scan directories with apparently valid caches\n"));
fprintf (file, _(" -r, --really-force erase all existing caches, then rescan\n"));
fprintf (file, _(" -s, --system-only scan system-wide directories only\n"));
fprintf (file, _(" -y, --sysroot=SYSROOT prepend SYSROOT to all paths for scanning\n"));
fprintf (file, _(" -v, --verbose display status information while busy\n"));
fprintf (file, _(" -V, --version display font config version and exit\n"));
fprintf (file, _(" -h, --help display this help and exit\n"));
#else
fprintf (file, " -E (error-on-no-fonts)\n");
fprintf (file, " raise an error if no fonts in a directory\n");
fprintf (file, " -f (force) scan directories with apparently valid caches\n");
fprintf (file, " -r, (really force) erase all existing caches, then rescan\n");
fprintf (file, " -s (system) scan system-wide directories only\n");
fprintf (file, " -y SYSROOT (sysroot) prepend SYSROOT to all paths for scanning\n");
fprintf (file, " -v (verbose) display status information while busy\n");
fprintf (file, " -V (version) display font config version and exit\n");
fprintf (file, " -h (help) display this help and exit\n");
fprintf (file, " -E (error-on-no-fonts)\n"));
fprintf (file, _(" raise an error if no fonts in a directory\n"));
fprintf (file, _(" -f (force) scan directories with apparently valid caches\n"));
fprintf (file, _(" -r, (really force) erase all existing caches, then rescan\n"));
fprintf (file, _(" -s (system) scan system-wide directories only\n"));
fprintf (file, _(" -y SYSROOT (sysroot) prepend SYSROOT to all paths for scanning\n"));
fprintf (file, _(" -v (verbose) display status information while busy\n"));
fprintf (file, _(" -V (version) display font config version and exit\n"));
fprintf (file, _(" -h (help) display this help and exit\n"));
#endif
exit (error);
}
......@@ -151,7 +159,7 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
if (FcStrSetMember (processed_dirs, dir))
{
if (verbose)
printf ("skipping, looped directory detected\n");
printf (_("skipping, looped directory detected\n"));
continue;
}
......@@ -161,7 +169,7 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
case ENOENT:
case ENOTDIR:
if (verbose)
printf ("skipping, no such directory\n");
printf (_("skipping, no such directory\n"));
break;
default:
fprintf (stderr, "\"%s\": ", dir);
......@@ -174,7 +182,7 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
if (!S_ISDIR (statb.st_mode))
{
fprintf (stderr, "\"%s\": not a directory, skipping\n", dir);
fprintf (stderr, _("\"%s\": not a directory, skipping\n"), dir);
continue;
}
was_processed = FcTrue;
......@@ -196,7 +204,7 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
cache = FcDirCacheRead (dir, FcTrue, config);
if (!cache)
{
fprintf (stderr, "%s: error scanning\n", dir);
fprintf (stderr, _("\"%s\": scanning error\n"), dir);
ret++;
continue;
}
......@@ -205,18 +213,18 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
if (was_valid)
{
if (verbose)
printf ("skipping, existing cache is valid: %d fonts, %d dirs\n",
printf (_("skipping, existing cache is valid: %d fonts, %d dirs\n"),
FcCacheNumFont (cache), FcCacheNumSubdir (cache));
}
else
{
if (verbose)
printf ("caching, new cache contents: %d fonts, %d dirs\n",
printf (_("caching, new cache contents: %d fonts, %d dirs\n"),
FcCacheNumFont (cache), FcCacheNumSubdir (cache));
if (!FcDirCacheValid (dir))
{
fprintf (stderr, "%s: failed to write cache\n", dir);
fprintf (stderr, _("%s: failed to write cache\n"), dir);
(void) FcDirCacheUnlink (dir, config);
ret++;
}
......@@ -225,7 +233,7 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
subdirs = FcStrSetCreate ();
if (!subdirs)
{
fprintf (stderr, "%s: Can't create subdir set\n", dir);
fprintf (stderr, _("%s: Can't create subdir set\n"), dir);
ret++;
FcDirCacheUnload (cache);
continue;
......@@ -239,7 +247,7 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
FcStrSetDestroy (subdirs);
if (!sublist)
{
fprintf (stderr, "%s: Can't create subdir list\n", dir);
fprintf (stderr, _("%s: Can't create subdir list\n"), dir);
ret++;
continue;
}
......@@ -314,7 +322,7 @@ main (int argc, char **argv)
sysroot = FcStrCopy ((const FcChar8 *)optarg);
break;
case 'V':
fprintf (stderr, "fontconfig version %d.%d.%d\n",
fprintf (stderr, "fontconfig version %d.%d.%d\n",
FC_MAJOR, FC_MINOR, FC_REVISION);
exit (0);
case 'v':
......@@ -345,7 +353,7 @@ main (int argc, char **argv)
}
if (!config)
{