HerrKnarz / Playnite-Extensions

Collection of useful Playnite extensions. See Readme for details!
MIT License
14 stars 2 forks source link

[Enhancement][Wikipedia Metadata]Language support #78

Closed akieof closed 6 months ago

akieof commented 7 months ago

Is your feature request related to a problem? Please describe. When I use it to search for game info with non-English content (like Japanese or Chinese games), it return strange and irrelevant results

Describe the solution you'd like Added language support for wikipedia search

Describe alternatives you've considered I took a quick look at the code and found that the interface address used in WikipediaApiCaller was written as en.wikipedia.org...(en limits the scope of the search language) I think adding language support will make the plug-in more general. Here are some possible ways I can think to optimize it.

  1. Add a search language setting, choice corresponding interface address when searching,

  2. Check the input content prefix or suffix before search, and search with the corresponding interface address if present, otherwise, use the default language to search, for example: Japanese content@jp use the interface address jp.wikipedia.org to search

HerrKnarz commented 6 months ago

I've thought about adding language support, but unfortunately it won't be done by simply changing the language shorthand in the URL. There are many more variables that would have to be taken into account and the wiki syntax is already far too variable in itself. For example, to search for developer or release date, I would have to know the correct translation of the respective box for each language to search for it. There's also the possibility, that different wikipedia sites use different boxes or syntax for some elements or emphasize completely different infos. I can already see several differences between english and german wiki pages for example and I believe those will only be worse with languages like japanese simply because of the completely different writing system.

What's more, I don't like the idea of simply switching to the default language when the add-on can't find a game. Since the automated search on Wikipedia is quite specific in order not to deliver false results, games are often not found at all, even though they exist in the language. Playnite also does not allow a metadata extension to add more than one source (e.g. language). There is only ever one search. I can only select a result from the search dialog, but I cannot, for example, say in advance which search I want to use. You would need to switch the language in the add-on settings every time you want to search in a different language. I also guess it will be quite useless to search for the same possibly localised game names in the english and japanese or other language wikipedia, especially if the game name originally isn't in one of both languages to begin with. And Playnite unfortunately doesn't support adding game names in different languages.

Because of those concerns, I'm afraid language support will be way too complex to be feasable for me alone. My time to develop add-ons is simply too limited. I'd also need people with knowledge in all the different languages to support them correctly.