Skip to content

Commit ed40661

Browse files
committed
update translations
1 parent 923617a commit ed40661

9 files changed

Lines changed: 110 additions & 53 deletions

File tree

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ services:
3131
- "8080:8080"
3232
volumes:
3333
- ./dist_keycloak/keycloak-theme-for-kc-all-other-versions.jar:/opt/keycloak/providers/helpwave-id-theme.jar:ro
34-
- ./keycloak/import:/opt/keycloak/data/import:ro
3534
depends_on:
3635
postgres:
3736
condition: service_healthy

keycloak/import/customer-realm.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

keycloak/import/team-realm.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

locales/de.arb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,13 @@
33
"helpwaveId": "helpwave id",
44
"@helpwaveId": {
55
"description": "Titel für helpwave id Badge"
6+
},
7+
"nOrganization": "{count, plural, =1{# Organisation} other{# Organisationen}}",
8+
"@nOrganization": {
9+
"placeholders": {
10+
"count": {
11+
"type": "number"
12+
}
13+
}
614
}
7-
}
15+
}

locales/en.arb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,13 @@
33
"helpwaveId": "helpwave id",
44
"@helpwaveId": {
55
"description": "Title for helpwave id badge"
6+
},
7+
"nOrganization": "{count, plural, =1{# Organization} other{# Organizations}}",
8+
"@nOrganization": {
9+
"placeholders": {
10+
"count": {
11+
"type": "number"
12+
}
13+
}
614
}
7-
}
15+
}

src/i18n/translations.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,37 @@
11
// AUTO-GENERATED. DO NOT EDIT.
22
/* eslint-disable @stylistic/quote-props */
3-
3+
/* eslint-disable no-useless-escape */
44
/* eslint-disable @typescript-eslint/no-unused-vars */
55
import type { Translation } from '@helpwave/internationalization'
6+
import { TranslationGen } from '@helpwave/internationalization'
67

78
export const helpwaveIdTranslationLocales = ['de', 'en'] as const
89

910
export type HelpwaveIdTranslationLocales = typeof helpwaveIdTranslationLocales[number]
1011

1112
export type HelpwaveIdTranslationEntries = {
1213
'helpwaveId': string,
14+
'nOrganization': (values: { count: number }) => string,
1315
}
1416

1517
export const helpwaveIdTranslation: Translation<HelpwaveIdTranslationLocales, Partial<HelpwaveIdTranslationEntries>> = {
1618
'de': {
17-
'helpwaveId': `helpwave id`
19+
'helpwaveId': `helpwave id`,
20+
'nOrganization': ({ count }): string => {
21+
return TranslationGen.resolvePlural(count, {
22+
'=1': `${count} Organisation`,
23+
'other': `${count} Organisationen`,
24+
})
25+
}
1826
},
1927
'en': {
20-
'helpwaveId': `helpwave id`
28+
'helpwaveId': `helpwave id`,
29+
'nOrganization': ({ count }): string => {
30+
return TranslationGen.resolvePlural(count, {
31+
'=1': `${count} Organization`,
32+
'other': `${count} Organizations`,
33+
})
34+
}
2135
}
2236
}
2337

src/login/pages/ForgotPassword.tsx

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,30 @@ export default function ForgotPassword({ kcContext }: ForgotPasswordProps) {
2020
const message = kcContext.message
2121

2222
return (
23-
<Template
24-
kcContext={kcContext}
25-
i18n={i18n}
26-
displayMessage={!!message}
27-
headerNode={i18n.msgStr('emailForgotTitle')}
28-
doUseDefaultCss={false}
29-
>
23+
<>
24+
<style>{`
25+
#kc-header,
26+
#kc-header-wrapper,
27+
.kc-header,
28+
.kc-logo-text,
29+
[id*="kc-logo"],
30+
[class*="kc-logo"],
31+
[id*="header"],
32+
[class*="header"]:not([class*="Helpwave"]):not([class*="helpwave"]),
33+
[id*="brand"],
34+
[class*="brand"],
35+
[id*="kc-brand"],
36+
[class*="kc-brand"] {
37+
display: none !important;
38+
}
39+
`}</style>
40+
<Template
41+
kcContext={kcContext}
42+
i18n={i18n}
43+
displayMessage={!!message}
44+
headerNode={null}
45+
doUseDefaultCss={false}
46+
>
3047
<div
3148
style={{
3249
display: 'flex',
@@ -112,5 +129,6 @@ export default function ForgotPassword({ kcContext }: ForgotPasswordProps) {
112129
</form>
113130
</div>
114131
</Template>
132+
</>
115133
)
116134
}

src/login/pages/Login.tsx

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,30 @@ export default function Login({ kcContext }: LoginProps) {
2626
const message = kcContext.message
2727

2828
return (
29-
<Template
30-
kcContext={kcContext}
31-
i18n={i18n}
32-
displayMessage={!!message}
33-
headerNode={i18n.msgStr('doLogIn')}
34-
doUseDefaultCss={false}
35-
>
29+
<>
30+
<style>{`
31+
#kc-header,
32+
#kc-header-wrapper,
33+
.kc-header,
34+
.kc-logo-text,
35+
[id*="kc-logo"],
36+
[class*="kc-logo"],
37+
[id*="header"],
38+
[class*="header"]:not([class*="Helpwave"]):not([class*="helpwave"]),
39+
[id*="brand"],
40+
[class*="brand"],
41+
[id*="kc-brand"],
42+
[class*="kc-brand"] {
43+
display: none !important;
44+
}
45+
`}</style>
46+
<Template
47+
kcContext={kcContext}
48+
i18n={i18n}
49+
displayMessage={!!message}
50+
headerNode={null}
51+
doUseDefaultCss={false}
52+
>
3653
<div
3754
style={{
3855
display: 'flex',
@@ -190,5 +207,6 @@ export default function Login({ kcContext }: LoginProps) {
190207
)}
191208
</div>
192209
</Template>
210+
</>
193211
)
194212
}

src/login/pages/Register.tsx

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,30 @@ export default function Register({ kcContext }: RegisterProps) {
1919
const message = kcContext.message
2020

2121
return (
22-
<Template
23-
kcContext={kcContext}
24-
i18n={i18n}
25-
displayMessage={!!message}
26-
headerNode={i18n.msgStr('registerTitle')}
27-
doUseDefaultCss={false}
28-
>
22+
<>
23+
<style>{`
24+
#kc-header,
25+
#kc-header-wrapper,
26+
.kc-header,
27+
.kc-logo-text,
28+
[id*="kc-logo"],
29+
[class*="kc-logo"],
30+
[id*="header"],
31+
[class*="header"]:not([class*="Helpwave"]):not([class*="helpwave"]),
32+
[id*="brand"],
33+
[class*="brand"],
34+
[id*="kc-brand"],
35+
[class*="kc-brand"] {
36+
display: none !important;
37+
}
38+
`}</style>
39+
<Template
40+
kcContext={kcContext}
41+
i18n={i18n}
42+
displayMessage={!!message}
43+
headerNode={null}
44+
doUseDefaultCss={false}
45+
>
2946
<div
3047
style={{
3148
display: 'flex',
@@ -95,5 +112,6 @@ export default function Register({ kcContext }: RegisterProps) {
95112
</form>
96113
</div>
97114
</Template>
115+
</>
98116
)
99117
}

0 commit comments

Comments
 (0)