<div dir="ltr">Hola:<div><br></div><div>Adjunto otro script de correcciones automáticas, que añade diversas comas donde debería haberlas. Lo he probado con todos los mensajes de la rama trunk y funciona perfectamente.</div>
<div><br></div><div>Saludos, Javier</div><div><br></div><div><div>#!/bin/bash</div><div># </div><div># Corrección automática de errores en las traducciones.</div><div># El primer parámetro es la rama ('branches/stable' o 'trunk').</div>
<div># El segundo parámetro es el tipo ('messages' o 'docmessages').</div><div># Es conveniente redireccionar la salida a un archivo.</div><div>#</div><div>PROGRAMA=~/svnroot/pology/scripts/posieve.py</div>
<div>RAIZ=~/svnroot-cop</div><div>IDIOMA=es</div><div>OPCION=find-messages</div><div>PARAMETROS="-s accel:& -s case"</div><div>#-s filter:remove/remove-literals-text -s filter:remove/remove-marlits-text -s filter:remove/remove-fmtdirs-text -s filter:remove/remove-markup-text"</div>
<div><br></div><div># Corrección de errores: comas que faltan</div><div>P[0]="(?<=\bSí\b)\s(?=\w)"<span class="" style="white-space:pre">  </span>R[0]=", "</div><div>P+=("(?<=\b[Ee]s\sdecir\b)\s(?=\w)")<span class="" style="white-space:pre">       </span>R+=(", ")</div>
<div>P+=("(?<=\b[Ee]n\sfin\b)\s(?=\w)")<span class="" style="white-space:pre">     </span>R+=(", ")</div><div>P+=("(?<=\b[Pp]or\súltimo\b)\s(?=\w)")<span class="" style="white-space:pre">    </span>R+=(", ")</div>
<div>P+=("(?<=\b[Oo]\ssea\b)\s(?=\w)")<span class="" style="white-space:pre">      </span>R+=(", ")</div><div>P+=("(?<=\b[Pp]or\sconsiguiente\b)\s(?=\w)")<span class="" style="white-space:pre">       </span>R+=(", ")</div>
<div>P+=("(?<=\b[Ss]in\sembargo\b)\s(?=\w)")<span class="" style="white-space:pre">        </span>R+=(", ")</div><div>P+=("(?<=\b[Nn]o\sobstante\b)\s(?=\w)")<span class="" style="white-space:pre">    </span>R+=(", ")</div>
<div>P+=("(?<=\b[Aa]demás\b)\s(?!del?\b)")<span class="" style="white-space:pre"> </span>R+=(", ")</div><div>P+=("(?<=\b[Ee]n\stal\scaso\b)\s(?=\w)")<span class="" style="white-space:pre">   </span>R+=(", ")</div>
<div>P+=("(?<=\b[Pp]or\slo\stanto\b)\s(?=\w)")<span class="" style="white-space:pre">      </span>R+=(", ")</div><div>P+=("(?<=\b[Ee]n\scambio\b)\s(?=\w)")<span class="" style="white-space:pre">      </span>R+=(", ")</div>
<div>P+=("(?<=\b[Ee]n\sprimer\slugar\b)\s(?=\w)")<span class="" style="white-space:pre">   </span>R+=(", ")</div><div>P+=("(?<=\bHola\b)\s(?=\w)")<span class="" style="white-space:pre">       </span>R+=(", ")</div>
<div>P+=("(?<=\bGeneralmente\b)\s(?=\w)")<span class="" style="white-space:pre">   </span>R+=(", ")</div><div>P+=("(?<=\bPosiblemente\b)\s(?=\w)")<span class="" style="white-space:pre">       </span>R+=(", ")</div>
<div>P+=("(?<=\bEfectivamente\b)\s(?=\w)")<span class="" style="white-space:pre">  </span>R+=(", ")</div><div>P+=("(?<=\bFinalmente\b)\s(?=\w)")<span class="" style="white-space:pre"> </span>R+=(", ")</div>
<div>P+=("(?<=\bEn\sdefinitiva\b)\s(?=\w)")<span class="" style="white-space:pre"> </span>R+=(", ")</div><div>P+=("(?<=\bPor\sregla\sgeneral\b)\s(?=\w)")<span class="" style="white-space:pre">        </span>R+=(", ")</div>
<div>P+=("(?<=\bQuizá\b)\s(?=\w)")<span class="" style="white-space:pre"> </span>R+=(", ")</div><div><br></div><div>P+=("(?<=\w)\s(?=\bo\sbien\b)")<span class="" style="white-space:pre">   </span>R+=(", ")</div>
<div>P+=("(?<=\w)\s(?=\bo\ssea\b)")<span class="" style="white-space:pre"> </span>R+=(", ")</div><div>P+=("(?<=\w)\s(?=\bexcepto\b)")<span class="" style="white-space:pre">    </span>R+=(", ")</div>
<div>P+=("(?<=[b-z0-9])\s(?=\bsalvo\b)")<span class="" style="white-space:pre">    </span>R+=(", ")</div><div>P+=("(?<=\w)\s(?=\bconque\b)")<span class="" style="white-space:pre">     </span>R+=(", ")</div>
<div>P+=("(?<=\w)\s(?=\basí\scomo\b)")<span class="" style="white-space:pre">     </span>R+=(", ")</div><div>P+=("(?<=\w)\s(?=\basí\sque\b)")<span class="" style="white-space:pre">  </span>R+=(", ")</div>
<div>P+=("(?<=\w)\s(?=\bde\smanera\sque\b)")<span class="" style="white-space:pre">        </span>R+=(", ")</div><div>P+=("(?<=\w)\s(?=\bes\sdecir\b)")<span class="" style="white-space:pre">  </span>R+=(", ")</div>
<div>P+=("(?<=[b-z0-9])\s(?=\ba\ssaber\b)")<span class="" style="white-space:pre"> </span>R+=(", ")</div><div>P+=("(?<=\w)\s(?=\bpues\sbien\b)")<span class="" style="white-space:pre"> </span>R+=(", ")</div>
<div>P+=("(?<=\w)\s(?=\bahora\sbien\b)")<span class="" style="white-space:pre">    </span>R+=(", ")</div><div>P+=("(?<=\w)\s(?=\ben\sprimer\slugar\b)")<span class="" style="white-space:pre">  </span>R+=(", ")</div>
<div>P+=("(?<=\w)\s(?=\bpor\sotro\slado\b)")<span class="" style="white-space:pre">        </span>R+=(", ")</div><div>P+=("(?<=\w)\s(?=\bpor\sun\slado\b)")<span class="" style="white-space:pre">      </span>R+=(", ")</div>
<div>P+=("(?<=\w)\s(?=\bpor\suna\sparte\b)")<span class="" style="white-space:pre">        </span>R+=(", ")</div><div>P+=("(?<=\w)\s(?=\bpor\sotra\sparte\b)")<span class="" style="white-space:pre">   </span>R+=(", ")</div>
<div>P+=("(?<=\w)\s(?=\ben\sfin\b)")<span class="" style="white-space:pre">        </span>R+=(", ")</div><div>P+=("(?<=\w)\s(?=\bpor\súltimo\b)")<span class="" style="white-space:pre">       </span>R+=(", ")</div>
<div>P+=("(?<=\w)\s(?=\bademás\b)")<span class="" style="white-space:pre">        </span>R+=(", ")</div><div>P+=("(?<=\w)\s(?=\ben\sconclusión\b)")<span class="" style="white-space:pre">    </span>R+=(", ")</div>
<div>P+=("(?<=\w)\s(?=\ben\stal\scaso\b)")<span class="" style="white-space:pre">  </span>R+=(", ")</div><div>P+=("(?<=\w)\s(?=\bsin\sembargo\b)")<span class="" style="white-space:pre">       </span>R+=(", ")</div>
<div>P+=("(?<=\w)\s(?=\bexcepto\b)")<span class="" style="white-space:pre">        </span>R+=(", ")</div><div>P+=("(?<=\w)\s(?=\bsino\s[^a]\b)")<span class="" style="white-space:pre"> </span>R+=(", ")</div>
<div>P+=("(?<=\w)\s(?=\bno\sobstante\b)")<span class="" style="white-space:pre">   </span>R+=(", ")</div><div>P+=("(?<=\w)\s(?=\bpor\sejemplo\b)")<span class="" style="white-space:pre">       </span>R+=(", ")</div>
<div>P+=("(?<=\w)\s(?=\bp\.\sej\.)")<span class="" style="white-space:pre">        </span>R+=(", ")</div><div>P+=("(?<=\w)\s(?=\bpor\sel\scontrario\b)")<span class="" style="white-space:pre"> </span>R+=(", ")</div>
<div>P+=("(?<=\w)\s(?=\bpor\sotro\slado\b)")<span class="" style="white-space:pre">        </span>R+=(", ")</div><div>P+=("(?<=\w)\s(?=\ben\scambio\b)")<span class="" style="white-space:pre"> </span>R+=(", ")</div>
<div>P+=("(?<=\w)\s(?=\befectivamente\b)")<span class="" style="white-space:pre">  </span>R+=(", ")</div><div>P+=("(?<=\w)\s(?=\bfinalmente\b)")<span class="" style="white-space:pre"> </span>R+=(", ")</div>
<div>P+=("(?<=\w)\s(?=\bgeneralmente\b)")<span class="" style="white-space:pre">   </span>R+=(", ")</div><div>P+=("(?<=\w)\s(?=\bnaturalmente\b)")<span class="" style="white-space:pre">       </span>R+=(", ")</div>
<div>P+=("(?<=\w)\s(?=\bpor\sregla\sgeneral\b)")<span class="" style="white-space:pre">    </span>R+=(", ")</div><div>P+=("(?<=\w)\s(?=\bhola\b)")<span class="" style="white-space:pre">       </span>R+=(", ")</div>
<div>P+=("(?<=\w)\s(?=\bpero\b)")<span class="" style="white-space:pre">   </span>R+=(", ")</div><div><br></div><div>if [[ $1 != '' ]]; then</div><div>  RAMA=$1</div><div>else</div><div>  echo "Debe poner la rama ('branches/stable' o 'trunk') como primer parámetro"</div>
<div>  exit</div><div>fi</div><div><br></div><div>if [[ $2 != '' ]]; then</div><div>  TIPO=$2</div><div>else</div><div>  echo "Debe poner el tipo ('messages' o 'docmessages') como segundo parámetro"</div>
<div>  exit</div><div>fi</div><div><br></div><div>echo "Iniciando...:" $RAMA $TIPO</div><div>ORIGEN=$RAIZ/$RAMA/l10n-kde4/$IDIOMA/$TIPO</div><div>for PAQUETE in $ORIGEN/*; do</div><div>    if [ -d $PAQUETE ]; then</div>
<div><span class="" style="white-space:pre">    </span>echo "Procesando...:" $PAQUETE</div><div><span class="" style="white-space:pre">   </span>for ((I=0; I<${#P[@]}; I++)); do</div><div><span class="" style="white-space:pre">        </span>    # echo "Analizando...:" "${P[$I]}"</div>
<div><span class="" style="white-space:pre">    </span>    $PROGRAMA '-bR' $OPCION $PARAMETROS -s msgstr:"${P[$I]}" -s replace:"${R[$I]}" $PAQUETE</div><div><span class="" style="white-space:pre">  </span>done</div>
<div>    fi</div><div>done</div></div><div><br></div></div>