Refactoring: move the units into the layers instead of the themes

This commit is contained in:
Pieter Vander Vennet 2021-09-13 01:21:47 +02:00
parent 3492b5d403
commit 206aff2c9a
16 changed files with 259 additions and 300 deletions

View file

@ -1,5 +1,5 @@
import {Translation} from "../UI/i18n/Translation";
import UnitConfigJson from "./ThemeConfig/Json/UnitConfigJson";
import {ApplicableUnitJson} from "./ThemeConfig/Json/UnitConfigJson";
import Translations from "../UI/i18n/Translations";
export class Denomination {
@ -9,7 +9,7 @@ export class Denomination {
public readonly alternativeDenominations: string [];
private readonly _human: Translation;
constructor(json: UnitConfigJson, context: string) {
constructor(json: ApplicableUnitJson, context: string) {
context = `${context}.unit(${json.canonicalDenomination})`
this.canonical = json.canonicalDenomination.trim()
if (this.canonical === undefined) {