[solved] How to have a wikipedia plugin working with then french Wikipedia?

Asked by Vincent Gay on 2011-02-20

I read in the Todo wikipedia.py and I understand the difficulty for the developer to localize his work. So I tried to create my own version called wikipediafr, based on the original wikipedia plugin, then copied the files and wikipediafr.py wikipediafr.pyc in the directory /usr/lib/Cardapio/plugins. Without success: wikipediafr does not appear in the plugins list of the properties window

Then I simply modified the wikipedia.py by systematically changing http://en.wikipedia.org/ by http://fr.wikipedia.org/ whenever the instance was found. Naturally I compiled the file in order to have a corresponding wikipedia.pyc. Another failure: results always come from the English version of Wikipedia.

I am distraught because my programming skills are still lower than my mastery of the English language. Would anyone be kind enough to tell me what to do?

Thanks in advance

Question information

Language:
English Edit question
Status:
Solved
For:
Cardapio Edit question
Assignee:
No assignee Edit question
Solved by:
Vincent Gay
Solved:
2011-02-23
Last query:
2011-02-23
Last reply:
2011-02-20
Thiago Teixeira (tvst) said : #1

Hi Vincent,

I believe you just found a bug in Cardapio :) , so I went ahead and fixed it. This is now working in trunk (https://answers.launchpad.net/cardapio/+faq/1352), and will propagate to the PPA in a day or two.

Oh, and just so you know the best way to create your own plugin:

1) Copy wikipedia.py to ~/.config/Cardapio/plugins/wikipedia_fr.py
2) Modify ~/.config/Cardapio/plugins/wikipedia_fr.py to your liking
3) Restart Cardapio

of course, if you want to install wikipedia_fr.py for all users, you can instead copy the file to /usr/lib/cardapio/plugins/wikipedia_fr.py.

Cheers

Vincent Gay (vgay) said : #2

Thanks a lot. And Many thanks for your program. I find it very pleasant and helpful.

Vincent Gay (vgay) said : #3

I found Cardapio 0.9.170 this morning in the PPA and I can see now my own plugin in the list. It works fine. Thanks a lot.

Thiago Teixeira (tvst) said : #4

No problem!