Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| traduction_live_cd_tuto_ubuntu_lucid [Le 20/04/2010, 19:25] – vincentxavier | traduction_live_cd_tuto_ubuntu_lucid [Le 31/08/2010, 08:27] (Version actuelle) – la methode est maintenant sous forme de script , cf forum du projet YannUbuntu | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | {{tag> | ||
| - | ---- | ||
| - | <note warning> | ||
| - | ====== 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]]. | ||
| - | |||
| - | ---- | ||
| - | |||
| - | |||
| - | ===== 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. | ||
| - | < | ||
| - | </ | ||
| - | |||
| - | <code bash> | ||
| - | #!/bin/bash | ||
| - | |||
| - | # 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. | ||
| - | # GNU General Public License for more details. | ||
| - | |||
| - | # You should have received a copy of the GNU General Public License | ||
| - | # along with this program. | ||
| - | |||
| - | # 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/ | ||
| - | |||
| - | if [ -e ${WD} ] then rm -rf ${WD} ; mkdir -p ${WD} ; else mkdir ${WD} ; fi ; | ||
| - | |||
| - | mkdir ${WD}/tmp | ||
| - | |||
| - | wget -c http:// | ||
| - | # | ||
| - | |||
| - | # Going into working directory | ||
| - | cd ${WD} | ||
| - | mkdir ${WD}/mnt | ||
| - | sudo mount -o loop ${WD}/ | ||
| - | mkdir ${WD}/ | ||
| - | rsync --exclude=/ | ||
| - | |||
| - | mkdir ${WD}/edit | ||
| - | unsquashfs -d ${WD}/ | ||
| - | sudo umount mnt | ||
| - | |||
| - | # Just replace archives by French ones | ||
| - | |||
| - | sed -i ' | ||
| - | |||
| - | # We just uncomment universe and multiverse for special package. They | ||
| - | # will be commented out by the end of the installation dans / | ||
| - | # will be purged to gain space. | ||
| - | |||
| - | sed -i -r -e 's/# (deb .* iverse)/ | ||
| - | |||
| - | # Preparing and entering the chroot environment | ||
| - | cp / | ||
| - | cp /etc/hosts edit/etc/ | ||
| - | sudo mount --bind /dev/ edit/dev | ||
| - | sudo chroot edit /bin/bash | ||
| - | mount -t proc none /proc | ||
| - | mount -t sysfs none /sys | ||
| - | mount -t devpts none /dev/pts | ||
| - | export HOME=/root | ||
| - | export PS1=" | ||
| - | |||
| - | # Updating repositories | ||
| - | aptitude update | ||
| - | |||
| - | # Removing unused packages | ||
| - | aptitude purge `dpkg -l | awk ' | ||
| - | |||
| - | # Installing packages | ||
| - | aptitude install language-pack-fr language-pack-fr-base gimp-help-fr 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 gimp-help-fr manpages-fr manpages-fr-dev manpages-fr-extra | ||
| - | LANG=fr_FR.UTF-8 | ||
| - | |||
| - | # Purging *.mo files | ||
| - | # May be inmproved | ||
| - | |||
| - | # Creating localepurge configuration file | ||
| - | |||
| - | cat >> / | ||
| - | #################################################### | ||
| - | # 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: | ||
| - | |||
| - | # | ||
| - | |||
| - | ##################################################### | ||
| - | # 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 | ||
| - | aptitude install localepurge | ||
| - | localepurge | ||
| - | aptitude purge localepurge | ||
| - | |||
| - | # Changing the name onto the CD | ||
| - | sed -i " | ||
| - | sed -i " | ||
| - | |||
| - | ## edition de casper | ||
| - | sed -i ' | ||
| - | |||
| - | ## profitons en pour ajouter un saut de ligne au texte de l' | ||
| - | sed -i ' | ||
| - | |||
| - | # TTY localisation | ||
| - | |||
| - | dpkg-reconfigure -phigh console-setup | ||
| - | |||
| - | sed -i ' | ||
| - | |||
| - | sed -i 's/and press ENTER to continue/et appuyer sur Entrée pour continuer/' | ||
| - | |||
| - | # Todo : casped-md5sum translation | ||
| - | |||
| - | # Live CD doesn' | ||
| - | |||
| - | if [ -neq `grep ' | ||
| - | if [ -neq `grep ' | ||
| - | |||
| - | KV-KB=boot/ | ||
| - | |||
| - | mkdir -p /tmp/init | ||
| - | mkinitramfs -o / | ||
| - | |||
| - | ## 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' | ||
| - | |||
| - | rm boot/ | ||
| - | |||
| - | # Getting out the chroot environment | ||
| - | |||
| - | apt-get clean | ||
| - | rm -rf /tmp/* | ||
| - | rm -rf /var/tmp/* | ||
| - | rm / | ||
| - | rm /etc/hosts | ||
| - | umount /proc | ||
| - | umount /sys | ||
| - | exit | ||
| - | sudo umount edit/dev | ||
| - | |||
| - | # Getting out the chroot environment | ||
| - | mv -f ${WD}/ | ||
| - | |||
| - | # Updating the autorun.inf | ||
| - | |||
| - | sed -i ' | ||
| - | |||
| - | # Dealing with gfxboot | ||
| - | |||
| - | cd ${WD}/ | ||
| - | chmod u+w . | ||
| - | echo fr > lang | ||
| - | echo fr > langlist | ||
| - | cp fr.* ${WD}/tmp/ | ||
| - | rm *.hlp *.tr | ||
| - | mv ${WD}/ | ||
| - | chmod u-w . lang langlist | ||
| - | |||
| - | # Creating CD manifest | ||
| - | |||
| - | chmod +w extract-cd/ | ||
| - | sudo chroot edit dpkg-query -W --showformat=' | ||
| - | sudo cp extract-cd/ | ||
| - | sed -i '/ | ||
| - | |||
| - | # Creating the squashfs | ||
| - | sudo rm ${WD}/ | ||
| - | sudo mksquashfs ${WD}/edit ${WD}/ | ||
| - | |||
| - | rm ${WD}/ | ||
| - | cd ${WD}/ | ||
| - | |||
| - | cd ${WD}/ | ||
| - | mkisofs -r -V " | ||
| - | </ | ||
| - | |||
| - | |||
| - | Vous pouvez tester l' | ||
| - | |||
| - | ---- | ||
