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/lingo germany #8269

Closed
wants to merge 3 commits into from
Closed

Conversation

linonetwo
Copy link
Contributor

@linonetwo linonetwo commented Jun 17, 2024

fixes #8263 fixes #8262 @pmario

Copy link

vercel bot commented Jun 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
tiddlywiki5 ✅ Ready (Inspect) Visit Preview Jun 17, 2024 5:29pm

@linonetwo linonetwo marked this pull request as ready for review June 17, 2024 10:42
core/wiki/macros/lingo.tid Outdated Show resolved Hide resolved
<$let language-code={{{ [[$:/language]get[text]get[name]else[en-GB]] }}}>
<$transclude $tiddler={{{ [<active-lingo-base>addsuffix<language-code>addsuffix[/]addsuffix<title>] }}} $mode=<<parseMode>>/>
<$transclude $tiddler={{{ [<active-lingo-base>addsuffix<language-code>addsuffix[/]addsuffix<title>] }}} $mode=<<parseMode>>>
Copy link
Member

Choose a reason for hiding this comment

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

Indent level seems to be wrong

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is 1 level above let, isn't wrong

Copy link
Member

Choose a reason for hiding this comment

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

Sorry. I always put my comments below the issue. So IMO transclude has the wrong indent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

截屏2024-06-19 14 40 54

I didn't see any wrong in vscode

Copy link
Member

Choose a reason for hiding this comment

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

Have a look at the file. https://github.com/Jermolene/TiddlyWiki5/blob/e9568720489ae5fe9ee74cd16330b8168028beff/core/wiki/macros/lingo.tid#L20C1-L20C9 Line 20 uses spaces instead of tabs for indentation. If you fix that it should work

@pmario
Copy link
Member

pmario commented Jun 17, 2024

I can create a dependency tree, that will fall back to English instead of German, which technically would be wrong. -- But -- There is a fallback now.

The dependency tree mentioned above is "constructed to fail". It's not very likely to be a real world configuration.

@pmario
Copy link
Member

pmario commented Jun 17, 2024

@Jermolene -- This is a fix, that needs to go into v5.3.4, since it would be a general regression.

This PR is related to: menu-bar German translation first take #8264

@linonetwo
Copy link
Contributor Author

I will write a JS version later. I was also afraid that so many transluction widget will be slow.

@linonetwo linonetwo closed this Jun 19, 2024
@pmario
Copy link
Member

pmario commented Jun 19, 2024

hmmm, I do not really see a performance problem, for UI elements, which most of the translations are.

"Inner" transclusions are only executed, if they do not return anything. So the transclusion-widget returns early.

All the filters strings are "compiled" into js-functions and cached internally.

I will write a JS version later.

What will be the advantage of a JS version?

Edit: OK I did see the conversation starting at: #7821 (comment) --- So forget about that question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants