diff --git a/cmd/state/autoupdate.go b/cmd/state/autoupdate.go index d00406c164..bd8cf3ece3 100644 --- a/cmd/state/autoupdate.go +++ b/cmd/state/autoupdate.go @@ -77,7 +77,7 @@ func autoUpdate(svc *model.SvcModel, args []string, cfg *config.Instance, an ana return false, nil // ignore } if os.IsPermission(err) { - return false, locale.WrapInputError(err, locale.Tl("auto_update_permission_err", "", constants.DocumentationURL, errs.JoinMessage(err))) + return false, locale.WrapInputError(err, locale.Tr("auto_update_permission_err", constants.DocumentationURL, errs.JoinMessage(err))) } return false, locale.WrapError(err, locale.T("auto_update_failed")) } diff --git a/cmd/state/main.go b/cmd/state/main.go index abf9dfd498..3b1fb3ae32 100644 --- a/cmd/state/main.go +++ b/cmd/state/main.go @@ -245,7 +245,7 @@ func run(args []string, isInteractive bool, cfg *config.Instance, out output.Out (pj.VersionBranch() != "" && pj.VersionBranch() != constants.BranchName) { return errs.AddTips( locale.NewInputError("lock_version_mismatch", "", pj.Source().Lock, constants.BranchName, constants.Version), - locale.Tl("lock_update_legacy_version", "", constants.DocumentationURLLocking), + locale.Tr("lock_update_legacy_version", constants.DocumentationURLLocking), locale.T("lock_update_lock"), ) } diff --git a/internal/runbits/requirements/requirements.go b/internal/runbits/requirements/requirements.go index 4eff7aee3e..db324d83d6 100644 --- a/internal/runbits/requirements/requirements.go +++ b/internal/runbits/requirements/requirements.go @@ -106,7 +106,7 @@ func (r *RequirementOperation) ExecuteRequirementOperation(requirementName, requ if r.Project.IsHeadless() { return rationalize.ErrHeadless } - out.Notice(locale.Tl("operating_message", "", r.Project.NamespaceString(), r.Project.Dir())) + out.Notice(locale.Tr("operating_message", r.Project.NamespaceString(), r.Project.Dir())) switch nsType { case model.NamespacePackage, model.NamespaceBundle: @@ -130,7 +130,7 @@ func (r *RequirementOperation) ExecuteRequirementOperation(requirementName, requ var validatePkg = operation == bpModel.OperationAdded && (ns.Type() == model.NamespacePackage || ns.Type() == model.NamespaceBundle) if !ns.IsValid() && (nsType == model.NamespacePackage || nsType == model.NamespaceBundle) { - pg = output.StartSpinner(out, locale.Tl("progress_pkg_nolang", "", requirementName), constants.TerminalAnimationInterval) + pg = output.StartSpinner(out, locale.Tr("progress_pkg_nolang", requirementName), constants.TerminalAnimationInterval) supported, err := model.FetchSupportedLanguages(model.HostPlatform) if err != nil { @@ -157,7 +157,7 @@ func (r *RequirementOperation) ExecuteRequirementOperation(requirementName, requ origRequirementName := requirementName if validatePkg { - pg = output.StartSpinner(out, locale.Tl("progress_search", "", requirementName), constants.TerminalAnimationInterval) + pg = output.StartSpinner(out, locale.Tr("progress_search", requirementName), constants.TerminalAnimationInterval) normalized, err := model.FetchNormalizedName(ns, requirementName) if err != nil { diff --git a/internal/runners/checkout/checkout.go b/internal/runners/checkout/checkout.go index d5ad5319f5..379f288b3a 100644 --- a/internal/runners/checkout/checkout.go +++ b/internal/runners/checkout/checkout.go @@ -84,7 +84,7 @@ func (u *Checkout) Run(params *Params) (rerr error) { execDir := setup.ExecDir(rti.Target().Dir()) u.out.Print(output.Prepare( - locale.Tl("checkout_project_statement", "", proj.NamespaceString(), proj.Dir(), execDir), + locale.Tr("checkout_project_statement", proj.NamespaceString(), proj.Dir(), execDir), &struct { Namespace string `json:"namespace"` Path string `json:"path"` diff --git a/internal/runners/cve/cve.go b/internal/runners/cve/cve.go index 9c58520fe8..1bdbc32e6b 100644 --- a/internal/runners/cve/cve.go +++ b/internal/runners/cve/cve.go @@ -57,7 +57,7 @@ func (c *Cve) Run() error { if c.proj == nil { return locale.NewError("cve_no_project", "No project found at the current directory.") } - c.out.Notice(locale.Tl("operating_message", "", c.proj.NamespaceString(), c.proj.Dir())) + c.out.Notice(locale.Tr("operating_message", c.proj.NamespaceString(), c.proj.Dir())) if !c.auth.Authenticated() { return errs.AddTips( diff --git a/internal/runners/events/events.go b/internal/runners/events/events.go index 07f631a9af..5855e739e1 100644 --- a/internal/runners/events/events.go +++ b/internal/runners/events/events.go @@ -34,7 +34,7 @@ func (e *Events) Run() error { if e.project == nil { return locale.NewInputError("err_events_noproject", "You have to be inside a project folder to be able to view its events. Project folders contain an activestate.yaml.") } - e.out.Notice(locale.Tl("operating_message", "", e.project.NamespaceString(), e.project.Dir())) + e.out.Notice(locale.Tr("operating_message", e.project.NamespaceString(), e.project.Dir())) events := e.project.Events() rows := make([]eventOutput, len(events)) diff --git a/internal/runners/exec/exec.go b/internal/runners/exec/exec.go index 14dd3eb2fb..855199efdf 100644 --- a/internal/runners/exec/exec.go +++ b/internal/runners/exec/exec.go @@ -116,7 +116,7 @@ func (s *Exec) Run(params *Params, args ...string) (rerr error) { rtTarget = target.NewProjectTarget(proj, nil, trigger) } - s.out.Notice(locale.Tl("operating_message", "", projectNamespace, projectDir)) + s.out.Notice(locale.Tr("operating_message", projectNamespace, projectDir)) rt, err := runtime.New(rtTarget, s.analytics, s.svcModel, s.auth) switch { diff --git a/internal/runners/export/env.go b/internal/runners/export/env.go index 0ede33afb1..231efa2977 100644 --- a/internal/runners/export/env.go +++ b/internal/runners/export/env.go @@ -34,7 +34,7 @@ func (e *Env) Run() error { return locale.NewInputError("err_env_no_project", "No project found.") } - e.out.Notice(locale.Tl("export_project_statement", "", + e.out.Notice(locale.Tr("export_project_statement", e.project.NamespaceString(), e.project.Dir()), ) diff --git a/internal/runners/history/history.go b/internal/runners/history/history.go index 0ba655b9e0..ae9b6d41dd 100644 --- a/internal/runners/history/history.go +++ b/internal/runners/history/history.go @@ -37,7 +37,7 @@ func (h *History) Run(params *HistoryParams) error { if h.project == nil { return locale.NewInputError("err_history_no_project", "No project found. Please run this command in a project directory") } - h.out.Notice(locale.Tl("operating_message", "", h.project.NamespaceString(), h.project.Dir())) + h.out.Notice(locale.Tr("operating_message", h.project.NamespaceString(), h.project.Dir())) localCommitID, err := commitmediator.Get(h.project) if err != nil { diff --git a/internal/runners/packages/import.go b/internal/runners/packages/import.go index f97e15f201..05808feb57 100644 --- a/internal/runners/packages/import.go +++ b/internal/runners/packages/import.go @@ -98,7 +98,7 @@ func (i *Import) Run(params *ImportRunParams) error { return locale.NewInputError("err_no_project") } - i.out.Notice(locale.Tl("operating_message", "", i.proj.NamespaceString(), i.proj.Dir())) + i.out.Notice(locale.Tr("operating_message", i.proj.NamespaceString(), i.proj.Dir())) if params.FileName == "" { params.FileName = defaultImportFile diff --git a/internal/runners/packages/list.go b/internal/runners/packages/list.go index ac11fab76c..a884ae5ffd 100644 --- a/internal/runners/packages/list.go +++ b/internal/runners/packages/list.go @@ -44,7 +44,7 @@ func (l *List) Run(params ListRunParams, nstype model.NamespaceType) error { logging.Debug("ExecuteList") if l.project != nil && params.Project == "" { - l.out.Notice(locale.Tl("operating_message", "", l.project.NamespaceString(), l.project.Dir())) + l.out.Notice(locale.Tr("operating_message", l.project.NamespaceString(), l.project.Dir())) } var commit *strfmt.UUID diff --git a/internal/runners/pull/pull.go b/internal/runners/pull/pull.go index bbed2c59b2..421f4d9046 100644 --- a/internal/runners/pull/pull.go +++ b/internal/runners/pull/pull.go @@ -84,7 +84,7 @@ func (p *Pull) Run(params *PullParams) (rerr error) { if p.project == nil { return locale.NewInputError("err_no_project") } - p.out.Notice(locale.Tl("operating_message", "", p.project.NamespaceString(), p.project.Dir())) + p.out.Notice(locale.Tr("operating_message", p.project.NamespaceString(), p.project.Dir())) if p.project.IsHeadless() { return locale.NewInputError("err_pull_headless", "You must first create a project. Please visit {{.V0}} to create your project.", p.project.URL()) diff --git a/internal/runners/push/push.go b/internal/runners/push/push.go index 73bc4f1f15..3f09da5723 100644 --- a/internal/runners/push/push.go +++ b/internal/runners/push/push.go @@ -84,7 +84,7 @@ func (r *Push) Run(params PushParams) (rerr error) { if err := r.verifyInput(); err != nil { return errs.Wrap(err, "verifyInput failed") } - r.out.Notice(locale.Tl("operating_message", "", r.project.NamespaceString(), r.project.Dir())) + r.out.Notice(locale.Tr("operating_message", r.project.NamespaceString(), r.project.Dir())) commitID, err := commitmediator.Get(r.project) // The commit we want to push if err != nil { diff --git a/internal/runners/refresh/refresh.go b/internal/runners/refresh/refresh.go index 05361977cb..f271b4825a 100644 --- a/internal/runners/refresh/refresh.go +++ b/internal/runners/refresh/refresh.go @@ -70,7 +70,7 @@ func (r *Refresh) Run(params *Params) error { execDir := setup.ExecDir(rti.Target().Dir()) r.out.Print(output.Prepare( - locale.Tl("refresh_project_statement", "", proj.NamespaceString(), proj.Dir(), execDir), + locale.Tr("refresh_project_statement", proj.NamespaceString(), proj.Dir(), execDir), &struct { Namespace string `json:"namespace"` Path string `json:"path"` diff --git a/internal/runners/reset/reset.go b/internal/runners/reset/reset.go index 53427a68d4..f75f38ce1e 100644 --- a/internal/runners/reset/reset.go +++ b/internal/runners/reset/reset.go @@ -55,7 +55,7 @@ func (r *Reset) Run(params *Params) error { if r.project == nil { return locale.NewInputError("err_no_project") } - r.out.Notice(locale.Tl("operating_message", "", r.project.NamespaceString(), r.project.Dir())) + r.out.Notice(locale.Tr("operating_message", r.project.NamespaceString(), r.project.Dir())) var commitID strfmt.UUID if params.CommitID == "" { diff --git a/internal/runners/revert/revert.go b/internal/runners/revert/revert.go index d07d3ee6b2..7968e9ce6e 100644 --- a/internal/runners/revert/revert.go +++ b/internal/runners/revert/revert.go @@ -70,7 +70,7 @@ func (r *Revert) Run(params *Params) (rerr error) { if params.CommitID == latestCommit.String() && params.To { return locale.NewInputError("err_revert_to_current_commit", "The commit to revert to cannot be the latest commit") } - r.out.Notice(locale.Tl("operating_message", "", r.project.NamespaceString(), r.project.Dir())) + r.out.Notice(locale.Tr("operating_message", r.project.NamespaceString(), r.project.Dir())) bp := model.NewBuildPlannerModel(r.auth) targetCommitID := params.CommitID // the commit to revert the contents of, or the commit to revert to diff --git a/internal/runners/run/run.go b/internal/runners/run/run.go index dc62091646..a6608839a7 100644 --- a/internal/runners/run/run.go +++ b/internal/runners/run/run.go @@ -62,7 +62,7 @@ func (r *Run) Run(name string, args []string) error { checker.RunUpdateNotifier(r.analytics, r.svcModel, r.out) - r.out.Notice(locale.Tl("operating_message", "", r.proj.NamespaceString(), r.proj.Dir())) + r.out.Notice(locale.Tr("operating_message", r.proj.NamespaceString(), r.proj.Dir())) if name == "" { return locale.NewError("error_state_run_undefined_name") diff --git a/internal/runners/scripts/scripts.go b/internal/runners/scripts/scripts.go index b90f44c60f..a127bcb963 100644 --- a/internal/runners/scripts/scripts.go +++ b/internal/runners/scripts/scripts.go @@ -38,7 +38,7 @@ func (s *Scripts) Run() error { if s.project == nil { return locale.NewInputError("err_no_project") } - s.output.Notice(locale.Tl("operating_message", "", s.project.NamespaceString(), s.project.Dir())) + s.output.Notice(locale.Tr("operating_message", s.project.NamespaceString(), s.project.Dir())) name, owner := s.project.Name(), s.project.Owner() logging.Debug("listing scripts for org=%s, project=%s", owner, name) diff --git a/internal/runners/secrets/get.go b/internal/runners/secrets/get.go index fa2f380acd..0b22be2f68 100644 --- a/internal/runners/secrets/get.go +++ b/internal/runners/secrets/get.go @@ -51,7 +51,7 @@ func NewGet(p getPrimeable) *Get { // Run executes the get behavior. func (g *Get) Run(params GetRunParams) error { - g.out.Notice(locale.Tl("operating_message", "", g.proj.NamespaceString(), g.proj.Dir())) + g.out.Notice(locale.Tr("operating_message", g.proj.NamespaceString(), g.proj.Dir())) if err := checkSecretsAccess(g.proj, g.auth); err != nil { return locale.WrapError(err, "secrets_err_check_access") } diff --git a/internal/runners/secrets/secrets.go b/internal/runners/secrets/secrets.go index e64aae680d..64d7587e21 100644 --- a/internal/runners/secrets/secrets.go +++ b/internal/runners/secrets/secrets.go @@ -93,7 +93,7 @@ func (l *List) Run(params ListRunParams) error { if l.proj == nil { return locale.NewInputError("err_no_project") } - l.out.Notice(locale.Tl("operating_message", "", l.proj.NamespaceString(), l.proj.Dir())) + l.out.Notice(locale.Tr("operating_message", l.proj.NamespaceString(), l.proj.Dir())) if err := checkSecretsAccess(l.proj, l.auth); err != nil { return locale.WrapError(err, "secrets_err_check_access") diff --git a/internal/runners/secrets/set.go b/internal/runners/secrets/set.go index 551143ca18..45780cc247 100644 --- a/internal/runners/secrets/set.go +++ b/internal/runners/secrets/set.go @@ -45,7 +45,7 @@ func NewSet(p setPrimeable) *Set { // Run executes the set behavior. func (s *Set) Run(params SetRunParams) error { - s.out.Notice(locale.Tl("operating_message", "", s.proj.NamespaceString(), s.proj.Dir())) + s.out.Notice(locale.Tr("operating_message", s.proj.NamespaceString(), s.proj.Dir())) if err := checkSecretsAccess(s.proj, s.auth); err != nil { return locale.WrapError(err, "secrets_err_check_access") } diff --git a/internal/runners/secrets/sync.go b/internal/runners/secrets/sync.go index 640e28d947..e57e47de15 100644 --- a/internal/runners/secrets/sync.go +++ b/internal/runners/secrets/sync.go @@ -48,7 +48,7 @@ func NewSync(client *secretsapi.Client, p syncPrimeable) *Sync { // Run executes the sync behavior. func (s *Sync) Run() error { - s.out.Notice(locale.Tl("operating_message", "", s.proj.NamespaceString(), s.proj.Dir())) + s.out.Notice(locale.Tr("operating_message", s.proj.NamespaceString(), s.proj.Dir())) if err := checkSecretsAccess(s.proj, s.auth); err != nil { return locale.WrapError(err, "secrets_err_check_access") } diff --git a/internal/runners/shell/shell.go b/internal/runners/shell/shell.go index 169b6386ba..5cb4b04efc 100644 --- a/internal/runners/shell/shell.go +++ b/internal/runners/shell/shell.go @@ -95,7 +95,7 @@ func (u *Shell) Run(params *Params) error { return locale.NewInputError("err_shell_already_active", "", activatedProjectNamespace, activatedProjectDir) } - u.out.Notice(locale.Tl("shell_project_statement", "", + u.out.Notice(locale.Tr("shell_project_statement", proj.NamespaceString(), proj.Dir(), setup.ExecDir(rti.Target().Dir()), diff --git a/internal/runners/swtch/switch.go b/internal/runners/swtch/switch.go index b194786fc0..43b09a9b46 100644 --- a/internal/runners/swtch/switch.go +++ b/internal/runners/swtch/switch.go @@ -83,7 +83,7 @@ func (s *Switch) Run(params SwitchParams) error { if s.project == nil { return locale.NewInputError("err_no_project") } - s.out.Notice(locale.Tl("operating_message", "", s.project.NamespaceString(), s.project.Dir())) + s.out.Notice(locale.Tr("operating_message", s.project.NamespaceString(), s.project.Dir())) project, err := model.LegacyFetchProjectByName(s.project.Owner(), s.project.Name()) if err != nil { diff --git a/internal/runners/use/show.go b/internal/runners/use/show.go index 057e0ce667..a93a26fbbd 100644 --- a/internal/runners/use/show.go +++ b/internal/runners/use/show.go @@ -42,7 +42,7 @@ func (s *Show) Run() error { executables := setup.ExecDir(projectTarget.Dir()) s.out.Print(output.Prepare( - locale.Tl("use_show_project_statement", "", + locale.Tr("use_show_project_statement", proj.NamespaceString(), projectDir, executables, diff --git a/internal/runners/use/use.go b/internal/runners/use/use.go index c752af05dc..f18d1c74aa 100644 --- a/internal/runners/use/use.go +++ b/internal/runners/use/use.go @@ -97,7 +97,7 @@ func (u *Use) Run(params *Params) error { execDir := setup.ExecDir(rti.Target().Dir()) u.out.Print(output.Prepare( - locale.Tl("use_project_statement", "", proj.NamespaceString(), proj.Dir(), execDir), + locale.Tr("use_project_statement", proj.NamespaceString(), proj.Dir(), execDir), &struct { Namespace string `json:"namespace"` Path string `json:"path"`