I had to move my personal gitea instance to a new server. In doing so i had to change OSes and Gitea version (upgrade) – not my choice per se.
copied the app.ini, db backup, and filestore to new server and the service tries to start, but fails with this error message:
Unable to register cron task update_mirrors Error:translation is missing for task “update_mirrors”, please add translation for “admin.dashboard.update_mirrors”
What does this mean, and how can I fix it? New host is FreeBSD, Gitea version: 1.18.3
I believe this error is a red herring, as a missing translation for your locale will not cause a crash after v1.17. It looks like the code that is getting the configuration for [cron.update_mirrors] is erroring but not providing an error, so Gitea defaults to the missing translation.
Can you post your config, specifically the sections starting with [cron.? I think issue may be with one of the values being incorrectly formatted (see Config Cheat Sheet for v1.18).
It’s not related to your config. But related to you locale files.
This error message (Error:translation is missing for task) is only shown when a locale key couldn’t be found in your custom locale files – unless there is a bug in Gitea binary which doesn’t pack the correct locale files.
If you are not using custom locale files (manually put some some files in your custom directory), then maybe it’s a code/build/packaging bug of the FreeBSD release?
The full story is: when Gitea starts , it registers some internal tasks, these tasks need locale translation, so Gitea tries to translate the task names by its builtin/custom locale files. If Gitea can not find the related translation string, it reports fatal error, because in such case the locale system doesn’t work.
It seems that the assets were not embedded in the binary.
In the gitea FreeBSD port, there is an option “Build a single monolithic binary, with all assets included” which was disabled by default. Enabling it solved my problem.