Problem/Motivation

When working with multiple languages, the current link displayed is never translated. It's always the last translation that is displayed regardless of the current user language.

Steps to reproduce

  1. Add multiple languages
  2. Configure the links, translate them.
  3. Go on language 1, save the translation
  4. Go on language 2, see that it's the language 1 translation that is displayed.

Proposed resolution

The language should be added in the build() method of EventPlatformHeaderCtaBlock. Probably around line 136, here:

$link = $this->configuration[$state . '_state_link'];
CommentFileSizeAuthor
#3 3568992-2.patch2.13 KBnicoloye
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

nicoloye created an issue. See original summary.

nicoloye’s picture

StatusFileSize
new2.13 KB

Posting patch for test purposes.

nicoloye’s picture

Status: Active » Needs review

Installed and tested on our camp website, it's working, please review!

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

  • mandclu committed f7884b88 on 2.0.x authored by nicoloye
    feat: #3568992 The header CTA block is not taking the current language...
mandclu’s picture

Status: Needs review » Fixed

Thanks for your work on this. I decided to fix the CI complaints by implementing dependency injection for the block, and by making a tweak to the CI configuration (both of which probably could have been separate issues). I did also create #3572585: [META] Optimize for translation to document any fixes that would improve the experience of setting up the Event Platform for multilingual site, so any additional feedback there would be appreciated.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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