-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cbee10b
commit 346244f
Showing
17 changed files
with
206 additions
and
56 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import i18n from "i18next"; | ||
import { initReactI18next } from "react-i18next"; | ||
|
||
export const I18N_INSTRUMENT_TYPE_FILTER = "instrument.type.filter"; | ||
export const I18N_INSTRUMENT_CARD_MANUFACTURER = "instrument.card.manufacturer"; | ||
export const I18N_MANUFACTURER_DATE = "instrument.manufacturer.manufacture.date"; | ||
export const I18N_RELEASE_DATE = "instrument.manufacturer.release.date" | ||
export const I18N_COUNTRY = "country"; | ||
export const I18N_INSTRUMENT_BASIC_MATERIALS = "instrument.basic.materials"; | ||
export const I18N_INSTRUMENT_DATE_FROM = "instrument.date.from"; | ||
export const I18N_INSTRUMENT_DATE_TO = "instrument.date.to"; | ||
|
||
const resources = { | ||
en: { | ||
translation: { | ||
[I18N_INSTRUMENT_TYPE_FILTER]: "Type", | ||
[I18N_INSTRUMENT_CARD_MANUFACTURER]: "Manufacturer", | ||
[I18N_MANUFACTURER_DATE]: "Manufacturer Date", | ||
[I18N_RELEASE_DATE]: "Release Date", | ||
[I18N_COUNTRY]: "Country", | ||
[I18N_INSTRUMENT_BASIC_MATERIALS]: "Basic Materials", | ||
[I18N_INSTRUMENT_DATE_FROM]: "From", | ||
[I18N_INSTRUMENT_DATE_TO]: "To", | ||
} | ||
}, | ||
ru: { | ||
translation: { | ||
[I18N_INSTRUMENT_TYPE_FILTER]: "Тип", | ||
[I18N_INSTRUMENT_CARD_MANUFACTURER]: "Производитель", | ||
[I18N_MANUFACTURER_DATE]: "Дата производства", | ||
[I18N_RELEASE_DATE]: "Дата выпуска", | ||
[I18N_COUNTRY]: "Страна", | ||
[I18N_INSTRUMENT_BASIC_MATERIALS]: "Основные материалы", | ||
[I18N_INSTRUMENT_DATE_FROM]: "С", | ||
[I18N_INSTRUMENT_DATE_TO]: "По", | ||
} | ||
} | ||
}; | ||
|
||
i18n | ||
.use(initReactI18next) // passes i18n down to react-i18next | ||
.init({ | ||
resources, | ||
lng: window.navigator.language, | ||
interpolation: { | ||
escapeValue: false // react already safes from xss | ||
} | ||
}); | ||
|
||
export default i18n; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom/client"; | ||
import "./i18n"; | ||
import App from "./app/App"; | ||
import { ThemeProvider } from "shared/dark-mode/use-dark-mode"; | ||
|
||
const root = ReactDOM.createRoot( | ||
document.getElementById("root") as HTMLElement, | ||
document.getElementById("root") as HTMLElement | ||
); | ||
root.render( | ||
<ThemeProvider> | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode> | ||
, | ||
</ThemeProvider>, | ||
</React.StrictMode>, | ||
</ThemeProvider> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.