mikespub-org / seblucas-cops

Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks (epub, mobi, pdf, ...)
http://blog.slucas.fr/en/oss/calibre-opds-php-server
GNU General Public License v2.0
64 stars 6 forks source link

Using Gitlocalize for translations [Feature request] #82

Closed horus68 closed 2 months ago

horus68 commented 4 months ago

Can you please start using the Gitlocalize for translations https://gitlocalize.com/ It's a simple tool, which must be setup by this repo owner, which creates a translation area linked to language files taken from the github project. Translators will translate, ask to review changes (as in a pull request bu without the technical stuff!) and the translation is merged into the github project. Plain and easy! Gitlocalize it's not a super translation tool but good enough for the COPS translations and with less work to manage translations. The actual translation tool (transifex) will be dropped after this change. Note: Thorium Reader also start using Gitlocalize today and it works!

How to? See here: https://docs.gitlocalize.com/getting_started.html

1- Mike: Sign in into Gitlocalize 2- From Gitlocalize creates a project, point to his github repository mikespub-org / seblucas-cops 3- Choose a branch where the languages will be later merged, add the path to the language files to be used, select the source and target languages (this will be the Step 1. Repository / Step 2. Content / Step 3. Languages) 2024-05-17 14_23_44-GitLocalize 2024-05-17 14_24_45-GitLocalize

==> adjust the target file name (remove EN) 2024-05-17 14_25_02-GitLocalize

2024-05-17 14_26_18-GitLocalize

Special note: When adding languages with 4 letters code, use/edit the custom language code as in the image: 2024-05-17 14_35_34-GitLocalize - Continuous Localization for GitHub Projects

4- Invite github users to be translators 5- Translators sign in with their Github accounts and pick their language to translate. 6- They get a simple page created from the actual language file to be translated. 7- When done translators simple click "Review Request". 8- Then the project owner approves the changes, and the translations are merged into his repo

Some screens: Main page with translations status 2024-05-17 14_41_53-horus68_mikes-cops _ GitLocalize

Each translator has its own area from the language assigned 2024-05-17 14_42_21-GitLocalize - Continuous Localization for GitHub Projects

The translation page: 2024-05-17 14_39_23-GitLocalize - Continuous Localization for GitHub Projects

mikespub commented 4 months ago

Hi @horus68 thanks for the detailed explanation & screenshots.

I'll have a look at it this weekend, but the main concern I have is about step 4 - does that mean any potential translator must be invited as member of this github repo (or organization) before he/she can contribute?

That seems rather counter-productive when actual code changes can be submitted as pull requests by anyone today. Although the # of translations needed remains rather stable over time, I don't see myself managing access for all translators over any extended period of time.

horus68 commented 4 months ago

Users need to be added as translators for the Gitlocalize project. I don't expect more than 30 users! If you want I can step up and manage the users approvals on Gitlocalize, you just need to add me as an admin role 2024-05-17 17_43_27-GitLocalize - Continuous Localization for GitHub Projects

mikespub commented 4 months ago

Excellent, thanks. See https://gitlocalize.com/repo/9640

mikespub commented 4 months ago

Thanks @horus68 you should have admin access now. Always a pleasure - you make it look easy :-)

horus68 commented 4 months ago

Thanks for the admin role. I can't find a way to add users to a language (as moderators or translators) The team page don't allow that for admins? The strange thing: I can add a translator for a new language not for an already created language. It should be possible to select a translator for a language but not for me. Can you test if this screen is the same for you, maybe try to add my translator role to the pt_PT language? 2024-05-18 12_40_30-GitLocalize - Continuous Localization for GitHub Projects

horus68 commented 4 months ago

I found it... translators are not assigned to a specific language, only the moderators role is... After selecting an user, if the role is Moderator a language selector will show! 2024-05-18 12_45_37-GitLocalize - Continuous Localization for GitHub Projects

  • Translators can only add or update translations and create review requests (send translations to Language Moderators for review). They will not be able to send pull requests to GitHub.
  • Language Moderators review translations submitted by translators, can edit translations that are awaiting review and send translations to GitHub (create pull requests) - but only for the language they are moderating.
mikespub commented 4 months ago

Indeed, I just noticed the same thing :-)

horus68 commented 4 months ago

Then we are all set! Just remember to not update the translations files from your computer... they now have to be synched from the Github

Gitlocalize -> translate > ask for review > approve review > make a commit to Github Github -> Merge commit

mikespub commented 4 months ago

Could you update the Wiki page at https://github.com/mikespub-org/seblucas-cops/wiki/Update-translations too, or do you need access for that?

mikespub commented 4 months ago

Or you can update it at the original https://github.com/seblucas/cops/wiki/Update-translations and I can pull in the changes

horus68 commented 4 months ago

@mikespub I was removed from Admin role (in Gitlocalize). Was it a mistake or there is no need to do more work with the translation project Admin? I am Moderator for my language (pt-PT) and that's fine!

mikespub commented 2 months ago

Hi @horus68 sorry for the delay, I was on a break for a while, but I see you already figured it out :-)

a. you're both Admin & Moderator in Gitlocalize, which allows you to assign Moderators for other languages as well. That way they can also create pull requests once their language file(s) is updated 👍

b. you have write access to this repository in Github, so you can also merge the pull requests here 👍

Thanks. Do we still need to keep this issue open or not?

horus68 commented 2 months ago

All working fine! Closing this issue.