INNER CODE UNIT · Python
get_source_files_from_dirs
multitheftauto/mtasa-blue · utils/localization/build_gettext_catalog.py:31
def get_source_files_from_dirs(dirs: t.List[Path]) -> t.List[Path]:
return [
file_path
for dir_path in dirs
for file_path in get_source_files_from_dir(dir_path)
]
def write_directory_list_file(files: t.List[Path], fp: t.TextIO):
fp.writelines(f"{path}\n" for path in files)
def main(output: Path, version: str, xgettext: str, paths: t.Optional[t.List[Path]] = None) -> None:
paths = paths or [Path("Client"), Path("Shared")]
# If we have .pot in the destination, strip it (xgettext seems to append an extension regardless)
output = output.with_suffix("")