Skip to content

Commit 60d1ab0

Browse files
committed
fix: correctly parse strings with key value separator in value
1 parent c720648 commit 60d1ab0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/utils/nws.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ export const parseTranslationFile = (file: TranslationFile): ProgramUIFile => {
7878
const programUI: ProgramUIFile = {};
7979

8080
lines.forEach((line) => {
81-
const [key, value] = line.trim().split(KEY_VALUE_SEPARATOR);
81+
const [key, ...rest] = line.trim().split(KEY_VALUE_SEPARATOR);
82+
const value = rest.join(KEY_VALUE_SEPARATOR);
83+
8284
if (key) programUI[key] = value ?? ""; // Value can be empty in NWP translation file
8385
});
8486

0 commit comments

Comments
 (0)