anchor.diff:      # extract locales from translation source path
       # this won't add en-US which comes with base sources
       locales = []
  -    transpaths = glob.glob('%s/translations/source/*' % d.getVar('S', True))
  +    transpaths = glob.glob('%s/translations/source/*' % d.getVar('S'))
       for l in transpaths:
  -        locale = l.replace('%s/translations/source/' % d.getVar('S', True), '')
  +        locale = l.replace('%s/translations/source/' % d.getVar('S'), '')
           if not locale in locales:
               locales.append(locale)
   
  
positive.code:             if translocation in fallbacksearchresult:
                  fallbacksearchresult.replace(translocation, '')
          else:
              bb.warn('%s language file pattern not found:  %s' % (d.getVar('PN', True), transvar))
  
      # setup packages for locales with files found
      summary = d.getVar('SUMMARY', True) or pn
      description = d.getVar('DESCRIPTION', True) or ""
      locale_section = d.getVar('LOCALE_SECTION', True)
      mlprefix = d.getVar('MLPREFIX', True) or ""
      for locale in locales:
          if locale in langfiles:
              ln = legitimize_package_name(locale)
  
negative.code: python lo_do_split_locales() {
      import glob, subprocess
  
      packages = (d.getVar('PACKAGES') or "").split()
  
      datadir = d.getVar('datadir')
      if not datadir:
          bb.note("datadir not defined")
          return
  
      dvar = d.getVar('PKGD')
      pn = d.getVar('LOCALEBASEPN')
  
      if pn + '-locale' in packages:
          packages.remove(pn + '-locale')
  