diff --git a/CHANGELOG.md b/CHANGELOG.md index f3b8e28..f0017dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Changed +- The link `check` prints when translations are missing, in the terminal report and the GitHub job summary, is now `https://localhero.ai/cli`. + ### Fixed - `check` run without a `localhero.json` reads a Rails YAML file by its root key, as Rails does. A file named for one locale whose root key names another (`sr.yml` starting with `sr-Latn:`) had every key reported as an orphan and every source key as missing. Its keys are now checked, and the report says once which file defines which locale. Applies only when the source YAML files are wrapped in the source locale. A target whose root key is the source locale is still reported, since Rails would load it as the source language. diff --git a/src/utils/check-summary.ts b/src/utils/check-summary.ts index c622eb4..f7a2565 100644 --- a/src/utils/check-summary.ts +++ b/src/utils/check-summary.ts @@ -23,7 +23,7 @@ export interface StepSummaryInput { missingTranslations: boolean; } -export const FILL_MISSING_POINTER = 'Localhero.ai can fill missing translations automatically: https://localhero.ai'; +export const FILL_MISSING_POINTER = 'Localhero.ai can fill missing translations automatically: https://localhero.ai/cli'; const MAX_LISTED_PROBLEMS = 50; const COLUMNS: [keyof ProblemCounts, string][] = [ diff --git a/tests/commands/check.test.ts b/tests/commands/check.test.ts index 8b76311..e39f6a2 100644 --- a/tests/commands/check.test.ts +++ b/tests/commands/check.test.ts @@ -459,7 +459,7 @@ describe('check command', () => { await check({}, deps() as never); const lastLine = stripAnsi(String(mockConsole.log.mock.calls.at(-1)?.[0])); - expect(lastLine).toContain('Localhero.ai can fill missing translations automatically: https://localhero.ai'); + expect(lastLine).toContain('Localhero.ai can fill missing translations automatically: https://localhero.ai/cli'); }); it('leaves out the pointer when nothing is missing', async () => { @@ -749,7 +749,7 @@ describe('check command', () => { expect(appendFile).toHaveBeenCalledWith('/summary.md', expect.any(String)); expect(summary()).toContain('Missing translation for "new" (locale sv) in `config/locales/sv.yml`'); expect(summary()).toContain('| sv | 1 | 0 | 0 | 0 | 0 | 1 |'); - expect(summary()).toContain('https://localhero.ai'); + expect(summary()).toContain('https://localhero.ai/cli'); }); it('passes when the pull request adds no problems', async () => { diff --git a/tests/utils/check-summary.test.ts b/tests/utils/check-summary.test.ts index c528c20..ae4ea58 100644 --- a/tests/utils/check-summary.test.ts +++ b/tests/utils/check-summary.test.ts @@ -24,7 +24,7 @@ describe('buildStepSummary', () => { expect(markdown).toContain('### Existing problems'); expect(markdown).toContain('| sv | 3 | 0 | 0 | 0 | 0 | 1 |'); expect(markdown).not.toContain('| de |'); - expect(markdown).toContain('Localhero.ai can fill missing translations automatically: https://localhero.ai\n'); + expect(markdown).toContain('Localhero.ai can fill missing translations automatically: https://localhero.ai/cli\n'); }); it('says when the change adds no problems and leaves out the Localhero.ai line without missing translations', () => {