-
Notifications
You must be signed in to change notification settings - Fork 302
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
🪲 code highlighting in slides does not work properly for translations on Alpha #6112
Comments
For a moment I fell into thinking the issue is the same in prod. Highlighting works in prod Hedy slides. I thought the backend for alpha would be the same as prod. Could this be a sign for a bug that is about to slip into prod? |
Hi, I am sorry I may have caused a confusion here: Highlighting works on "https://hedy.org", the prod, but the problem here is about "https://hedy-alpha.herokuapp.com", the alpha. check these two for comparison: There are disconnections between the two deployments and this is one of them. Marking this as a bug might not be what it should be, so please act cautiously as I see you made a PR on "main". The solution should already be in the production code, and probably just needs to be replicated to alpha. Again, excuse me for the misunderstanding, |
Hello @yilmazdurmaz Thank you for reporting this issue. It is indeed a bug that exists on alpha that would have slipped to production, so there was not a misunderstanding at all. Recently we made improvements to the highlighting mechanism in Hedy, so there is no way to replicate the solution on production to alpha - we need to fix forward instead. Hopefully, my PR will address the highlighting issue in all editors. |
@boryanagoncharenko , it is nice. I wasn't really sure about them, and that explains much: these things on alpha are nasties to slip prod. I will then continue reporting my findings on alpha while checking my translations. |
PR #6085 makes uses of `data-level` and `data-kwlang` but these are never set. As a result, the language of the highlighter always defaults to English regardless of the current language. This PR makes some minimal changes to address the issue. Fixes #6112 **How to test** As an anonymous user go to /hedy and change the language to Turkish (or any other language). In the editor paste `yazdır test` and check that the first word is highlighted as a command. Do the same check for the /tryit page and a logged in user. Co-Authored-By: Rico Hermans <rix0rrr@gmail.com> Co-Authored-By: rix0rrr <rix0rrr@users.noreply.github.com> Co-Authored-By: Rico Huijbers <rix0rrr@gmail.com>
Describe the bug
I am testing my translations in slides for possible errors in code fragments and saw this issue. I have also tested this on a few other languages.
Highlighting for English are fine. Translations uses plain grey for everything until level 4.
From then on, variables, quoted string, numbers are colored but mostly in different colors from English version. see screenshots below.
Some command keywords even change color depending where they are used, but they are mostly grey.
Paste the Hedy code & level
All slides
Add a screenshot (optional)
screenshot from level 1 slides

screenshot from level 13 slides

What machine and browser you were using (optional)
Windows 10, MS Edge latest
The text was updated successfully, but these errors were encountered: