<?xml version="1.0" encoding="UTF-8"?>
<cleaner id="localizations" os="linux">
  <label>Localizations</label>
  <localizations>
    <!-- Here are paths which contain localizations. Each <path> is relative to
       the parent element, so <path location="/usr"><path location="share"/></path>
       effects elements in /usr/share.-->
    <path location="/usr/lib">
      <!-- This filter deletes /usr/lib/chromium/locales/*.pak, where * is every
           valid locale not specifically excluded in the configuration.-->
      <path location="chromium/locales" filter="*.pak"/>
      <path location="libreoffice/share">
        <path location="autocorr" filter="acor_*.dat"/>
        <path location="fingerprint" filter="*.lm"/>
      </path>
    </path>
    <path location="/usr/share">
      <!-- check for Qt translations in every folder's subfolder locale or translations -->
      <!-- also check for localizations in folders named locale(s)/translation(s) in every subfolder-->
      <path directoryregex="^.*$">
        <path directoryregex="^(locale|translation)s?$">
          <regexfilter prefix=".*_" postfix="\.qm"/>
          <path location="." filter="*"/>
        </path>
      </path>
      <path location="apps/ksgmltools/customization" filter="*"/>
      <path location="calendar" filter="*"/>
      <path location="cups/doc" filter="*"/>
      <path location="doc">
        <path location="kde/HTML" filter="*"/>
        <path location="HTML/release-notes" filter="*"/>
        <path location="thunar-data/html" filter="*"/>
      </path>
      <path location="help" filter="*"/>
      <path location="locale" filter="*"/>
      <!-- for openSuSE -->
      <path location="locale-bundle">
        <path location="kf5" filter="*"/>
      </path>
      <path location="lyx/doc" filter="*"/>
      <path location="lyx/examples" filter="*"/>
      <path location="man" filter="*"/>
      <path location="octave/">
        <path directoryregex="^[0-9.]+$">
          <path location="locale/" filter="*.qm"/>
        </path>
      </path>
      <!-- This already gets cleaned by the more general <path directoryregex="^.*$"> above but might be useful as an example -->
      <path location="qt/translations">
        <!-- <regexfilter> enables filtering files/folders with 2 regular expressions.
           This deletes every file matching |prefix | locale   | postfix, e.g.
                                             qt_help_hu_HU.UTF-8.qm
           This can only be used to delete entries in the current <path> -->
        <regexfilter prefix="q[\w_]*" postfix="\.qm"/>
        <!-- You can also specify multiple <regexfilter>s within a single path -->
        <regexfilter prefix="(linguist|designer|assistant)_" postfix="\.qm"/>
      </path>
      <path location="speedcrunch/books" filter="*"/>
      <path location="texmaker/" filter="*.dic"/>
      <path location="vim/vim74/lang" filter="menu_*.vim"/>
      <path location="vim/vim74/lang" filter="*"/>
    </path>
  </localizations>
</cleaner>
