Moodle documentation: Is there a way to redirect to an English doc page?

Moodle documentation: Is there a way to redirect to an English doc page?

by David Mudrák -
Number of replies: 20
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Hi,

I am trying to improve the Czech MoodleDoc site. I would like to modify the default MediaWiki's response in the case where the documentation page is missing in the Czech version. At the moment, MediaWiki offers just a possibility to create new page. I would like to include a link to the appropriate English version of the documentation page as well.

Any ideas on how to sort this out? Thank you in advance.

David
Average of ratings: -
In reply to David Mudrák

Re: Moodle documentation: Is there a way to redirect to an English doc page?

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi David,

Firstly, a big THANK YOU for your work on the Czech Moodle Docs. approve

The question of how to easily access English documentation pages when pages in your own language are not yet translated has been asked by others e.g. MDLSITE-90. My suggestion for helping resolve the issue is here: MDLSITE-221.
In reply to Helen Foster

Re: Moodle documentation: Is there a way to redirect to an English doc page?

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Hi Helen,

Firstly, a big thank YOU for your work on Moodle Documentation wink

And thank you for the links and solutions provided. I also had some idea. But I do not have much experiences with MediaWiki, so I do not know whether it is possible or not. There should be a system template for the "missing page" case. We could edit these templates in all MediaWiki instances to include both link to edit the missing page and to view the English version.

d.
In reply to David Mudrák

Re: Moodle documentation: Is there a way to redirect to an English doc page?

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
it should be the page MediaWiki:Noarticletext. But I do not know yet, how to pass a page title as an argument, so we could render a link to the English version.
In reply to David Mudrák

Re: Moodle documentation: Is there a way to redirect to an English doc page?

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Heuréka!

The wiki admins are able to do it. I have modified the page "MediaWiki:Noarticletext" to include following Czech text (translated into English for the purpose of this post):

This page does not exist yet. You can [http://docs.moodle.org/cs/index.php?title={{NAMESPACE}}:{{PAGENAME}}&action=edit create it] or try to look for information in the [http://docs.moodle.org/en/index.php?title={{NAMESPACE}}:{{PAGENAME}} English documentation].

IMHO this is another solution of MDLSITE-90.

David

Average of ratings: Useful (2)
In reply to David Mudrák

Re: Moodle documentation: Is there a way to redirect to an English doc page?

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Thank you for that, Nicolas Martignoni has put it in the french documentation smile

But :
  • the second link can be replaced by English documentation
  • the first link causes problem when there's a space in the page title sad
Séverin
Average of ratings: Useful (3)
In reply to Séverin Terrier

Re: Moodle documentation: Is there a way to redirect to an English doc page?

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Séverin,

Thanks for your suggestion for improving the second link. I've searched for a way to improve the first link in a similar way, but so far not found anything that works.

Regarding spaces in page titles, this should not be a problem for all pages in Moodle which link to corresponding pages in Moodle Docs e.g. http://docs.moodle.org/en/mod/forum/discuss as these never contain spaces.

A big THANK YOU to you and Nicholas for your work on the French Moodle Docs. I doubt that MediaWiki:Noarticletext will be seen very often. wink
In reply to Helen Foster

Re: Moodle documentation: Is there a way to redirect to an English doc page?

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Thank YOU Helen, i mainly make translations on existing pages wink

And there are still pages not available in french...
In reply to Séverin Terrier

Re: Moodle documentation: Is there a way to redirect to an English doc page?

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Hi Séverin, and thank you for your improvement! I haven't noticed any problems before. I have tried to correct the first link as well and I replaced it by

[{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=edit}} create]

I think it works with spaces, too. Please try. Anyway - this first link is not necessary. But I wanted it to be included there to remind users a possibility to create localized Wiki pages.
In reply to David Mudrák

Re: Moodle documentation: Is there a way to redirect to an English doc page?

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Yes, it works very good, even with spaces, thanks smile

You're better than me to find this solution.

The last things that would be very cool (and more clean i think) would be :
  • to show the sentence and the link to the english page only if it exists wink
  • to dynamically change the name for capabilities (by a subst) from the langage form to the english form (Capacités/moodle/role:manage in french to Capabilities/moodle/role:manage)
But i didn't succeed in my tests with all the mediawiki syntax to achieve that sad

Going in holidays tomorrow, so i won't be able to help for that before a while...
In reply to Séverin Terrier

Re: Moodle documentation: Is there a way to redirect to an English doc page?

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Is seems that nobody found a solution for my two last suggestions...
In reply to Séverin Terrier

Re: Moodle documentation: Is there a way to redirect to an English doc page?

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
It should be reported as a bug. If you look closely, only the first part of the url is translated. If that is not translated any more, the problem is solved.
e.g.
http://docs.moodle.org/nl/Mogelijkheden/moodle/site:doanything
http://docs.moodle.org/nl/Mogelijkheden/moodle/site:readallmessages

should be
http://docs.moodle.org/nl/Capabilities/moodle/site:doanything
http://docs.moodle.org/nl/Capabilities/moodle/site:readallmessages
In reply to koen roggemans

Re: Moodle documentation: Is there a way to redirect to an English doc page?

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
That would be a solution...

I would then have to :
  • rename all existing pages allready created in french, with "Capacités", to replace it with "Cababilities".
  • modify all french links to these pages from english pages
  • modify all links to these pages, from all french documentation pages about roles and capabilities...
Not sure it's really the simplest solution... but it would really be the same in all languages.
In reply to Séverin Terrier

Re: Moodle documentation: Is there a way to redirect to an English doc page?

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Séverin,

One of the nice features of MediaWiki is the ability to easily change page names.

As an admin, you can use the Move tab to move a page e.g. Capacités/mod/assignment:view to a new title - Capacities/mod/assignment:view. As well as renaming the page, this also creates a redirect.

Hopefully it's not too much work... wink I'm in agreement with Koen that this should be reported as a bug in order to fix the problem.
In reply to Helen Foster

Re: Moodle documentation: Is there a way to redirect to an English doc page?

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Hi Helen,

yes, i allready know this feature, to rename pages (but i would better rename to Capabilities/mod/assignment:view wink ).

Is there a solution in mediawiki to make a search/replace in several articles, if i want to modify links to the real new name (and delete old names) ?

I let you create the bug (i'm not very confident with that), and will do all the modifications when it will be "corrected" (in Moodle 1.6 to 1.9)...
In reply to Séverin Terrier

Re: Moodle documentation: Is there a way to redirect to an English doc page?

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Séverin,

I've reported the issue - it's MDL-11687.

Re. modifying links to the new name, I think the easiest solution is to keep the redirect pages (perhaps there are moodle.org forum discussions linking to them) and fix any double redirects using http://docs.moodle.org/fr/Special:DoubleRedirects.
In reply to Helen Foster

Re: Moodle documentation: Is there a way to redirect to an English doc page?

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Hi Helen,

thanks for the issue, voted for it.

You're right, it's probably better to keep the old page names, cause i've certainly made posts in forums with links to these pages...

I allready take a look at double redirect, broken links and other pages like that in MoodleDocs from time to time wink

There's still my over suggestion, in this discussion...
In reply to Séverin Terrier

Re: Moodle documentation: Is there a way to redirect to an English doc page?

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Séverin, why am I telling you about MediaWiki features? Both you and Nicolas are experts!

Anyway, hopefully others can benefit from reading our discussion. smile
In reply to Séverin Terrier

Re: Moodle documentation: Is there a way to redirect to an English doc page?

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
One part of my suggestions is near to be fixed in the other branch of this discussion, but there's still this one :
showing the sentence and the link to the english page only if the english page exists clin d’oeil

Because, when you take direct links automatically made by Moodle, most of the time, the english page exists, so, there's no problem. But there's perhaps some pages that still doesn't exist, even in english.

But, mostly, when you create from a page a link to a page in a not english language, and don't create that new page, the equivalent english page name (for example "en:Paramètres") has no sense, because it's a word or a true sentence, in another langage pensif
In reply to David Mudrák

Re: Moodle documentation: Is there a way to redirect to an English doc page?

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
David, thanks so much for your great solution, which works really well. approve I'm going to make sure it's implemented in all Moodle documentation wikis in other languages.
In reply to Helen Foster

Re: Moodle documentation: Is there a way to redirect to an English doc page?

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
It was my pleasure to sort out my own issue and to help the community by the same mail.