MCPcopy Index your code
hub / github.com/pywebio/PyWebIO / t

Function t

webiojs/src/i18n.ts:124–136  ·  view source on GitHub ↗
(msgid: string, ...args: string[])

Source from the content-addressed store, hash-verified

122}
123
124export function t(msgid: string, ...args: string[]): string {
125 let fmt = null;
126 for (let lang of ['custom', userLangCode, langPrefix, 'en']) {
127 if (translations[lang] && translations[lang][msgid]) {
128 fmt = translations[lang][msgid];
129 break;
130 }
131 }
132 if (fmt === null)
133 throw Error(`No translation for "${msgid}" in "${userLangCode}"`);
134
135 return strfmt.apply(null, [fmt, ...args]);
136}

Callers 8

send_messageMethod · 0.90
send_bufferMethod · 0.90
_sendMethod · 0.90
create_elementMethod · 0.90
submitMethod · 0.90
output.tsFile · 0.90
pin.tsFile · 0.90
create_elementMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected