summarylogtreecommitdiffstats
path: root/translation_pt-br.patch
blob: 07a538889238ae1daf23a97484f770d3cb77bbe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
From dc4ffd7d235c2c0a2055ae29ebb0bce5ef4ec4f5 Mon Sep 17 00:00:00 2001
From: tioguda <guda.flavio@gmail.com>
Date: Tue, 10 Jul 2018 02:27:26 -0300
Subject: Translation into Portuguese of Brazil


diff --git a/opt/thefanclub/ddutility/ddutility.sh b/opt/thefanclub/ddutility/ddutility.sh
index 67c5ce6..7693ea8 100755
--- a/opt/thefanclub/ddutility/ddutility.sh
+++ b/opt/thefanclub/ddutility/ddutility.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# dd Utility version 1.5 - Linux/Ubuntu 
+# dd Utility version 1.5 - Linux/Ubuntu
 #
 # Write and Backup Operating System IMG and ISO files on Memory Card or Disk
 #
@@ -22,7 +22,7 @@
 # with this program.  If not, see <http://www.gnu.org/licenses/>.
 ### END LICENSE
 #
-### NOTES 
+### NOTES
 #
 # Dependencies : zenity zip xz gzip tar dd udevil
 #
@@ -37,15 +37,15 @@ version="1.5 beta"
 export LC_ALL=en_US.UTF-8
 mountpath="/media/$SUDO_USER"
 
-# Set Icon directory and file 
+# Set Icon directory and file
 iconfile="notification-device"
 
 # Read args
 if [ "$1" == "--Backup" ] ; then
   action="Backup"
 fi
-if [ "$1" == "--Restore" ] ; then
-  action="Restore"
+if [ "$1" == "--Restaurar" ] ; then
+  action="Restaurar"
 fi
 
 # Check if Disk Dev was dropped
@@ -58,13 +58,13 @@ if [ "$(dirname "$1")" == "$mountpath" ] ; then
    fi
 fi
 
-# Check if Restore file was dropped
+# Check if Restaurar file was dropped
 if [ -f "$1" ] ; then
   # Check extension if file
   extension=$( echo "${1##*.}" | tr '[:upper:]' '[:lower:]' )
   case "$extension" in
     img|iso|zip|gz|xz)
-      action="Restore"
+      action="Restaurar"
       imagepath=$1
       ;;
   esac
@@ -74,13 +74,13 @@ fi
 function filesizehuman () {
   filesize=$1
   if [ "$filesize" -gt 1000000000000 ] ; then
-    fsize="$( echo "scale=1; $filesize/1000000000000" | bc ) TB" 
+    fsize="$( echo "scale=1; $filesize/1000000000000" | bc ) TB"
   elif [ "$filesize" -gt 1000000000 ] ; then
-    fsize="$( echo "scale=1; $filesize/1000000000" | bc ) GB" 
+    fsize="$( echo "scale=1; $filesize/1000000000" | bc ) GB"
   elif [ "$filesize" -gt 1000000 ] ; then
-    fsize="$( echo "scale=1; $filesize/1000000" | bc ) MB" 
+    fsize="$( echo "scale=1; $filesize/1000000" | bc ) MB"
   elif [ "$filesize" -gt 1000 ] ; then
-    fsize="$( echo "scale=1; $filesize/1000" | bc ) KB" 
+    fsize="$( echo "scale=1; $filesize/1000" | bc ) KB"
   fi
   echo $fsize
 }
@@ -94,41 +94,41 @@ function progressmonitor () {
     # Backup Progress
     if [ "$action" == "Backup" ] ; then
       # img
-      if [ "$compression" == "No" ] ; then
+      if [ "$compression" == "Não" ] ; then
         # Calc progress with size of output file and disk dev size
         outputfilesize=$( du -b "$outputfile" | awk {'print $1'} )
       fi
       # zip
-      if [ "$compression" == "Yes" ] ; then
+      if [ "$compression" == "Sim" ] ; then
         # Calc progress for compressed backup using read offset on disk device and total size of disk
-        outputfilesize=$( lsof -o0 -o -e /run/user/1000/gvfs | grep "$inputfile" | awk {'print $7'} | cut -d 't' -f2 )         
-      fi      
+        outputfilesize=$( lsof -o0 -o -e /run/user/1000/gvfs | grep "$inputfile" | awk {'print $7'} | cut -d 't' -f2 )
+      fi
     fi
-    
-    # Restore Progress
-    if [ "$action" == "Restore" ] ; then
+
+    # Restaurar Progress
+    if [ "$action" == "Restaurar" ] ; then
         # Calc progress by using offset bytes on disk device and uncompressed size pf restore file
         outputfilesize=$( lsof -o0 -o -p $pid -e /run/user/1000/gvfs | grep "$outputfile" | awk {'print $7'} | cut -d 't' -f2 )
     fi
-       
+
     # Calc percentage of progress
     if [ "$outputfilesize" ] ; then
-      percentage=$(printf "%.0f" $( echo "scale=2; ($outputfilesize/$totalbytes)*100" | bc ))  
+      percentage=$(printf "%.0f" $( echo "scale=2; ($outputfilesize/$totalbytes)*100" | bc ))
     fi
-    
+
     # Wait for buffer to finish 
     if [ ! "$outputfilesize" ] && [ "$percentage" -gt 90 ] ; then
-      echo "# $action almost done..."
+      echo "# $action quase pronto..."
     fi
-    
+
     # Update progress bar
     echo "$percentage"
     sleep 1
-    
+
     # Check if process still active
     processactive=$( ps -p $pid -o pid= )
   done
-  echo "# $action Complete"
+  echo "# $action Completo"
   echo "$percentage"
 }
 
@@ -145,9 +145,9 @@ function getdevdisk () {
   countdev=$( echo $devdisks | wc -w )
   # Retry detection if no memcards found
   while [ $countdev -eq 0 ] ; do
-    notify-send --icon=$iconfile "$apptitle" "No Volumes Detected"
+    notify-send --icon=$iconfile "$apptitle" "Nenhum volume detectado"
     # Ask for redetect
-    zenity --question --title="$apptitle - $action" --text="<big><b>No Volumes Detected</b></big> \n\nInsert a memory card or removable storage and click Retry.\n\nSelect Cancel to Quit" --ok-label=Retry --cancel-label=Cancel 
+    zenity --question --title="$apptitle - $action" --text="<big><b>Nenhum volume detectado</b></big> \n\nInsira um cartão de memória ou armazenamento removível e clique em Repetir.\n\nSelecione Cancelar para Sair" --ok-label=Repetir --cancel-label=Cancelar --width=400 --height=100
     if [ ! $? -eq 0 ] ; then
       exit 1
     fi
@@ -162,7 +162,7 @@ function getdevdisk () {
     countdev=$( echo $devdisks | wc -w )
   done
 
-  # Generate Zenity Dialog 
+  # Generate Zenity Dialog
   devdisk=$(
   (
   # Generate list for Zenity
@@ -170,15 +170,15 @@ function getdevdisk () {
     do
       devitem=$( echo $devdisks | awk -v c=$c '{print $c}')
       drivesize=$( fdisk -l | grep "Disk\ $devitem\:" | cut -d "," -f2 | awk {'print $1'} | xargs )
-      drivesizehuman=$( filesizehuman $drivesize ) 
+      drivesizehuman=$( filesizehuman $drivesize )
       devicevendor=$(udevil --show-info $devitem | grep "vendor" | cut -d ":" -f2 | xargs)
       devicemodel=$(udevil --show-info $devitem | grep "model" | cut -d ":" -f2 | xargs)
       # echo output for zenity columns
-      echo "$drivesizehuman" ; echo "$devicevendor $devicemodel   " ; echo "$(basename $devitem)" 
+      echo "$drivesizehuman" ; echo "$devicevendor $devicemodel   " ; echo "$(basename $devitem)"
   done
 
-  ) | zenity --list --title="$apptitle - $action : Select memory card" \
-   --column="Volume" --column="Description" --column="Device" --print-column=3 --ok-label=Continue --width=400 --height=200 )
+  ) | zenity --list --title="$apptitle - $action" \
+   --text="Selecione o cartão de memória" --column="Volume" --column="Descrição" --column="Dispositivo" --print-column=3 --ok-label=Continue --cancel-label=Cancelar --width=400 --height=200 )
  
   # Return value if selected
   if [ $devdisk ] ; then
@@ -186,12 +186,12 @@ function getdevdisk () {
   fi
 }
 
-# Select Backup or Restore if not in args
+# Select Backup or Restaurar if not in args
 if [ ! "$action" ] ; then
-  response=$(zenity --question --text "\n<big>Select <b>Backup</b> to create an image file from a memory card or disk.\n\n\nSelect <b>Restore</b> to copy an image file to a memory card or disk.</big>\nSupported formats: img, iso, zip, gzip, xz\n\n\n\nWARNING - Use this program with caution. Data could be lost." --title "$apptitle $version" --ok-label=Restore --cancel-label=Backup  )
+  response=$(zenity --question --text "\n<big>Selecione <b>Backup</b> para criar um arquivo de imagem a partir de um cartão de memória ou disco.\n\n\nSelecione <b>Restaurar</b> para copiar um arquivo de imagem para um cartão de memória ou disco.</big>\nFormatos Suportados: img, iso, zip, gzip, xz\n\n\n\nAVISO - Use este programa com cuidado. Dados podem ser perdidos." --title "$apptitle $version" --ok-label=Restaurar --cancel-label=Backup --width=400 --height=100  )
 
   if [ $? -eq 0 ] ; then
-    action="Restore"
+    action="Restaurar"
   else
     action="Backup"
   fi
@@ -199,25 +199,25 @@ fi
 
 ### BACKUP : Select inputfile and outputfile
 if [ "$action" == "Backup" ] ; then
-  
+
   # Check if volume was dropped already
   if [ ! "$devdisk" ] ; then
     # Select Disk Volume
     devdisk=$( getdevdisk )
   fi
-   
+
   # Cancel if user selects Cancel
   if [ ! "$devdisk" ] ; then
-    notify-send --icon=$iconfile "$apptitle" "No Volumes Selected. $action Cancelled. "
+    notify-send --icon=$iconfile "$apptitle" "Nenhum volume selecionado. $action Cancelado. "
     exit 0
   fi
 
   # Get output filename and folder for backup image
-  imagepath=$(zenity --file-selection --filename=/home/$SUDO_USER/Desktop/ --save --confirm-overwrite --title="$apptitle - $action : Select the filename and folder for memory card image file" --file-filter="*.img *.IMG *.gz *.GZ" )
- 
+  imagepath=$(zenity --file-selection --filename=/home/$SUDO_USER/Desktop/ --save --confirm-overwrite --title="$apptitle - $action : Selecione o nome do arquivo e a pasta do arquivo de imagem do cartão de memória" --file-filter="*.img *.IMG *.gz *.GZ" )
+
   # Cancel if user selects Cancel
   if [ ! $? -eq 0 ] ; then
-    echo "$action Cancelled"
+    echo "$action Cancelado"
     exit 0
   fi
 
@@ -228,15 +228,15 @@ if [ "$action" == "Backup" ] ; then
   extension=$( echo "${filename##*.}" | tr '[:upper:]' '[:lower:]' )
   # Check if extension is already zip
   if [ "$extension" == "gz" ] ; then
-     compression="Yes"
+     compression="Sim"
   else
     # Ask for compression if not a zip file
-    zenity --question --title="$apptitle - $action" --text="<big><b>Compress the Backup image file?</b></big> \n\nThis can significantly reduce the space used by the backup." --ok-label=Yes --cancel-label=No --width=400 
+    zenity --question --title="$apptitle - $action" --text="<big><b>Comprimir o arquivo de imagem de backup?</b></big> \n\nIsso pode reduzir significativamente o espaço usado pelo backup." --ok-label=Sim --cancel-label=Não --width=400
 
     if [ $? -eq 0 ] ; then
-      compression="Yes"
+      compression="Sim"
     else
-      compression="No"
+      compression="Não"
     fi
   fi
 
@@ -247,17 +247,17 @@ if [ "$action" == "Backup" ] ; then
     outputfile="$outputfile.img"
   fi
   # Add zip for compressed backup
-  if [ "$compression" == "Yes" ] && [ "$extension" != "gz" ] ; then    
+  if [ "$compression" == "Sim" ] && [ "$extension" != "gz" ] ; then
     outputfile="$outputfile.gz"
   fi
 
   # Check if image file exists again
   if [ -f "$outputfile" ] && [ "$imagepath" != "$outputfile" ] ; then
-    zenity --question --title="$apptitle - $action" --text="<big><b>The file $(basename $outputfile) already exist.</b></big>\n\nSelect <b>Continue</b> to overwrite the file.\n\nSelect <b>Cancel</b> to Quit" --ok-label=Continue --cancel-label=Cancel --width=500 
-    
+    zenity --question --title="$apptitle - $action" --text="<big><b>O arquivo $(basename $outputfile) já existe.</b></big>\n\nSelecione <b>Continue</b> para substituir o arquivo.\n\nSelecione <b>Cancelar</b> para Sair" --ok-label=Continue --cancel-label=Cancelar --width=500
+
     # Cancel if user selects Cancel
     if [ ! $? -eq 0 ] ; then
-      echo "$action Cancelled"
+      echo "$action Cancelado"
       exit 0
     fi
 
@@ -269,16 +269,16 @@ fi
 
 
 ### RESTORE : Select image file and memcard location
-if [ "$action" == "Restore" ] ; then
+if [ "$action" == "Restaurar" ] ; then
 
   # Check if restore file was dropped as arg already
   if [ ! "$imagepath" ] ; then
     # Get image file location
-    imagepath=$(zenity --file-selection --filename=/home/$SUDO_USER/ --title="$apptitle - $action : Select image file to restore to memory card. Supported files : IMG, ISO, ZIP, GZ, XZ" --file-filter="*.img *.IMG *.iso *.ISO *.gz *.GZ *.xz *.XZ *.zip *.ZIP")
+    imagepath=$(zenity --file-selection --filename=/home/$SUDO_USER/ --title="$apptitle - $action : Selecione o arquivo de imagem para restaurar no cartão de memória. Arquivos suportados : IMG, ISO, ZIP, GZ, XZ" --file-filter="*.img *.IMG *.iso *.ISO *.gz *.GZ *.xz *.XZ *.zip *.ZIP")
  
     # Cancel if user selects Cancel
     if [ ! $? -eq 0 ] ; then
-      echo "$action Cancelled"
+      echo "$action Cancelado"
       exit 0
     fi
   fi
@@ -288,7 +288,7 @@ if [ "$action" == "Restore" ] ; then
    
   # Cancel if user selects Cancel
     if [ ! $devdisk ] ; then
-      echo "No Volumes Selected. $action Cancelled. "
+      echo "Nenhum volume selecionado. $action Cancelado. "
       exit 0
     fi
 
@@ -298,9 +298,9 @@ if [ "$action" == "Restore" ] ; then
   # Check if Compressed from extension
   extension=$( echo "${inputfile##*.}" | tr '[:upper:]' '[:lower:]' )
   if [ "$extension" == "gz" ] || [ "$extension" == "zip" ] || [ "$extension" == "xz" ]; then
-    compression="Yes"
+    compression="Sim"
   else
-    compression="No"
+    compression="Não"
   fi
 
 fi
@@ -317,17 +317,17 @@ if [ "$action" == "Backup" ] ; then
   totalbytes=$drivesize
   # Check available space left for backup
   outputspace=$( df $(dirname "$outputfile") | grep "\/dev\/" | awk {'print $4'} )
-  # Output of df is in 1024 K blocks 
+  # Output of df is in 1024 K blocks
   outputspace=$(( $outputspace * 1024 ))
 fi
-if [ "$action" == "Restore" ] ; then
+if [ "$action" == "Restaurar" ] ; then
   inputfilesize=$( du -b "$inputfile" | awk {'print $1'} )
   inputfilesizehuman=$( filesizehuman $inputfilesize )
   source="<big><b>$(basename "$inputfile")</b></big>"
   dest="<big><b>$drivesizehuman Volume</b></big>"
   outputfile=$devdisk
   outputspace=$drivesize
-  # Get uncompressed size of image restore files 
+  # Get uncompressed size of image restore files
   case "$extension" in
     img|iso)
        totalbytes=$inputfilesize
@@ -339,9 +339,9 @@ if [ "$action" == "Restore" ] ; then
        totalbytes=$( gzip -l "$inputfile" | tail -1 | awk '{print $2}')
        ;;
      xz)
-       totalbytes=$( xz -lv  "$inputfile" | grep "Uncompressed" | cut -d "(" -f2 | cut -d "B" -f1 | sed -e 's/[^0-9]*//g')
+       totalbytes=$( xz -lv  "$inputfile" | grep "Descomprimido" | cut -d "(" -f2 | cut -d "B" -f1 | sed -e 's/[^0-9]*//g')
        ;;
-  esac 
+  esac
 fi
 
 # Check sizes to find out if there is enough space to do backup or restore
@@ -349,20 +349,20 @@ if [ "$totalbytes" -gt "$outputspace" ] ; then
   sizedif=$(( $totalbytes - $outputspace ))
   sizedifhuman=$( filesizehuman $sizedif )
 
-  if [ "$compression" == "Yes" ] && [ "$action" == "Restore" ] ; then
-    compressflag=" uncompressed"
+  if [ "$compression" == "Sim" ] && [ "$action" == "Restaurar" ] ; then
+    compressflag=" descomprimido"
   fi
-  # Add Warning text 
-  warning="<b>WARNING: </b>The$compressflag ${action,,} file is <b>$sizedifhuman</b> too big to fit on the destination storage device. You can click Start to continue anyway, or select Cancel to Quit."
+  # Add Warning text
+  warning="<b>ATENÇÃO: </b>O arquivo$compressflag ${action,,} é <b>$sizedifhuman</b> mais grande para caber no dispositivo de armazenamento de destino. Você pode clicar em Iniciar para continuar mesmo assim ou selecionar Cancelar para Sair."
+
+fi
 
-fi 
-  
 ### Confirmation Dialog
-zenity --question --text="<big>Please confirm settings and click Start</big>\n\n\nSource \n$source \n\nDestination \n$dest \n\n\n$warning\n\n\n<b>NOTE: </b>All Data on the Destination will be deleted" --title "$apptitle - $action" --ok-label=Start --cancel-label=Cancel --width=580
+zenity --question --text="<big>Por favor, confirme as configurações e clique em Iniciar</big>\n\n\nFonte \n$source \n\nDestino \n$dest \n\n\n$warning\n\n\n<b>NOTE: </b>Todos os dados no destino serão excluídos" --title "$apptitle - $action" --ok-label=Iniciar --cancel-label=Cancelar --width=580
 
 # Cancel if user selects Cancel
 if [ ! $? -eq 0 ] ; then
-  echo "$action Cancelled"
+  echo "$action Cancelado"
   exit 0
 fi
 
@@ -377,26 +377,26 @@ partitions=$( df | grep -c $devdisk )
 
 # Cancel if unable to unmount
 if [ ! $partitions -eq 0 ] ; then
-  notify-send --icon=$iconfile "$apptitle" "Cannot Unmount $devdisk"
+  notify-send --icon=$iconfile "$apptitle" "Não é possível desmontar $devdisk"
   exit 0
 fi
 
 ### Start dd copy
-notify-send --icon=$iconfile "$apptitle" "$drivesizehuman Volume $action Started" 
+notify-send --icon=$iconfile "$apptitle" "$drivesizehuman Volume de $action Iniciado"
 
 # Backup
 if [ "$action" == "Backup" ] ; then
-  if [ "$compression" == "Yes" ] ; then
+  if [ "$compression" == "Sim" ] ; then
     # Compressed Backup to GZ file
     dd if="$inputfile" bs=1M | gzip > "$outputfile" &
   else
     # Normal dd uncompressed Backup
     dd if="$inputfile" of="$outputfile" bs=1M &
-  fi  
+  fi
 fi
 
 # Restore
-if [ "$action" == "Restore" ] ; then
+if [ "$action" == "Restaurar" ] ; then
   # IMG files
   if [ "$extension" == "img" ] || [ "$extension" == "iso" ] ; then
     dd if="$inputfile" of="$outputfile" bs=1M &
@@ -407,7 +407,7 @@ if [ "$action" == "Restore" ] ; then
   fi
   # ZIP files
   if [ "$extension" == "zip" ] ; then
-    unzip -p "$inputfile" | dd of="$outputfile" bs=1M &    
+    unzip -p "$inputfile" | dd of="$outputfile" bs=1M &
   fi
   # XZ files - OSX 10.10 only I think 
   if [ "$extension" == "xz" ] ; then
@@ -421,15 +421,15 @@ fi
 pid=$!
 
 # Monitor progress
-progresstext="$action in progress..."
-progressmonitor | zenity --progress --title="$apptitle - $drivesizehuman Volume $action" --width=400 --text="$progresstext" --ok-label=Done --no-cancel --auto-close
+progresstext="$action em progresso..."
+progressmonitor | zenity --progress --title="$apptitle - $action para Volume de $drivesizehuman" --width=400 --text="$progresstext" --ok-label=Feito --no-cancel --auto-close
 
 # check if job was cancelled 
 if [ ! $? -eq 0 ] ; then
-  notify-send --icon=$iconfile "$apptitle" "$drivesizehuman Volume $action Cancelled"
-  status="Cancelled"
+  notify-send --icon=$iconfile "$apptitle" "$action para Volume de $drivesizehuman Cancelado"
+  status="Cancelado"
 else
-  status="Complete"
+  status="Completo"
 fi
 
 # set permissions
@@ -439,9 +439,9 @@ fi
 
 # Copy Complete
 # Display Notifications
-notify-send --icon=$iconfile "$apptitle" "$drivesizehuman Volume $action $status"
+notify-send --icon=$iconfile "$apptitle" "$action para Volume de $drivesizehuman $status"
 
-zenity --info --title="$apptitle $version" --text="<big><b>$drivesizehuman Volume $action $status</b></big>" --ok-label=Done
+zenity --info --title="$apptitle $version" --text="<big><b>$action para Volume de $drivesizehuman $status</b></big>" --ok-label=Feito --width=400 --height=100
 
 # exit
-exit 0
\ No newline at end of file
+exit 0