feat: rename use of locale to lang where applicable

This commit is contained in:
Michael Zetterberg
2024-04-08 15:17:07 +02:00
parent f3c9386ef4
commit 7ebc604156
14 changed files with 110 additions and 118 deletions

View File

@@ -1,7 +1,6 @@
import styles from "./contact.module.css"
import { langEnum } from "@/types/lang"
import type { Lang } from "@/types/lang"
import { Lang } from "@/constants/languages"
import { Section, type ContactNode } from "@/types/requests/asides/contact"
export default function Contact({ sections, system: { locale } }: ContactNode) {
@@ -72,17 +71,17 @@ export default function Contact({ sections, system: { locale } }: ContactNode) {
function getVisitingAddressMessage(lang: Lang) {
switch (lang) {
case langEnum.sv:
case Lang.sv:
return "Besöksadress"
case langEnum.en:
case Lang.en:
return "Visiting address"
case langEnum.da:
case Lang.da:
return "Besøgsadresse"
case langEnum.de:
case Lang.de:
return "Besuchsadresse"
case langEnum.fi:
case Lang.fi:
return "Vierailuosoite"
case langEnum.no:
case Lang.no:
return "Besøksadresse"
default:
return ""