Skip to content

Commit 13ac5c6

Browse files
enable hide localization toggle (#4004)
## What type of PR is this? (check all applicable) - [ ] Refactor - [ ] Feature - [ ] Bug Fix - [ ] Optimization - [ ] Documentation Update - [ ] Community Node Submission ## Have you discussed this change with the InvokeAI team? - [ ] Yes - [ ] No, because: ## Have you updated all relevant documentation? - [ ] Yes - [ ] No ## Description ## Related Tickets & Documents <!-- For pull requests that relate or close an issue, please include them below. For example having the text: "closes #1234" would connect the current pull request to issue 1234. And when we merge the pull request, Github will automatically close the issue. --> - Related Issue # - Closes # ## QA Instructions, Screenshots, Recordings <!-- Please provide steps on how to test changes, any hardware or software specifications as well as any other pertinent information. --> ## Added/updated tests? - [ ] Yes - [ ] No : _please replace this line with details on why tests have not been included_ ## [optional] Are there any post deployment tasks we need to perform?
2 parents 385483f + f86d0d1 commit 13ac5c6

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsModal.tsx

+15-10
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ type ConfigOptions = {
104104
shouldShowAdvancedOptionsSettings: boolean;
105105
shouldShowClearIntermediates: boolean;
106106
shouldShowNodesToggle: boolean;
107+
shouldShowLocalizationToggle: boolean;
107108
};
108109

109110
type SettingsModalProps = {
@@ -125,6 +126,8 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => {
125126
const shouldShowClearIntermediates =
126127
config?.shouldShowClearIntermediates ?? true;
127128
const shouldShowNodesToggle = config?.shouldShowNodesToggle ?? true;
129+
const shouldShowLocalizationToggle =
130+
config?.shouldShowLocalizationToggle ?? true;
128131

129132
useEffect(() => {
130133
if (!shouldShowDeveloperSettings) {
@@ -325,16 +328,18 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => {
325328
onChange={handleToggleNodes}
326329
/>
327330
)}
328-
<IAIMantineSelect
329-
disabled={!isLocalizationEnabled}
330-
label={t('common.languagePickerLabel')}
331-
value={language}
332-
data={Object.entries(LANGUAGES).map(([value, label]) => ({
333-
value,
334-
label,
335-
}))}
336-
onChange={handleLanguageChanged}
337-
/>
331+
{shouldShowLocalizationToggle && (
332+
<IAIMantineSelect
333+
disabled={!isLocalizationEnabled}
334+
label={t('common.languagePickerLabel')}
335+
value={language}
336+
data={Object.entries(LANGUAGES).map(([value, label]) => ({
337+
value,
338+
label,
339+
}))}
340+
onChange={handleLanguageChanged}
341+
/>
342+
)}
338343
</StyledFlex>
339344

340345
{shouldShowDeveloperSettings && (

0 commit comments

Comments
 (0)