Take control over your live stream video by running it yourself. Streaming + chat out of the box.
HTML activitypubbroadcastingchatdecentralizedfederationfediversegolanghacktoberfesthlslivelivestreamowncastrtmpself-hostedstreaming-videovideo
Update EditInstanceDetails admin component to support localization (#4439)
Copilot84b6c3552540
diff --git a/web/components/admin/config/general/EditInstanceDetails.tsx b/web/components/admin/config/general/EditInstanceDetails.tsxindex fc2d8e8549..72ebe9af2e 100644--- a/web/components/admin/config/general/EditInstanceDetails.tsx+++ b/web/components/admin/config/general/EditInstanceDetails.tsx@@ -28,6 +28,8 @@ import { ToggleSwitch } from '../../ToggleSwitch';import { EditLogo } from '../../EditLogo';import FormStatusIndicator from '../../FormStatusIndicator';import { createInputStatus, STATUS_SUCCESS } from '../../../../utils/input-statuses';+import { Translation } from '../../../ui/Translation/Translation';+import { Localization } from '../../../../types/localization';const { Title } = Typography;@@ -248,8 +250,10 @@ export default function EditInstanceDetails() {/></div><div className="field-tip">- The offline message is displayed to your page visitors when you're not streaming.- Markdown is supported.+ <Translation+ translationKey={Localization.Admin.EditInstanceDetails.offlineMessageDescription}+ defaultText="The offline message is displayed to your page visitors when you're not streaming. Markdown is supported."+ /></div><Button@@ -283,23 +287,17 @@ export default function EditInstanceDetails() {<br /><p className="description">- Increase your audience by appearing in the{' '}- <a href="https://directory.owncast.online" target="_blank" rel="noreferrer">- <strong>Owncast Directory</strong>- </a>- . This is an external service run by the Owncast project.{' '}- <a- href="https://owncast.online/docs/directory/?source=admin"- target="_blank"- rel="noopener noreferrer"- >- Learn more- </a>- .+ <Translation+ translationKey={Localization.Admin.EditInstanceDetails.directoryDescription}+ defaultText='Increase your audience by appearing in the <a href="https://directory.owncast.online" target="_blank" rel="noreferrer"><strong>Owncast Directory</strong></a>. This is an external service run by the Owncast project. <a href="https://owncast.online/docs/directory/?source=admin" target="_blank" rel="noopener noreferrer">Learn more</a>.'+ /></p>{!yp.instanceUrl && (<p className="description">- You must set your <strong>Server URL</strong> above to enable the directory.+ <Translation+ translationKey={Localization.Admin.EditInstanceDetails.serverUrlRequiredForDirectory}+ defaultText="You must set your <strong>Server URL</strong> above to enable the directory."+ /></p>)}diff --git a/web/i18n/en/translation.json b/web/i18n/en/translation.jsonindex 69b05ef55e..488634b353 100644--- a/web/i18n/en/translation.json+++ b/web/i18n/en/translation.json@@ -1,5 +1,11 @@{"Add your Owncast instance to the Fediverse": "Add your Owncast instance to the Fediverse",+ "Admin.directoryDescription": "Increase your audience by appearing in the <a href=\"https://directory.owncast.online\" target=\"_blank\" rel=\"noreferrer\"><strong>Owncast Directory</strong></a>. This is an external service run by the Owncast project. <a href=\"https://owncast.online/docs/directory/?source=admin\" target=\"_blank\" rel=\"noopener noreferrer\">Learn more</a>.",+ "Admin.EditInstanceDetails.directoryDescription": "Increase your audience by appearing in the <a href=\"https://directory.owncast.online\" target=\"_blank\" rel=\"noreferrer\"><strong>Owncast Directory</strong></a>. This is an external service run by the Owncast project. <a href=\"https://owncast.online/docs/directory/?source=admin\" target=\"_blank\" rel=\"noopener noreferrer\">Learn more</a>.",+ "Admin.EditInstanceDetails.offlineMessageDescription": "The offline message is displayed to your page visitors when you're not streaming. Markdown is supported.",+ "Admin.EditInstanceDetails.serverUrlRequiredForDirectory": "You must set your <strong>Server URL</strong> above to enable the directory.",+ "Admin.offlineMessageDescription": "The offline message is displayed to your page visitors when you're not streaming. Markdown is supported.",+ "Admin.serverUrlRequiredForDirectory": "You must set your <strong>Server URL</strong> above to enable the directory.","Banned Users": "Banned Users","Bring in moderators to help keep your chat in order": "Bring in moderators to help keep your chat in order.","Chat is disabled": "Chat is disabled",diff --git a/web/types/localization.ts b/web/types/localization.tsindex 65422030d8..451ff7d167 100644--- a/web/types/localization.ts+++ b/web/types/localization.ts@@ -72,6 +72,13 @@ export const Localization = {settings: 'settings',overriddenViaCommandLine: 'Overridden via command line',+ // EditInstanceDetails component specific keys+ EditInstanceDetails: {+ offlineMessageDescription: 'Admin.EditInstanceDetails.offlineMessageDescription',+ directoryDescription: 'Admin.EditInstanceDetails.directoryDescription',+ serverUrlRequiredForDirectory: 'Admin.EditInstanceDetails.serverUrlRequiredForDirectory',+ },+// Logging and monitoringinfo: 'Info',warning: 'Warning',