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

Repeater Field Translation Not Displayed #175

Open
dominiclooser opened this issue Aug 29, 2018 · 1 comment
Open

Repeater Field Translation Not Displayed #175

dominiclooser opened this issue Aug 29, 2018 · 1 comment

Comments

@dominiclooser
Copy link

[BUG]

I have the same problem as issue #90, but could not solve it with accessing
the content with get(), as suggested there.

I have a contenttype projects with a repeater field descriptions, which itself
has fields content and label. content and label are translatable (en and de).
the german translation does not get displayed, but is in the database (i am not sure
if its at the right place: its in dedata under descriptions key).

I experimented with different ways of accessing the data in twig and recreating the
data in the database. everything without success. sometimes, under circumstances
which seem very random, the german translation got displayed. for example when
i when i access a single project with setcontent project = 'projects/2' . if i sort
the projects differently, sometimes the german translation got displayed too. but
i didn't see a clear pattern.

as said, the workaround with project.get('descriptions')[0].get('content') did not work for me.
so i am running out of ideas. what is strange too, i got another contenttype with
a repeating field and there the tranlsation works fine.

projects:
   name: Projects
   singular_name: Project
   viewless: true
   default_status: published
   title_format: [title]
   fields:
      title:
         type: text
         translatable: true
         group: content
         variant: inline
         class: large
      color:
         type: text
         variant: inline
      start_year:
         type: integer
         label: Start Year
      end_year:
         type: integer
         label: End Year
      ongoing:
         type: checkbox
      images:
         type: imagelist
         translatable: true
      descriptions:
         type: repeater
         translatable: true
         fields:
            content: 
               type: html
               translatable: true
            label:
               type: text
               translatable: true
               variant: inline
      locale:
         type: locale
      dedata:
        type: hidden
      deslug:
         type: locale_data
         index: true
      endata:
         type: hidden
      enslug:
         type: locale_data
         index: true
- setcontent projects = 'projects'
- for description in project.get('descriptions')
    .text != description.get('content')
(harp)

Details

  • Translate Version: 4.1.1
  • Install type: [ Extension Repository ]
  • Bolt Version: 3.5.7
  • PHP version: 7.2.1
@SvanteRichter
Copy link
Contributor

I experimented with different ways of accessing the data in twig and recreating the
data in the database. everything without success. sometimes, under circumstances
which seem very random, the german translation got displayed. for example when
i when i access a single project with setcontent project = 'projects/2' . if i sort
the projects differently, sometimes the german translation got displayed too. but
i didn't see a clear pattern.

Could you please make exact steps and configs to reproduce this in a sqlite setup, and I'll have a look at it. The repeater support has been iffy, but it should at least be consistent under the same conditions.

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

No branches or pull requests

2 participants