Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: determine a better path for a new TranslateSkel #1367

Merged
merged 2 commits into from
Jan 23, 2025

Conversation

sveneberth
Copy link
Member

The problem was on the one hand that the path was first determined in __str__, which means that it is not the position where the translate object was created, but where it is converted to a string (this can also be in the renderer). I have therefore moved this to __init__.

Furthermore, the stack loaded in walk_stack() skipped too many frames (we actually need the first frame directly), so this couldn't work either -- except for Jinja. Now we load the stack explicitly from the top.

The problem was on the one hand that the path was first determined in `__str__`, which means that it is not the position where the translate object was created, but where it is converted to a string (this can also be in the renderer).
I have therefore moved this to __init__.

Furthermore, the stack loaded in `walk_stack()` skipped too many frames (we actually need the first frame directly), so this couldn't work either -- except for Jinja. Now we load the stack explicitly from the top.
@sveneberth sveneberth added bug(fix) Something isn't working or address a specific issue or vulnerability Priority: Medium This issue may be useful, and needs some attention. labels Jan 10, 2025
Copy link
Member

@phorward phorward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sveneberth can you please integrate this as part of #1364? I've already been on this, too, last week.

@sveneberth
Copy link
Member Author

@sveneberth can you please integrate this as part of #1364? I've already been on this, too, last week.

But #1364 address core 3.7. and is a wip draft. This is a working fix for 3.6

@sveneberth sveneberth requested a review from phorward January 22, 2025 18:29
@phorward
Copy link
Member

@sveneberth ok for me. Would you integrate this afterwards into #1364?

@sveneberth
Copy link
Member Author

@sveneberth ok for me. Would you integrate this afterwards into #1364?

sure

@phorward phorward merged commit e6a3544 into viur-framework:3.6 Jan 23, 2025
4 checks passed
@sveneberth sveneberth deleted the fix/translate_file_source branch January 24, 2025 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug(fix) Something isn't working or address a specific issue or vulnerability Priority: Medium This issue may be useful, and needs some attention.
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants