Problem/Motivation

Analysis CSV isn't completely translated and current code is messy.

Proposed resolution

  1. Refactor component localizations to component spesific files, similarly to what's happening in webform/components/*.inc files
  2. Add missing translations where needed

Remaining tasks

Code this

User interface changes

none

API changes

New webform style "component hooks".

Original report by @mikran

Similarly to #2187583: String translations are not applied to webform result analysis page strings data export headers and select values are not translated.

I'll start working on this.

Comments

GDrupal’s picture

@mikran Great! Note that automated testing is enabled at least covering localization by string translation. If you could include a test + feature will be super cool.

mikran’s picture

mikran’s picture

Status: Active » Needs work
StatusFileSize
new3.93 KB

This isn't ready yet by far and requires patch from above issue to function even partially. It takes quite a bit longer to fix this than I initially thought. But here is what I got so far.

GDrupal’s picture

Great Job mikran! Just wait for quicksketch feedback...and take from there.

GDrupal’s picture

mikran’s picture

StatusFileSize
new4.69 KB

rerolled & small updates

mikran’s picture

Title: Batched data export is not translated. » Refactor component localization process and add missing translations.
Issue summary: View changes

This is stupid to add ifs for each component type. I'll refactor the component translations completely

mikran’s picture

StatusFileSize
new13.83 KB

Attached patch does the refactoring, and adds 3 new "component hooks": _webform_localization_csv_header_component(), _webform_localization_csv_data_component() and _webform_localization_analysis_data_component().

mikran’s picture

Assigned: mikran » Unassigned
StatusFileSize
new15.61 KB

Select element is now fully localized in CSV exports. That's all I'm adding for now.

mikran’s picture

StatusFileSize
new15.62 KB

syntax error fixed

joseph.olstad’s picture

Status: Needs work » Needs review

I'm guessing that with recent changes the patch will need a reroll as it probably won't apply.
but try anyway.

The last submitted patch, 9: refactor-2209419-9.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 10: refactor-2209419-10.patch, failed testing.

The last submitted patch, 6: 2209419-6.patch, failed testing.

The last submitted patch, 8: refactor-2209419-8.patch, failed testing.

joseph.olstad’s picture

Status: Needs work » Needs review
StatusFileSize
new8.29 KB

Same patch as mikran rerolled , simpletest needs a new file to review.

Status: Needs review » Needs work

The last submitted patch, 16: refactor-2209419-16.patch, failed testing.

joseph.olstad’s picture

Status: Needs work » Needs review
StatusFileSize
new8.28 KB

refactored due to a small change in webforms_localization.test that was done recently (during the fury of fixing head tests)
$admin_user was changed to $adminuser
and
$normal_user was changed to $normaluser

Status: Needs review » Needs work

The last submitted patch, 18: refactor-2209419-18.patch, failed testing.

joseph.olstad’s picture

Ok, patch 18 gets us down to only 24 fails and 0 exceptions (from 36 fails and 10 exceptions on patch 16)

still some work to do.

joseph.olstad’s picture

Status: Needs work » Needs review
StatusFileSize
new15.65 KB

my last patch was missing a bunch of new files that was in patch 10 , I just created a new patch with all the files and the minor fix from the last patch.

Lets try this again.

Status: Needs review » Needs work

The last submitted patch, 21: refactor-2209419-20.patch, failed testing.

joseph.olstad’s picture

Status: Needs work » Needs review
StatusFileSize
new17.02 KB

  • mikran authored 460d7bc on 7.x-4.x
    Issue #2209419 by mikran, joseph.olstad: Refactor component localization...
joseph.olstad’s picture

Status: Needs review » Fixed

Thanks mikran, great work! just had to do some minor refactoring to get it to pass testing.

Committed and attributed.

Status: Fixed » Closed (fixed)

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