xcomponent 0.8.1__tar.gz → 0.8.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xcomponent-0.8.1 → xcomponent-0.8.2}/CHANGELOG.md +4 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/Cargo.lock +1 -1
- {xcomponent-0.8.1 → xcomponent-0.8.2}/Cargo.toml +1 -1
- {xcomponent-0.8.1 → xcomponent-0.8.2}/PKG-INFO +1 -1
- {xcomponent-0.8.1 → xcomponent-0.8.2}/pyproject.toml +1 -1
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/python/xcomponent/adapters/babel.py +10 -2
- {xcomponent-0.8.1 → xcomponent-0.8.2}/uv.lock +1 -1
- {xcomponent-0.8.1 → xcomponent-0.8.2}/.github/workflows/build-sdist.yml +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/.github/workflows/build-wheels.yml +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/.github/workflows/publish-doc.yml +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/.github/workflows/publish-pypi.yml +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/.github/workflows/release.yml +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/.github/workflows/tests-artifacts.yml +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/.github/workflows/tests.yml +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/.gitignore +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/.python-version +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/Justfile +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/LICENSE +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/README.md +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/docs/Makefile +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/docs/source/conf.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/docs/source/develop/.gitkeep +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/docs/source/index.md +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/docs/source/user/changelog.md +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/docs/source/user/getting_started.md +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/scripts/get_version.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/scripts/write_changelog.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/python/xcomponent/__init__.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/python/xcomponent/adapters/__init__.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/python/xcomponent/py.typed +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/python/xcomponent/service/__init__.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/python/xcomponent/service/catalog.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/python/xcomponent/xcore.pyi +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/rust/catalog/catalog.rs +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/rust/catalog/mod.rs +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/rust/context.rs +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/rust/expression/ast/eval.rs +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/rust/expression/ast/mod.rs +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/rust/expression/ast/model.rs +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/rust/expression/ast/parse.rs +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/rust/expression/grammar.pest +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/rust/expression/i18n.rs +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/rust/expression/mod.rs +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/rust/expression/parser.rs +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/rust/expression/tokens.rs +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/rust/lib.rs +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/rust/markup/grammar.pest +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/rust/markup/mod.rs +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/rust/markup/parser.rs +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/src/rust/markup/tokens.rs +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/__init__.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/functionals/__init__.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/functionals/i18n/__init__.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/functionals/i18n/babel.ini +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/functionals/i18n/fr.mo +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/functionals/i18n/fr.po +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/functionals/i18n/mydomain.pot +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/functionals/i18n/test_l10n.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/__init__.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/adapters/__init__.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/adapters/test_babel.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/conftest.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/expression/test_binary_eq.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/expression/test_binary_op.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/expression/test_binary_op_bool.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/expression/test_default_values.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/expression/test_field_access.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/expression/test_for_expr.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/expression/test_func.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/expression/test_if_expr.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/expression/test_let.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/expression/test_nested.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/expression/test_render_comment.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/expression/test_script.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/expression/test_str_dedent.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/expression/test_str_method.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/expression/test_types.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/expression/test_unary.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/test_core.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/test_named_component.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/test_render_attributes.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/test_render_context.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/test_render_globals.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/test_render_globals_obj.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/test_render_globals_obj2.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/test_render_nested_dict.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/test_render_nested_node.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/test_render_node.py +0 -0
- {xcomponent-0.8.1 → xcomponent-0.8.2}/tests/unittests/test_render_script.py +0 -0
|
@@ -33,7 +33,11 @@ def extract_from_markup(node: XNode, offset: int) -> Iterator[ExtractionInfo]:
|
|
|
33
33
|
for nfo in extract_from_markup(child, offset):
|
|
34
34
|
yield nfo
|
|
35
35
|
case XExpression(expr):
|
|
36
|
-
|
|
36
|
+
try:
|
|
37
|
+
msgs = extract_expr_i18n_messages(expr)
|
|
38
|
+
except SyntaxError:
|
|
39
|
+
# should log something here
|
|
40
|
+
return
|
|
37
41
|
for msg in msgs:
|
|
38
42
|
match msg.funcname:
|
|
39
43
|
case "gettext":
|
|
@@ -149,6 +153,10 @@ def extract_xcomponent(
|
|
|
149
153
|
|
|
150
154
|
for tok, value, (lineno, _), _, _ in tokens:
|
|
151
155
|
if tok == STRING:
|
|
152
|
-
|
|
156
|
+
try:
|
|
157
|
+
markup = parse_markup(f"<>{value}</>")
|
|
158
|
+
except ValueError:
|
|
159
|
+
# should log something here
|
|
160
|
+
continue
|
|
153
161
|
for messageinfo in extract_from_markup(markup, lineno):
|
|
154
162
|
yield messageinfo
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|