mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1453480 - Update Node.localize API to renamed attrs->attributes in fluent-dom 0.2.0. r=smaug on a CLOSED TREE
MozReview-Commit-ID: H47PYERTGxr --HG-- extra : source : 623b37fe0fe82d6eff6634cda655252f95b4f8b1 extra : amend_source : 94e620deedc1459f0d4ce9e083ece78c478c6f5b
This commit is contained in:
parent
3cdc3d9fef
commit
416257ec6b
@ -2738,7 +2738,7 @@ public:
|
||||
}
|
||||
|
||||
Nullable<Sequence<AttributeNameValue>>& attributes =
|
||||
l10nData[i].mAttrs;
|
||||
l10nData[i].mAttributes;
|
||||
if (!attributes.IsNull()) {
|
||||
for (size_t j = 0; j < attributes.Value().Length(); ++j) {
|
||||
// Use SetAttribute here to validate the attribute name!
|
||||
|
@ -25,25 +25,25 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1363862
|
||||
const translations = {
|
||||
"key1": {
|
||||
value: "Value 1",
|
||||
attrs: null,
|
||||
attributes: null,
|
||||
},
|
||||
"key2": {
|
||||
value: null,
|
||||
attrs: [
|
||||
attributes: [
|
||||
{name: "label", value: "Value 2"},
|
||||
{name: "accesskey", value: "K"},
|
||||
]
|
||||
},
|
||||
"key3": {
|
||||
value: "Value 3",
|
||||
attrs: [
|
||||
attributes: [
|
||||
{name: "accesskey", value: "V"},
|
||||
]
|
||||
},
|
||||
"key4": undefined,
|
||||
"key5": {
|
||||
value: null,
|
||||
attrs: [
|
||||
attributes: [
|
||||
{name: "value", value: "Submit Value"},
|
||||
]
|
||||
}
|
||||
@ -118,8 +118,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1363862
|
||||
"element's textContent should be populated with the translation value");
|
||||
}
|
||||
|
||||
if (translation.attrs !== null) {
|
||||
for (const {name, value} of translation.attrs) {
|
||||
if (translation.attributes !== null) {
|
||||
for (const {name, value} of translation.attributes) {
|
||||
ok(elem.getAttribute(name) === value,
|
||||
"attribute value should be populated from the translation");
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ dictionary AttributeNameValue {
|
||||
|
||||
dictionary L10nValue {
|
||||
DOMString? value = null;
|
||||
sequence<AttributeNameValue>? attrs = null;
|
||||
sequence<AttributeNameValue>? attributes = null;
|
||||
};
|
||||
|
||||
callback L10nCallback =
|
||||
|
@ -192,9 +192,9 @@ interface Node : EventTarget {
|
||||
* },
|
||||
* ]
|
||||
* [2] trans == [
|
||||
* {value: "Key 1", attrs: {accesskey: "K"} },
|
||||
* {value: "Key 1", attributes: {accesskey: "K"} },
|
||||
* undefined,
|
||||
* {value: null, attrs: {title: "Unread emails: 5"} },
|
||||
* {value: null, attributes: {title: "Unread emails: 5"} },
|
||||
* ]
|
||||
* [3] untranslatedElements == [
|
||||
* ,
|
||||
|
Loading…
Reference in New Issue
Block a user