This repository has been archived by the owner on Jan 17, 2023. It is now read-only.
Remove uses of attr="${}"
from ui.js
#3840
Labels
code quality
Not a bug, targeted for fixing in 2018
code
Code quality issue, that does not have any outward effect on the product
firefox
Something that has to ship in the add-on in Firefox
Milestone
We've grown a bunch of uses of:
We have some quoting in place, but really we just shouldn't do this at all. We have a
localizeText()
function in ui.js, and should extend that to handle attributes. Maybe<button data-l10n-title="saveScreenshotSelectedArea">
(if it's just titles we're dealing with).Otherwise if we don't go that route, we should do quoting inline IMHO. We should be able to statically determine that a value is properly quoted for its context, and not rely on secondary functions (like
getAttributeText()
). Or, maybe, we could name the functions to make it clear, likegetHtmlQuotedLocalizedText()
– but there's limited savings, because it takes a certain number of letters to say that something is quoted, and function composition or long names doesn't change it much.The text was updated successfully, but these errors were encountered: