mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): fix translation typing, fix strings
I had inadvertently un-safe-d our translation types when migrating to Weblate. This PR fixes that, and a number of translation string bugs that went unnoticed due to the lack of type safety,
This commit is contained in:
parent
218f30b7d0
commit
d8bf2e3c10
@ -392,7 +392,7 @@ const makeSocketIOListeners = (
|
||||
addLogEntry({
|
||||
timestamp: dateFormat(new Date(), 'isoDateTime'),
|
||||
message: `${i18n.t(
|
||||
'modelmanager:modelAdded'
|
||||
'modelManager.modelAdded'
|
||||
)}: ${deleted_model_name}`,
|
||||
level: 'info',
|
||||
})
|
||||
@ -400,7 +400,7 @@ const makeSocketIOListeners = (
|
||||
dispatch(
|
||||
addToast({
|
||||
title: `${i18n.t(
|
||||
'modelmanager:modelEntryDeleted'
|
||||
'modelManager.modelEntryDeleted'
|
||||
)}: ${deleted_model_name}`,
|
||||
status: 'success',
|
||||
duration: 2500,
|
||||
@ -424,7 +424,7 @@ const makeSocketIOListeners = (
|
||||
dispatch(
|
||||
addToast({
|
||||
title: `${i18n.t(
|
||||
'modelmanager:modelConverted'
|
||||
'modelManager.modelConverted'
|
||||
)}: ${converted_model_name}`,
|
||||
status: 'success',
|
||||
duration: 2500,
|
||||
|
@ -109,7 +109,7 @@ const IAICanvasStatusText = () => {
|
||||
color: boundingBoxColor,
|
||||
}}
|
||||
>{`${t(
|
||||
'unifiedcanvas:boundingBox'
|
||||
'unifiedCanvas.boundingBox'
|
||||
)}: ${boundingBoxDimensionsString}`}</div>
|
||||
)}
|
||||
{shouldShowScaledBoundingBox && (
|
||||
@ -118,19 +118,19 @@ const IAICanvasStatusText = () => {
|
||||
color: boundingBoxColor,
|
||||
}}
|
||||
>{`${t(
|
||||
'unifiedcanvas:scaledBoundingBox'
|
||||
'unifiedCanvas.scaledBoundingBox'
|
||||
)}: ${scaledBoundingBoxDimensionsString}`}</div>
|
||||
)}
|
||||
{shouldShowCanvasDebugInfo && (
|
||||
<>
|
||||
<div>{`${t(
|
||||
'unifiedcanvas:boundingBoxPosition'
|
||||
'unifiedCanvas.boundingBoxPosition'
|
||||
)}: ${boundingBoxCoordinatesString}`}</div>
|
||||
<div>{`${t(
|
||||
'unifiedcanvas:canvasDimensions'
|
||||
'unifiedCanvas.canvasDimensions'
|
||||
)}: ${canvasDimensionsString}`}</div>
|
||||
<div>{`${t(
|
||||
'unifiedcanvas:canvasPosition'
|
||||
'unifiedCanvas.canvasPosition'
|
||||
)}: ${canvasCoordinatesString}`}</div>
|
||||
<IAICanvasStatusTextCursorPos />
|
||||
</>
|
||||
|
@ -34,7 +34,7 @@ export default function IAICanvasStatusTextCursorPos() {
|
||||
|
||||
return (
|
||||
<div>{`${t(
|
||||
'unifiedcanvas:cursorPosition'
|
||||
'unifiedCanvas.cursorPosition'
|
||||
)}: ${cursorCoordinatesString}`}</div>
|
||||
);
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ export default function MergeModels() {
|
||||
<Radio value="add_difference">
|
||||
<Tooltip
|
||||
label={t(
|
||||
'modelmanager:modelMergeInterpAddDifferenceHelp'
|
||||
'modelManager.modelMergeInterpAddDifferenceHelp'
|
||||
)}
|
||||
>
|
||||
add_difference
|
||||
|
5
invokeai/frontend/src/i18.d.ts
vendored
5
invokeai/frontend/src/i18.d.ts
vendored
@ -1,11 +1,16 @@
|
||||
import 'i18next';
|
||||
|
||||
import en from '../public/locales/en.json';
|
||||
|
||||
declare module 'i18next' {
|
||||
// Extend CustomTypeOptions
|
||||
interface CustomTypeOptions {
|
||||
// Setting Default Namespace As English
|
||||
defaultNS: 'en';
|
||||
// Custom Types For Resources
|
||||
resources: {
|
||||
en: typeof en;
|
||||
};
|
||||
// Never Return Null
|
||||
returnNull: false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user