<div dir="ltr"><div><div><div><div>Buenas noches:<br><br></div>He creado un nuevo script que fundamentalmente une a la palabra siguiente los prefijos que están indebidamente separados de ella (por espacio o guion).<br><br>
</div>Está probado exhaustivamente con toda la rama trunk, por lo que no contiene errores.<br><br></div>He dejado una copia en la carpeta «Scripts» de mi Dropbox y en el repositorio de KDE «pology/lang/es/scripts».<br><br>
</div><div>Le envío a Eloy como adjuntos el resultado con una de mis últimas pruebas<br></div><br>Saludos, Javier<br><div><br><div>#!/bin/bash<br># <br># Corrección automática de errores en las traducciones.<br># El primer parámetro es la rama ('branches/stable' o 'trunk').<br>
# El segundo parámetro es el tipo ('messages' o 'docmessages').<br># Es conveniente redireccionar la salida a un archivo.<br>#<br>PROGRAMA=~/svnroot/pology/scripts/posieve.py<br>RAIZ=~/svnroot-cop<br>IDIOMA=es<br>
OPCION=find-messages<br>PARAMETROS="-s accel:& -s case"<br>#-s filter:remove/remove-literals-text -s filter:remove/remove-marlits-text -s filter:remove/remove-fmtdirs-text -s filter:remove/remove-markup-text"<br>
<br># Corrección de errores con prefijos y sufijos<br>P[0]="(?<=[^=.:_-]\b[Aa]nte)\-(?!(\W|[A-Z0-9]))" R[0]=""<br>P+=("(?<=[^=.:_-]\b[Aa]nti)\-(?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=[^=.:_-]\b[Aa]rchi)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Aa]uto)\-(?!(\W|[A-Z0-9]|configure|insert|center|key))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Bb]i)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=[^=.:_-]\b[Bb]ien)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Cc]o)[\s-](?!(\W|[A-Z0-9]|uk|repository|comment|module|vendortag|releasetag|id))") R+=("")<br>
P+=("(?<=[^=.:_-]\b[Cc]on)\-(?!(\W|[A-Z0-9]|nombre))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Cc]ontra)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Cc]uasi)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=[^=.:_-]\b[Dd]es)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Ee]pi)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Ee]qi)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=[^=.:_-]\b[Ee]x)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Ee]xtra)\-(?!(\W|[A-Z0-9]|book|condensed))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Ff]oto)\-(?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=[^=.:_-]\bgeo)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Hh]emi)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Hh][ií]per)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=[^=.:_-]\b[Ii]m)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Ii]n)[\s-](?!(\W|[A-Z0-9]|fraganti|situ|source|binary|advance|other|range|re\b|your|days|any|the|gst|place|most))") R+=("")<br>
P+=("(?<=[^=.:_-]\b[Ii]nfra)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Ii]nter)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Ii]ntra)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=[^=.:_-]\b[Mm]acro)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Mm]axi)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Mm]ega)\-(?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=[^=.:_-]\b[Mm]eta)\-(?!(\W|[A-Z0-9]|language))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Mm]icro)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Mm]ini)\-(?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=[^=.:_-]\b[Mm]ono)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Mm]ulti)[\s-](?!(\W|[A-Z0-9]|tab|y\b))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Nn]eo)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=[^=.:_-]\b[Pp]eri)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Pp]luri)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Pp]oli)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=[^=.:_-]\b[Pp]os)[\s-](?!(\W|[A-Z0-9]|[xyz]|especifica))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Pp]ost)[\s-](?!(\W|[A-Z0-9]|and))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Pp]re)[\s-](?!(\W|[A-Z0-9]|wrap|[yo]\spos))") R+=("")<br>
P+=("(?<=[^=.:_-]\b[Pp]ro)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Rr]e)[\s-](?!(\W|[A-Z0-9]|mayor|menor|bemol|sostenido))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Rr]etro)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=[^=.:_-]\b[Ss]emi)[\s-](?!(\W|[A-Z0-9]|bold|condensed))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Ss]eudo)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Ss]im)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=[^=.:_-]\b[Ss]in)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Ss]obre)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Ss]ub)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=[^=.:_-]\b[Ss][uú]per)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Ss]upra)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Tt]ele)\-(?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=[^=.:_-]\b[Tt]rans)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Tt]ras)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Tt]ri)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=[^=.:_-]\b[Uu]ltra)[\s-](?!(\W|[A-Z0-9]|expanded))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Uu]ni)[\s-](?!(\W|[A-Z0-9]|freiburg|kl))") R+=("")<br>P+=("(?<=[^=.:_-]\b[Vv]ice)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
<br>P+=("(?<=^[Aa]nte)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Aa]nti)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Aa]rchi)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=^[Aa]uto)\-(?!(\W|[A-Z0-9]|configure|center|insert|key))") R+=("")<br>P+=("(?<=^[Bb]i)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Bb]ien)\-(?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=^[Cc]o)[\s-](?!(\W|[A-Z0-9]|uk|repository|comment|module|vendortag|releasetag|id))") R+=("")<br>P+=("(?<=^[Cc]on)\-(?!(\W|[A-Z0-9]|nombre))") R+=("")<br>P+=("(?<=^[Cc]ontra)\-(?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=^[Cc]uasi)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Dd]es)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Ee]pi)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=^[Ee]qi)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Ee]x)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Ee]xtra)\-(?!(\W|[A-Z0-9]|book|condensed))") R+=("")<br>
P+=("(?<=^[Ff]oto)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Gg]eo)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Hh]emi)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=^[Hh][ií]per)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Ii]m)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Ii]n)[\s-](?!(\W|[A-Z0-9]|fraganti|situ|source|binary|advance|other|range|re\b|your|days|any|the|gst|place|most))") R+=("")<br>
P+=("(?<=^[Ii]nfra)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Ii]nter)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Ii]ntra)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=^[Mm]acro)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Mm]axi)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Mm]ega)\-(?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=^[Mm]eta)\-(?!(\W|[A-Z0-9]|language))") R+=("")<br>P+=("(?<=^[Mm]icro)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Mm]ini)\-(?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=^[Mm]ono)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Mm]ulti)[\s-](?!(\W|[A-Z0-9]|tab|y\b))") R+=("")<br>P+=("(?<=^[Nn]eo)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=^[Pp]eri)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Pp]luri)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Pp]oli)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=^[Pp]os)[\s-](?!(\W|[A-Z0-9]|[xyz]|especifica))") R+=("")<br>P+=("(?<=^[Pp]ost)[\s-](?!(\W|[A-Z0-9]|and))") R+=("")<br>P+=("(?<=^[Pp]re)[\s-](?!(\W|[A-Z0-9]|wrap|[yo]\spos))") R+=("")<br>
P+=("(?<=^[Pp]ro)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Rr]e)[\s-](?!(\W|[A-Z0-9]|mayor|menor|bemol|sostenido))") R+=("")<br>P+=("(?<=^[Rr]etro)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=^[Ss]emi)[\s-](?!(\W|[A-Z0-9]|bold|condensed))") R+=("")<br>P+=("(?<=^[Ss]eudo)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Ss]im)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=^[Ss]in)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Ss]obre)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Ss]ub)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=^[Ss][uú]per)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Ss]upra)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Tt]ele)\-(?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=^[Tt]rans)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Tt]ras)\-(?!(\W|[A-Z0-9]))") R+=("")<br>P+=("(?<=^[Tt]ri)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
P+=("(?<=^[Uu]ltra)[\s-](?!(\W|[A-Z0-9]|expanded))") R+=("")<br>P+=("(?<=^[Uu]ni)[\s-](?!(\W|[A-Z0-9]|freiburg|kl))") R+=("")<br>P+=("(?<=^[Vv]ice)[\s-](?!(\W|[A-Z0-9]))") R+=("")<br>
<br>P+=("\bpos(?=s\w+\b)") R+=("post")<br>P+=("\bPos(?=s\w+\b)") R+=("Post")<br>P+=("\bpost(?!(\W|[A-Z0-9]|[aeiours]|gre|fix|script))") R+=("pos") <br>P+=("\bPost(?!(\W|[A-Z0-9]|[aeiours]|gre|fix|script))") R+=("Pos")<br>
<br>P+=("(?<=\w)\-(?=mente\b)") R+=("")<br><br>P+=("\bmetadados\b") R+=("metadatos")<br>P+=("\bMetadados\b") R+=("Metadatos")<br>P+=("\binporcentaje\b") R+=("un porcentaje")<br>
P+=("\bincaso\b") R+=("un caso")<br>P+=("\bsubmenúes\b") R+=("submenús")<br>P+=("\binel\b") R+=("en el")<br>P+=("\bdesesta\b") R+=("de esta")<br>
P+=("\bpostsible\b") R+=("possible")<br>P+=("\bantialiasing\b") R+=("suavizado de bordes")<br>P+=("\bAntialiasing\b") R+=("Suavizado de bordes")<br>P+=("\bPresilo\b") R+=("Pre-Silo")<br>
P+=("\bRepag\b") R+=("Re Pág")<br><br>if [[ $1 != '' ]]; then<br> RAMA=$1<br>else<br> echo "Debe poner la rama ('branches/stable' o 'trunk') como primer parámetro"<br>
exit<br>fi<br><br>if [[ $2 != '' ]]; then<br> TIPO=$2<br>else<br> echo "Debe poner el tipo ('messages' o 'docmessages') como segundo parámetro"<br> exit<br>fi<br><br>echo "Iniciando...:" $RAMA $TIPO<br>
ORIGEN=$RAIZ/$RAMA/l10n-kde4/$IDIOMA/$TIPO<br>for PAQUETE in $ORIGEN/*; do<br> if [ -d $PAQUETE ]; then<br> echo "Procesando...:" $PAQUETE<br> for ((I=0; I<${#P[@]}; I++)); do<br> # echo "Analizando...:" "${P[$I]}"<br>
$PROGRAMA '-bR' $OPCION $PARAMETROS -s msgstr:"${P[$I]}" -s replace:"${R[$I]}" $PAQUETE<br> done<br> fi<br>done<br><br><br></div></div></div>