In connection with my next issue, i see, the latest dev you try to fix page titles translation problem. It's nice, but not so good.
drupal_set_title(t($title));
First, this without check_plain() is insecure.
Second, raw user input doesn't recommend to use with t(). We discussed this with Bálint Kléri, but can't figured user friendly and "drupalish" way together.
The correct workflow should be use i18n_variables in this case. Or enable use the original page title generation, this is another issue, I'm writing.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | nodeformsettings-translate-title-1182188-7.patch | 1.41 KB | osopolar |
| #6 | nodeformsettings-1182188-6.patch | 1.44 KB | achton |
Comments
Comment #1
szantog commentedThe related issue: #1182192: Page titles should be optional, not required.
Comment #2
lelizondo commentedYeah, the right way to do this apparently is with:
Comment #3
szantog commentedNo, i'm afraid, this isn't the right way:
http://groups.drupal.org/node/15177
http://hojtsy.hu/blog/2011-may-19/drupals-multilingual-problem-why-t-wro...
Comment #4
szantog commentedAnd the same problem with submit button text:
Default value in t() is completely wrong, when I submit the node settings form.
nfs_submit value in english: Submit
nfs_submit value in hungarian: Beküldés
If I edit the node type form in hungarian langauage, i get the default value from t(). In this case 'Beküldés'. I save the node type settings form, the variable value would be saved as 'Beküldés'.
Then print out trough another t() on node add/edit form, the wrong hungarian text will be inserted as translation default text.
Comment #5
atlea commentedHi,
I noticed my locales_source filling up with node titles after enabling this module (7.x). Running t() on user input is plain WRONG. Why would you want to translate the title anyway?
should probably be
??
Comment #6
achtonHere is my take on this (patched against 2.0 release, sorry).
Comment #7
osopolarPatch for current dev. Practically the same as in #7, but without
strtolower. So it's almost RTBC ;)Comment #9
kssundar commentedPorted to 6.x-3.x