mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-21 15:59:15 +00:00
uberf-7342: add french lang selector (#5873)
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
parent
bb70f5123b
commit
1b9cf87b73
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"localhost:8080": {
|
"localhost:8080": {
|
||||||
"title": "Platform",
|
"title": "Platform",
|
||||||
"languages": "en,ru,pt,es,zh",
|
"languages": "en,ru,pt,es,zh,fr",
|
||||||
"defaultLanguage": "en",
|
"defaultLanguage": "en",
|
||||||
"defaultApplication": "tracker",
|
"defaultApplication": "tracker",
|
||||||
"defaultSpace": "tracker:project:DefaultProject",
|
"defaultSpace": "tracker:project:DefaultProject",
|
||||||
@ -29,7 +29,7 @@
|
|||||||
},
|
},
|
||||||
"localhost:8087": {
|
"localhost:8087": {
|
||||||
"title": "DevPlatform",
|
"title": "DevPlatform",
|
||||||
"languages": "en,ru,pt,es",
|
"languages": "en,ru,pt,es,zh,fr",
|
||||||
"defaultLanguage": "en",
|
"defaultLanguage": "en",
|
||||||
"defaultApplication": "tracker",
|
"defaultApplication": "tracker",
|
||||||
"defaultSpace": "tracker:project:DefaultProject",
|
"defaultSpace": "tracker:project:DefaultProject",
|
||||||
|
@ -189,11 +189,11 @@ function configureI18n(): void {
|
|||||||
|
|
||||||
export async function configurePlatform() {
|
export async function configurePlatform() {
|
||||||
setMetadata(platform.metadata.LoadHelper, async (loader) => {
|
setMetadata(platform.metadata.LoadHelper, async (loader) => {
|
||||||
for (let i = 0; i < 5; i++) {
|
for (let i = 0; i < 6; i++) {
|
||||||
try {
|
try {
|
||||||
return loader()
|
return loader()
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
if (err.message.includes('Loading chunk') && i != 4) {
|
if (err.message.includes('Loading chunk') && i != 5) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
Analytics.handleError(err)
|
Analytics.handleError(err)
|
||||||
@ -266,7 +266,7 @@ export async function configurePlatform() {
|
|||||||
setMetadata(uiPlugin.metadata.DefaultApplication, login.component.LoginApp)
|
setMetadata(uiPlugin.metadata.DefaultApplication, login.component.LoginApp)
|
||||||
|
|
||||||
setMetadata(contactPlugin.metadata.LastNameFirst, myBranding.lastNameFirst === 'true' ?? false)
|
setMetadata(contactPlugin.metadata.LastNameFirst, myBranding.lastNameFirst === 'true' ?? false)
|
||||||
const languages = myBranding.languages ? (myBranding.languages as string).split(',').map((l) => l.trim()) : ['en', 'ru', 'es', 'pt', 'zh']
|
const languages = myBranding.languages ? (myBranding.languages as string).split(',').map((l) => l.trim()) : ['en', 'ru', 'es', 'pt', 'zh', 'fr']
|
||||||
|
|
||||||
setMetadata(uiPlugin.metadata.Languages, languages)
|
setMetadata(uiPlugin.metadata.Languages, languages)
|
||||||
setMetadata(
|
setMetadata(
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
"Portuguese": "Português",
|
"Portuguese": "Português",
|
||||||
"Spanish": "Español",
|
"Spanish": "Español",
|
||||||
"Chinese": "中文",
|
"Chinese": "中文",
|
||||||
|
"French": "Français",
|
||||||
"MinutesBefore": "{minutes, plural, =1 {a minute before} other {# minutes before}}",
|
"MinutesBefore": "{minutes, plural, =1 {a minute before} other {# minutes before}}",
|
||||||
"HoursBefore": "{hours, plural, =1 {an hour before} other {# hours before}}",
|
"HoursBefore": "{hours, plural, =1 {an hour before} other {# hours before}}",
|
||||||
"DaysBefore": "{days, plural, =1 {a day before} other {# days before}}",
|
"DaysBefore": "{days, plural, =1 {a day before} other {# days before}}",
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
"Portuguese": "Português",
|
"Portuguese": "Português",
|
||||||
"Spanish": "Español",
|
"Spanish": "Español",
|
||||||
"Chinese": "中文",
|
"Chinese": "中文",
|
||||||
|
"French": "Français",
|
||||||
"MinutesBefore": "{minutes, plural, =1 {un minuto antes} other {# minutos antes}}",
|
"MinutesBefore": "{minutes, plural, =1 {un minuto antes} other {# minutos antes}}",
|
||||||
"HoursBefore": "{hours, plural, =1 {una hora antes} other {# horas antes}}",
|
"HoursBefore": "{hours, plural, =1 {una hora antes} other {# horas antes}}",
|
||||||
"DaysBefore": "{days, plural, =1 {un día antes} other {# días antes}}",
|
"DaysBefore": "{days, plural, =1 {un día antes} other {# días antes}}",
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
"DueDatePopupOverdueTitle": "Était à échéance le {value}",
|
"DueDatePopupOverdueTitle": "Était à échéance le {value}",
|
||||||
"DueDatePopupDescription": "{value, plural, =0 {Aujourd'hui} =1 {Demain} other {# jours restants}}",
|
"DueDatePopupDescription": "{value, plural, =0 {Aujourd'hui} =1 {Demain} other {# jours restants}}",
|
||||||
"DueDatePopupOverdueDescription": "{value, plural, =1 {1 jour de retard} other {# jours de retard}}",
|
"DueDatePopupOverdueDescription": "{value, plural, =1 {1 jour de retard} other {# jours de retard}}",
|
||||||
"English": "Anglais",
|
"English": "English",
|
||||||
"Russian": "Русский",
|
"Russian": "Русский",
|
||||||
"Portuguese": "Português",
|
"Portuguese": "Português",
|
||||||
"Spanish": "Español",
|
"Spanish": "Español",
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
"Portuguese": "Português",
|
"Portuguese": "Português",
|
||||||
"Spanish": "Español",
|
"Spanish": "Español",
|
||||||
"Chinese": "中文",
|
"Chinese": "中文",
|
||||||
|
"French": "Français",
|
||||||
"MinutesBefore": "{minutes, plural, =1 {um minuto antes} other {# minutos antes}}",
|
"MinutesBefore": "{minutes, plural, =1 {um minuto antes} other {# minutos antes}}",
|
||||||
"HoursBefore": "{hours, plural, =1 {uma hora antes} other {# horas antes}}",
|
"HoursBefore": "{hours, plural, =1 {uma hora antes} other {# horas antes}}",
|
||||||
"DaysBefore": "{days, plural, =1 {um dia antes} other {# dias antes}}",
|
"DaysBefore": "{days, plural, =1 {um dia antes} other {# dias antes}}",
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
"Spanish": "Español",
|
"Spanish": "Español",
|
||||||
"Portuguese": "Português",
|
"Portuguese": "Português",
|
||||||
"Chinese": "中文",
|
"Chinese": "中文",
|
||||||
|
"French": "Français",
|
||||||
"MinutesBefore": "{minutes, plural, =1 {за минуту} one {за # минуту} few {за # минуты} other {за # минут}}",
|
"MinutesBefore": "{minutes, plural, =1 {за минуту} one {за # минуту} few {за # минуты} other {за # минут}}",
|
||||||
"HoursBefore": "{hours, plural, =1 {за час} one {за # час} few {за # часа} other {за # часов}}",
|
"HoursBefore": "{hours, plural, =1 {за час} one {за # час} few {за # часа} other {за # часов}}",
|
||||||
"DaysBefore": "{days, plural, =1 {за день} one {за # день} few {за # дня} other {за # дней}}",
|
"DaysBefore": "{days, plural, =1 {за день} one {за # день} few {за # дня} other {за # дней}}",
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
"Portuguese": "Português",
|
"Portuguese": "Português",
|
||||||
"Spanish": "Español",
|
"Spanish": "Español",
|
||||||
"Chinese": "中文",
|
"Chinese": "中文",
|
||||||
|
"French": "Français",
|
||||||
"MinutesBefore": "{minutes, plural, =1 {一分钟前} other {# 分钟前}}",
|
"MinutesBefore": "{minutes, plural, =1 {一分钟前} other {# 分钟前}}",
|
||||||
"HoursBefore": "{hours, plural, =1 {一小时前} other {# 小时前}}",
|
"HoursBefore": "{hours, plural, =1 {一小时前} other {# 小时前}}",
|
||||||
"DaysBefore": "{days, plural, =1 {一天前} other {# 天前}}",
|
"DaysBefore": "{days, plural, =1 {一天前} other {# 天前}}",
|
||||||
|
@ -29,7 +29,8 @@
|
|||||||
{ id: 'pt', label: ui.string.Portuguese, logo: '🇵🇹' },
|
{ id: 'pt', label: ui.string.Portuguese, logo: '🇵🇹' },
|
||||||
{ id: 'es', label: ui.string.Spanish, logo: '🇪🇸' },
|
{ id: 'es', label: ui.string.Spanish, logo: '🇪🇸' },
|
||||||
{ id: 'ru', label: ui.string.Russian, logo: '🇷🇺' },
|
{ id: 'ru', label: ui.string.Russian, logo: '🇷🇺' },
|
||||||
{ id: 'zh', label: ui.string.Chinese, logo: '🇨🇳' }
|
{ id: 'zh', label: ui.string.Chinese, logo: '🇨🇳' },
|
||||||
|
{ id: 'fr', label: ui.string.French, logo: '🇫🇷' }
|
||||||
].filter((lang) => uiLangs.has(lang.id))
|
].filter((lang) => uiLangs.has(lang.id))
|
||||||
if (langs.findIndex((l) => l.id === currentLanguage) < 0 && langs.length !== 0) {
|
if (langs.findIndex((l) => l.id === currentLanguage) < 0 && langs.length !== 0) {
|
||||||
setLanguage(langs[0].id)
|
setLanguage(langs[0].id)
|
||||||
|
@ -72,6 +72,7 @@ export const uis = plugin(uiId, {
|
|||||||
Spanish: '' as IntlString,
|
Spanish: '' as IntlString,
|
||||||
Portuguese: '' as IntlString,
|
Portuguese: '' as IntlString,
|
||||||
Chinese: '' as IntlString,
|
Chinese: '' as IntlString,
|
||||||
|
French: '' as IntlString,
|
||||||
MinutesBefore: '' as IntlString,
|
MinutesBefore: '' as IntlString,
|
||||||
HoursBefore: '' as IntlString,
|
HoursBefore: '' as IntlString,
|
||||||
DaysBefore: '' as IntlString,
|
DaysBefore: '' as IntlString,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"localhost:8083": {
|
"localhost:8083": {
|
||||||
"title": "Platform",
|
"title": "Platform",
|
||||||
"languages": "en,ru,pt,es,zh",
|
"languages": "en,ru,pt,es,zh,fr",
|
||||||
"defaultLanguage": "en",
|
"defaultLanguage": "en",
|
||||||
"defaultApplication": "tracker",
|
"defaultApplication": "tracker",
|
||||||
"defaultSpace": "tracker:project:DefaultProject",
|
"defaultSpace": "tracker:project:DefaultProject",
|
||||||
|
Loading…
Reference in New Issue
Block a user