Commit db5a54cc authored by jcnventura's avatar jcnventura

Fix for #364535: add some warnings about incompatibility of custom strings and...

Fix for #364535: add some warnings about incompatibility of custom strings and the localization mechanism
Add explanation of the relation between the type- and node-specific print settings
Updated all translations (Dutch 100% thanks to joostvdl)
parent 98df4e4a
......@@ -317,6 +317,8 @@ function print_html_settings() {
* @ingroup forms
*/
function print_main_strings_settings() {
drupal_set_message(t("Saving these strings will disable their translation via Drupal's language system. Use the reset button to return them to the original state."), 'warning');
$form['print_main_text'] = array(
'#type' => 'fieldset',
'#title' => t('Text strings'),
......@@ -356,6 +358,8 @@ function print_main_strings_settings() {
* @ingroup forms
*/
function print_html_strings_settings() {
drupal_set_message(t("Saving these strings will disable their translation via Drupal's language system. Use the reset button to return them to the original state."), 'warning');
$form['print_html_text'] = array(
'#type' => 'fieldset',
'#title' => t('Text strings'),
......
......@@ -128,3 +128,31 @@ function print_schema() {
return $schema;
}
/**
* Update to version 6.x-1.2
*/
function print_update_6003() {
// Delete custom text strings set to the default
$ret = array();
$vars = array(
'print_html_link_text' => 'Printer-friendly version',
'print_text_published' => 'Published on %site_name',
'print_text_by' => 'By %author',
'print_text_created' => 'Created %date',
'print_text_source_url' => 'Source URL',
'print_text_retrieved' => 'retrieved on %date',
'print_text_links' => 'Links',
);
$t = get_t();
foreach ($vars as $name => $default) {
if (variable_get($name,'') == $t($default)) {
variable_del($name);
}
}
menu_rebuild();
return $ret;
}
......@@ -376,6 +376,7 @@ function print_form_alter(&$form, $form_state, $form_id) {
$form['print']['print_display']['#default_value'] = isset($node->print_display) ? $node->print_display : PRINT_TYPE_SHOW_LINK_DEFAULT;
$form['print']['print_display_comment']['#default_value'] = isset($node->print_display_comment) ? $node->print_display_comment : PRINT_TYPE_COMMENT_LINK_DEFAULT;
$form['print']['print_display_urllist']['#default_value'] = isset($node->print_display_urllist) ? $node->print_display_urllist : PRINT_TYPE_URLLIST_DEFAULT;
$form['print']['label']['#value'] = '<p><em>'. t('The settings below only apply in case the corresponding type-specific setting is also enabled (except for the "Show link in individual comments").') .'</em></p>'. $form['print']['label']['#value'];
}
}
}
......
......@@ -146,6 +146,8 @@ function print_mail_settings() {
* @ingroup forms
*/
function print_mail_strings_settings() {
drupal_set_message(t("Saving these strings will disable their translation via Drupal's language system. Use the reset button to return them to the original state."), 'warning');
$form['print_mail_text'] = array(
'#type' => 'fieldset',
'#title' => t('Text strings'),
......
......@@ -117,3 +117,29 @@ function print_mail_schema() {
return $schema;
}
/**
* Update to version 6.x-1.2
*/
function print_mail_update_6003() {
// Delete custom text strings set to the default
$ret = array();
$vars = array(
'print_mail_link_text' => 'Send to friend',
'print_mail_text_subject' => '!user has sent you a message from !site',
'print_mail_text_message' => 'Message from sender',
'print_mail_text_content' => '',
'print_mail_text_confirmation' => 'Thank you for spreading the word about !site.',
);
$t = get_t();
foreach ($vars as $name => $default) {
if (variable_get($name,'') == $t($default)) {
variable_del($name);
}
}
menu_rebuild();
return $ret;
}
......@@ -263,6 +263,8 @@ function _print_pdf_tools() {
* @ingroup forms
*/
function print_pdf_strings_settings() {
drupal_set_message(t("Saving these strings will disable their translation via Drupal's language system. Use the reset button to return them to the original state."), 'warning');
$form['print_pdf_text'] = array(
'#type' => 'fieldset',
'#title' => t('Text strings'),
......
......@@ -105,3 +105,25 @@ function print_pdf_schema() {
return $schema;
}
/**
* Update to version 6.x-1.2
*/
function print_pdf_update_6003() {
// Delete custom text strings set to the default
$ret = array();
$vars = array(
'print_pdf_link_text' => 'PDF version',
);
$t = get_t();
foreach ($vars as $name => $default) {
if (variable_get($name,'') == $t($default)) {
variable_del($name);
}
}
menu_rebuild();
return $ret;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment