Create a subtitle, but don't do anything funny with it.
494830
protected ChatGlyph createSubtitle (ChatMessage message, int type, Graphics2D layoutGfx,
                                        boolean expires)
    {
        // we might need to modify the textual part with translations, but we can't do that to the
        // message object, since other chatdisplays also get it.
        String text = message.message;
        Tuple<String, Boolean> finfo = _logic.decodeFormat(type, message.getFormat());
        String format = finfo.left;
        boolean quotes = finfo.right;

        // now format the text
        if (format != null) {
            if (quotes) {
                text = "\"" + text + "\"";
            }
            text = " " + text;
            text = xlate(MessageBundle.tcompose(
                             format, ((UserMessage) message).getSpeakerDisplayName())) + text;
        }

        return createSubtitle(layoutGfx, type, message.timestamp, null, 0, text, expires);
    }
1031886
def subtitle(self, txt):
        
        num = len(txt)
        ticks = "-" * num
        print(txt)
        print(ticks)
764833
def fail(self, text=u"FAIL", err=False):
        """"""
        # Do not display spin text for fail state
        self._text = None

        _text = text if text else u"FAIL"
        err = err or not self.write_to_stdout
        self._freeze(_text, err=err)
469901
def _subtitlesAdded(self, path, subNos):
        """"""
        def action(current, count, model, row):
            _setSubNo(current + count, model, row)

        def count(current, nos):
            ret = 0
            for no in nos:
                if current >= no:
                    ret += 1
                    # consider: current = 0, nos = [0, 1, 2, 3]
                    # in that case, current should be prepended by all nos
                    current += 1
            return ret

        self._changeSubNos(path, subNos, count, action)
614179
def _fail(self, message, text, i):
        """"""

        raise ValueError("{}:\n{}".format(message, text[i : i + 79]))
658297
def title(msg):
    """"""
    if sys.platform.startswith("win"):
        ctypes.windll.kernel32.SetConsoleTitleW(tounicode(msg))
653414
def json_formatter(subtitles):
    
    subtitle_dicts = [
        {
            'start': start,
            'end': end,
            'content': text,
        }
        for ((start, end), text)
        in subtitles
    ]
    return json.dumps(subtitle_dicts)
565675
def _skip_newlines(self):
        """"""
        while self._cur_token['type'] is TT.lbreak and not self._finished:
            self._increment()
132829
def _sanitize(text):
    """"""
    d = {'-LRB-': '(', '-RRB-': ')'}
    return re.sub('|'.join(d.keys()), lambda m: d[m.group(0)], text)
446939
function checkSubtitleFiles(options, fileWithHashes) {
    if (options.verbose) {
        _utils.logger.info('Checking existing subtitles...');
    }
    var promises = [];
    var _iteratorNormalCompletion3 = true;
    var _didIteratorError3 = false;
    var _iteratorError3 = undefined;

    try {
        for (var _iterator3 = fileWithHashes[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
            var file = _step3.value;

            promises.push(_utils.fileManager.subtitleExists(options, file));
        }
    } catch (err) {
        _didIteratorError3 = true;
        _iteratorError3 = err;
    } finally {
        try {
            if (!_iteratorNormalCompletion3 && _iterator3.return) {
                _iterator3.return();
            }
        } finally {
            if (_didIteratorError3) {
                throw _iteratorError3;
            }
        }
    }

    return Promise.all(promises);
}
497980
Rule XcomUnit() {
		return Optional(FirstOf(IgnoreCase("cm"), IgnoreCase("pt"), IgnoreCase("in")))
			.label(XcomUnit).suppressSubnodes();
	}
1232993
def censor(self, input_text):
        """"""
        bad_words = self.get_profane_words()
        res = input_text

        for word in bad_words:
            # Apply word boundaries to the bad word
            regex_string = r'{0}' if self._no_word_boundaries else r'\b{0}\b'
            regex_string = regex_string.format(word)  
            regex = re.compile(regex_string, re.IGNORECASE)
            res = regex.sub(self._censor_char * len(word), res)

        return res
1344995
def stop():
    '''
    
    '''
    ret = {'comment': '', 'success': False}

    cmd = __execute_cmd('riak', 'stop')

    if cmd['retcode'] != 0:
        ret['comment'] = cmd['stderr']
    else:
        ret['comment'] = cmd['stdout']
        ret['success'] = True

    return ret
1105121
def slugify(text, sep='-'):
    """"""
    text = stringify(text)
    if text is None:
        return None
    text = text.replace(sep, WS)
    text = normalize(text, ascii=True)
    if text is None:
        return None
    return text.replace(WS, sep)
1285866
function message(violation, suggestion, condition, joiner) {
  var reason =
    join(quotation(violation, '`'), joiner) +
    ' may be insensitive' +
    (condition ? ', ' + condition : '') +
    ', '

  if (suggestion) {
    reason += 'use ' + join(quotation(suggestion, '`'), joiner) + ' instead'
  } else {
    reason += 'try not to use it'
  }

  return reason
}
416499
def polish(want)
      # Glue subtitle starts
      want.subtitles.sort_by! { |subtitle| subtitle[:start] }
      want.subtitles.each_cons(2) do |pair|
        distance = pair[1][:start] - pair[0][:start]
        if distance < want.glue_treshold
          pair[0][:start] += distance / 2
          pair[1][:start] -= distance / 2
        end
      end

      # Glue subtitles ends
      want.subtitles.sort_by! { |subtitle| subtitle[:end] }
      want.subtitles.each_cons(2) do |pair|
        if pair[1][:end] - pair[0][:end] < want.glue_treshold
          pair[0][:end] += (pair[1][:end] - pair[0][:end]) / 2
          pair[1][:end] -= (pair[1][:end] - pair[0][:end]) / 2
        end
      end
    end
1067996
def set_itunes_subtitle(self):
        """"""
        try:
            self.itunes_subtitle = self.soup.find('itunes:subtitle').string
        except AttributeError:
            self.itunes_subtitle = None