Problem/Motivation

Label texts are not translated.

Steps to reproduce

Translate the text from /admin/config/people/captcha/altcha in /admin/config/regional/translate. It won't be translated in the user interface.

Proposed resolution

add the translate function to code. (See patch)

CommentFileSizeAuthor
altcha_translate.patch688 bytespprueller

Issue fork altcha-3516588

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

pprueller created an issue. See original summary.

pprueller’s picture

Component: User interface » Code
filsterjisah’s picture

Could you provide more details, please? The attached patch and the issue description do not seem to align. The patch translates the ALTCHA keys instead of incorporating the Translation Configuration module (which is part of the core). However, the issue description states that 'text' is not being translated.

filsterjisah’s picture

Status: Active » Postponed (maintainer needs more info)
pprueller’s picture

I mean the "text" inputs in the widget settings area. (like e.g. Aria link label text)
I had to translate the config value with t(...). This was the solution. (see patch)

gido’s picture

Actually, the code is already in place to make the labels configuration translatable. The route is just not easily reachable: `/admin/config/people/captcha/altcha/translate`.

Probably something wrong with the tasks menu.

robindh’s picture

Assigned: pprueller » Unassigned
Status: Postponed (maintainer needs more info) » Needs work

I can confirm the behavior @gido describes. The fields are translatable via the config_translation module, but there is no local task pointing to the translation configuration form.

I'm pretty sure there is some kind of conflict with the captcha module, since our altcha.settings_tab local task also uses the captcha_settings base route. I'll attach a merge request where the local task is manually defined in altcha.links.task.yml, although this is not ideal

robindh’s picture

Status: Needs work » Needs review
robindh’s picture

Status: Needs review » Needs work

Needs a better fix, this won't work on websites that do not have the config_translation module enabled.

robindh’s picture

Status: Needs work » Needs review

Tweaked the merge request to use a similar fix as applied in #2822890

filsterjisah’s picture

Status: Needs review » Fixed

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

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

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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