From 642e87229639d6daba75003cd74fe4eda10c7122 Mon Sep 17 00:00:00 2001 From: infiinte-persistence Date: Thu, 11 Feb 2021 13:25:44 +0800 Subject: [PATCH] Change upload limit to a variable to better handle site differences. `const TV_PUBLISH_SIZE_LIMIT_STR_GB = '2';` The above needs to be changed when merging into Odysee. --- static/app-strings.json | 4 ++-- ui/component/publishFile/view.jsx | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/static/app-strings.json b/static/app-strings.json index 8e398dffd..818906c75 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -974,7 +974,7 @@ "You will not see reposts by people you follow or receive email notifying about them.": "You will not see reposts by people you follow or receive email notifying about them.", "Sorry, your request timed out. Modify your options or %again%": "Sorry, your request timed out. Modify your options or %again%", "Pause at any time to select a thumbnail from your video": "Pause at any time to select a thumbnail from your video", - "For video content, use MP4s in H264/AAC format and a friendly bitrate (under 5 Mbps) and resolution (720p) for more reliable streaming. %SITE_NAME% uploads are restricted to 2 GB.": "For video content, use MP4s in H264/AAC format and a friendly bitrate (under 5 Mbps) and resolution (720p) for more reliable streaming. %SITE_NAME% uploads are restricted to 2 GB.", + "For video content, use MP4s in H264/AAC format and a friendly bitrate (under 5 Mbps) and resolution (720p) for more reliable streaming. %SITE_NAME% uploads are restricted to %limit% GB.": "For video content, use MP4s in H264/AAC format and a friendly bitrate (under 5 Mbps) and resolution (720p) for more reliable streaming. %SITE_NAME% uploads are restricted to %limit% GB.", "Share this channel": "Share this channel", "File preview": "File preview", "Go Home": "Go Home", @@ -1064,7 +1064,7 @@ "minute": "minute", "hours": "hours", "hour": "hour", - "%SITE_NAME% uploads are limited to 2 GB. Download the app for unrestricted publishing.": "%SITE_NAME% uploads are limited to 2 GB. Download the app for unrestricted publishing.", + "%SITE_NAME% uploads are limited to %limit% GB. Download the app for unrestricted publishing.": "%SITE_NAME% uploads are limited to %limit% GB. Download the app for unrestricted publishing.", "Connected": "Connected", "Not connected": "Not connected", "this link": "this link", diff --git a/ui/component/publishFile/view.jsx b/ui/component/publishFile/view.jsx index e7ff6868c..2970ee599 100644 --- a/ui/component/publishFile/view.jsx +++ b/ui/component/publishFile/view.jsx @@ -74,9 +74,10 @@ function PublishFile(props: Props) { const RECOMMENDED_BITRATE = 6000000; const TV_PUBLISH_SIZE_LIMIT: number = 2147483648; + const TV_PUBLISH_SIZE_LIMIT_STR_GB = '2'; const UPLOAD_SIZE_MESSAGE = __( - '%SITE_NAME% uploads are limited to 2 GB. Download the app for unrestricted publishing.', - { SITE_NAME } + '%SITE_NAME% uploads are limited to %limit% GB. Download the app for unrestricted publishing.', + { SITE_NAME, limit: TV_PUBLISH_SIZE_LIMIT_STR_GB } ); const PROCESSING_MB_PER_SECOND = 0.5; const MINUTES_THRESHOLD = 30; @@ -196,8 +197,8 @@ function PublishFile(props: Props) { return (

{__( - 'For video content, use MP4s in H264/AAC format and a friendly bitrate (under 5 Mbps) and resolution (720p) for more reliable streaming. %SITE_NAME% uploads are restricted to 2 GB.', - { SITE_NAME } + 'For video content, use MP4s in H264/AAC format and a friendly bitrate (under 5 Mbps) and resolution (720p) for more reliable streaming. %SITE_NAME% uploads are restricted to %limit% GB.', + { SITE_NAME, limit: TV_PUBLISH_SIZE_LIMIT_STR_GB } )}{' '}