Skip to content
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

All hidden paragraphs about Browser Compatibility can be deleted #1008

Closed
peterbe opened this issue May 28, 2021 · 17 comments · Fixed by #1292 or #1902
Closed

All hidden paragraphs about Browser Compatibility can be deleted #1008

peterbe opened this issue May 28, 2021 · 17 comments · Fixed by #1292 or #1902

Comments

@peterbe
Copy link
Contributor

peterbe commented May 28, 2021

See mdn/content#2228
Basically, in mdn/content all occurrences of HTML like this:

<div class="hidden">The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</div>

or

<div class="hidden">
<p>The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
</div>

or

<p class="hidden">The compatibility table in this page is generated from structured data.
  If you'd like to contribute to the data, please check out <a
    href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a>
  and send us a pull request.</p>

These can all be deleted from the source content.

@peterbe
Copy link
Contributor Author

peterbe commented May 28, 2021

Here's a great example of a PR that does it: https://github.com/mdn/content/pull/5351/files

@peterbe
Copy link
Contributor Author

peterbe commented May 28, 2021

@mdn/yari-content-fr @mdn/yari-content-ru @mdn/yari-content-ko @mdn/yari-content-ja @mdn/yari-content-pt-br @mdn/yari-content-zh
I encourage you to grab https://gist.github.com/peterbe/8e64574dcfea77b73f60d0c5da9e07b2 and download it and modify it. As you can see there, in the first iteration I made it focus on files/ja/web/http and as you can see the NEEDLE string is for Japanese.
WIth that script, I was able to create #1009
Please have a look to see if you can use that automation and/or write your own automation and/or doing some manual search-and-replace.

@t7yang
Copy link
Collaborator

t7yang commented May 28, 2021

@mdn/yari-content-zh done by PR #1010.

@sashasushko
Copy link
Member

Also removed in RU by #1062

@t7yang thx for regexp

potappo pushed a commit that referenced this issue May 31, 2021
clovislima added a commit to clovislima/translated-content that referenced this issue Jun 3, 2021
josielrocha pushed a commit that referenced this issue Jun 4, 2021
)

* chore: Remove all hidden paragraphs about Browser compabitility on pt-BR

following #1008

* chore: Continue the removal of hidden paragraphs about Browser compability

* chore: Normalize Browser compability name and id

* chore: normalize id from Browser Compatibility title
@tristantheb
Copy link
Member

Hi, I started this cleaning for the FR version, it will require some time and some PR because there are 1560 results in total...


@SphinxKnight Bon on va avoir du boulot, tu préfère quel format sur ce changement sachant que quand je vais t'envoyer les PR je ne touche rien des articles en dehors du bloc. Ce qui veut dire que les BCD seront encore dans Compat(). À moins que je profite de ces PR pour déplacer ça en haut de page et mettre {{Specifications}} ?
Et combien de pages par PR te conviendrais ? Parce qu'on a 1548 fichiers à toucher pour 1560 blocs ^^'

@hochan222
Copy link
Member

hochan222 commented Jun 13, 2021

Removed in ko by #1176

Hi, I started this cleaning for the ko-locale version. There were so many different translations for that sentence that I could only process 199 out of 30 cases.

I plan to write this down in the Korean guidelines/issue. Also, I plan to process it as a regular expression after adding it.

It's OK to close that issue for Korean locales.

@t7yang
Copy link
Collaborator

t7yang commented Jun 13, 2021

@hochan222 You can try my regex #1010, basically it work with any language.

@hochan222
Copy link
Member

hochan222 commented Jun 13, 2021

@t7yang Thank you. I solved it by referring to regular expressions (+little change). Have a nice day :)

@peterbe
Copy link
Contributor Author

peterbe commented Jun 21, 2021

@SphinxKnight
Copy link
Member

@irvin I'm seeing some opened PRs left for this one, I assume this should be kept opened :) Let me know if not :)

@t7yang
Copy link
Collaborator

t7yang commented Jun 24, 2021

@SphinxKnight Is was my fault, I use the Fix keyword in comment.

@irvin
Copy link
Collaborator

irvin commented Jun 24, 2021

a-ha, seems that github automatically closed this one when closing #1292

SphinxKnight added a commit to SphinxKnight/translated-content that referenced this issue Aug 4, 2021
@SphinxKnight SphinxKnight linked a pull request Aug 4, 2021 that will close this issue
SphinxKnight added a commit that referenced this issue Aug 4, 2021
@SphinxKnight
Copy link
Member

If I got my regexp right <.*? class="hidden">.*(browser-compat-data).*<\/.*?> I think this is it for this one.

caugner pushed a commit to caugner/translated-content that referenced this issue Aug 29, 2022
caugner pushed a commit to caugner/translated-content that referenced this issue Aug 30, 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
8 participants