Skip to content

Prepare JS French section for Markdown #1574

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

Merged
merged 16 commits into from
Jul 30, 2021

Conversation

SphinxKnight
Copy link
Member

This is a follow-up of https://github.com/mdn/translated-content/discussions/1236
I tried to follow @wbamberg PRs and I assume review would be easier to follow commit per commit.

I did not yet try to convert the section using the conversion tool.

@SphinxKnight SphinxKnight requested a review from tristantheb July 17, 2021 06:09
@SphinxKnight SphinxKnight requested a review from a team as a code owner July 17, 2021 06:09
@github-actions github-actions bot added the l10n-fr Issues related to French content. label Jul 17, 2021
@wbamberg
Copy link
Contributor

Amazing! When you run the conversion tool you will get a report talking about all the things that couldn't get converted, and this may flag some extra things that need to get done. There's a bit of explanation of the report's format here: mdn/content#5193 (comment). Of course please feel free to ask if you have questions :).

@SphinxKnight SphinxKnight marked this pull request as draft July 18, 2021 08:28
@SphinxKnight
Copy link
Member Author

Converting this as a draft as long as the output of the converter is not clean.
@tristantheb feel free to start this enchanting little review tho :x

@SphinxKnight SphinxKnight marked this pull request as ready for review July 30, 2021 17:10
@SphinxKnight
Copy link
Member Author

@tristantheb En me mettant à ta place, je me dis que celle-ci va être plutôt compliquée à revoir de façon classique. N'hésite pas si tu as besoin d'indications ou d'un coup de main (quitte à faire une revue "statistique" en prenant quelques docs au hasard...)

L'idée de cette PR est d'avoir un rapport de yarn md h2m web/javascript --locale fr --mode dry relativement clean (reste les tableaux, kbd, etc.
md-conversion-problems-report-2021-07-30T17:08:26.459Z.md

@SphinxKnight
Copy link
Member Author

@wbamberg If you have a few moments, I'd really appreciate a look at the last report (cf. link from previous comment) to check if that seems ok for you or if I missed something.

@tristantheb tristantheb merged commit 2a76c37 into mdn:main Jul 30, 2021
@wbamberg
Copy link
Contributor

wbamberg commented Jul 30, 2021

Hey @SphinxKnight .

I see a couple of things that might be worth a look:

code (7)

7 unconvertible code elements. This is most likely because of a code element that contains other markup, where the other markup does not have the same text content as the code. For example:

`<code>this one <em>here</em></code>`

The issue here is that you can't represent this directly in GFM. Something like:

`this one *here*`

....will be rendered like

this one *here*

...rather than:

this one here

The converter is clever enough to invert the nesting in cases like:

`<code><em>this one here</em></code>`

...to generate markdown like:

*`this one here`*

....which renders properly:

this one here

But this trick only works, of course, if the inner content is the same as the outer content.

Probably the converter should just discard this internal markup, but so far it's been simpler to remove it manually in the content. I guess I removed them in mdn/content#6880.

img[alt="Stack, heap, queue"]...

Probably this isn't being converted because of inline styles?


Apart from these there's nothing obviously needing work. It might be worth looking through some of the unconverted tables to see if any of them are easily fixed, but as noted we expect many tables to be unconvertible (and per mdn/content#7342, sometimes we probably want to use HTML even if a table can be converted!).

Note that the summary only shows the top 20 unconvertibles, so there might be a few which aren't listed there. Honestly we should tweak the report so it shows them all.

Nice work, fr l10n people!

@SphinxKnight
Copy link
Member Author

Thanks @wbamberg, I'll address the code in another PR and then, I'll open the PR for HTML -> MD for JS section in fr :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
l10n-fr Issues related to French content.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants