(self)
return labels_to_skip
Returns the labels of questions that have the skip string in the comment,
        so that those labels are not sent to Transifex later.

        If there are questions that share the same label reference (and thus the
        same translation), they will be included if any question does not have the
        skip string.
Returns the labels of questions that have the skip string in the comment,
        so that those labels are not sent to Transifex later.
Returns the labels of questions that have the skip string in the comment so that those labels are not sent to Transifex later .
def get_labels_to_skip(self):
        """Returns the labels of questions that have the skip string in the comment,
        so that those labels are not sent to Transifex later.

        If there are questions that share the same label reference (and thus the
        same translation), they will be included if any question does not have the
        skip string.
        """
        def _labels_from_question(question):
            ret = {
                question.get('label_ref'),
                question.get('constraintMsg_ref'),
            }
            if question.get('options'):
                for option in question['options']:
                    ret.add(option.get('label_ref'))
            return ret

        labels_to_skip = defaultdict(set)
        necessary_labels = defaultdict(set)

        for module in self.app.get_modules():
            for form in module.get_forms():
                questions = form.get_questions(self.app.langs, include_triggers=True,
                                               include_groups=True, include_translations=True)
                for question in questions:
                    if not question.get('label_ref'):
                        continue
                    if question['comment'] and SKIP_TRANSFEX_STRING in question['comment']:
                        labels_to_skip[form.unique_id] |= _labels_from_question(question)
                    else:
                        necessary_labels[form.unique_id] |= _labels_from_question(question)

        for form_id in labels_to_skip.keys():
            labels_to_skip[form_id] = labels_to_skip[form_id] - necessary_labels[form_id]

        return labels_to_skip
def get_labels_to_skip ( self ) : def _labels_from_question ( question ) : ret = { question . get ( 'label_ref' ) , question . get ( 'constraintMsg_ref' ) , } if question . get ( 'options' ) : for option in question [ 'options' ] : ret . add ( option . get ( 'label_ref' ) ) return ret labels_to_skip = defaultdict ( set ) necessary_labels = defaultdict ( set ) for module in self . app . get_modules ( ) : for form in module . get_forms ( ) : questions = form . get_questions ( self . app . langs , include_triggers = True , include_groups = True , include_translations = True ) for question in questions : if not question . get ( 'label_ref' ) : continue if question [ 'comment' ] and SKIP_TRANSFEX_STRING in question [ 'comment' ] : labels_to_skip [ form . unique_id ] |= _labels_from_question ( question ) else : necessary_labels [ form . unique_id ] |= _labels_from_question ( question ) for form_id in labels_to_skip . keys ( ) : labels_to_skip [ form_id ] = labels_to_skip [ form_id ] - necessary_labels [ form_id ] return labels_to_skip