Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions api/test/widget-catalogs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,18 @@ for (const widget of widgets.filter(hasCatalog)) {
}
});
}

const LINK_LABEL = /(^|\.)[A-Za-z]*[hH]ref\.label$/;
const OPTIONAL = /\s*[((][^))]*[))]$/;

test('every link field in a language has the same label', () => {
for (const lang of LANGUAGES) {
const labels = new Set();
for (const w of widgets.filter(hasCatalog)) {
for (const [key, value] of Object.entries(readCatalog(w, lang))) {
if (LINK_LABEL.test(key)) labels.add(value.replace(OPTIONAL, ''));
}
}
assert.equal(labels.size, 1, `${lang}: ${[...labels].join(' | ')}`);
}
});
2 changes: 1 addition & 1 deletion ui/widgets/connections/i18n/fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"vpn.url.placeholder.netbird": "http://netbird:33073",
"vpn.apiKey.label": "کلید API",
"vpn.token.label": "توکن دسترسی (PAT)",
"vpn.href.label": "آدرس کلیک",
"vpn.href.label": "آدرس پیوند",
"vpn.href.placeholder": "http://your-server:8000",
"vpn.showIp.label": "نمایش آدرس IP",
"vpn.showIp.hint": "برای هر کسی که داشبورد را می‌بیند نمایان است. وقتی تونل قطع است، این آدرس خانه شماست.",
Expand Down
Loading