Comments

superspring’s picture

Title: Problems with Token Module and Webfor Locationization » Problems with Token Module and Webform Localization
Assigned: superspring » Unassigned
Status: Active » Needs review
StatusFileSize
new2.81 KB

Here is a patch which allows this.

liuba’s picture

StatusFileSize
new1.25 KB

Thank you, superspring, for the patch.
Here is another patch that should be applied straight after superspring's patch to fix an issue with mark up component translation

liuba’s picture

StatusFileSize
new1.07 KB

Rolling the patch from the module directory, this is to replace patch in #2

liuba’s picture

StatusFileSize
new764 bytes

One more patch to integrate the fixes with the patch to resolve Unnecessary check_plain() for radio labels and select options via i18n_string() issue

jweowu’s picture

StatusFileSize
new2.88 KB

#1781266: Unnecessary check_plain() for radio labels and select options via i18n_string() was committed, so #4 can be ignored.

#1796748: Translation of markup component: HTML is parsed an printend out was committed, so #2 and #3 can be ignored (and in fact should never have been necessary -- the patch from that issue was committed before this issue ever existed, and the original patch here incorrectly reverted the commit. Adding new cumulative patches to resolve that mistake has just increased the confusion here).

Re-rolling the original patch.

jweowu’s picture

StatusFileSize
new3.29 KB

Switching from token_replace() to webform_replace_tokens(), which works in some situations where the other function didn't.

joseph.olstad’s picture

Issue summary: View changes
Status: Needs review » Needs work

lets try testing patch 6

joseph.olstad’s picture

Status: Needs work » Needs review
joseph.olstad’s picture

joseph.olstad’s picture

Status: Needs review » Needs work

patch 6 needs a reroll

joseph.olstad’s picture

StatusFileSize
new4.21 KB

Here's a rerolled patch **EDIT**however the function webform_replace_tokens() doesn't exist
it might have been from a previous version of the webforms module or perhaps someone forgot to include it with the above patches.

there is something similar in the webforms module called _webform_filter_values()

so still work to do but this patch should help get us closer.**EDIT** edit, ignore this, I was looking at the 3.x branch of webform which does not have the webform_replace_tokens function however the 7.x-4.x branch does indeed have this function.

So, the patch could possibly work however these token replacements might not be necessary anymore because of recent fixes upstream to the webforms module. Still worth testing this out though, give it a try.

joseph.olstad’s picture

Version: 7.x-1.x-dev » 7.x-4.x-dev
Status: Needs work » Needs review

this is a really old issue, was tagged for the 1.x branch, might not be needed for the 4.x branch. Putting it to a test anyway though.

joseph.olstad’s picture

due to this commit for this issue:Refactor component localization process and add missing translations. the above patch very likely needs to be refactored.

joseph.olstad’s picture

Status: Needs review » Needs work
joseph.olstad’s picture

Status: Needs work » Needs review
StatusFileSize
new4.25 KB

ok, I refactored this patch, try testing it, I haven't tested it yet.

joseph.olstad’s picture

Status: Needs review » Fixed

latest patch passes all tests

  • joseph.olstad committed 1c1ecef on 7.x-4.x
    Issue #1812776 by liuba, joseph.olstad, jweowu, superspring: Problems...

Status: Fixed » Closed (fixed)

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

jweowu’s picture

Hi joseph.olstad,

This is a slightly arbitrary place to mention it, but in your release notes and in comments like #13 above, you can/should use the special markup syntax for referring to issues, so that people can easily follow the links, and see the current status:

References to project issues in the form of #1234: "Mark all as read" in forums. (or #1234: "Mark all as read" in forums. for comments) turn into links automatically, with the title of the issue appended. The status of the issue is shown on hover. If '@' is appended (e.g. #1234: "Mark all as read" in forums.), the user the issue is assigned to will also be printed.

-- https://www.drupal.org/filter/tips

e.g. #1812776: Problems with Token Module and Webform Localization

joseph.olstad’s picture

Great tip jwoewu, yes I should have used that type of project reference, I will do that from now on thanks!