flattenthecurve / guide

https://www.flattenthecurve.com
Creative Commons Attribution 4.0 International
38 stars 33 forks source link

Disclaimer for missing scientific review #351

Closed rousik closed 4 years ago

rousik commented 4 years ago

This work is derived from a prototype by @kendrahavens. The placement of the notice, text and the styling is theirs. I have incorporated feedback from @matiasgarciaisaia about how to deal with string translations.

This consist of:

  1. pending-sci-review string that should be soon translated into all target languages
  2. _include/pending-sci-review.html notice that can be included in md files. Notice will only show up if the content has been translated into the current language.
  3. css style for the notice

I'm working on modifications to the import_language.rb script that will insert the disclaimer notices into files when it detects that they have not been scientifically reviewed.

github-actions[bot] commented 4 years ago

This pull request is being automatically deployed with now-deployment

Built with commit 944f3a6cb7d867e792a12e0c793ea39f939d3abb

✅ Preview: https://guide-preview-pd58repd1.now.sh

rousik commented 4 years ago

The markdown=1 attribute on the enclosing p tag takes care of it.

On Thu, Apr 16, 2020, 17:10 Matías García Isaía notifications@github.com wrote:

@matiasgarciaisaia requested changes on this pull request.

Sorry. I've just checked, and the string isn't auto-translated from markdown to HTML.

There's a markdownify filter we could use (ie, {{ site.data[site.active_lang].strings['pending-sci-review'] }} | markdownify), but it also creates an extra enclosing p element.

So maybe it just makes sense to change the string value to HTML?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/flattenthecurve/guide/pull/351#pullrequestreview-395059946, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYSCGFMVHVA2SC4UGHD5PDRM6F7VANCNFSM4MKH3SWA .

matiasgarciaisaia commented 4 years ago

Can you share the extra code that's needed to test this (ie, making the disclaimer appear)?

I've added:

{%- include pending-sci-review.html -%}

To the _include/header.html, but it doesn't parse the markdown unless I add the markdownify filter.

matiasgarciaisaia commented 4 years ago

(not trying to push your buttons - it's just that I don't want us to send to translation a string and then have it updated)

rousik commented 4 years ago

No worries at all. I have tested this locally and added {% include pending-sci-review.html %} to a page within act_and_prepare. It is working, see attached screenshot (hopefully github and mail integrate well):

On Thu, Apr 16, 2020 at 6:15 PM Matías García Isaía < notifications@github.com> wrote:

(not trying to push your buttons - it's just that I don't want us to send to translation a string and then have it updated)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/flattenthecurve/guide/pull/351#issuecomment-614963700, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYSCGBC7YWNYRU3UDUDCRDRM6NTNANCNFSM4MKH3SWA .