From 33f880758ad16305125daa02b7ed54475feeb6f8 Mon Sep 17 00:00:00 2001 From: infiinte-persistence Date: Wed, 27 Jan 2021 21:24:39 +0800 Subject: [PATCH] Thumbnail: Display the same label (recommended ratio) for both URL and UPLOAD. - Fix i18n concat problem for some languages. - Display the same label (specifically, the recommended aspect ratio) for both URL and UPLOAD. I think the string "File to upload" can be omitted, but I left it as-is. - Remove old/unused strings. --- static/app-strings.json | 7 ++----- ui/component/selectAsset/view.jsx | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/static/app-strings.json b/static/app-strings.json index 90895546b..e7e9fa543 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -767,8 +767,6 @@ "You need more Credits to purchase this.": "You need more Credits to purchase this.", "Open Rewards": "Open Rewards", "Read our %referral_faq_link% to learn more about rewards.": "Read our %referral_faq_link% to learn more about rewards.", - "Recommended ratio is 1:1": "Recommended ratio is 1:1", - "Recommended ratio is 6.25:1": "Recommended ratio is 6.25:1", "Tags Selected": "Tags Selected", "After submitting, you will not see the changes immediately. Please check back in a few minutes.": "After submitting, you will not see the changes immediately. Please check back in a few minutes.", "You already have a claim with this name.": "You already have a claim with this name.", @@ -1187,8 +1185,6 @@ "Cover source": "Cover source", "Your changes will be live in a few minutes": "Your changes will be live in a few minutes", "Submitting": "Submitting", - "Thumbnail Recommended ratio is 1:1": "Thumbnail Recommended ratio is 1:1", - "Cover Recommended ratio is 6.25:1": "Cover Recommended ratio is 6.25:1", "Old Password": "Old Password", "New Password": "New Password", "Set Password": "Set Password", @@ -1225,7 +1221,8 @@ "Delete Channel": "Delete Channel", "Edit Thumbnail Image": "Edit Thumbnail Image", "Choose image": "Choose image", - "File to upload": "File to upload", + "%image_type% %recommended_ratio%": "%image_type% %recommended_ratio%", + "%label% • File to upload": "%label% • File to upload", "Select video file to upload": "Select video file to upload", "Uploading...": "Uploading...", "Use a URL": "Use a URL", diff --git a/ui/component/selectAsset/view.jsx b/ui/component/selectAsset/view.jsx index 6aabf96d6..5e7090a78 100644 --- a/ui/component/selectAsset/view.jsx +++ b/ui/component/selectAsset/view.jsx @@ -70,6 +70,17 @@ function SelectAsset(props: Props) { }); } + // Note for translators: e.g. "Thumbnail (1:1)" + const label = __('%image_type% %recommended_ratio%', { image_type: assetName, recommended_ratio: recommended }); + + let fileSelectorLabel; + if (uploadStatus === SPEECH_UPLOADING) { + fileSelectorLabel = __('Uploading...'); + } else { + // Include the same label/recommendation for both 'URL' and 'UPLOAD'. + fileSelectorLabel = __('%label% • File to upload', { label: label }); + } + return ( { @@ -93,7 +104,7 @@ function SelectAsset(props: Props) { {