Problem/Motivation

Found by @Gábor Hojtsy

In ComposerExecutableValidator if the composer stager precondition does not pass you can get the message

"composer is not found" but no link to the help page.

Steps to reproduce

Proposed resolution

link to help page here also

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

tedbow created an issue. See original summary.

wim leers’s picture

Status: Active » Needs work
Issue tags: +Usability

I wanted to RTBC, but wrapping a variable or function call in a $this->() really does not make sense 😅

diegors made their first commit to this issue’s fork.

diegors’s picture

Status: Needs work » Needs review

Agree with @Wim Leers in #3, removed the $this->(), NR.

wim leers’s picture

Status: Needs review » Reviewed & tested by the community

Thank you, @diegors! 👍

tedbow’s picture

Status: Reviewed & tested by the community » Needs work
omkar.podey’s picture

Issue summary: View changes
StatusFileSize
new231.75 KB

Things that seem confusing

  1. So looking at \Drupal\package_manager\Validator\ComposerExecutableValidator::setError it puts an untranslated string in between a translatable string, is that a good idea ?
  2. Isn't the bigger issue that we are getting untranslated strings from composer stager and we still want to display them to user as translated strings?
  3. Since we are already doing point 1 can we just put an else and always convert the string to a translatable but does that make sense ?
omkar.podey’s picture

Assigned: Unassigned » tedbow
tedbow’s picture

Isn't the bigger issue that we are getting untranslated strings from composer stager and we still want to display them to user as translated strings?

Yes this is not ideal but for exceptions from other system we can't do much about that. Using the token in the t() function will allow the rest of the message to be translated. Usually these tokens are for smaller things like a username that can't be translated.

omkar.podey’s picture

Assigned: tedbow » omkar.podey
omkar.podey’s picture

Assigned: omkar.podey » Unassigned
Status: Needs work » Needs review

Seems to have tests already so, needs review.

wim leers’s picture

Assigned: Unassigned » tedbow
Status: Needs review » Reviewed & tested by the community
tedbow’s picture

Merge failed so it merge 8.x-2.x here.

Looks good, will merge when green

  • tedbow committed f984bfe3 on 8.x-2.x
    Issue #3339016 by tedbow, omkar.podey, diegors, Wim Leers: "Composer not...
tedbow’s picture

Status: Reviewed & tested by the community » Fixed

🎉 Thanks @omkar.podey and @Wim Leers!

wim leers’s picture

Assigned: tedbow » Unassigned

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.