Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

Few bits needed sorting after the merge

Matt Robertsef93be48a1bd
diff --git a/locale/de/client.json b/locale/de/client.json
index f883b7679..a916e8751 100644
--- a/locale/de/client.json
+++ b/locale/de/client.json
@@ -14,6 +14,7 @@
"action.submit": "Absenden",
"action.vote": "",
"action.voted": "",
+ "d41FkJ": "",
"enum.poststatus.completed": "Erledigt",
"enum.poststatus.declined": "Abgelehnt",
"enum.poststatus.deleted": "Gelöscht",
diff --git a/locale/el/client.json b/locale/el/client.json
index 217e794c6..ca5a28876 100644
--- a/locale/el/client.json
+++ b/locale/el/client.json
@@ -14,6 +14,7 @@
"action.submit": "Υποβολή",
"action.vote": "",
"action.voted": "",
+ "d41FkJ": "",
"enum.poststatus.completed": "Ολοκληρωμένο",
"enum.poststatus.declined": "Απορρίφθηκε",
"enum.poststatus.deleted": "Διαγραμμένο",
diff --git a/locale/en/client.json b/locale/en/client.json
index b4373613f..fd8355594 100644
--- a/locale/en/client.json
+++ b/locale/en/client.json
@@ -14,6 +14,7 @@
"action.submit": "Submit",
"action.vote": "Vote for this idea",
"action.voted": "Voted!",
+ "d41FkJ": "{count, plural, one {# tag} other {# tags}}",
"enum.poststatus.completed": "Completed",
"enum.poststatus.declined": "Declined",
"enum.poststatus.deleted": "Deleted",
diff --git a/locale/es-ES/client.json b/locale/es-ES/client.json
index 839d2a3fa..89db5aa1d 100644
--- a/locale/es-ES/client.json
+++ b/locale/es-ES/client.json
@@ -14,6 +14,7 @@
"action.submit": "Enviar",
"action.vote": "",
"action.voted": "",
+ "d41FkJ": "",
"enum.poststatus.completed": "Completado",
"enum.poststatus.declined": "Rechazado",
"enum.poststatus.deleted": "Eliminado",
diff --git a/locale/fr/client.json b/locale/fr/client.json
index 941f2fb43..eea67e84d 100644
--- a/locale/fr/client.json
+++ b/locale/fr/client.json
@@ -14,6 +14,7 @@
"action.submit": "Valider",
"action.vote": "",
"action.voted": "",
+ "d41FkJ": "",
"enum.poststatus.completed": "Terminé",
"enum.poststatus.declined": "Refusé",
"enum.poststatus.deleted": "Supprimé",
diff --git a/locale/it/client.json b/locale/it/client.json
index f0791fb26..dd3ae8d9a 100644
--- a/locale/it/client.json
+++ b/locale/it/client.json
@@ -14,6 +14,7 @@
"action.submit": "Invia",
"action.vote": "",
"action.voted": "",
+ "d41FkJ": "",
"enum.poststatus.completed": "Completato",
"enum.poststatus.declined": "Rifiutato",
"enum.poststatus.deleted": "Eliminato",
diff --git a/locale/nl/client.json b/locale/nl/client.json
index 60cfabbad..f1060134d 100644
--- a/locale/nl/client.json
+++ b/locale/nl/client.json
@@ -14,6 +14,7 @@
"action.submit": "Verzenden",
"action.vote": "",
"action.voted": "",
+ "d41FkJ": "",
"enum.poststatus.completed": "Voltooid",
"enum.poststatus.declined": "Afgewezen",
"enum.poststatus.deleted": "Verwijderd",
diff --git a/locale/pl/client.json b/locale/pl/client.json
index 82c6ec252..dcbf61117 100644
--- a/locale/pl/client.json
+++ b/locale/pl/client.json
@@ -14,6 +14,7 @@
"action.submit": "Prześlij",
"action.vote": "",
"action.voted": "",
+ "d41FkJ": "",
"enum.poststatus.completed": "Ukończone",
"enum.poststatus.declined": "Odrzucone",
"enum.poststatus.deleted": "Usunięte",
diff --git a/locale/pt-BR/client.json b/locale/pt-BR/client.json
index 968a4052f..ddb3ab1e2 100644
--- a/locale/pt-BR/client.json
+++ b/locale/pt-BR/client.json
@@ -14,6 +14,7 @@
"action.submit": "Enviar",
"action.vote": "",
"action.voted": "",
+ "d41FkJ": "",
"enum.poststatus.completed": "Completado",
"enum.poststatus.declined": "Rejeitado",
"enum.poststatus.deleted": "Removido",
diff --git a/locale/ru/client.json b/locale/ru/client.json
index 155177f74..5675214f0 100644
--- a/locale/ru/client.json
+++ b/locale/ru/client.json
@@ -14,6 +14,7 @@
"action.submit": "Продолжить",
"action.vote": "",
"action.voted": "",
+ "d41FkJ": "",
"enum.poststatus.completed": "Выполнено",
"enum.poststatus.declined": "Отклонено",
"enum.poststatus.deleted": "Удалено",
diff --git a/locale/sk/client.json b/locale/sk/client.json
index 288874349..8fd5a2b00 100644
--- a/locale/sk/client.json
+++ b/locale/sk/client.json
@@ -14,6 +14,7 @@
"action.submit": "Potvrdiť",
"action.vote": "",
"action.voted": "",
+ "d41FkJ": "",
"enum.poststatus.completed": "Dokončené",
"enum.poststatus.declined": "Odmietnuté",
"enum.poststatus.deleted": "Vymazané",
diff --git a/locale/sv-SE/client.json b/locale/sv-SE/client.json
index e586392c7..43503fc80 100644
--- a/locale/sv-SE/client.json
+++ b/locale/sv-SE/client.json
@@ -14,6 +14,7 @@
"action.submit": "Skicka",
"action.vote": "",
"action.voted": "",
+ "d41FkJ": "",
"enum.poststatus.completed": "Avslutad",
"enum.poststatus.declined": "Nekad",
"enum.poststatus.deleted": "Borttagen",
diff --git a/locale/tr/client.json b/locale/tr/client.json
index 3f26a5186..818bb3723 100644
--- a/locale/tr/client.json
+++ b/locale/tr/client.json
@@ -14,6 +14,7 @@
"action.submit": "Gönder",
"action.vote": "",
"action.voted": "",
+ "d41FkJ": "",
"enum.poststatus.completed": "Tamamlandı",
"enum.poststatus.declined": "Reddedildi",
"enum.poststatus.deleted": "Silindi",
diff --git a/locale/zh-CN/client.json b/locale/zh-CN/client.json
index b36ac3355..b2ebc03ad 100644
--- a/locale/zh-CN/client.json
+++ b/locale/zh-CN/client.json
@@ -14,6 +14,7 @@
"action.submit": "提交",
"action.vote": "",
"action.voted": "",
+ "d41FkJ": "",
"enum.poststatus.completed": "完成",
"enum.poststatus.declined": "拒绝",
"enum.poststatus.deleted": "删除",
diff --git a/public/components/common/Button.tsx b/public/components/common/Button.tsx
index 8da70b403..7cfa59d25 100644
--- a/public/components/common/Button.tsx
+++ b/public/components/common/Button.tsx
@@ -16,6 +16,7 @@ interface ButtonProps {
style?: React.CSSProperties
onClick?: (event: ButtonClickEvent) => Promise<any> | void
}
+
export class ButtonClickEvent {
private shouldEnable = true
public preventEnable(): void {
@@ -43,7 +44,7 @@ export const Button: React.FC<ButtonProps> = ({ size = "default", variant = "sec
"c-button--loading": clicked,
"c-button--disabled": clicked || props.disabled,
[props.className || ""]: props.className,
- "shadow-sm": props.variant == "primary" || props.variant == "secondary",
+ "shadow-sm": variant == "primary" || variant == "secondary",
})
let buttonContent: JSX.Element
@@ -77,13 +78,13 @@ export const Button: React.FC<ButtonProps> = ({ size = "default", variant = "sec
}
buttonContent = (
- <button type={props.type} className={className} onClick={onClick} style={props.style}>
+ <button type={type} className={className} onClick={onClick} style={props.style}>
{props.children}
</button>
)
} else {
buttonContent = (
- <button type={props.type} className={className} style={props.style}>
+ <button type={type} className={className} style={props.style}>
{props.children}
</button>
)
@@ -91,3 +92,9 @@ export const Button: React.FC<ButtonProps> = ({ size = "default", variant = "sec
return buttonContent
}
+
+Button.defaultProps = {
+ size: "default",
+ variant: "secondary",
+ type: "button",
+}
diff --git a/public/pages/Home/components/PostFilter.tsx b/public/pages/Home/components/PostFilter.tsx
index 77470703c..571159738 100644
--- a/public/pages/Home/components/PostFilter.tsx
+++ b/public/pages/Home/components/PostFilter.tsx
@@ -103,7 +103,7 @@ export const PostFilter = (props: PostFilterProps) => {
renderHandle={
<HStack className="h-10 text-medium text-xs rounded-md uppercase border border-gray-400 text-gray-800 p-2 px-3">
<Icon sprite={HeroIconFilter} className="h-5 pr-1" />
- {t({ id: "home.filter.label", message: "Filter" })}
+ {i18n._("home.filter.label", { message: "Filter" })}
{filterCount > 0 && <div className="bg-gray-200 inline-block rounded-full px-2 py-1 w-min-4 text-2xs text-center">{filterCount}</div>}
</HStack>
}
diff --git a/public/pages/Home/components/PostsSort.tsx b/public/pages/Home/components/PostsSort.tsx
index 966fa69b3..b13e32bcc 100644
--- a/public/pages/Home/components/PostsSort.tsx
+++ b/public/pages/Home/components/PostsSort.tsx
@@ -1,7 +1,7 @@
import React from "react"
-import { t } from "@lingui/macro"
import { Dropdown } from "@fider/components"
import { HStack } from "@fider/components/layout"
+import { i18n } from "@lingui/core"
interface PostsSortProps {
value: string
@@ -10,10 +10,10 @@ interface PostsSortProps {
export const PostsSort: React.FC<PostsSortProps> = ({ value = "trending", onChange }) => {
const options = [
- { value: "trending", label: t({ id: "home.postfilter.option.trending", message: "Trending" }) },
- { value: "most-wanted", label: t({ id: "home.postfilter.option.mostwanted", message: "Most Wanted" }) },
- { value: "most-discussed", label: t({ id: "home.postfilter.option.mostdiscussed", message: "Most Discussed" }) },
- { value: "recent", label: t({ id: "home.postfilter.option.recent", message: "Recent" }) },
+ { value: "trending", label: i18n._("home.postfilter.option.trending", { message: "Trending" }) },
+ { value: "most-wanted", label: i18n._("home.postfilter.option.mostwanted", { message: "Most Wanted" }) },
+ { value: "most-discussed", label: i18n._("home.postfilter.option.mostdiscussed", { message: "Most Discussed" }) },
+ { value: "recent", label: i18n._("home.postfilter.option.recent", { message: "Recent" }) },
]
const selectedItem = options.find((x) => x.value === value) || options[0]
@@ -23,7 +23,7 @@ export const PostsSort: React.FC<PostsSortProps> = ({ value = "trending", onChan
<Dropdown
renderHandle={
<div className="h-10 flex flex-items-center text-medium text-xs rounded-md uppercase border border-gray-400 text-gray-800 p-2 px-3">
- {t({ id: "home.postsort.label", message: "Sort by:" })} {selectedItem.label}
+ {i18n._("home.postsort.label", { message: "Sort by:" })} {selectedItem.label}
</div>
}
>
diff --git a/public/pages/ShowPost/components/ResponseModal.tsx b/public/pages/ShowPost/components/ResponseModal.tsx
index 7aee896e4..79287f1dc 100644
--- a/public/pages/ShowPost/components/ResponseModal.tsx
+++ b/public/pages/ShowPost/components/ResponseModal.tsx
@@ -87,8 +87,7 @@ export class ResponseModal extends React.Component<ResponseModalProps, ResponseM
onChange={this.setText}
value={this.state.text}
minRows={5}
- placeholder={t({
- id: "showpost.responseform.text.placeholder",
+ placeholder={i18n._("showpost.responseform.text.placeholder", {
message: "What's going on with this post? Let your users know what are your plans...",
})}
/>