francoisfds / BikeSharingHub

Shared bikes for Android
GNU General Public License v3.0
18 stars 10 forks source link

Improve translations like it is stlil done on OpenBikeSharing with weblate? #9

Closed Altonss closed 2 years ago

Altonss commented 2 years ago

We still see translations being done in weblate for the openbikesharing project. Could BikeSharingHub also try to have some kind of translation done through weblate for example?

francoisfds commented 2 years ago

Hi, indeed this a must have feature to keep translations up to date and allow seamless contributions.

francoisfds commented 2 years ago

@Altonss do you know how to do set it up ?

Altonss commented 2 years ago

@Altonss do you know how to do set it up ?

I am currently trying to set it up! But unfortunately don't have much time these days. When I have time to continue the work and if I need some help I will write a message here. The translation repo I am trying to set up is located here: https://hosted.weblate.org/projects/bikesharinghub/#information

francoisfds commented 2 years ago

OK, I have seen that, thank you very much ! Take the time you need 😉

Altonss commented 2 years ago

It looks like it is working now :+1: @francoisfds do you want write access to the weblate repo?

Things to be done:

francoisfds commented 2 years ago

Sure, I've just signed up there : https://hosted.weblate.org/user/francoisfds. For the upstream project approval, is there something special to do ?

Altonss commented 2 years ago

Sure, I've just signed up there : https://hosted.weblate.org/user/francoisfds. For the upstream project approval, is there something special to do ?

I have just added you as administrator and did a pr to add the weblate reference in the readme. The other points should not be showstopper right now. So if the PR gets merged, I will click on the button to ask for hosting :)

francoisfds commented 2 years ago

Great, the Readme is merged and new translations as well. Thank tou @Altonss.

Altonss commented 2 years ago

I really like this project, thank you for having revived the OpenBikeSharing app! I have just sent out the request for free hosting, will keep you informed of the progress :)

Altonss commented 2 years ago

The free hosting plan for our project has been accepted! I will now close the issue as all seem to work fine! If something were to break, feel free to reopen this issue :)

francoisfds commented 2 years ago

Great, thanks a lot ! I have also set up automatic push from github to weblate so it can be kept up to update 👌

Altonss commented 2 years ago

Great, thanks a lot ! I have also set up automatic push from github to weblate so it can be kept up to update ok_hand

I didn't know how to set this up, how did you do it?

francoisfds commented 2 years ago

I followed this guide : https://docs.weblate.org/fr/latest/admin/continuous.html#github-setup. It has to be set on github side so any new commit can trigger an update message. This needs admin rights on the repo I think. Also, there was some features to explore on weblate to complete the trial plan : flags and screenshots. I'm not sure if it was mandatory.

Altonss commented 2 years ago

Have you changed some settings on weblate? Because now some error is hapenning when pushing changes to github: image

francoisfds commented 2 years ago

Nothing on my side since last saturday, unless merging your German translation. That's strange ! This could come from the free plan being accepted... ?

Altonss commented 2 years ago

I don't really know :( I will have a look at it tomorrow :)

francoisfds commented 2 years ago

The error is not thrown for every change : https://hosted.weblate.org/projects/bikesharinghub/bikesharinghub/#repository But wow, "Your branch is ahead of 'origin/master' by 26 commits", we may need to squash them ? screenshot

Altonss commented 2 years ago

I just installed a module which always squashes the commits before sending. After squashing it worked again, so I guess it's fine now :)

francoisfds commented 2 years ago

Indeed that's a good thing, well done !

francoisfds commented 2 years ago

I opened a merge request in fdroiddata to advertise the weblate link :wink:

Altonss commented 2 years ago

Great idea! (I see your pipeline has failed on fdroid)

francoisfds commented 2 years ago

Yes, there was an order to follow in the yml file, but now the pipeline passed.

francoisfds commented 2 years ago

Hi @Altonss. The last merged weblate commit added new lines in all languages with emty value like :

<string name="app_name" translatable="false"></string>

Unfortunately now if you run the app with an other language than English, there are blank spaces instead of the actual string. I think we need to revert these changes, but first do you know what was their purpose ?

Altonss commented 2 years ago

Oh I'm sorry this happenned :/ Did someone trigger this changes or was this some kind of automated weblate thing?

francoisfds commented 2 years ago

I don't really know I think that was part of the 26 commits that were stuck in the beginning of the week. May be that was one automatic commit per each language ?!

Altonss commented 2 years ago

That is really strange. Let's just drop these changes and after that update the changes on weblate to match this repo. I will also change the settings to squash the commits per language, so it will be easier to monitor the incoming changes!

Edit: you can have a look at the installed modules on weblate here: https://hosted.weblate.org/addons/bikesharinghub/bikesharinghub/ Maybe you will find the error, I don't know...

francoisfds commented 2 years ago

Ok that's good idea to squash only per language, thanks ! I will revert the changes and we will see if this thing will be triggered again.

Altonss commented 2 years ago

Wait I have maybe found something!! There is a module that deletes blank translations, should I install it to correct the errors?

image (sorry for the french UI)

francoisfds commented 2 years ago

It's Okay I pushed the fix to the master branch. For me too weblate UI is French everywhere, because I'm French :wink: It's not really about blanks spaces but empty strings which were copied from the default "strings" file. I assume the gilty plugin is "Nettoyer les fichiers de traduction", it states :

Mettre à jour tous les fichiers de traduction pour qu’ils correspondent au fichier mono-langue de base.

I think this is a good feature but that must exclude the keys with translatable="false".

Altonss commented 2 years ago

Ok than let's just uninstall that module, after that we will have to clean the merge conflict alert and than it will hopefully be the end of the problems :) Edit: It is swedish that caused conflicts

francoisfds commented 2 years ago

Ok we leave it uninstalled and if new strings are added we will see. How do you know it is swedish ?

Altonss commented 2 years ago

image

francoisfds commented 2 years ago

Right, I didn't see the big warnings ! Oh that must be related to my previous commit.

Swedish updated, 5 hours ago. This didn't triggered pull request, so I missed it ! Do you know how often the pull request are triggered ?

francoisfds commented 2 years ago

There is some instructions to follow to fix the conflict. I can do it unless you are already doing it ?

Altonss commented 2 years ago

Yes do it! I understand it's git behind all that, but I don't how how to it :laughing:

francoisfds commented 2 years ago

I will look at that in moments.

francoisfds commented 2 years ago

We are all good, I rebased my commit on top of weblate's branch. In the future I will try to check weblate before pushing strings.