# Path: Wammu/Locales.py
# def ugettext(message):
#     if _TRANSLATION:
#         if six.PY2:
#             return _TRANSLATION.ugettext(message)
#         return _TRANSLATION.gettext(message)
#     return message


import wx
import re
from Wammu.Locales import ugettext as _
        '''
        Verifies whether enterd text is correct.
        '''
        if self.multi:
            values = SplitNumbers(text)
        else:
            values = [text]
        for val in values:
            if val == '' and not self.empty:
                if immediate:
                    continue
                else:
                    return False
            elif self.pause and MATCHER_PAUSE.match(val) is None:
                return False
            elif not self.pause and MATCHER_NORMAL.match(val) is None:
                return False
            elif immediate and val == '+':
                continue
        return True

    def Validate(self, win=None):
        textcontrol = self.GetWindow()
        val = textcontrol.GetValue()

        result = self.CheckText(val)

        if not result and win is not None:
            wx.MessageDialog(
                win,

# Path: Wammu/Locales.py
# def ugettext(message):
#     if _TRANSLATION:
#         if six.PY2:
#             return _TRANSLATION.ugettext(message)
#         return _TRANSLATION.gettext(message)
#     return message


# Path: Wammu/PhoneValidator.py
import wx
import re
from Wammu.Locales import ugettext as _

        '''
        Verifies whether enterd text is correct.
        '''
        if self.multi:
            values = SplitNumbers(text)
        else:
            values = [text]
        for val in values:
            if val == '' and not self.empty:
                if immediate:
                    continue
                else:
                    return False
            elif self.pause and MATCHER_PAUSE.match(val) is None:
                return False
            elif not self.pause and MATCHER_NORMAL.match(val) is None:
                return False
            elif immediate and val == '+':
                continue
        return True

    def Validate(self, win=None):
        textcontrol = self.GetWindow()
        val = textcontrol.GetValue()

        result = self.CheckText(val)

        if not result and win is not None:
            wx.MessageDialog(
                win,

                _('You did not specify valid phone number.'),