Skip to content

Latest commit

 

History

History
54 lines (41 loc) · 2.01 KB

CONTRIBUTION.md

File metadata and controls

54 lines (41 loc) · 2.01 KB

Contribution Guidelines

The characters are modified in index.test.ts. The unit tests generate the readme table and the dictionary (see index.ts).

Prerequisites

  • List global installations: npm ls -g --depth=0
  • Globally install npm-check-updates: npm i -g npm-check-updates
  • Globally install release-it: npm i -g release-it
  • Locally install project dependencies: npm i
  • Enable ESLint for TypeScript in VS Code settings.json:
    "eslint.validate": [
        "javascript",
        "javascriptreact",
        "typescript",
        "typescriptreact"
    ]

Scripts

Development:

  • Upgrade dependencies: ncu -u (might require a npm i afterwards)
  • Run tests: npm test (see coverage/)
  • Build project: npm run build (see dist/)

Release (patch, minor or major):

  • Remove "private": true from package.json.
  • Double-check package contents before release: npm pack (see .tgz file)
  • Release (dry run): release-it minor --dry-run
  • Release: release-it minor (tag and publish)

Rules

General:

  • We create symbolic representations instead of providing 100% correct translations
  • Translations must not be unique (read: the dictionary must not be injective)
  • We do not perform further transformations, like to lower case.

Conventions:

  • We allow only glyphs consisting of one character
  • Upper case glyphs are translated first upper (Ä → Ae)
  • Upper case glyphs that consist of two letters are translated ALL UPPER CASE (Æ → AE)
  • Lower case glyphs are translated to all lower (ä → ae)
  • Constants are translated to letters (ℇ → e)
  • Copyright symbols are translated to UPPER CASE abbreviations (™ → TM)
  • Math symbols (including the Greek alphabet) are translated to names (𝜋 → pi)
  • Units are translated to names (℃ → Celsius)
  • Currencies are translated to all lower names (€ → euro)