I use the translate view button to go to admin/structure/views/view/%view_name/translate/fr, translated the strings and it won't save, if I hit save button , nothing is stored. The status is still "not translated"

Most of my views translations aren't saved, those with these fields :

  • default field:taxonomy_term_data:name:alter:text
  • default field:field_data_field_departures_link:field_departures_link:label
  • default area:views:area:content
  • default field:field_data_field_photos:field_photos:alter:text

(...)

Please find attached some of the views that I can't translate. The first one is a view that I was able to translate, the only one with no problem, with the status translated.

It's just on one of them that I'm blocked by apparently a security feature:
The submitted string contains disallowed HTML: <p>[street]</ br> [city], [postal_code]</ br> [country]</p>
So I guess we'll also a need a solution for that, like disabling one field for translation or allow HTML for trusted user...

On the other views concern the translation not saved issue.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

miro_dietiker’s picture

The HTML limitation is from localization / drupal core.

You need latest views dev and i18nviews dev. There have been recent commits. Do you?

Jerome F’s picture

I use :

drupal 7.2
Views translation 7.x-3.x-dev
Views 7.x-3.x-dev (2011-May-29)

Jerome F’s picture

So for a complex view the only workaround to make it multilingual is to make it monolingual?

I mean to filter the content by language or to go in the "Advanced" section under "Other > Query settings: Settings
Down the form there's a "Field Language" option, and select one language for each display.

...and to clone the display for each language? ...and don't use with views translation anyway?

If the HTML limitation is from localization / drupal core. It means either you don't use HTML in rewrite rules or you use custom formatters, or else you won't be able to translate your views with views translation, isn't it? (I think this is an other issue anyways)

Jerome F’s picture

Wait a minute, it's been several days I couldn't save my views translation and it did just work. I'm going to try to translate all of them...

And I think the HTML issue was simply a typo! </ br> instead of <br /> -_-'

Jerome F’s picture

Status: Active » Fixed

It works ok with Chaos tool suite 7.x-1.0-beta1 + Internationalization Views 7.x-3.x-dev (2011-May-29) + views 7.x-3.x-dev (2011-Jun-08) + yesterday's i18n last git

Jerome F’s picture

Title: translate view - views string translation not saved with most default fields » translate view - views translation not saved when views displays are just blocks

Note:
I have a view with just 2 block displays, that I could not translate last days, before I updated i18n to last git. Today also, the translation was not saved... That's wired because my other views with page displays were translated ok today.
I added a page display and then the translation was saved. Then I removed the page, and not only could I edit the translation I created, but I also could add a new translation in an other language, which is saved all right.
I wonder if that was a cache problem or so, but I had the cache flushed.
Anyways, this looks more like one of the strange things that can happen sometimes with a computer than like a bug.

Jerome F’s picture

It seems to be kind of an update problem. Anyways no worries, all the views I couldn't translate in the past days were tricked by this workaround I created a new page display, translated them and removed the unneeded page display them.

Jerome F’s picture

Title: translate view - views translation not saved when views displays are just blocks » translate view - views translation not saved

I wonder if this is caused because I used to use an old dev version of i18n and didn't uninstall it properly, before upgrading? http://drupal.org/node/1070690#comment-4158684

miro_dietiker’s picture

You currently need to use i18n and i18nviews dev...
There's still pretty much progress in quality and features with those modules.

Jerome F’s picture

Yes everything works ok now, I was just posting user feedback in case anyone is stuck as well.
The last thing that isn't displayed translated is the header or footer: http://drupal.org/node/1182210

calculus’s picture

Jerome thank you for the "trick", but i still have a problem.

I created a view, i translated that view (thanks to you) but i still get no changes in frontend view. Any suggestions?

latest views, i18n, i18n_views

Jerome F’s picture

Make sure you have configured i18n correctly (in admin/config/regional/language/configure check URL, Session and User for example + in admin/config/regional/language leave english as default from the beginning and never change it + activate the block Language switcher (User interface text) in admin/structure/block)

In views translate your views using the 'translate view' button in the dropdown menu where the displays are listed (or go to admin/structure/views/view/your_view_machine_name/translate/langcode).
clic on the translate button for your languages and translate each string. Save...

If that's not enough, describe what you did, give us more details.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Gastonia’s picture

Im having an issue with this as well. Are you saying that the fix is to install il8n views project? Im using il8n 7.x-1.0-rc3 on aug 8 2011, ctools 7.x 1.0 rc1 on june 28, and views 7.x 3.0 rc1

All of the functionality is there, it's just not saving. The thread is a bit unclear to me. What actually fixes this?

For me, it's not saving the title field of my block. Im only creating a block, page is unchecked.

Gastonia’s picture

Status: Closed (fixed) » Active
Gastonia’s picture

Status: Active » Closed (fixed)

I think I found the solution. My primary language is English. For a block title, I tried to title the translated language first, and it would never save because the title for the English was blank. Once I filled in the English title and saved it, I was then able to save the title in the other language. I didn't need any additional modules. Hope this helps someone. Marking issue as fixed.

R13ose’s picture

Title: translate view - views translation not saved » views translation not saved (related to block display)
Status: Closed (fixed) » Active

I had the same problem as above, and I had 1 Block and 2 Page Displays. When I deleted the Block Display everything worked out correctly. I wasn't using my Block Display at all but still enabled, it was in the disabled area in the Blocks.

I believe if blocks are causing a problem for everyone, I would say we either document this better or come up with a patch that will make blocks work better with translation.

rolfmeijer’s picture

Same problem here. The workaround I found is to reorder the displays, so that the first display is not a block.
I used to have a block, than three pages and than a block again and the translations were not saved. I now have three pages and than two blocks and the translations are saved.

miro_dietiker’s picture

I cannot follow that block special case. Please provide a clean setup case and explain when it doesn't work.
Don't forget to use the latest version when reporting!

webflo’s picture

Status: Active » Postponed (maintainer needs more info)

Still an issue? Please update to latest views-dev and i18nviews-dev and run string refresh (http://example.com/admin/config/regional/translate/i18n_string)