Wiki translator how-to

From Pdpedia

Jump to: navigation, search

Contents

French translation how-to

to go on french translation, we wanted to import the text content of the help patches of Pd Extended from the english Pdpedia
to do so we used WikipediaFS to mount french Pdpedia as a hard disk and so be able to edit files as if they were on our local hard disk. This is usefull to use bot without ssh access on the server

WikipediaFS

ref : http://wikipediafs.sourceforge.net/

Install WikipediaFS

ref : http://wikipediafs.sourceforge.net/README.txt WikipediaFS allow to view and edit Wikimedia articles as if they were real files.

Requirements

Install (Linux only)

tar xvf wikipediafs-0.3.tar.gz
sudo apt-get install python2.5
sudo apt-get install python-fuse
sudo apt-get install fuse-utils
  • install WikipediaFS
cd wikipediafs-0.3/
sudo python setup.py install

Configure WikipediaFS

Manual : man mount.wikipediafs

  • create a directory-mountpoint where the files of the wiki will be transfered : MY_DIR
  • to be sure to be able to mount without sudo, you may need to :
      **To  run  mount.wikipediafs without root privileges, you may have to set the right permissions for /usr/bin/fusermount  and  /dev/fuse  if  your
      distribution has not already done it for you. For example,
      # adduser your_username fuse
      # chmod 4750 /bin/fusermount
      # chgrp fuse /dev/fuse /bin/fusermount
      **(You  may  have  to  log out and log in again so that changes are taken into account.)
  • launch once the mount action so as to create ~/.wikipediafs/config.xml :
sudo mount.wikipediafs MY_DIR
  • configure the config.xml file as below
<?xml version="1.0" encoding="UTF-8"?>
 <wfs-config>
   <general>
       <article-cache-time>30</article-cache-time>
   </general>
   <sites>
       Minimalist site entry sample:
       <site>
           <dirname>en-pdpedia</dirname>
           <host>wiki.puredata.info</host>
           <basename>/en/Main_Page</basename>
       </site>
       <site>
           <dirname>MY_DIR</dirname>
           <host>wiki.puredata.info</host>
           <port>80</port>
           <basename>/fr/Accueil</basename>
           <username>YOUR USER NAME on PdPedia</username>
           <password>YOUR PASSWORD on PdPedia</password>       
       </site>
   </sites>
 </wfs-config>
       
  • unmount
sudo umount MY_DIR/
  • re-launch to use the modified config.xml file
sudo mount.wikipediafs MY_DIR

Use Wikipediafs

sudo vi fr-pdpedia/wrap.mw

this will open the page http://wiki.puredata.info/fr/wrap in vi, we can edit it, save and the saved page is automatically modified on the server