Dear all,

I've tried to translate Placeholder Text via "User Interface Translation", but it didn't work. Is there any workaround?

Best,
Orkut

Comments

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

orkutmuratyilmaz’s picture

Hello again,

On /src/Form/BetterSearchSettingsForm.php file, line 40 exists as below:

'#default_value' => $this->config('better_search.settings')->get('placeholder_text'),

If we change it to '#default_value' => $this->config('better_search.settings')->t('get('placeholder_text')'),, we get WSOD error.

How can we change the code?

Have a nice one.

yogeshmpawar’s picture

Assigned: Unassigned » yogeshmpawar

Checking the issue.

yogeshmpawar’s picture

Assigned: yogeshmpawar » Unassigned
Status: Active » Needs review
StatusFileSize
new902 bytes

Adding patch will get the translated placeholder text for multilingual sites.

  • yogeshmpawar committed e9ef068 on 8.x-1.x
    Issue #3116477 by yogeshmpawar, Orkut Murat Yılmaz: Translate Support...
yogeshmpawar’s picture

Status: Needs review » Fixed

Committed & Pushed to 8.x-1.x branch.

chetanbharambe’s picture

StatusFileSize
new342.55 KB
new372.3 KB
new325.87 KB

Thanks, @yogeshmpawar for fixing this issue.
Tested and working as expected.

Testing Steps:
# Goto: Appearance -> Apply Seven theme
# Goto: Extend: Install Configuration, Content and Interface translation also Add new Module: "Better search block" and Install it
# Goto: admin/config/regional/language
# Add any new language like French, Polish
# Goto: admin/config/search/better-search
# Add the word which user has to translate in placeholder text
# Goto: admin/config/regional/translate
# Search the keyword and translate it in the respective language and save the translation.
# Again Go to: admin/config/search/better-search
# User should see saved translation in the placeholder.

Expected Results:
# User should see saved translation in placeholder text Text via "User Interface Translation"

Actual Results:
# Currently user is not able to see saved translation in placeholder text Text via "User Interface Translation"

Please refer attached screenshots for the same.
Looks good to me.

orkutmuratyilmaz’s picture

Thanks for fixing it.

Status: Fixed » Closed (fixed)

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

matt b’s picture

Version: 8.x-1.x-dev » 2.0.1

This isn't fixed.... I cannot translate the placeholder in v2.0.1