Yeah ! I found a way to do everything better. It's long and a bit technical and represent some admin work, but I think it is worth the effort. Follow the guide :
I first went with
this, and I suppose someone did the same as
MediaWiki:Sidebar-messages exists. But if you want the target to change as the user as selected a language, you have to use magic word {{int:KEYWORD}}, who will try to translate KEYWORD according to ULS choice.
The complete procedure is the following :
1) Modify
Mediawiki:Sidebar and make the links look like ** {{int:sidebar-faq-target}}|sidebar-faq
2) Go to
Mediawiki:sidebar-messages and add the two keywords to the page. This step require first some new lines in LocalSettings.php (which I assume has already been done as I said earlier, otherwise I suppose the page wouldn't exist).
I suppose it is no recommended to have the same keyword several time in the page.
3) The link targets now an error page, as "sidebar-faq-target" has no translation yet. You have to go to
Mediawiki:sidebar-faq-target, create a new page, and write the name of the page, in our exemple FAQ. Then go to
Mediawiki:sidebar-faq and do the same.
Of course, the first must be well written, as you would write it after
*index.php?title=* for url access. For the second, you can write what you want to be displayed in the menu.
4) Now, the administrator is no longer needed, and usual translators can acces the string via
Special:translate or more specifically
Special:translate/wiki-sidebar. There you will see our two strings. You need to click on the message to be sure to distinguish the two, as the original message name is displayed on the top of each row, but only when selected.
And here is the final trick : "sidebar-faq" will be translated as "Questions fréquentes" and "sidebar-faq-target" as "FAQ/fr", for the french exemple. Of course, the translator should NOT point to FAQ/fr if the page isn't translated at all. But everything goes well if you translate the first string, then replace the second with itself.
Note that the step 3 really matters, because it gives a default behavior. If you go directly with translation, and a user select a language who hasn't been translated, all the links will appear as dead.
The hack has also the drawback that you have to know the trick in order to translate the "sidebar-PAGENAME-target" messages correctly. But as you have to know the
Special:translate link to go there, it seem reasonably safe to me.
At last, it is clear that it doesn't affect inside page links, so it doesn't change a thing if you cross an untranslated page as browsing, but it's already a huge improvement, I think.
Of course, I am volunteer to do the changes if no administrator has time to do this, but I will need the rights to modify the Mediawiki: pages. In any cases, I propose to take some time to explain the translation procedure in the
Help_FreeCAD page.
And now, I think I deserve some sleep.