Provide option to replace Remember me with other text.
I do not have a patch for this change because I have another uncommited change altering the line numbers.
At the end of the admin settings form, remember_me.admin.inc, at about line 62:
$form['remember_me_checkbox_title'] = array(
'#type' => 'textfield',
'#title' => t('Remember me text'),
'#default_value' => variable_get('remember_me_checkbox_title', 'Remember me'),
'#description' => t('text displayed in the login forms.'),
);
In the remember_me.module remember_me_form_alter():
'#title' => t(variable_get('remember_me_checkbox_title', 'Remember me')),
Comments
Comment #1
nickl commentedWhy would we not use the translation, t() function, for translations and turn it into a system variable?
You should be able to change the value of any t() wrapped text in drupal. See the documentation on translation...
Comment #2
peterx commentedt() is used to translate the text to a different language. The title substitution variable proposed here is to let administrators change the actual text to something completely different. My use case is moving a site into Drupal. The site owners want the "Remember me" text replaced by the words used on the previous site so visitors will not be confused by the change.
Comment #3
peterx commentedThe change as a patch for anyone who wants it.
Comment #4
nickl commentedI know drupal changes quickly and it is difficult to keep up most of the time but I am sure there would've been a huge fuss if we stopped using t() for changing ad-hoc text, which I am having difficulty to find. Yes t() is for translation, wouldn't you consider it still translation from one system to another besides t() is also for Change default strings (text) without using full translation system or it used to be afaik.
Indeed we are not even hacking the language with this use case:
Please don't tell me you need to hack core too when you need to change Blog to Journal for example? Not that I am all that against hacking core either but what you are proposing seems counter productive and certainly not the intended use of drupal variables.
Here is an interesting article on the topic: You're Doing It Wrong: Don't hack Drupal core to change text
So please don't hack remember_me module either, we try so hard to be drupal compliant, rather use the String Overrides module if you really don't want to write the code and if you do love writing code please wrap the pertinent text in t() so the rest of us may change it.
@peterx I appreciate your contributions especially for submitting a patch to top but surely you will find better reward applying yourself to the many other things that actually need fixing. You wont believe how much you learn when submitting patches that you actual do feel strongly about and will do what it takes to get committed. There is not much use for a patch that was not intended for a commit. It makes updating modules difficult to impossible and new releases are important because they fix problems and need to be updated. I never claim to know everything about drupal but I learned from reading the documentation and working with other developers here on drupal. You can believe me when I say: We the drupal community are here to help, we do it out of our own free will and we won't say go RTFM to be spiteful, it's there for a reason and does not need to be duplicated here as well. nuff said