resolve conflicts

This commit is contained in:
Balázs Úr
2026-01-07 09:14:37 +01:00
parent c22a55429d
commit 4fca961cd5
20 changed files with 89 additions and 101 deletions

View File

@@ -2,7 +2,7 @@
import { debounce } from "lodash";
import dynamic from "next/dynamic";
import { useEffect, useMemo, useRef, useState } from "react";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import toast from "react-hot-toast";
import { TContactAttributeKey } from "@formbricks/types/contact-attribute-key";
import { TEnvironment } from "@formbricks/types/environment";
@@ -48,40 +48,40 @@ export const ContactDataView = ({
);
}, [contactAttributeKeys]);
// Fetch contacts from offset 0 with current search value
const fetchContactsFromStart = useCallback(async () => {
setIsDataLoaded(false);
try {
setHasMore(true);
const contactsResponse = await getContactsAction({
environmentId: environment.id,
offset: 0,
searchValue,
});
if (contactsResponse?.data) {
setContacts(contactsResponse.data);
}
if (contactsResponse?.data && contactsResponse.data.length < itemsPerPage) {
setHasMore(false);
}
} catch (error) {
console.error("Error fetching contacts:", error);
toast.error("Error fetching contacts. Please try again.");
} finally {
setIsDataLoaded(true);
}
}, [environment.id, itemsPerPage, searchValue]);
useEffect(() => {
if (!isFirstRender.current) {
const fetchData = async () => {
setIsDataLoaded(false);
try {
setHasMore(true);
const getPersonActionData = await getContactsAction({
environmentId: environment.id,
offset: 0,
searchValue,
});
const personData = getPersonActionData?.data;
if (getPersonActionData?.data) {
setContacts(getPersonActionData.data);
}
if (personData && personData.length < itemsPerPage) {
setHasMore(false);
}
} catch (error) {
console.error("Error fetching people data:", error);
toast.error("Error fetching people data. Please try again.");
} finally {
setIsDataLoaded(true);
}
};
const debouncedFetchData = debounce(fetchData, 300);
const debouncedFetchData = debounce(fetchContactsFromStart, 300);
debouncedFetchData();
return () => {
debouncedFetchData.cancel();
};
}
}, [environment.id, itemsPerPage, searchValue]);
}, [fetchContactsFromStart]);
useEffect(() => {
if (isFirstRender.current) {
@@ -147,6 +147,7 @@ export const ContactDataView = ({
setSearchValue={setSearchValue}
isReadOnly={isReadOnly}
isQuotasAllowed={isQuotasAllowed}
refreshContacts={fetchContactsFromStart}
/>
);
};

View File

@@ -43,6 +43,7 @@ interface ContactsTableProps {
setSearchValue: (value: string) => void;
isReadOnly: boolean;
isQuotasAllowed: boolean;
refreshContacts: () => Promise<void>;
}
export const ContactsTable = ({
@@ -56,6 +57,7 @@ export const ContactsTable = ({
setSearchValue,
isReadOnly,
isQuotasAllowed,
refreshContacts,
}: ContactsTableProps) => {
const [columnVisibility, setColumnVisibility] = useState<VisibilityState>({});
const [columnOrder, setColumnOrder] = useState<string[]>([]);
@@ -235,6 +237,7 @@ export const ContactsTable = ({
type="contact"
deleteAction={deleteContact}
isQuotasAllowed={isQuotasAllowed}
onRefresh={refreshContacts}
leftContent={
<div className="w-64">
<SearchBar

View File

@@ -2,7 +2,6 @@
import { Table } from "@tanstack/react-table";
import { MoveVerticalIcon, RefreshCcwIcon, SettingsIcon } from "lucide-react";
import { useRouter } from "next/navigation";
import toast from "react-hot-toast";
import { useTranslation } from "react-i18next";
import { cn } from "@/lib/cn";
@@ -20,6 +19,7 @@ interface DataTableToolbarProps<T> {
downloadRowsAction?: (rowIds: string[], format: string) => Promise<void>;
isQuotasAllowed: boolean;
leftContent?: React.ReactNode;
onRefresh?: () => Promise<void>;
}
export const DataTableToolbar = <T,>({
@@ -33,9 +33,9 @@ export const DataTableToolbar = <T,>({
downloadRowsAction,
isQuotasAllowed,
leftContent,
onRefresh,
}: DataTableToolbarProps<T>) => {
const { t } = useTranslation();
const router = useRouter();
return (
<div className="sticky top-0 z-30 flex w-full items-center justify-between bg-slate-50 py-2">
@@ -52,13 +52,13 @@ export const DataTableToolbar = <T,>({
<div>{leftContent}</div>
)}
<div className="flex space-x-2">
{type === "contact" ? (
{type === "contact" && onRefresh ? (
<TooltipRenderer
tooltipContent={t("environments.contacts.contacts_table_refresh")}
shouldRender={true}>
<button
onClick={async () => {
router.refresh();
await onRefresh();
toast.success(t("environments.contacts.contacts_table_refresh_success"));
}}
className="cursor-pointer rounded-md border bg-white hover:border-slate-400">

View File

@@ -9,7 +9,6 @@ checksums:
common/company_logo: 82d5c0d5994508210ee02d684819f4b8
common/finish: ffa7a10f71182b48fefed7135bee24fa
common/language_switch: fd72a9ada13f672f4fd5da863b22cc46
common/less_than_x_minutes: 8a8528651d0b60dc93be451abf6a139b
common/next: 89ddbcf710eba274963494f312bdc8a9
common/open_in_new_tab: 6844e4922a7a40a7ee25c10ea109cdeb
common/people_responded: b685fb877090d8658db724ad07a0dbd8
@@ -25,12 +24,12 @@ checksums:
common/retry: 6e44d18639560596569a1278f9c83676
common/retrying: 0cb623dbdcbf16d3680f0180ceac734c
common/sending_responses: 184772f70cca69424eaf34f73520789f
common/takes: 01f96e2e84741ea8392d97ff4bd2aa52
common/takes_less_than_x_minutes: 1208ce0d4c0a679c11c7bd209b6ccc47
common/takes_x_minutes: 001d12366d07b406f50669e761d63e69
common/takes_x_plus_minutes: 145b8f287de140e98f492c8db2f9fa0b
common/terms_of_service: 5add91f519e39025708e54a7eb7a9fc5
common/the_servers_cannot_be_reached_at_the_moment: f8adbeccac69f9230a55b5b3af52b081
common/they_will_be_redirected_immediately: 936bc99cb575cba95ea8f04d82bb353b
common/x_minutes: bf6ec8800c29b1447226447a991b9510
common/x_plus_minutes: 2ef597aa029e3c71d442455fbb751991
common/your_feedback_is_stuck: db2b6aba26723b01aee0fc918d3ca052
errors/file_input/duplicate_files: 198dd29e67beb6abc5b2534ede7d7f68
errors/file_input/file_size_exceeded: 072045b042a39fa1df76200f8fa36dd4

View File

@@ -8,7 +8,6 @@
"company_logo": "شعار الشركة",
"finish": "إنهاء",
"language_switch": "تبديل اللغة",
"less_than_x_minutes": "{count, plural, one {أقل من دقيقة واحدة} two {أقل من دقيقتين} few {أقل من {count} دقائق} many {أقل من {count} دقيقة} other {أقل من {count} دقيقة}}",
"next": "التالي",
"open_in_new_tab": "فتح في علامة تبويب جديدة",
"people_responded": "{count, plural, one {شخص واحد استجاب} two {شخصان استجابا} few {{count} أشخاص استجابوا} many {{count} شخصًا استجابوا} other {{count} شخص استجابوا}}",
@@ -24,12 +23,12 @@
"retry": "إعادة المحاولة",
"retrying": "إعادة المحاولة...",
"sending_responses": "جارٍ إرسال الردود...",
"takes": "يأخذ",
"takes_less_than_x_minutes": "{count, plural, zero {يستغرق أقل من دقيقة} one {يستغرق أقل من دقيقة واحدة} two {يستغرق أقل من دقيقتين} few {يستغرق أقل من {count} دقائق} many {يستغرق أقل من {count} دقيقة} other {يستغرق أقل من {count} دقيقة}}",
"takes_x_minutes": "{count, plural, zero {يستغرق صفر دقائق} one {يستغرق دقيقة واحدة} two {يستغرق دقيقتين} few {يستغرق {count} دقائق} many {يستغرق {count} دقيقة} other {يستغرق {count} دقيقة}}",
"takes_x_plus_minutes": "يستغرق {count}+ دقيقة",
"terms_of_service": "شروط الخدمة",
"the_servers_cannot_be_reached_at_the_moment": "لا يمكن الوصول إلى الخوادم في الوقت الحالي.",
"they_will_be_redirected_immediately": "سيتم إعادة توجيههم فورًا",
"x_minutes": "{count, plural, one {دقيقة واحدة} two {دقيقتان} few {{count} دقائق} many {{count} دقيقة} other {{count} دقيقة}}",
"x_plus_minutes": "{count}+ دقيقة",
"your_feedback_is_stuck": "تعليقك عالق :("
},
"errors": {

View File

@@ -8,7 +8,6 @@
"company_logo": "Firmenlogo",
"finish": "Fertig",
"language_switch": "Sprachwechsel",
"less_than_x_minutes": "{count, plural, one {weniger als 1 Minute} other {weniger als {count} Minuten}}",
"next": "Weiter",
"open_in_new_tab": "In neuem Tab öffnen",
"people_responded": "{count, plural, one {1 Person hat geantwortet} other {{count} Personen haben geantwortet}}",
@@ -24,12 +23,12 @@
"retry": "Wiederholen",
"retrying": "Erneuter Versuch...",
"sending_responses": "Antworten werden gesendet...",
"takes": "Dauert",
"takes_less_than_x_minutes": "{count, plural, one {Dauert weniger als 1 Minute} other {Dauert weniger als {count} Minuten}}",
"takes_x_minutes": "{count, plural, one {Dauert 1 Minute} other {Dauert {count} Minuten}}",
"takes_x_plus_minutes": "Dauert {count}+ Minuten",
"terms_of_service": "Nutzungsbedingungen",
"the_servers_cannot_be_reached_at_the_moment": "Die Server sind momentan nicht erreichbar.",
"they_will_be_redirected_immediately": "Sie werden sofort weitergeleitet",
"x_minutes": "{count, plural, one {1 Minute} other {{count} Minuten}}",
"x_plus_minutes": "{count}+ Minuten",
"your_feedback_is_stuck": "Ihr Feedback steckt fest :("
},
"errors": {

View File

@@ -8,7 +8,6 @@
"company_logo": "Company Logo",
"finish": "Finish",
"language_switch": "Language switch",
"less_than_x_minutes": "{count, plural, one {less than 1 minute} other {less than {count} minutes}}",
"next": "Next",
"open_in_new_tab": "Open in new tab",
"people_responded": "{count, plural, one {1 person responded} other {{count} people responded}}",
@@ -24,12 +23,12 @@
"retry": "Retry",
"retrying": "Retrying…",
"sending_responses": "Sending responses…",
"takes": "Takes",
"takes_less_than_x_minutes": "{count, plural, one {Takes less than 1 minute} other {Takes less than {count} minutes}}",
"takes_x_minutes": "{count, plural, one {Takes 1 minute} other {Takes {count} minutes}}",
"takes_x_plus_minutes": "Takes {count}+ minutes",
"terms_of_service": "Terms of Service",
"the_servers_cannot_be_reached_at_the_moment": "The servers cannot be reached at the moment.",
"they_will_be_redirected_immediately": "They will be redirected immediately",
"x_minutes": "{count, plural, one {1 minute} other {{count} minutes}}",
"x_plus_minutes": "{count}+ minutes",
"your_feedback_is_stuck": "Your feedback is stuck :("
},
"errors": {

View File

@@ -8,7 +8,6 @@
"company_logo": "Logo de la empresa",
"finish": "Finalizar",
"language_switch": "Cambio de idioma",
"less_than_x_minutes": "{count, plural, one {menos de 1 minuto} other {menos de {count} minutos}}",
"next": "Siguiente",
"open_in_new_tab": "Abrir en nueva pestaña",
"people_responded": "{count, plural, one {1 persona respondió} other {{count} personas respondieron}}",
@@ -24,12 +23,12 @@
"retry": "Reintentar",
"retrying": "Reintentando...",
"sending_responses": "Enviando respuestas...",
"takes": "Tomas",
"takes_less_than_x_minutes": "{count, plural, one {Toma menos de 1 minuto} other {Toma menos de {count} minutos}}",
"takes_x_minutes": "{count, plural, one {Toma 1 minuto} other {Toma {count} minutos}}",
"takes_x_plus_minutes": "Toma {count}+ minutos",
"terms_of_service": "Términos de servicio",
"the_servers_cannot_be_reached_at_the_moment": "Los servidores no pueden ser alcanzados en este momento.",
"they_will_be_redirected_immediately": "Serán redirigidos inmediatamente",
"x_minutes": "{count, plural, one {1 minuto} other {{count} minutos}}",
"x_plus_minutes": "{count}+ minutos",
"your_feedback_is_stuck": "Tu feedback está atascado :("
},
"errors": {

View File

@@ -8,7 +8,6 @@
"company_logo": "Logo de l'entreprise",
"finish": "Terminer",
"language_switch": "Changement de langue",
"less_than_x_minutes": "{count, plural, one {moins d'une minute} other {moins de {count} minutes}}",
"next": "Suivant",
"open_in_new_tab": "Ouvrir dans un nouvel onglet",
"people_responded": "{count, plural, one {1 personne a répondu} other {{count} personnes ont répondu}}",
@@ -24,12 +23,12 @@
"retry": "Réessayer",
"retrying": "Nouvelle tentative...",
"sending_responses": "Envoi des réponses...",
"takes": "Prises",
"takes_less_than_x_minutes": "{count, plural, one {Prend moins d'une minute} other {Prend moins de {count} minutes}}",
"takes_x_minutes": "{count, plural, one {Prend 1 minute} other {Prend {count} minutes}}",
"takes_x_plus_minutes": "Prend {count}+ minutes",
"terms_of_service": "Conditions d'utilisation",
"the_servers_cannot_be_reached_at_the_moment": "Les serveurs ne sont pas accessibles pour le moment.",
"they_will_be_redirected_immediately": "Ils seront redirigés immédiatement",
"x_minutes": "{count, plural, one {1 minute} other {{count} minutes}}",
"x_plus_minutes": "{count}+ minutes",
"your_feedback_is_stuck": "Votre feedback est bloqué :("
},
"errors": {

View File

@@ -8,7 +8,6 @@
"company_logo": "कंपनी लोगो",
"finish": "समाप्त करें",
"language_switch": "भाषा बदलें",
"less_than_x_minutes": "{count, plural, one {1 मिनट से कम} other {{count} मिनट से कम}}",
"next": "अगला",
"open_in_new_tab": "नए टैब में खोलें",
"people_responded": "{count, plural, one {1 व्यक्ति ने जवाब दिया} other {{count} लोगों ने जवाब दिया}}",
@@ -24,12 +23,12 @@
"retry": "पुनः प्रयास करें",
"retrying": "पुनः प्रयास कर रहे हैं...",
"sending_responses": "प्रतिक्रियाएँ भेज रहे हैं...",
"takes": "लेता है",
"takes_less_than_x_minutes": "{count, plural, one {1 मिनट से कम लगता है} other {{count} मिनट से कम लगता है}}",
"takes_x_minutes": "{count, plural, one {1 मिनट लगता है} other {{count} मिनट लगते हैं}}",
"takes_x_plus_minutes": "{count}+ मिनट लगते हैं",
"terms_of_service": "सेवा की शर्तें",
"the_servers_cannot_be_reached_at_the_moment": "इस समय सर्वर तक पहुंचा नहीं जा सकता है।",
"they_will_be_redirected_immediately": "उन्हें तुरंत रीडायरेक्ट किया जाएगा",
"x_minutes": "{count, plural, one {1 मिनट} other {{count} मिनट}}",
"x_plus_minutes": "{count}+ मिनट",
"your_feedback_is_stuck": "आपकी प्रतिक्रिया अटक गई है :("
},
"errors": {

View File

@@ -8,7 +8,6 @@
"company_logo": "Logo aziendale",
"finish": "Fine",
"language_switch": "Cambio lingua",
"less_than_x_minutes": "{count, plural, one {meno di 1 minuto} other {meno di {count} minuti}}",
"next": "Avanti",
"open_in_new_tab": "Apri in una nuova scheda",
"people_responded": "{count, plural, one {1 persona ha risposto} other {{count} persone hanno risposto}}",
@@ -24,12 +23,12 @@
"retry": "Riprova",
"retrying": "Riprovando...",
"sending_responses": "Invio risposte in corso...",
"takes": "Riprese",
"takes_less_than_x_minutes": "{count, plural, one {Richiede meno di 1 minuto} other {Richiede meno di {count} minuti}}",
"takes_x_minutes": "{count, plural, one {Richiede 1 minuto} other {Richiede {count} minuti}}",
"takes_x_plus_minutes": "Richiede più di {count} minuti",
"terms_of_service": "Termini di servizio",
"the_servers_cannot_be_reached_at_the_moment": "I server non sono raggiungibili al momento.",
"they_will_be_redirected_immediately": "Saranno reindirizzati immediatamente",
"x_minutes": "{count, plural, one {1 minuto} other {{count} minuti}}",
"x_plus_minutes": "{count}+ minuti",
"your_feedback_is_stuck": "Il tuo feedback è bloccato :("
},
"errors": {

View File

@@ -8,7 +8,6 @@
"company_logo": "会社ロゴ",
"finish": "完了",
"language_switch": "言語切替",
"less_than_x_minutes": "{count, plural, other {{count}分未満}}",
"next": "次へ",
"open_in_new_tab": "新しいタブで開く",
"people_responded": "{count, plural, other {{count}人が回答しました}}",
@@ -24,12 +23,12 @@
"retry": "再試行",
"retrying": "再試行中...",
"sending_responses": "回答を送信中...",
"takes": "所要時間",
"takes_less_than_x_minutes": "{count, plural, one {1分未満} other {{count}分未満}}",
"takes_x_minutes": "{count, plural, one {1分} other {{count}分}}",
"takes_x_plus_minutes": "{count}分以上",
"terms_of_service": "利用規約",
"the_servers_cannot_be_reached_at_the_moment": "現在サーバーに接続できません。",
"they_will_be_redirected_immediately": "すぐにリダイレクトされます",
"x_minutes": "{count, plural, one {1分} other {{count}分}}",
"x_plus_minutes": "{count}分以上",
"your_feedback_is_stuck": "フィードバックが送信できません :("
},
"errors": {

View File

@@ -8,7 +8,6 @@
"company_logo": "Bedrijfslogo",
"finish": "Voltooien",
"language_switch": "Taalschakelaar",
"less_than_x_minutes": "{count, plural, one {minder dan 1 minuut} other {minder dan {count} minuten}}",
"next": "Volgende",
"open_in_new_tab": "Openen in nieuw tabblad",
"people_responded": "{count, plural, one {1 persoon heeft gereageerd} other {{count} mensen hebben gereageerd}}",
@@ -24,12 +23,12 @@
"retry": "Opnieuw proberen",
"retrying": "Opnieuw proberen...",
"sending_responses": "Reacties verzenden...",
"takes": "Neemt",
"takes_less_than_x_minutes": "{count, plural, one {Duurt minder dan 1 minuut} other {Duurt minder dan {count} minuten}}",
"takes_x_minutes": "{count, plural, one {Duurt 1 minuut} other {Duurt {count} minuten}}",
"takes_x_plus_minutes": "Duurt {count}+ minuten",
"terms_of_service": "Servicevoorwaarden",
"the_servers_cannot_be_reached_at_the_moment": "De servers zijn momenteel niet bereikbaar.",
"they_will_be_redirected_immediately": "Ze worden onmiddellijk doorgestuurd",
"x_minutes": "{count, plural, one {1 minuut} other {{count} minuten}}",
"x_plus_minutes": "{count}+ minuten",
"your_feedback_is_stuck": "Je feedback blijft hangen :("
},
"errors": {

View File

@@ -8,7 +8,6 @@
"company_logo": "Logo da empresa",
"finish": "Finalizar",
"language_switch": "Alternar idioma",
"less_than_x_minutes": "{count, plural, one {menos de 1 minuto} other {menos de {count} minutos}}",
"next": "Próximo",
"open_in_new_tab": "Abrir em nova aba",
"people_responded": "{count, plural, one {1 pessoa respondeu} other {{count} pessoas responderam}}",
@@ -24,12 +23,12 @@
"retry": "Tentar novamente",
"retrying": "Tentando novamente...",
"sending_responses": "Enviando respostas...",
"takes": "Leva",
"takes_less_than_x_minutes": "{count, plural, one {Leva menos de 1 minuto} other {Leva menos de {count} minutos}}",
"takes_x_minutes": "{count, plural, one {Leva 1 minuto} other {Leva {count} minutos}}",
"takes_x_plus_minutes": "Leva {count}+ minutos",
"terms_of_service": "Termos de serviço",
"the_servers_cannot_be_reached_at_the_moment": "Os servidores não podem ser alcançados no momento.",
"they_will_be_redirected_immediately": "Eles serão redirecionados imediatamente",
"x_minutes": "{count, plural, one {1 minuto} other {{count} minutos}}",
"x_plus_minutes": "{count}+ minutos",
"your_feedback_is_stuck": "Seu feedback está preso :("
},
"errors": {

View File

@@ -8,7 +8,6 @@
"company_logo": "Sigla companiei",
"finish": "Finalizează",
"language_switch": "Schimbare limbă",
"less_than_x_minutes": "{count, plural, one {mai puțin de 1 minut} other {mai puțin de {count} minute}}",
"next": "Următorul",
"open_in_new_tab": "Deschide într-o filă nouă",
"people_responded": "{count, plural, one {1 persoană a răspuns} other {{count} persoane au răspuns}}",
@@ -24,12 +23,12 @@
"retry": "Reîncearcă",
"retrying": "Se reîncearcă...",
"sending_responses": "Trimiterea răspunsurilor...",
"takes": "Durează",
"takes_less_than_x_minutes": "{count, plural, one {Durează mai puțin de 1 minut} few {Durează mai puțin de {count} minute} other {Durează mai puțin de {count} de minute}}",
"takes_x_minutes": "{count, plural, one {Durează 1 minut} few {Durează {count} minute} other {Durează {count} de minute}}",
"takes_x_plus_minutes": "Durează peste {count} minute",
"terms_of_service": "Termeni și condiții",
"the_servers_cannot_be_reached_at_the_moment": "Serverele nu pot fi accesate momentan.",
"they_will_be_redirected_immediately": "Vor fi redirecționați imediat",
"x_minutes": "{count, plural, one {1 minut} other {{count} minute}}",
"x_plus_minutes": "{count}+ minute",
"your_feedback_is_stuck": "Feedback-ul tău este blocat :("
},
"errors": {

View File

@@ -8,7 +8,6 @@
"company_logo": "Логотип компании",
"finish": "Завершить",
"language_switch": "Переключение языка",
"less_than_x_minutes": "{count, plural, one {менее 1 минуты} other {менее {count} минут}}",
"next": "Далее",
"open_in_new_tab": "Открыть в новой вкладке",
"people_responded": "{count, plural, one {1 человек ответил} other {{count} человека ответили}}",
@@ -24,12 +23,12 @@
"retry": "Повторить",
"retrying": "Повторная попытка...",
"sending_responses": "Отправка ответов...",
"takes": "Занимает",
"takes_less_than_x_minutes": "{count, plural, one {Займёт меньше 1 минуты} few {Займёт меньше {count} минут} many {Займёт меньше {count} минут} other {Займёт меньше {count} минуты}}",
"takes_x_minutes": "{count, plural, one {Займёт 1 минуту} few {Займёт {count} минуты} many {Займёт {count} минут} other {Займёт {count} минуты}}",
"takes_x_plus_minutes": "Займёт {count}+ минут",
"terms_of_service": "Условия использования",
"the_servers_cannot_be_reached_at_the_moment": "Сервера в данный момент недоступны.",
"they_will_be_redirected_immediately": "Они будут немедленно перенаправлены",
"x_minutes": "{count, plural, one {1 минута} few {{count} минуты} many {{count} минут}}",
"x_plus_minutes": "{count}+ минут",
"your_feedback_is_stuck": "Ваш отзыв застрял :("
},
"errors": {

View File

@@ -8,7 +8,6 @@
"company_logo": "Företagslogotyp",
"finish": "Slutför",
"language_switch": "Språkväxlare",
"less_than_x_minutes": "{count, plural, one {mindre än 1 minut} other {mindre än {count} minuter}}",
"next": "Nästa",
"open_in_new_tab": "Öppna i ny flik",
"people_responded": "{count, plural, one {1 person har svarat} other {{count} personer har svarat}}",
@@ -24,12 +23,12 @@
"retry": "Försök igen",
"retrying": "Försöker igen...",
"sending_responses": "Skickar svar...",
"takes": "Tar",
"takes_less_than_x_minutes": "{count, plural, one {Tar mindre än 1 minut} other {Tar mindre än {count} minuter}}",
"takes_x_minutes": "{count, plural, one {Tar 1 minut} other {Tar {count} minuter}}",
"takes_x_plus_minutes": "Tar {count}+ minuter",
"terms_of_service": "Användarvillkor",
"the_servers_cannot_be_reached_at_the_moment": "Servrarna kan inte nås för tillfället.",
"they_will_be_redirected_immediately": "De kommer att omdirigeras omedelbart",
"x_minutes": "{count, plural, one {1 minut} other {{count} minuter}}",
"x_plus_minutes": "{count}+ minuter",
"your_feedback_is_stuck": "Din feedback fastnade :("
},
"errors": {

View File

@@ -8,7 +8,6 @@
"company_logo": "Kompaniya logotipi",
"finish": "Tugatish",
"language_switch": "Tilni almashtirish",
"less_than_x_minutes": "{count, plural, one {1 daqiqadan kam} other {{count} daqiqadan kam}}",
"next": "Keyingisi",
"open_in_new_tab": "Yangi oynada ochish",
"people_responded": "{count, plural, one {1 kishi javob berdi} other {{count} kishi javob berdi}}",
@@ -24,12 +23,12 @@
"retry": "Qayta urinib ko'ring",
"retrying": "Qayta urinilmoqda...",
"sending_responses": "Javoblar yuborilmoqda...",
"takes": "Davomiyligi",
"takes_less_than_x_minutes": "{count, plural, one {1 daqiqadan kam vaqt oladi} other {{count} daqiqadan kam vaqt oladi}}",
"takes_x_minutes": "{count, plural, one {1 daqiqa vaqt oladi} other {{count} daqiqa vaqt oladi}}",
"takes_x_plus_minutes": "{count}+ daqiqa vaqt oladi",
"terms_of_service": "Xizmat ko'rsatish shartlari",
"the_servers_cannot_be_reached_at_the_moment": "Hozirda serverlarga ulanish imkoni yo'q.",
"they_will_be_redirected_immediately": "Ular darhol yo'naltiriladi",
"x_minutes": "{count, plural, one {1 daqiqa} other {{count} daqiqa}}",
"x_plus_minutes": "{count}+ daqiqa",
"your_feedback_is_stuck": "Sizning fikr-mulohazangiz qotib qoldi :("
},
"errors": {

View File

@@ -8,7 +8,6 @@
"company_logo": "公司标志",
"finish": "完成",
"language_switch": "语言切换",
"less_than_x_minutes": "{count, plural, one {少于 1 分钟} other {少于 {count} 分钟}}",
"next": "下一步",
"open_in_new_tab": "在新标签页中打开",
"people_responded": "{count, plural, one {1 人已回应} other {{count} 人已回应}}",
@@ -24,12 +23,12 @@
"retry": "重试",
"retrying": "重试中...",
"sending_responses": "正在发送响应...",
"takes": "需要",
"takes_less_than_x_minutes": "{count, plural, one {少于 1 分钟} other {少于 {count} 分钟}}",
"takes_x_minutes": "{count, plural, one {1 分钟} other {{count} 分钟}}",
"takes_x_plus_minutes": "{count}+ 分钟",
"terms_of_service": "服务条款",
"the_servers_cannot_be_reached_at_the_moment": "目前无法连接到服务器。",
"they_will_be_redirected_immediately": "他们将立即被重定向",
"x_minutes": "{count, plural, one {1 分钟} other {{count} 分钟}}",
"x_plus_minutes": "{count}+ 分钟",
"your_feedback_is_stuck": "您的反馈卡住了 :("
},
"errors": {

View File

@@ -94,7 +94,7 @@ export function WelcomeCard({
const timeInSeconds = (questions.length / idx) * 15; //15 seconds per question.
if (timeInSeconds > 360) {
// If it's more than 6 minutes
return t("common.x_plus_minutes", { count: 6 });
return t("common.takes_x_plus_minutes", { count: 6 });
}
// Calculate minutes, if there are any seconds left, add a minute
const minutes = Math.floor(timeInSeconds / 60);
@@ -104,13 +104,13 @@ export function WelcomeCard({
// If there are any seconds left, we'll need to round up to the next minute
if (minutes === 0) {
// If less than 1 minute, return 'less than 1 minute'
return t("common.less_than_x_minutes", { count: 1 });
return t("common.takes_less_than_x_minutes", { count: 1 });
}
// If more than 1 minute, return 'less than X minutes', where X is minutes + 1
return t("common.less_than_x_minutes", { count: minutes + 1 });
return t("common.takes_less_than_x_minutes", { count: minutes + 1 });
}
// If there are no remaining seconds, just return the number of minutes
return t("common.x_minutes", { count: minutes });
return t("common.takes_x_minutes", { count: minutes });
};
const timeToFinish = survey.welcomeCard.timeToFinish;
@@ -182,7 +182,7 @@ export function WelcomeCard({
<TimerIcon />
<p className="pt-1 text-xs">
<span>
{t("common.takes")} {calculateTimeToComplete()}{" "}
{calculateTimeToComplete()}{" "}
</span>
</p>
</div>
@@ -202,7 +202,7 @@ export function WelcomeCard({
<TimerIcon />
<p className="pt-1 text-xs" data-testid="fb__surveys__welcome-card__info-text-test">
<span>
{t("common.takes")} {calculateTimeToComplete()}{" "}
{calculateTimeToComplete()}{" "}
</span>
<span data-testid="fb__surveys__welcome-card__response-count">
{responseCount && responseCount > 3