Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile because of translation errors on msys2: keyword "zh_Hant" unknown #1299

Closed
Kreijstal opened this issue Nov 18, 2024 · 5 comments
Labels
dev Development / Build issues Windows This issue happens on MS-Windows

Comments

@Kreijstal
Copy link

Kreijstal commented Nov 18, 2024

Using workaround from #1228
From git clone, recursive, then started with meson.

[35/42] Building translation crates/rnote-ui/po/zh_HK/LC_MESSAGES/rnote-zh_HK.mo
FAILED: crates/rnote-ui/po/zh_HK/LC_MESSAGES/rnote.mo
"E:\msys64\ucrt64\bin/msgfmt.EXE" "-o" "crates/rnote-ui/po/zh_HK/LC_MESSAGES/rnote.mo" "../crates/rnote-ui/po/zh_HK.po"
../crates/rnote-ui/po/zh_HK.po:1: keyword "zh_Hant" unknown
../crates/rnote-ui/po/zh_HK.po:1:8: syntax error
E:\msys64\ucrt64\bin/msgfmt.EXE: found 2 fatal errors
[36/42] Building translation crates/rnote-ui/po/zh_CN/LC_MESSAGES/rnote-zh_CN.mo
FAILED: crates/rnote-ui/po/zh_CN/LC_MESSAGES/rnote.mo
"E:\msys64\ucrt64\bin/msgfmt.EXE" "-o" "crates/rnote-ui/po/zh_CN/LC_MESSAGES/rnote.mo" "../crates/rnote-ui/po/zh_CN.po"
../crates/rnote-ui/po/zh_CN.po:1: keyword "zh_Hans" unknown
../crates/rnote-ui/po/zh_CN.po:1:8: syntax error
E:\msys64\ucrt64\bin/msgfmt.EXE: found 2 fatal errors
[38/42] Merging translations for crates/rnote-ui/data/com.github.flxzt.rnote.desktop
FAILED: crates/rnote-ui/data/com.github.flxzt.rnote.desktop
"E:/msys64/ucrt64/bin/meson" "--internal" "msgfmthelper" "--msgfmt=E:/msys64/ucrt64/bin/msgfmt.EXE" "crates/rnote-ui/data/app.desktop.in" "crates/rnote-ui/data/com.github.flxzt.rnote.desktop" "desktop" "../crates/rnote-ui/data/../po"
../crates/rnote-ui/data/../po/zh_CN.po:1: keyword "zh_Hans" unknown
../crates/rnote-ui/data/../po/zh_CN.po:1:8: syntax error
E:/msys64/ucrt64/bin/msgfmt.EXE: found 2 fatal errors
[39/42] Building translation crates/rnote-ui/po/zh_SG/LC_MESSAGES/rnote-zh_SG.mo
FAILED: crates/rnote-ui/po/zh_SG/LC_MESSAGES/rnote.mo
"E:\msys64\ucrt64\bin/msgfmt.EXE" "-o" "crates/rnote-ui/po/zh_SG/LC_MESSAGES/rnote.mo" "../crates/rnote-ui/po/zh_SG.po"
../crates/rnote-ui/po/zh_SG.po:1: keyword "zh_Hans" unknown
../crates/rnote-ui/po/zh_SG.po:1:8: syntax error
E:\msys64\ucrt64\bin/msgfmt.EXE: found 2 fatal errors
[40/42] Building translation crates/rnote-ui/po/zh_Hant/LC_MESSAGES/rnote-zh_Hant.mo
ninja: build stopped: subcommand failed.
@Doublonmousse
Copy link
Collaborator

See

rnote/MAINTAINING.md

Lines 97 to 107 in 7f3ff8a

## Update the "Chinese Traditional" Translation (zh_Hant.po) Manually
The package providing the `opencc` tool (`opencc-tools` on Fedora) needs to be installed to regenerate the translation.
To autogenerate chinese traditional translation (`zh_Hant`) from chinese simplified (`zh_Hans`), use opencc:
```bash
./build-aux/update-translations.sh
```
discussed in [issue 220](https://github.com/flxzt/rnote/issues/220)

Either try to make this work (opencc doesn't seem to work either in mingw but seems to work inside WSL ...) so that the .po files that are at the end of the LINGUAS LIST are generated from the zh_Hans.po and zh_Hant.po files (easy to find them, these are the only .po files that have only one line) or remove these files from the crates/rnote-ui/po directory and from the LINGUAS file and regenerate your meson _mesonbuild from scratch.

@Kneemund Kneemund added dev Development / Build issues Windows This issue happens on MS-Windows labels Nov 20, 2024
@Kneemund
Copy link
Collaborator

Kneemund commented Nov 20, 2024

Hi, was this issue resolved or is it still present? It seems like updating the translations is successful when cloning with MSYS=winsymlinks:native. That should have fixed the build issues as well, right?

@Kreijstal
Copy link
Author

Yeah that's just the workaround

@Doublonmousse
Copy link
Collaborator

Maybe this would be good to add to the instructions in misc/building/rnote-windows-build.md

@Kneemund
Copy link
Collaborator

Yes, that sounds reasonable. It seems like we also need to add the update-translations.sh step to the Windows, MacOS and Linux build instructions.

(942f600 only added it to MAINTAINING.md - meson doesn't run this automatically, right?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Development / Build issues Windows This issue happens on MS-Windows
Projects
None yet
Development

No branches or pull requests

3 participants