======
README
======

Let's test the source code with our checker:

  >>> import p01.checker
  >>> checker = p01.checker.Checker(p01.checker.CHECKERS)

Add a page template checker based on our file path and domain:

  >>> ptChecker = p01.checker.PTBadI18nDomainChecker('/p01/', ('test',))
  >>> checker.addChecker('pt', ptChecker)

Add a zcml ocnfiguration file checker based on our file path and domain:

  >>> zcmlChecker = p01.checker.ZCMLBadI18nDomainChecker('/p01/', ('test',))
  >>> checker.addChecker('zcml', zcmlChecker)

Now let's check:

  >>> import p01.checker.sample
  >>> checker.check(p01.checker.sample)
  --------
  ascii.pt
  --------
  3: non ASCII char found
        Some german Umlautes äöü
                             ^
  -------
  bad.css
  -------
  18: Expected end of value but found 'height'.
        width: 100px
  19: Expected RBRACE at line 19, col 11.
        height: 100px;
  24: Expected (<absolute-size> | <relative-size> | <length> | <percentage> | inherit) but found 'inline-block'.
        font-size: inline-block;
  30: Expected LBRACE at line 30, col 1.
  ------
  bad.py
  ------
  6: debug break point found
        import pdb; pdb.set_trace() # p01.checker.silence
  11: debug break point found
        pdb.set_trace() # p01.checker.silence
  20: debug break point found
        from pub.dbgpclient import brk # p01.checker.silence
  26: undefined name 'bar'
        return bar
  29: non ASCII char found
        return u'ö'
                 ^
  ---------
  bloat.jpg
  ---------
  0: image bloat found
        Adobe Photoshop bloat found
  ---------
  bloat.png
  ---------
  0: image bloat found
        Adobe Photoshop bloat found
  --------------
  console.log.js
  --------------
  2: javascript console.log found
        console.log('Testing console');
  6: javascript alert found
        alert("HERE: " + msg);
  ---------
  domain.pt
  ---------
  3: empty i18n:domain="" found
        <div i18n:domain="">
  6: bad i18n domain found
        <div i18n:domain="foobar">
  ----------------
  domain_simple.pt
  ----------------
  0: empty i18n:domain="" found
        <div i18n:domain="">
  4: bad i18n domain found
        <div i18n:domain="foobar">
  --------
  fatal.pt
  --------
  0: fatal error
        Opening and ending tag mismatch: div line 3 and span, line: 5, block: 12
        Opening and ending tag mismatch: div line 6 and body, line: 7, block: 10
        Opening and ending tag mismatch: body line 2 and html, line: 8, block: 8
        Premature end of data in tag html line 1, line: 9, block: 1
  ------------
  recruiter.po
  ------------
  0: untranslated found
        1 items
  0: fuzzy found
        1 items
  ---------
  simple.pt
  ---------
  2: needs i18n:domain
        <div i18n:translate="">missing domain</div>
  -------
  tab.txt
  -------
  3: tab found in file
        and here
  --------------------
  zcml_bad_domain.zcml
  --------------------
  2: bad i18n domain found
        i18n_domain="foo">
  ------------------------
  zcml_missing_domain.zcml
  ------------------------
  2: empty i18n_domain="" found
        i18n_domain="">
