fix(tiles): a tile's + menu items get their disabled reason in Chinese

Found live in zh-CN: the + menu's session items stayed titled "The grid
holds at most 6 tiles". Each item carried data-i18n-skip on the whole
button to keep the session name as typed, and the translator skips an
element's attributes along with its text. Only the name is skipped now (a
child span, as the picker does), so the title is translated.

The zh-CN coverage test classified a title inside a skipped subtree as
user text, which is how this got past it; such a label is now a failure
of its own ("no UI label sits inside a skipped subtree").

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer
2026-10-07 01:20:22 +02:00
parent c848e7cf27
commit dfb9f32e23
4 changed files with 20 additions and 5 deletions
+6 -2
View File
@@ -529,8 +529,12 @@ Object.assign(CodemanApp.prototype, {
const item = document.createElement('button');
item.type = 'button';
item.setAttribute('role', 'menuitem');
item.setAttribute('data-i18n-skip', '');
item.textContent = c.label;
// Only the name is user text: skipping the whole button would keep its
// title (why it is disabled) out of the translator too.
const name = document.createElement('span');
name.setAttribute('data-i18n-skip', '');
name.textContent = c.label;
item.appendChild(name);
item.disabled = full;
if (full) item.title = limit.full;
item.addEventListener('click', () => {