Re: Biblioteca WEG
After using many find + sed commands and finish with kate editor I can change the font to Liberation Sans in Catanlan translation element directory but the diff to push to master was 2 X the entire size off collection like 145 Mio only the patch????!!!!!
[17:04:44] laurent@debian:~$ history | grep find
8596 find . -name "*.elmt" -exec sh -c sed -i'/font=/{n;s/Sans Serif,9,-1,5,50,0,0,0,0,0/Liberation Sans,9,-1,5,50,0,0,0,0,0,Regular/}'
8597 find . -name "*.elmt" -exec sh sed -i'/font=/{n;s/Sans Serif,9,-1,5,50,0,0,0,0,0/Liberation Sans,9,-1,5,50,0,0,0,0,0,Regular/}'
8670 find . -name "*.elmt" -exec sed -i -e 's/Sans Serif,10,-1,5,50,0,0,0,0,0/Liberation Sans,10,-1,5,50,0,0,0,0,0,Regular/g' {} \;
8671 find . -name "*.elmt" -exec sed -i -e 's/Sans Serif,8,-1,5,50,0,0,0,0,0/Liberation Sans,8,-1,5,50,0,0,0,0,0,Regular/g' {} \;
8672 find . -name "*.elmt" -exec sed -i -e 's/Sans Serif,7,-1,5,50,0,0,0,0,0/Liberation Sans,7,-1,5,50,0,0,0,0,0,Regular/g' {} \;
8673 find . -name "*.elmt" -exec sed -i -e 's/Sans Serif,6,-1,5,50,0,0,0,0,0/Liberation Sans,6,-1,5,50,0,0,0,0,0,Regular/g' {} \;
8674 find . -name "*.elmt" -exec sed -i -e 's/Sans Serif,5,-1,5,50,0,0,0,0,0/Liberation Sans,5,-1,5,50,0,0,0,0,0,Regular/g' {} \;
8734 find . -name "*.elmt" -exec sed -i -e 's/Sans Serif,5,-1,5,50,0,0,0,0,0,normal/Liberation Sans,5,-1,5,50,0,0,0,0,0,Regular/g' {} \;
.....................
https://download.qelectrotech.org/qet/s … onts.patch
What interests us is just extracting the Catalan translation strings from the diff.
See Xavier script's perl here: https://download.qelectrotech.org/qet/scripts/
BTW, we used these this perl scripts 15 years ago, now my memory fails me.
Note regarding the translation of elements: do not use the QET editor, but manually edit the elmt file using a text editor and add your country tag to the XLM file. Use spaces rather than tabs for alignment.
If you are using the QET Qt 5 editor, XML attributes will be saved randomly by default. This is a requirement requested by some to Qt 's team to avoid hacks, but in our case, the diff file is very large and incomprehensible...
Example:
<definition hotspot_x="35" hotspot_y="25" version="0.100.0" type="element" height="50" width="70" link_type="simple">
<uuid uuid="{2b9f2e91-da08-497d-b065-bd2d68d716d9}"/>
<names>
<name lang="ca">Filtre</name>
<name lang="fr">Filtre</name>
<name lang="en">Filter</name>
<name lang="es">Filtro</name>
<name lang="nl">Filter</name>
<name lang="it">Filtro</name>
<name lang="ar">مُرشّح</name>
<name lang="pl">Filtr</name>
<name lang="cs">Filtr</name>
<name lang="el">Φίλτρο</name>
</names>
<elementInformations/>
