aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/migrate
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo/migrate')
-rw-r--r--templates/repo/migrate/codebase.tmpl34
-rw-r--r--templates/repo/migrate/git.tmpl24
-rw-r--r--templates/repo/migrate/gitbucket.tmpl40
-rw-r--r--templates/repo/migrate/gitea.tmpl38
-rw-r--r--templates/repo/migrate/github.tmpl40
-rw-r--r--templates/repo/migrate/gitlab.tmpl38
-rw-r--r--templates/repo/migrate/gogs.tmpl38
-rw-r--r--templates/repo/migrate/migrate.tmpl2
-rw-r--r--templates/repo/migrate/migrating.tmpl32
-rw-r--r--templates/repo/migrate/onedev.tmpl34
-rw-r--r--templates/repo/migrate/options.tmpl14
11 files changed, 167 insertions, 167 deletions
diff --git a/templates/repo/migrate/codebase.tmpl b/templates/repo/migrate/codebase.tmpl
index 394e7c2ecf..62dfbd5c85 100644
--- a/templates/repo/migrate/codebase.tmpl
+++ b/templates/repo/migrate/codebase.tmpl
@@ -6,25 +6,25 @@
{{template "base/disable_form_autofill"}}
{{.CsrfTokenHtml}}
<h3 class="ui top attached header">
- {{.locale.Tr "repo.migrate.migrate" .service.Title}}
+ {{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}}
<input id="service_type" type="hidden" name="service" value="{{.service}}">
</h3>
<div class="ui attached segment">
{{template "base/alert" .}}
<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
- <label for="clone_addr">{{.locale.Tr "repo.migrate.clone_address"}}</label>
+ <label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
<span class="help">
- {{.locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.locale.Tr "repo.migrate.clone_local_path"}}{{end}}
+ {{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.locale.Tr "repo.migrate.clone_local_path"}}{{end}}
</span>
</div>
<div class="inline field {{if .Err_Auth}}error{{end}}">
- <label for="auth_username">{{.locale.Tr "username"}}</label>
+ <label for="auth_username">{{ctx.Locale.Tr "username"}}</label>
<input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
</div>
<div class="inline field {{if .Err_Auth}}error{{end}}">
- <label for="auth_password">{{.locale.Tr "password"}}</label>
+ <label for="auth_password">{{ctx.Locale.Tr "password"}}</label>
<input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
</div>
@@ -32,25 +32,25 @@
<div id="migrate_items">
<div class="inline field">
- <label>{{.locale.Tr "repo.migrate_items"}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items"}}</label>
<div class="ui checkbox">
<input name="milestones" type="checkbox" {{if .milestones}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_milestones" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_milestones" | Safe}}</label>
</div>
<div class="ui checkbox">
<input name="labels" type="checkbox" {{if .labels}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_labels" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_labels" | Safe}}</label>
</div>
</div>
<div class="inline field">
<label></label>
<div class="ui checkbox">
<input name="issues" type="checkbox" {{if .issues}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_issues" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_issues" | Safe}}</label>
</div>
<div class="ui checkbox">
<input name="pull_requests" type="checkbox" {{if .pull_requests}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_merge_requests" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_merge_requests" | Safe}}</label>
</div>
</div>
</div>
@@ -58,7 +58,7 @@
<div class="divider"></div>
<div class="inline required field {{if .Err_Owner}}error{{end}}">
- <label>{{.locale.Tr "repo.owner"}}</label>
+ <label>{{ctx.Locale.Tr "repo.owner"}}</label>
<div class="ui selection owner dropdown">
<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
@@ -82,30 +82,30 @@
</div>
<div class="inline required field {{if .Err_RepoName}}error{{end}}">
- <label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label>
+ <label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
<input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100">
</div>
<div class="inline field">
- <label>{{.locale.Tr "repo.visibility"}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility"}}</label>
<div class="ui checkbox">
{{if .IsForcedPrivate}}
<input name="private" type="checkbox" checked readonly>
- <label>{{.locale.Tr "repo.visibility_helper_forced" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility_helper_forced" | Safe}}</label>
{{else}}
<input name="private" type="checkbox" {{if .private}}checked{{end}}>
- <label>{{.locale.Tr "repo.visibility_helper" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility_helper" | Safe}}</label>
{{end}}
</div>
</div>
<div class="inline field {{if .Err_Description}}error{{end}}">
- <label for="description">{{.locale.Tr "repo.repo_desc"}}</label>
+ <label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
<textarea id="description" name="description" maxlength="2048">{{.description}}</textarea>
</div>
<div class="inline field">
<label></label>
<button class="ui primary button">
- {{.locale.Tr "repo.migrate_repo"}}
+ {{ctx.Locale.Tr "repo.migrate_repo"}}
</button>
</div>
</div>
diff --git a/templates/repo/migrate/git.tmpl b/templates/repo/migrate/git.tmpl
index 1e449ae30e..352362854f 100644
--- a/templates/repo/migrate/git.tmpl
+++ b/templates/repo/migrate/git.tmpl
@@ -6,24 +6,24 @@
{{template "base/disable_form_autofill"}}
{{.CsrfTokenHtml}}
<h3 class="ui top attached header">
- {{.locale.Tr "repo.migrate.migrate" .service.Title}}
+ {{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}}
<input id="service_type" type="hidden" name="service" value="{{.service}}">
</h3>
<div class="ui attached segment">
{{template "base/alert" .}}
<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
- <label for="clone_addr">{{.locale.Tr "repo.migrate.clone_address"}}</label>
+ <label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
<span class="help">
- {{.locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.locale.Tr "repo.migrate.clone_local_path"}}{{end}}
+ {{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.locale.Tr "repo.migrate.clone_local_path"}}{{end}}
</span>
</div>
<div class="inline field {{if .Err_Auth}}error{{end}}">
- <label for="auth_username">{{.locale.Tr "username"}}</label>
+ <label for="auth_username">{{ctx.Locale.Tr "username"}}</label>
<input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
</div>
<div class="inline field {{if .Err_Auth}}error{{end}}">
- <label for="auth_password">{{.locale.Tr "password"}}</label>
+ <label for="auth_password">{{ctx.Locale.Tr "password"}}</label>
<input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
</div>
@@ -32,7 +32,7 @@
<div class="divider"></div>
<div class="inline required field {{if .Err_Owner}}error{{end}}">
- <label>{{.locale.Tr "repo.owner"}}</label>
+ <label>{{ctx.Locale.Tr "repo.owner"}}</label>
<div class="ui selection owner dropdown">
<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
@@ -56,30 +56,30 @@
</div>
<div class="inline required field {{if .Err_RepoName}}error{{end}}">
- <label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label>
+ <label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
<input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100">
</div>
<div class="inline field">
- <label>{{.locale.Tr "repo.visibility"}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility"}}</label>
<div class="ui checkbox">
{{if .IsForcedPrivate}}
<input name="private" type="checkbox" checked readonly>
- <label>{{.locale.Tr "repo.visibility_helper_forced" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility_helper_forced" | Safe}}</label>
{{else}}
<input name="private" type="checkbox" {{if .private}}checked{{end}}>
- <label>{{.locale.Tr "repo.visibility_helper" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility_helper" | Safe}}</label>
{{end}}
</div>
</div>
<div class="inline field {{if .Err_Description}}error{{end}}">
- <label for="description">{{.locale.Tr "repo.repo_desc"}}</label>
+ <label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
<textarea id="description" name="description" maxlength="2048">{{.description}}</textarea>
</div>
<div class="inline field">
<label></label>
<button class="ui primary button">
- {{.locale.Tr "repo.migrate_repo"}}
+ {{ctx.Locale.Tr "repo.migrate_repo"}}
</button>
</div>
</div>
diff --git a/templates/repo/migrate/gitbucket.tmpl b/templates/repo/migrate/gitbucket.tmpl
index aa269e561c..c631ee788f 100644
--- a/templates/repo/migrate/gitbucket.tmpl
+++ b/templates/repo/migrate/gitbucket.tmpl
@@ -6,67 +6,67 @@
{{template "base/disable_form_autofill"}}
{{.CsrfTokenHtml}}
<h3 class="ui top attached header">
- {{.locale.Tr "repo.migrate.migrate" .service.Title}}
+ {{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}}
<input id="service_type" type="hidden" name="service" value="{{.service}}">
</h3>
<div class="ui attached segment">
{{template "base/alert" .}}
<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
- <label for="clone_addr">{{.locale.Tr "repo.migrate.clone_address"}}</label>
+ <label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
<span class="help">
- {{.locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.locale.Tr "repo.migrate.clone_local_path"}}{{end}}
+ {{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.locale.Tr "repo.migrate.clone_local_path"}}{{end}}
</span>
</div>
<div class="inline field {{if .Err_Auth}}error{{end}}">
- <label for="auth_username">{{.locale.Tr "username"}}</label>
+ <label for="auth_username">{{ctx.Locale.Tr "username"}}</label>
<input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
</div>
<div class="inline field {{if .Err_Auth}}error{{end}}">
- <label for="auth_password">{{.locale.Tr "password"}}</label>
+ <label for="auth_password">{{ctx.Locale.Tr "password"}}</label>
<input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
</div>
{{template "repo/migrate/options" .}}
<div class="inline field">
- <label>{{.locale.Tr "repo.migrate_items"}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items"}}</label>
<div class="ui checkbox">
<input name="wiki" type="checkbox" {{if .wiki}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_wiki" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_wiki" | Safe}}</label>
</div>
</div>
<div id="migrate_items">
- <span class="help">{{.locale.Tr "repo.migrate.migrate_items_options"}}</span>
+ <span class="help">{{ctx.Locale.Tr "repo.migrate.migrate_items_options"}}</span>
<div class="inline field">
<label></label>
<div class="ui checkbox">
<input name="labels" type="checkbox" {{if .labels}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_labels" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_labels" | Safe}}</label>
</div>
<div class="ui checkbox">
<input name="issues" type="checkbox" {{if .issues}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_issues" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_issues" | Safe}}</label>
</div>
</div>
<div class="inline field">
<label></label>
<div class="ui checkbox">
<input name="pull_requests" type="checkbox" {{if .pull_requests}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_pullrequests" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_pullrequests" | Safe}}</label>
</div>
<div class="ui checkbox">
<input name="releases" type="checkbox" {{if .releases}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_releases" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_releases" | Safe}}</label>
</div>
</div>
<div class="inline field">
<label></label>
<div class="ui checkbox">
<input name="milestones" type="checkbox" {{if .milestones}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_milestones" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_milestones" | Safe}}</label>
</div>
</div>
</div>
@@ -74,7 +74,7 @@
<div class="divider"></div>
<div class="inline required field {{if .Err_Owner}}error{{end}}">
- <label>{{.locale.Tr "repo.owner"}}</label>
+ <label>{{ctx.Locale.Tr "repo.owner"}}</label>
<div class="ui selection owner dropdown">
<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
@@ -98,30 +98,30 @@
</div>
<div class="inline required field {{if .Err_RepoName}}error{{end}}">
- <label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label>
+ <label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
<input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100">
</div>
<div class="inline field">
- <label>{{.locale.Tr "repo.visibility"}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility"}}</label>
<div class="ui checkbox">
{{if .IsForcedPrivate}}
<input name="private" type="checkbox" checked readonly>
- <label>{{.locale.Tr "repo.visibility_helper_forced" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility_helper_forced" | Safe}}</label>
{{else}}
<input name="private" type="checkbox" {{if .private}}checked{{end}}>
- <label>{{.locale.Tr "repo.visibility_helper" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility_helper" | Safe}}</label>
{{end}}
</div>
</div>
<div class="inline field {{if .Err_Description}}error{{end}}">
- <label for="description">{{.locale.Tr "repo.repo_desc"}}</label>
+ <label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
<textarea id="description" name="description" maxlength="2048">{{.description}}</textarea>
</div>
<div class="inline field">
<label></label>
<button class="ui primary button">
- {{.locale.Tr "repo.migrate_repo"}}
+ {{ctx.Locale.Tr "repo.migrate_repo"}}
</button>
</div>
</div>
diff --git a/templates/repo/migrate/gitea.tmpl b/templates/repo/migrate/gitea.tmpl
index e4d8c62734..f71287de66 100644
--- a/templates/repo/migrate/gitea.tmpl
+++ b/templates/repo/migrate/gitea.tmpl
@@ -5,21 +5,21 @@
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<h3 class="ui top attached header">
- {{.locale.Tr "repo.migrate.migrate" .service.Title}}
+ {{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}}
<input id="service_type" type="hidden" name="service" value="{{.service}}">
</h3>
<div class="ui attached segment">
{{template "base/alert" .}}
<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
- <label for="clone_addr">{{.locale.Tr "repo.migrate.clone_address"}}</label>
+ <label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
<span class="help">
- {{.locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.locale.Tr "repo.migrate.clone_local_path"}}{{end}}
+ {{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.locale.Tr "repo.migrate.clone_local_path"}}{{end}}
</span>
</div>
<div class="inline field {{if .Err_Auth}}error{{end}}">
- <label for="auth_token">{{.locale.Tr "access_token"}}</label>
+ <label for="auth_token">{{ctx.Locale.Tr "access_token"}}</label>
<input id="auth_token" name="auth_token" type="password" autocomplete="new-password" value="{{.auth_token}}" {{if not .auth_token}} data-need-clear="true" {{end}}>
<a target="_blank" href="https://docs.gitea.com/development/api-usage">{{svg "octicon-question"}}</a>
</div>
@@ -27,42 +27,42 @@
{{template "repo/migrate/options" .}}
<div class="inline field">
- <label>{{.locale.Tr "repo.migrate_items"}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items"}}</label>
<div class="ui checkbox">
<input name="wiki" type="checkbox" {{if .wiki}} checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_wiki" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_wiki" | Safe}}</label>
</div>
</div>
<div id="migrate_items">
- <span class="help">{{.locale.Tr "repo.migrate.migrate_items_options"}}</span>
+ <span class="help">{{ctx.Locale.Tr "repo.migrate.migrate_items_options"}}</span>
<div class="inline field">
<label></label>
<div class="ui checkbox">
<input name="labels" type="checkbox" {{if .labels}} checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_labels" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_labels" | Safe}}</label>
</div>
<div class="ui checkbox">
<input name="issues" type="checkbox" {{if .issues}} checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_issues" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_issues" | Safe}}</label>
</div>
</div>
<div class="inline field">
<label></label>
<div class="ui checkbox">
<input name="pull_requests" type="checkbox" {{if .pull_requests}} checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_pullrequests" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_pullrequests" | Safe}}</label>
</div>
<div class="ui checkbox">
<input name="releases" type="checkbox" {{if .releases}} checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_releases" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_releases" | Safe}}</label>
</div>
</div>
<div class="inline field">
<label></label>
<div class="ui checkbox">
<input name="milestones" type="checkbox" {{if .milestones}} checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_milestones" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_milestones" | Safe}}</label>
</div>
</div>
</div>
@@ -70,7 +70,7 @@
<div class="divider"></div>
<div class="inline required field {{if .Err_Owner}}error{{end}}">
- <label>{{.locale.Tr "repo.owner"}}</label>
+ <label>{{ctx.Locale.Tr "repo.owner"}}</label>
<div class="ui selection owner dropdown">
<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
@@ -94,30 +94,30 @@
</div>
<div class="inline required field {{if .Err_RepoName}}error{{end}}">
- <label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label>
+ <label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
<input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100">
</div>
<div class="inline field">
- <label>{{.locale.Tr "repo.visibility"}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility"}}</label>
<div class="ui checkbox">
{{if .IsForcedPrivate}}
<input name="private" type="checkbox" checked readonly>
- <label>{{.locale.Tr "repo.visibility_helper_forced" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility_helper_forced" | Safe}}</label>
{{else}}
<input name="private" type="checkbox" {{if .private}} checked{{end}}>
- <label>{{.locale.Tr "repo.visibility_helper" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility_helper" | Safe}}</label>
{{end}}
</div>
</div>
<div class="inline field {{if .Err_Description}}error{{end}}">
- <label for="description">{{.locale.Tr "repo.repo_desc"}}</label>
+ <label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
<textarea id="description" name="description" maxlength="2048">{{.description}}</textarea>
</div>
<div class="inline field">
<label></label>
<button class="ui primary button">
- {{.locale.Tr "repo.migrate_repo"}}
+ {{ctx.Locale.Tr "repo.migrate_repo"}}
</button>
</div>
</div>
diff --git a/templates/repo/migrate/github.tmpl b/templates/repo/migrate/github.tmpl
index d3f0e0b8bd..07f8216fcb 100644
--- a/templates/repo/migrate/github.tmpl
+++ b/templates/repo/migrate/github.tmpl
@@ -5,66 +5,66 @@
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<h3 class="ui top attached header">
- {{.locale.Tr "repo.migrate.migrate" .service.Title}}
+ {{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}}
<input id="service_type" type="hidden" name="service" value="{{.service}}">
</h3>
<div class="ui attached segment">
{{template "base/alert" .}}
<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
- <label for="clone_addr">{{.locale.Tr "repo.migrate.clone_address"}}</label>
+ <label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
<span class="help">
- {{.locale.Tr "repo.migrate.clone_address_desc"}}
+ {{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}
</span>
</div>
<div class="inline field {{if .Err_Auth}}error{{end}}">
- <label for="auth_token">{{.locale.Tr "access_token"}}</label>
+ <label for="auth_token">{{ctx.Locale.Tr "access_token"}}</label>
<input id="auth_token" name="auth_token" type="password" autocomplete="new-password" value="{{.auth_token}}" {{if not .auth_token}}data-need-clear="true"{{end}}>
<a target="_blank" href="https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token">{{svg "octicon-question"}}</a>
<span class="help">
- {{.locale.Tr "repo.migrate.github_token_desc"}}
+ {{ctx.Locale.Tr "repo.migrate.github_token_desc"}}
</span>
</div>
{{template "repo/migrate/options" .}}
<div class="inline field">
- <label>{{.locale.Tr "repo.migrate_items"}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items"}}</label>
<div class="ui checkbox">
<input name="wiki" type="checkbox" {{if .wiki}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_wiki" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_wiki" | Safe}}</label>
</div>
</div>
<div id="migrate_items">
- <span class="help">{{.locale.Tr "repo.migrate.migrate_items_options"}}</span>
+ <span class="help">{{ctx.Locale.Tr "repo.migrate.migrate_items_options"}}</span>
<div class="inline field">
<label></label>
<div class="ui checkbox">
<input name="labels" type="checkbox" {{if .labels}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_labels" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_labels" | Safe}}</label>
</div>
<div class="ui checkbox">
<input name="issues" type="checkbox" {{if .issues}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_issues" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_issues" | Safe}}</label>
</div>
</div>
<div class="inline field">
<label></label>
<div class="ui checkbox">
<input name="pull_requests" type="checkbox" {{if .pull_requests}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_pullrequests" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_pullrequests" | Safe}}</label>
</div>
<div class="ui checkbox">
<input name="releases" type="checkbox" {{if .releases}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_releases" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_releases" | Safe}}</label>
</div>
</div>
<div class="inline field">
<label></label>
<div class="ui checkbox">
<input name="milestones" type="checkbox" {{if .milestones}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_milestones" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_milestones" | Safe}}</label>
</div>
</div>
</div>
@@ -72,7 +72,7 @@
<div class="divider"></div>
<div class="inline required field {{if .Err_Owner}}error{{end}}">
- <label>{{.locale.Tr "repo.owner"}}</label>
+ <label>{{ctx.Locale.Tr "repo.owner"}}</label>
<div class="ui selection owner dropdown">
<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
@@ -96,30 +96,30 @@
</div>
<div class="inline required field {{if .Err_RepoName}}error{{end}}">
- <label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label>
+ <label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
<input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100">
</div>
<div class="inline field">
- <label>{{.locale.Tr "repo.visibility"}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility"}}</label>
<div class="ui checkbox">
{{if .IsForcedPrivate}}
<input name="private" type="checkbox" checked readonly>
- <label>{{.locale.Tr "repo.visibility_helper_forced" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility_helper_forced" | Safe}}</label>
{{else}}
<input name="private" type="checkbox" {{if .private}}checked{{end}}>
- <label>{{.locale.Tr "repo.visibility_helper" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility_helper" | Safe}}</label>
{{end}}
</div>
</div>
<div class="inline field {{if .Err_Description}}error{{end}}">
- <label for="description">{{.locale.Tr "repo.repo_desc"}}</label>
+ <label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
<textarea id="description" name="description" maxlength="2048">{{.description}}</textarea>
</div>
<div class="inline field">
<label></label>
<button class="ui primary button">
- {{.locale.Tr "repo.migrate_repo"}}
+ {{ctx.Locale.Tr "repo.migrate_repo"}}
</button>
</div>
</div>
diff --git a/templates/repo/migrate/gitlab.tmpl b/templates/repo/migrate/gitlab.tmpl
index e055cce19e..911fd1a17b 100644
--- a/templates/repo/migrate/gitlab.tmpl
+++ b/templates/repo/migrate/gitlab.tmpl
@@ -5,21 +5,21 @@
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<h3 class="ui top attached header">
- {{.locale.Tr "repo.migrate.migrate" .service.Title}}
+ {{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}}
<input id="service_type" type="hidden" name="service" value="{{.service}}">
</h3>
<div class="ui attached segment">
{{template "base/alert" .}}
<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
- <label for="clone_addr">{{.locale.Tr "repo.migrate.clone_address"}}</label>
+ <label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
<span class="help">
- {{.locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.locale.Tr "repo.migrate.clone_local_path"}}{{end}}
+ {{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.locale.Tr "repo.migrate.clone_local_path"}}{{end}}
</span>
</div>
<div class="inline field {{if .Err_Auth}}error{{end}}">
- <label for="auth_token">{{.locale.Tr "access_token"}}</label>
+ <label for="auth_token">{{ctx.Locale.Tr "access_token"}}</label>
<input id="auth_token" name="auth_token" type="password" autocomplete="new-password" value="{{.auth_token}}" {{if not .auth_token}}data-need-clear="true"{{end}}>
<a target="_blank" href="https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html">{{svg "octicon-question"}}</a>
</div>
@@ -27,41 +27,41 @@
{{template "repo/migrate/options" .}}
<div class="inline field">
- <label>{{.locale.Tr "repo.migrate_items"}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items"}}</label>
<div class="ui checkbox">
<input name="wiki" type="checkbox" {{if .wiki}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_wiki" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_wiki" | Safe}}</label>
</div>
</div>
<div id="migrate_items">
- <span class="help">{{.locale.Tr "repo.migrate.migrate_items_options"}}</span>
+ <span class="help">{{ctx.Locale.Tr "repo.migrate.migrate_items_options"}}</span>
<div class="inline field">
<label></label>
<div class="ui checkbox">
<input name="labels" type="checkbox" {{if .labels}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_labels" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_labels" | Safe}}</label>
</div>
<div class="ui checkbox">
<input name="issues" type="checkbox" {{if .issues}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_issues" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_issues" | Safe}}</label>
</div>
</div>
<div class="inline field">
<label></label>
<div class="ui checkbox">
<input name="pull_requests" type="checkbox" {{if .pull_requests}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_merge_requests" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_merge_requests" | Safe}}</label>
</div>
<div class="ui checkbox">
<input name="releases" type="checkbox" {{if .releases}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_releases" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_releases" | Safe}}</label>
</div>
</div>
<div class="inline field">
<label></label>
<div class="ui checkbox">
<input name="milestones" type="checkbox" {{if .milestones}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_milestones" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_milestones" | Safe}}</label>
</div>
</div>
</div>
@@ -69,7 +69,7 @@
<div class="divider"></div>
<div class="inline required field {{if .Err_Owner}}error{{end}}">
- <label>{{.locale.Tr "repo.owner"}}</label>
+ <label>{{ctx.Locale.Tr "repo.owner"}}</label>
<div class="ui selection owner dropdown">
<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
@@ -93,30 +93,30 @@
</div>
<div class="inline required field {{if .Err_RepoName}}error{{end}}">
- <label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label>
+ <label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
<input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100">
</div>
<div class="inline field">
- <label>{{.locale.Tr "repo.visibility"}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility"}}</label>
<div class="ui checkbox">
{{if .IsForcedPrivate}}
<input name="private" type="checkbox" checked readonly>
- <label>{{.locale.Tr "repo.visibility_helper_forced" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility_helper_forced" | Safe}}</label>
{{else}}
<input name="private" type="checkbox" {{if .private}}checked{{end}}>
- <label>{{.locale.Tr "repo.visibility_helper" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility_helper" | Safe}}</label>
{{end}}
</div>
</div>
<div class="inline field {{if .Err_Description}}error{{end}}">
- <label for="description">{{.locale.Tr "repo.repo_desc"}}</label>
+ <label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
<textarea id="description" name="description" maxlength="2048">{{.description}}</textarea>
</div>
<div class="inline field">
<label></label>
<button class="ui primary button">
- {{.locale.Tr "repo.migrate_repo"}}
+ {{ctx.Locale.Tr "repo.migrate_repo"}}
</button>
</div>
</div>
diff --git a/templates/repo/migrate/gogs.tmpl b/templates/repo/migrate/gogs.tmpl
index 2d66800608..529f257585 100644
--- a/templates/repo/migrate/gogs.tmpl
+++ b/templates/repo/migrate/gogs.tmpl
@@ -5,21 +5,21 @@
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<h3 class="ui top attached header">
- {{.locale.Tr "repo.migrate.migrate" .service.Title}}
+ {{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}}
<input id="service_type" type="hidden" name="service" value="{{.service}}">
</h3>
<div class="ui attached segment">
{{template "base/alert" .}}
<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
- <label for="clone_addr">{{.locale.Tr "repo.migrate.clone_address"}}</label>
+ <label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
<span class="help">
- {{.locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.locale.Tr "repo.migrate.clone_local_path"}}{{end}}
+ {{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.locale.Tr "repo.migrate.clone_local_path"}}{{end}}
</span>
</div>
<div class="inline field {{if .Err_Auth}}error{{end}}">
- <label for="auth_token">{{.locale.Tr "access_token"}}</label>
+ <label for="auth_token">{{ctx.Locale.Tr "access_token"}}</label>
<input id="auth_token" name="auth_token" type="password" autocomplete="new-password" value="{{.auth_token}}" {{if not .auth_token}} data-need-clear="true" {{end}}>
<!-- <a target="_blank" href="https://docs.gitea.com/development/api-usage">{{svg "octicon-question"}}</a> -->
</div>
@@ -27,31 +27,31 @@
{{template "repo/migrate/options" .}}
<div class="inline field">
- <label>{{.locale.Tr "repo.migrate_items"}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items"}}</label>
<div class="ui checkbox">
<input name="wiki" type="checkbox" {{if .wiki}} checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_wiki" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_wiki" | Safe}}</label>
</div>
</div>
<div id="migrate_items">
- <span class="help">{{.locale.Tr "repo.migrate.migrate_items_options"}}</span>
+ <span class="help">{{ctx.Locale.Tr "repo.migrate.migrate_items_options"}}</span>
<div class="inline field">
<label></label>
<div class="ui checkbox">
<input name="labels" type="checkbox" {{if .labels}} checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_labels" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_labels" | Safe}}</label>
</div>
<div class="ui checkbox">
<input name="issues" type="checkbox" {{if .issues}} checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_issues" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_issues" | Safe}}</label>
</div>
</div>
<div class="inline field">
<label></label>
<div class="ui checkbox">
<input name="milestones" type="checkbox" {{if .milestones}} checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_milestones" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_milestones" | Safe}}</label>
</div>
</div>
<!-- Gogs do not support it
@@ -59,11 +59,11 @@
<label></label>
<div class="ui checkbox">
<input name="pull_requests" type="checkbox" {{if .pull_requests}} checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_merge_requests" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_merge_requests" | Safe}}</label>
</div>
<div class="ui checkbox">
<input name="releases" type="checkbox" {{if .releases}} checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_releases" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_releases" | Safe}}</label>
</div>
</div>
-->
@@ -72,7 +72,7 @@
<div class="divider"></div>
<div class="inline required field {{if .Err_Owner}}error{{end}}">
- <label>{{.locale.Tr "repo.owner"}}</label>
+ <label>{{ctx.Locale.Tr "repo.owner"}}</label>
<div class="ui selection owner dropdown">
<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
@@ -96,30 +96,30 @@
</div>
<div class="inline required field {{if .Err_RepoName}}error{{end}}">
- <label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label>
+ <label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
<input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100">
</div>
<div class="inline field">
- <label>{{.locale.Tr "repo.visibility"}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility"}}</label>
<div class="ui checkbox">
{{if .IsForcedPrivate}}
<input name="private" type="checkbox" checked readonly>
- <label>{{.locale.Tr "repo.visibility_helper_forced" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility_helper_forced" | Safe}}</label>
{{else}}
<input name="private" type="checkbox" {{if .private}} checked{{end}}>
- <label>{{.locale.Tr "repo.visibility_helper" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility_helper" | Safe}}</label>
{{end}}
</div>
</div>
<div class="inline field {{if .Err_Description}}error{{end}}">
- <label for="description">{{.locale.Tr "repo.repo_desc"}}</label>
+ <label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
<textarea id="description" name="description" maxlength="2048">{{.description}}</textarea>
</div>
<div class="inline field">
<label></label>
<button class="ui primary button">
- {{.locale.Tr "repo.migrate_repo"}}
+ {{ctx.Locale.Tr "repo.migrate_repo"}}
</button>
</div>
</div>
diff --git a/templates/repo/migrate/migrate.tmpl b/templates/repo/migrate/migrate.tmpl
index eb17794647..c686f0b832 100644
--- a/templates/repo/migrate/migrate.tmpl
+++ b/templates/repo/migrate/migrate.tmpl
@@ -20,7 +20,7 @@
{{.Title}}
</div>
<div class="description gt-text-center">
- {{(printf "repo.migrate.%s.description" .Name) | $.locale.Tr}}
+ {{(printf "repo.migrate.%s.description" .Name) | ctx.Locale.Tr}}
</div>
</div>
</a>
diff --git a/templates/repo/migrate/migrating.tmpl b/templates/repo/migrate/migrating.tmpl
index 6effa05f97..649d14ad99 100644
--- a/templates/repo/migrate/migrating.tmpl
+++ b/templates/repo/migrate/migrating.tmpl
@@ -21,14 +21,14 @@
<div class="ui stackable middle very relaxed page grid">
<div class="sixteen wide center aligned centered column">
<div id="repo_migrating_progress">
- <p>{{.locale.Tr "repo.migrate.migrating" .CloneAddr | Safe}}</p>
+ <p>{{ctx.Locale.Tr "repo.migrate.migrating" .CloneAddr | Safe}}</p>
<p id="repo_migrating_progress_message"></p>
</div>
<div id="repo_migrating_failed" class="gt-hidden">
{{if .CloneAddr}}
- <p>{{.locale.Tr "repo.migrate.migrating_failed" .CloneAddr | Safe}}</p>
+ <p>{{ctx.Locale.Tr "repo.migrate.migrating_failed" .CloneAddr | Safe}}</p>
{{else}}
- <p>{{.locale.Tr "repo.migrate.migrating_failed_no_addr" | Safe}}</p>
+ <p>{{ctx.Locale.Tr "repo.migrate.migrating_failed_no_addr" | Safe}}</p>
{{end}}
<p id="repo_migrating_failed_error"></p>
</div>
@@ -36,11 +36,11 @@
<div class="divider"></div>
<div class="item">
{{if .Failed}}
- <button class="ui basic red show-modal button" data-modal="#delete-repo-modal">{{.locale.Tr "repo.settings.delete"}}</button>
+ <button class="ui basic red show-modal button" data-modal="#delete-repo-modal">{{ctx.Locale.Tr "repo.settings.delete"}}</button>
{{else}}
- <button class="ui basic show-modal button" data-modal="#cancel-repo-modal">{{.locale.Tr "cancel"}}</button>
+ <button class="ui basic show-modal button" data-modal="#cancel-repo-modal">{{ctx.Locale.Tr "cancel"}}</button>
{{end}}
- <button id="repo_migrating_retry" data-migrating-task-retry-url="{{.Link}}/settings/migrate/retry" class="ui basic button gt-hidden">{{.locale.Tr "retry"}}</button>
+ <button id="repo_migrating_retry" data-migrating-task-retry-url="{{.Link}}/settings/migrate/retry" class="ui basic button gt-hidden">{{ctx.Locale.Tr "retry"}}</button>
</div>
{{end}}
</div>
@@ -53,14 +53,14 @@
<div class="ui small modal" id="delete-repo-modal">
<div class="header">
- {{.locale.Tr "repo.settings.delete"}}
+ {{ctx.Locale.Tr "repo.settings.delete"}}
</div>
<div class="content">
<div class="ui warning message">
- {{.locale.Tr "repo.settings.delete_notices_1" | Safe}}<br>
- {{.locale.Tr "repo.settings.delete_notices_2" .Repository.FullName | Safe}}
+ {{ctx.Locale.Tr "repo.settings.delete_notices_1" | Safe}}<br>
+ {{ctx.Locale.Tr "repo.settings.delete_notices_2" .Repository.FullName | Safe}}
{{if .Repository.NumForks}}<br>
- {{.locale.Tr "repo.settings.delete_notices_fork_1"}}
+ {{ctx.Locale.Tr "repo.settings.delete_notices_fork_1"}}
{{end}}
</div>
<form class="ui form" action="{{.Link}}/settings" method="post">
@@ -68,18 +68,18 @@
<input type="hidden" name="action" value="delete">
<div class="field">
<label>
- {{.locale.Tr "repo.settings.transfer_form_title"}}
+ {{ctx.Locale.Tr "repo.settings.transfer_form_title"}}
<span class="text red">{{.Repository.Name}}</span>
</label>
</div>
<div class="required field">
- <label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label>
+ <label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
<input id="repo_name" name="repo_name" required>
</div>
<div class="text right actions">
- <button class="ui cancel button">{{.locale.Tr "settings.cancel"}}</button>
- <button class="ui red button">{{.locale.Tr "repo.settings.confirm_delete"}}</button>
+ <button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
+ <button class="ui red button">{{ctx.Locale.Tr "repo.settings.confirm_delete"}}</button>
</div>
</form>
</div>
@@ -87,12 +87,12 @@
<div class="ui g-modal-confirm modal" id="cancel-repo-modal">
<div class="header">
- {{.locale.Tr "repo.migrate.cancel_migrating_title"}}
+ {{ctx.Locale.Tr "repo.migrate.cancel_migrating_title"}}
</div>
<form action="{{.Link}}/settings/migrate/cancel" method="post">
{{.CsrfTokenHtml}}
<div class="content">
- {{.locale.Tr "repo.migrate.cancel_migrating_confirm"}}
+ {{ctx.Locale.Tr "repo.migrate.cancel_migrating_confirm"}}
</div>
{{template "base/modal_actions_confirm" .}}
</form>
diff --git a/templates/repo/migrate/onedev.tmpl b/templates/repo/migrate/onedev.tmpl
index 818b23fddc..90aee0f48c 100644
--- a/templates/repo/migrate/onedev.tmpl
+++ b/templates/repo/migrate/onedev.tmpl
@@ -6,25 +6,25 @@
{{template "base/disable_form_autofill"}}
{{.CsrfTokenHtml}}
<h3 class="ui top attached header">
- {{.locale.Tr "repo.migrate.migrate" .service.Title}}
+ {{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}}
<input id="service_type" type="hidden" name="service" value="{{.service}}">
</h3>
<div class="ui attached segment">
{{template "base/alert" .}}
<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
- <label for="clone_addr">{{.locale.Tr "repo.migrate.clone_address"}}</label>
+ <label for="clone_addr">{{ctx.Locale.Tr "repo.migrate.clone_address"}}</label>
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
<span class="help">
- {{.locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.locale.Tr "repo.migrate.clone_local_path"}}{{end}}
+ {{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.locale.Tr "repo.migrate.clone_local_path"}}{{end}}
</span>
</div>
<div class="inline field {{if .Err_Auth}}error{{end}}">
- <label for="auth_username">{{.locale.Tr "username"}}</label>
+ <label for="auth_username">{{ctx.Locale.Tr "username"}}</label>
<input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
</div>
<div class="inline field {{if .Err_Auth}}error{{end}}">
- <label for="auth_password">{{.locale.Tr "password"}}</label>
+ <label for="auth_password">{{ctx.Locale.Tr "password"}}</label>
<input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
</div>
@@ -32,25 +32,25 @@
<div id="migrate_items">
<div class="inline field">
- <label>{{.locale.Tr "repo.migrate_items"}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items"}}</label>
<div class="ui checkbox">
<input name="milestones" type="checkbox" {{if .milestones}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_milestones" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_milestones" | Safe}}</label>
</div>
<div class="ui checkbox">
<input name="labels" type="checkbox" {{if .labels}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_labels" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_labels" | Safe}}</label>
</div>
</div>
<div class="inline field">
<label></label>
<div class="ui checkbox">
<input name="issues" type="checkbox" {{if .issues}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_issues" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_issues" | Safe}}</label>
</div>
<div class="ui checkbox">
<input name="pull_requests" type="checkbox" {{if .pull_requests}}checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_items_pullrequests" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_items_pullrequests" | Safe}}</label>
</div>
</div>
</div>
@@ -58,7 +58,7 @@
<div class="divider"></div>
<div class="inline required field {{if .Err_Owner}}error{{end}}">
- <label>{{.locale.Tr "repo.owner"}}</label>
+ <label>{{ctx.Locale.Tr "repo.owner"}}</label>
<div class="ui selection owner dropdown">
<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
@@ -82,30 +82,30 @@
</div>
<div class="inline required field {{if .Err_RepoName}}error{{end}}">
- <label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label>
+ <label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
<input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100">
</div>
<div class="inline field">
- <label>{{.locale.Tr "repo.visibility"}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility"}}</label>
<div class="ui checkbox">
{{if .IsForcedPrivate}}
<input name="private" type="checkbox" checked readonly>
- <label>{{.locale.Tr "repo.visibility_helper_forced" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility_helper_forced" | Safe}}</label>
{{else}}
<input name="private" type="checkbox" {{if .private}}checked{{end}}>
- <label>{{.locale.Tr "repo.visibility_helper" | Safe}}</label>
+ <label>{{ctx.Locale.Tr "repo.visibility_helper" | Safe}}</label>
{{end}}
</div>
</div>
<div class="inline field {{if .Err_Description}}error{{end}}">
- <label for="description">{{.locale.Tr "repo.repo_desc"}}</label>
+ <label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
<textarea id="description" name="description" maxlength="2048">{{.description}}</textarea>
</div>
<div class="inline field">
<label></label>
<button class="ui primary button">
- {{.locale.Tr "repo.migrate_repo"}}
+ {{ctx.Locale.Tr "repo.migrate_repo"}}
</button>
</div>
</div>
diff --git a/templates/repo/migrate/options.tmpl b/templates/repo/migrate/options.tmpl
index d39caf01b4..2e97bdf1ad 100644
--- a/templates/repo/migrate/options.tmpl
+++ b/templates/repo/migrate/options.tmpl
@@ -1,9 +1,9 @@
{{if not .DisableNewPullMirrors}}
<div class="inline field">
- <label>{{.locale.Tr "repo.migrate_options"}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_options"}}</label>
<div class="ui checkbox">
<input id="mirror" name="mirror" type="checkbox" {{if .mirror}} checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_options_mirror_helper"}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_options_mirror_helper"}}</label>
</div>
</div>
{{end}}
@@ -12,15 +12,15 @@
<label></label>
<div class="ui checkbox">
<input id="lfs" name="lfs" type="checkbox" {{if .lfs}} checked{{end}}>
- <label>{{.locale.Tr "repo.migrate_options_lfs"}}</label>
+ <label>{{ctx.Locale.Tr "repo.migrate_options_lfs"}}</label>
</div>
- <span id="lfs_settings" class="gt-hidden">(<a id="lfs_settings_show" href="#">{{.locale.Tr "repo.settings.advanced_settings"}}</a>)</span>
+ <span id="lfs_settings" class="gt-hidden">(<a id="lfs_settings_show" href="#">{{ctx.Locale.Tr "repo.settings.advanced_settings"}}</a>)</span>
</div>
<div id="lfs_endpoint" class="gt-hidden">
- <span class="help">{{.locale.Tr "repo.migrate_options_lfs_endpoint.description" "https://github.com/git-lfs/git-lfs/blob/main/docs/api/server-discovery.md#server-discovery" | Str2html}}{{if .ContextUser.CanImportLocal}} {{.locale.Tr "repo.migrate_options_lfs_endpoint.description.local"}}{{end}}</span>
+ <span class="help">{{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.description" "https://github.com/git-lfs/git-lfs/blob/main/docs/api/server-discovery.md#server-discovery" | Str2html}}{{if .ContextUser.CanImportLocal}} {{.locale.Tr "repo.migrate_options_lfs_endpoint.description.local"}}{{end}}</span>
<div class="inline field {{if .Err_LFSEndpoint}}error{{end}}">
- <label>{{.locale.Tr "repo.migrate_options_lfs_endpoint.label"}}</label>
- <input name="lfs_endpoint" value="{{.lfs_endpoint}}" placeholder="{{.locale.Tr "repo.migrate_options_lfs_endpoint.placeholder"}}">
+ <label>{{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.label"}}</label>
+ <input name="lfs_endpoint" value="{{.lfs_endpoint}}" placeholder="{{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.placeholder"}}">
</div>
</div>
{{end}}