Skip to content

Commit 6e1b243

Browse files
Calic0CatDaiki Suzuki
and
Daiki Suzuki
authored
fix i18n format bug issue (#1008)
Co-authored-by: Daiki Suzuki <[email protected]>
1 parent 55d652b commit 6e1b243

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

package-lock.json

+5-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/web/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"react-markdown": "^9.0.1",
5959
"react-router-dom": "^6.22.3",
6060
"react-signature-canvas": "^1.0.6",
61-
"react-syntax-highlighter": "^15.5.0",
61+
"react-syntax-highlighter": "^15.6.1",
6262
"remark-breaks": "^4.0.0",
6363
"remark-gfm": "^4.0.0",
6464
"sonner": "^1.4.3",

packages/web/src/i18n/config.ts

+5
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ i18n
3939
// React does this escape for us, so we turn it off this time.
4040
interpolation: {
4141
escapeValue: false,
42+
format: (value, format) => {
43+
if (format === 'uppercase') return value.toUpperCase();
44+
if (format === 'lowercase') return value.toLowerCase();
45+
return value;
46+
},
4247
},
4348
react: {
4449
transKeepBasicHtmlNodesFor: ['wbr'],

0 commit comments

Comments
 (0)