Make language configurable #35

Merged
iexos merged 3 commits from :add-lang-conf into main 2023-06-29 16:30:42 +00:00
Owner

Title says it all

Title says it all
iexos added 1 commit 2023-06-28 16:23:32 +00:00
enable choice of language
Some checks failed
continuous-integration/drone/pr Build is failing
5159ed1b36
decentral1se reviewed 2023-06-29 11:48:19 +00:00
decentral1se left a comment
Owner

LGTM!

The only thing is, and this is still a bit "up in the air" as to how to handle (I think), is that if another operator deploys and doesn't copy over MEDIAWIKI_LANGUAGE then they'll potentially have a broken config cus they're missing the "en" default.

Two ways I've seen people mitigate that is 1) add a note to the release notes 2) add a default to the env loading.

LGTM! The only thing is, and this is still a bit "up in the air" as to how to handle (I think), is that if another operator deploys and doesn't copy over `MEDIAWIKI_LANGUAGE` then they'll potentially have a broken config cus they're missing the "en" default. Two ways I've seen people mitigate that is 1) add a note to the release notes 2) add a default to the `env` loading.
decentral1se reviewed 2023-06-29 11:48:54 +00:00
decentral1se left a comment
Owner

Oh wait a sec, does it also need to be threaded in via the compose.yml file env?

Oh wait a sec, does it also need to be threaded in via the `compose.yml` file env?
Author
Owner

Oh wait a sec, does it also need to be threaded in via the compose.yml file env?

Hm, its working for me as is. Its only needed for the template, so maybe no?

The only thing is, and this is still a bit "up in the air" as to how to handle (I think), is that if another operator deploys and doesn't copy over MEDIAWIKI_LANGUAGE then they'll potentially have a broken config cus they're missing the "en" default.

True, didn't think of that! Will add a note.

> Oh wait a sec, does it also need to be threaded in via the `compose.yml` file env? Hm, its working for me as is. Its only needed for the template, so maybe no? > The only thing is, and this is still a bit "up in the air" as to how to handle (I think), is that if another operator deploys and doesn't copy over MEDIAWIKI_LANGUAGE then they'll potentially have a broken config cus they're missing the "en" default. True, didn't think of that! Will add a note.
Owner

Oh wait a sec, does it also need to be threaded in via the compose.yml file env?

Hm, its working for me as is. Its only needed for the template, so maybe no?

If you run env | grep -i language inside the container, do you see anything? If not, I'd say it's worth adding to the env stanza in the compose.yml. The config might already be written since you deployed before this change.

> > Oh wait a sec, does it also need to be threaded in via the `compose.yml` file env? > > Hm, its working for me as is. Its only needed for the template, so maybe no? > If you run `env | grep -i language` inside the container, do you see anything? If not, I'd say it's worth adding to the `env` stanza in the `compose.yml`. The config might already be written since you deployed before this change.
Author
Owner

If you run env | grep -i language inside the container, do you see anything? If not, I'd say it's worth adding to the env stanza in the compose.yml. The config might already be written since you deployed before this change.

Yes, it is set inside the running container. And I can use it to change the language on a deploy --chaos.

Actually, there is all kinds of vars set in app that are not set in db, like LETS_ENCRYPT_ENV, ENTRYPOINT_CONF_VERSION, ... Same behaviour for my outline deployment. Is this a bug?

Anyway, will just add it.

> If you run `env | grep -i language` inside the container, do you see anything? If not, I'd say it's worth adding to the `env` stanza in the `compose.yml`. The config might already be written since you deployed before this change. Yes, it is set inside the running container. And I can use it to change the language on a `deploy --chaos`. Actually, there is all kinds of vars set in `app` that are not set in `db`, like `LETS_ENCRYPT_ENV`, `ENTRYPOINT_CONF_VERSION`, ... Same behaviour for my outline deployment. Is this a bug? Anyway, will just add it.
iexos added 1 commit 2023-06-29 13:47:16 +00:00
add MEDIAWIKI_LANGUAGE to compose.yml with default
Some checks failed
continuous-integration/drone/pr Build is failing
7d1810cf93
Owner

Actually, there is all kinds of vars set in app that are not set in db, like LETS_ENCRYPT_ENV, ENTRYPOINT_CONF_VERSION, ... Same behaviour for my outline deployment. Is this a bug?

These are injected in via abra AFAIR. This supports kadabra being able to restart deployments because the env vars are attached via abra. This was mentioned in https://docs.coopcloud.tech/abra/upgrade/#06x-beta-07x-beta

> Actually, there is all kinds of vars set in app that are not set in db, like LETS_ENCRYPT_ENV, ENTRYPOINT_CONF_VERSION, ... Same behaviour for my outline deployment. Is this a bug? These are injected in via `abra` AFAIR. This supports `kadabra` being able to restart deployments because the env vars are attached via `abra`. This was mentioned in https://docs.coopcloud.tech/abra/upgrade/#06x-beta-07x-beta
decentral1se approved these changes 2023-06-29 14:41:39 +00:00
iexos added 1 commit 2023-06-29 16:29:47 +00:00
point to list of language options
Some checks failed
continuous-integration/drone/pr Build is failing
de60261fce
iexos merged commit 5096046a86 into main 2023-06-29 16:30:41 +00:00
iexos deleted branch add-lang-conf 2023-06-29 16:30:46 +00:00
Owner

Thanks so much for this change! ♥

Hm, its working for me as is. Its only needed for the template, so maybe no?

Yes, in my experience variables which only appear in configs don't need to be added in compose.yml. Probably no harm in them being there though.

The only thing is, and this is still a bit "up in the air" as to how to handle (I think), is that if another operator deploys and doesn't copy over MEDIAWIKI_LANGUAGE then they'll potentially have a broken config cus they're missing the "en" default.

Best solution to this I can think of is to use the golang or construction to provide a default, e.g. https://git.coopcloud.tech/coop-cloud/matrix-synapse/src/branch/main/homeserver.yaml.tmpl#L41

Thanks so much for this change! ♥ >Hm, its working for me as is. Its only needed for the template, so maybe no? Yes, in my experience variables which only appear in configs don't need to be added in `compose.yml`. Probably no harm in them being there though. > The only thing is, and this is still a bit "up in the air" as to how to handle (I think), is that if another operator deploys and doesn't copy over MEDIAWIKI_LANGUAGE then they'll potentially have a broken config cus they're missing the "en" default. Best solution to this I can think of is to use the golang `or` construction to provide a default, e.g. https://git.coopcloud.tech/coop-cloud/matrix-synapse/src/branch/main/homeserver.yaml.tmpl#L41
Sign in to join this conversation.
No description provided.