Softcatala / translation-memory-tools

A set of tools to build, maintain and use translation memories

Home Page:https://www.softcatala.org/recursos/memories/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Instruccions d'instal·lació incompletes

pereorga opened this issue · comments

Provat en Ubuntu 22.04. Seguint les instruccions del README i les del HOW-TO:

$ cd src/
$ python3 builder.py -pAbiword
Traceback (most recent call last):
  File "/home/netol/dev/translation-memory-tools/src/builder.py", line 29, in <module>
    from builder.projects import Projects
  File "/home/netol/dev/translation-memory-tools/src/builder/projects.py", line 25, in <module>
    from .project import Project
  File "/home/netol/dev/translation-memory-tools/src/builder/project.py", line 24, in <module>
    from polib import pofile
ModuleNotFoundError: No module named 'polib'

Idealment, entenc que no hauria de ser necessari moure's a la carpeta src, ni a cap altre lloc (el programa hauria de funcionar independentment d'on està situat l'usuari)

Addicionalment, al README, les instruccions pip3 estan indicades amb l'ordre sudo. Això sembla que no és una bona pràctica pel missatge que surt:

WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

Recordo posar jo mateix aquestes instruccions fa anys (en aquell moment no n'hi havien)

Sí, la documentació i l'execució en local s'ha de millorar molt.

He començat a això que ja funciona:
https://github.com/Softcatala/translation-memory-tools/#installation

Encara he de millorar la documentació però és la direcció que penso ho pot fer més senzill.

Fa dies que no estic amb Linux, i no ho he pogut tornar a provar amb Ubuntu. No he trobat en Mac equivalències apt-get/brew fàcils, sinó, ho hauria provat d'instal·lar amb Mac.

Per cert, a l'ordre apt-get veig el paquet python2-dev, entenc que ja no deu ser necessari?

També he provat, en Mac, d'executar make docker-builder-run com indica el README, sense èxit:

make: *** No rule to make target `docker-builder-run'.  Stop.

Encara amb Mac (arm64), i tot i que no està documentat al README, he executat ./build-docker-builder.sh dins el directori docker (des de fora el directori no funciona). Sembla que acaba bé, tot i que no em queda clar què fa.

També he executat: /docker/run-local/run-local.sh dins /docker/run-local/ (des de fora tampoc funciona)

Ha fet alguns errors:

 => ERROR [2/2] COPY /web-docker/ /static/                                                                           0.0s
------
 > [2/2] COPY /web-docker/ /static/:
------
failed to compute cache key: "/web-docker" not found: not found
Finish stop script

I al final ha fallat amb aquest missatge:

[+] Building 1.3s (3/3) FINISHED
 => [internal] load build definition from dockerfile-webapp-test                                                     0.0s
 => => transferring dockerfile: 264B                                                                                 0.0s
 => [internal] load .dockerignore                                                                                    0.0s
 => => transferring context: 34B                                                                                     0.0s
 => ERROR [internal] load metadata for docker.io/library/tmt-webapp:latest                                           1.3s
------
 > [internal] load metadata for docker.io/library/tmt-webapp:latest:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
~/dev/translation-memory-tools/docker
Unable to find image 'tmt-webapp-test:latest' locally
docker: Error response from daemon: pull access denied for tmt-webapp-test, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
~/dev/translation-memory-tools/docker/run-local

No sembla tenir relació amb el fitxer cfg/credentials, que no he omplert perquè entenc que és opcional, i perquè dedueixo que tampoc trobaria fàcilment les credencials adients.

La meitat de les coses que he dit en el comentari anterior no apliquen, ja que m'havia oblidat de fer git pull i estava provat una versió anterior del codi. L'ordre make docker-builder-run s'executa correctament en Mac (arm64).

Crec que això es pot tancar ja