backdrop-ops / localize.backdropcms.org

Host translation files for Backdrop CMS.
2 stars 4 forks source link

Provide translations for contrib projects #41

Open olafgrabienski opened 3 years ago

olafgrabienski commented 3 years ago

Currently Backdrop-specific translations are only available for core. Let's also provide translations for modules and other contrib projects.

olafgrabienski commented 3 years ago

IIRC, it's not difficult to setup additional projects on the translation server. Will have a look at it when I find time, starting with one of the popular modules (e.g. Backup and Migrate, or Webform).

alanmels commented 3 years ago

I second this idea as we have started translation of number of contrib modules into Russian and would like to share with the community as we progress further.

olafgrabienski commented 3 years ago

Great! Let me know when you're ready to share some module translations.

olafgrabienski commented 2 years ago

Chatting about contrib translations recently, I noticed the following challenge which I wasn't aware of before: While it is quite easy to add contrib projects to the translation server, we don't have a good way to add English language source files to their releases. I do that manually for Backdrop core minor releases, but won't be able to do it for more projects and releases.

So, I raised some questions for the Dev meeting on February 10th, 2022:

Below a link to the meeting's video, starting where the topic was discussed.

https://www.youtube.com/watch?v=EysmdI3XIlQ&t=190s

robertgarrigos commented 1 year ago

I'm also really interested in this. Any news?

olafgrabienski commented 1 year ago

Yes, there are some news! @argiepiano, who did the main work for the translation server upgrade to Backdrop, wrote to me at that time:

I noticed (in the current localize site) that you have only enabled the Gettext connector, and imported existing PO files to create the database of translatable strings. That part works well in the ported module.

It's also possible to enable the "Backdrop packages from the file system" connector. The way this one works: it can scan tar.gz files for instances of t() and format_plural() and automatically create the database of translatable strings.

This is something we can try in the future, rather than importing already-made PO files. This is particularly useful for contrib modules, to create other projects beyond backdrop core.

This sounds really promising! I'll have a look at the "Backdrop packages from the file system" connector when I find time (and if nobody beats me to it).

robertgarrigos commented 1 year ago

I actually tried locally this feature of reading packages from the file system and it works fine.

Explore_projects___Localize_Barckdrop_Cat Translate_references_dialog_to_Catalan___Localize_Barckdrop_Cat

argiepiano commented 1 year ago

As @robertgarrigos pointed out it's possible to use that local file connector to translate contrib placed in specific folders in the file system. However, even more useful, would be to get the connector "Localization server for Drupal (REST API)" working in the Backdrop version of the module. Right now that connector can't be enabled.

The main issue in porting that connector is that Drupal provides a TSV file (tab separated text file) with all its contrib module latest releases - you can actually download that with your browser at https://www.drupal.org/files/releases.tsv

Currently, Backdrop does not provide such a file. It would actually be easy to provide it, but we'd need to help of someone with admin access to backdropcms.org. In a nutshell, it would involve creating a Views that has a Views Export with those 4 needed columns. Then we can work on porting that submodule with the connector. By doing so we'd avoid having to manually put the zip files in a folder - the Localization server connector would take care of downloading that directly.

Perhaps @jenlampton or @bugfolder can help (I think they both have admin access to backdropcms.org)