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

Strange translation problem #963

Closed
leotiger opened this issue Feb 10, 2017 · 6 comments
Closed

Strange translation problem #963

leotiger opened this issue Feb 10, 2017 · 6 comments

Comments

@leotiger
Copy link

leotiger commented Feb 10, 2017

I have several blueprints defined for a website including a default.yaml and an expo.yaml.

The expo.yaml does not inherit default.yaml but both include a definition for a select form field with the same name but with a slightly different set of options.

When I try to save a page based on expo.yaml in a different language with a select value that is not included in the option set in default.yaml with the same name I receive an error as response indicating that validation failed. The translation .md file is saved with 0 bytes.

If I include the options existing in expo.yaml to the select in default.yaml than I can save the translation without problems.

This indicates to me that the default.yaml plays a roll (I haven't looked into the code) despite the fact that expo.yaml is defined as a complete blueprint without inheritance. Could you look into this?

u

@flaviocopes
Copy link
Contributor

Can you provide those two blueprints, to easily replicate the problem?

@leotiger
Copy link
Author

leotiger commented Feb 10, 2017

Sure, but you won't be able to use them easily as there are a lot of references to private plugins I coded that substitute the whole editing stack of GRAV.

To help you a bit I place here a code reference of the important part:

in expo.yaml we have

                    header.fullwidth:
                      type: select
                      size: long
                      label: Page Style
                      name: fullwidth
                      help: Select a page style
                      default: row
                      options:
                        row: Row (Max width: 1008px)
                        rowfull: Row full (with Grid)
                        rowfullfull: Row (without Grid)

and in defaut.yaml quite the same:

                    header.fullwidth:
                      type: select
                      size: long
                      label: Page Style
                      name: fullwidth
                      help: Select a page style
                      default: row
                      options:
                        row: Row (Max width: 1008px)
                        rowfull: Row full (with Grid)

There's only one difference between the two definitions: rowfullfull is missing in default.yaml. If a page with template expo.yaml is configured to present itself with rowfullfull translation fails. If it's configured with row or rowfull present in both .yamls I encounter no problem.

I prepare a zip with the two blueprints.

Regards.
u

@leotiger
Copy link
Author

Here are the blueprints in question.

blueprints.zip

@leotiger
Copy link
Author

@flaviocopes
Any update on this?

@flaviocopes
Copy link
Contributor

Should be fixed in the latest develop!

@leotiger
Copy link
Author

@flaviocopes
Thanks.

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

2 participants