def ProcessFile(self, file_name):
    '\n    Process and write a file of string resources.\n    \n    :param file_name: path to the file to process.\n    :return: None.\n    '
    lines = []
    state = self.STATE_SEARCHING
    curr_tag = []
    pending_process_type = None
    with open(file_name, 'r') as myfile:
        data = myfile.read()
        for line in data.split('\n'):
            if (state == self.STATE_SEARCHING):
                if (self.START_STR in line):
                    state = self.STATE_IN_STR
                elif (self.START_PLUR in line):
                    state = self.STATE_IN_PLUR
                else:
                    lines.append(line)
            if (state == self.STATE_IN_STR):
                curr_tag.append(line)
                if (self.END_STR in line):
                    pending_process_type = self.TYPE_STR
            if (state == self.STATE_IN_PLUR):
                curr_tag.append(line)
                if (self.END_PLUR in line):
                    pending_process_type = self.TYPE_PLUR
            if pending_process_type:
                lines += self.ProcessTag(curr_tag, pending_process_type)
                pending_process_type = None
                state = self.STATE_SEARCHING
                curr_tag = []
    self.WriteFile(file_name, '\n'.join(lines))
Process and write a file of string resources.

:param file_name: path to the file to process.
:return: None.
def ProcessFile(self, file_name):
    '\n    Process and write a file of string resources.\n    \n    :param file_name: path to the file to process.\n    :return: None.\n    '
    lines = []
    state = self.STATE_SEARCHING
    curr_tag = []
    pending_process_type = None
    with open(file_name, 'r') as myfile:
        data = myfile.read()
        for line in data.split('\n'):
            if (state == self.STATE_SEARCHING):
                if (self.START_STR in line):
                    state = self.STATE_IN_STR
                elif (self.START_PLUR in line):
                    state = self.STATE_IN_PLUR
                else:
                    lines.append(line)
            if (state == self.STATE_IN_STR):
                curr_tag.append(line)
                if (self.END_STR in line):
                    pending_process_type = self.TYPE_STR
            if (state == self.STATE_IN_PLUR):
                curr_tag.append(line)
                if (self.END_PLUR in line):
                    pending_process_type = self.TYPE_PLUR
            if pending_process_type:
                lines += self.ProcessTag(curr_tag, pending_process_type)
                pending_process_type = None
                state = self.STATE_SEARCHING
                curr_tag = []
    self.WriteFile(file_name, '\n'.join(lines))