From 4dec8a32d02416656d21bdb5a07f02f8941cd7e7 Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 21 Nov 2023 12:29:50 -0500 Subject: [PATCH 1/2] Consistently use single quotes in actionable commands in user-facing messages. Shells can interpret backticks in special circumstances, so use quotes to be safe. --- cmd/state-installer/cmd.go | 6 +- cmd/state/internal/cmdtree/cmdtree.go | 2 +- cmd/state/main.go | 2 +- internal/locale/locales/en-us.yaml | 92 +++++++++---------- internal/runbits/git/git.go | 2 +- internal/runners/activate/activate.go | 4 +- internal/runners/auth/signup.go | 2 +- .../runners/deploy/uninstall/uninstall.go | 2 +- internal/runners/events/log.go | 2 +- internal/runners/export/privkey.go | 2 +- internal/runners/hello/hello_example.go | 2 +- internal/runners/invite/invite.go | 2 +- internal/runners/languages/languages.go | 4 +- internal/runners/packages/info.go | 6 +- internal/runners/pull/pull.go | 4 +- internal/runners/show/show.go | 2 +- internal/runners/tutorial/tutorial.go | 8 +- pkg/platform/authentication/auth.go | 4 +- pkg/platform/model/cve.go | 4 +- 19 files changed, 75 insertions(+), 77 deletions(-) diff --git a/cmd/state-installer/cmd.go b/cmd/state-installer/cmd.go index 3c7e13d26d..7f12ec4337 100644 --- a/cmd/state-installer/cmd.go +++ b/cmd/state-installer/cmd.go @@ -381,7 +381,7 @@ func postInstallEvents(out output.Outputer, cfg *config.Instance, an analytics.D case params.command != "": an.Event(anaConst.CatInstallerFunnel, "forward-command") - out.Print(fmt.Sprintf("\nRunning `[ACTIONABLE]%s[/RESET]`\n", params.command)) + out.Print(fmt.Sprintf("\nRunning '[ACTIONABLE]%s[/RESET]'\n", params.command)) cmd, args := exeutils.DecodeCmd(params.command) if _, _, err := exeutils.ExecuteAndPipeStd(cmd, args, envSlice(binPath)); err != nil { an.EventWithLabel(anaConst.CatInstallerFunnel, "forward-command-err", err.Error()) @@ -391,7 +391,7 @@ func postInstallEvents(out output.Outputer, cfg *config.Instance, an analytics.D case params.activate.IsValid(): an.Event(anaConst.CatInstallerFunnel, "forward-activate") - out.Print(fmt.Sprintf("\nRunning `[ACTIONABLE]state activate %s[/RESET]`\n", params.activate.String())) + out.Print(fmt.Sprintf("\nRunning '[ACTIONABLE]state activate %s[/RESET]'\n", params.activate.String())) if _, _, err := exeutils.ExecuteAndPipeStd(stateExe, []string{"activate", params.activate.String()}, envSlice(binPath)); err != nil { an.EventWithLabel(anaConst.CatInstallerFunnel, "forward-activate-err", err.Error()) return errs.Silence(errs.Wrap(err, "Could not activate %s, error returned: %s", params.activate.String(), errs.JoinMessage(err))) @@ -400,7 +400,7 @@ func postInstallEvents(out output.Outputer, cfg *config.Instance, an analytics.D case params.activateDefault.IsValid(): an.Event(anaConst.CatInstallerFunnel, "forward-activate-default") - out.Print(fmt.Sprintf("\nRunning `[ACTIONABLE]state activate --default %s[/RESET]`\n", params.activateDefault.String())) + out.Print(fmt.Sprintf("\nRunning '[ACTIONABLE]state activate --default %s[/RESET]'\n", params.activateDefault.String())) if _, _, err := exeutils.ExecuteAndPipeStd(stateExe, []string{"activate", params.activateDefault.String(), "--default"}, envSlice(binPath)); err != nil { an.EventWithLabel(anaConst.CatInstallerFunnel, "forward-activate-default-err", err.Error()) return errs.Silence(errs.Wrap(err, "Could not activate %s, error returned: %s", params.activateDefault.String(), errs.JoinMessage(err))) diff --git a/cmd/state/internal/cmdtree/cmdtree.go b/cmd/state/internal/cmdtree/cmdtree.go index ec3cf4b5fd..300b2e3f9f 100644 --- a/cmd/state/internal/cmdtree/cmdtree.go +++ b/cmd/state/internal/cmdtree/cmdtree.go @@ -353,7 +353,7 @@ func (a *addCmdAs) deprecatedAlias(aliased *captain.Command, name string) { func(c *captain.Command, args []string) error { msg := locale.Tl( "cmd_deprecated_notice", - "This command is deprecated. Please use `state {{.V0}}` instead.", + "This command is deprecated. Please use [ACTIONABLE]'state {{.V0}}'[/RESET] instead.", aliased.Name(), ) diff --git a/cmd/state/main.go b/cmd/state/main.go index ca683d0e54..422f6c6b7d 100644 --- a/cmd/state/main.go +++ b/cmd/state/main.go @@ -259,7 +259,7 @@ func run(args []string, isInteractive bool, cfg *config.Instance, out output.Out cmdName = childCmd.JoinedSubCommandNames() + " " } if !out.Type().IsStructured() { - err = errs.AddTips(err, locale.Tl("err_tip_run_help", "Run → [ACTIONABLE]`state {{.V0}}--help`[/RESET] for general help", cmdName)) + err = errs.AddTips(err, locale.Tl("err_tip_run_help", "Run → [ACTIONABLE]'state {{.V0}}--help'[/RESET] for general help", cmdName)) } errors.ReportError(err, cmds.Command(), an) } diff --git a/internal/locale/locales/en-us.yaml b/internal/locale/locales/en-us.yaml index c849952278..accf05cc7c 100644 --- a/internal/locale/locales/en-us.yaml +++ b/internal/locale/locales/en-us.yaml @@ -286,7 +286,7 @@ err_language_not_found: error_state_activate_copy_save: other: Error saving project file error_state_activate_new_no_commit_aborted: - other: "Platform project created but cannot activate. Try [ACTIONABLE]`state activate {{.Owner}}/{{.ProjectName}}`[/RESET]." + other: "Platform project created but cannot activate. Try [ACTIONABLE]'state activate {{.Owner}}/{{.ProjectName}}'[/RESET]." state_activate_new_prompt_owner: other: "Please provide an owner for the new project:" error_state_activate_new_fetch_organizations: @@ -294,7 +294,7 @@ error_state_activate_new_fetch_organizations: state_activate_new_created: other: Created new project in [NOTICE]{{.Dir}}[/RESET] state_activate_new_platform_project: - other: New platform project successfully created as [NOTICE]{{.Owner}}/{{.Project}}[/RESET]. To activate your new project run [ACTIONABLE]`state activate {{.Owner}}/{{.Project}}`[/RESET] + other: New platform project successfully created as [NOTICE]{{.Owner}}/{{.Project}}[/RESET]. To activate your new project run [ACTIONABLE]'state activate {{.Owner}}/{{.Project}}'[/RESET] state_activate_new_prompt_language: other: Which language would you like to use to manage your State Tool scripts? state_activate_new_language_none: @@ -326,7 +326,7 @@ projects_description: projects_list_description: other: List your platform projects err_api_not_authenticated: - other: You are not authenticated, authenticate with [ACTIONABLE]`state auth`[/RESET]. + other: You are not authenticated, authenticate with [ACTIONABLE]'state auth'[/RESET]. err_api_forbidden: other: You are not allowed to access or modify the requested resource err_api_org_not_found: @@ -467,8 +467,6 @@ prompt_env_choose_remove: other: Which variable would you like to remove? err_env_cannot_parse: other: Could not parse variables used in your request -prompt_env_option: - other: "{{.Variable}}: `{{.Value}}` ({{.Constraints}}{{.Hash}})" env_removed: other: "Variable removed: [NOTICE]{{.Variable}} ({{.Hash}}[/RESET])" env_inherit_description: @@ -661,7 +659,7 @@ keypair_err_publickey_not_found: keypair_err_passphrase_prompt: other: The provided passphrase is invalid keypair_err_require_auth: - other: You need to be authenticated to run this command, please run [ACTIONABLE]`state auth`[/RESET] first + other: You need to be authenticated to run this command, please run [ACTIONABLE]'state auth'[/RESET] first keypairs_err_bitlength_too_short: other: bit-length too short keypairs_err_pem_encoding: @@ -681,7 +679,7 @@ keypairs_err_override_with_save: keypairs_err_override_with_delete: other: "cannot delete key file while key override is set" err_command_requires_auth: - other: You need to be authenticated to run this command. Authenticate by running [ACTIONABLE]`state auth`[/RESET]. + other: You need to be authenticated to run this command. Authenticate by running [ACTIONABLE]'state auth'[/RESET]. warn_script_name_in_use: other: "[ERROR]WARNING:[/RESET] The following scripts collide with existing commands and should be renamed: [NOTICE]{{.V0}}[/RESET]." warn_move_incompatible_modes: @@ -714,7 +712,7 @@ update_available: other: | Your version: [NOTICE]{{.V0}}[/RESET] Available Version: [NOTICE]{{.V1}}[/RESET] - You can update by running [ACTIONABLE]`state update`[/RESET] + You can update by running [ACTIONABLE]'state update'[/RESET] update_none_found: other: Update not found for {{.V0}}. updating_version: @@ -724,7 +722,7 @@ runtime_update_notice_known_count: runtime_update_notice_unknown_count: other: "Your activestate.yaml is behind." runtime_update_help: - other: "Run [ACTIONABLE]`state pull`[/RESET] to pull in the latest runtime environment as defined in your project on [NOTICE]https://platform.activestate.com/{{.V0}}/{{.V1}}[/RESET]" + other: "Run [ACTIONABLE]'state pull'[/RESET] to pull in the latest runtime environment as defined in your project on [NOTICE]https://platform.activestate.com/{{.V0}}/{{.V1}}[/RESET]" err_no_credentials: other: Cannot authenticate without credentials err_token_list: @@ -859,7 +857,7 @@ warn_deprecation: Reason for deprecation: [NOTICE]{{.V1}}[/RESET] - Please update by running [ACTIONABLE]`state update`[/RESET]. + Please update by running [ACTIONABLE]'state update'[/RESET]. err_deprecation: other: | You are running a version of the State Tool that is no longer supported! You will be encountering issues. @@ -867,7 +865,7 @@ err_deprecation: Reason for deprecation: [NOTICE]{{.V1}}[/RESET] - Please update by running [ACTIONABLE]`state update`[/RESET]. + Please update by running [ACTIONABLE]'state update'[/RESET]. err_auth_required: other: Authentication is required, please authenticate by running 'state auth' err_auth_needinput: @@ -1001,9 +999,9 @@ err_replaceall_check_log: err_bad_project_url: other: "Invalid value for 'project' field in your activestate.yaml, please ensure it is in the format of: 'https://platform.activestate.com/org/project'." err_set_commit_id: - other: "Could not update your activestate.yaml with the latest commit ID. Please ensure you have your project defined in the format of [ACTIONABLE]`project: https://platform.activestate.com/org/project`[/RESET]" + other: "Could not update your activestate.yaml with the latest commit ID. Please ensure you have your project defined in the format of [ACTIONABLE]'project: https://platform.activestate.com/org/project'[/RESET]" err_set_project: - other: "Could not update the project field in your activestate.yaml. Please ensure you have your project defined in the format of [ACTIONABLE]`project: https://platform.activestate.com/org/project`[/RESET]" + other: "Could not update the project field in your activestate.yaml. Please ensure you have your project defined in the format of [ACTIONABLE]'project: https://platform.activestate.com/org/project'[/RESET]" err_unauthorized: other: You are not authorized, did you provide valid login credentials? err_projectfile_exists: @@ -1161,16 +1159,16 @@ package_removed: bundle_removed: other: "Bundle uninstalled: [NOTICE]{{.V0}}[/RESET]" update_config: - other: To ensure your local project is synchronized with the ActiveState platform please use [ACTIONABLE]`state pull`[/RESET] + other: To ensure your local project is synchronized with the ActiveState platform please use [ACTIONABLE]'state pull'[/RESET] package_update_config_file: - other: To ensure your local project is synchronized with the ActiveState platform please use [ACTIONABLE]`state pull`[/RESET] + other: To ensure your local project is synchronized with the ActiveState platform please use [ACTIONABLE]'state pull'[/RESET] inventory_ingredient_not_available: other: The package '[NOTICE]{{.V0}}[/RESET]' is not available on the ActiveState Platform, or does not have a matching version err_update_build_script: other: Could not update runtime build script notice_commit_build_script: other: | - Your local build script has changes that should be committed. Please run [ACTIONABLE]`state commit`[/RESET] to do so. + Your local build script has changes that should be committed. Please run [ACTIONABLE]'state commit'[/RESET] to do so. command_flag_invalid_value: other: "Invalid value for {{.V0}} flag: [NOTICE]{{.V1}}[/RESET]" @@ -1197,7 +1195,7 @@ err_init_lang: init_success: other: | Project '[NOTICE]{{.V0}}[/RESET]' has been successfully initialized at '[NOTICE]{{.V1}}[/RESET]' and pushed to the Platform. - You can start using your project with [ACTIONABLE]`state shell`[/RESET] and [ACTIONABLE]`state use`[/RESET]. + You can start using your project with [ACTIONABLE]'state shell'[/RESET] and [ACTIONABLE]'state use'[/RESET]. For editors and other tooling use the executables at: [ACTIONABLE]{{.V2}}[/RESET]. arg_state_init_namespace: other: org/project @@ -1438,7 +1436,7 @@ deploy_restart_shell: deploy_restart_cmd: other: | Please log out and back in again in order to start using the newly configured Runtime Environment. - Alternatively, you can run `setenv` from the installation directory to update your environment + Alternatively, you can run [ACTIONABLE]'setenv'[/RESET] from the installation directory to update your environment flag_state_deploy_path_description: other: The path to deploy the runtime installation files to. This directory will not be affected by 'state clean' flag_state_deploy_force_description: @@ -1511,23 +1509,23 @@ ppm_print_main: See [ACTIONABLE]https://docs.activestate.com/platform/state/[/RESET] for details. ppm_print_forward: other: | - Your command is being forwarded to [ACTIONABLE]`{{.V0}}`[/RESET]. - In the future you can run [ACTIONABLE]`{{.V0}}`[/RESET] directly instead of running [ACTIONABLE]`{{.V1}}`[/RESET], which will soon be deprecated. + Your command is being forwarded to [ACTIONABLE]'{{.V0}}'[/RESET]. + In the future you can run [ACTIONABLE]'{{.V0}}'[/RESET] directly instead of running [ACTIONABLE]'{{.V1}}'[/RESET], which will soon be deprecated. ppm_print_forward_after_convert: other: | - Please navigate to your newly created project directory and run [ACTIONABLE]`{{.V1}}`[/RESET] again. - You can also run [ACTIONABLE]`{{.V0}}`[/RESET] directly instead of running [ACTIONABLE]`{{.V1}}`[/RESET], which will soon be deprecated. + Please navigate to your newly created project directory and run [ACTIONABLE]'{{.V1}}'[/RESET] again. + You can also run [ACTIONABLE]'{{.V0}}'[/RESET] directly instead of running [ACTIONABLE]'{{.V1}}'[/RESET], which will soon be deprecated. ppm_print_forward_failure: other: | - Your command is being forwarded to [ACTIONABLE]`{{.V0}}`[/RESET]. - In the future you can run [ACTIONABLE]`{{.V0}}`[/RESET] directly instead of running [ACTIONABLE]`{{.V1}}`[/RESET], which will soon be deprecated. + Your command is being forwarded to [ACTIONABLE]'{{.V0}}'[/RESET]. + In the future you can run [ACTIONABLE]'{{.V0}}'[/RESET] directly instead of running [ACTIONABLE]'{{.V1}}'[/RESET], which will soon be deprecated. - Note that [ACTIONABLE]`{{.V0}}`[/RESET] is not a direct analog for [ACTIONABLE]`{{.V1}}`[/RESET] and your command may have failed as a result. - Please run [ACTIONABLE]`{{.V0}} --help`[/RESET] for further information on how to use it for your use-case. + Note that [ACTIONABLE]'{{.V0}}'[/RESET] is not a direct analog for [ACTIONABLE]'{{.V1}}'[/RESET] and your command may have failed as a result. + Please run [ACTIONABLE]'{{.V0}} --help'[/RESET] for further information on how to use it for your use-case. ppm_print_area_redundant: other: | `ppm area` and its subcommands have been made redundant thanks to State Tool's use of virtual environments. - You can simply start managing your packages, run [ACTIONABLE]`{{.V0}} --help`[/RESET] for more information. + You can simply start managing your packages, run [ACTIONABLE]'{{.V0}} --help'[/RESET] for more information. ppm_install_intent: other: add new packages to your project ppm_upgrade_intent: @@ -1569,17 +1567,17 @@ tutorial_newproject_intro: set up shared scripts, and much more. [[BR]][[BR]] We'll help you create your first virtual environment, after that you can create as many as you want by running - [ACTIONABLE]`state init`[/RESET]. + [ACTIONABLE]'state init'[/RESET]. [[BR]] tutorial_newproject_outro: other: | Your Virtual Runtime Environment has been created. [[BR]][[BR]] - To start using your project simply run [ACTIONABLE]`state activate`[/RESET] from your project directory at [ACTIONABLE]{{.Dir}}[/RESET]. + To start using your project simply run [ACTIONABLE]'state activate'[/RESET] from your project directory at [ACTIONABLE]{{.Dir}}[/RESET]. You can also manage your project in your browser at [ACTIONABLE]{{.URL}}[/RESET]. [[BR]][[BR]] - To create another project run [ACTIONABLE]`state init`[/RESET], or if you want to find out more about the State Tool and what it can do - run [ACTIONABLE]`state --help`[/RESET] or check out [ACTIONABLE]{{.Docs}}[/RESET] + To create another project run [ACTIONABLE]'state init'[/RESET], or if you want to find out more about the State Tool and what it can do + run [ACTIONABLE]'state --help'[/RESET] or check out [ACTIONABLE]{{.Docs}}[/RESET] ppm_convert_after_tutorial: other: | For your convenience you can continue to use ppm commands once you've activated your virtual runtime environment. @@ -1600,8 +1598,8 @@ ppm_convert_ask_feedback: We understand your need to do things traditionally, but we currently do not support it. We'd love to hear more about your use case to see if we can better meet your needs. Please consider posting to our forum at {{.ForumURL}}. [[BR]] - To create another project run [ACTIONABLE]`state init`[/RESET], or if you want to find out more about the State Tool and what it can do - run [ACTIONABLE]`state --help`[/RESET] or check out [ACTIONABLE]{{.Docs}}[/RESET] + To create another project run [ACTIONABLE]'state init'[/RESET], or if you want to find out more about the State Tool and what it can do + run [ACTIONABLE]'state --help'[/RESET] or check out [ACTIONABLE]{{.Docs}}[/RESET] windows_compatibility_warning: other: | Unable to detect your Windows version. You may encounter issues; please ensure you are running at least Windows 10 build 17134.1. @@ -1626,7 +1624,7 @@ artifact_succeeded: artifact_failed: other: "Failed: [NOTICE]{{.V0}}[/RESET]. Error returned: [ERROR]{{.V1}}[/RESET]" err_package_update_commit_id: - other: "Could not update your project runtime's commit ID. Please run [ACTIONABLE]`state pull`[/RESET] manually." + other: "Could not update your project runtime's commit ID. Please run [ACTIONABLE]'state pull'[/RESET] manually." prepare_protocol_warning: other: Could not add state protocol err_preparestart_shortcut: @@ -1636,7 +1634,7 @@ err_preparestart_icon: confirm: other: Please Confirm err_no_project: - other: To run this command you need to be in an existing project. You can create a new project with [ACTIONABLE]state init[/RESET] or run this command from a directory that is in an existing project. You can also use an existing project by running [ACTIONABLE]`state activate --default`[/RESET] inside your project directory. + other: To run this command you need to be in an existing project. You can create a new project with [ACTIONABLE]state init[/RESET] or run this command from a directory that is in an existing project. You can also use an existing project by running [ACTIONABLE]'state activate --default'[/RESET] inside your project directory. activate_default_prompt: other: | Would you like always use [NOTICE]{{.V0}}[/RESET]? @@ -1660,9 +1658,9 @@ config_get_error: cve_needs_authentication: other: You need to be authenticated in order to access vulnerability information about your project. auth_tip: - other: Run `state auth` to authenticate. + other: Run [ACTIONABLE]'state auth'[/RESET] to authenticate. err_non_interactive_mode: - other: You are running the State Tool in non-interactive mode, but interactive input was needed. Please re-run the State Tool in interactive mode. If you are using a non-interactive terminal like Git Bash on Windows, prefix your command with [ACTIONABLE]`winpty`[/RESET]. (See https://github.com/git-for-windows/git/wiki/FAQ#some-native-console-programs-dont-work-when-run-from-git-bash-how-to-fix-it for more information.) + other: You are running the State Tool in non-interactive mode, but interactive input was needed. Please re-run the State Tool in interactive mode. If you are using a non-interactive terminal like Git Bash on Windows, prefix your command with [ACTIONABLE]'winpty'[/RESET]. (See https://github.com/git-for-windows/git/wiki/FAQ#some-native-console-programs-dont-work-when-run-from-git-bash-how-to-fix-it for more information.) err_alternate_branches: other: | Your current platform ([ACTIONABLE]{{.V0}}/{{.V1}}[/RESET]) does not appear to be configured in your branch: [ACTIONABLE]'{{.V2}}'[/RESET], perhaps you could try one of the alternate branches on your project: @@ -1705,12 +1703,12 @@ install_initial_success: err_package_info_no_packages: other: No packages in our catalog are an exact match for [NOTICE]"{{.V0}}"[/RESET]. package_try_search: - other: "Valid package names can be searched using [ACTIONABLE]`state search {package_name}`[/RESET]" + other: "Valid package names can be searched using [ACTIONABLE]'state search '[/RESET]" package_info_request: other: "Request a package at [ACTIONABLE]https://community.activestate.com/[/RESET]" err_push_outdated: other: | - Your project has new changes available that need to be merged first. Please first run `[ACTIONABLE]state pull[/RESET]` to update your project. + Your project has new changes available that need to be merged first. Please first run '[ACTIONABLE]state pull[/RESET]' to update your project. err_tip_push_outdated: other: Run '[ACTIONABLE]state pull[/RESET]'. err_push_not_authenticated: @@ -1735,12 +1733,12 @@ err_push_target_invalid_history: other: The target's commit history does not match your local commit history. Are you pushing to the right project? err_pull_incompatible: other: | - The remote project has an incompatible commit history. Target a different project with `[ACTIONABLE--set-project[/RESET]` or reset your local checkout with `[ACTIONABLE]state reset[/RESET]`. + The remote project has an incompatible commit history. Target a different project with '[ACTIONABLE]--set-project[/RESET]' or reset your local checkout with '[ACTIONABLE]state reset[/RESET]'. pull_diverged_message: other: | A merge commit will be created for project [NOTICE]{{.V0}}[/RESET] on branch [NOTICE]{{.V1}}[/RESET]. Merging commits [NOTICE]{{.V2}}[/RESET] (local) and [NOTICE]{{.V3}}[/RESET] (remote). - Any conflicts will favour your local changes. To view the merge commit run `[ACTIONABLE]state history[/RESET]` + Any conflicts will favour your local changes. To view the merge commit run '[ACTIONABLE]state history[/RESET]' pull_merge_commit: other: Merged {{.V1}} into {{.V0}} operation_success_local: @@ -1785,7 +1783,7 @@ lock_update_legacy_version: lock_version_mismatch: other: This project is locked at State Tool version [NOTICE]{{.V0}}[/RESET]. Your current State Tool version is [NOTICE]{{.V1}}@{{.V2}}[/RESET]. lock_update_lock: - other: You can lock the project to the running State Tool version with `[ACTIONABLE]state update lock[/RESET]`. + other: You can lock the project to the running State Tool version with '[ACTIONABLE]state update lock[/RESET]'. err_ping_version_mismatch: other: | The installed version of the State Tool Service does not match that of the client. @@ -1871,13 +1869,13 @@ err_update_corrupt_install: arg_state_use_namespace: other: org/project or project arg_state_use_namespace_description: - other: "The fully qualified namespace (org/project) or just the project name (project) of the project to use. Must have been previously checked out using [ACTIONABLE]`state checkout`[/RESET]." + other: "The fully qualified namespace (org/project) or just the project name (project) of the project to use. Must have been previously checked out using [ACTIONABLE]'state checkout'[/RESET]." err_use_commit_id_mismatch: - other: "Cannot switch to the given commit ID. Please use [ACTIONABLE]`state checkout`[/RESET] to check out a specific commit ID and then try again." + other: "Cannot switch to the given commit ID. Please use [ACTIONABLE]'state checkout'[/RESET] to check out a specific commit ID and then try again." err_use_default_project_does_not_exist: other: "Cannot find your project. Please either check it out again with [ACTIONABLE]state checkout[/RESET] or run [ACTIONABLE]state use reset[/RESET] to stop using it." err_shell_commit_id_mismatch: - other: "Cannot start a shell/prompt for the given commit ID. Please use [ACTIONABLE]`state checkout`[/RESET] to check out a specific commit ID and then try again." + other: "Cannot start a shell/prompt for the given commit ID. Please use [ACTIONABLE]'state checkout'[/RESET] to check out a specific commit ID and then try again." err_shell_cannot_load_project: other: Cannot load project to start a shell/prompt in. err_shell_already_active: @@ -1895,7 +1893,7 @@ err_project_namespace_missmatch: err_project_fromenv: other: Could not detect an appropriate project to use, please provide a valid path or namespace. err_local_project_not_checked_out: - other: "Cannot find the [ACTIONABLE]{{.V0}}[/RESET] project. Please either check it out using [ACTIONABLE]`state checkout`[/RESET] or run this command again from the project directory." + other: "Cannot find the [ACTIONABLE]{{.V0}}[/RESET] project. Please either check it out using [ACTIONABLE]'state checkout'[/RESET] or run this command again from the project directory." err_findproject_notfound: other: "Could not load project [ACTIONABLE]{{.V0}}[/RESET] from path: [ACTIONABLE]{{.V1}}[/RESET]" arg_state_shell_namespace_description: @@ -2028,7 +2026,7 @@ pjfile_deprecation_msg: pjfile_deprecation_entry: other: " - '[ACTIONABLE]{{.V0}}[/RESET]' located at byte [ACTIONABLE]{{.V1}}[/RESET]" err_init_authenticated: - other: You need to be authenticated to initialize a project. Authenticate by running [ACTIONABLE]`state auth`[/RESET]. + other: You need to be authenticated to initialize a project. Authenticate by running [ACTIONABLE]'state auth'[/RESET]. err_country_blocked: other: This service is not available in your region. err_commit_id_invalid: diff --git a/internal/runbits/git/git.go b/internal/runbits/git/git.go index 4ff0c248b7..044325a94d 100644 --- a/internal/runbits/git/git.go +++ b/internal/runbits/git/git.go @@ -65,7 +65,7 @@ func (r *Repo) CloneProject(owner, name, path string, out output.Outputer, an an err = locale.WrapError(err, "err_clone_repo", "Could not clone repository with URL: {{.V0}}, error received: {{.V1}}.", *project.RepoURL, err.Error()) tipMsg := locale.Tl( "err_tip_git_ssh-add", - "If you are using an SSH key please ensure it's configured by running `[ACTIONABLE]ssh-add [/RESET]`.", + "If you are using an SSH key please ensure it's configured by running '[ACTIONABLE]ssh-add [/RESET]'.", ) return errs.AddTips(err, tipMsg) } diff --git a/internal/runners/activate/activate.go b/internal/runners/activate/activate.go index ce2bd22be1..45b012e10a 100644 --- a/internal/runners/activate/activate.go +++ b/internal/runners/activate/activate.go @@ -160,7 +160,7 @@ func (r *Activate) Run(params *ActivateParams) (rerr error) { } else { r.out.Notice(locale.Tl( "activate_default_optin_msg", - "To make this project always available for use without activating it in the future, run your activate command with the `[ACTIONABLE]--default[/RESET]` flag.", + "To make this project always available for use without activating it in the future, run your activate command with the '[ACTIONABLE]--default[/RESET]' flag.", )) } } @@ -190,7 +190,7 @@ func (r *Activate) Run(params *ActivateParams) (rerr error) { return errs.Wrap(err, "Unable to get local commit") } if commitID == "" { - err := locale.NewInputError("err_project_no_commit", "Your project does not have a commit ID, please run `state push` first.", model.ProjectURL(proj.Owner(), proj.Name(), "")) + err := locale.NewInputError("err_project_no_commit", "Your project does not have a commit ID, please run [ACTIONIABLE]'state push'[/RESET] first.", model.ProjectURL(proj.Owner(), proj.Name(), "")) return errs.AddTips(err, "Run → [ACTIONABLE]state push[/RESET] to create your project") } diff --git a/internal/runners/auth/signup.go b/internal/runners/auth/signup.go index 75ac4997b0..0cccd669d3 100644 --- a/internal/runners/auth/signup.go +++ b/internal/runners/auth/signup.go @@ -26,7 +26,7 @@ func NewSignup(prime primeable) *Signup { func (s *Signup) Run(params *SignupParams) error { if s.Auth.Authenticated() { - return locale.NewInputError("err_auth_authenticated", "You are already authenticated as: {{.V0}}. You can log out by running `state auth logout`.", s.Auth.WhoAmI()) + return locale.NewInputError("err_auth_authenticated", "You are already authenticated as: {{.V0}}. You can log out by running [ACTIONABLE]'state auth logout'[/RESET].", s.Auth.WhoAmI()) } return auth.SignupWithBrowser(s.Outputer, s.Auth, s.Prompter) diff --git a/internal/runners/deploy/uninstall/uninstall.go b/internal/runners/deploy/uninstall/uninstall.go index f11c22d5a2..d2a5b6c865 100644 --- a/internal/runners/deploy/uninstall/uninstall.go +++ b/internal/runners/deploy/uninstall/uninstall.go @@ -68,7 +68,7 @@ func (u *Uninstall) Run(params *Params) error { return locale.WrapInputError( err, "err_deploy_uninstall_cannot_get_cwd", - "Cannot determine current working directory. Please supply `--path` argument") + "Cannot determine current working directory. Please supply [ACTIONABLE]'--path'[/RESET] argument") } path = cwd } diff --git a/internal/runners/events/log.go b/internal/runners/events/log.go index 2a54469bd2..e2c8e9fba2 100644 --- a/internal/runners/events/log.go +++ b/internal/runners/events/log.go @@ -30,7 +30,7 @@ func NewLog(prime primeable) *EventLog { func (e *EventLog) Run(params *EventLogParams) error { pid := process.ActivationPID(e.cfg) if pid == -1 { - return locale.NewInputError("err_eventlog_pid", "Could not find parent process ID, make sure you're running this command from inside an activated state (run `state activate` first).") + return locale.NewInputError("err_eventlog_pid", "Could not find parent process ID, make sure you're running this command from inside an activated state (run [ACTIONABLE]'state activate'[/RESET] first).") } filepath := logging.FilePathFor(logging.FileNameFor(int(pid))) diff --git a/internal/runners/export/privkey.go b/internal/runners/export/privkey.go index 06cc900964..ff46945d4c 100644 --- a/internal/runners/export/privkey.go +++ b/internal/runners/export/privkey.go @@ -29,7 +29,7 @@ func (p *PrivateKey) Run(params *PrivateKeyParams) error { if !p.Auth.Authenticated() { return locale.NewInputError("err_export_privkey_requires_auth", - "You need to be authenticated to run this command. Authenticate by running [ACTIONABLE]`state auth --prompt`[/RESET].") + "You need to be authenticated to run this command. Authenticate by running [ACTIONABLE]'state auth --prompt'[/RESET].") } filepath := keypairs.LocalKeyFilename(p.cfg.ConfigPath(), constants.KeypairLocalFileName) diff --git a/internal/runners/hello/hello_example.go b/internal/runners/hello/hello_example.go index bd78721b4b..c644c2627f 100644 --- a/internal/runners/hello/hello_example.go +++ b/internal/runners/hello/hello_example.go @@ -78,7 +78,7 @@ func rationalizeError(err *error) { *err, locale.Tl("hello_err_no_project", "Cannot say hello because you are not in a project directory."), errs.SetTips( - locale.Tl("hello_suggest_checkout", "Try using [ACTIONABLE]`state checkout`[/RESET] first."), + locale.Tl("hello_suggest_checkout", "Try using [ACTIONABLE]'state checkout'[/RESET] first."), ), ) } diff --git a/internal/runners/invite/invite.go b/internal/runners/invite/invite.go index 1c12743525..7436ec4854 100644 --- a/internal/runners/invite/invite.go +++ b/internal/runners/invite/invite.go @@ -53,7 +53,7 @@ func (i *invite) Run(params *Params, args []string) error { return locale.NewInputError("err_no_projectfile", "Must be in a project directory.") } if !i.auth.Authenticated() { - return locale.NewInputError("err_invite_not_logged_in", "You need to authenticate with [ACTIONABLE]`state auth`[/RESET] before you can invite new members.") + return locale.NewInputError("err_invite_not_logged_in", "You need to authenticate with [ACTIONABLE]'state auth'[/RESET] before you can invite new members.") } if len(args) > 1 { diff --git a/internal/runners/languages/languages.go b/internal/runners/languages/languages.go index 1381ede185..177f2c2e60 100644 --- a/internal/runners/languages/languages.go +++ b/internal/runners/languages/languages.go @@ -37,11 +37,11 @@ func (l *Languages) Run() error { locale.WrapError( err, "err_languages_no_commitid", - "Your project runtime does not have a commit defined, you may need to run [ACTIONABLE]`state pull`[/RESET] first.", + "Your project runtime does not have a commit defined, you may need to run [ACTIONABLE]'state pull'[/RESET] first.", ), locale.Tl( "languages_no_commitid_help", - "Run → [ACTIONABLE]`state pull`[/RESET] to update your project", + "Run → [ACTIONABLE]'state pull'[/RESET] to update your project", ), ) } diff --git a/internal/runners/packages/info.go b/internal/runners/packages/info.go index ea0370d5c6..7cb7e2fb14 100644 --- a/internal/runners/packages/info.go +++ b/internal/runners/packages/info.go @@ -222,7 +222,7 @@ func whatsNextMessages(name string, versions []string) []string { locale.Tl( "install_latest_version", "To install the latest version, run "+ - "[ACTIONABLE]`state install {{.V0}}`[/RESET]", + "[ACTIONABLE]'state install {{.V0}}'[/RESET]", name, ), ) @@ -236,7 +236,7 @@ func whatsNextMessages(name string, versions []string) []string { locale.Tl( "install_specific_version", "To install a specific version, run "+ - "[ACTIONABLE]`state install {{.V0}}@{{.V1}}[/RESET]`", + "[ACTIONABLE]'state install {{.V0}}@{{.V1}}'[/RESET]", name, version, ), ) @@ -248,7 +248,7 @@ func whatsNextMessages(name string, versions []string) []string { locale.Tl( "show_specific_version", "To view details for a specific version, run "+ - "[ACTIONABLE]`state info {{.V0}}@{{.V1}}`[/RESET]", + "[ACTIONABLE]'state info {{.V0}}@{{.V1}}'[/RESET]", name, version, ), ) diff --git a/internal/runners/pull/pull.go b/internal/runners/pull/pull.go index ac1b769a94..7a569bb2d9 100644 --- a/internal/runners/pull/pull.go +++ b/internal/runners/pull/pull.go @@ -91,7 +91,7 @@ func (p *Pull) Run(params *PullParams) (rerr error) { } if p.project.BranchName() == "" { - return locale.NewError("err_pull_branch", "Your [NOTICE]activestate.yaml[/RESET] project field does not contain a branch. Please ensure you are using the latest version of the State Tool by running [ACTIONABLE]`state update`[/RESET] and then trying again.") + return locale.NewError("err_pull_branch", "Your [NOTICE]activestate.yaml[/RESET] project field does not contain a branch. Please ensure you are using the latest version of the State Tool by running [ACTIONABLE]'state update'[/RESET] and then trying again.") } // Determine the project to pull from @@ -258,7 +258,7 @@ func (p *Pull) mergeBuildScript(strategies *mono_models.MergeStrategies, remoteC } return locale.NewInputError( "err_build_script_merge", - "Unable to automatically merge build scripts. Please resolve conflicts manually in '{{.V0}}' and then run [ACTIONABLE]`state commit`[/RESET]", + "Unable to automatically merge build scripts. Please resolve conflicts manually in '{{.V0}}' and then run [ACTIONABLE]'state commit'[/RESET]", filepath.Join(p.project.Dir(), constants.BuildScriptFileName)) } diff --git a/internal/runners/show/show.go b/internal/runners/show/show.go index faeda19abd..aebfbd6891 100644 --- a/internal/runners/show/show.go +++ b/internal/runners/show/show.go @@ -211,7 +211,7 @@ func (s *Show) Run(params Params) error { remoteProject, err := model.LegacyFetchProjectByName(owner, projectName) if err != nil && errs.Matches(err, &model.ErrProjectNotFound{}) { - return locale.WrapError(err, "err_show_project_not_found", "Please run `state push` to synchronize this project with the ActiveState Platform.") + return locale.WrapError(err, "err_show_project_not_found", "Please run [ACTIONABLE]'state push'[/RESET] to synchronize this project with the ActiveState Platform.") } else if err != nil { return locale.WrapError(err, "err_show_get_project", "Could not get remote project details") } diff --git a/internal/runners/tutorial/tutorial.go b/internal/runners/tutorial/tutorial.go index c1f9fb00dc..77e0c82689 100644 --- a/internal/runners/tutorial/tutorial.go +++ b/internal/runners/tutorial/tutorial.go @@ -109,7 +109,7 @@ func (t *Tutorial) RunNewProject(params NewProjectParams) error { // Run state push if err := runbits.Invoke(t.outputer, "push"); err != nil { - return locale.WrapInputError(err, "err_tutorial_state_push", "Could not push project to ActiveState Platform, try manually running `state push` from your project directory at {{.V0}}.", dir) + return locale.WrapInputError(err, "err_tutorial_state_push", "Could not push project to ActiveState Platform, try manually running [ACTIONABLE]'state push'[/RESET] from your project directory at {{.V0}}.", dir) } // Print outro @@ -149,12 +149,12 @@ func (t *Tutorial) authFlow() error { case signIn: t.analytics.EventWithLabel(anaConsts.CatTutorial, "authentication-action", "sign-in") if err := runbits.Invoke(t.outputer, "auth"); err != nil { - return locale.WrapInputError(err, "err_tutorial_signin", "Sign in failed. You could try manually signing in by running `state auth`.") + return locale.WrapInputError(err, "err_tutorial_signin", "Sign in failed. You could try manually signing in by running [ACTIONABLE]'state auth'[/RESET].") } case signUpCLI: t.analytics.EventWithLabel(anaConsts.CatTutorial, "authentication-action", "sign-up") if err := runbits.Invoke(t.outputer, "auth", "signup"); err != nil { - return locale.WrapInputError(err, "err_tutorial_signup", "Sign up failed. You could try manually signing up by running `state auth signup`.") + return locale.WrapInputError(err, "err_tutorial_signup", "Sign up failed. You could try manually signing up by running [ACTIONABLE]'state auth signup'[/RESET].") } case signUpBrowser: t.analytics.EventWithLabel(anaConsts.CatTutorial, "authentication-action", "sign-up-browser") @@ -164,7 +164,7 @@ func (t *Tutorial) authFlow() error { } t.outputer.Notice(locale.Tl("tutorial_signing_ready", "[NOTICE]Please sign in once you have finished signing up via your browser.[/RESET]")) if err := runbits.Invoke(t.outputer, "auth"); err != nil { - return locale.WrapInputError(err, "err_tutorial_signin", "Sign in failed. You could try manually signing in by running `state auth`.") + return locale.WrapInputError(err, "err_tutorial_signin", "Sign in failed. You could try manually signing in by running [ACTIONABLE]'state auth'[/RESET].") } } diff --git a/pkg/platform/authentication/auth.go b/pkg/platform/authentication/auth.go index 2823ac02b5..07356d2a07 100644 --- a/pkg/platform/authentication/auth.go +++ b/pkg/platform/authentication/auth.go @@ -203,8 +203,8 @@ func (s *Auth) AuthenticateWithModel(credentials *mono_models.Credentials) error if err != nil { tips := []string{ locale.Tl("relog_tip", "If you're having trouble authenticating try logging out and logging back in again."), - locale.Tl("logout_tip", "Logout with [ACTIONABLE]`state auth logout`[/RESET]."), - locale.Tl("logout_tip", "Login with [ACTIONABLE]`state auth`[/RESET]."), + locale.Tl("logout_tip", "Logout with [ACTIONABLE]'state auth logout'[/RESET]."), + locale.Tl("logout_tip", "Login with [ACTIONABLE]'state auth'[/RESET]."), } switch err.(type) { diff --git a/pkg/platform/model/cve.go b/pkg/platform/model/cve.go index cf37ae383a..a9b1141afa 100644 --- a/pkg/platform/model/cve.go +++ b/pkg/platform/model/cve.go @@ -23,7 +23,7 @@ func FetchProjectVulnerabilities(auth *authentication.Auth, org, project string) if !auth.Authenticated() { return nil, errs.AddTips( locale.NewError("cve_needs_authentication", "You need to be authenticated in order to access vulnerability information about your project."), - locale.Tl("auth_tip", "Run `state auth` to authenticate."), + locale.T("auth_tip"), ) } req := request.VulnerabilitiesByProject(org, project) @@ -48,7 +48,7 @@ func FetchCommitVulnerabilities(auth *authentication.Auth, commitID string) (*mo if !auth.Authenticated() { return nil, errs.AddTips( locale.NewError("cve_needs_authentication", "You need to be authenticated in order to access vulnerability information about your project."), - locale.Tl("auth_tip", "Run `state auth` to authenticate."), + locale.T("auth_tip"), ) } req := request.VulnerabilitiesByCommit(commitID) From d144331408fa08b620391f4bdf460015ec3c71dd Mon Sep 17 00:00:00 2001 From: mitchell Date: Wed, 22 Nov 2023 13:33:08 -0500 Subject: [PATCH 2/2] Move quotes outside of [ACTIONABLE] and [/RESET] tags. It better distinguishes what users should type. --- cmd/state/internal/cmdtree/cmdtree.go | 2 +- cmd/state/main.go | 2 +- internal/locale/locales/en-us.yaml | 86 +++++++++---------- internal/runners/auth/signup.go | 2 +- .../runners/deploy/uninstall/uninstall.go | 2 +- internal/runners/events/log.go | 2 +- internal/runners/export/privkey.go | 2 +- internal/runners/hello/hello_example.go | 2 +- internal/runners/invite/invite.go | 2 +- internal/runners/languages/languages.go | 4 +- internal/runners/packages/info.go | 6 +- internal/runners/pull/pull.go | 4 +- internal/runners/show/show.go | 2 +- internal/runners/tutorial/tutorial.go | 8 +- pkg/platform/authentication/auth.go | 4 +- 15 files changed, 65 insertions(+), 65 deletions(-) diff --git a/cmd/state/internal/cmdtree/cmdtree.go b/cmd/state/internal/cmdtree/cmdtree.go index 300b2e3f9f..52a3b34903 100644 --- a/cmd/state/internal/cmdtree/cmdtree.go +++ b/cmd/state/internal/cmdtree/cmdtree.go @@ -353,7 +353,7 @@ func (a *addCmdAs) deprecatedAlias(aliased *captain.Command, name string) { func(c *captain.Command, args []string) error { msg := locale.Tl( "cmd_deprecated_notice", - "This command is deprecated. Please use [ACTIONABLE]'state {{.V0}}'[/RESET] instead.", + "This command is deprecated. Please use '[ACTIONABLE]state {{.V0}}[/RESET]' instead.", aliased.Name(), ) diff --git a/cmd/state/main.go b/cmd/state/main.go index 422f6c6b7d..abf9dfd498 100644 --- a/cmd/state/main.go +++ b/cmd/state/main.go @@ -259,7 +259,7 @@ func run(args []string, isInteractive bool, cfg *config.Instance, out output.Out cmdName = childCmd.JoinedSubCommandNames() + " " } if !out.Type().IsStructured() { - err = errs.AddTips(err, locale.Tl("err_tip_run_help", "Run → [ACTIONABLE]'state {{.V0}}--help'[/RESET] for general help", cmdName)) + err = errs.AddTips(err, locale.Tl("err_tip_run_help", "Run → '[ACTIONABLE]state {{.V0}}--help[/RESET]' for general help", cmdName)) } errors.ReportError(err, cmds.Command(), an) } diff --git a/internal/locale/locales/en-us.yaml b/internal/locale/locales/en-us.yaml index accf05cc7c..e3a0833c98 100644 --- a/internal/locale/locales/en-us.yaml +++ b/internal/locale/locales/en-us.yaml @@ -286,7 +286,7 @@ err_language_not_found: error_state_activate_copy_save: other: Error saving project file error_state_activate_new_no_commit_aborted: - other: "Platform project created but cannot activate. Try [ACTIONABLE]'state activate {{.Owner}}/{{.ProjectName}}'[/RESET]." + other: "Platform project created but cannot activate. Try '[ACTIONABLE]state activate {{.Owner}}/{{.ProjectName}}[/RESET]'." state_activate_new_prompt_owner: other: "Please provide an owner for the new project:" error_state_activate_new_fetch_organizations: @@ -294,7 +294,7 @@ error_state_activate_new_fetch_organizations: state_activate_new_created: other: Created new project in [NOTICE]{{.Dir}}[/RESET] state_activate_new_platform_project: - other: New platform project successfully created as [NOTICE]{{.Owner}}/{{.Project}}[/RESET]. To activate your new project run [ACTIONABLE]'state activate {{.Owner}}/{{.Project}}'[/RESET] + other: New platform project successfully created as [NOTICE]{{.Owner}}/{{.Project}}[/RESET]. To activate your new project run '[ACTIONABLE]state activate {{.Owner}}/{{.Project}}[/RESET]' state_activate_new_prompt_language: other: Which language would you like to use to manage your State Tool scripts? state_activate_new_language_none: @@ -326,7 +326,7 @@ projects_description: projects_list_description: other: List your platform projects err_api_not_authenticated: - other: You are not authenticated, authenticate with [ACTIONABLE]'state auth'[/RESET]. + other: You are not authenticated, authenticate with '[ACTIONABLE]state auth[/RESET]'. err_api_forbidden: other: You are not allowed to access or modify the requested resource err_api_org_not_found: @@ -659,7 +659,7 @@ keypair_err_publickey_not_found: keypair_err_passphrase_prompt: other: The provided passphrase is invalid keypair_err_require_auth: - other: You need to be authenticated to run this command, please run [ACTIONABLE]'state auth'[/RESET] first + other: You need to be authenticated to run this command, please run '[ACTIONABLE]state auth[/RESET]' first keypairs_err_bitlength_too_short: other: bit-length too short keypairs_err_pem_encoding: @@ -679,7 +679,7 @@ keypairs_err_override_with_save: keypairs_err_override_with_delete: other: "cannot delete key file while key override is set" err_command_requires_auth: - other: You need to be authenticated to run this command. Authenticate by running [ACTIONABLE]'state auth'[/RESET]. + other: You need to be authenticated to run this command. Authenticate by running '[ACTIONABLE]state auth[/RESET]'. warn_script_name_in_use: other: "[ERROR]WARNING:[/RESET] The following scripts collide with existing commands and should be renamed: [NOTICE]{{.V0}}[/RESET]." warn_move_incompatible_modes: @@ -712,7 +712,7 @@ update_available: other: | Your version: [NOTICE]{{.V0}}[/RESET] Available Version: [NOTICE]{{.V1}}[/RESET] - You can update by running [ACTIONABLE]'state update'[/RESET] + You can update by running '[ACTIONABLE]state update[/RESET]' update_none_found: other: Update not found for {{.V0}}. updating_version: @@ -722,7 +722,7 @@ runtime_update_notice_known_count: runtime_update_notice_unknown_count: other: "Your activestate.yaml is behind." runtime_update_help: - other: "Run [ACTIONABLE]'state pull'[/RESET] to pull in the latest runtime environment as defined in your project on [NOTICE]https://platform.activestate.com/{{.V0}}/{{.V1}}[/RESET]" + other: "Run '[ACTIONABLE]state pull[/RESET]' to pull in the latest runtime environment as defined in your project on [NOTICE]https://platform.activestate.com/{{.V0}}/{{.V1}}[/RESET]" err_no_credentials: other: Cannot authenticate without credentials err_token_list: @@ -857,7 +857,7 @@ warn_deprecation: Reason for deprecation: [NOTICE]{{.V1}}[/RESET] - Please update by running [ACTIONABLE]'state update'[/RESET]. + Please update by running '[ACTIONABLE]state update[/RESET]'. err_deprecation: other: | You are running a version of the State Tool that is no longer supported! You will be encountering issues. @@ -865,7 +865,7 @@ err_deprecation: Reason for deprecation: [NOTICE]{{.V1}}[/RESET] - Please update by running [ACTIONABLE]'state update'[/RESET]. + Please update by running '[ACTIONABLE]state update[/RESET]'. err_auth_required: other: Authentication is required, please authenticate by running 'state auth' err_auth_needinput: @@ -999,9 +999,9 @@ err_replaceall_check_log: err_bad_project_url: other: "Invalid value for 'project' field in your activestate.yaml, please ensure it is in the format of: 'https://platform.activestate.com/org/project'." err_set_commit_id: - other: "Could not update your activestate.yaml with the latest commit ID. Please ensure you have your project defined in the format of [ACTIONABLE]'project: https://platform.activestate.com/org/project'[/RESET]" + other: "Could not update your activestate.yaml with the latest commit ID. Please ensure you have your project defined in the format of '[ACTIONABLE]project: https://platform.activestate.com/org/project[/RESET]'" err_set_project: - other: "Could not update the project field in your activestate.yaml. Please ensure you have your project defined in the format of [ACTIONABLE]'project: https://platform.activestate.com/org/project'[/RESET]" + other: "Could not update the project field in your activestate.yaml. Please ensure you have your project defined in the format of '[ACTIONABLE]project: https://platform.activestate.com/org/project[/RESET]'" err_unauthorized: other: You are not authorized, did you provide valid login credentials? err_projectfile_exists: @@ -1159,16 +1159,16 @@ package_removed: bundle_removed: other: "Bundle uninstalled: [NOTICE]{{.V0}}[/RESET]" update_config: - other: To ensure your local project is synchronized with the ActiveState platform please use [ACTIONABLE]'state pull'[/RESET] + other: To ensure your local project is synchronized with the ActiveState platform please use '[ACTIONABLE]state pull[/RESET]' package_update_config_file: - other: To ensure your local project is synchronized with the ActiveState platform please use [ACTIONABLE]'state pull'[/RESET] + other: To ensure your local project is synchronized with the ActiveState platform please use '[ACTIONABLE]state pull[/RESET]' inventory_ingredient_not_available: other: The package '[NOTICE]{{.V0}}[/RESET]' is not available on the ActiveState Platform, or does not have a matching version err_update_build_script: other: Could not update runtime build script notice_commit_build_script: other: | - Your local build script has changes that should be committed. Please run [ACTIONABLE]'state commit'[/RESET] to do so. + Your local build script has changes that should be committed. Please run '[ACTIONABLE]state commit[/RESET]' to do so. command_flag_invalid_value: other: "Invalid value for {{.V0}} flag: [NOTICE]{{.V1}}[/RESET]" @@ -1195,7 +1195,7 @@ err_init_lang: init_success: other: | Project '[NOTICE]{{.V0}}[/RESET]' has been successfully initialized at '[NOTICE]{{.V1}}[/RESET]' and pushed to the Platform. - You can start using your project with [ACTIONABLE]'state shell'[/RESET] and [ACTIONABLE]'state use'[/RESET]. + You can start using your project with '[ACTIONABLE]state shell[/RESET]' and '[ACTIONABLE]state use[/RESET]'. For editors and other tooling use the executables at: [ACTIONABLE]{{.V2}}[/RESET]. arg_state_init_namespace: other: org/project @@ -1436,7 +1436,7 @@ deploy_restart_shell: deploy_restart_cmd: other: | Please log out and back in again in order to start using the newly configured Runtime Environment. - Alternatively, you can run [ACTIONABLE]'setenv'[/RESET] from the installation directory to update your environment + Alternatively, you can run '[ACTIONABLE]setenv[/RESET]' from the installation directory to update your environment flag_state_deploy_path_description: other: The path to deploy the runtime installation files to. This directory will not be affected by 'state clean' flag_state_deploy_force_description: @@ -1509,23 +1509,23 @@ ppm_print_main: See [ACTIONABLE]https://docs.activestate.com/platform/state/[/RESET] for details. ppm_print_forward: other: | - Your command is being forwarded to [ACTIONABLE]'{{.V0}}'[/RESET]. - In the future you can run [ACTIONABLE]'{{.V0}}'[/RESET] directly instead of running [ACTIONABLE]'{{.V1}}'[/RESET], which will soon be deprecated. + Your command is being forwarded to '[ACTIONABLE]{{.V0}}[/RESET]'. + In the future you can run '[ACTIONABLE]{{.V0}}[/RESET]' directly instead of running '[ACTIONABLE]{{.V1}}[/RESET]', which will soon be deprecated. ppm_print_forward_after_convert: other: | - Please navigate to your newly created project directory and run [ACTIONABLE]'{{.V1}}'[/RESET] again. - You can also run [ACTIONABLE]'{{.V0}}'[/RESET] directly instead of running [ACTIONABLE]'{{.V1}}'[/RESET], which will soon be deprecated. + Please navigate to your newly created project directory and run '[ACTIONABLE]{{.V1}}[/RESET]' again. + You can also run '[ACTIONABLE]{{.V0}}[/RESET]' directly instead of running '[ACTIONABLE]{{.V1}}[/RESET]', which will soon be deprecated. ppm_print_forward_failure: other: | - Your command is being forwarded to [ACTIONABLE]'{{.V0}}'[/RESET]. - In the future you can run [ACTIONABLE]'{{.V0}}'[/RESET] directly instead of running [ACTIONABLE]'{{.V1}}'[/RESET], which will soon be deprecated. + Your command is being forwarded to '[ACTIONABLE]{{.V0}}[/RESET]'. + In the future you can run '[ACTIONABLE]{{.V0}}[/RESET]' directly instead of running '[ACTIONABLE]{{.V1}}[/RESET]', which will soon be deprecated. - Note that [ACTIONABLE]'{{.V0}}'[/RESET] is not a direct analog for [ACTIONABLE]'{{.V1}}'[/RESET] and your command may have failed as a result. - Please run [ACTIONABLE]'{{.V0}} --help'[/RESET] for further information on how to use it for your use-case. + Note that '[ACTIONABLE]{{.V0}}[/RESET]' is not a direct analog for '[ACTIONABLE]{{.V1}}[/RESET]' and your command may have failed as a result. + Please run '[ACTIONABLE]{{.V0}} --help[/RESET]' for further information on how to use it for your use-case. ppm_print_area_redundant: other: | `ppm area` and its subcommands have been made redundant thanks to State Tool's use of virtual environments. - You can simply start managing your packages, run [ACTIONABLE]'{{.V0}} --help'[/RESET] for more information. + You can simply start managing your packages, run '[ACTIONABLE]{{.V0}} --help[/RESET]' for more information. ppm_install_intent: other: add new packages to your project ppm_upgrade_intent: @@ -1567,17 +1567,17 @@ tutorial_newproject_intro: set up shared scripts, and much more. [[BR]][[BR]] We'll help you create your first virtual environment, after that you can create as many as you want by running - [ACTIONABLE]'state init'[/RESET]. + '[ACTIONABLE]state init[/RESET]'. [[BR]] tutorial_newproject_outro: other: | Your Virtual Runtime Environment has been created. [[BR]][[BR]] - To start using your project simply run [ACTIONABLE]'state activate'[/RESET] from your project directory at [ACTIONABLE]{{.Dir}}[/RESET]. + To start using your project simply run '[ACTIONABLE]state activate[/RESET]' from your project directory at [ACTIONABLE]{{.Dir}}[/RESET]. You can also manage your project in your browser at [ACTIONABLE]{{.URL}}[/RESET]. [[BR]][[BR]] - To create another project run [ACTIONABLE]'state init'[/RESET], or if you want to find out more about the State Tool and what it can do - run [ACTIONABLE]'state --help'[/RESET] or check out [ACTIONABLE]{{.Docs}}[/RESET] + To create another project run '[ACTIONABLE]state init[/RESET]', or if you want to find out more about the State Tool and what it can do + run '[ACTIONABLE]state --help[/RESET]' or check out [ACTIONABLE]{{.Docs}}[/RESET] ppm_convert_after_tutorial: other: | For your convenience you can continue to use ppm commands once you've activated your virtual runtime environment. @@ -1598,8 +1598,8 @@ ppm_convert_ask_feedback: We understand your need to do things traditionally, but we currently do not support it. We'd love to hear more about your use case to see if we can better meet your needs. Please consider posting to our forum at {{.ForumURL}}. [[BR]] - To create another project run [ACTIONABLE]'state init'[/RESET], or if you want to find out more about the State Tool and what it can do - run [ACTIONABLE]'state --help'[/RESET] or check out [ACTIONABLE]{{.Docs}}[/RESET] + To create another project run '[ACTIONABLE]state init[/RESET]', or if you want to find out more about the State Tool and what it can do + run '[ACTIONABLE]state --help[/RESET]' or check out [ACTIONABLE]{{.Docs}}[/RESET] windows_compatibility_warning: other: | Unable to detect your Windows version. You may encounter issues; please ensure you are running at least Windows 10 build 17134.1. @@ -1624,7 +1624,7 @@ artifact_succeeded: artifact_failed: other: "Failed: [NOTICE]{{.V0}}[/RESET]. Error returned: [ERROR]{{.V1}}[/RESET]" err_package_update_commit_id: - other: "Could not update your project runtime's commit ID. Please run [ACTIONABLE]'state pull'[/RESET] manually." + other: "Could not update your project runtime's commit ID. Please run '[ACTIONABLE]state pull[/RESET]' manually." prepare_protocol_warning: other: Could not add state protocol err_preparestart_shortcut: @@ -1634,7 +1634,7 @@ err_preparestart_icon: confirm: other: Please Confirm err_no_project: - other: To run this command you need to be in an existing project. You can create a new project with [ACTIONABLE]state init[/RESET] or run this command from a directory that is in an existing project. You can also use an existing project by running [ACTIONABLE]'state activate --default'[/RESET] inside your project directory. + other: To run this command you need to be in an existing project. You can create a new project with [ACTIONABLE]state init[/RESET] or run this command from a directory that is in an existing project. You can also use an existing project by running '[ACTIONABLE]state activate --default[/RESET]' inside your project directory. activate_default_prompt: other: | Would you like always use [NOTICE]{{.V0}}[/RESET]? @@ -1658,16 +1658,16 @@ config_get_error: cve_needs_authentication: other: You need to be authenticated in order to access vulnerability information about your project. auth_tip: - other: Run [ACTIONABLE]'state auth'[/RESET] to authenticate. + other: Run '[ACTIONABLE]state auth[/RESET]' to authenticate. err_non_interactive_mode: - other: You are running the State Tool in non-interactive mode, but interactive input was needed. Please re-run the State Tool in interactive mode. If you are using a non-interactive terminal like Git Bash on Windows, prefix your command with [ACTIONABLE]'winpty'[/RESET]. (See https://github.com/git-for-windows/git/wiki/FAQ#some-native-console-programs-dont-work-when-run-from-git-bash-how-to-fix-it for more information.) + other: You are running the State Tool in non-interactive mode, but interactive input was needed. Please re-run the State Tool in interactive mode. If you are using a non-interactive terminal like Git Bash on Windows, prefix your command with '[ACTIONABLE]winpty[/RESET]'. (See https://github.com/git-for-windows/git/wiki/FAQ#some-native-console-programs-dont-work-when-run-from-git-bash-how-to-fix-it for more information.) err_alternate_branches: other: | - Your current platform ([ACTIONABLE]{{.V0}}/{{.V1}}[/RESET]) does not appear to be configured in your branch: [ACTIONABLE]'{{.V2}}'[/RESET], perhaps you could try one of the alternate branches on your project: + Your current platform ([ACTIONABLE]{{.V0}}/{{.V1}}[/RESET]) does not appear to be configured in your branch: '[ACTIONABLE]{{.V2}}[/RESET]', perhaps you could try one of the alternate branches on your project: - {{.V3}} - Type [ACTIONABLE]'state branch switch '[/RESET] to switch to a different branch. + Type '[ACTIONABLE]state branch switch [/RESET]' to switch to a different branch. err_fetch_project: other: "Could not fetch details for project: {{.V0}}" err_set_default_branch: @@ -1703,7 +1703,7 @@ install_initial_success: err_package_info_no_packages: other: No packages in our catalog are an exact match for [NOTICE]"{{.V0}}"[/RESET]. package_try_search: - other: "Valid package names can be searched using [ACTIONABLE]'state search '[/RESET]" + other: "Valid package names can be searched using '[ACTIONABLE]state search [/RESET]'" package_info_request: other: "Request a package at [ACTIONABLE]https://community.activestate.com/[/RESET]" err_push_outdated: @@ -1869,13 +1869,13 @@ err_update_corrupt_install: arg_state_use_namespace: other: org/project or project arg_state_use_namespace_description: - other: "The fully qualified namespace (org/project) or just the project name (project) of the project to use. Must have been previously checked out using [ACTIONABLE]'state checkout'[/RESET]." + other: "The fully qualified namespace (org/project) or just the project name (project) of the project to use. Must have been previously checked out using '[ACTIONABLE]state checkout[/RESET]'." err_use_commit_id_mismatch: - other: "Cannot switch to the given commit ID. Please use [ACTIONABLE]'state checkout'[/RESET] to check out a specific commit ID and then try again." + other: "Cannot switch to the given commit ID. Please use '[ACTIONABLE]state checkout[/RESET]' to check out a specific commit ID and then try again." err_use_default_project_does_not_exist: other: "Cannot find your project. Please either check it out again with [ACTIONABLE]state checkout[/RESET] or run [ACTIONABLE]state use reset[/RESET] to stop using it." err_shell_commit_id_mismatch: - other: "Cannot start a shell/prompt for the given commit ID. Please use [ACTIONABLE]'state checkout'[/RESET] to check out a specific commit ID and then try again." + other: "Cannot start a shell/prompt for the given commit ID. Please use '[ACTIONABLE]state checkout[/RESET]' to check out a specific commit ID and then try again." err_shell_cannot_load_project: other: Cannot load project to start a shell/prompt in. err_shell_already_active: @@ -1893,7 +1893,7 @@ err_project_namespace_missmatch: err_project_fromenv: other: Could not detect an appropriate project to use, please provide a valid path or namespace. err_local_project_not_checked_out: - other: "Cannot find the [ACTIONABLE]{{.V0}}[/RESET] project. Please either check it out using [ACTIONABLE]'state checkout'[/RESET] or run this command again from the project directory." + other: "Cannot find the [ACTIONABLE]{{.V0}}[/RESET] project. Please either check it out using '[ACTIONABLE]state checkout[/RESET]' or run this command again from the project directory." err_findproject_notfound: other: "Could not load project [ACTIONABLE]{{.V0}}[/RESET] from path: [ACTIONABLE]{{.V1}}[/RESET]" arg_state_shell_namespace_description: @@ -2026,7 +2026,7 @@ pjfile_deprecation_msg: pjfile_deprecation_entry: other: " - '[ACTIONABLE]{{.V0}}[/RESET]' located at byte [ACTIONABLE]{{.V1}}[/RESET]" err_init_authenticated: - other: You need to be authenticated to initialize a project. Authenticate by running [ACTIONABLE]'state auth'[/RESET]. + other: You need to be authenticated to initialize a project. Authenticate by running '[ACTIONABLE]state auth[/RESET]'. err_country_blocked: other: This service is not available in your region. err_commit_id_invalid: diff --git a/internal/runners/auth/signup.go b/internal/runners/auth/signup.go index 0cccd669d3..f4f92aa340 100644 --- a/internal/runners/auth/signup.go +++ b/internal/runners/auth/signup.go @@ -26,7 +26,7 @@ func NewSignup(prime primeable) *Signup { func (s *Signup) Run(params *SignupParams) error { if s.Auth.Authenticated() { - return locale.NewInputError("err_auth_authenticated", "You are already authenticated as: {{.V0}}. You can log out by running [ACTIONABLE]'state auth logout'[/RESET].", s.Auth.WhoAmI()) + return locale.NewInputError("err_auth_authenticated", "You are already authenticated as: {{.V0}}. You can log out by running '[ACTIONABLE]state auth logout[/RESET]'.", s.Auth.WhoAmI()) } return auth.SignupWithBrowser(s.Outputer, s.Auth, s.Prompter) diff --git a/internal/runners/deploy/uninstall/uninstall.go b/internal/runners/deploy/uninstall/uninstall.go index d2a5b6c865..dae78fb129 100644 --- a/internal/runners/deploy/uninstall/uninstall.go +++ b/internal/runners/deploy/uninstall/uninstall.go @@ -68,7 +68,7 @@ func (u *Uninstall) Run(params *Params) error { return locale.WrapInputError( err, "err_deploy_uninstall_cannot_get_cwd", - "Cannot determine current working directory. Please supply [ACTIONABLE]'--path'[/RESET] argument") + "Cannot determine current working directory. Please supply '[ACTIONABLE]--path[/RESET]' argument") } path = cwd } diff --git a/internal/runners/events/log.go b/internal/runners/events/log.go index e2c8e9fba2..60d852fab5 100644 --- a/internal/runners/events/log.go +++ b/internal/runners/events/log.go @@ -30,7 +30,7 @@ func NewLog(prime primeable) *EventLog { func (e *EventLog) Run(params *EventLogParams) error { pid := process.ActivationPID(e.cfg) if pid == -1 { - return locale.NewInputError("err_eventlog_pid", "Could not find parent process ID, make sure you're running this command from inside an activated state (run [ACTIONABLE]'state activate'[/RESET] first).") + return locale.NewInputError("err_eventlog_pid", "Could not find parent process ID, make sure you're running this command from inside an activated state (run '[ACTIONABLE]state activate[/RESET]' first).") } filepath := logging.FilePathFor(logging.FileNameFor(int(pid))) diff --git a/internal/runners/export/privkey.go b/internal/runners/export/privkey.go index ff46945d4c..c182b935f4 100644 --- a/internal/runners/export/privkey.go +++ b/internal/runners/export/privkey.go @@ -29,7 +29,7 @@ func (p *PrivateKey) Run(params *PrivateKeyParams) error { if !p.Auth.Authenticated() { return locale.NewInputError("err_export_privkey_requires_auth", - "You need to be authenticated to run this command. Authenticate by running [ACTIONABLE]'state auth --prompt'[/RESET].") + "You need to be authenticated to run this command. Authenticate by running '[ACTIONABLE]state auth --prompt[/RESET]'.") } filepath := keypairs.LocalKeyFilename(p.cfg.ConfigPath(), constants.KeypairLocalFileName) diff --git a/internal/runners/hello/hello_example.go b/internal/runners/hello/hello_example.go index c644c2627f..63fd924b7e 100644 --- a/internal/runners/hello/hello_example.go +++ b/internal/runners/hello/hello_example.go @@ -78,7 +78,7 @@ func rationalizeError(err *error) { *err, locale.Tl("hello_err_no_project", "Cannot say hello because you are not in a project directory."), errs.SetTips( - locale.Tl("hello_suggest_checkout", "Try using [ACTIONABLE]'state checkout'[/RESET] first."), + locale.Tl("hello_suggest_checkout", "Try using '[ACTIONABLE]state checkout[/RESET]' first."), ), ) } diff --git a/internal/runners/invite/invite.go b/internal/runners/invite/invite.go index 7436ec4854..908e8a072f 100644 --- a/internal/runners/invite/invite.go +++ b/internal/runners/invite/invite.go @@ -53,7 +53,7 @@ func (i *invite) Run(params *Params, args []string) error { return locale.NewInputError("err_no_projectfile", "Must be in a project directory.") } if !i.auth.Authenticated() { - return locale.NewInputError("err_invite_not_logged_in", "You need to authenticate with [ACTIONABLE]'state auth'[/RESET] before you can invite new members.") + return locale.NewInputError("err_invite_not_logged_in", "You need to authenticate with '[ACTIONABLE]state auth[/RESET]' before you can invite new members.") } if len(args) > 1 { diff --git a/internal/runners/languages/languages.go b/internal/runners/languages/languages.go index 177f2c2e60..c043a88d50 100644 --- a/internal/runners/languages/languages.go +++ b/internal/runners/languages/languages.go @@ -37,11 +37,11 @@ func (l *Languages) Run() error { locale.WrapError( err, "err_languages_no_commitid", - "Your project runtime does not have a commit defined, you may need to run [ACTIONABLE]'state pull'[/RESET] first.", + "Your project runtime does not have a commit defined, you may need to run '[ACTIONABLE]state pull[/RESET]' first.", ), locale.Tl( "languages_no_commitid_help", - "Run → [ACTIONABLE]'state pull'[/RESET] to update your project", + "Run → '[ACTIONABLE]state pull[/RESET]' to update your project", ), ) } diff --git a/internal/runners/packages/info.go b/internal/runners/packages/info.go index 7cb7e2fb14..01aaa75ae7 100644 --- a/internal/runners/packages/info.go +++ b/internal/runners/packages/info.go @@ -222,7 +222,7 @@ func whatsNextMessages(name string, versions []string) []string { locale.Tl( "install_latest_version", "To install the latest version, run "+ - "[ACTIONABLE]'state install {{.V0}}'[/RESET]", + "'[ACTIONABLE]state install {{.V0}}[/RESET]'", name, ), ) @@ -236,7 +236,7 @@ func whatsNextMessages(name string, versions []string) []string { locale.Tl( "install_specific_version", "To install a specific version, run "+ - "[ACTIONABLE]'state install {{.V0}}@{{.V1}}'[/RESET]", + "'[ACTIONABLE]state install {{.V0}}@{{.V1}}[/RESET]'", name, version, ), ) @@ -248,7 +248,7 @@ func whatsNextMessages(name string, versions []string) []string { locale.Tl( "show_specific_version", "To view details for a specific version, run "+ - "[ACTIONABLE]'state info {{.V0}}@{{.V1}}'[/RESET]", + "'[ACTIONABLE]state info {{.V0}}@{{.V1}}[/RESET]'", name, version, ), ) diff --git a/internal/runners/pull/pull.go b/internal/runners/pull/pull.go index 7a569bb2d9..bbed2c59b2 100644 --- a/internal/runners/pull/pull.go +++ b/internal/runners/pull/pull.go @@ -91,7 +91,7 @@ func (p *Pull) Run(params *PullParams) (rerr error) { } if p.project.BranchName() == "" { - return locale.NewError("err_pull_branch", "Your [NOTICE]activestate.yaml[/RESET] project field does not contain a branch. Please ensure you are using the latest version of the State Tool by running [ACTIONABLE]'state update'[/RESET] and then trying again.") + return locale.NewError("err_pull_branch", "Your [NOTICE]activestate.yaml[/RESET] project field does not contain a branch. Please ensure you are using the latest version of the State Tool by running '[ACTIONABLE]state update[/RESET]' and then trying again.") } // Determine the project to pull from @@ -258,7 +258,7 @@ func (p *Pull) mergeBuildScript(strategies *mono_models.MergeStrategies, remoteC } return locale.NewInputError( "err_build_script_merge", - "Unable to automatically merge build scripts. Please resolve conflicts manually in '{{.V0}}' and then run [ACTIONABLE]'state commit'[/RESET]", + "Unable to automatically merge build scripts. Please resolve conflicts manually in '{{.V0}}' and then run '[ACTIONABLE]state commit[/RESET]'", filepath.Join(p.project.Dir(), constants.BuildScriptFileName)) } diff --git a/internal/runners/show/show.go b/internal/runners/show/show.go index aebfbd6891..4e227ed472 100644 --- a/internal/runners/show/show.go +++ b/internal/runners/show/show.go @@ -211,7 +211,7 @@ func (s *Show) Run(params Params) error { remoteProject, err := model.LegacyFetchProjectByName(owner, projectName) if err != nil && errs.Matches(err, &model.ErrProjectNotFound{}) { - return locale.WrapError(err, "err_show_project_not_found", "Please run [ACTIONABLE]'state push'[/RESET] to synchronize this project with the ActiveState Platform.") + return locale.WrapError(err, "err_show_project_not_found", "Please run '[ACTIONABLE]state push[/RESET]' to synchronize this project with the ActiveState Platform.") } else if err != nil { return locale.WrapError(err, "err_show_get_project", "Could not get remote project details") } diff --git a/internal/runners/tutorial/tutorial.go b/internal/runners/tutorial/tutorial.go index 77e0c82689..88a176a7b1 100644 --- a/internal/runners/tutorial/tutorial.go +++ b/internal/runners/tutorial/tutorial.go @@ -109,7 +109,7 @@ func (t *Tutorial) RunNewProject(params NewProjectParams) error { // Run state push if err := runbits.Invoke(t.outputer, "push"); err != nil { - return locale.WrapInputError(err, "err_tutorial_state_push", "Could not push project to ActiveState Platform, try manually running [ACTIONABLE]'state push'[/RESET] from your project directory at {{.V0}}.", dir) + return locale.WrapInputError(err, "err_tutorial_state_push", "Could not push project to ActiveState Platform, try manually running '[ACTIONABLE]state push[/RESET]' from your project directory at {{.V0}}.", dir) } // Print outro @@ -149,12 +149,12 @@ func (t *Tutorial) authFlow() error { case signIn: t.analytics.EventWithLabel(anaConsts.CatTutorial, "authentication-action", "sign-in") if err := runbits.Invoke(t.outputer, "auth"); err != nil { - return locale.WrapInputError(err, "err_tutorial_signin", "Sign in failed. You could try manually signing in by running [ACTIONABLE]'state auth'[/RESET].") + return locale.WrapInputError(err, "err_tutorial_signin", "Sign in failed. You could try manually signing in by running '[ACTIONABLE]state auth[/RESET]'.") } case signUpCLI: t.analytics.EventWithLabel(anaConsts.CatTutorial, "authentication-action", "sign-up") if err := runbits.Invoke(t.outputer, "auth", "signup"); err != nil { - return locale.WrapInputError(err, "err_tutorial_signup", "Sign up failed. You could try manually signing up by running [ACTIONABLE]'state auth signup'[/RESET].") + return locale.WrapInputError(err, "err_tutorial_signup", "Sign up failed. You could try manually signing up by running '[ACTIONABLE]state auth signup[/RESET]'.") } case signUpBrowser: t.analytics.EventWithLabel(anaConsts.CatTutorial, "authentication-action", "sign-up-browser") @@ -164,7 +164,7 @@ func (t *Tutorial) authFlow() error { } t.outputer.Notice(locale.Tl("tutorial_signing_ready", "[NOTICE]Please sign in once you have finished signing up via your browser.[/RESET]")) if err := runbits.Invoke(t.outputer, "auth"); err != nil { - return locale.WrapInputError(err, "err_tutorial_signin", "Sign in failed. You could try manually signing in by running [ACTIONABLE]'state auth'[/RESET].") + return locale.WrapInputError(err, "err_tutorial_signin", "Sign in failed. You could try manually signing in by running '[ACTIONABLE]state auth[/RESET]'.") } } diff --git a/pkg/platform/authentication/auth.go b/pkg/platform/authentication/auth.go index 07356d2a07..25357b48b6 100644 --- a/pkg/platform/authentication/auth.go +++ b/pkg/platform/authentication/auth.go @@ -203,8 +203,8 @@ func (s *Auth) AuthenticateWithModel(credentials *mono_models.Credentials) error if err != nil { tips := []string{ locale.Tl("relog_tip", "If you're having trouble authenticating try logging out and logging back in again."), - locale.Tl("logout_tip", "Logout with [ACTIONABLE]'state auth logout'[/RESET]."), - locale.Tl("logout_tip", "Login with [ACTIONABLE]'state auth'[/RESET]."), + locale.Tl("logout_tip", "Logout with '[ACTIONABLE]state auth logout[/RESET]'."), + locale.Tl("logout_tip", "Login with '[ACTIONABLE]state auth[/RESET]'."), } switch err.(type) {