mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-13 06:17:26 +00:00
chore(i18n): migrate migration descriptions to json (#9041)
Followup to https://codeberg.org/forgejo/forgejo/pulls/8987 * migrate strings, get rid of the `repo.` prefix * simplify template and test Followup to https://codeberg.org/forgejo/forgejo/pulls/8736#issuecomment-6801385 * restore lost translations Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9041 Reviewed-by: Beowulf <beowulf@beocode.eu>
This commit is contained in:
parent
9b54852aad
commit
af7066de64
63 changed files with 330 additions and 333 deletions
|
@ -119,13 +119,9 @@ func TestRepoMigrationTypeSelect(t *testing.T) {
|
|||
headers := page.Find(".migrate-entry h3").Text()
|
||||
descriptions := page.Find(".migrate-entry .description").Text()
|
||||
|
||||
sourceNames := []string{"github", "gitea", "gitlab", "gogs", "onedev", "gitbucket", "codebase", "forgejo"}
|
||||
sourceNames := []string{"github", "gitea", "gitlab", "gogs", "onedev", "gitbucket", "codebase", "forgejo", "pagure"}
|
||||
for _, sourceName := range sourceNames {
|
||||
assert.Contains(t, strings.ToLower(headers), sourceName)
|
||||
assert.Contains(t, descriptions, locale.Tr(fmt.Sprintf("repo.migrate.%s.description", sourceName)))
|
||||
assert.Contains(t, descriptions, locale.Tr(fmt.Sprintf("migrate.%s.description", sourceName)))
|
||||
}
|
||||
|
||||
// Special case
|
||||
assert.Contains(t, strings.ToLower(headers), "pagure")
|
||||
assert.Contains(t, descriptions, locale.Tr("migrate.pagure.description")) // Not prefixed with repo.
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue