Skip to content

Commit

Permalink
update translations
Browse files Browse the repository at this point in the history
  • Loading branch information
deadit committed Nov 13, 2023
1 parent 777aad6 commit bef9249
Show file tree
Hide file tree
Showing 3 changed files with 368 additions and 365 deletions.
5 changes: 3 additions & 2 deletions src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { LastLocationProvider } from 'react-router-last-location';
import en from 'react-intl/locale-data/en';
import ru from 'react-intl/locale-data/ru';
import id from 'react-intl/locale-data/id';
import tr from 'react-intl/locale-data/tr';

import { AppComponent } from './containers/app/app.component';

Expand Down Expand Up @@ -36,7 +37,7 @@ delete window.__PRELOADED_STATE__;

const settings = JSON.parse(localStorage.getItem('settings') as string) || {};

const languages = ['en', 'ru', 'id'];
const languages = ['en', 'ru', 'id', 'tr'];
let locale = languages[0];

const pathLanguage = window.location.pathname.split('/')[1];
Expand All @@ -54,7 +55,7 @@ preloadedState.settings = {

const AppStore = configureStore(preloadedState);

addLocaleData([...en, ...ru, ...id]);
addLocaleData([...en, ...ru, ...id, ...tr]);

export const App = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { connect } from 'react-redux';
import enKeys from '../../locales/en/translations.json';
import ruKeys from '../../locales/ru/translations.json';
import idKeys from '../../locales/id/translations.json';
import trKeys from '../../locales/tr/translations.json';

import { AppState } from '../../store/app.store';

Expand All @@ -28,6 +29,7 @@ export const messages = {
en: flatJSONKeys(enKeys),
ru: flatJSONKeys(ruKeys),
id: flatJSONKeys(idKeys),
tr: flatJSONKeys(trKeys),
};

function mapStateToProps(state: AppState): any {
Expand Down
Loading

0 comments on commit bef9249

Please sign in to comment.