feat: Add brainrot locale

This commit is contained in:
Jesse Wierzbinski 2024-12-07 23:05:26 +01:00
parent 2ceee4827f
commit c3a2e5e850
No known key found for this signature in database
26 changed files with 355 additions and 36 deletions

View file

@ -28,7 +28,6 @@ import { Ellipsis, Heart, Quote, Repeat, Reply } from "lucide-vue-next";
import { toast } from "vue-sonner";
import { Button } from "~/components/ui/button";
import * as m from "~/paraglide/messages.js";
import { languageTag } from "~/paraglide/runtime";
import { SettingIds } from "~/settings";
import { confirmModalService } from "../modals/composable";
import Menu from "./menu.vue";
@ -143,7 +142,7 @@ const unreblog = async () => {
const numberFormat = (number = 0) =>
number !== 0
? new Intl.NumberFormat(languageTag(), {
? new Intl.NumberFormat(getLanguageTag(), {
notation: "compact",
compactDisplay: "short",
maximumFractionDigits: 1,

View file

@ -43,7 +43,6 @@ import type { Attachment, Emoji, Status } from "@versia/client/types";
import { TriangleAlert } from "lucide-vue-next";
import { Button } from "~/components/ui/button";
import * as m from "~/paraglide/messages.js";
import { languageTag } from "~/paraglide/runtime";
import { type BooleanSetting, SettingIds } from "~/settings";
import { Alert, AlertDescription, AlertTitle } from "../ui/alert";
import Attachments from "./attachments.vue";
@ -78,7 +77,7 @@ const isOverflowing = computed(() => {
const characterCount = plainContent?.length;
const formattedCharacterCount = characterCount
? new Intl.NumberFormat(languageTag()).format(characterCount)
? new Intl.NumberFormat(getLanguageTag()).format(characterCount)
: undefined;
</script>

View file

@ -50,7 +50,6 @@ import type {
UseTimeAgoUnitNamesDefault,
} from "@vueuse/core";
import { AtSign, Globe, Lock, LockOpen } from "lucide-vue-next";
import { languageTag } from "~/paraglide/runtime";
import { SettingIds } from "~/settings";
import Avatar from "../profiles/avatar.vue";
import SmallCard from "../profiles/small-card.vue";
@ -90,7 +89,7 @@ const timeAgo = useTimeAgo(createdAt, {
invalid: "",
} as UseTimeAgoMessages<UseTimeAgoUnitNamesDefault>,
});
const fullTime = new Intl.DateTimeFormat(languageTag(), {
const fullTime = new Intl.DateTimeFormat(getLanguageTag(), {
dateStyle: "medium",
timeStyle: "short",
}).format(createdAt);