Skip to content
Snippets Groups Projects
Commit 7aa20d30 authored by Steven Wittens's avatar Steven Wittens
Browse files

- #27668: Replace deprecated tags/attributes with XHTML/CSS in locale.

- (#15121) Improve string cut-off for locale table
parent 31ebc329
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -58,7 +58,7 @@ function _locale_admin_manage_screen() { ...@@ -58,7 +58,7 @@ function _locale_admin_manage_screen() {
} }
} }
return form(theme('table', $header, $rows) . form_submit(t('Save configuration')), 'POST', url('admin/locale')); return form(theme('table', $header, $rows) . form_submit(t('Save configuration')), 'post', url('admin/locale'));
} }
/** /**
...@@ -106,7 +106,7 @@ function _locale_admin_import_screen() { ...@@ -106,7 +106,7 @@ function _locale_admin_import_screen() {
$form .= form_select(t('Import into'), 'langcode', '', $languages, t('Choose the language you want to add strings into. If you choose a language which is not yet set up, then it will be added.')); $form .= form_select(t('Import into'), 'langcode', '', $languages, t('Choose the language you want to add strings into. If you choose a language which is not yet set up, then it will be added.'));
$form .= form_radios(t('Mode'), 'mode', 'overwrite', array('overwrite' => t('Strings in the uploaded file replace existing ones, new ones are added'), 'keep' => t('Existing strings are kept, only new strings are added'))); $form .= form_radios(t('Mode'), 'mode', 'overwrite', array('overwrite' => t('Strings in the uploaded file replace existing ones, new ones are added'), 'keep' => t('Existing strings are kept, only new strings are added')));
$form .= form_submit(t('Import')); $form .= form_submit(t('Import'));
$output = form($form, 'POST', url('admin/locale/language/import'), array('enctype' => 'multipart/form-data')); $output = form($form, 'post', url('admin/locale/language/import'), array('enctype' => 'multipart/form-data'));
return $output; return $output;
} }
...@@ -966,7 +966,7 @@ function _locale_string_language_list($translation) { ...@@ -966,7 +966,7 @@ function _locale_string_language_list($translation) {
$output = ''; $output = '';
foreach ($languages['name'] as $key => $value) { foreach ($languages['name'] as $key => $value) {
if (isset($translation[$key])) { if (isset($translation[$key])) {
$output .= ($translation[$key] != '') ? $key .' ' : "<strike>$key</strike> "; $output .= ($translation[$key] != '') ? $key .' ' : "<em class=\"locale-untranslated\">$key</em> ";
} }
} }
...@@ -1049,8 +1049,7 @@ function _locale_string_seek() { ...@@ -1049,8 +1049,7 @@ function _locale_string_seek() {
$arr[$locale->lid]['source'] = $locale->source; $arr[$locale->lid]['source'] = $locale->source;
} }
foreach ($arr as $lid => $value) { foreach ($arr as $lid => $value) {
$source = htmlspecialchars($value['source']); $rows[] = array(array('data' => check_plain(truncate_utf8($value['source'], 150, FALSE, TRUE)) .'<br /><small>'. $value['location'] .'</small>'), array('data' => _locale_string_language_list($value['locales']), 'align' => 'center'), array('data' => l(t('edit'), "admin/locale/string/edit/$lid"), 'class' => 'nowrap'), array('data' => l(t('delete'), "admin/locale/string/delete/$lid"), 'class' => 'nowrap'));
$rows[] = array(array('data' => (strlen($source) > 150 ? substr($source, 0, 150) .'...' : $source) .'<br /><small>'. $value['location'] .'</small>'), array('data' => _locale_string_language_list($value['locales']), 'align' => 'center'), array('data' => l(t('edit'), "admin/locale/string/edit/$lid"), 'nowrap' => 'nowrap'), array('data' => l(t('delete'), "admin/locale/string/delete/$lid"), 'nowrap' => 'nowrap'));
} }
$request = array(); $request = array();
...@@ -1088,7 +1087,7 @@ function _locale_string_seek_form() { ...@@ -1088,7 +1087,7 @@ function _locale_string_seek_form() {
$form .= form_radios(t('Search in'), 'searchin', ($query->searchin ? $query->searchin : 'all'), array('all' => t('All strings in that language'), 'translated' => t('Only translated strings'), 'untranslated' => t('Only untranslated strings'))); $form .= form_radios(t('Search in'), 'searchin', ($query->searchin ? $query->searchin : 'all'), array('all' => t('All strings in that language'), 'translated' => t('Only translated strings'), 'untranslated' => t('Only untranslated strings')));
$form .= form_submit(t('Search')); $form .= form_submit(t('Search'));
$output = form(form_group(t('Search strings'), $form), 'POST', url('admin/locale/string/search')); $output = form(form_group(t('Search strings'), $form), 'post', url('admin/locale/string/search'));
return $output; return $output;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment