From 6a76ec88370742ed3263bc2d64a17c64195ed9b4 Mon Sep 17 00:00:00 2001 From: Antynea Date: Tue, 12 May 2015 07:40:18 +0200 Subject: [PATCH] Internationalisation by default, message en add translate message fr --- 41_snapshots-btrfs | 12 ++++++++---- localisation/fr/grub-btrfs-git.mo | Bin 0 -> 318 bytes 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 localisation/fr/grub-btrfs-git.mo diff --git a/41_snapshots-btrfs b/41_snapshots-btrfs index 9e61e33..30d18b6 100644 --- a/41_snapshots-btrfs +++ b/41_snapshots-btrfs @@ -25,6 +25,10 @@ ninit=("initramfs-linux.img" "initramfs-linux-fallback.img") ### fr: NE PAS TOUCHER ### ### en: DO NOT TOUCH ### ########################### +## fr: internationalisation +## en: Internationalization +export TEXTDOMAIN=grub-btrfs-git +export TEXTDOMAINDIR="/usr/share/locale" ## fr: paramêtre des chaînes --hint ## en: Parameter of the chains --hint (Translation unclear) pboot=$(${grub_probe} --target="hints_string" "/boot" 2>/dev/null) @@ -48,7 +52,7 @@ echo "submenu '$submenuname' {" for kernel in ${nkernel[@]}; do # fr: on test si le(s) nom(s) du(des) kernel existe(nt), autrement on affiche une erreur et on sort # en: Check the specified kernel(s) exist, if it/they don't, display an error and exit - if [ ! -f /boot/$kernel ]; then echo "/boot/$kernel: fr: Fichier inexistant en: File does not exist" >&2; exit 1; fi + if [ ! -f /boot/$kernel ]; then gettext_printf $"Error: /boot/$kernel, kernel does not exist" >&2; exit 1; fi # fr: on vérifie le nombre de kernel présent, si >1 on crée un menu # en: If there are >1 kernels, create a menu if [ ${#nkernel[*]} != 1 ]; then echo " submenu '$kernel' { @@ -62,20 +66,20 @@ for kernel in ${nkernel[@]}; do if [ $item = "DELETED" ]; then continue; fi # fr: affiche la liste des snapshots trouvés # en: Output name of snapshot - gettext_printf "Found Snapshot: %s\n" "$item" >&2 + gettext_printf $"Found Snapshot: %s\n" "$item" >&2 # fr: on crée un menu pour chaque snapshot présent (nom + date de création) # en: Create a menu for remaining snapshots (name + creation date) date_time=$($bindir/btrfs subvolume list -s / | $bindir/grep $item | $bindir/cut -d" " -f 11-12) echo " submenu '$prefixentry $item [$date_time]' {" # fr: si plusieurs kernel on été trouvé, on affiche un titre indicatif - # en: Display message if more than one kernel is found + # en: if more than one kernel is found, create a menu if [ ${#nkernel[*]} != 1 ]; then echo " submenu '---> Kernel: $kernel <---' { echo }"; fi # fr: on traite la variable de l'initramfs # en: Treat the initramfs variables (Translation unclear) for init in ${ninit[@]}; do # fr: on test si le(s) nom(s) du(des) initramfs existe(nt), autrement on affiche une erreur et on sort # en: Check the specified initramfs(es) exist, if it/they don't, display an error and exit - if [ ! -f /boot/$init ]; then echo "/boot/$init: Fichier inexistant" >&2; exit 1; fi + if [ ! -f /boot/$init ]; then gettext_printf $"Error: /boot/$init, initramfs does not exist" >&2; exit 1; fi # fr: on traite chaque entrée des snapshots avec leurs kernel et initramfs respectifs # en: Specify a kernel and initramfs for every snapshot echo "\ diff --git a/localisation/fr/grub-btrfs-git.mo b/localisation/fr/grub-btrfs-git.mo new file mode 100644 index 0000000000000000000000000000000000000000..3902c81cb63af55386d51ba98916a51c77e15661 GIT binary patch literal 318 zcmca7#4?ou2$+Fb28d07m=%b9fLI5J6M$G7hAa*S($}h4~&`-+GFVR=Y%*!m%Q2>!eiMeUT3Mu)i#R_@(B?_q(nZ+e& zinCLT@=|kj6d*LZTDSbtycC7tyu^ayjQkQS1=Zr1JTwE)ZOc;!Ta&6#kcg=m%{DZ( RFnbhAitRXqRz literal 0 HcmV?d00001