Skip to content
Open
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
8 changes: 8 additions & 0 deletions devStrings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ export const devSimpleNoArgs = {
codePointsDev: 'Code Points:',
debugModeEnabledToastDev: 'Debug mode enabled!',
debugModeDisabledToastDev: 'Debug mode disabled!',

// gifs
giphyIntegrationSectionTitle: 'Giphy Integration',
giphyIntegrationTitle: 'Enable Giphy Integration',
giphyIntegrationDescription: 'Enable giphy integration in Session (restart needed)',
giphyIntegrationModalDescription:
"Session will connect to Giphy's servers to provide gif. You will not have full metadata protection. Session needs to restart to apply the changes.",
searchForGifs: 'Search for gifs',
} as const;

export type TokenDevNoArgs = keyof typeof devSimpleNoArgs;
1 change: 1 addition & 0 deletions generated/english.ts
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ export const enSimpleNoArgs = {
linkPreviewsSendModalDescription: 'You will not have full metadata protection when sending link previews.',
linkPreviewsTurnedOff: 'Link Previews Are Off',
linkPreviewsTurnedOffDescription: 'Session must contact linked websites to generate previews of links you send and receive.<br/><br/>You can turn them on in Session\'s settings.',

links: 'Links',
loadAccount: 'Load Account',
loadAccountProgressMessage: 'Loading your account',
Expand Down
14 changes: 10 additions & 4 deletions localeTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ function withClause(error: unknown) {
return '';
}

function stringifyError(error: unknown): string {
function stringifyError(error: unknown, msgOnly = false): string {
if (msgOnly) {
if (error && typeof error === 'object' && 'message' in error) {
return String(error.message);
}
return String(error);
}
if (error instanceof Error && error.stack) {
return error.stack + withClause(error);
}
Expand Down Expand Up @@ -279,7 +285,7 @@ export function getRawMessage<T extends MergedLocalizerTokens>(

return pluralString.replaceAll('#', `${num}`);
} catch (error) {
log(stringifyError(error));
log(stringifyError(error, true));
return token;
}
}
Expand Down Expand Up @@ -364,7 +370,7 @@ export class LocalizedStringBuilder<T extends MergedLocalizerTokens> extends Str

return str;
} catch (error) {
log(stringifyError(error));
log(stringifyError(error, true));
return this.token;
}
}
Expand Down Expand Up @@ -427,7 +433,7 @@ export class LocalizedStringBuilder<T extends MergedLocalizerTokens> extends Str

return this.resolvePluralString();
} catch (error) {
log(stringifyError(error));
log(stringifyError(error, true));
return this.token;
}
}
Expand Down