<button data-l10n="text-content" id="leave-game">Leave current game</button>
<button id="clear-game" data-l10n="text-content">Restart</button>
<p id="p-number"><span data-l10n="text-content">Game number:</span> <span id="number" data-l10n="text-content">(pending)</span></p>
- <p id="p-name"> <span data-l10n="text-content">You are:</span> <span id="name" data-l10n="text-content">(name to give)</span><br /><button class="minibutton" id="change-name" data-l10n="text-content">Change</button></p>
+ <p id="p-name"> <span data-l10n="text-content">You are:</span> <span id="name" data-l10n="text-content">(name to give)</span> <button class="minibutton" id="change-name" title="Change" aria-label="Change" data-l10n="title,aria-label">✏️</button></p>
<div id="chat-messages"></div>
<textarea id="chat-ta" placeholder="Write a message to your adversaries here" data-l10n="placeholder"></textarea>
<button id="chat-btn" class="minibutton" data-l10n="text-content">Send message</button>
document.documentElement.setAttribute("xml:lang", libD.lang);
for (const node of [].slice.call(document.querySelectorAll("[data-l10n]"))) {
- if (node.dataset.l10n === "text-content") {
- node.textContent = _(node.textContent.trim());
- } else {
- node.setAttribute(node.dataset.l10n, _(node.getAttribute(node.dataset.l10n)));
+ for (const e of node.dataset.l10n.split(",")) {
+ if (e === "text-content") {
+ node.textContent = _(node.textContent.trim());
+ } else {
+ node.setAttribute(e, _(node.getAttribute(e)));
+ }
}
}