diff --git a/options/locale_next/locale_en-US.json b/options/locale_next/locale_en-US.json index 1a4036b79b..9db0fb67c6 100644 --- a/options/locale_next/locale_en-US.json +++ b/options/locale_next/locale_en-US.json @@ -561,5 +561,7 @@ "editor.toggle_regex": "Toggle using regular expressions", "editor.toggle_whole_word": "Toggle matching whole words", "form.RunnerName": "Name", + "graphs.recent_commits.title": "Number of commits in the past year", + "graphs.code_frequency.title": "Code frequency over the history of {0}", "meta.last_line": "Thank you for translating Forgejo! This line isn't seen by the users but it serves other purposes in the translation management. You can place a fun fact in the translation instead of translating it." } diff --git a/templates/repo/code_frequency.tmpl b/templates/repo/code_frequency.tmpl index 50ec1beb6b..e6bc097420 100644 --- a/templates/repo/code_frequency.tmpl +++ b/templates/repo/code_frequency.tmpl @@ -2,6 +2,7 @@
diff --git a/templates/repo/recent_commits.tmpl b/templates/repo/recent_commits.tmpl index 5c241d635c..b39dabdaca 100644 --- a/templates/repo/recent_commits.tmpl +++ b/templates/repo/recent_commits.tmpl @@ -2,6 +2,7 @@
diff --git a/tests/e2e/repo-activity-contributors.test.e2e.ts b/tests/e2e/repo-activity-contributors.test.e2e.ts index ece62cfaba..d9096bc8a3 100644 --- a/tests/e2e/repo-activity-contributors.test.e2e.ts +++ b/tests/e2e/repo-activity-contributors.test.e2e.ts @@ -15,3 +15,21 @@ test('Contributor graph', async ({page}) => { await page.getByRole('link', {name: '2 Commits'}).click(); await expect(page.getByRole('cell', {name: 'Bob'})).toHaveCount(2); }); + +test('Code frequency', async ({page}) => { + await page.goto('/user2/commits_search_test/activity/code-frequency'); + + /* Verify that Vue has access to i18n string */ + const header = page.locator('#repo-code-frequency-chart .header'); + await header.waitFor(); + await expect(header).toContainText('Code frequency over the history of user2/commits_search_test'); +}); + +test('Recent commits', async ({page}) => { + await page.goto('/user2/commits_search_test/activity/recent-commits'); + + /* Verify that Vue has access to i18n string */ + const header = page.locator('#repo-recent-commits-chart .header'); + await header.waitFor(); + await expect(header).toContainText('Number of commits in the past year'); +}); diff --git a/web_src/js/components/RepoCodeFrequency.vue b/web_src/js/components/RepoCodeFrequency.vue index 1d40d6d417..5aef63b0d4 100644 --- a/web_src/js/components/RepoCodeFrequency.vue +++ b/web_src/js/components/RepoCodeFrequency.vue @@ -145,7 +145,7 @@ export default {