Skip to content

Commit bbb644c

Browse files
committed
fix: address additional CodeRabbit review comments
- Add .catch() to executeJavaScript in logging to handle promise rejection - Fix PT-BR accents: Ícone, Vídeo Chamada - Keep 'Outlook Calendar' untranslated (brand name) - Add aria-label to SearchInput for accessibility - Use i18n for entries count in log viewer
1 parent 4a37272 commit bbb644c

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

src/i18n/pt-BR.i18n.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@
427427
"auth": "Autenticação",
428428
"connection": "Conexão",
429429
"notification": "Notificação",
430-
"outlook": "Calendário Outlook",
430+
"outlook": "Outlook Calendar",
431431
"videoCall": "Video Chamada",
432432
"download": "Download",
433433
"spellCheck": "Verificação Ortográfica",
@@ -447,7 +447,7 @@
447447
"logViewer": {
448448
"title": "Visualizador de Logs",
449449
"aria": {
450-
"logIcon": "Icone do visualizador de logs",
450+
"logIcon": "Ícone do visualizador de logs",
451451
"entriesCount": "{{count}} entradas de log exibidas"
452452
},
453453
"fileInfo": {
@@ -500,8 +500,8 @@
500500
"main": "Processo Principal",
501501
"renderer": "Renderizador",
502502
"webview": "Webview",
503-
"videocall": "Video Chamada",
504-
"outlook": "Calendario Outlook",
503+
"videocall": "Vídeo Chamada",
504+
"outlook": "Outlook Calendar",
505505
"auth": "Autenticação",
506506
"updates": "Atualizações",
507507
"notifications": "Notificações",

src/logViewerWindow/logViewerWindow.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,7 @@ function LogViewerWindow() {
755755
</Box>
756756
<Box minWidth='x200' marginInlineEnd='x12'>
757757
<SearchInput
758+
aria-label={t('logViewer.placeholders.searchLogs')}
758759
placeholder={t('logViewer.placeholders.searchLogs')}
759760
value={searchFilter}
760761
onChange={handleSearchFilterChange}
@@ -831,7 +832,9 @@ function LogViewerWindow() {
831832
borderRadius: '4px',
832833
}}
833834
>
834-
{filteredLogs.length} entries
835+
{t('logViewer.fileInfo.entries', {
836+
count: filteredLogs.length,
837+
})}
835838
</div>
836839
<Virtuoso
837840
ref={virtuosoRef}

src/logging/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,12 @@ export const setupWebContentsLogging = () => {
255255
})();
256256
`;
257257

258-
webContents.executeJavaScript(consoleOverrideScript);
258+
webContents.executeJavaScript(consoleOverrideScript).catch((err) => {
259+
log.warn(
260+
`[logging] Failed to inject console override into webContents ${webContents.id}:`,
261+
err
262+
);
263+
});
259264
} catch (error) {
260265
logLoggingFailure(
261266
error,

0 commit comments

Comments
 (0)