MCPcopy
hub / github.com/laurent22/joplin / _

Function _

packages/lib/locale.ts:581–590  ·  view source on GitHub ↗
(s: string, ...args: any[])

Source from the content-addressed store, hash-verified

579}
580
581function _(s: string, ...args: any[]): string {
582 const strings = localeStrings(currentLocale_);
583 let result = strings[s];
584 if (result === '' || result === undefined) result = s;
585 try {
586 return sprintf(result, ...args);
587 } catch (error) {
588 return `${result} ${args.join(', ')} (Translation error: ${error.message})`;
589 }
590}
591
592function _n(singular: string, plural: string, n: number, ...args: any[]) {
593 if (n > 1) return _(plural, ...args);

Callers 15

handleStartFlags_Method · 0.90
reportToLinesMethod · 0.90
stateToLabelMethod · 0.90
startMethod · 0.90
refreshAccessTokenMethod · 0.90
versionInfoFunction · 0.90
labelMethod · 0.90
historyBackward.tsFile · 0.90
synchronize.tsFile · 0.90
historyForward.tsFile · 0.90
statusMethod · 0.90

Calls 1

localeStringsFunction · 0.85

Tested by

no test coverage detected