Custom localization (#2837)

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
HijackHornet
2022-09-22 11:49:35 +02:00
committed by GitHub
parent c10d53ba8e
commit 74191c73ed
13 changed files with 155 additions and 4 deletions

View File

@@ -408,6 +408,36 @@ export const SettingsInterfacePanel: React.FC = () => {
}}
/>
</SettingSection>
<SettingSection headingID="config.ui.custom_locales.heading">
<BooleanSetting
id="custom-locales-enabled"
headingID="config.ui.custom_locales.option_label"
checked={iface.customLocalesEnabled ?? undefined}
onChange={(v) => saveInterface({ customLocalesEnabled: v })}
/>
<ModalSetting<string>
id="custom-locales"
headingID="config.ui.custom_locales.heading"
subHeadingID="config.ui.custom_locales.description"
value={iface.customLocales ?? undefined}
onChange={(v) => saveInterface({ customLocales: v })}
renderField={(value, setValue) => (
<Form.Control
as="textarea"
value={value}
onChange={(e: React.ChangeEvent<HTMLTextAreaElement>) =>
setValue(e.currentTarget.value)
}
rows={16}
className="text-input code"
/>
)}
renderValue={() => {
return <></>;
}}
/>
</SettingSection>
<SettingSection headingID="config.ui.interactive_options">
<StringSetting