1
0
mirror of https://github.com/NginxProxyManager/nginx-proxy-manager.git synced 2025-11-15 22:41:05 +03:00

Wrap intl in span identifying translation

This commit is contained in:
Jamie Curnow
2025-10-02 23:06:51 +10:00
parent fcb08d3003
commit 227e818040
68 changed files with 1076 additions and 510 deletions

View File

@@ -2,7 +2,7 @@ import cn from "classnames";
import { Flag } from "src/components";
import { useLocaleState } from "src/context";
import { useTheme } from "src/hooks";
import { changeLocale, getFlagCodeForLocale, intl, localeOptions } from "src/locale";
import { changeLocale, getFlagCodeForLocale, localeOptions, T } from "src/locale";
import styles from "./LocalePicker.module.css";
function LocalePicker() {
@@ -35,34 +35,13 @@ function LocalePicker() {
changeTo(item[0]);
}}
>
<Flag countryCode={getFlagCodeForLocale(item[0])} />{" "}
{intl.formatMessage({ id: `locale-${item[1]}` })}
<Flag countryCode={getFlagCodeForLocale(item[0])} /> <T id={`locale-${item[1]}`} />
</a>
);
})}
</div>
</div>
);
// <div className={className}>
// <Menu>
// <MenuButton as={Button} {...additionalProps}>
// <Flag countryCode={getFlagCodeForLocale(locale)} />
// </MenuButton>
// <MenuList>
// {localeOptions.map((item) => {
// return (
// <MenuItem
// icon={<Flag countryCode={getFlagCodeForLocale(item[0])} />}
// onClick={() => changeTo(item[0])}
// key={`locale-${item[0]}`}>
// <span>{intl.formatMessage({ id: `locale-${item[1]}` })}</span>
// </MenuItem>
// );
// })}
// </MenuList>
// </Menu>
// </Box>
}
export { LocalePicker };