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

Contentful/duplicate assets #893

Merged
merged 6 commits into from
Aug 11, 2020

Conversation

dpinol
Copy link
Contributor

@dpinol dpinol commented Aug 7, 2020

Depends on #892 Please review it first

Description

Now ReferenceFieldDuplicator also duplicates assets to the specified locale.

Context

Continuation of PR #891 . When we don't define fallbacks when a locale field is blank, we want all locale fields to have the same values.

Approach taken / Explain the design

  • Added a method to get all the assets of a space
  • Added a method to get the id of an asset
  • Added a method to copy an asset file from a locale to another one
  • In ReferenceFieldDuplicator, go through all assets and duplicate their files

To documentate / Usage example

  • New methods to get all the assets of a space

Testing

The pull request...

  • has integration tests

@dpinol dpinol requested review from asastre and guinii August 7, 2020 05:57
@dpinol dpinol force-pushed the contentful/cms-locale branch from 230f547 to fbc756b Compare August 7, 2020 06:23
added id field to Asset
Contentful.asset was not using Context
@dpinol dpinol force-pushed the contentful/duplicate-assets branch from 585315d to 0d6206a Compare August 7, 2020 06:24
@dpinol dpinol force-pushed the contentful/duplicate-assets branch from 0d6206a to 1a5cbba Compare August 7, 2020 06:37
dpinol added 2 commits August 8, 2020 12:54
since the script was doing "cd", relative paths were not working
import-csv-for-translators renamed to import-csv-from-translators
@guinii guinii merged commit 164108b into contentful/cms-locale Aug 11, 2020
@guinii guinii deleted the contentful/duplicate-assets branch August 11, 2020 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants