Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/content/ui/subscriptionSelection.js

Issue 11015083: Merge labels and access keys into one string in locales (Closed)
Patch Set: Created July 3, 2013, 9:11 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/content/ui/subscriptionSelection.js
===================================================================
--- a/chrome/content/ui/subscriptionSelection.js
+++ b/chrome/content/ui/subscriptionSelection.js
@@ -165,17 +165,17 @@ function addSubscriptions(list, parent,
title.textContent = node.getAttribute("title") + " (" + node.getAttribute("specialization") + ")";
mainTitle = variant.getAttribute("title");
mainURL = variant.getAttribute("url");
isFirst = false;
}
title.setAttribute("flex", "1");
title.style.marginLeft = (20 * level) + "px";
item.appendChild(title);
-
+
let variantTitle = document.createElement("description");
variantTitle.setAttribute("class", "variant");
variantTitle.textContent = variant.getAttribute("title");
variantTitle.setAttribute("crop", "end");
item.appendChild(variantTitle);
list.appendChild(item);
}
@@ -216,21 +216,22 @@ function setCustomSubscription(title, ur
messageElement.appendChild(document.createTextNode(beforeLink));
let link = document.createElement("label");
link.className = "text-link";
link.setAttribute("tooltiptext", mainSubscriptionURL);
link.addEventListener("click", function() UI.loadInBrowser(mainSubscriptionURL), false);
link.textContent = mainSubscriptionTitle;
messageElement.appendChild(link);
messageElement.appendChild(document.createTextNode(afterLink));
-
+
addMainCheckbox.value = mainSubscriptionURL;
addMainCheckbox.setAttribute("_mainSubscriptionTitle", mainSubscriptionTitle)
- addMainCheckbox.label = addMainCheckbox.getAttribute("_labelTemplate").replace(/\?1\?/g, mainSubscriptionTitle);
- addMainCheckbox.accessKey = addMainCheckbox.accessKey;
+ let [label, accesskey] = Utils.splitLabel(addMainCheckbox.getAttribute("_labelTemplate"));
+ addMainCheckbox.label = label.replace(/\?1\?/g, mainSubscriptionTitle);
+ addMainCheckbox.accessKey = accesskey;
}
else
{
messageElement.setAttribute("invisible", "true");
addMainCheckbox.setAttribute("invisible", "true");
}
}

Powered by Google App Engine
This is Rietveld