[CORL-406] Tenant Locale Selection (#2450)

* feat: added preload config

* feat: support changing locale

* fix: name case

* fix: removed unused code

* feat: added translations for default reactions

* fix: do not translate icon

* fix: shorter i18n keys
This commit is contained in:
Wyatt Johnson
2019-09-05 17:02:06 +00:00
committed by GitHub
parent 5bf4f22931
commit 04c56b3fb5
54 changed files with 673 additions and 207 deletions
@@ -0,0 +1,25 @@
import React, { FunctionComponent } from "react";
import { LanguageCode, LOCALES_MAP } from "coral-common/helpers/i18n";
import { PropTypesOf } from "coral-framework/types";
import { Option, SelectField } from "coral-ui/components";
interface Props extends PropTypesOf<typeof SelectField> {
value: LanguageCode;
}
const LocaleField: FunctionComponent<Props> = props => {
return (
<SelectField {...props}>
{Object.keys(LOCALES_MAP).map((lang: LanguageCode) => {
return (
<Option value={lang} key={lang}>
{LOCALES_MAP[lang]}
</Option>
);
})}
</SelectField>
);
};
export default LocaleField;
@@ -6,3 +6,4 @@ export { default as OIDCButton } from "./OIDCButton";
export { default as Markdown } from "./Markdown";
export { default as FadeInTransition } from "./FadeInTransition";
export { default as DurationField, DURATION_UNIT } from "./DurationField";
export { default as LocaleField } from "./LocaleField";