silverstripe / .github

0 stars 2 forks source link

Some supported modules (e.g. colymba/gridfield-bulk-editing-tools) aren't in transifex #12

Closed emteknetnz closed 1 year ago

emteknetnz commented 1 year ago

Ran tx-translator on 4 sink using TX_PUSH=1 and TX_DEV_MODE=0

Finished generating 537 files
Pushing updated sources to transifex
Running tx push -s
Running tx push -s
PHP Fatal error:  Uncaught Symfony\Component\Process\Exception\ProcessFailedException: The command "tx push -s" failed.

Exit Code: 1(General error)

Working directory: /home/myuser/Sites/mylocalsite/vendor/colymba/gridfield-bulk-editing-tools

Output:
================
# Getting info about resources

gridfieldbulkeditingtools.js - Getting info
gridfieldbulkeditingtools.yml - Getting info
gridfieldbulkeditingtools.yml - Resource does not exist; creating
gridfieldbulkeditingtools.js - Resource does not exist; creating
gridfieldbulkeditingtools.js - Error while creating resource, 400, invalid: 'o::p:gridfieldbulkeditingtools' does not match '^o:[a-zA-Z0-9._-]+:p:[a-zA-Z0-9_-]+$'
gridfieldbulkeditingtools.yml - Error while creating resource, 400, invalid: 'o::p:gridfieldbulkeditingtools' does not match '^o:[a-zA-Z0-9._-]+:p:[a-zA-Z0-9_-]+$'

Error Output:
================
 in /home/myuser/Sites/mylocalsite/vendor/silverstripe/tx-translator/src/Translator.php:461
Stack trace:
#0 /home/myuser/Sites/mylocalsite/vendor/silverstripe/tx-translator/src/Translator.php(344): SilverStripe\TxTranslator\Translator->exec()
#1 /home/myuser/Sites/mylocalsite/vendor/silverstripe/tx-translator/src/Translator.php(63): SilverStripe\TxTranslator\Translator->transifexPushSource()
#2 /home/myuser/Sites/mylocalsite/vendor/silverstripe/tx-translator/scripts/translate.php(17): SilverStripe\TxTranslator\Translator->run()
#3 {main}
  thrown in /home/myuser/Sites/mylocalsite/vendor/silverstripe/tx-translator/src/Translator.php on line 461

.tx/config for colymba/gridfield-bulk-editing-tools had the old schema i.e. it's like tx migrate was never run on it

[main]
host = https://www.transifex.com

[gridfieldbulkeditingtools.yml]
file_filter = lang/<lang>.yml
minimum_perc = 0
source_file = lang/en.yml
source_lang = en
type = YML

[gridfieldbulkeditingtools.js]
file_filter = client/src/lang/<lang>.json
minimum_perc = 0
source_file = client/src/lang/en.json
source_lang = en
type = JSON

Attempting to manually run tx migrate on colymba/gridfield-bulk-editing-tools had the following error

tx migrate
Could not migrate resource `js`

Could not migrate resource `yml`

Migration ended! We have also created a backup file for your previous config file `/home/myuser/Sites/mylocalsite/vendor/colymba/gridfield-bulk-editing-tools/.tx/config_20230306174541.bak`.

Notes

Acceptance criteria

PRs

emteknetnz commented 1 year ago

Only colymba/gridfield-bulk-editing-tools is an issue

gridfield-bulk-editing-tools is NOT listed in my transifex account, while other non-silverstripe modules are such as silverstripe-maintenance (bringyourownideas)

I think we should simply exclude colymba/gridfield-bulk-editing-tools from having translations run on it. I tried this manually and every other module in sink worked fine.

michalkleiner commented 1 year ago

I'd say it might be worth figuring out what is wrong with the colymba module (it looks like the o::p pattern is missing the o part), rather than introducing a whole new exclusion mechanism for things and throwing it under the bus.

maxime-rainville commented 1 year ago

We want to add the colymba module to transifex so it can be translated as well.

GuySartorelli commented 1 year ago

@maxime-rainville For colymba/gridfield-bulk-editing-tools specifically, it turns out this is in transifex, but it's not under our account so we can't use the translation tool to update it: https://explore.transifex.com/colymba/gridfieldbulkeditingtools/

Options:

  1. Explicitly don't update translations for this module
  2. Migrate the existing translations into a new transifex project in our organisation and update the .tx/config file in the repo
    • Not sure if there's some way to do this from transifex itself or if we'd have to just tx push the translations up
    • Probably have to check with colymba first - but given the repo readme has a call for maintainers I suspect they'd be okay with it
GuySartorelli commented 1 year ago

The following supported modules are missing .tx/config according to https://github.com/silverstripe/supported-modules/blob/gh-pages/modules.json (note: I've crossed out any that just blatantly obviously shouldn't go in there)

Checkboxes added so it's easy to track which I've done