From 5498a767da08ef18ccb936bf8989866c2ab81a3d Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Tue, 7 Feb 2023 13:50:03 +0100 Subject: [PATCH] UX: Make upgrade-show heading better translatable --- .../javascripts/discourse/controllers/upgrade-show.js | 6 +++++- .../javascripts/discourse/templates/upgrade-show.hbs | 10 +++++----- config/locales/client.en.yml | 1 + 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/assets/javascripts/discourse/controllers/upgrade-show.js b/assets/javascripts/discourse/controllers/upgrade-show.js index 92d5b2f..c782632 100644 --- a/assets/javascripts/discourse/controllers/upgrade-show.js +++ b/assets/javascripts/discourse/controllers/upgrade-show.js @@ -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() { diff --git a/assets/javascripts/discourse/templates/upgrade-show.hbs b/assets/javascripts/discourse/templates/upgrade-show.hbs index 0b80fe9..5cd6a25 100644 --- a/assets/javascripts/discourse/templates/upgrade-show.hbs +++ b/assets/javascripts/discourse/templates/upgrade-show.hbs @@ -1,4 +1,4 @@ -

{{i18n "admin.docker.upgrade_repo" name=this.title}}

+

{{this.title}}

@@ -9,11 +9,11 @@ {{/if}} {{#if this.isUpToDate}} - {{#unless this.multiUpgrade}} -

{{i18n "admin.docker.repo_newest_version" name=this.title}}

- {{else}} + {{#if this.multiUpgrade}}

{{i18n "admin.docker.everything_up_to_date"}}

- {{/unless}} + {{else}} +

{{i18n "admin.docker.repo_newest_version" name=this.model.name}}

+ {{/if}} {{else}}