(locale)
| 1468 | } |
| 1469 | |
| 1470 | function setLocale(locale) { |
| 1471 | if (!supportedLocales.has(locale) || state.locale === locale) return; |
| 1472 | const profileDraft = captureProfileDraft(); |
| 1473 | state.locale = locale; |
| 1474 | window.localStorage.setItem(LOCALE_KEY, state.locale); |
| 1475 | applyLocale(); |
| 1476 | if (state.currentProfile) { |
| 1477 | renderProfileForm(state.currentProfile); |
| 1478 | restoreProfileDraft(profileDraft); |
| 1479 | } |
| 1480 | } |
| 1481 | |
| 1482 | function captureProfileDraft() { |
| 1483 | const ids = [ |
no test coverage detected