UX: rename the word "Upgrade" to "Update" in the UI (#208)

In this PR, all references in the UI to the word "`upgrade`" are changed to "`update`". This is to differentiate the update process in self-hosted sites from the plan "upgrade" process in hosted sites.
This commit is contained in:
Vinoth Kannan 2024-04-02 15:13:32 +05:30 committed by GitHub
parent a2bc9b6eac
commit 340f0006c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 43 additions and 43 deletions

View File

@ -8,17 +8,17 @@ export default class RepoStatus extends Component {
@service upgradeStore;
get upgradeDisabled() {
// Allow to see the currently running upgrade
// Allow to see the currently running update
if (this.args.upgradingRepo) {
return false;
}
// Disable other buttons when an upgrade is running
// Disable other buttons when an update is running
if (this.upgradeStore.running) {
return true;
}
// docker_manager has to be upgraded before other plugins
// docker_manager has to be updated before other plugins
return (
!this.args.managerRepo.upToDate &&
this.args.managerRepo !== this.args.repo
@ -43,9 +43,9 @@ export default class RepoStatus extends Component {
get upgradeButtonLabel() {
if (this.args.repo.upgrading) {
return I18n.t("admin.docker.upgrading");
return I18n.t("admin.docker.updating");
} else {
return I18n.t("admin.docker.upgrade_action");
return I18n.t("admin.docker.update_action");
}
}

View File

@ -4,7 +4,7 @@
{{i18n "admin.docker.outdated_notice"}}
<LinkTo @route="upgrade">
{{i18n "admin.docker.perform_upgrade"}}
{{i18n "admin.docker.perform_update"}}
</LinkTo>
</div>
{{/unless}}

View File

@ -24,9 +24,9 @@ export default class UpgradeShow extends Controller {
get title() {
if (this.multiUpgrade) {
return I18n.t("admin.docker.upgrade_everything");
return I18n.t("admin.docker.update_everything");
} else {
return I18n.t("admin.docker.upgrade_repo", { name: this.model.name });
return I18n.t("admin.docker.update_repo", { name: this.model.name });
}
}

View File

@ -8,7 +8,7 @@ export default {
api.addAdminSidebarSectionLink("root", {
name: "admin_upgrade",
route: "upgrade.index",
label: "admin.docker.upgrade_tab",
label: "admin.docker.update_tab",
icon: "rocket",
});
});

View File

@ -1,3 +1,3 @@
{{#if this.currentUser.admin}}
<NavItem @route="upgrade" @label="admin.docker.upgrade_tab" />
<NavItem @route="upgrade" @label="admin.docker.update_tab" />
{{/if}}

View File

@ -1,4 +1,4 @@
<h1>{{i18n "admin.docker.upgrade_title"}}</h1>
<h1>{{i18n "admin.docker.update_title"}}</h1>
{{#if this.outdated}}
<h2>{{i18n "admin.docker.outdated_image_header"}}</h2>
@ -28,7 +28,7 @@
{{#if this.allUpToDate}}
{{i18n "admin.docker.all_up_to_date"}}
{{else}}
{{i18n "admin.docker.upgrade_all"}}
{{i18n "admin.docker.update_all"}}
{{/if}}
</button>

View File

@ -3,9 +3,9 @@
<DockerManager::ProgressBar @percent={{this.upgradeStore.progressPercentage}} />
{{#if this.complete}}
<p>{{i18n "admin.docker.upgrade_successful"}}</p>
<p>{{i18n "admin.docker.update_successful"}}</p>
{{else if this.failed}}
<p>{{i18n "admin.docker.upgrade_error"}}</p>
<p>{{i18n "admin.docker.update_error"}}</p>
{{/if}}
{{#if this.isUpToDate}}
@ -23,15 +23,15 @@
type="button"
>
{{#if this.upgrading}}
{{i18n "admin.docker.upgrading"}}
{{i18n "admin.docker.updating"}}
{{else}}
{{i18n "admin.docker.start_upgrading"}}
{{i18n "admin.docker.start_updating"}}
{{/if}}
</button>
{{#if this.upgrading}}
<button {{on "click" this.resetUpgrade}} class="btn unlock" type="button">
{{i18n "admin.docker.reset_upgrade"}}
{{i18n "admin.docker.reset_update"}}
</button>
{{/if}}
</div>

View File

@ -18,28 +18,28 @@ en:
new_version_available: "New Version Available!"
official_plugin: "Official Plugin"
outdated_image_header: "You are running an old version of the Discourse image"
outdated_image_info: "Upgrades via the web UI are disabled until you run the latest image. To do so log in to your server using SSH and run:"
outdated_image_info: "Updates via the web UI are disabled until you run the latest image. To do so log in to your server using SSH and run:"
outdated_image_link: "More info on our support site"
outdated_notice: "Your Discourse installation is out of date."
perform_upgrade: "Click here to upgrade."
perform_update: "Click here to update."
repo_newest_version: "%{name} is at the newest version."
repository: "Repository"
reset_upgrade: "Reset Upgrade"
reset_warning: "WARNING: You should only reset upgrades that have failed and are not running. This will NOT cancel currently running builds and should only be used as a last resort."
start_upgrading: "Start Upgrading"
reset_update: "Reset Update"
reset_warning: "WARNING: You should only reset updates that have failed and are not running. This will NOT cancel currently running builds and should only be used as a last resort."
start_updating: "Start Updating"
status: "Status"
up_to_date: "Up to date"
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_tab: "Upgrade"
upgrade_title: "Upgrade"
upgrading: "Upgrading…"
update_action: "Update"
update_all: "Update All"
update_error: "Sorry, there was an error updating Discourse. Please check the logs below."
update_everything: "Update everything"
update_repo: "Update %{name}"
update_successful: "Update completed successfully!"
update_tab: "Update"
update_title: "Update"
updating: "Updating…"
logs:
staff_actions:
actions:
discourse_upgrade: "Upgrade to the latest version"
discourse_update: "Update to the latest version"

View File

@ -9,4 +9,4 @@ en_GB:
admin:
docker:
outdated_notice: "Your Discourse installation is out of date."
perform_upgrade: "Click here to upgrade."
perform_update: "Click here to update."

View File

@ -1,3 +1,3 @@
en:
docker_manager:
title: "Discourse upgrade manager"
title: "Discourse update manager"

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
# name: docker_manager
# about: Provides basic monitoring and upgrade facilities to sites using discourse_docker.
# about: Provides basic monitoring and update facilities to sites using discourse_docker.
# meta_topic_id: 12655
# version: 1.0.0
# authors: Robin Ward, Sam Saffron

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
# we fork and let the parent die because we want the upgrade/child process
# to be orphaned and adopted by the init process to prevent the upgrade
# we fork and let the parent die because we want the update/child process
# to be orphaned and adopted by the init process to prevent the update
# process from getting killed if/when unicorn gets killed.
fork do
Process.setsid

View File

@ -80,7 +80,7 @@ acceptance("docker_manager", function (needs) {
await click(".upgrade-button");
assert.dom("h1").hasText("Upgrade discourse");
assert.dom("h1").hasText("Update discourse");
assert.dom("button.start-upgrade").exists();
});
});

View File

@ -108,7 +108,7 @@ module("Integration | Component | RepoStatus", function (hooks) {
.exists("green check is present when official");
});
test("upgrade button", async function (assert) {
test("update button", async function (assert) {
const store = getOwner(this).lookup("service:store");
this.set("repo", store.createRecord("repo", repoProps));
this.set("managerRepo", store.createRecord("repo", managerProps));
@ -119,9 +119,9 @@ module("Integration | Component | RepoStatus", function (hooks) {
assert
.dom(".upgrade-button")
.exists("upgrade button is visible when plugin is out-of-date")
.exists("update button is visible when plugin is out-of-date")
.isNotDisabled(
"upgrade button is not disabled when docker_manager repo is out-of-date"
"update button is not disabled when docker_manager repo is out-of-date"
);
this.managerRepo.version = "022aa3a";
@ -130,7 +130,7 @@ module("Integration | Component | RepoStatus", function (hooks) {
assert
.dom(".upgrade-button")
.isDisabled(
"upgrade button is disabled when docker_manager repo is not up-to-date"
"update button is disabled when docker_manager repo is not up-to-date"
);
this.repo.latest.commits_behind = 0;
@ -140,6 +140,6 @@ module("Integration | Component | RepoStatus", function (hooks) {
assert
.dom(".upgrade-button")
.doesNotExist("upgrade button is not visible when plugin is up-to-date");
.doesNotExist("update button is not visible when plugin is up-to-date");
});
});