Ceci est une ancienne révision du document !
Script de localisation de live-CD en français
Voici une proposition de script pour localiser le CD en Français. Il reste encore un peu de travail à faire, en particulier au niveau de la localisation de Firefox et des exemples, mais cela devrais faciliter le travail préliminaire.
Cette méthode servira de base pour les autres versions (kubuntu, xubuntu…) francophones.
Page principale du projet : traduction_live_cd. Forum du projet : ici.
Préparation
Installation des outils nécessaires
Le paquet squashfs est nécessaire afin de pouvoir décompresser le système de fichier embarqué sur le live-cd. Le paquet mkisofs servira à la génération de l'iso finale.
sudo apt-get install squashfs-tools genisoimage
Script en cours de modification
La dernière version est sur mon dépôt git : script_francisation.sh
#!/bin/sh # Translation script for Ubuntu CDs # Copyright (C) 2010 Vincent-Xavier JUMEL # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # Be sure to set up the variables according to your needs and preferences V_NUM=10.04 # Stand for version number V_NAME=lucid # stand for version name ARCH=i386 # Architecture WD=/home/virtual/ubuntu/translation # our working directory, should not interfere with anything you have for i in mnt extract-cd edit tmp ; do if [ ! -d ${WD}/${i} ]; then mkdir -p ${WD}/${i} ; else sudo rm -rf ${WD}/${i}/* fi done # http://paste.ubuntu.com/419825/ #!/bin/bash # Change this next line to the directory where your previously downloaded iso image sits. DIR=${WD} FLAVOR="desktop" VERSION=10.04 [[ ! -z "$1" ]] && FLAVOR=$1 if [[ -z "$ISOPATH" ]]; then if [[ "$FLAVOR" = "desktop" ]]; then ISOPATH="cdimage.ubuntu.com/cdimage/daily-live/current" elif [[ "$FLAVOR" = "alternate" ]]; then ISOPATH="cdimage.ubuntu.com/cdimage/daily/current" elif [[ "$FLAVOR" = "dvd" ]]; then ISOPATH="cdimage.ubuntu.com/cdimage/dvd/current" elif [[ "$FLAVOR" = "netbook" ]]; then ISOPATH="cdimage.ubuntu.com/cdimage/ubuntu-netbook/daily-live/current" elif [[ "$FLAVOR" = "server" ]]; then ISOPATH="cdimage.ubuntu.com/cdimage/ubuntu-server/daily/current" else echo "Unrecognized distribution, set ISOPATH manually" exit 1 fi fi ISO=$VERSION-$FLAVOR-i386.iso [ ! -d $DIR ] && mkdir $DIR cd $DIR # create identical formatted md5sum file from local copy if [[ -f $ISO ]]; then md5sum $ISO | sed -e "s/ / */" > $ISO.md5.local fi wget -q http://$ISOPATH/MD5SUMS grep $ISO MD5SUMS > $ISO.md5.server rm MD5SUMS diff -q $ISO.md5.local $ISO.md5.server if [ ! $? -eq "0" ]; then echo "Performing rsync in $DIR" rsync -avzhhP rsync://$ISOPATH/$ISO . else echo "no need to refresh" fi md5sum $ISO | sed -e "s/ / */" > $ISO.md5.local diff -q $ISO.md5.local $ISO.md5.server if [ ! $? -eq "0" ]; then echo "rsync failed" exit 1 else echo "success" fi # Going into working directory cd ${WD} sudo mount -o loop ${WD}/${V_NAME}-desktop-${ARCH}.iso ${WD}/mnt rsync --exclude=/casper/filesystem.squashfs -av ${WD}/mnt/ ${WD}/extract-cd sudo unsquashfs -d ${WD}/edit/. -f ${WD}/mnt/casper/filesystem.squashfs sudo umount mnt # Just replace archives by French ones sudo sed -i 's/archive/fr.archive/' ${WD}/edit/etc/apt/sources.list # We just uncomment universe and multiverse for special package. They # will be commented out by the end of the installation dans /var/lib/apt # will be purged to gain space. sudo sed -i -r -e 's/# (deb .* .*iverse)/\1/' ${WD}/edit/etc/apt/sources.list # Preparing and entering the chroot environment sudo cp /etc/resolv.conf ${WD}/edit/etc/ sudo cp /etc/hosts ${WD}/edit/etc/ sudo mount --bind /dev/ ${WD}/edit/dev sudo mount -t proc none ${WD}/edit/proc sudo mount -t sysfs none ${WD}/edit/sys sudo mount -t devpts none ${WD}/edit/dev/pts cat > ${WD}/tmp/fr.sh << EOF1 #!/bin/sh # Updating repositories apt-get update # Removing unused packages LANG=C apt-get -y purge \`dpkg -l | awk '{print \$2}' | egrep "^language-pack-|^language-pack-gnome-|^language-support-|^aspell|^myspell-|^hunspell-|^wamerican$|^wbritish$|^openoffice.org-help-|^openoffice.org-hyphenation-|^openoffice.org-thesaurus-|^gimp-help-|^evolution-documentation-" | xargs\` # Installing packages apt-get -y install language-pack-fr language-pack-fr-base language-support-fr language-support-writing-fr language-pack-gnome-fr language-pack-gnome-fr-base openoffice.org-hyphenation-fr openoffice.org-help-fr openoffice.org-l10n-fr wfrench manpages-fr LANG=fr_FR.UTF-8 # Purging *.mo files # May be inmproved # Creating localepurge configuration file cat >> /etc/locale.nopurge << EOF #################################################### # This is the configuration file for localepurge(8). #################################################### #################################################### # Uncommenting this string enables removal of localized # man pages based on the configuration information for # locale files defined below: MANDELETE #################################################### # Uncommenting this string causes localepurge to simply delete # locales which have newly appeared on the system without # bothering you about it: DONTBOTHERNEWLOCALE #################################################### # Uncommenting this string enables display of freed disk # space if localepurge has purged any superfluous data: SHOWFREEDSPACE ##################################################### # Commenting out this string enables faster but less # accurate calculation of freed disk space: #QUICKNDIRTYCALC ##################################################### # Commenting out this string disables verbose output: #VERBOSE ##################################################### # Following locales won't be deleted from this system # after package installations done with apt-get(8): fr fr_FR fr_FR@euro fr_FR.UTF-8 EOF # Really purging locale apt-get -y install localepurge localepurge apt-get -y purge localepurge # Changing the name onto the CD sed -i "s/Live session user/Session CD/g" /etc/casper.conf sed -i "s/Live session user/Session CD/g" /usr/share/initramfs-tools/scripts/casper ## edition de casper sed -i 's/Desktop/Bureau/g;s/Examples/Exemples/g' /usr/share/initramfs-tools/scripts/casper-bottom/10adduser ## profitons en pour ajouter un saut de ligne au texte de l'icone installer ubuntu 9.10 #sed -i 's/Installer RELEASE/Installer RELEASE/' /usr/share/applications/ubiquity-gtkui.desktop # TTY localisation dpkg-reconfigure -phigh console-setup sed -i 's/Please remove the disc, close the tray (if any)/Retirez le disque, refermez le tiroir (si nécessaire)'/ /etc/init.d/casper sed -i 's/and press ENTER to continue/et appuyez sur Entrée pour continuer/' /etc/init.d/casper sed -i 's/Please remove the disc and close the tray (if any) then press ENTER: /Retirez le disque, refermez le tiroir (si nécessaire) \net appuyez sur Entrée pour continuer/' /etc/init.d/casper # Todo : casped-md5sum translation # Live CD doesn't accept UID greater than 500 if [ -n \`grep '^[^:]*:[^:]*:[1-9][0-9][0-9][0-9]:' /etc/passwd\` ] ; then usermod -u 500 \$login ; fi if [ -n \`grep '^[^:]*:[^:]*:[12][0-9][0-9][0-9][0-9]:' /etc/passwd\` ] ; then usermod -u 500 \$login ; fi VAR="\`basename /boot/initrd.img-*-generic\`" ; KV=\${VAR/initrd.img-/} ; echo \${KV} mkdir -p /tmp/init mkinitramfs -o /tmp/init/initrd.gz \${KV} ## extrait cd /tmp/init gzip -dc initrd.gz | cpio -id rm *.gz ## recompresse en lzma, specifique à karmic... find . | cpio --quiet --dereference -o -H newc | lzma -7 > /initrd.lz cd / rm -R /tmp/init # On supprime l'initrd du squashfs généré lors du changement de locale: rm /boot/initrd.img-\${KV} # on change le lien par défaut sed -i 's%http://start.ubuntu.com/10.04/%http://start.ubuntu-fr.org/10.04/%' /usr/share/xul-ext/ubufox/components/aboutHome.js ## et la langue dans le cas ou la localisation n'est pas détectée correctement sed -i 's/en-US/fr-FR/' /usr/share/xul-ext/ubufox/components/aboutHome.js sed -i 's/en-US/fr-FR/' /etc/firefox/pref/firefox.js echo 'user_pref("app.releaseNotesURL", "http://doc.ubuntu-fr.org/lucid");' >> /etc/firefox/pref/firefox.js echo 'pref("startup.homepage_override_url","file:///usr/share/ubuntu-artwork/home/locales/index-fr.html");' >> /etc/firefox/pref/firefox.js sed -i "s/en-US/fr/;s/Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar/Ajoutez des favoris dans ce dossier pour les voir dans la barres des favoris/;s/Ubuntu and Free Software links/Liens sur Ubuntu et le logiciel libre/;s/Information and resources about Ubuntu, Debian and Free Software in general/Informations sur Ubuntu, Debian et le logiciel libre en général/;s,http://www.ubuntulinux.org/,http://ubuntu-fr.org/,;s/>Ubuntu</>Le site de l'association Ubuntu-fr</;s,http://www.ubuntulinux.org/wiki/FrontPage,http://doc.ubuntu-fr.org/,;s/Ubuntu Wiki/Documentation/;s/community-edited website/collaboratif/;s/Make a Support Request to the Ubuntu Community/Posez une question à la communauté Ubuntu \(en anglais\)/;s/Ubuntu is based on Debian/Ubuntu est basée sur Debian/" /usr/lib/firefox-3.6.3/defaults/profile/bookmarks.html #sed -i "s,wiki/FrontPage,," /usr/lib/firefox-3.6.3/defaults/profile/bookmarks.html sed -i "s/Help and Tutorials/Aide et tutoriels/;s/Customize Firefox/Personnaliser Firefox/;s/Get Involved/Impliquez vous/;s/About Us/À propos de nous/" /usr/lib/firefox-3.6.3/defaults/profile/bookmarks.html head -n 25 /etc/firefox/profile/bookmarks.html >> /tmp/bookmarks.html cat >> /tmp/bookmarks.html <<EOF <DT><A HREF="http://doc.ubuntu-fr.org/" ICON="data:image/x-png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAfCAYAAAAfrhY5AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1QsQFhoEBgWgsgAAB9BJREFUSMe1V3tQVNcZ/5372LvsLruwy8IuKlSQipbgg6gxoDYZHzU1EyFVtEPSt3TS5jFtYhNnTLUdk7TN5NHaxEhr7QSrTo1aGxuc+EpjCPjqgEYxssICK+zKsss+797X6R9e7MpEJZ3xzNy5d875vvM7j9/3+74L3IX2c5dhdusUy9YTpebNS6xcOQADAIK73da5hYe0e21xOstG6SwbTVZYg0tt3DIAltEL4L7s5H9c4WBUjRaX5xsqOYZ8lRDYVA3JDr98/tl/BN97ziU8RQhMI/ZGhthX2/k1HwwrnwPwAkj9X+Bba3PmfP8+yxaGkHJCwKSPTXHxvZs+DHcmNerIGnXCPMF4AIUAAungzFhA335yUmFpvsA0no4FKMVXRgMDgMVAn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eTwtp3LGAHEMjOujoOZxTCkxLHp5jXyGr1La/OdjbNSD+B8BRABfTd343ft4E/YhLAeTqfyheAJcBhNIJdzfAiS7Tmfq1qABiOifUdMP/ArnpYR4n/RFLAAAAAElFTkSuQmCC">Documentation Ubuntu en français</A> <DT><A HREF="http://www.april.org/" ICON="data:image/x-icon;base64,AAABAAEAEBAAAAAAAABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAA+fn5AIVTCQDy7OQAHBwcAK6urgDz7ucAeUIAAHtFAABjY2MAjV4UAPv69wDh1cMAnZ2dAPX19QDm28sAf39/AMKpggCfdzkACQkJAPr49QCqqqoAkGIaAOTk5ADIsY0A/Pr4ANzOtwC7n3YAybOQAOrh1ADExMQA+vj2AAUFBQC1tbUApqamAP7+/gAwMDAAiIiIABISEgClf0UA8/LvALOzswD8/PwALi4uAJpwLgB+SQAA3NzcAL6+vgBXV1cA9O/oAPj4+ADh1MEAKioqAIKCggCacC8AqodRAAwMDADp4NEA8u3mAPr38wD29vYAiloTABkZGQCcczgAfn5+ALi4uAD59/QAQkJCAHlBAACLi4sAJCQkAHx8fADU1NQAsI9dAHtEAAD7+fcABgYGALa2tgCkfkMA////AEBAQACYmJgAenp6AAQEBABCQkMAtLS0AO7u7gCHh4cAICAgAINQAADBwcEAo6OjAKiETAA8PDwA+/v7AC0tLQDs7OwAhFEGAHZ2dgDOzs4AzbiYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAT09PT09PT09PT09PT09PTyJAY09PT09PTw5XRShPT08NAF0jT09PT08NAFQ7D09PATQAHk9PT09PJAAvTwwzT09bAEMhVSlNJQBDI08UNzFPDgQAAAAAAAAAQU9PT1wRT08lAFAFFTUAKypPT09OEk9PYCY+Mk9HAA1PT08ZCixPT09AAEVWOEY8T09PHEQnT09PLiBfEABRT09PGgIHGE9PT08JABNYDk9PZGFKNkJPT09PSFMAUk8fSS0IPR1PT09PT08wTBdPOlkHPzlPT09PT09PWmJPTwMWG0tPT09PT09PTyNeT08LBk9PT09PT09PT09PT09PT09PT09PTwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=">April, Promouvoir et défendre le logiciel libre</A> EOF tail -n 10 /etc/firefox/profile/bookmarks.html >> /tmp/bookmarks.html mv /tmp/bookmarks.html /etc/firefox/profile/bookmarks.html rm -rf /usr/share/example-content/* wget --no-check-certificate -P /usr/share/example-content/ https://kinouchoulittleangel.homelinux.org/Exemples.tar.bz2 cd /usr/share/example-content/ tar -xf Exemples.tar.bz2 -C . rm Exemples.tar.bz2 mv Exemples/* . rmdir Exemples wget https://launchpad.net/ubuntu/lucid/+source/example-content/41/+files/example-content_41.tar.gz tar -xf example-content_41.tar.gz example-content-41/Ubuntu_Free_Culture_Showcase/ tar -xf example-content_41.tar.gz example-content-41/logos/ rm -rf Ubuntu\ Culture\ Libre\ exemples/* mv example-content-41/Ubuntu_Free_Culture_Showcase/* Ubuntu\ Culture\ Libre\ exemples/ mv example-content-41/logos/* logos rm example-content_41.tar.gz rm -rf example-content-41 wget --no-check-certificate -P /usr/share/example-content/Ubuntu\ Culture\ Libre\ exemples/ http://thetys-retz.net/~endymion/UbuntuIsHumanity.srt http://thetys-retz.net/~endymion/UbuntuIsHumanity.txt mv LiveCD_francais_remerciements.txt Ubuntu_Édition_Francophone_remerciements.txt chown -R 999:999 * cd / wget -O /usr/lib/rhythmbox/plugins/iradio/iradio-initial.pls --no-check-certificate http://thetys-retz.net/~endymion/iradio-initial.pls wget http://people.canonical.com/~didrocks/simplecommeubuntu_10.04_all.deb dpkg -i simplecommeubuntu*deb mkdir /etc/skel/Bureau/ cat > /etc/skel/Bureau/scu-10.04.desktop <<EOF #!/usr/bin/env xdg-open [Desktop Entry] Name=Simple Comme Ubuntu 10.04 Comment=Livre libre décrivant l'utilisation d'Ubuntu Icon=scu-3d Type=Link MimeType=application/x-pdf URL=file:///usr/share/doc/simplecommeubuntu/scu-10.04LTS.pdf.gz EOF wget -O /usr/share/pixmaps/scu-3d.png http://people.canonical.com/~didrocks/ubuntu10_04.png rm simplecommeubuntu*deb # Getting out the chroot environment apt-get -y purge fastjar apt-get -y autoremove --purge sed -i -r -e 's/(deb .* .*iverse)/# \1/' /etc/apt/sources.list apt-get -y update apt-get -y clean rm -rf /tmp/* rm -rf /var/tmp/* cp /dev/null /etc/resolv.conf cp /dev/null /etc/hosts rm /root/fr.sh EOF1 sudo mv ${WD}/tmp/fr.sh ${WD}/edit/root/fr.sh sudo chmod 755 ${WD}/edit/root/fr.sh sudo chroot ${WD}/edit /bin/bash /root/fr.sh sudo umount ${WD}/edit/proc sudo umount ${WD}/edit/sys sudo umount ${WD}/edit/dev/pts sudo umount ${WD}/edit/dev # Getting out the chroot environment sudo mv -f ${WD}/edit/initrd.lz ${WD}/extract-cd/casper/ # Updating the autorun.inf sudo sed -i 's/Install Ubuntu/Installer Ubuntu/' ${WD}/extract-cd/autorun.inf # Dealing with gfxboot sudo chmod -R u+w ${WD}/extract-cd/ echo fr > ${WD}/extract-cd/isolinux/lang echo fr > ${WD}/extract-cd/isolinux/langlist sudo cp ${WD}/extract-cd/isolinux/fr.* ${WD}/tmp/ sudo rm ${WD}/extract-cd/isolinux/*.hlp ${WD}/extract-cd/isolinux/*.tr sudo mv ${WD}/tmp/fr.* ${WD}/extract-cd/isolinux/ sudo chmod u-w ${WD}/extract-cd/isolinux ${WD}/extract-cd/isolinux/lang ${WD}/extract-cd/isolinux/langlist sudo sed -i "s/Try Ubuntu without installing/Essayer Ubuntu sans l\'installer/;s/Install Ubuntu/Installer Ubuntu/;s/Check disc for defects/Vérifier le disque/;s/Test ^memory/Vérifier la mémoire/;s/Boot from first hard disk/Démarrer sur le premier disque/" ${WD}/extract-cd/isolinux/text.cfg # Creating CD manifest sudo chmod +w ${WD}/extract-cd/casper/filesystem.manifest sudo chroot ${WD}/edit dpkg-query -W --showformat='${Package} ${Version}\n' > ${WD}/extract-cd/casper/filesystem.manifest sudo cp ${WD}/extract-cd/casper/filesystem.manifest ${WD}/extract-cd/casper/filesystem.manifest-desktop sudo sed -i '/casper/d;/cryptsetup/d;/dmraid/d;/ecryptfs-utils/d;/gparted/d;/jfsutils/d;/keyutils/d;/kpartx/d;/libdebconfclient0/d;/libdebian-installer4/d;/libdmraid1.0.0.rc15/d;/libecryptfs0/d;/libntfs10/d;/libreadline5/d;/localechooser-data/d;/lupin-casper/d;/ntfsprogs/d;/python-pyicu/d;/rdate/d;/reiserfsprogs/d;/ubiquity/d;/ubiquity-casper/d;/ubiquity-frontend-gtk/d;/ubiquity-slideshow-ubuntu/d;/ubiquity-ubuntu-artwork/d;/user-setup/d;/xfsprogs/d' ${WD}/extract-cd/casper/filesystem.manifest-desktop # Creating the squashfs sudo rm ${WD}/extract-cd/casper/filesystem.squashfs sudo mksquashfs ${WD}/edit ${WD}/extract-cd/casper/filesystem.squashfs sudo chmod 777 ${WD}/tmp sudo rm ${WD}/tmp/md5sum.txt sudo rm ${WD}/extract-cd/md5sum.txt cd ${WD}/extract-cd && sudo find . -type f -not -name md5sum.txt -not -path '*/isolinux/*' -print0 | xargs -0 -- md5sum > ${WD}/tmp/md5sum.txt sudo cp ${WD}/tmp/md5sum.txt ${WD}/extract-cd/md5sum.txt cd ${WD}/extract-cd sudo mkisofs -r -V "Ubuntu ${V_NUM} Edition Francophone" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../ubuntu-${V_NUM}-desktop-i386-fr.iso .
Vous pouvez tester l'image avec
kvm -m 512 -enable-kvm -cdrom ubuntu-10.04-desktop-i386-fr.iso -boot d -net nic -net user -net vde