Skip to content

Issue translate encoded html#2427

Merged
MichMich merged 7 commits intoMagicMirrorOrg:developfrom
dannoh:Issue-TranslateEncodedHtml
Jan 21, 2021
Merged

Issue translate encoded html#2427
MichMich merged 7 commits intoMagicMirrorOrg:developfrom
dannoh:Issue-TranslateEncodedHtml

Conversation

@dannoh
Copy link

@dannoh dannoh commented Jan 20, 2021

I didn't create an issue for this, I jumped right to PR, but happy to go back and create the issue if needed.

Problem: The translated string of "LOADING": "Loading …", shows up exactly like that instead of Loading ... when you use {{ "LOADING" | translate }} in a nunjucks template.

I've marked all translated strings as 'safe' so they will be properly decoded now. Since it's the input from a known file this seems safe to me.

Alternatives would be to manually mark all | translate as | translate | safe to ensure there are no encoded characters in it, and that didn't seem great.

@codecov-io
Copy link

codecov-io commented Jan 20, 2021

Codecov Report

Merging #2427 (ad9c254) into develop (1fd506f) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #2427   +/-   ##
========================================
  Coverage    39.42%   39.42%           
========================================
  Files           20       20           
  Lines         1608     1608           
========================================
  Hits           634      634           
  Misses         974      974           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1fd506f...ad9c254. Read the comment docs.

@MichMich MichMich merged commit 01ff00f into MagicMirrorOrg:develop Jan 21, 2021
@khassel khassel mentioned this pull request May 19, 2022
@rejas rejas mentioned this pull request Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants