mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 04:20:49 +08:00
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:
@@ -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'] ?? '',
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user