💬 Add missing i18n string (#969)

This commit is contained in:
Adrià Vilanova Martínez 2023-12-31 05:38:01 +01:00 committed by GitHub
parent 7ffbc960b0
commit 125ced46e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -102,6 +102,7 @@
"timeZoneSelect__defaultValue": "Select time zone…",
"timeZoneSelect__noOption": "No option found",
"timeZoneSelect__inputPlaceholder": "Search…",
"timeZonePicker__ignore": "Ignore time zone",
"poweredByRallly": "Powered by <a>{name}</a>",
"participants": "Participants",
"language": "Language",

View file

@ -8,6 +8,7 @@ import {
import { Combobox } from "@headlessui/react";
import clsx from "clsx";
import { ChevronDownIcon } from "lucide-react";
import { useTranslation } from "next-i18next";
import React from "react";
import spacetime from "spacetime";
import soft from "timezone-soft";
@ -124,6 +125,7 @@ const TimeZonePicker: React.FunctionComponent<{
style?: React.CSSProperties;
disabled?: boolean;
}> = ({ value, onChange, onBlur, className, style, disabled }) => {
const { t } = useTranslation();
const { options, findFuzzyTz } = useTimeZones();
const { reference, floating, x, y, strategy, refs } = useFloating({
@ -147,12 +149,14 @@ const TimeZonePicker: React.FunctionComponent<{
() => [
{
value: "",
label: "Ignore time zone",
label: t("timeZonePicker__ignore", {
defaultValue: "Ignore time zone",
}),
offset: 0,
},
...options,
],
[options],
[options, t],
);
const selectedTimeZone = React.useMemo(