sopel-irc / sopel

:robot::speech_balloon: An easy-to-use and highly extensible IRC Bot framework. Formerly Willie.
https://sopel.chat
Other
950 stars 405 forks source link

wiktionary: support languages other than English #2482

Open SnoopJ opened 1 year ago

SnoopJ commented 1 year ago

Requested Feature

The wiktionary plugin is currently very specific to en.wiktionary.org, but it would be nice to have access to data on subdomains associated with other subdomains.

My knee-jerk reaction is that the plugin should have configuration to define a default language (i.e. what language you get for .wt term), but it may also make sense to allow command-time specification of the query language using the two-letter language code, like .wt:fr avec or .wt:ja 猫車. For the sake of this issue, configuration of a bare .wt is the more important functionality.

This should probably deferred until after the wiktionary plugin is made into a separate package (#1291), but since there is not yet a separate repo I'm creating an issue here in the core. It also seems likely that #2463 would make this task easier, probably that issue should be considered a dependency of this one.

Problems Solved

This feature would make the functionality of the wiktionary plugin available to users who speak a language other than English, or users who want to perform queries in a language other than their configured default.

Alternatives

No response

Notes

No response

RustyBower commented 1 year ago

So there's maybe a larger question about locale for sopel in general. Do we want to localize any plugins? Or have explicit command functionality to handle specific locales

xmszkn commented 1 year ago

So, for example, wikipedia has the ability to change the lang by .wplang for each user. For me personally, some solution to modify the plugin permanently is enough.

SnoopJ commented 1 year ago

So there's maybe a larger question about locale for sopel in general. Do we want to localize any plugins? Or have explicit command functionality to handle specific locales

These are good questions. My snap reaction is that having some place in [core] configuration for defining the default locale of the bot may be a good idea (possibly falling back on locale if the user doesn't specify this?), and plugins may individually decide to make use of this information if they care.

Localization is a pretty deep rabbit hole and I'm somewhat reluctant to put that on our planning if it doesn't have a specific champion leading the effort, or unless requested by users, but localization is also a good thing to have. There's space for a separate issue to discuss what locale-aware "stuff" we may be interested in beyond the scope of this ticket.