canmove, Confirmed users
2,056
edits
m (→StringBundle) |
|||
Line 123: | Line 123: | ||
let barFormatted = strings.get("bar", [arg1, arg2]); | let barFormatted = strings.get("bar", [arg1, arg2]); | ||
for each (let string in strings.getAll()) | for each (let string in strings.getAll()) | ||
dump (string.key + " = " + string.value + "\n"); | dump(string.key + " = " + string.value + "\n"); | ||
Note: in addition to the API described above, the StringBundle object supports the API for the <code>stringbundle</code> XBL binding to make it easier to switch from the binding to the module: | Note: in addition to the API described above, the StringBundle object supports the API for the <code>stringbundle</code> XBL binding to make it easier to switch from the binding to the module: | ||
Line 134: | Line 134: | ||
while (enumerator.hasMoreElements()) { | while (enumerator.hasMoreElements()) { | ||
let string = enumerator.getNext().QueryInterface(Ci.nsIPropertyElement); | let string = enumerator.getNext().QueryInterface(Ci.nsIPropertyElement); | ||
dump (string.key + " = " + string.value + "\n"); | dump(string.key + " = " + string.value + "\n"); | ||
} | } | ||