foundryvtt-docker icon indicating copy to clipboard operation
foundryvtt-docker copied to clipboard

"Cannot update via web" warning not shown when language pack is used

Open ThiefMaster opened this issue 2 years ago • 4 comments

Bug description

image

image

The message with the language pack is the default one instead of the Docker mention.

Steps to reproduce

  • Use a language pack (only tested w/ the German one)

Expected behavior

The docker message shows up. Even if it's not translated, having it would still be much better than the default one.

Container metadata

n/a

Relevant log output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

ThiefMaster avatar Jul 31 '23 13:07 ThiefMaster

After looking at https://github.com/felddy/foundryvtt-docker/blob/develop/src/patch_lang.ts I think a possible fix could be patching Foundry so it does not use SETUP.UpdateHint but a different label. However, considering how ugly that would be, maybe it's better to automatically patch lang-* modules and inject the English message there instead of the translated default one (or if you want to be fancy: inject translated messages).

Another - much cleaner - alternative could be asking the foundry dev @aaclayton to add a config option or env var to disable the built-in update logic/UI, which your container could then set.

ThiefMaster avatar Jul 31 '23 13:07 ThiefMaster

The core software exposes a --noupdate launch flag which disables update checks and other behaviors. Perhaps this flag should be set in docker environments?

aaclayton avatar Jul 31 '23 13:07 aaclayton

Thank you @aaclayton, the container does use the --noupdate flag as you suggested: https://github.com/felddy/foundryvtt-docker/blob/b8334b27487f0132799331f8453576aace8fca63/Dockerfile#L97-L100

The issue here is that I can only patch the languages that exist when the distribution is installed. As you pointed out @ThiefMaster this is only en.json: https://github.com/felddy/foundryvtt-docker/blob/b8334b27487f0132799331f8453576aace8fca63/src/patch_lang.ts#L5

One my the goals of this project is to have a "light touch" as to avoid any side-effects. Once things are up and running the container only provides continuous health checks. To patch other languages as they are installed would require something more invasive than I would be comfortable with.

I'm open to other suggestions on how to implement this feature for more languages. Perhaps there is a robust way for the container to overlay its own set of language files for these few labels.

felddy avatar Aug 02 '23 13:08 felddy

Upstream support for something like --noupdate="message why updates are not possible" could be a clean option :)

ThiefMaster avatar Aug 02 '23 14:08 ThiefMaster