Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

Move to <Plural>

Matt Robertsfd7c2cbaa089
diff --git a/locale/ar/client.json b/locale/ar/client.json
index 1c97df120..42298ba13 100644
--- a/locale/ar/client.json
+++ b/locale/ar/client.json
@@ -87,9 +87,8 @@
"label.tags": "وسوم",
"label.unread": "غير مقروء",
"label.unsubscribe": "إلغاء الاشتراك",
- "label.vote": "تصويت",
+ "label.votecount": "{votes, plural, one {تصويت} other {الأصوات}}",
"label.voters": "المصوتون",
- "label.votes": "الأصوات",
"labels.notagsavailable": "لا توجد وسوم متاحة",
"legal.agreement": "لقد قرأت <0/> و<1/> وأوافق على ذلك.",
"legal.notice": "من خلال تسجيل الدخول، أنت توافق على <0/><1/> و <2/>.",
@@ -246,4 +245,4 @@
"signin.name.placeholder": "اسمك",
"validation.custom.maxattachments": "يُسمح بحد أقصى {number} من المرفقات.",
"validation.custom.maximagesize": "يجب أن يكون حجم الصورة أصغر من {kilobytes}KB."
-}
\ No newline at end of file
+}
diff --git a/locale/de/client.json b/locale/de/client.json
index 771072aab..ef943bc85 100644
--- a/locale/de/client.json
+++ b/locale/de/client.json
@@ -87,9 +87,8 @@
"label.tags": "Tags",
"label.unread": "Ungelesen",
"label.unsubscribe": "Abbestellen",
- "label.vote": "Abstimmen",
+ "label.votecount": "{votes, plural, one {Stimme} other {Stimmen}}",
"label.voters": "Wähler",
- "label.votes": "Stimmen",
"labels.notagsavailable": "Keine Tags verfügbar",
"legal.agreement": "Ich habe die <0/> und <1/> gelesen und akzeptiere sie.",
"legal.notice": "Mit der Anmeldung stimmst du den <0/><1/> und <2/> zu.",
@@ -246,4 +245,4 @@
"signin.name.placeholder": "Dein Name",
"validation.custom.maxattachments": "Es sind maximal {number} Anhänge zulässig.",
"validation.custom.maximagesize": "Die Bildgröße muss kleiner als {kilobytes}KB sein."
-}
\ No newline at end of file
+}
diff --git a/locale/el/client.json b/locale/el/client.json
index 0f5ecfe85..d24d46592 100644
--- a/locale/el/client.json
+++ b/locale/el/client.json
@@ -87,9 +87,8 @@
"label.tags": "Ετικέτες",
"label.unread": "Αδιάβαστο",
"label.unsubscribe": "Απεγγραφή",
- "label.vote": "Ψήφος",
+ "label.votecount": "{votes, plural, one {Ψήφος} other {Ψήφοι}}",
"label.voters": "Ψηφοφόροι",
- "label.votes": "Ψήφοι",
"labels.notagsavailable": "Δεν υπάρχουν διαθέσιμες ετικέτες",
"legal.agreement": "Έχω διαβάσει και συμφωνώ με το <0/> και <1/>.",
"legal.notice": "Με την είσοδο, συμφωνείτε με το <0/><1/> και <2/>.",
@@ -246,4 +245,4 @@
"signin.name.placeholder": "Το όνομά σας",
"validation.custom.maxattachments": "Επιτρέπονται έως {number} συνημμένα.",
"validation.custom.maximagesize": "Το μέγεθος της εικόνας πρέπει να είναι μικρότερο από {kilobytes}KB."
-}
\ No newline at end of file
+}
diff --git a/locale/en/client.json b/locale/en/client.json
index 4ceecb789..1f92e50e2 100644
--- a/locale/en/client.json
+++ b/locale/en/client.json
@@ -87,9 +87,8 @@
"label.tags": "Tags",
"label.unread": "Unread",
"label.unsubscribe": "Unsubscribe",
- "label.vote": "Vote",
+ "label.votecount": "{votes, plural, one {Vote} other {Votes}}",
"label.voters": "Voters",
- "label.votes": "Votes",
"labels.notagsavailable": "No tags available",
"legal.agreement": "I have read and agree to the <0/> and <1/>.",
"legal.notice": "By signing in, you agree to the <0/><1/> and <2/>.",
@@ -101,7 +100,7 @@
"linkmodal.title": "Insert Link",
"linkmodal.url.label": "URL",
"linkmodal.url.placeholder": "https://example.com",
- "listposts.label.showmore": "Show {0} more",
+ "listposts.label.showmore": "Show {remainingCount} more",
"menu.administration": "Administration",
"menu.mysettings": "My Settings",
"menu.signout": "Sign out",
diff --git a/locale/es-ES/client.json b/locale/es-ES/client.json
index 7ae523921..7c64ce2b4 100644
--- a/locale/es-ES/client.json
+++ b/locale/es-ES/client.json
@@ -87,9 +87,8 @@
"label.tags": "Etiquetas",
"label.unread": "Sin leer",
"label.unsubscribe": "Cancelar la suscripción",
- "label.vote": "Votar",
+ "label.votecount": "{votes, plural, one {Votar} other {Votos}}",
"label.voters": "Votantes",
- "label.votes": "Votos",
"labels.notagsavailable": "No hay etiquetas disponibles",
"legal.agreement": "He leído y acepto los <0/> y <1/>.",
"legal.notice": "Al iniciar sesión, aceptas los <0/><1/> y <2/>.",
@@ -246,4 +245,4 @@
"signin.name.placeholder": "Su nombre",
"validation.custom.maxattachments": "Se permite un máximo de {number} archivos adjuntos.",
"validation.custom.maximagesize": "El tamaño de la imagen debe ser menor que {kilobytes}KB."
-}
\ No newline at end of file
+}
diff --git a/locale/fa/client.json b/locale/fa/client.json
index 71ef38f93..2ba8ff5d7 100644
--- a/locale/fa/client.json
+++ b/locale/fa/client.json
@@ -87,9 +87,8 @@
"label.tags": "برچسب‌ها",
"label.unread": "خوانده‌نشده",
"label.unsubscribe": "لغو اشتراک",
- "label.vote": "رأی دهید",
+ "label.votecount": "{votes, plural, one {رأی دهید} other {آرا}}",
"label.voters": "رأی‌دهندگان",
- "label.votes": "آرا",
"labels.notagsavailable": "برچسبی در دسترس نیست",
"legal.agreement": "من <0/> و <1/> را خوانده‌ام و قبول دارم.",
"legal.notice": "با ورود، شما با <0/><1/> و <2/> موافقید.",
@@ -246,4 +245,4 @@
"signin.name.placeholder": "نام شما",
"validation.custom.maxattachments": "حداکثر تعداد {number} پیوست مجاز است.",
"validation.custom.maximagesize": "حجم تصویر باید کمتر از {kilobytes}KB باشد."
-}
\ No newline at end of file
+}
diff --git a/locale/fr/client.json b/locale/fr/client.json
index 43eb69d0b..1df04dd1c 100644
--- a/locale/fr/client.json
+++ b/locale/fr/client.json
@@ -87,9 +87,8 @@
"label.tags": "Mots clés",
"label.unread": "Non lu",
"label.unsubscribe": "Se désabonner",
- "label.vote": "Voter",
+ "label.votecount": "{votes, plural, one {Voter} other {}}",
"label.voters": "Votants",
- "label.votes": "",
"labels.notagsavailable": "Aucune étiquette disponible",
"legal.agreement": "J'ai lu et j'accepte les <0/> et <1/>.",
"legal.notice": "En vous connectant, vous acceptez les <0/><1/> et <2/>.",
@@ -246,4 +245,4 @@
"signin.name.placeholder": "Votre nom",
"validation.custom.maxattachments": "Un maximum de {number} pièces jointes est autorisé.",
"validation.custom.maximagesize": "La taille de l'image doit être inférieure à {kilobytes}KB."
-}
\ No newline at end of file
+}
diff --git a/locale/it/client.json b/locale/it/client.json
index 77f0f163d..3e2831aff 100644
--- a/locale/it/client.json
+++ b/locale/it/client.json
@@ -87,9 +87,8 @@
"label.tags": "Etichette",
"label.unread": "Non letto",
"label.unsubscribe": "Disiscriversi",
- "label.vote": "Votare",
+ "label.votecount": "{votes, plural, one {Votare} other {Voti}}",
"label.voters": "Votanti",
- "label.votes": "Voti",
"labels.notagsavailable": "Nessun tag disponibile",
"legal.agreement": "Ho letto e accetto le <0/> e <1/>.",
"legal.notice": "Accedendo, accetti i <0/><1/> e <2/>.",
@@ -246,4 +245,4 @@
"signin.name.placeholder": "Il tuo nome",
"validation.custom.maxattachments": "Sono consentiti al massimo {number} allegati.",
"validation.custom.maximagesize": "La dimensione dell'immagine deve essere inferiore a {kilobytes}KB."
-}
\ No newline at end of file
+}
diff --git a/locale/ja/client.json b/locale/ja/client.json
index e7f125206..8d7516fae 100644
--- a/locale/ja/client.json
+++ b/locale/ja/client.json
@@ -87,9 +87,8 @@
"label.tags": "タグ",
"label.unread": "未読",
"label.unsubscribe": "購読の解除",
- "label.vote": "投票する",
+ "label.votecount": "{votes, plural, one {投票する} other {投票}}",
"label.voters": "投票者",
- "label.votes": "投票",
"labels.notagsavailable": "利用可能なタグはありません",
"legal.agreement": "私は<0/>と<1/>を読み、同意しました。",
"legal.notice": "サインインすると、<0/><1/> および <2/> に同意したことになります。",
@@ -246,4 +245,4 @@
"signin.name.placeholder": "あなたの名前",
"validation.custom.maxattachments": "最大 {number} 個の添付ファイルが許可されます。",
"validation.custom.maximagesize": "画像サイズは{kilobytes}KB未満である必要があります。"
-}
\ No newline at end of file
+}
diff --git a/locale/nl/client.json b/locale/nl/client.json
index 792e65143..f6fb0ea51 100644
--- a/locale/nl/client.json
+++ b/locale/nl/client.json
@@ -87,9 +87,8 @@
"label.tags": "Labels",
"label.unread": "Ongelezen",
"label.unsubscribe": "Uitschrijven",
- "label.vote": "Stemmen",
+ "label.votecount": "{votes, plural, one {Stemmen} other {Stemmen}}",
"label.voters": "Stemmers",
- "label.votes": "Stemmen",
"labels.notagsavailable": "Geen tags beschikbaar",
"legal.agreement": "Ik heb de <0/> en <1/> gelezen en ga hiermee akkoord.",
"legal.notice": "Door in te loggen, ga je akkoord met de <0/><1/> en <2/>.",
@@ -246,4 +245,4 @@
"signin.name.placeholder": "Jouw naam",
"validation.custom.maxattachments": "Er zijn maximaal {number} bijlagen toegestaan.",
"validation.custom.maximagesize": "De afbeeldingsgrootte moet kleiner zijn dan {kilobytes}KB."
-}
\ No newline at end of file
+}
diff --git a/locale/pl/client.json b/locale/pl/client.json
index e825b8052..c8790a597 100644
--- a/locale/pl/client.json
+++ b/locale/pl/client.json
@@ -87,9 +87,8 @@
"label.tags": "Tagi",
"label.unread": "Nieprzeczytane",
"label.unsubscribe": "Zrezygnuj z subskrypcji",
- "label.vote": "Głos",
+ "label.votecount": "{votes, plural, one {Głos} other {Głosów}}",
"label.voters": "Głosujący",
- "label.votes": "Głosów",
"labels.notagsavailable": "Brak dostępnych tagów",
"legal.agreement": "Przeczytałem i zgadzam się z <0/> i <1/>.",
"legal.notice": "Logując się, akceptujesz <0/><1/> i <2/>.",
@@ -246,4 +245,4 @@
"signin.name.placeholder": "Twoje imię",
"validation.custom.maxattachments": "Maksymalna liczba załączników to {number}.",
"validation.custom.maximagesize": "Rozmiar obrazu musi być mniejszy niż {kilobytes}KB."
-}
\ No newline at end of file
+}
diff --git a/locale/pt-BR/client.json b/locale/pt-BR/client.json
index 1ab069ebd..54209d292 100644
--- a/locale/pt-BR/client.json
+++ b/locale/pt-BR/client.json
@@ -87,9 +87,8 @@
"label.tags": "Etiquetas",
"label.unread": "Não lidas",
"label.unsubscribe": "Desinscrever-se",
- "label.vote": "Voto",
+ "label.votecount": "{votes, plural, one {Voto} other {Votos}}",
"label.voters": "Votantes",
- "label.votes": "Votos",
"labels.notagsavailable": "Não há tags disponíveis",
"legal.agreement": "Eu li e concordo com os <0/> e <1/>.",
"legal.notice": "Ao fazer o login, você concorda com os <0/><1/> e <2/>.",
@@ -246,4 +245,4 @@
"signin.name.placeholder": "Seu nome",
"validation.custom.maxattachments": "São permitidos no máximo {number} anexos.",
"validation.custom.maximagesize": "O tamanho da imagem deve ser menor que {kilobytes}KB."
-}
\ No newline at end of file
+}
diff --git a/locale/ru/client.json b/locale/ru/client.json
index a2f3e6edf..465ea73ff 100644
--- a/locale/ru/client.json
+++ b/locale/ru/client.json
@@ -87,9 +87,8 @@
"label.tags": "Теги",
"label.unread": "Непрочитанные",
"label.unsubscribe": "Отписаться",
- "label.vote": "Голосование",
+ "label.votecount": "{votes, plural, one {Голосование} other {Голоса}}",
"label.voters": "Проголосовавшие",
- "label.votes": "Голоса",
"labels.notagsavailable": "Нет доступных тегов",
"legal.agreement": "Я прочитал и согласен с <0/> и <1/>.",
"legal.notice": "Войдя в систему, вы соглашаетесь с <0/><1/> и <2/>.",
@@ -246,4 +245,4 @@
"signin.name.placeholder": "Ваше имя",
"validation.custom.maxattachments": "Разрешено максимум {number} вложений.",
"validation.custom.maximagesize": "Размер изображения должен быть меньше {kilobytes}КБ."
-}
\ No newline at end of file
+}
diff --git a/locale/sk/client.json b/locale/sk/client.json
index eed36dc72..f316ed283 100644
--- a/locale/sk/client.json
+++ b/locale/sk/client.json
@@ -87,9 +87,8 @@
"label.tags": "Značky",
"label.unread": "Neprečítané",
"label.unsubscribe": "Zrušiť odber",
- "label.vote": "Hlasujte",
+ "label.votecount": "{votes, plural, one {Hlasujte} other {Hlasy}}",
"label.voters": "Hlasujúci",
- "label.votes": "Hlasy",
"labels.notagsavailable": "Značky nie sú dostupné",
"legal.agreement": "Prečítal som a súhlasím s <0/> a <1/>.",
"legal.notice": "Prihlásením súhlasíte s <0/><1/> a <2/>.",
@@ -246,4 +245,4 @@
"signin.name.placeholder": "Vaše meno",
"validation.custom.maxattachments": "Maximálny počet príloh je {number}.",
"validation.custom.maximagesize": "Veľkosť obrázka musí byť menšia ako {kilobytes}KB."
-}
\ No newline at end of file
+}
diff --git a/locale/sv-SE/client.json b/locale/sv-SE/client.json
index ab2de5d26..5ca27dceb 100644
--- a/locale/sv-SE/client.json
+++ b/locale/sv-SE/client.json
@@ -87,9 +87,8 @@
"label.tags": "Etiketter",
"label.unread": "Olästa",
"label.unsubscribe": "Avsluta prenumeration",
- "label.vote": "Rösta",
+ "label.votecount": "{votes, plural, one {Rösta} other {Röster}}",
"label.voters": "Röstande",
- "label.votes": "Röster",
"labels.notagsavailable": "Inga taggar tillgängliga",
"legal.agreement": "Jag har läst och godkänner <0/> och <1/>.",
"legal.notice": "Genom att logga in godkänner du <0/><1/> och <2/>.",
@@ -246,4 +245,4 @@
"signin.name.placeholder": "Ditt namn",
"validation.custom.maxattachments": "Maximalt {number} bilagor är tillåtna.",
"validation.custom.maximagesize": "Bildstorleken måste vara mindre än {kilobytes}KB."
-}
\ No newline at end of file
+}
diff --git a/locale/tr/client.json b/locale/tr/client.json
index da7e65f65..ac6dc0f50 100644
--- a/locale/tr/client.json
+++ b/locale/tr/client.json
@@ -87,9 +87,8 @@
"label.tags": "Etiketler",
"label.unread": "Okunmamış",
"label.unsubscribe": "Abonelikten çık",
- "label.vote": "Oy",
+ "label.votecount": "{votes, plural, one {Oy} other {Oylar}}",
"label.voters": "Oy verenler",
- "label.votes": "Oylar",
"labels.notagsavailable": "Hiçbir etiket mevcut değil",
"legal.agreement": "<0/> ve <1/> okudum ve onayladım.",
"legal.notice": "Giriş yaparak <0/><1/> ve <2/> maddelerini kabul etmiş olursunuz.",
@@ -246,4 +245,4 @@
"signin.name.placeholder": "Adınız",
"validation.custom.maxattachments": "En fazla {number} ek dosyaya izin verilir.",
"validation.custom.maximagesize": "Resim boyutu {kilobytes}KB'den küçük olmalıdır."
-}
\ No newline at end of file
+}
diff --git a/locale/zh-CN/client.json b/locale/zh-CN/client.json
index 1d729e2a5..f933d2753 100644
--- a/locale/zh-CN/client.json
+++ b/locale/zh-CN/client.json
@@ -87,9 +87,8 @@
"label.tags": "标签",
"label.unread": "未读",
"label.unsubscribe": "取消订阅",
- "label.vote": "投票",
+ "label.votecount": "{votes, plural, one {投票} other {投票}}",
"label.voters": "投票者",
- "label.votes": "投票",
"labels.notagsavailable": "没有可用的标签",
"legal.agreement": "我已阅读并同意<0/>和<1/>。",
"legal.notice": "在签署时,您同意<0/><1/>和<2/>。",
@@ -246,4 +245,4 @@
"signin.name.placeholder": "你的名字",
"validation.custom.maxattachments": "最多允许 {number} 个附件。",
"validation.custom.maximagesize": "图像大小必须小于{kilobytes}KB。"
-}
\ No newline at end of file
+}
diff --git a/locale/zh-TW/client.json b/locale/zh-TW/client.json
index d50aa998b..f40b49de5 100644
--- a/locale/zh-TW/client.json
+++ b/locale/zh-TW/client.json
@@ -87,9 +87,8 @@
"label.tags": "標籤",
"label.unread": "未讀",
"label.unsubscribe": "取消訂閱",
- "label.vote": "投票",
+ "label.votecount": "{votes, plural, one {投票} other {票數}}",
"label.voters": "投票者",
- "label.votes": "票數",
"labels.notagsavailable": "沒有可用的標籤",
"legal.agreement": "我已閱讀並同意<0/>和<1/>。",
"legal.notice": "登入即表示您同意<0/><1/>和<2/>。",
@@ -246,4 +245,4 @@
"signin.name.placeholder": "您的姓名",
"validation.custom.maxattachments": "最多允許 {number} 個附件。",
"validation.custom.maximagesize": "圖片大小必須小於 {kilobytes}KB。"
-}
\ No newline at end of file
+}
diff --git a/public/pages/Home/components/ListPosts.tsx b/public/pages/Home/components/ListPosts.tsx
index 5158cd4b1..6ea648f34 100644
--- a/public/pages/Home/components/ListPosts.tsx
+++ b/public/pages/Home/components/ListPosts.tsx
@@ -5,7 +5,7 @@ import IconChatAlt2 from "@fider/assets/images/heroicons-chat-alt-2.svg"
import IconCheck from "@fider/assets/images/heroicons-check.svg"
import { HStack, VStack } from "@fider/components/layout"
import { useFider } from "@fider/hooks"
-import { Trans } from "@lingui/react/macro"
+import { Trans, Plural } from "@lingui/react/macro"
interface ListPostsProps {
posts?: Post[]
@@ -27,6 +27,7 @@ const ListPostItem = (props: {
const fider = useFider()
const isModerationEnabled = fider.session.tenant.isModerationEnabled
const isPending = isModerationEnabled && !props.post.isApproved
+ const votes = props.post.votesCount
const handleClick = (e: React.MouseEvent<HTMLAnchorElement>) => {
if (props.onPostClick) {
@@ -64,8 +65,10 @@ const ListPostItem = (props: {
)}
<HStack justify="between" align="center">
<div className="c-posts-container__post-votes">
- <span className="text-semibold text-2xl">{props.post.votesCount}</span>{" "}
- <span className="text-gray-700">{props.post.votesCount === 1 ? <Trans id="label.vote">Vote</Trans> : <Trans id="label.votes">Votes</Trans>}</span>
+ <span className="text-semibold text-2xl">{votes}</span>{" "}
+ <span className="text-gray-700">
+ <Plural id="label.votecount" value={votes} one="Vote" other="Votes" />
+ </span>
{props.post.hasVoted && (
<span className="text-xs text-blue-600 ml-2 inline-flex flex-items-center">
<Icon sprite={IconCheck} className="h-3 w-3 mr-1" />
diff --git a/public/pages/Roadmap/Roadmap.page.tsx b/public/pages/Roadmap/Roadmap.page.tsx
index 3947ff2d8..90b33718a 100644
--- a/public/pages/Roadmap/Roadmap.page.tsx
+++ b/public/pages/Roadmap/Roadmap.page.tsx
@@ -9,7 +9,7 @@ import { VStack, HStack } from "@fider/components/layout"
import { useFider, usePostOverlay } from "@fider/hooks"
import { actions } from "@fider/services"
import { PostDetails } from "@fider/components/PostDetails"
-import { Trans } from "@lingui/react/macro"
+import { Trans, Plural } from "@lingui/react/macro"
interface RoadmapPageProps {
plannedPosts?: Post[]
@@ -40,6 +40,7 @@ const RoadmapPost = (props: { post: Post; tags: Tag[]; status: string; onPostCli
const isModerationEnabled = fider.session.tenant.isModerationEnabled
const isPending = isModerationEnabled && !props.post.isApproved
const isCompleted = props.status === "completed"
+ const votes = props.post.votesCount
const handleClick = (e: React.MouseEvent<HTMLAnchorElement>) => {
if (props.onPostClick) {
@@ -73,8 +74,7 @@ const RoadmapPost = (props: { post: Post; tags: Tag[]; status: string; onPostCli
</HStack>
) : (
<span className="c-roadmap-post__votes">
- <span className="text-semibold">{props.post.votesCount}</span>{" "}
- {props.post.votesCount === 1 ? <Trans id="label.vote">Vote</Trans> : <Trans id="label.votes">Votes</Trans>}
+ <span className="text-semibold">{votes}</span> <Plural id="label.votecount" value={votes} one="Vote" other="Votes" />
</span>
)}
</VStack>
diff --git a/public/pages/ShowPost/components/VoteSection.tsx b/public/pages/ShowPost/components/VoteSection.tsx
index d021fd8e5..590245f3e 100644
--- a/public/pages/ShowPost/components/VoteSection.tsx
+++ b/public/pages/ShowPost/components/VoteSection.tsx
@@ -5,7 +5,7 @@ import { Button, Icon, SignInModal } from "@fider/components"
import { useFider } from "@fider/hooks"
import IconThumbsUp from "@fider/assets/images/heroicons-thumbsup.svg"
import IconCheck from "@fider/assets/images/heroicons-check.svg"
-import { Trans } from "@lingui/react/macro"
+import { Trans, Plural } from "@lingui/react/macro"
import { HStack, VStack } from "@fider/components/layout"
interface VoteSectionProps {
@@ -58,7 +58,9 @@ export const VoteSection = (props: VoteSectionProps) => {
<span className="text-semibold text-2xl" style={{ fontSize: "32px", minHeight: "48px" }}>
{votes}
</span>
- <span className="text-semibold text-lg">{votes === 1 ? <Trans id="label.vote">Vote</Trans> : <Trans id="label.votes">Votes</Trans>}</span>
+ <span className="text-semibold text-lg">
+ <Plural id="label.votecount" value={votes} one="Vote" other="Votes" />
+ </span>
</HStack>
</VStack>
</>