Browse files

The maximum length of the missing strings to display can be set now. …

…Fixes MDL-8184.

Because the tags <pre>...</pre> are used when displaying original English
version of missing texts, the screen may get very wide. This patch displays
only first 60 characters followed by '...'. This produces better output.
  • Loading branch information...
1 parent fa3bf11 commit f024bea2796539604dae223ad77e3cebb65584bb mudrd8mz committed Jan 15, 2007
Showing with 4 additions and 0 deletions.
  1. +4 −0 admin/lang.php
View
4 admin/lang.php
@@ -46,6 +46,7 @@
define('LANG_DEFAULT_FILE', ''); // default file to translate. Empty allowed
define('LANG_LINK_MISSING_STRINGS', 1); // create links from "missing" page to "compare" page?
define('LANG_DEFAULT_USELOCAL', 0); // should *_utf8_local be used by default?
+ define('LANG_MISSING_TEXT_MAX_LEN', 60); // maximum length of the missing text to display
$mode = optional_param('mode', '', PARAM_ALPHA);
$currentfile = optional_param('currentfile', LANG_DEFAULT_FILE, PARAM_FILE);
@@ -199,6 +200,9 @@
$missinglinkstart = '';
$missinglinkend = '';
}
+ if (strlen($value) > LANG_MISSING_TEXT_MAX_LEN) {
+ $value = substr($value, 0, LANG_MISSING_TEXT_MAX_LEN) . ' ...';
+ }
$o .= "$"."string['".$missinglinkstart.$key.$missinglinkend."'] = \"$value\";<br />";
}
}

0 comments on commit f024bea

Please sign in to comment.