1
0
mirror of https://gitlab.com/JKANetwork/jka-toolkit.git synced 2026-02-26 23:13:48 +01:00

jkazip finished, spanish translation too

This commit is contained in:
JoseluCross
2016-06-17 11:03:56 +02:00
parent a32130cff7
commit 792e2fa440
4 changed files with 119 additions and 175 deletions

Binary file not shown.

View File

@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-06-09 15:19+0200\n"
"PO-Revision-Date: 2016-06-09 15:22+0200\n"
"POT-Creation-Date: 2016-06-17 10:55+0200\n"
"PO-Revision-Date: 2016-06-17 11:02+0200\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -18,128 +18,94 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: es\n"
#: jkazip:23 jkazip:29 jkazip:35 jkazip:41 jkazip:47 jkazip:54 jkazip:60
#: jkazip:66 jkazip:72 jkazip:78 jkazip:84 jkazip:90 jkazip:96 jkazip:102
msgid "%s has been decompressed"
msgstr "%s se ha descomprimido"
#: jkazip:16
msgid "File extension haven't been specified"
msgstr "La extensión del archivo no ha sido especificada"
#: jkazip:106 jkazip:269
msgid "Format %s unknown"
msgstr "Formato %s desconocido"
#: jkazip:33
msgid "File/s %s has/have been compressed in %s"
msgstr "El/Los archivo/s %s ha/n sido comprimidos en %s"
#: jkazip:112
#: jkazip:39
msgid "File %s has been decompressed"
msgstr "El archivo %s ha sido descomprimido"
#: jkazip:45
msgid "No option specified, use jkazip -h"
msgstr "Ninguna opción especificada, use jkazip -h"
#: jkazip:114
#: jkazip:47
msgid "\tsynopsis:\tjkazip <options> <file or directory>"
msgstr "\tsinopsis:\tjkazip <opciones> <archivo o directorio>"
#: jkazip:116
#: jkazip:49
msgid "\t-d,\t\tdecompress file"
msgstr "\t-d,\t\tdescomprimir archivo"
#: jkazip:117
msgid ""
"\t-f <format>,\tspecified format whe decompress, necessary only when the "
"name have more than one point before the file extension"
msgstr ""
"\t-f <formato>,\tespecifica el formato cuando descomprime, necesario solo "
"cuando el nombre tiene más de un punto antes de la extensión del archivo"
#: jkazip:50
msgid "\t-c <output file>,\tcompress file"
msgstr "\t-c <salida>,\tcomprimir archivo"
#: jkazip:118
msgid "\t-c <format>,\tcompress file"
msgstr "\t-c <formato>,\tcomprimir archivo"
#: jkazip:119
#: jkazip:51
msgid "\t-h,\t\tshow help box and exit"
msgstr "\t-h,\t\tmuestra la ayuda y termina"
#: jkazip:120
msgid "\t-v,\t\tshow version"
msgstr "\t-v,\t\tmuestra la versión"
#: jkazip:52
msgid "\t-v,\t\tshow version and exit"
msgstr "\t-v,\t\tmuestra la versión y termina"
#: jkazip:122
#: jkazip:54
msgid ""
"\tThe order must be \"jkazip -d [-f format] <file or directory>\" or "
"\"jkazip -c <format> <file or directory\""
"\tThe order must be \"jkazip -d <file>\" or \"jkazip -c <output> <files or "
"directories>\""
msgstr ""
"\tEl orden debe ser \"jkazip -d [-f formato] <archivo o directorio>\" o "
"\"jkazip -c <formato> <archivo o directorio>\""
"\tEl orden debe ser \"jkazip -d <archivo>\" o \"jkazip -c <salida> "
"<archivos o directorios>\""
#: jkazip:124
#: jkazip:56
msgid "\tExamples"
msgstr "\tEjemplos"
#: jkazip:125
msgid "\tjkazip -d -f \"tar.gz\" file.txt.tar.gz"
msgstr "\tjkazip -d -f \"tar.gz\" archivo.txt.tar.gz"
#: jkazip:126
#: jkazip:57
msgid "\tjkazip -d file.7z"
msgstr "\tjkazip -d archivo.7z"
#: jkazip:127
msgid "\tjkazip -c \"tar.xz\" directory"
msgstr "\tjkazip -c \"tar.xz\" directorio"
#: jkazip:58
msgid "\tjkazip -c ouputfile.tar.gz directory"
msgstr "\tjkazip -c salida.tar.gz directorio"
#: jkazip:129
msgid "\tSupported formats: tar, gzip, bzip2, xzip, lzip, 7z, zip and rar"
msgstr "\tFormatos soportados: tar, gzip, bzip2, xzip, lzip, 7z, zip y rar"
#: jkazip:130
#: jkazip:60
msgid ""
"\tOnly one file or directory (some formats don't support directories), for "
"more options use the each program individualy"
"\tSupported formats: tar, gzip, bzip2, xzip, lzip, 7z, rar (only unzip) and "
"zip"
msgstr ""
"\tSolo un fichero o directorio (algunos formatos no soportan directorios), "
"para mas opciones usar cada programa individualmente"
"\tFormatos soportados: tar, gzip, bzip2, xzip, lzip, 7z, rar (solo "
"descomprimir) y zip"
#: jkazip:133
#: jkazip:63
msgid "jkazip by JKA Network; version %s"
msgstr "jkazip por JKA Network; versión %s"
#: jkazip:137 jkazip:167
#: jkazip:67 jkazip:118
msgid "No file or directory specified"
msgstr "Ningún archivo o directorio especificado"
#: jkazip:143 jkazip:156
#: jkazip:70
msgid "File %s will be decompressed"
msgstr "El archivo %s será descomprimido"
#: jkazip:145 jkazip:176
#: jkazip:73 jkazip:125
msgid "%s no such file or directory"
msgstr "%s no existe el archivo o el directorio"
#: jkazip:153
msgid "Directory %s will be decompressed"
msgstr "El directorio %s será descomprimido"
#: jkazip:110 jkazip:168
msgid "File extension %s are not supported"
msgstr "La extensión de archivo %s no está soportada"
#: jkazip:159
msgid "%s no sush a file or directory"
msgstr "%s no existe el archivo o el directorio"
#: jkazip:170
msgid "The directory %s will be compressed"
msgstr "El directorio %s será comprimido"
#: jkazip:173
msgid "The file %s will be compressed"
msgstr "El archivo %s será comprimido"
#: jkazip:181
msgid "No format specified"
msgstr "Ningún formato especificado"
#: jkazip:185 jkazip:191 jkazip:197 jkazip:203 jkazip:209 jkazip:215 jkazip:221
#: jkazip:227 jkazip:233 jkazip:239 jkazip:245 jkazip:251 jkazip:257 jkazip:263
msgid "%s has been compressed"
msgstr "%s ha sido comprimido"
#: jkazip:267
msgid "Format rar are not supported for compression"
#: jkazip:165
msgid "rar compression are not supported"
msgstr "El formato rar no está soportado para la compresión"
#: jkazip:273
#: jkazip:173
msgid "Unknown option"
msgstr "Opción desconocida"

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-06-09 15:19+0200\n"
"POT-Creation-Date: 2016-06-17 11:01+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,122 +17,90 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: jkazip:23 jkazip:29 jkazip:35 jkazip:41 jkazip:47 jkazip:54 jkazip:60
#: jkazip:66 jkazip:72 jkazip:78 jkazip:84 jkazip:90 jkazip:96 jkazip:102
msgid "%s has been decompressed"
#: jkazip:16
msgid "File extension haven't been specified"
msgstr ""
#: jkazip:106 jkazip:269
msgid "Format %s unknown"
#: jkazip:33
msgid "File/s %s has/have been compressed in %s"
msgstr ""
#: jkazip:112
#: jkazip:39
msgid "File %s has been decompressed"
msgstr ""
#: jkazip:45
msgid "No option specified, use jkazip -h"
msgstr ""
#: jkazip:114
#: jkazip:47
msgid "\tsynopsis:\tjkazip <options> <file or directory>"
msgstr ""
#: jkazip:116
#: jkazip:49
msgid "\t-d,\t\tdecompress file"
msgstr ""
#: jkazip:117
msgid ""
"\t-f <format>,\tspecified format whe decompress, necessary only when the "
"name have more than one point before the file extension"
#: jkazip:50
msgid "\t-c <output file>,\tcompress file"
msgstr ""
#: jkazip:118
msgid "\t-c <format>,\tcompress file"
msgstr ""
#: jkazip:119
#: jkazip:51
msgid "\t-h,\t\tshow help box and exit"
msgstr ""
#: jkazip:120
msgid "\t-v,\t\tshow version"
#: jkazip:52
msgid "\t-v,\t\tshow version and exit"
msgstr ""
#: jkazip:122
#: jkazip:54
msgid ""
"\tThe order must be \"jkazip -d [-f format] <file or directory>\" or "
"\"jkazip -c <format> <file or directory\""
"\tThe order must be \"jkazip -d <file>\" or \"jkazip -c <output> <files or "
"directories>\""
msgstr ""
#: jkazip:124
#: jkazip:56
msgid "\tExamples"
msgstr ""
#: jkazip:125
msgid "\tjkazip -d -f \"tar.gz\" file.txt.tar.gz"
msgstr ""
#: jkazip:126
#: jkazip:57
msgid "\tjkazip -d file.7z"
msgstr ""
#: jkazip:127
msgid "\tjkazip -c \"tar.xz\" directory"
#: jkazip:58
msgid "\tjkazip -c ouputfile.tar.gz directory"
msgstr ""
#: jkazip:129
msgid "\tSupported formats: tar, gzip, bzip2, xzip, lzip, 7z, zip and rar"
msgstr ""
#: jkazip:130
#: jkazip:60
msgid ""
"\tOnly one file or directory (some formats don't support directories), for "
"more options use the each program individualy"
"\tSupported formats: tar, gzip, bzip2, xzip, lzip, 7z, rar (only unzip) and "
"zip"
msgstr ""
#: jkazip:133
#: jkazip:63
msgid "jkazip by JKA Network; version %s"
msgstr ""
#: jkazip:137 jkazip:167
#: jkazip:67 jkazip:118
msgid "No file or directory specified"
msgstr ""
#: jkazip:143 jkazip:156
#: jkazip:70
msgid "File %s will be decompressed"
msgstr ""
#: jkazip:145 jkazip:176
#: jkazip:73 jkazip:125
msgid "%s no such file or directory"
msgstr ""
#: jkazip:153
msgid "Directory %s will be decompressed"
#: jkazip:110 jkazip:168
msgid "File extension %s are not supported"
msgstr ""
#: jkazip:159
msgid "%s no sush a file or directory"
msgstr ""
#: jkazip:170
msgid "The directory %s will be compressed"
#: jkazip:165
msgid "rar compression are not supported"
msgstr ""
#: jkazip:173
msgid "The file %s will be compressed"
msgstr ""
#: jkazip:181
msgid "No format specified"
msgstr ""
#: jkazip:185 jkazip:191 jkazip:197 jkazip:203 jkazip:209 jkazip:215 jkazip:221
#: jkazip:227 jkazip:233 jkazip:239 jkazip:245 jkazip:251 jkazip:257 jkazip:263
msgid "%s has been compressed"
msgstr ""
#: jkazip:267
msgid "Format rar are not supported for compression"
msgstr ""
#: jkazip:273
msgid "Unknown option"
msgstr ""

View File

@@ -5,13 +5,18 @@
#Function decompress(); decompress the file whith the format especified
# gettext initialization
#export TEXTDOMAIN='jkazip'
#peroexport TEXTDOMAINDIR='/usr/share/locale'
export TEXTDOMAIN='jkazip'
export TEXTDOMAINDIR='/usr/share/locale'
#function sacaFormato, get the file extension to zip or unzip
function sacaFormato() {
local var=$1
cant=$(echo $var | grep -o "\." | wc -l)
if [ $cant -eq 0 ];then
echo "$(gettext "File extension haven't been specified")" > /dev/stderr
echo > /dev/stderr
exit
fi
fieldPost=$(expr $cant + 1)
postform=$(echo $var | cut -f$fieldPost -d".")
preform=$(echo $var | cut -f$cant -d".")
@@ -24,46 +29,48 @@ function sacaFormato() {
#Function msg, print in stdout a final message
function msg() {
local var=$1
printf -- "$(gettext "File/s %s has/have been compressed")" $var
local var2=$2
printf -- "$(gettext "File/s %s has/have been compressed in %s")" $var $var2
echo
}
#Function msg2, print in stdout a final message
function msg() {
function msg2() {
local var=$1
printf -- "$(gettext "File has been decompressed")" $var
printf -- "$(gettext "File %s has been decompressed")" $var
echo
}
version="1.1.0"
version="2.0.2"
if [ -z $1 ];then
error "$(gettext "No option specified, use jkazip -h")"
echo "$(gettext "No option specified, use jkazip -h")" > /dev/stderr
elif [ $1 = "-h" ];then
echo "$(gettext " synopsis: jkazip <options> <file or directory>")"
echo ""
echo "$(gettext " -d, decompress file")"
echo "$(gettext " -c <output file> <input file>, compress file")"
echo "$(gettext " -c <output file>, compress file")"
echo "$(gettext " -h, show help box and exit")"
echo "$(gettext " -v, show version and exit")"
echo ""
echo "$(gettext " The order must be \"jkazip -d <file or directory>\" or \"jkazip -c <format> <file or directory\"")"
echo "$(gettext " The order must be \"jkazip -d <file>\" or \"jkazip -c <output> <files or directories>\"")"
echo ""
echo "$(gettext " Examples")"
echo "$(gettext " jkazip -d file.7z")"
echo "$(gettext " jkazip -c ouputfile.tar.gz directory")"
echo ""
echo "$(gettext " Supported formats: tar, gzip, bzip2, xzip, lzip, 7z, zip and rar")"
echo "$(gettext " Only one file or directory (some formats don't support directories), for more options use the each program individualy")"
echo "$(gettext " Supported formats: tar, gzip, bzip2, xzip, lzip, 7z, rar (only unzip) and zip")"
echo ""
elif [ $1 = "-v" ];then
printf -- "$(gettext "jkazip by JKA Network; version %s")" "$version"
echo
elif [ $1 = "-d" ];then
if [ -z $2 ];then
error "$(gettext "No file or directory specified")"
echo "$(gettext "No file or directory specified")" > /dev/stderr
exit
elif [ -f $2 ];then
printf -- "$(gettext "File %s will be decompressed")" "$2"
echo
else
error "$(gettext "%s no such file or directory")" "$2"
echo "$(gettext "%s no such file or directory")" "$2" > /dev/stderr
echo
exit
fi
@@ -89,17 +96,19 @@ elif [ $1 = "-d" ];then
;;
"xz")
$formato -dk $entrada
msg $entrada
msg2 $entrada
;;
"bz2")
bzip2 -dk $entrada
msg $entrada
msg2 $entrada
;;
"rar")
unrar x $entrada
msg2 $entrada
;;
*)
error "$(gettext "File extension %s are not supported")" $formato
printf -- "$(gettext "File extension %s are not supported")" $formato > /dev/stderr
echo > /dev/stderr
;;
esac
@@ -113,7 +122,7 @@ elif [ $1 = "-c" ];then
do
if [[ $i != $1 && $i != $2 ]];then
if [ ! -d $i -a ! -f $i ];then
printf -- "$(gettext "%s no such file or directory")" "$3"
printf -- "$(gettext "%s no such file or directory")" "$i"
echo
exit
fi
@@ -129,36 +138,37 @@ elif [ $1 = "-c" ];then
case $formato in
"tar" | "tar.xz" | "tar.lz" | "tar.gz" | "tar.bz2" | "tgz" | "tbz" | "txz" | "tlz")
tar cvfa $salida $files
msg $files
msg $files $salida
;;
"7z")
7z a $salida $files
msg $files
msg $files $salida
;;
"zip")
zip $salida $files
msg $files
msg $files $salida
;;
"gz" | "lz")
formato="${formato}ip"
$formato -9kc $3 > $salida
msg $3
msg $3 $salida
;;
"xz")
$formato -9kc $3 > $salida
msg $3
msg $3 $salida
;;
"bz2")
$formato -9kc $3 > $salida
msg $3
msg $3 $salida
;;
"rar")
error "$(gettext "rar compression are not supported")"
echo "$(gettext "rar compression are not supported")" > /dev/stderr
;;
*)
error "$(gettext "File extension %s are not supported")" $formato
printf -- "$(gettext "File extension %s are not supported")" $formato > /dev/stderr
echo > /dev/stderr
;;
esac
else
echo "$(gettext "Unknown option")"
echo "$(gettext "Unknown option")" > /dev/stderr
fi