Skip to content

Commit

Permalink
WEG-138 Use player language to translate component’s text
Browse files Browse the repository at this point in the history
  • Loading branch information
SandraMonnier committed Jan 10, 2025
1 parent 024999f commit 9cf17b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { editingStore } from '../../data/Stores/editingStore';
import { useStore } from '../../data/Stores/store';
import { wwarn } from '../../Helper/wegaslog';
import { componentsTranslations } from '../../i18n/components/components';
import { useInternalTranslate } from '../../i18n/internalTranslator';
import { useInternalPlayerLangTranslate } from '../../i18n/internalTranslator';
import {
DefaultEntityChooserLabel,
defaultEntityDisplay,
Expand Down Expand Up @@ -177,7 +177,7 @@ interface MessageDisplayProps {
}

function MessageDisplay({ entity }: MessageDisplayProps) {
const i18nComponentValues = useInternalTranslate(componentsTranslations);
const i18nComponentValues = useInternalPlayerLangTranslate(componentsTranslations);

const subject = useTranslate(entity.subject);
const date = useTranslate(entity.date);
Expand Down Expand Up @@ -233,7 +233,7 @@ export function InboxDisplay({
}, [inbox]);

const messages = useStore(messagesSelector);
const i18nComponentValues = useInternalTranslate(componentsTranslations);
const i18nComponentValues = useInternalPlayerLangTranslate(componentsTranslations);

return (
<EntityChooser
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Select from 'react-select';
import CreatableSelect from 'react-select/creatable';
import { classNameOrEmpty } from '../Helper/className';
import { componentsTranslations } from '../i18n/components/components';
import { useInternalTranslate } from '../i18n/internalTranslator';
import { useInternalPlayerLangTranslate } from '../i18n/internalTranslator';
import { inputStyleCSS } from './Inputs/SimpleInput';
import { themeVar } from './Theme/ThemeVars';

Expand Down Expand Up @@ -182,7 +182,7 @@ export function Selector<T extends true | false>({
readOnly,
disabled,
}: SelectorProps<T>): JSX.Element {
const i18nValues = useInternalTranslate(componentsTranslations).select;
const i18nValues = useInternalPlayerLangTranslate(componentsTranslations).select;

const options = buildOptions(choices);

Expand Down

0 comments on commit 9cf17b4

Please sign in to comment.