From 91a0c6b4fb16694afde1fac1a5c41a7d2c43a6b0 Mon Sep 17 00:00:00 2001 From: infiinte-persistence Date: Tue, 26 May 2020 20:49:21 +0800 Subject: [PATCH] Fix split sentence: "%view_count% %views%" The only issue I have with this as a translator is that I have no idea what this sentence is about, as both chunks are variables. This fix is more for clarity. #4239 --- static/app-strings.json | 2 ++ ui/component/creatorAnalytics/view.jsx | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/static/app-strings.json b/static/app-strings.json index 9cdaaa1ed..a03565602 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -885,6 +885,8 @@ "A lbry.tv account allows you to earn more than %credit_amount% in rewards, backup your data, and get content and security updates.": "A lbry.tv account allows you to earn more than %credit_amount% in rewards, backup your data, and get content and security updates.", "Deposit cannot be higher than your balance": "Deposit cannot be higher than your balance", "%view_count% Views": "%view_count% Views", + "%view_count% views": "%view_count% views", + "%view_count% view": "%view_count% view", "1 View": "1 View", "There was an error. It's been reported and will be fixed. Try %refreshing_the_app_link% to fix it. If that doesn't work, try pressing Ctrl+R/Cmd+R.": "There was an error. It's been reported and will be fixed. Try %refreshing_the_app_link% to fix it. If that doesn't work, try pressing Ctrl+R/Cmd+R.", "Upload your thumbnail to %speech_link%. Recommended size is 16:9.": "Upload your thumbnail to %speech_link%. Recommended size is 16:9.", diff --git a/ui/component/creatorAnalytics/view.jsx b/ui/component/creatorAnalytics/view.jsx index b6b7bcd9a..2c1cd03fe 100644 --- a/ui/component/creatorAnalytics/view.jsx +++ b/ui/component/creatorAnalytics/view.jsx @@ -178,10 +178,9 @@ export default function CreatorAnalytics(props: Props) {
- {__('%view_count% %views%', { - view_count: stats.VideoViewsTopNew, - views: stats.VideoViewsTopNew === 1 ? 'view' : 'views', - })} + {stats.VideoViewsTopNew === 1 + ? __('%view_count% view', { view_count: stats.VideoViewsTopNew }) + : __('%view_count% views', { view_count: stats.VideoViewsTopNew })} {stats.VideoViewsTopNew > 0 && }