DjangoGirls / tutorial

This is a tutorial we are using for Django Girls workshops
http://tutorial.djangogirls.org/
Other
1.53k stars 1.86k forks source link

Markup of "Chromebook setup (if you're using one)" expandable section broken in almost all translations #1468

Open das-g opened 5 years ago

das-g commented 5 years ago

Issue description

The chromebook setup expandable section within the "Installation" chapter is broken in all translations that are up-to-date enough to include it (except Korean): The MarkDown markup isn't correctly rendered and instead parts of the source are shown.

E.g. for Greek, it looks like this:

image

Language

Bug analysis

This is an issue with the include pragma and its surrounding code, not with the included document -- the same content as a separate chapter is rendered correctly. (E.g. Εγκατάσταση (chromebook) for Greek.)

The issue occurs despite these translations all seeming to have the exact source language string

{% include "/chromebook_setup/instructions.md" %}

as a translation in Crowdin (as one would get by clicking the "Copy Source" button there or pressing Alt+c on Crowdin). (Some I checked on Crowdin to actually be identical.)

It seems like the import from Crowdin doesn't handle line breaks in the GitBook-flavoured markdown source correctly, so

<!--sec data-title="Chromebook setup (if you're using one)"
data-id="chromebook_setup" data-collapse=true ces-->
{% include "/chromebook_setup/instructions.md" %}
<!--endsec-->

from the English original somehow becomes

<!--sec data-title="Chromebook setup (if you're using one)"
data-id="chromebook_setup" data-collapse=true ces--> {% include "/chromebook_setup/instructions.md" %} 

<!--endsec-->

in the translations. (E.g. here for Greek), and apparently that is rendered differently by GitBook.

das-g commented 5 years ago

Possible workaround?

[Yet untried:] I think this could be worked around by manually changing these translations on Crowdin from

{% include "/chromebook_setup/instructions.md" %}

to


{% include "/chromebook_setup/instructions.md" %}

i.e., a leading instead of a trailing line break.

Is that something we should try?

das-g commented 5 years ago

I've contacted Crowdin support about this issue through the chat they offer on https://crowdin.com/contacts

They're looking into the problem and will update me via email and/or comment here on this issue.

magul commented 5 years ago

Just quick note here (as I don't want to hijack discussion here), I believe that what You want to resolve in #1462 is actually caused by Crowdin issue with rendering these few tags in destination language, so if You're figuring out this one You can ask them for support regarding this issue also.

das-g commented 5 years ago

Just quick note here (as I don't want to hijack discussion here), I believe that what You want to resolve in #1462 is actually caused by Crowdin issue with rendering these few tags in destination language, so if You're figuring out this one You can ask them for support regarding this issue also.

Let's discuss that in #1462.

das-g commented 5 years ago

Got this by email yesterday:

On 28.01.19 08:52, Crowdin Support Team wrote:

Hello,

I'm following the chat conversation we had some days ago regarding additional lines in .md file upon import

I've contacted the project owner of Django Girls Tutorial to make sure a person in charge of the project is aware of the behavior discussed

As soon as the project owner will confirm that these additional lines do indeed cause troubles and will permitt us to make changes to her project, we'll be able to further investigate the case

Will keep you updated

Have a happy Monday!

das-g commented 5 years ago

I've contacted the project owner of Django Girls Tutorial to make sure a person in charge of the project is aware of the behavior discussed

I guess that means @olasitarska. :smile:

(Not sure why Ola's agreement is needed to fix some Crowdin import behavior that might be a subtlety in usual markdown but is significant in GitBook markdown. @olasitarska, can you keep us updated if anything of public interest comes up? Thanks!)