Last active
March 27, 2022 11:54
-
-
Save nemrosim/4ff7c2538ba206a91d97da7576d75f8a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
-import { Plural } from "@lingui/macro"; | |
+import { Plural, plural } from "@lingui/macro"; | |
export const JSXPlurals: React.FC = () => { | |
const amountList = [ 0, 1, 2, 5, 100 ] | |
+ const jsMacrosExample = (amount: number) => plural(amount, { | |
+ one: "You got {amount} item (one)", | |
+ many: 'You got {amount} items (many)', | |
+ other: 'You got {amount} items (other)' | |
+ }) | |
+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment