concretecms-community-store / community_store

An open, free and community developed eCommerce system for Concrete CMS
https://concretecms-community-store.github.io/community_store/
MIT License
106 stars 66 forks source link

Addinng Community Store to translate.concretecms.org? #733

Closed mlocati closed 1 year ago

mlocati commented 1 year ago

It's possible to add Community Store to https://translate.concretecms.org, so that:

  1. people can install Community Store translations directly from within the dashboard
  2. translators can translate in a collaborative way directly on translate.concretecms.org (people preferring to manually translate .po files can still do that: they dimply have to go to translate.concretecms.org, download a .po file, translate it offline, and re-upload it to translate.concretecms.org)
  3. the translatable strings are always up to date, no needs to manually create .pot/.po/.mo files

In order to do that, I can configure translate.concretecms.org to fetch the source code of Community Store from github. This requires that:

  1. I'm notified whenever the URL of the git repository changes
  2. I'm notified whenever the branch for next major version changes (for example, at the moment the master branch points to the 2.x version of Community Store: if there are other branches, or if the major version of master changes, I have to be notified).

If it's ok, I can configure translate.concretecms.org in a minute.

mlocati commented 1 year ago

I'd also remove the language files from https://github.com/concretecms-community-store/community_store, since everything could be fetched from the dashboard or manually downloaded from the translate.concretecms.org website

Mesuva commented 1 year ago

I'd left the language files in place in case someone wanted to use them as a starting point for new translations. I remove them when creating releases. But they'd be pretty out of date now, so perhaps it's good to just remove them at this point.

But Community Store should already be in translate.concretecms.org, at https://translate.concretecms.org/translate/package/community_store

I actually have it in the Marketplace, just configured to never actually get published, and that's how translate.concretecms.org gets managed. I just push up to the marketplace whenever I create a new release.

mlocati commented 1 year ago

I'd left the language files in place in case someone wanted to use them as a starting point for new translations. I remove them when creating releases. But they'd be pretty out of date now, so perhaps it's good to just remove them at this point.

Yep, keeping two versions of language files may be an unnecessary mess.

Community Store should already be in translate.concretecms.org, at https://translate.concretecms.org/translate/package/community_st

Whoops, I wasn't aware of it: I simply looked for Community Store at https://marketplace.concretecms.com/marketplace/addons and, seeing it wasn't listed, and that there were language files in this repo, I thought that it wasn't published on translate.concretecms.org

Sorry, my fault.

mlocati commented 1 year ago

It's now possible to add packages to https://translate.concretecms.org without adding them to the ConcreteCMS PRB/Marketplace: it's enough to have a git repository pubicly available.

I've just tried with https://github.com/concretecms-community-store/community_store_bcc_payway and everything seems to work just fine (see https://translate.concretecms.org/translate/package/community_store_bcc_payway ).

The translation website is also capable of extracting versions from Git tags. That is, if there's a git tag that can be parsed as a version (examples: 1.2.3, v1.2.3), the translate website will create a version of the translatable package.

Pros of using this approach:

  1. everything is automatic (you don't need to upload a new version in the ConcreteCMS PRB) - the process is scheduled to run once a day (IIRC at 1am UTC)
  2. people can translate (and download translations) even for development branches (eg master)

@Mesuva if you want, I can configure the translate website, adding to it all the https://github.com/concretecms-community-store repositories.

Mesuva commented 1 year ago

That sound fantastic to me. Whilst it's not a big deal to have to manually update the package via the marketplace, it's still an extra step worth removing.

mlocati commented 1 year ago

@Mesuva I'd add these repositories: https://docs.google.com/spreadsheets/d/146cw-QzRUOEPd8EGd0zUUMPmAG4QsUra5ebUbsmnMMY

Please tell me if:

  1. it's not necessary to add some of them
  2. You see something wrong
Mesuva commented 1 year ago

I think that full list is ok to add. There's some pretty old repos there, but they can come back to life at times depending on client needs.

mlocati commented 1 year ago

Ok, I've added all the 29 repositories. Now we have to wait the next scheduled execution (or have @KorvinSzanto approve https://github.com/concretecms/translate.concretecms.org/pull/73 and publish it to the production website :wink:).

mlocati commented 1 year ago

The automated import process suceeded: try to search community_store at https://translate.concretecms.org/translate/search :wink: