diff --git a/app/scripts/components/corpus-updates.ts b/app/scripts/components/corpus-updates.ts index 737321f7c..305dd128d 100644 --- a/app/scripts/components/corpus-updates.ts +++ b/app/scripts/components/corpus-updates.ts @@ -3,7 +3,7 @@ import angular, { IScope } from "angular" import moment from "moment" import settings from "@/settings" import { html } from "@/util" -import { LangMap } from "@/i18n/types" +import { LangString } from "@/i18n/types" export default angular.module("korpApp").component("corpusUpdates", { template: html` @@ -75,5 +75,5 @@ type CorpusUpdatesScope = IScope & { type Corpus = { info: { Updated: string } - title: LangMap | string + title: LangString } diff --git a/app/scripts/i18n/index.ts b/app/scripts/i18n/index.ts index 19e898e8b..3d3a3177a 100644 --- a/app/scripts/i18n/index.ts +++ b/app/scripts/i18n/index.ts @@ -2,7 +2,7 @@ import isObject from "lodash/isObject" import settings from "@/settings" import { getService } from "@/util" -import type { LangLocMap, LangMap, LocLangMap, LocMap } from "@/i18n/types" +import type { LangLocMap, LangString, LocLangMap, LocMap } from "@/i18n/types" /** Get the current UI language. */ export function getLang(): string { @@ -30,7 +30,7 @@ export function loc(key: string, lang?: string) { * @param lang The code of the language to translate to. Defaults to the global current language. * @returns The translated string, or undefined if no translation is found. */ -export function locObj(map: LangMap | string, lang?: string): string | undefined { +export function locObj(map: LangString, lang?: string): string | undefined { if (!map) return undefined if (typeof map == "string") return map diff --git a/app/scripts/kwic_download.ts b/app/scripts/kwic_download.ts index eb49670e4..257c19077 100644 --- a/app/scripts/kwic_download.ts +++ b/app/scripts/kwic_download.ts @@ -4,7 +4,7 @@ import moment from "moment" import CSV from "comma-separated-values/csv" import { locObj } from "@/i18n" import { type ApiKwic, type KorpQueryParams } from "@/backend/kwic-proxy" -import { LangMap } from "./i18n/types" +import { LangString } from "./i18n/types" // This is what is returned by massageData in kwic.js type Row = ApiKwic | LinkedKwic | CorpusHeading @@ -18,7 +18,7 @@ type LinkedKwic = { } type CorpusHeading = { - newCorpus: LangMap | string + newCorpus: LangString noContext?: boolean } diff --git a/app/scripts/settings/config.types.ts b/app/scripts/settings/config.types.ts index 747305482..eaf70a8e5 100644 --- a/app/scripts/settings/config.types.ts +++ b/app/scripts/settings/config.types.ts @@ -3,7 +3,7 @@ * @format */ -import { Labeled, LangMap, LangString } from "@/i18n/types" +import { Labeled, LangString } from "@/i18n/types" export type Config = { attributes: {