Closed (fixed)
Project:
Node and Comments Form Settings
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Nov 2009 at 20:44 UTC
Updated:
15 Mar 2011 at 18:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
lelizondo commentedcommited
Comment #2
dddave commentedThis doesn't seemed to be fixed. Could be because the OP did not offer something committable. ;)
Played quite a while with this feature but wasn't able to succeed.
Comment #3
lelizondo commentedI didn't actually tried installing other language to see if it was working, I just applied the change.
Did you try the dev version?
Comment #4
castawaybcn commentedSorry if my initial post led you to believe that there was a solution there.
What I actually meant is that I tried something and did not work, so I am also quite surprised to see my unsuccessful attempt commited...
Comment #5
lelizondo commentedOk, now I get it, I saw just the two lines of code and thought that I forgot to make 'Save' translatable.
I'll look into it to see what's causing the bug.
Comment #6
lelizondo commentedThe problem has been solved. For reference, the correct way to translate a string with a variable_get is to wrap the variable_get function inside the t() function.
Take a look at #611492: String is untranslatable: variable_get need to be wrapped by t function
Please close #696332: Save button on comments broken if it solves itself, I didn't have any problem.
Comment #7
castawaybcn commentedthanks so much for the fix and the (very) useful information!
Comment #8
dddave commentedPerhaps a hint could be added about how to properly translate the button text. I would guess that most people try to enter different texts into the 'button text' field for each language they use. They could use a hint that they have to use the i18n translation feature.
Comment #9
dddave commentedSorry for reactivating but Drupal complains:
Comment #10
lelizondo commentedI don't know how to solve this, I'll take a look in the forums to see what can I find. My guess is you'll have to translate only the default value, in this case: 'Save', if I take the variable_get function out of the t() function, the string won't be translated.
I'll try to translate this module to spanish to replicate the problem.
Comment #11
dddave commentedArgh! This translation stuff makes my head explode. I had one of my content types I am using for testing already with a translated submit button. So unless you stumble upon some codestyle errors or some t() rules this can be set to fixed again.
Comment #12
lelizondo commentedComment #14
Gabriel R. commented@castawaybcn in OP: That's not where you want to add the t(). I notice that the current version module currently has your change implemented, which is not a good idea IMHO.
Instead, the t() should be added to where the strings are being displayed.
See the attached file. Roll your own patch.
Comment #15
Gabriel R. commentedAnd here's a patch, I hope it's right.
Comment #16
lelizondo commentedThanks, I'll commit soon
Comment #17
skizzo commentedpatch fails to apply to current 6.x-1.x-dev version (2010-07-11)
or has it been already committed ???
Comment #18
lelizondo commentedfixed in 6.x-2.x
reopen if necessary