1 (edited by plc-user 2023-12-08 19:13:30)

Topic: Second User-Collection

Salut Laurent,
Hallo alle anderen!

Der Wunsch nach einer zweiten Benutzer-Sammlung und Joshuas Bemerkung im Thread https://qelectrotech.org/forum/viewtopic.php?id=2105, dass die Implementierung gar nicht so schwer sein sollte, hat mich dazu veranlasst, eine virtuelle Debian-Maschine aufzusetzen und darauf alles zu installieren, was benötigt wird, um ein QT-Projekt zu erstellen bzw. zu übersetzen.
Das alleine war schon "hakelig", es hat aber dann doch geklappt, die QET-Quellen in qtcreator zu laden und zu compilieren.
Dann habe ich angefangen, die Dateien zu suchen, wo mit den Sammlungen gearbeitet wird und habe an allen Stellen, die ich gefunden habe, eine "Firmen-Sammlung" eingebaut.

Das funktioniert aus meiner Sicht schon sehr gut!

An ein paar Stellen benötige ich aber Hilfe von QT- und QET-Spezialisten:

  • Im Einstellungs-Dialog wird der ausgewählte Pfad der Firmen-Sammlung nicht sofort übernommen, sodaß es nötig ist, QET neu zu starten, um die Änderung zu übernehmen. Es reicht nicht aus, die Sammlungen neu zu laden.

  • Die Sprach-Dateien werden nicht aktualisiert, sodass im Moment nur die im Quellcode vorhandenen Vorgabe-Texte für die Firmen-Sammlung im Programm erscheinen. (Dies scheint ein Problem mit Einstellungen von QT-Creator oder QT-Linguist zu sein.)

Im Anhang findet ihr die diff-Datei, die zusätzlich erstellten Icons und eine qtcreator-ProjektDatei im XML-Format.

Es wäre schön, wenn sich jemand finden würde, der mit mir die letzten paar Schritte bis zu einer vollständig funktionierenden Lösung gehen würde! 

Gruß
  plc-user


EDIT (2x): Ein Punkt von der Liste ist gestrichen: Löschen funktioniert! DIFF ersetzt.

-------------------------


Le désir d'une deuxième collection d'utilisateurs et la remarque de Joshua dans le fil https://qelectrotech.org/forum/viewtopic.php?id=2105 que l'implémentation ne devrait pas être si difficile que ça m'ont poussé à mettre en place une machine virtuelle Debian et à y installer tout ce qui est nécessaire pour créer ou compiler un projet QT.

Rien que ça, c'était déjà "hardcore", mais j'ai quand même réussi à charger les sources de QET dans qtcreator et à les compiler.

Ensuite, j'ai commencé à chercher les fichiers où l'on travaille avec les collections et j'ai intégré une "collection d'entreprise" à tous les endroits que j'ai trouvés.

De mon point de vue, cela fonctionne déjà très bien !

Mais à certains endroits, j'ai besoin de l'aide de spécialistes QT et QET :

  • Dans la boîte de dialogue des paramètres, le chemin sélectionné pour la collection d'entreprises n'est pas immédiatement pris en compte, de sorte qu'il est nécessaire de redémarrer QET pour appliquer la modification. Il ne suffit pas de recharger les collections.

  • Les fichiers de langue ne sont pas mis à jour, de sorte que pour le moment, seuls les textes par défaut présents dans le code source pour la collection d'entreprise apparaissent dans le programme. (Cela semble être un problème avec les réglages de QT-Creator ou QT-Linguist).

En annexe, vous trouverez le fichier diff, les icônes supplémentaires créées et un fichier de projet qtcreator au format XML.

Ce serait bien s'il y avait quelqu'un pour faire les dernières étapes avec moi jusqu'à une solution qui fonctionne complètement ! 

EDIT (2x) : Un élément de la liste a été supprimé : Supprimer fonctionne ! DIFF remplacé.

-------------------------


The idea of a second user collection and Joshua's comment in the https://qelectrotech.org/forum/viewtopic.php?id=2105 thread that the implementation shouldn't be that difficult prompted me to set up a virtual Debian machine and install everything needed to create or compile a QT project.
That alone was "tricky", but I managed to load the QET sources into qtcreator and compile them.
Then I started looking for the files where the collections are used and added a "company collection" in all the places I found.

In my opinion, this already works very well!

However, I need help from QT and QET specialists in a few places:

  • In the settings dialogue, the selected path of the company collection is not applied immediately, so that it is necessary to restart QET to apply the change. It is not sufficient to reload the collections.

  • The language files are not updated, so at the moment only the default texts for the company collection in the source code appear in the programme. (This seems to be a problem with the settings of QT-Creator or QT-Linguist).

Attached you will find the diff file, the additionally created icons and a qtcreator project file in XML format.

It would be great if someone could be found who would take the last few steps with me to a fully functioning solution!

EDIT (2x): One item from the list has been deleted: Delete works! DIFF replaced.

Post's attachments

Bildschirmfoto_QET_mit_Company-Sammlung.png, 52.82 kb, 829 x 272
Bildschirmfoto_QET_mit_Company-Sammlung.png 52.82 kb, 33 downloads since 2023-12-08 

Attachment icon icons.zip 1.77 kb, 35 downloads since 2023-12-08 

Attachment icon qelectrotech.pro.user.gz 1.99 kb, 33 downloads since 2023-12-08 

Attachment icon qet-Company-Collection.diff.gz 4.69 kb, 31 downloads since 2023-12-08 

Re: Second User-Collection

About the not updated language files:

Does anybody know how to solve this error?

Starte externes Werkzeug "/usr/lib/qt6/bin/lupdate /home/ich/Projekte/c_c++/QET/qelectrotech.pro"
WARNING: Could not find qmake spec 'default'.

"/usr/lib/qt6/bin/lupdate" mit Fehler beendet

Re: Second User-Collection

Hallo Plc-user

https://qelectrotech.org/wiki_new/doc/t … urce_files

On terminal under QET git directory:

sed -i 's/^TRANSLATIONS/#TRANSLATIONS/g' qelectrotech.pro
lupdate -noobsolete qelectrotech.pro -ts lang/qet_{en,es,ru,pt,cs,pl,ca,de,ro,it,ar,sl,hr,el,nl,be,sl,zh,hu,pt_br,da,sr,fr,tr,sk,nb,mn,ja,cn,uk,zh-cn}.ts
sed -i 's/^#TRANSLATIONS/TRANSLATIONS/g' qelectrotech.pro

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: Second User-Collection

laurent@debian:~$ whereis lupdate
lupdate: /usr/bin/lupdate /usr/share/man/man1/lupdate.1.gz

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: Second User-Collection

hum, strange, I add to ma todolist:

diff -r QET_org/sources/utils/macosxopenevent.cpp QET_CompanyCollection/sources/utils/macosxopenevent.cpp
20c20
< #include "singleapplication.h"
---
> #include "../singleapplication.h"

diff -r QET_org/qelectrotech.pro QET_CompanyCollection/qelectrotech.pro
61c61,62
< DEFINES += QET_EXPORT_PROJECT_DB
---
> ## auskommentiert:
> #DEFINES += QET_EXPORT_PROJECT_DB
255c256,257
< unix|win32: PKGCONFIG += sqlite3
---
> ## auskommentiert:
> #unix|win32: PKGCONFIG += sqlite3

Just add this lib to fix sqlite3 devel dependency:

 sudo apt install libsqlite3-dev

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: Second User-Collection

FYI, Pc-user it's debian control file, to build my deb Debian package:

Source: qelectrotech
Section: electronics
Priority: optional
Maintainer: laurent trinques <scorpio@qelectrotech.org>
Build-Depends: debhelper (>= 11),
             
               libqt5svg5-dev,
               qt5-qmake,
               qtbase5-dev,
               libkf5widgetsaddons-dev,
               libkf5coreaddons-dev,
               libsqlite3-dev,

               pkgconf
Standards-Version: 4.5.0
Rules-Requires-Root: no
Homepage: http://qelectrotech.org/

Package: qelectrotech
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libkf5coreaddons5, libkf5widgetsaddons5, libsqlite3-0
Recommends: qelectrotech-examples (= ${source:Version}), qelectrotech-data (= ${source:Version}), qttranslations5-l10n, mesa-utils
Description: Electric schematic editor
QElectroTech is a Qt5 application written in C++ .
This program helps you to design electrical schematic diagrams.
It includes a schematic editor, an element editor and a titleblock editor.
It uses XML files to store the produced contents.



Package: qelectrotech-data
Architecture: all
Depends: ${misc:Depends}
Recommends: qelectrotech (= ${source:Version})
Description: symbols needed for qelectrotech
QElectroTech is a Qt5 application written in C++ .
This program helps you to design electrical schematic diagrams.
It includes a schematic editor, an element editor and a titleblock editor.
It uses XML files to store the produced contents.
This package provide symbols needed for qelectrotech.


Package: qelectrotech-examples
Architecture: all
Depends: ${misc:Depends}
Recommends: qelectrotech (= ${source:Version})
Description: examples files for qelectrotech
QElectroTech is a Qt5 application written in C++ .
This program helps you to design electrical schematic diagrams.
It includes a schematic editor, an element editor and a titleblock editor.
It uses XML files to store the produced contents.
This package provide examples files for qeletrotech.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

7 (edited by plc-user 2023-12-09 12:27:46)

Re: Second User-Collection

Salut Laurent,
Hallo alle anderen!

In der *.pro-Datei war die Angabe "TRANSLATIONS" nicht auskommentiert, aber die Übersetzungen wurden dennoch nicht bearbeitet.

Im Debian-Repository ist nur die Qt-Linguist-Version aus Qt6 verfügbar, die die Angabe einer *.pro-Datei als "obsolet" ansieht!
Daher mußte ich den Befehl anpassen, damit die TS-Dateien erneuert werden:

/usr/lib/qt6/bin/lupdate -noobsolete sources/* -ts lang/qet_{ar,be,ca,cn,cs,da,de,el,en,es,fi,fr,hr,hu,it,ja,mn,nb,nl,no,pl,pt,pt_br,ro,ru,sk,sl,sr,sv,tr,uk,zh,zh-cn}.ts

und:

/usr/lib/qt6/bin/lrelease lang/qet_{ar,be,ca,cn,cs,da,de,el,en,es,fi,fr,hr,hu,it,ja,mn,nb,nl,no,pl,pt,pt_br,ro,ru,sk,sl,sr,sv,tr,uk,zh,zh-cn}.ts

So wurden nun alle angegebenen Sprach-Dateien aktualisiert.

Was meinst Du, Laurent?
Soll ich von meinen ersten Qt-Bemühungen einen Pull-Request im offiziellen Repository erstellen?

Gruß
  plc-user


-------------------------

Dans le fichier *.pro, la mention "TRANSLATIONS" n'était pas commentée, mais les traductions n'étaient tout de même pas traitées.

Dans le dépôt Debian, seule la version Qt-Linguist de Qt6 est disponible, qui considère l'indication d'un fichier *.pro comme "obsolète" !
J'ai donc dû adapter la commande pour que les fichiers TS soient renouvelés :

/usr/lib/qt6/bin/lupdate -noobsolete sources/* -ts lang/qet_{ar,be,ca,cn,cs,da,de,el,en,es,fi,fr,hr,hu,it,ja,mn,nb,nl,no,pl,pt,pt_br,ro,ru,sk,sl,sr,sv,tr,uk,zh,zh-cn}.ts

et:

/usr/lib/qt6/bin/lrelease lang/qet_{ar,be,ca,cn,cs,da,de,el,en,es,fi,fr,hr,hu,it,ja,mn,nb,nl,no,pl,pt,pt_br,ro,ru,sk,sl,sr,sv,tr,uk,zh,zh-cn}.ts

Ainsi, tous les fichiers de langue indiqués ont été mis à jour.

Qu'en penses-tu, Laurent ?
Dois-je créer une pull-request dans le dépôt officiel à partir de mes premiers efforts de Qt ?

-------------------------

8 (edited by plc-user 2023-12-09 12:38:53)

Re: Second User-Collection

about libsqlite3-dev:

it is installed, but project does not find it. see attachment

are there extra-packages for sqlite3-development and qt?
"apt-cache search" does not show any...

Post's attachments

Bildschirmfoto_libsqlite3-dev.png, 28.31 kb, 969 x 199
Bildschirmfoto_libsqlite3-dev.png 28.31 kb, 29 downloads since 2023-12-09 

Re: Second User-Collection

Hallo Plc-user

1] make a pull request, more little if possible, no change indentation, etc..
2] If I accept PR and push it, and the same time I run:

sed -i 's/^TRANSLATIONS/#TRANSLATIONS/g' qelectrotech.pro
lupdate -noobsolete qelectrotech.pro -ts lang/qet_{en,es,ru,pt,cs,pl,ca,de,ro,it,ar,sl,hr,el,nl,be,sl,zh,hu,pt_br,da,sr,fr,tr,sk,nb,mn,ja,cn,uk,zh-cn}.ts
sed -i 's/^#TRANSLATIONS/TRANSLATIONS/g' qelectrotech.pro

3] I open qet_en.ts file with qtlinguist, translate, save (qet_en.ts), and publish (overide binary translation qet_en.qm), same things after for French translation files.

After I use

git add lang/
git commit -v

I check the diff and put this message on header: Update *TS file, add EN and FR translation

and

 git push

to publish my work

Don't use lrelease... it's stranslator's work to push translated *.ts and *.qm files..

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: Second User-Collection

sudo apt install libsqlite3-dev libsqlite3-0

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

11 (edited by plc-user 2023-12-10 21:29:17)

Re: Second User-Collection

hmm ... strange:

ich@deb-devel:~$ dpkg -l | grep sqlite
ii  libqt5sql5-sqlite:amd64   5.15.8+dfsg-11   amd64   Qt 5 SQLite 3 database driver
ii  libqt6sql6-sqlite:amd64   6.4.2+dfsg-10    amd64   Qt 6 SQLite 3 database driver
ii  libsqlite3-0:amd64        3.40.1-2         amd64   SQLite 3 shared library
ii  libsqlite3-dev:amd64      3.40.1-2         amd64   SQLite 3 development files
ii  libsqlite3-tcl            3.40.1-2         amd64   SQLite 3 Tcl bindings
ii  sqlite3                   3.40.1-2         amd64   Command line interface for SQLite 3
ii  sqlite3-tools             3.40.1-2         amd64   Command line interface for SQLite 3 (tools)
ich@deb-devel:~$

Anyway:
I created a Pull-Request on github and added only the language-files for German, because you said you want to update the files.

Hope it works with your Toolchain!

[Edit]: The language-files created with "lupdate" and compiled with "lrelease" work here!

[Edit 2]: The bug that the path isn't set immediately is also corrected. -> From my point of view: The Company-Collection is fully functional!

Re: Second User-Collection

Remi and me saw some wrong translations files.
I don't know what happened yet.
I edited the wiki.

lupdate -noobsolete qelectrotech.pro -ts lang/qet_{en,es,ru,pt,cs,pl,ca,de,ro,it,ar,sl,hr,el,nl,be,zh,hu,pt_br,da,sr,fr,tr,sk,nb,mn,ja,uk}.ts

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

13 (edited by scorpio810 2023-12-23 07:08:40)

Re: Second User-Collection

May I suggest to sort the list alphabetically?
So one can find (missing?) languages "at first sight":

lupdate -noobsolete qelectrotech.pro -ts lang/qet_{ar,be,ca,cs,da,de,el,en,es,fr,hr,hu,it,ja,mn,nb,nl,pl,pt,pt_br,ro,ru,sk,sl,sr,tr,uk,zh}.ts

Re: Second User-Collection

Good tip.

Done!

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."