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

Translatewiki: Move the config to channel overrides #14

Open
stjohann opened this issue Dec 4, 2021 · 0 comments
Open

Translatewiki: Move the config to channel overrides #14

stjohann opened this issue Dec 4, 2021 · 0 comments

Comments

@stjohann
Copy link
Owner

stjohann commented Dec 4, 2021

While Translatewiki module currently already sets channel overrides (for translatewiki-key data), it also uses server configs for everything else, which duplicates the data. This is more of a legacy thing than a conscious decision, since it makes no real difference if a server would track multiple Translatewiki languages or not. This change would enable the servers to do it as a side-effect, or even just posting the same language into multiple channels on one server (which would make testing the case where multiple servers track the same language easier).

What I want to do with this is to bring Translatewiki module closer to EventStreams/Linking modules:

  1. move all config into channel overrides (but in config.json in this case, not translatewiki.json like with eventStreams.json);
  2. rename !guildTW command to !trackTranslatewiki or similar (I generally wish to move away from !guildX to !serverX names, and this would not make sense if you could add multiple languages to one server);
  3. add code converting the old syntax to the new syntax, like one that already exists in Translatewiki.cs, so the old data does not get lost;
  4. eventually remove that code after some time.

Edit: One concern though is that it will be harder to figure out which channels require Translatewiki streaming in this setup. So when implementing this one should be careful about not, say, for-looping the channel list. It is easier for Linking to have overrides in comparison because it reacts to events in channels.

The removal of the conversion code for the data will introduce a new major version (v.N.0.0) of the bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant