mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 08:26:00 +01:00
internationilise
This commit is contained in:
parent
44f83c31ef
commit
1128b3c8e3
1 changed files with 8 additions and 6 deletions
|
|
@ -232,15 +232,15 @@ export const StudioSearchResult: React.FC<IStudioResultProps> = ({
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Helper to get entity type display name for i18n
|
// Helper to get entity type message id for i18n
|
||||||
function getEntityTypeDisplayName(entityType: StashBoxEntityType): string {
|
function getEntityTypeMessageId(entityType: StashBoxEntityType): string {
|
||||||
switch (entityType) {
|
switch (entityType) {
|
||||||
case "performer":
|
case "performer":
|
||||||
return "Performer";
|
return "performer";
|
||||||
case "scene":
|
case "scene":
|
||||||
return "Scene";
|
return "scene";
|
||||||
case "studio":
|
case "studio":
|
||||||
return "Studio";
|
return "studio";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -384,7 +384,9 @@ export const StashBoxIDSearchModal: React.FC<IProps> = ({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const entityTypeDisplayName = getEntityTypeDisplayName(entityType);
|
const entityTypeDisplayName = intl.formatMessage({
|
||||||
|
id: getEntityTypeMessageId(entityType),
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ModalComponent
|
<ModalComponent
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue