45 $reg =
"/([\\xc0-\\xff][\\x80-\\xbf]*)/";
56 $s = parent::normalizeForSearch(
$s );
74 if ( empty( $chosenIntervals ) ) {
75 $chosenIntervals = [
'centuries',
'years',
'days',
'hours',
'minutes',
'seconds' ];
82 foreach ( $intervals as $intervalName => $intervalValue ) {
85 $message =
wfMessage(
'duration-' . $intervalName )->numParams( $intervalValue );
86 $segments[] = $message->inLanguage( $this )->escaped();
89 return implode(
'', $segments );
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
segmentByWord( $string)
Eventually this should be a word segmentation; for now just treat each character as a word.
formatDuration( $seconds, array $chosenIntervals=[])
Takes a number of seconds and turns it into a text using values such as hours and minutes.
Base class for language-specific code.
static insertSpace( $string, $pattern)
getDurationIntervals( $seconds, array $chosenIntervals=[])
Takes a number of seconds and returns an array with a set of corresponding intervals.
foreach( $mmfl['setupFiles'] as $fileName) if($queue) if(empty( $mmfl['quiet'])) $s