lean4game icon indicating copy to clipboard operation
lean4game copied to clipboard

`lake exe i18n --export-json` does not support `#~`

Open JiechengZhao opened this issue 10 months ago • 2 comments

``lake exe i18n --export-json` failed on https://github.com/JiechengZhao/NNG4/commit/d4d1e19f13f58263df5790c33dd6621d9aac0b2a .

jiecheng@jiecheng-Vostro-3420:~/workspace/lean/lean4games/NNG4$ lake exe i18n --export-json
PANIC at I18n.POFile.read I18n.PO.Read:289:4: Failed to parse PO file: offset 200468: unexpected comment format.
backtrace:
./.lake/packages/i18n/.lake/build/bin/i18n(lean_panic_fn+0x9e)[0x616baa681a4e]
./.lake/packages/i18n/.lake/build/bin/i18n(l_I18n_POFile_read___lambda__1+0x365)[0x616ba74a94a5]
./.lake/packages/i18n/.lake/build/bin/i18n(l_Array_forInUnsafe_loop___at_I18n_i18nCLI___spec__1+0xcd)[0x616ba74b7ebd]
./.lake/packages/i18n/.lake/build/bin/i18n(l_I18n_i18nCLI___lambda__2+0x120)[0x616ba74b8480]
./.lake/packages/i18n/.lake/build/bin/i18n(l_I18n_i18nCLI+0x7c)[0x616ba74b8ddc]
./.lake/packages/i18n/.lake/build/bin/i18n(lean_apply_2+0x136)[0x616baa68cef6]
./.lake/packages/i18n/.lake/build/bin/i18n(lean_apply_2+0x571)[0x616baa68d331]
./.lake/packages/i18n/.lake/build/bin/i18n(lean_apply_2+0x2ad)[0x616baa68d06d]
./.lake/packages/i18n/.lake/build/bin/i18n(lean_apply_2+0x2ad)[0x616baa68d06d]
./.lake/packages/i18n/.lake/build/bin/i18n(lean_apply_2+0x2ad)[0x616baa68d06d]
./.lake/packages/i18n/.lake/build/bin/i18n(lean_apply_2+0x2ad)[0x616baa68d06d]
./.lake/packages/i18n/.lake/build/bin/i18n(lean_apply_2+0x2ad)[0x616baa68d06d]
./.lake/packages/i18n/.lake/build/bin/i18n(+0xc2362d)[0x616ba743c62d]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x731e04a29d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x731e04a29e40]
./.lake/packages/i18n/.lake/build/bin/i18n(_start+0x25)[0x616ba743b7a5]
uncaught exception: already exists (error code: 0, )

The content is

#~ msgid ""\n#~ "## Sum'

#~ is generated by msgmerge (gettext) when it finds that an old script does not match or only fuzzily matches the current key. Deleting this part is okay, but since this is a common behavior in gettext, adding support for it would be good.

JiechengZhao avatar Apr 11 '24 09:04 JiechengZhao