]>
Commit | Line | Data |
---|---|---|
1 | import { environment } from '../../../environments/environment' | |
2 | ||
3 | function peertubeTranslate (str: string, translations: { [ id: string ]: string }) { | |
4 | return translations[str] ? translations[str] : str | |
5 | } | |
6 | ||
7 | function isOnDevLocale () { | |
8 | return environment.production === false && window.location.search === '?lang=fr' | |
9 | } | |
10 | ||
11 | function getDevLocale () { | |
12 | return 'fr' | |
13 | } | |
14 | ||
15 | export { | |
16 | getDevLocale, | |
17 | isOnDevLocale, | |
18 | peertubeTranslate | |
19 | } |