c3po/converters/po_csv.py
def _prepare_polib_files(files_dict, filename, languages,
                         locale_root, po_files_path, header):
    """
    Prepare polib file object for writing/reading from them.
    Create directories and write header if needed. For each language,
    ensure there's a translation file named "filename" in the correct place.
    Assumes (and creates) a directory structure:
    <locale_root>/<lang>/<po_files_path>/<filename>.
    """
    files_dict[filename] = {}
    for lang in languages:
        file_path = os.path.join(locale_root, lang, po_files_path)
        if not os.path.exists(file_path):
            os.makedirs(file_path)

        if header is not None:
            _write_header(os.path.join(file_path, filename), lang, header)

        files_dict[filename][lang] = polib.pofile(
            os.path.join(file_path, filename), encoding="UTF-8")
def _prepare_polib_files(files_dict, filename, languages,
                         locale_root, po_files_path, header):
    """
    Prepare polib file object for writing/reading from them.
    Create directories and write header if needed. For each language,
    ensure there's a translation file named "filename" in the correct place.
    Assumes (and creates) a directory structure:
    <locale_root>/<lang>/<po_files_path>/<filename>.
    """
    files_dict[filename] = {}
    for lang in languages:
        file_path = os.path.join(locale_root, lang, po_files_path)
        if not os.path.exists(file_path):
            os.makedirs(file_path)

        if header is not None:
            _write_header(os.path.join(file_path, filename), lang, header)

        files_dict[filename][lang] = polib.pofile(
            os.path.join(file_path, filename), encoding="UTF-8")
def _prepare_polib_files ( files_dict , filename , languages , locale_root , po_files_path , header ) : files_dict [ filename ] = { } for lang in languages : file_path = os . path . join ( locale_root , lang , po_files_path ) if not os . path . exists ( file_path ) : os . makedirs ( file_path ) if header is not None : _write_header ( os . path . join ( file_path , filename ) , lang , header ) files_dict [ filename ] [ lang ] = polib . pofile ( os . path . join ( file_path , filename ) , encoding = "UTF-8" )
Prepare polib file object for writing/reading from them.
    Create directories and write header if needed. For each language,
    ensure there's a translation file named "filename" in the correct place.
    Assumes (and creates) a directory structure:
    <locale_root>/<lang>/<po_files_path>/<filename>.
Prepare polib file object for writing / reading from them . Create directories and write header if needed . For each language ensure there s a translation file named filename in the correct place . Assumes ( and creates ) a directory structure : <locale_root > / <lang > / <po_files_path > / <filename > .