Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
5 tasks done
emteknetnz opened this issue Mar 6, 2023 · 5 comments
Closed
5 tasks done

Comments

@emteknetnz
Copy link
Member

emteknetnz commented Mar 6, 2023

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

  • It seems like the problem is caused by the module not being in transifex
  • We have other supported modules that are also not in transifex. These didn't cause problems because they lack the tx config, but they should be added as well.

Acceptance criteria

  • All supported modules are in transifex
  • All supported modules have transifex config in the repository
  • All supported modules have their translations updated appropriately using the translations tool
  • UI strings are translatable for modules newly being added to transifex
  • Translation tool has been run against the newly translatable modules

PRs

@emteknetnz
Copy link
Member Author

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
Copy link
Contributor

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
Copy link
Contributor

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

@emteknetnz emteknetnz changed the title TX_PUSH doesn't work for tx-translator tx-translator - TX_PUSH doesn't work for colymba module Mar 6, 2023
@GuySartorelli GuySartorelli changed the title tx-translator - TX_PUSH doesn't work for colymba module Some supported modules (e.g. colymba/gridfield-bulk-editing-tools) aren't in transifex Mar 7, 2023
@GuySartorelli GuySartorelli self-assigned this Mar 7, 2023
@GuySartorelli
Copy link
Member

@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
Copy link
Member

GuySartorelli commented Mar 7, 2023

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)

  • bringyourownideas/silverstripe-composer-update-checker
  • composer/installers - not ours
  • cwp/agency-extensions
  • cwp/cwp-pdfexport - no UI strings to be translated
  • dnadesign/silverstripe-elemental-userforms
  • silverstripe/auditor - no UI strings to be translated
  • silverstripe/behat-extension - tests only, no need for translations.
  • silverstripe/config - no UI strings to be translated
  • silverstripe/content-widget very legacy, no strings currently translatable, not worth doing
  • silverstripe/crontask
  • silverstripe/developer-docs
  • silverstripe/environmentcheck - strings intended for developer and machine consumption only
  • silverstripe/fulltextsearch
  • silverstripe/graphql - no UI strings to be translated
  • silverstripe/graphql-devtools - dev tool, and we typically don't add translation for dev-only stuff
  • silverstripe/html5 - no UI strings to be translated
  • silverstripe/hybridsessions
  • silverstripe/installer
  • silverstripe/recipe-authoring-tools
  • silverstripe/recipe-blog
  • silverstripe/recipe-ccl
  • silverstripe/recipe-cms
  • silverstripe/recipe-collaboration
  • silverstripe/recipe-content-blocks
  • silverstripe/recipe-core
  • silverstripe/recipe-form-building
  • silverstripe/recipe-plugin
  • silverstripe/recipe-reporting-tools
  • silverstripe/recipe-services
  • silverstripe/recipe-solr-search
  • silverstripe/restfulserver - no UI strings to be translated
  • silverstripe/sharedraftcontent
  • silverstripe/tagfield - unexpectedly has no UI strings to be translated
  • silverstripe/textextraction - no UI strings to be translated
  • silverstripe/vendor-plugin
  • symbiote/silverstripe-gridfieldextensions
  • tijsverkoyen/akismet - not ours
  • tractorcow/classproxy - No UI strings to be translated
  • tractorcow/silverstripe-proxy-db - No UI strings to be translated

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants