Project:
View Revisions: Issue #52402 | [ All Revisions ] [ Back to Issue ] | ||
Summary | 0052402: WrapTextParams: not working with $ symbol and when the name of the params appears more than once | ||
Revision | 2023-05-10 12:10 by migueldejuana | ||
Description | WrapTextParams makes parameters of a message to transfrom into a span that can be set css styles. but it firsts reemplace the parameters and then replace the params with the html span components In this example label: 'a %1 b %2 c' Problem 1: %1 = $ -> it doesn't create the span because the regex don't recognize it since the $ it has meaning in regex Example: Message: "You are going to deposit $8 in USA Cash" Parameters: ['$8', 'USA Cash'] Expected: "You are going to deposit <span>$8</span> in <span>USA Cash</span>" Received: "You are going to deposit $8 in <span>USA Cash</span>" Problem 2: %2 = c -> it gives an error in console because it setting the same span in two ocassions, since the c value exists so try to create 2 spans for it instead one. Example: Parameter: "Cash" Message: "You are going to add Cash with Cashier shift event." Expected: "You are going to add [[Cash]] with Cashier shift event." Received: "You are going to add [[Cash]] with [[Cash]]ier shift event." |
||
Revision | 2023-05-10 08:38 by migueldejuana | ||
Description | WrapTextParams makes parameters of a message to transfrom into a span that can be set css styles. but it firsts reemplace the parameters and then replace the params with the html span components In this example label: 'a %1 b %2 c' Problem 1: %1 = $ -> it doesn't create the span because the regex don't recognize it since the $ it has meaning in regex Problem 2: %2 = c -> it gives an error in console because it setting the same span in two ocassions, since the c value exists so try to create 2 spans for it instead one. Example: Parameter: "Cash" Message: "You are going to add Cash with Cashier shift event." Expected: "You are going to add [[Cash]] with Cashier shift event." Received: "You are going to add [[Cash]] with [[Cash]]ier shift event." |
||
Revision | 2023-05-09 19:40 by migueldejuana | ||
Description | WrapTextParams makes parameters of a message to transfrom into a span that can be set css styles. but it firsts reemplace the parameters and then replace the params with the html span components In this example label: 'a %1 b %2 c' Problem 1: %1 = $ -> it doesn't create the span because the regex don't recognize it since the $ it has meaning in regex Problem 2: %2 = c -> it gives an error in console because it setting the same span in two ocassions, since the c value exists so try to create 2 spans for it instead one |
Copyright © 2000 - 2009 MantisBT Group |