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
5 changes: 4 additions & 1 deletion packages/cli/src/cli/cmd/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,10 @@ export default new Command()
console.log(`• Per-language breakdown:`);
for (const locale of targetLocales) {
const words = totalWordCount.get(locale) || 0;
const percent = ((words / totalWordsToTranslate) * 100).toFixed(1);
const percent =
totalWordsToTranslate === 0
? 0.0
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ternary operator has a type inconsistency. The true branch returns 0.0 (a number), while the false branch returns the result of .toFixed(1) (a string). This should be "0.0" (a string) to match the type returned by .toFixed(1).

const percent =
  totalWordsToTranslate === 0
    ? "0.0"
    : ((words / totalWordsToTranslate) * 100).toFixed(1);
Suggested change
? 0.0
? "0.0"

Copilot uses AI. Check for mistakes.
: ((words / totalWordsToTranslate) * 100).toFixed(1);
console.log(
` - ${locale}: ~${words.toLocaleString()} words (${percent}% of total)`,
);
Expand Down
16 changes: 8 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading