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

Modify definitions to translate content block #20

Merged
merged 1 commit into from Aug 7, 2018

Conversation

MebinAbraham
Copy link
Contributor

@MebinAbraham MebinAbraham commented Aug 1, 2018

Needed to the updated translation of definitions since the structure was changed for: https://trello.com/c/rC82gUmp/2180-move-significant-changes-to-use-definition-pattern

Make sure translation still works as expected.

Related PRs:

  1. Update question definitions to support multiple content eq-survey-runner#1712
  2. Update definition requirements eq-schema-validator#72

@benhowes
Copy link
Contributor

benhowes commented Aug 1, 2018

@MebinAbraham depending on our discussion over at ONSdigital/eq-survey-runner#1712, it might make sense to also test translating the list/title

for definition in container['definitions']:
translate_container(definition, context, translations)

for item in definition['content']:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should define a common function to extract from a "content" type? seeing as we use the pattern in multiple places?

@MebinAbraham
Copy link
Contributor Author

@jonnyshaw89 Re-review please.

@MebinAbraham MebinAbraham force-pushed the update-translations-for-definitions branch from 528ce96 to e58d111 Compare August 6, 2018 14:56
translate_container(definitions, context, translations)
for definition in container['definitions']:
translate_container(definition, context, translations)
translate_block_content(definition, context, translations)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this rename to translate_content_block maybe? as its not the block that this is now just used for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonnyshaw89 Sorted.

- updated previously missed translation json sample file
- added translation support of content types for definitions
@MebinAbraham MebinAbraham force-pushed the update-translations-for-definitions branch from 1232922 to 9c5a748 Compare August 7, 2018 13:38
@benhowes benhowes merged commit 6419c0f into master Aug 7, 2018
@benhowes benhowes deleted the update-translations-for-definitions branch August 7, 2018 13:42
iwootten pushed a commit that referenced this pull request Feb 21, 2019
# This is the 1st commit message:

Add support for translation of schemas using Pot Files

# This is the commit message #2:

Fix broken tests

# This is the commit message #3:

Correct spacing

# This is the commit message #4:

Remove test output from repo

# This is the commit message #5:

Label schema appropriately

# This is the commit message #6:

Tidy up naming

# This is the commit message #7:

Move main method into extractor class

# This is the commit message #8:

Use static methods where appropriate

# This is the commit message #9:

Add csv tranform test

# This is the commit message #10:

Use argparse throughout

# This is the commit message #11:

Correct spacing

# This is the commit message #12:

Remove common methods and put them in one place

# This is the commit message #13:

Remove common methods and put them in one place

# This is the commit message #14:

Correct output path

# This is the commit message #15:

Remove output from test

# This is the commit message #16:

Create paths when they don't exist

# This is the commit message #17:

Move translator class into separate file

# This is the commit message #18:

Correct Spacing

# This is the commit message #19:

Remove ability to transform to xls

# This is the commit message #20:

Remove unused import

# This is the commit message #21:

Remove unneccessary translation object call

# This is the commit message #22:

Add missing method

# This is the commit message #23:

Correct spacing

# This is the commit message #24:

Remove all xls transforms from repo

# This is the commit message #25:

Add newline to header to be importable

# This is the commit message #26:

Remove all shell scripts and replace with python

# This is the commit message #27:

Workaround for travis numpy weirdness

# This is the commit message #28:

Block empty legal_basis

# This is the commit message #29:

Block empty legal_basis

# This is the commit message #30:

Block missin legal basis

# This is the commit message #31:

Remove csv conversion from extractor

# This is the commit message #32:

Update readme

# This is the commit message #33:

Remove TODO's

# This is the commit message #34:

Only allow po files

# This is the commit message #35:

Remove condition

# This is the commit message #36:

Only ask for output path on save

# This is the commit message #37:

Remove context to meet Adam's original method calls

# This is the commit message #38:

Correct argument description:

# This is the commit message #39:

Use cwd for source of parent

# This is the commit message #40:

Remove '_translate_' from naming

# This is the commit message #41:

Remove duplicate file

# This is the commit message #42:

Don't attempt to translate if template but no schema

# This is the commit message #43:

Add better description

# This is the commit message #44:

Address comment

# This is the commit message #45:

Remove context from everything in extract template except answer options. Only print answer id's as template comments
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.

None yet

4 participants