Adjust output of 'Insert Code Sample Template' button

VERIFIED FIXED

Status

developer.mozilla.org
Editing
--
enhancement
VERIFIED FIXED
2 years ago
a year ago

People

(Reporter: sebo, Unassigned)

Tracking

(Blocks: 1 bug, {in-triage})

Details

(Whiteboard: [specification][type:change])

(Reporter)

Description

2 years ago
+++ This bug was initially created as a clone of Bug #1246684 +++

Two things should be done:
1. Lowercase all occurrences of the word 'Content'[1]
2. Remove the 'name' attribute from the heading[2]
3. Remove the spaces from the macro[3]

Sebastian

[1] https://developer.mozilla.org/en-US/docs/MDN/Contribute/Guidelines/Writing_style_guide#Page_titles

[2] https://github.com/Elchi3/mdn-doc-tests/blob/master/data/tests/name-attribute.js (not an official rule, but marked as error by the MDN documentation tester add-on)

[3] https://developer.mozilla.org/en-US/docs/MDN/Contribute/Structures/Macros#Using_a_macro_in_content (not an official rule, though in the examples macros never have spaces.
Yes please.

Although I thought we'd decided to use headings "JavaScript", "HTML", and "CSS" rather than "JavaScript content" etc. I could be mistaken though. Doesn't matter a lot, I suppose.
Keywords: in-triage
(Reporter)

Comment 2

2 years ago
(In reply to Eric Shepherd [:sheppy] from comment #1)
> Yes please.
> 
> Although I thought we'd decided to use headings "JavaScript", "HTML", and
> "CSS" rather than "JavaScript content" etc. I could be mistaken though.
> Doesn't matter a lot, I suppose.

You're right. At least that's what I get from https://groups.google.com/d/topic/mozilla.dev.mdc/49oqJAHFnWQ/discussion.

Sebastian
Duplicate of this bug: 1312489
I've submitted https://github.com/mozilla/kuma/pull/4190, which fixes this issue.

Comment 5

a year ago
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/a73a6a23637b15739d5d6c43496d8035be8a8e52
Bug 1298615 - Fix output of Insert Live Sample Template button

This fixes the issues in bug 1298615 as follows:

1. The labels of the subsections are now simply "CSS", "HTML", and
"JavaScript". This affects translations although the changes should
be pretty minimal.

2. Removed the "name" attribute from the headings.

3. Removed the unneeded spaces from inside the generated EmbedLiveSample
macro.

https://github.com/mozilla/kuma/commit/9601018a62559cfbf6ee4826301a3295bb3f2280
Merge pull request #4190 from mozilla/fix-livesample-subtitles-1298615

Bug 1298615 - Fix output of Insert Live Sample Template button
Deployed to staging and production
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
(Reporter)

Comment 7

a year ago
Works as expected. Thanks!
The only missing part is that "Content" should also have been turned into lowercase in the sample texts, but that's not a big deal as they will be replaced by the people, anyway.

Sebastian
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.