UX: Make upgrade-show heading better translatable

This commit is contained in:
Jarek Radosz 2023-02-07 13:50:03 +01:00
parent 7d6ca4492f
commit 5498a767da
3 changed files with 11 additions and 6 deletions

View File

@ -27,7 +27,11 @@ export default class UpgradeShow extends Controller {
}
get title() {
return this.multiUpgrade ? "All" : this.model[0].name;
if (this.multiUpgrade) {
return I18n.t("admin.docker.upgrade_everything");
} else {
return I18n.t("admin.docker.upgrade_repo", { name: this.model[0].name });
}
}
get isUpToDate() {

View File

@ -1,4 +1,4 @@
<h1>{{i18n "admin.docker.upgrade_repo" name=this.title}}</h1>
<h1>{{this.title}}</h1>
<ProgressBar @percent={{this.percent}} />
@ -9,11 +9,11 @@
{{/if}}
{{#if this.isUpToDate}}
{{#unless this.multiUpgrade}}
<p>{{i18n "admin.docker.repo_newest_version" name=this.title}}</p>
{{else}}
{{#if this.multiUpgrade}}
<p>{{i18n "admin.docker.everything_up_to_date"}}</p>
{{/unless}}
{{else}}
<p>{{i18n "admin.docker.repo_newest_version" name=this.model.name}}</p>
{{/if}}
{{else}}
<button {{on "click" this.start}} disabled={{this.upgrading}} class="btn">
{{#if this.upgrading}}

View File

@ -30,6 +30,7 @@ en:
upgrade_action: "Upgrade"
upgrade_all: "Upgrade All"
upgrade_error: "Sorry, there was an error upgrading Discourse. Please check the logs below."
upgrade_everything: "Upgrade everything"
upgrade_repo: "Upgrade %{name}"
upgrade_successful: "Upgrade completed successfully!"
upgrade_title: "Upgrade"