# Path: KPC/classes.py
# class Error:
#     '''An individual error from a check against an entry. One check
#     usually returns list of errors or empty list if there's no error.
#     '''
#     SUCCESS = 0
#     DEPRECATED = 1
#     WARNING = 2
#     ERROR = 3
# 
#     def __init__(self, message):
#         self.pos = 0
#         self.level = Error.ERROR
#         self.message = message
# 
# class BaseCheck:
#     '''Base class to check an entry from PO files. Subclasses should
#     implement check() function. check() returns list of errors if any.
#     '''
#     def _get_context(self, entry):
#         if not hasattr(self, 'get_context'):
#             return {}
#         fields = {}
#         # parse msgstr
#         for line in entry.msgstr.split('\n'):
#             try:
#                 k, v = line.split(': ', 1)
#                 fields[k] = v
#             except ValueError:
#                 pass
#         return self.get_context(entry, fields)
# 
#     def _check(self, entry, context):
#         return self.check(entry, context)


import re
from KPC.classes import Error, BaseCheck
        'label_msgid': 'View ...',
        'label_msgstr': '... 보기',
        're_exception': re.compile('^View only$')
    },
    {
        're_msgid': re.compile('^Show .*'),
        're_msgstr': re.compile('^.* (보이기|표시)'),
        'label_msgid': 'Show ...',
        'label_msgstr': '... 보이기(표시)',
        're_exception': None
    },
    {
        're_msgid': re.compile('^Hide .*'),
        're_msgstr': re.compile('^.* 숨기기'),
        'label_msgid': 'Hide ...',
        'label_msgstr': '... 숨기기',
        're_exception': None
    },
]


def normalize_msg(msg):
    try:
        if msg.endswith('...'):
            msg = msg[:-3]
        elif msg.endswith('\u2026'):
            msg = msg[:-1]
        if msg[-4:-2] == '(_' and msg[-1:] == ')':
            msg = msg[:-4]
    except:

# Path: KPC/classes.py
# class Error:
#     '''An individual error from a check against an entry. One check
#     usually returns list of errors or empty list if there's no error.
#     '''
#     SUCCESS = 0
#     DEPRECATED = 1
#     WARNING = 2
#     ERROR = 3
# 
#     def __init__(self, message):
#         self.pos = 0
#         self.level = Error.ERROR
#         self.message = message
# 
# class BaseCheck:
#     '''Base class to check an entry from PO files. Subclasses should
#     implement check() function. check() returns list of errors if any.
#     '''
#     def _get_context(self, entry):
#         if not hasattr(self, 'get_context'):
#             return {}
#         fields = {}
#         # parse msgstr
#         for line in entry.msgstr.split('\n'):
#             try:
#                 k, v = line.split(': ', 1)
#                 fields[k] = v
#             except ValueError:
#                 pass
#         return self.get_context(entry, fields)
# 
#     def _check(self, entry, context):
#         return self.check(entry, context)


# Path: KPC/checks/terminology/common-labels.py
import re
from KPC.classes import Error, BaseCheck

        'label_msgid': 'View ...',
        'label_msgstr': '... 보기',
        're_exception': re.compile('^View only$')
    },
    {
        're_msgid': re.compile('^Show .*'),
        're_msgstr': re.compile('^.* (보이기|표시)'),
        'label_msgid': 'Show ...',
        'label_msgstr': '... 보이기(표시)',
        're_exception': None
    },
    {
        're_msgid': re.compile('^Hide .*'),
        're_msgstr': re.compile('^.* 숨기기'),
        'label_msgid': 'Hide ...',
        'label_msgstr': '... 숨기기',
        're_exception': None
    },
]


def normalize_msg(msg):
    try:
        if msg.endswith('...'):
            msg = msg[:-3]
        elif msg.endswith('\u2026'):
            msg = msg[:-1]
        if msg[-4:-2] == '(_' and msg[-1:] == ')':
            msg = msg[:-4]
    except:

        pass