def _parse(self, is_source, lang_rules):
        """
        Parse an INI file and create a stringset with all entries in the file.
        """
        content = self.content
        self.jformat = JoomlaIniVersion.create(self.content)
        self._find_linesep(content)
        comment = ""

        buf = ''
        for line in self._iter_by_line(content):
            # Skip empty lines and comments
            if not line or line.startswith(self.comment_chars):
                if is_source:
                    buf += line + self.linesep
                    if line.startswith(self.comment_chars):
                        comment = line[1:] + self.linesep
                    else:
                        comment = ""
                continue

            try:
                source, trans = line.split('=', 1)
            except __HOLE__:
                # Maybe abort instead of skipping?
                logger.warning('Could not parse line "%s". Skipping...' % line)
                continue

            escaped_trans = self.jformat.get_translation(trans)
            if isinstance(self.jformat, JoomlaIniNew):
                trans = trans[1:-1]
            context = ""        # We use empty context

            if is_source:
                if not trans.strip():
                    buf += line + self.linesep
                    continue
                source_len = len(source)
                new_line = line[:source_len] + re.sub(
                    re.escape(trans),
                    "%(hash)s_tr" % {'hash': hash_tag(source, context)},
                    line[source_len:]
                )
                buf += new_line + self.linesep
            elif not SourceEntity.objects.filter(resource=self.resource, string=source).exists()\
                    or not escaped_trans.strip():
                #ignore keys with no translation
                context=""
                continue
            self._add_translation_string(source, self._unescape(escaped_trans),
                    context=context, comment=comment)
            comment = ""
        return buf[:buf.rfind(self.linesep)]
dataset/ETHPy150Open rvanlaar/easy-transifex/src/transifex/transifex/resources/formats/joomla.py/JoomlaINIHandler._parse