Skip to content

Commit 923617a

Browse files
committed
add internationalization
1 parent 2178e3a commit 923617a

62 files changed

Lines changed: 915 additions & 988 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.prettierignore

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

.prettierrc.json

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

.storybook/main.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
import type { StorybookConfig } from "@storybook/react-vite";
1+
import type { StorybookConfig } from '@storybook/react-vite'
22

33
const config: StorybookConfig = {
4-
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
4+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
55
addons: [],
66
framework: {
7-
name: "@storybook/react-vite",
7+
name: '@storybook/react-vite',
88
options: {}
99
},
10-
staticDirs: ["../public"],
10+
staticDirs: ['../public'],
1111
async viteFinal(config) {
1212
config.define = {
1313
...config.define,
14-
"process.env": "{}",
15-
global: "globalThis"
16-
};
17-
return config;
14+
'process.env': '{}',
15+
'global': 'globalThis'
16+
}
17+
return config
1818
}
19-
};
20-
export default config;
19+
}
20+
export default config

.storybook/preview.ts

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import type { Preview } from "@storybook/react-vite";
2-
import "@helpwave/hightide/style/globals.css";
1+
import type { Preview } from '@storybook/react-vite'
2+
import '@helpwave/hightide/style/globals.css'
33

4-
if (typeof window !== "undefined" && typeof process === "undefined") {
5-
(window as any).process = { env: {} };
4+
if (typeof window !== 'undefined' && typeof process === 'undefined') {
5+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
6+
(window as any).process = { env: {} }
67
}
78

89
const hideLanguageSwitcherCss = `
@@ -19,7 +20,7 @@ const hideLanguageSwitcherCss = `
1920
[class*="kc-dropdown"] {
2021
display: none !important;
2122
}
22-
`;
23+
`
2324

2425
const preview: Preview = {
2526
parameters: {
@@ -32,18 +33,18 @@ const preview: Preview = {
3233
},
3334
decorators: [
3435
(Story) => {
35-
if (typeof document !== "undefined") {
36-
const styleId = "hide-language-switcher";
36+
if (typeof document !== 'undefined') {
37+
const styleId = 'hide-language-switcher'
3738
if (!document.getElementById(styleId)) {
38-
const style = document.createElement("style");
39-
style.id = styleId;
40-
style.textContent = hideLanguageSwitcherCss;
41-
document.head.appendChild(style);
39+
const style = document.createElement('style')
40+
style.id = styleId
41+
style.textContent = hideLanguageSwitcherCss
42+
document.head.appendChild(style)
4243
}
4344
}
44-
return Story();
45+
return Story()
4546
}
4647
]
47-
};
48+
}
4849

49-
export default preview;
50+
export default preview

docker-compose.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: "3.8"
2-
31
services:
42
postgres:
53
image: postgres:15
@@ -39,4 +37,4 @@ services:
3937
condition: service_healthy
4038

4139
volumes:
42-
postgres_data:
40+
postgres_data:

eslint.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import configs from '@helpwave/eslint-config'
2+
3+
export default [
4+
...configs.recommended,
5+
{
6+
ignores: ['dist/**', 'dist_keycloak/**', 'storybook-static/**', 'node_modules/**', 'public/**', 'src/i18n/translations.ts']
7+
}
8+
]

locales/de.arb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"@@locale": "de",
3+
"helpwaveId": "helpwave id",
4+
"@helpwaveId": {
5+
"description": "Titel für helpwave id Badge"
6+
}
7+
}

locales/en.arb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"@@locale": "en",
3+
"helpwaveId": "helpwave id",
4+
"@helpwaveId": {
5+
"description": "Title for helpwave id badge"
6+
}
7+
}

0 commit comments

Comments
 (0)