We are using an implementation of mediawiki to provide policy and procedure documentation to staff, it is a 'half open wiki' in that we are using the 'stableversions' extension to mark a version of each page as 'appoved' which is the default shown to staff if they are not logged in, whilst still allowing them to make changes / updates to the next version if they are log in.
This works fine internally but we have been asked to look at using an externally facing wiki to host a set of policy & procedures that will be shared by a number of statuary organisations, the only real problem with this is that anything that we make visible externally needs to in both English and Welsh.
All of our editors would be working in english, so we would develop and approve in English and then translate to welsh.
Has anyone any recommendations on how we could achieve this particularly with a need to know when pages have been changed and so require re-translating.
Thanks
John
I've written a parser extension, <mytag>, and would like to identify all pages that use it. What's the best way to do this?
- Make <mytag>, when parsed, automatically append [[Category:Pages that use mytag]] to the page output? Is this possible/workable? Can you add a category programmatically like this, and will it show up in Special:Categories?
- Create a new Special page that lists all pages that use the tag, via SQL query? (Meaning I will now have coupling between the <mytag> extension and the Special page.)
- Other ideas?
Thanks, DanB
--------------------- Confidentiality note The information in this email and any attachment may contain confidential and proprietary information of VistaPrint and/or its affiliates and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, you are hereby notified that any review, reliance or distribution by others or forwarding without express permission is strictly prohibited and may cause liability. In case you have received this message due to an error in transmission, please notify the sender immediately and delete this email and any attachment from your system. ---------------------
On 19/04/07, Daniel Barrett danb@vistaprint.com wrote:
- Make <mytag>, when parsed, automatically append [[Category:Pages that
use mytag]] to the page output? Is this possible/workable? Can you add a category programmatically like this, and will it show up in Special:Categories?
That would be the simplest approach. An example of doing this can be found at http://www.mediawiki.org/w/index.php?title=User:Robchurch/Categorising_parse....
- Create a new Special page that lists all pages that use the tag, via
SQL query? (Meaning I will now have coupling between the <mytag> extension and the Special page.)
This would require tracking such links in a custom table, similar to the page link tables, for example. Trickier, but more user-transparent.
Rob Church
That would be the simplest approach. An example of doing this can be
found at http://www.mediawiki.org/w/index.php?title=User:Robchurch/Categorising_p arser_hook&oldid=83537
Thank you Rob! That worked. All the pages that use <mytag> now list the new category at the bottom. However, the category page does not list any pages at all. Will they eventually show up? Or do I need to visit each page individually and do a dummy edit/save operation?
Incidentally, <mytag> calls $wgParser->disableCache() if that matters.
My code:
$categoryName = 'Pages that use my tag'; $cat = Title::makeTitle( NS_CATEGORY, $categoryName ); $wgParser->mOutput->addCategory( $cat->getDBkey(), $wgParser->mTitle->getPrefixedText() );
Thanks, DanB
--------------------- Confidentiality note The information in this email and any attachment may contain confidential and proprietary information of VistaPrint and/or its affiliates and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, you are hereby notified that any review, reliance or distribution by others or forwarding without express permission is strictly prohibited and may cause liability. In case you have received this message due to an error in transmission, please notify the sender immediately and delete this email and any attachment from your system. ---------------------
On 19/04/07, Daniel Barrett danb@vistaprint.com wrote:
Thank you Rob! That worked. All the pages that use <mytag> now list the new category at the bottom. However, the category page does not list any pages at all. Will they eventually show up? Or do I need to visit each page individually and do a dummy edit/save operation?
You will need to rebuild the link tables if applying the change retroactively to an extension already saved into multiple pages. The best way to do this en masse to avoid missing any is by running maintenance/refreshLinks.php, but "null" edits to the pages in question will also work, if you know which they are.
Rob Church
Rob wrote:
You will need to rebuild the link tables if applying the change
retroactively to an extension already saved into
multiple pages. The best way to do this en masse to avoid missing any
is by running maintenance/refreshLinks.php,
but "null" edits to the pages in question will also work, if you know
which they are.
Heh... I ran maintenance/refreshLinks.php, but instead of adding pages to the category page, it wiped the category page clean ("0 articles in this category"). I'm guessing this is because the category is added programmatically, and refreshLinks can't see that?
Is this a potential bug in refreshLinks.php?
MW 1.9.3, BTW.
DanB --------------------- Confidentiality note The information in this email and any attachment may contain confidential and proprietary information of VistaPrint and/or its affiliates and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, you are hereby notified that any review, reliance or distribution by others or forwarding without express permission is strictly prohibited and may cause liability. In case you have received this message due to an error in transmission, please notify the sender immediately and delete this email and any attachment from your system. ---------------------
On 20/04/07, John Moorhouse john.moorhouse@3jays.me.uk wrote:
We are using an implementation of mediawiki to provide policy and procedure documentation to staff, it is a 'half open wiki' in that we are using the 'stableversions' extension to mark a version of each page as 'appoved' which is the default shown to staff if they are not logged in, whilst still allowing them to make changes / updates to the next version if they are log in.
This works fine internally but we have been asked to look at using an externally facing wiki to host a set of policy & procedures that will be shared by a number of statuary organisations, the only real problem with this is that anything that we make visible externally needs to in both English and Welsh.
All of our editors would be working in english, so we would develop and approve in English and then translate to welsh.
Has anyone any recommendations on how we could achieve this particularly with a need to know when pages have been changed and so require re-translating.
Interesting. AFAIK MediaWiki doesn't have any kind of translation management support, but it could certainly be useful for the future.
It sounds like you have the case that the English documents are the "master documents", and the Welsh are just translations, so the Welsh are not being actively developed, just updated to reflect the English ones. That probably makes it a bit easier.
Some elements of wiki editing will make life a bit easier for your translators. You can use page revision IDs, of the English pages, to make clear how up to date the translations are. Under the toolbox each page has a link "Permanent link". It will add something to the URL like "&oldid=69899". that is the revision ID of the current version of the page, so if you give people that URL, even if it gets changed in the future, the link will still take them to that particular version. Also page diffs should be helpful for your translators, to see what has changed.
eg. you could put a template on the top of all the translated pages, {{translation|69899}} --> "This page is a translation of the [[englishpage&oldid=69899|original English document at revision 69899]]. If the English page has been updated since that revision, this document may not reflect the updated text."
then when your translators work on the translated pages, they should change the revision ID in the template (and also put something in the edit summary I would guess).
But this doesn't give you a way to see which translations are out of date. hm...
You could train the people editing the English pages, to add [[Category:Pages requiring translation updates]] to the page every single time they make a significant edit. Then when translators want to translate, they can go pick a page in that category and update it, then edit the English page and remove the category. That's kind of cumbersome.
Just some ideas.
cheers, Brianna
Brianna Laugher wrote:
"This page is a translation of the [[englishpage&oldid=69899|original English document at revision 69899]]. If the English page has been updated since that revision, this document may not reflect the updated text."
I actually had a different situation in which it would be useful to refer to specific versions of a page, but this didn't work for me in wikilink syntax. Should the link [[Pagename&oldit=534534]] work?
On 20/04/07, Daniel Israel dmi1@hushmail.com wrote:
Brianna Laugher wrote:
"This page is a translation of the [[englishpage&oldid=69899|original English document at revision 69899]]. If the English page has been updated since that revision, this document may not reflect the updated text."
I actually had a different situation in which it would be useful to refer to specific versions of a page, but this didn't work for me in wikilink syntax. Should the link [[Pagename&oldit=534534]] work?
No, that was just my shorthand, sorry. Something like this should work:
[[{{fullurl:englishpage|oldid=69899}}|revision 69899]]
cheers, Brianna
Brianna said:
But this doesn't give you a way to see which translations are out of date.
hm...
This might be easy to query: basically you want to know, for a given welsh page, whether the current revision's timestamp is later than the timestamp of the accepted revision of the english counterpart.
So in psuedo-code, this would be something like:
function welshArticleIsOutOfDate($welshArticle, $englishArticle) { $engTs = getTimestampOfAcceptedRevision($englishArticle); $welshTs = getTimestampOfCurrentRevision($welshArticle); return $engTs > $welshTs; }
An extension that hooked something that happens on every page load (like OutputPageBeforeHTML or SkinTemplateSetupPageCss) could perform this check and set the contents of a div or optionally change some CSS styles accordingly.
Getting a list of all such out-of-date welsh translations would probably require a special page dedicated to producing such a list.
-- Jim R. Wilson (jimbojw)
On 4/20/07, Brianna Laugher brianna.laugher@gmail.com wrote:
On 20/04/07, Daniel Israel dmi1@hushmail.com wrote:
Brianna Laugher wrote:
"This page is a translation of the [[englishpage&oldid=69899|original English document at revision 69899]]. If the English page has been updated since that revision, this document may not reflect the updated text."
I actually had a different situation in which it would be useful to refer to specific versions of a page, but this didn't work for me in wikilink syntax. Should the link [[Pagename&oldit=534534]] work?
No, that was just my shorthand, sorry. Something like this should work:
[[{{fullurl:englishpage|oldid=69899}}|revision 69899]]
cheers, Brianna
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org