I'm quite new in the developpment/translation part, so I never made a translation file myself. I already read the translation topics in the "Create" tab, but I didn't find anywhere how to generate a .po file to make the translation.
I downloaded poedit, but I don't have any .po file, so that I can translate my own campaign.

The translation topics are mostly about how translation works, and how to join the official wesnoth translation... which is not quite what I searched for.

You can download the .po files here
Those are the German files, you need to choose your language first, then click on the textdoman you want to translate, it will open a text file on your browser.
You can download it per right click. Remember to change the ending from .txt to .po.

The cmd-code given in the forum-thread was wrong, because python3 isn't reconized as a command to call python. Just had to figure out that the 3 had to be erazed and everything was generated in seconds.

I did my translation, but even if I have the ".PO" file and its compilation ".MO", the translation does not activate when I launch the campaign.
The directory inside main.cfg is the right one, but maybe the name of my translation files are wrong.
I didn't find any explanation on how to manage to make the game recognize your translation files.

You can run Wesnoth with the --all-translations command-line option; then your translation should show up in the language selection list (provided the mo is in the correct location). Or you could use the --language=your-language command-line option. I think that would need the language abbreviation, eg "fr" for French.

There's also a file you can edit that will cause the translation to show up in the language selection list, but I'm not sure where that is. Somewhere in the Wesnoth data folder, probably.

Command-line options?
In my campaign folder, I have my main.cfg and 3 scenario.cfg files. In the translation folder, I have a .PO file and a .MO file with the name "fr".
I only tryed to run Wesnoth normally with the game in french, then launching the campaign in single player, and watching if the translated dialogues would show up, instead of the english version.
This didn't happen. Maybe my MO and PO files are somewhat wrong or missing informations.

In the translation folder, I have a .PO file and a .MO file with the name "fr".

That is probably the problem. The file should be named after your add-on's textdomain (wesnoth-something) and placed in translations/language/LC_MESSAGES (in this case fr).
Edit: It was brought to my attention that this name and path will work only for mo files. Separate po file should indeed be named after the language but should go to translations/your textdomain.