cletter 0.2.1

Locale-correct business correspondence: composes cgreet, cfarewell, cink and cdate with locale tables for opening, subject, resolution and orthography
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[
  { "name": "swiss replaces sharp s", "fn": "apply_ortho", "locale": "de-ch", "text": "Mit freundlichen Grüßen", "expected": "Mit freundlichen Grüssen" },
  { "name": "german keeps sharp s", "fn": "apply_ortho", "locale": "de", "text": "Mit freundlichen Grüßen", "expected": "Mit freundlichen Grüßen" },
  { "name": "english untouched", "fn": "apply_ortho", "locale": "en", "text": "Straße", "expected": "Straße" },
  { "name": "german salutation delegates to cgreet", "fn": "salutation", "locale": "de-ch", "person": "Frau Dr. Müller", "expected": "Sehr geehrte Frau Dr. Müller" },
  { "name": "german generic fallback delegates", "fn": "salutation", "locale": "de", "person": "Jane Doe", "expected": "Sehr geehrte Damen und Herren," },
  { "name": "french uses opening template", "fn": "salutation", "locale": "fr", "person": "Jane Doe", "expected": "Cher/Chère Jane Doe," },
  { "name": "unknown locale uses english template", "fn": "salutation", "locale": "xx", "person": "Jane Doe", "expected": "Dear Jane Doe," },
  { "name": "empty name warns everywhere", "fn": "warnings", "location": "fixture", "locale": "en-us", "person": "", "expected": ["fixture: job.cl_recipient.name is empty; using generic salutation (provide a name for tailored opportunities)"] },
  { "name": "honorific-free german warns once", "fn": "warnings", "location": "fixture", "locale": "de-ch", "person": "Jane Doe", "expected": ["fixture: job.cl_recipient.name has no parsable Herr/Frau honorific; using generic salutation (provide e.g. \"Frau Dr. Müller\" for tailored opportunities)"] },
  { "name": "complete german name is clean", "fn": "warnings", "location": "fixture", "locale": "de-ch", "person": "Frau Dr. Müller", "expected": [] },
  { "name": "swiss lowercase replaces sharp s", "fn": "apply_ortho", "locale": "de-ch", "text": "Mit freundlichen Grüßen", "expected": "Mit freundlichen Grüssen" },
  { "name": "german salutation lowercase delegates to cgreet", "fn": "salutation", "locale": "de-ch", "person": "Frau Dr. Müller", "expected": "Sehr geehrte Frau Dr. Müller" },
  { "name": "german salutation uppercase delegates to cgreet", "fn": "salutation", "locale": "DE-CH", "person": "Frau Dr. Müller", "expected": "Sehr geehrte Frau Dr. Müller" },
  { "name": "honorific-free german lowercase warns once", "fn": "warnings", "location": "fixture", "locale": "de-ch", "person": "Jane Doe", "expected": ["fixture: job.cl_recipient.name has no parsable Herr/Frau honorific; using generic salutation (provide e.g. \"Frau Dr. Müller\" for tailored opportunities)"] },
  { "name": "english-ch lowercase uses english template", "fn": "salutation", "locale": "en-ch", "person": "Jane Doe", "expected": "Dear Jane Doe," }
]