fix: describe rendering target in log messages
This commit is contained in:
1 parent
96398a40f0
commit
c98443ac72
6 files changed
+18
-12
No files matched your search
@@ -160,7 +160,7 @@ def run(opts: AppStreamRenderOpts) -> None:
|
||||
default = build_default_pack(manifest, manifest.source_language)
|
||||
context = _AppStreamRenderContext(packs, default)
|
||||
logging.info(
|
||||
"rendering languages: %s (default %s)",
|
||||
"Rendering FreeDesktop AppStream file with languages: %s (default %s)",
|
||||
", ".join(str(pack.lang) for pack in packs.values()),
|
||||
default.lang,
|
||||
)
|
||||
|
||||
@@ -160,7 +160,7 @@ def run(opts: DesktopRenderOpts) -> None:
|
||||
default = build_default_pack(manifest, manifest.source_language)
|
||||
context = _DesktopRenderContext(packs, default)
|
||||
logging.info(
|
||||
"rendering languages: %s (default %s)",
|
||||
"Rendering FreeDesktop Desktop file with languages: %s (default %s)",
|
||||
", ".join(str(pack.lang) for pack in packs.values()),
|
||||
default.lang,
|
||||
)
|
||||
|
||||
@@ -104,8 +104,7 @@ def register(parser: ArgumentParser) -> None:
|
||||
type=Path,
|
||||
required=True,
|
||||
help=(
|
||||
"The path to the input user-provided Liquid for the .isl "
|
||||
"messages files."
|
||||
"The path to the input user-provided Liquid for the .isl messages files."
|
||||
),
|
||||
metavar="FILE",
|
||||
)
|
||||
@@ -187,7 +186,9 @@ class _InnoIssPathContext:
|
||||
raise KeyError(key)
|
||||
|
||||
|
||||
def _resolve_inno_lang(pack: LanguagePack, inno_version: InnoVersion) -> tuple[Optional[str], bool]:
|
||||
def _resolve_inno_lang(
|
||||
pack: LanguagePack, inno_version: InnoVersion
|
||||
) -> tuple[Optional[str], bool]:
|
||||
"""Resolve a language pack to its conventional Inno Setup language
|
||||
name and officiality, against the targeted Inno Setup version.
|
||||
|
||||
@@ -342,9 +343,7 @@ class _InnoIssTemplateContext:
|
||||
inno_version: InnoVersion,
|
||||
):
|
||||
self.__default = _InnoIslTemplateContext(source, inno_version)
|
||||
self.__langs = tuple(
|
||||
_InnoLanguageView(pack, inno_version) for pack in langs
|
||||
)
|
||||
self.__langs = tuple(_InnoLanguageView(pack, inno_version) for pack in langs)
|
||||
|
||||
def keys(self) -> tuple[str, ...]:
|
||||
"""Return the names of the top-level template variables."""
|
||||
@@ -375,7 +374,8 @@ def run(opts: InnoRenderOpts) -> None:
|
||||
# The conventional Inno Setup language names are derived per language
|
||||
# by the context views, best effort.
|
||||
logging.info(
|
||||
"rendering languages: %s", ", ".join(str(pack.lang) for pack in ordered)
|
||||
"Rendering InnoSetup files with languages: %s",
|
||||
", ".join(str(pack.lang) for pack in ordered),
|
||||
)
|
||||
|
||||
# Every component renders with its own environment, so their filters
|
||||
|
||||
@@ -260,7 +260,10 @@ def run(opts: MsixRenderOpts) -> None:
|
||||
source = build_default_pack(manifest, manifest.source_language)
|
||||
ordered = [source, *packs.values()]
|
||||
langs = tuple(msix_lang_map.convert(pack.lang).value for pack in ordered)
|
||||
logging.info("rendering languages: %s", ", ".join(langs))
|
||||
logging.info(
|
||||
"Rendering MSIX files with languages: %s",
|
||||
", ".join(str(pack.lang) for pack in ordered),
|
||||
)
|
||||
|
||||
# Every component renders with its own environment, so their filters
|
||||
# never interfere with each other.
|
||||
|
||||
@@ -284,7 +284,10 @@ def run(opts: PlistRenderOpts) -> None:
|
||||
source = build_default_pack(manifest, manifest.source_language)
|
||||
ordered = [source, *packs.values()]
|
||||
langs = tuple(plist_lang_map.convert(pack.lang).value for pack in ordered)
|
||||
logging.info("rendering languages: %s", ", ".join(langs))
|
||||
logging.info(
|
||||
"Rendering PList files with languages: %s",
|
||||
", ".join(str(pack.lang) for pack in ordered),
|
||||
)
|
||||
|
||||
# Every component renders with its own environment, so their filters
|
||||
# never interfere with each other.
|
||||
|
||||
@@ -180,7 +180,7 @@ def run(opts: RcRenderOpts) -> None:
|
||||
)
|
||||
context = _RcRenderContext(packs)
|
||||
logging.info(
|
||||
"rendering languages: %s",
|
||||
"Rendering Windows RC file with languages: %s",
|
||||
", ".join(str(pack.lang) for pack in packs.values()),
|
||||
)
|
||||
env = create_environment()
|
||||
|
||||
Reference in new issue
Block a user