isSourceHashed function

bool isSourceHashed(
  1. String ruleName, {
  2. String? locale,
})

Whether ruleName fingerprints the source value (vs. the translation value) for an ack in locale. Only meaningful for ack-able rules; drives the sentence dialect check --ack prints back.

Implementation

bool isSourceHashed(String ruleName, {String? locale}) {
  switch (_ackSubjects[ruleName]) {
    case AckSubject.source:
      return true;
    case AckSubject.sideOfIssue:
      return locale == null || locale == 'source';
    case AckSubject.translation:
    case null:
      return false;
  }
}