fred4jupiter / fredbet

Simple football betting application using Spring Boot, Thymeleaf and Bootstrap. Well prepared for betting with friends.
MIT License
119 stars 63 forks source link

Support languages spanish and catalan #32

Closed jotiprime closed 2 years ago

jotiprime commented 2 years ago

Hey Fred4jupiter, can you open me in Twitter? I have the translations of fredbet for Spanish and catalan. Also I will appreciate you if you build the docker container with arm64. I made it with docker build --platform=linux/arm64 command, but then when I enter to the docker console, to see the files, there is no option to edit any file, so if I want to edit one message or something, I have to build the container another time. Any solution?

Thanks!

fred4jupiter commented 2 years ago

Hi Jotiprime. Please create a merge request for the i18n translations. I will have a look if it works. I will also check if I can create a docker image for arm64.

jotiprime commented 2 years ago

How can I create a merge? Can I just upload here the two messages files? (you will need to include the languages in _navigation.html)

jotiprime commented 2 years ago

Hi Jotiprime. Please create a merge request for the i18n translations. I will have a look if it works. I will also check if I can create a docker image for arm64.

Can you make the arm image for now? I need to change some things and for me is horrible to edit, upload and have to compile all the time the container and start the container and then upload the database. I don't know why with my compilation (docker build --platform=linux/arm64 command) there is no option to edit anything, in docker console, there not appear the app folder with the files. So I really appreciate if you compile the container.

jotiprime commented 2 years ago

What command and file you used to build the image?

fred4jupiter commented 2 years ago

About the languages: You can create a new branch where you add your translations. Then you push the branch and create a merge request. If you are not familiar with GIT then you can upload the files as a comment in this issue. I will have a look.

About the ARM docker image: I did not create an ARM docker image yet. So I also have to investigate some time. Currently I´m very busy. Best option will be a multi arch build with a Gihub action but I will see.

jotiprime commented 2 years ago

Okay, I already create a arm image, but when I go inside the container, I don't see the /app folder to edit the files. How can I make the image, so that I will be able to edit files on the docker container.

fred4jupiter commented 2 years ago

A docker container is not intended to be changed inside. What files do you want to change?

jotiprime commented 2 years ago

When I use this image (https://hub.docker.com/r/fred4jupiter/fredbet), in root directory of the docker container appears this folder called app, inside the resources and I can edit for example the messages.properties without need of rebuild the image.

Captura de pantalla 2022-03-15 170355

jotiprime commented 2 years ago

When I use this image (https://hub.docker.com/r/fred4jupiter/fredbet) LATEST image

So if you can give me the same files / instructions that you use when you build this image it will be helpful.

fred4jupiter commented 2 years ago

You can find these files in the source under https://github.com/fred4jupiter/fredbet/tree/master/src/main/resources. For translations into another language you have to provide translations of the ValidationMessages.properties and messages.properties. You can check out the source with GIT or download the complete repo with https://github.com/fred4jupiter/fredbet/archive/refs/heads/master.zip

fred4jupiter commented 2 years ago

I´ve created an ARM docker image build within Github workflow. Can you please check if this image is running on your ARM machine? docker pull fred4jupiter/fredbet:2-arm64 The image is deployed on Docker Hub: https://hub.docker.com/r/fred4jupiter/fredbet/tags see tag 2-arm64

jotiprime commented 2 years ago

Working is working, but there is no option to edit files in real time like in amd64.

Image of amd64 (appears app directory/folder) I can edit for example messages.properties without rebuild the container. Captura de pantalla 2022-03-15 211934

Image of arm64 (no app directory/folder) If I have to edit something, I have to rebuild the container.

Captura de pantalla 2022-03-15 212209

jotiprime commented 2 years ago

? Do you know why? or how can I make that app directory appears in arm?

fred4jupiter commented 2 years ago

Its currently a build which uses a fat jar. The complete application is within the fredbet.jar file. Please send me the translations and I will integrate them.

jotiprime commented 2 years ago

You can make the image for arm with the app directory / folder?

jotiprime commented 2 years ago

Here you have the messages (there are in .xtx because I can't upload a .properties file in github)

Spanish:

messages_es.properties.txt

Catalan:

messages_ca.properties.txt

jotiprime commented 2 years ago

Its currently a build which uses a fat jar. The complete application is within the fredbet.jar file. Please send me the translations and I will integrate them.

Fred, Please, can you make me a arm64 image with this fat jar, so I can have the app directory / folder?? If not, you can pass me the files and I will make.

fred4jupiter commented 2 years ago

Thanks for the translations. Can you also translate the ValidationMessages? They are also needed. I will then add these languages to the app than a user can switch between all languages. After that the docker images will be automatically rebuild.

fred4jupiter commented 2 years ago

All files are checked in. You can fork the repo and change files to your needs.

jotiprime commented 2 years ago

ValidationMessages_ca.txt ValidationMessages_es.txt

jotiprime commented 2 years ago

Can you make the image with the app directory/folder?????

fred4jupiter commented 2 years ago

No. I cannot create the arm image with app folder. There is also no option to edit the files as live reload. You can start the app as classic Spring Boot App before building the image. The messages will be loaded once at boot time.

jotiprime commented 2 years ago

Okay, thanks, Can you do this please?

Add an option to put a background image in each (including login and register) page (optionn to put diferent image in different page) from config. Also a option to change the menu bar color from config.

fred4jupiter commented 2 years ago

Please do not mix up different issues within one. For new topics please open another issue for that.

I will check the translations, but this will take some time (days). I will give feedback.

jotiprime commented 2 years ago

Okay!

fred4jupiter commented 2 years ago

I´ve integrated the languages. Please check the latest version.

fred4jupiter commented 2 years ago

The languages are now included in the latest version. So I will close this issue.