Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💬 Add missing i18n string #969

Merged
merged 1 commit into from
Dec 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/web/public/locales/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 6 additions & 2 deletions apps/web/src/components/time-zone-picker/time-zone-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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({
Expand All @@ -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(
Expand Down
Loading