fix(ui): add missing strings

Fixes #2797
Fixes #2798
This commit is contained in:
psychedelicious 2023-02-25 11:12:20 +11:00
parent d8bf2e3c10
commit 251e9c0294
3 changed files with 27 additions and 17 deletions

View File

@ -63,7 +63,8 @@
"statusConvertingModel": "Converting Model", "statusConvertingModel": "Converting Model",
"statusModelConverted": "Model Converted", "statusModelConverted": "Model Converted",
"statusMergingModels": "Merging Models", "statusMergingModels": "Merging Models",
"statusMergedModels": "Models Merged" "statusMergedModels": "Models Merged",
"pinOptionsPanel": "Pin Options Panel"
}, },
"gallery": { "gallery": {
"generations": "Generations", "generations": "Generations",
@ -393,7 +394,9 @@
"modelMergeInterpAddDifferenceHelp": "In this mode, Model 3 is first subtracted from Model 2. The resulting version is blended with Model 1 with the alpha rate set above.", "modelMergeInterpAddDifferenceHelp": "In this mode, Model 3 is first subtracted from Model 2. The resulting version is blended with Model 1 with the alpha rate set above.",
"inverseSigmoid": "Inverse Sigmoid", "inverseSigmoid": "Inverse Sigmoid",
"sigmoid": "Sigmoid", "sigmoid": "Sigmoid",
"weightedSum": "Weighted Sum" "weightedSum": "Weighted Sum",
"none": "none",
"addDifference": "Add Difference"
}, },
"parameters": { "parameters": {
"general": "General", "general": "General",

View File

@ -57,19 +57,19 @@ export default function MergeModels() {
const [modelMergeForce, setModelMergeForce] = useState<boolean>(false); const [modelMergeForce, setModelMergeForce] = useState<boolean>(false);
const modelOneList = Object.keys(diffusersModels).filter((model) => { const modelOneList = Object.keys(diffusersModels).filter(
if (model !== modelTwo && model !== modelThree) return model; (model) => model !== modelTwo && model !== modelThree
}); );
const modelTwoList = Object.keys(diffusersModels).filter((model) => { const modelTwoList = Object.keys(diffusersModels).filter(
if (model !== modelOne && model !== modelThree) return model; (model) => model !== modelOne && model !== modelThree
}); );
const modelThreeList = [ const modelThreeList = [
'none', { key: t('modelManager.none'), value: 'none' },
...Object.keys(diffusersModels).filter((model) => { ...Object.keys(diffusersModels)
if (model !== modelOne && model !== modelTwo) return model; .filter((model) => model !== modelOne && model !== modelTwo)
}), .map((model) => ({ key: model, value: model })),
]; ];
const isProcessing = useAppSelector( const isProcessing = useAppSelector(
@ -209,9 +209,13 @@ export default function MergeModels() {
<Flex columnGap={4}> <Flex columnGap={4}>
{modelThree === 'none' ? ( {modelThree === 'none' ? (
<> <>
<Radio value="weighted_sum">weighted_sum</Radio> <Radio value="weighted_sum">
<Radio value="sigmoid">sigmoid</Radio> {t('modelManager.weightedSum')}
<Radio value="inv_sigmoid">inv_sigmoid</Radio> </Radio>
<Radio value="sigmoid">{t('modelManager.sigmoid')}</Radio>
<Radio value="inv_sigmoid">
{t('modelManager.inverseSigmoid')}
</Radio>
</> </>
) : ( ) : (
<Radio value="add_difference"> <Radio value="add_difference">
@ -220,7 +224,7 @@ export default function MergeModels() {
'modelManager.modelMergeInterpAddDifferenceHelp' 'modelManager.modelMergeInterpAddDifferenceHelp'
)} )}
> >
add_difference {t('modelManager.addDifference')}
</Tooltip> </Tooltip>
</Radio> </Radio>
)} )}

View File

@ -18,6 +18,7 @@ import { setParametersPanelScrollPosition } from 'features/ui/store/uiSlice';
import InvokeAILogo from 'assets/images/logo.png'; import InvokeAILogo from 'assets/images/logo.png';
import { isEqual } from 'lodash'; import { isEqual } from 'lodash';
import { uiSelector } from '../store/uiSelectors'; import { uiSelector } from '../store/uiSelectors';
import { useTranslation } from 'react-i18next';
type Props = { children: ReactNode }; type Props = { children: ReactNode };
@ -60,6 +61,8 @@ const InvokeOptionsPanel = (props: Props) => {
const { children } = props; const { children } = props;
const { t } = useTranslation();
// Hotkeys // Hotkeys
useHotkeys( useHotkeys(
'o', 'o',
@ -176,7 +179,7 @@ const InvokeOptionsPanel = (props: Props) => {
} }
}} }}
> >
<Tooltip label="Pin Options Panel"> <Tooltip label={t('common.pinOptionsPanel')}>
<div <div
className="parameters-panel-pin-button" className="parameters-panel-pin-button"
data-selected={shouldPinParametersPanel} data-selected={shouldPinParametersPanel}