fix(#4031): define cron_model_no_agent_hint i18n key (was rendering the literal key)
Codex gate (SILENT): panels.js referenced t('cron_model_no_agent_hint') but the key was never added
to i18n.js. t() returns the key name for a missing translation (falls back to LOCALES.en, then the
key), so script-only cron jobs rendered the literal 'cron_model_no_agent_hint'. Added the English key
(other locales fall back to en) + strengthened the i18n-keys test to assert the value is defined.
This commit is contained in:
parent
675bc7d9e7
commit
3924966940
2 changed files with 9 additions and 0 deletions
|
|
@ -1318,6 +1318,7 @@ const LOCALES = {
|
|||
cron_job_updated: 'Job updated',
|
||||
cron_model_label: 'Model Override',
|
||||
cron_model_hint: 'Override the default model for this job.',
|
||||
cron_model_no_agent_hint: 'No-agent jobs run the configured script directly; model is unused.',
|
||||
cron_model_use_default: 'Default (use profile/system default)',
|
||||
cron_delete_confirm_title: 'Delete cron job',
|
||||
cron_delete_confirm_message: 'This cannot be undone.',
|
||||
|
|
@ -7104,6 +7105,7 @@ const LOCALES = {
|
|||
cron_job_updated: 'Job updated',
|
||||
cron_model_label: 'Model Override',
|
||||
cron_model_hint: 'Override the default model for this job.',
|
||||
cron_model_no_agent_hint: 'No-agent jobs run the configured script directly; model is unused.',
|
||||
cron_model_use_default: 'Default (use profile/system default)',
|
||||
cron_delete_confirm_title: 'Delete cron job',
|
||||
cron_delete_confirm_message: 'This cannot be undone.',
|
||||
|
|
@ -14630,6 +14632,7 @@ const LOCALES = {
|
|||
cron_job_updated: 'Job updated',
|
||||
cron_model_label: 'Model Override',
|
||||
cron_model_hint: 'Override the default model for this job.',
|
||||
cron_model_no_agent_hint: 'No-agent jobs run the configured script directly; model is unused.',
|
||||
cron_model_use_default: 'Default (use profile/system default)',
|
||||
cron_delete_confirm_title: 'Delete cron job',
|
||||
cron_delete_confirm_message: 'This cannot be undone.',
|
||||
|
|
|
|||
|
|
@ -193,3 +193,9 @@ def test_cron_model_picker_i18n_keys_exist():
|
|||
assert "cron_model_label" in I18N_JS
|
||||
assert "cron_model_use_default" in I18N_JS
|
||||
assert "cron_model_hint" in I18N_JS
|
||||
# #4031: the no-agent hint key must be DEFINED in the locale table (with its
|
||||
# value), not merely referenced in panels.js — t() returns the key name itself
|
||||
# for a missing translation, so a missing key would render the literal
|
||||
# "cron_model_no_agent_hint" to the user instead of the hint text.
|
||||
assert "cron_model_no_agent_hint:" in I18N_JS
|
||||
assert "No-agent jobs run the configured script directly" in I18N_JS
|
||||
|
|
|
|||
Loading…
Reference in a new issue