common/i18n.py
changeset 2458 4d114865098f
parent 2395 e3093fc12a00
child 2476 1294a6bdf3bf
equal deleted inserted replaced
2457:d0f31e119936 2458:4d114865098f
    61 
    61 
    62 def compile_i18n_catalogs(sourcedirs, destdir, langs):
    62 def compile_i18n_catalogs(sourcedirs, destdir, langs):
    63     """generate .mo files for a set of languages into the `destdir` i18n directory
    63     """generate .mo files for a set of languages into the `destdir` i18n directory
    64     """
    64     """
    65     from logilab.common.fileutils import ensure_fs_mode
    65     from logilab.common.fileutils import ensure_fs_mode
    66     print 'compiling %s catalogs...' % destdir
    66     print '-> compiling %s catalogs...' % destdir
    67     errors = []
    67     errors = []
    68     for lang in langs:
    68     for lang in langs:
    69         langdir = join(destdir, lang, 'LC_MESSAGES')
    69         langdir = join(destdir, lang, 'LC_MESSAGES')
    70         if not exists(langdir):
    70         if not exists(langdir):
    71             create_dir(langdir)
    71             create_dir(langdir)