diff --git a/static/app/views/explore/logs/confidenceFooter.tsx b/static/app/views/explore/logs/confidenceFooter.tsx index eb723ebef07bfa..777889f993e54a 100644 --- a/static/app/views/explore/logs/confidenceFooter.tsx +++ b/static/app/views/explore/logs/confidenceFooter.tsx @@ -75,59 +75,61 @@ function ConfidenceMessage({ } const noSampling = defined(isSampled) && !isSampled; - const matchingLogsCount = ; + const matchingLogsCount = + sampleCount > 1 + ? t('%s matches', ) + : t('%s match', ); const downsampledLogsCount = rawLogCounts.normal.count ? ( - + rawLogCounts.normal.count > 1 ? ( + t('%s samples', ) + ) : ( + t('%s sample', ) + ) ) : ( ); const allLogsCount = rawLogCounts.highAccuracy.count ? ( - + rawLogCounts.highAccuracy.count > 1 ? ( + t('%s logs', ) + ) : ( + t('%s log', ) + ) ) : ( ); - const suffix = rawLogCounts.highAccuracy.count ? t('logs') : ''; if (dataScanned === 'full') { if (!hasUserQuery) { if (isTopN) { return tct('Log count for top [topEvents] groups: [matchingLogsCount]', { topEvents, - matchingLogsCount, + matchingLogsCount: , }); } return tct('Log count: [matchingLogsCount]', { - matchingLogsCount, + matchingLogsCount: , }); } // For logs, if the full data was scanned, we can assume that no // extrapolation happened and we should remove mentions of extrapolation. if (isTopN) { - return tct( - '[matchingLogsCount] matching logs for top [topEvents] groups after scanning [allLogsCount] [suffix]', - { - topEvents, - matchingLogsCount, - allLogsCount, - suffix, - } - ); - } - - return tct( - '[matchingLogsCount] matching logs after scanning [allLogsCount] [suffix]', - { + return tct('[matchingLogsCount] for top [topEvents] groups in [allLogsCount]', { + topEvents, matchingLogsCount, allLogsCount, - suffix, - } - ); + }); + } + + return tct('[matchingLogsCount] in [allLogsCount]', { + matchingLogsCount, + allLogsCount, + }); } const downsampledTooltip = ; @@ -140,27 +142,25 @@ function ConfidenceMessage({ if (isTopN) { return tct( - '[warning] Extrapolated from [matchingLogsCount] matching logs for top [topEvents] groups after scanning [tooltip:[downsampledLogsCount] of [allLogsCount] [suffix]]', + '[warning] Extrapolated from [matchingLogsCount] for top [topEvents] groups after scanning [tooltip:[downsampledLogsCount] of [allLogsCount]]', { warning, topEvents, matchingLogsCount, downsampledLogsCount, allLogsCount, - suffix, tooltip: downsampledTooltip, } ); } return tct( - '[warning] Extrapolated from [matchingLogsCount] matching logs after scanning [tooltip:[downsampledLogsCount] of [allLogsCount] [suffix]]', + '[warning] Extrapolated from [matchingLogsCount] after scanning [tooltip:[downsampledLogsCount] of [allLogsCount]]', { warning, matchingLogsCount, downsampledLogsCount, allLogsCount, - suffix, tooltip: downsampledTooltip, } );