feat(i18n): clarify captcha challenge labels

- harmonize challenge prompts across supported locales
- reuse shared helper to reduce duplicated translations
- ensure login flow references updated label key

Signed-off-by: Qi HU <github@spcsky.com>
This commit is contained in:
Qi HU
2025-10-13 12:15:25 +08:00
parent 1614ac3f3d
commit 60e1e45d73
11 changed files with 23 additions and 7 deletions

View File

@@ -1847,16 +1847,23 @@ function show_image_code () {
}
$manager = captcha_manager();
$driver = $manager->driver();
if (!$manager->isEnabled()) {
if (!$driver->isEnabled()) {
return;
}
$markup = $manager->render([
'labels' => [
'image' => $lang_functions['row_security_image'],
'code' => $lang_functions['row_security_code'],
],
$labelKey = $driver instanceof \App\Services\Captcha\Drivers\ImageCaptchaDriver
? 'row_security_image'
: 'row_security_challenge';
$labels = [
'image' => $lang_functions[$labelKey] ?? $lang_functions['row_security_image'],
'code' => $lang_functions['row_security_code'],
];
$markup = $driver->render([
'labels' => $labels,
'secret' => $_GET['secret'] ?? '',
]);