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",
"statusModelConverted": "Model Converted",
"statusMergingModels": "Merging Models",
"statusMergedModels": "Models Merged"
"statusMergedModels": "Models Merged",
"pinOptionsPanel": "Pin Options Panel"
},
"gallery": {
"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.",
"inverseSigmoid": "Inverse Sigmoid",
"sigmoid": "Sigmoid",
"weightedSum": "Weighted Sum"
"weightedSum": "Weighted Sum",
"none": "none",
"addDifference": "Add Difference"
},
"parameters": {
"general": "General",

View File

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

View File

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