Closed Bug 1242935 Opened 4 years ago Closed 4 years ago

Replace {{Xref_csslength}} occurrences with {{cssxref("<length>")}}

Categories

(Developer Documentation :: Macros/Templates, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: teoli, Assigned: prinz.rana04, Mentored)

References

Details

(Whiteboard: [good first bug])

We have 414 occurrences of {{xref_csslength}}, a macro we want to delete [1].

This task is about to go on each of these MDN pages, to edit the page and to replace the occurrence of {{xref_csslength}} with {{cssxref("<length>")}}, to save it and to check that the link is working.

You need an MDN account and the ability to use a WYSIWYG editor to perform this task.

[1] https://developer.mozilla.org/en-US/search?locale=*&kumascript_macros=xref_csslength
Worked on this while working on the others. It's down to 325 occurrences.
Mentor: sebastianzartner
Hello

I would like to work on this bug, I have created an account at MDN.
As it is my first time doing any type of bug fixing.
Could I also have more information on this bug and how should i got about fixing it?
Thanks
Hi,

the task is pretty easy.
As teoli says in comment 0 you need to replace all occurrences of {{xref_csslength}} by {{cssxref("<length>")}} on the pages listed at https://developer.mozilla.org/en-US/search?locale=*&kumascript_macros=xref_csslength.
Currently there are 208 pages left, which need to be fixed.

Sebastian
I've assigned the bug to you now. Please write if you have more questions.

Sebastian
Assignee: nobody → prinz.rana04
prinz.rana04, careful when translating in source edit mode! There you need to HTML escape the arrow brackets, i.e. write {{cssxref("&lt;percentage&gt;")}}.
Otherwise you break the pages, because <percentage> is interpreted as HTML tag.

Example for where you did it wrong:
https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius$compare?locale=en-US&to=1039884&from=1024250

Sebastian
Ah, and please add a revision comment when you edited a page. That makes it easier to see what was changed when looking at the revision history of a page.

Sebastian
Furthermore note that occurrences of {{ xref_csslength() }}, i.e. with brackets after the macro name and/or surrounding spaces, need to be replaced by {{cssxref("<length>")}}, too, as well as any case-sensitive occurrences like e.g. {{Xref_CSSLength}}.

Sebastian
(In reply to Sebastian Zartner [:sebo] from comment #5)
> prinz.rana04, careful when translating in source edit mode! There you need
> to HTML escape the arrow brackets, i.e. write
> {{cssxref("&lt;percentage&gt;")}}.
> Otherwise you break the pages, because <percentage> is interpreted as HTML
> tag.
> 
> Example for where you did it wrong:
> https://developer.mozilla.org/en-US/docs/Web/CSS/border-
> radius$compare?locale=en-US&to=1039884&from=1024250

I've fixed the pages where this caused an obvious error, but please fix the rest of the pages you've already edited.
You can see those pages here:
https://developer.mozilla.org/en-US/dashboards/revisions?locale=&user=Prinz_Rana

Sebastian
Alright next time i;ll be careful when editing the pages.
Currently there are 110 occurrences left, which I'm still working on.
Note that you are still making incorrect edits. See https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-width$compare?locale=en-US&to=1042180&from=1040966 for example.
Please see comment 5 for more info how to edit the pages. If you need help with that, feel free to write me an email.

Sebastian
Here's an example for how it should be done:
https://developer.mozilla.org/en-US/docs/Web/CSS/width$compare?locale=en-US&to=1042192&from=1038928

The steps are:
1. Go to the page.
2. Click the 'Edit' button.
3. Within the editor toolbar click the replace button (the one showing a 'b' and an 'a' with two arrows).
4. Enter 'xref_csslength' (without single quotes) into the search field and 'cssxref("<length>")' (without single quotes) into the replacement field.
5. Click the 'Replace All' button.
6. Add 'Replaced {{xref_csslength}} macro by {{cssxref("<length>")}} (bug 1242935)' (without single quotes) as revision comment
7. Click the 'PUBLISH' button

Sebastian
It's completed, now there are 0 occurrences of {{xref_csslength}} left to replace.
Thank you for editing the pages!
Note that many of the pages still had scripting errors, because the macros had double parameter brackets, i.e. {{cssxref("&lt;length&gt;")()}}. I've fixed those now.

In such cases you'll see a red error message with a sad smiley at the top of the page. So, next time please verify that you didn't break anything with your changes.

Sebastian
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
See Also: → 1283051
You need to log in before you can comment on or make changes to this bug.