Hello,

Problem/Motivation

When we enable the Homepage Slider, it only works in single language and translate doesn't work.

Steps to reproduce

  • Install Mahi theme
  • Enable Show Slider on Homepage button
  • You can't translate the slider content.

What can be done?

Best,
Orkut

Issue fork mahi-3450095

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

Orkut Murat Yılmaz created an issue. See original summary.

tanushree gupta’s picture

Assigned: Unassigned » tanushree gupta

tanushree gupta’s picture

Assigned: tanushree gupta » Unassigned
Status: Active » Needs review

Translated all the strings of slider.
Here is the MR: https://git.drupalcode.org/project/mahi/-/merge_requests/5

orkutmuratyilmaz’s picture

Status: Needs review » Needs work

@Tanushree Gupta, thanks for your contribution. However, your work does focus on translating the strings, already hard coded in the slider.html.twig file. It won't work with the "slider_code" variable.

orkutmuratyilmaz’s picture

Status: Needs work » Needs review

I've added a simple "trans" function in the last part of the array. Can you check this one too?

orkutmuratyilmaz’s picture

I'm also uploading my commit as a patch file, in order to use it in my composer.json file, until it merges into stable branch.

orkutmuratyilmaz’s picture

Unfortunately, user interface translation doesn't accept translating HTML tags. I'm changing the issue's status.

orkutmuratyilmaz’s picture

Status: Needs review » Needs work
orkutmuratyilmaz’s picture

Version: 1.0.15 » 1.1.2
Status: Needs work » Active