Create custom Translation component for better i18n handling (#4431)
* Initial plan * Implement Translation component with Storybook stories Co-authored-by: gabek <414923+gabek@users.noreply.github.com> * Add Jest test for Translation component and demonstrate ?lang=de functionality Co-authored-by: gabek <414923+gabek@users.noreply.github.com> * Javascript formatting autofixes * Create centralized type-safe localization system Co-authored-by: gabek <414923+gabek@users.noreply.github.com> * Add @testing-library/react to Translation component tests Co-authored-by: gabek <414923+gabek@users.noreply.github.com> * Fix code formatting errors with prettier and eslint Co-authored-by: gabek <414923+gabek@users.noreply.github.com> * Revert "Fix code formatting errors with prettier and eslint" Co-authored-by: gabek <414923+gabek@users.noreply.github.com> * fix(js): eslinter errors * fix(js): unused code warnings * fix(js): fix additional warnings * Update Emoji admin page to use new Translation component Co-authored-by: gabek <414923+gabek@users.noreply.github.com> * Organize localization keys by logical sections (Frontend, Admin, Common, Testing) Co-authored-by: gabek <414923+gabek@users.noreply.github.com> * Organize localization keys by TypeScript namespaces Co-authored-by: gabek <414923+gabek@users.noreply.github.com> * Javascript formatting autofixes * feat(js): add support for default translated text * chore: add default lang translations on commit * fix(js): unused code warnings * Update OfflineBanner component to use new Translation component Co-authored-by: gabek <414923+gabek@users.noreply.github.com> * fix(js): fix localization extraction job * chore(js): remove ts-node cli * fix(css): fix css warning * feat(js): add some additional translation strings via component * chore: update extracted translations * test: add tests for Translation component defaultText and fallback behavior Co-authored-by: gabek <414923+gabek@users.noreply.github.com> * chore: update extracted translations * Javascript formatting autofixes * chore: call out new Translation component * fix: linter warning * chore: updated instructions --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: gabek <414923+gabek@users.noreply.github.com> Co-authored-by: Owncast <owncast@owncast.online> Co-authored-by: Gabe Kangas <gabek@real-ity.com>
This commit is contained in:
co-authored by
gabek
copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Owncast
Gabe Kangas
parent
7b181aa0a6
commit
29b5100114
+134
-115
@@ -1,132 +1,151 @@
|
||||
{
|
||||
"Notify": "Notify",
|
||||
"Level": "Level",
|
||||
"Info": "Info",
|
||||
"Warning": "Warning",
|
||||
"Error": "Error",
|
||||
"Timestamp": "Timestamp",
|
||||
"Message": "Message",
|
||||
"Logs": "Logs",
|
||||
"Link": "Link",
|
||||
"No news": "No news.",
|
||||
"News & Updates from Owncast": "News & Updates from Owncast",
|
||||
"Use your broadcasting software": "Use your broadcasting software",
|
||||
"Learn how to point your existing software to your new server and start streaming your content": "Learn how to point your existing software to your new server and start streaming your content.",
|
||||
"View": "View",
|
||||
"Overridden via command line": "Overridden via command line.",
|
||||
"Embed your video onto other sites": "Embed your video onto other sites",
|
||||
"Learn how you can add your Owncast stream to other sites you control": "Learn how you can add your Owncast stream to other sites you control.",
|
||||
"Add your Owncast instance to the Fediverse": "Add your Owncast instance to the Fediverse",
|
||||
"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",
|
||||
"Chat is offline": "Chat is offline",
|
||||
"Chat Messages": "Chat Messages",
|
||||
"Chat will be available when the stream is live": "Chat will be available when the stream is live.",
|
||||
"Chat will continue to be disabled until you begin a live stream": "Chat will continue to be disabled until you begin a live stream.",
|
||||
"Click and never miss future streams!": "Click and never miss future streams!",
|
||||
"Common tasks": "Common tasks",
|
||||
"Common.poweredByOwncastVersion": "Powered by <a href='https://owncast.online'>Owncast v{{versionNumber}}</a>",
|
||||
"complex_message": "This is a <em>complex</em> message with <strong>{{count}}</strong> viewers and <code>{{status}}</code> status.",
|
||||
"Connected": "Connected",
|
||||
"Contribute": "Contribute",
|
||||
"CPU": "CPU",
|
||||
"Current stream": "Current stream",
|
||||
"Current viewers": "Current viewers",
|
||||
"Delete emoji": "Delete emoji",
|
||||
"developer APIs": "developer APIs.",
|
||||
"discussions": "discussions",
|
||||
"Disk": "Disk",
|
||||
"documentation": "documentation",
|
||||
"Documentation": "Documentation",
|
||||
"Embed your video onto other sites": "Embed your video onto other sites",
|
||||
"Emoji guide": "Emoji guide",
|
||||
"Emojis": "Emojis",
|
||||
"Enable Owncast social features": "Enable Owncast social features",
|
||||
"Error": "Error",
|
||||
"FAQ": "FAQ",
|
||||
"Find an audience on the Owncast Directory": "Find an audience on the Owncast Directory",
|
||||
"Fix your problems": "Fix your problems",
|
||||
"Follow": "Follow",
|
||||
"Frontend.componentError": "Error: {{message}}",
|
||||
"Frontend.offlineBasic": "This stream is offline. Check back soon!",
|
||||
"Frontend.offlineFediverseOnly": "This stream is offline. <span class='follow-link'>Follow</span> {{fediverseAccount}} on the Fediverse to see the next time {{streamer}} goes live.",
|
||||
"Frontend.offlineNotifyAndFediverse": "This stream is offline. You can <span class='notify-link'>be notified</span> the next time {{streamer}} goes live or <span class='follow-link'>follow</span> {{fediverseAccount}} on the Fediverse.",
|
||||
"Frontend.offlineNotifyOnly": "This stream is offline. <span class='notify-link'>Be notified</span> the next time {{streamer}} goes live.",
|
||||
"Hardware Info": "Hardware Info",
|
||||
"Healthy Stream": "Healthy Stream",
|
||||
"hello_world": "Hello <strong>{{name}}</strong>, welcome to the world!",
|
||||
"Help configuring my broadcasting software": "Help configuring my broadcasting software",
|
||||
"Here you can upload new custom emojis for usage in the chat. When uploading a new emoji, the filename without extension will be used as emoji name. Additionally, emoji names are case-insensitive. For best results, ensure all emoji have unique names.": "Here you can upload new custom emojis for usage in the chat. When uploading a new emoji, the filename without extension will be used as emoji name. Additionally, emoji names are case-insensitive. For best results, ensure all emoji have unique names.",
|
||||
"Hidden messages": "Hidden messages",
|
||||
"Hide": "Hide",
|
||||
"How can we help you?": "How can we help you?",
|
||||
"I found a bug": "I found a bug",
|
||||
"I have a general question": "I have a general question",
|
||||
"I want to build add-ons for Owncast": "I want to build add-ons for Owncast",
|
||||
"I want to configure my owncast instance": "I want to configure my owncast instance",
|
||||
"I want to customize my website": "I want to customize my website",
|
||||
"I want to embed my stream into another site": "I want to embed my stream into another site",
|
||||
"I want to tweak my video output": "I want to tweak my video output",
|
||||
"I want to use an external storage provider": "I want to use an external storage provider",
|
||||
"If you found a bug, then please": "If you found a bug, then please",
|
||||
"Inbound Audio Stream": "Inbound Audio Stream",
|
||||
"Inbound Stream Details": "Inbound Stream Details",
|
||||
"Inbound Video Stream": "Inbound Video Stream",
|
||||
"Info": "Info",
|
||||
"Input": "Input",
|
||||
"IP Bans": "IP Bans",
|
||||
"Last 12 hours": "Last 12 hours",
|
||||
"Last 24 hours": "Last 24 hours",
|
||||
"Last 3 months": "Last 3 months",
|
||||
"Last 30 days": "Last 30 days",
|
||||
"Last 6 months": "Last 6 months",
|
||||
"Last 7 days": "Last 7 days",
|
||||
"Last live ago": "Last live {{timeAgo}} ago",
|
||||
"Learn how to point your existing software to your new server and start streaming your content": "Learn how to point your existing software to your new server and start streaming your content.",
|
||||
"Learn how you can add your Owncast stream to other sites you control": "Learn how you can add your Owncast stream to other sites you control.",
|
||||
"Learn more": "Learn more",
|
||||
"Learn more about chat moderation here": "Learn more about chat moderation here.",
|
||||
"let us know": "let us know",
|
||||
"Level": "Level",
|
||||
"Link": "Link",
|
||||
"List yourself in the Owncast Directory and show off your stream": {
|
||||
" Enable it in": "List yourself in the Owncast Directory and show off your stream. Enable it in"
|
||||
},
|
||||
"settings": "settings.",
|
||||
"Add your Owncast instance to the Fediverse": "Add your Owncast instance to the Fediverse",
|
||||
"Enable Owncast social features": "Enable Owncast social features",
|
||||
"to have your instance join the Fediverse, allowing people to follow, share and engage with your live stream": "to have your instance join the Fediverse, allowing people to follow, share and engage with your live stream.",
|
||||
"No stream is active": "No stream is active",
|
||||
"You should start one": "You should start one.",
|
||||
"Healthy Stream": "Healthy Stream",
|
||||
"Yes": "Yes",
|
||||
"Logs": "Logs",
|
||||
"Manage the messages from viewers that show up on your stream": "Manage the messages from viewers that show up on your stream.",
|
||||
"max viewers": "max viewers",
|
||||
"Max viewers last stream": "Max viewers last stream",
|
||||
"Max viewers this stream": "Max viewers this stream",
|
||||
"Memory": "Memory",
|
||||
"Message": "Message",
|
||||
"Moderators": "Moderators",
|
||||
"Most general questions are answered in our": "Most general questions are answered in our",
|
||||
"News & Updates from Owncast": "News & Updates from Owncast",
|
||||
"No": "No",
|
||||
"Playback Health": "Playback Health",
|
||||
"Stream health represents": "Stream health represents",
|
||||
"No hardware details have been collected yet": "No hardware details have been collected yet.",
|
||||
"No news": "No news.",
|
||||
"No stream is active": "No stream is active",
|
||||
"No viewer data has been collected yet": "No viewer data has been collected yet.",
|
||||
"notification_message": "You can <a href=\"#\">click here</a> to receive notifications when {{streamer}} goes live.",
|
||||
"Notify": "Notify",
|
||||
"of all known players": {
|
||||
" Other player status is unknown": "of all known players. Other player status is unknown."
|
||||
},
|
||||
"TROUBLESHOOT": "TROUBLESHOOT",
|
||||
"offline": "offline",
|
||||
"offline_basic": "This stream is offline. Check back soon!",
|
||||
"offline_fediverse_only": "This stream is offline. <span class='follow-link'>Follow</span> {{fediverseAccount}} on the Fediverse to see the next time {{streamer}} goes live.",
|
||||
"offline_notify_and_fediverse": "This stream is offline. You can <span class='notify-link'>be notified</span> the next time {{streamer}} goes live or <span class='follow-link'>follow</span> {{fediverseAccount}} on the Fediverse.",
|
||||
"offline_notify_only": "This stream is offline. <span class='notify-link'>Be notified</span> the next time {{streamer}} goes live.",
|
||||
"on the Fediverse to see the next time goes live": "on the Fediverse to see the next time goes live",
|
||||
"or exist in our": "or exist in our",
|
||||
"Other": "Other",
|
||||
"Outbound Audio Stream": "Outbound Audio Stream",
|
||||
"Outbound Stream Details": "Outbound Stream Details",
|
||||
"Outbound Video Stream": "Outbound Video Stream",
|
||||
"Overridden via command line": "Overridden via command line.",
|
||||
"Peak viewer count": "Peak viewer count",
|
||||
"Playback Health": "Playback Health",
|
||||
"Please wait": "Please wait",
|
||||
"Powered by Owncast": "Powered by Owncast",
|
||||
"Documentation": "Documentation",
|
||||
"Contribute": "Contribute",
|
||||
"Source": "Source",
|
||||
"Skip to player": "Skip to player",
|
||||
"Read the Docs": "Read the Docs",
|
||||
"settings": "settings.",
|
||||
"Show": "Show",
|
||||
"Skip to footer": "Skip to footer",
|
||||
"Skip to offline message": "Skip to offline message",
|
||||
"Skip to page content": "Skip to page content",
|
||||
"Skip to footer": "Skip to footer",
|
||||
"Chat will be available when the stream is live": "Chat will be available when the stream is live.",
|
||||
"Chat is offline": "Chat is offline",
|
||||
"Skip to player": "Skip to player",
|
||||
"Source": "Source",
|
||||
"Stay updated!": "Stay updated!",
|
||||
"Click and never miss future streams!": "Click and never miss future streams!",
|
||||
"This stream is offline": "This stream is offline.",
|
||||
"the next time goes live": "the next time goes live",
|
||||
"Follow": "Follow",
|
||||
"on the Fediverse to see the next time goes live": "on the Fediverse to see the next time goes live",
|
||||
"Last live ago": "Last live {{timeAgo}} ago",
|
||||
"Want to upload custom emojis in bulk? Check out our": "Want to upload custom emojis in bulk? Check out our",
|
||||
"Emoji guide": "Emoji guide",
|
||||
"Time": "Time",
|
||||
"User": "User",
|
||||
"Visible messages": "Visible messages",
|
||||
"Hidden messages": "Hidden messages",
|
||||
"Chat Messages": "Chat Messages",
|
||||
"Manage the messages from viewers that show up on your stream": "Manage the messages from viewers that show up on your stream.",
|
||||
"Show": "Show",
|
||||
"Hide": "Hide",
|
||||
"Visit the": "Visit the",
|
||||
"documentation": "documentation",
|
||||
"to configure additional details about your viewers": "to configure additional details about your viewers.",
|
||||
"When a stream is active and chat is enabled, connected chat clients will be displayed here": "When a stream is active and chat is enabled, connected chat clients will be displayed here.",
|
||||
"Connected": "Connected",
|
||||
"offline": "offline",
|
||||
"Banned Users": "Banned Users",
|
||||
"IP Bans": "IP Bans",
|
||||
"Moderators": "Moderators",
|
||||
"Bring in moderators to help keep your chat in order": "Bring in moderators to help keep your chat in order.",
|
||||
"Learn more about chat moderation here": "Learn more about chat moderation here.",
|
||||
"Hardware Info": "Hardware Info",
|
||||
"Please wait": "Please wait",
|
||||
"No hardware details have been collected yet": "No hardware details have been collected yet.",
|
||||
"CPU": "CPU",
|
||||
"Memory": "Memory",
|
||||
"Disk": "Disk",
|
||||
"used": "used",
|
||||
"I want to configure my owncast instance": "I want to configure my owncast instance",
|
||||
"Learn more": "Learn more",
|
||||
"Help configuring my broadcasting software": "Help configuring my broadcasting software",
|
||||
"I want to embed my stream into another site": "I want to embed my stream into another site",
|
||||
"I want to customize my website": "I want to customize my website",
|
||||
"I want to tweak my video output": "I want to tweak my video output",
|
||||
"I want to use an external storage provider": "I want to use an external storage provider",
|
||||
"I found a bug": "I found a bug",
|
||||
"If you found a bug, then please": "If you found a bug, then please",
|
||||
"let us know": "let us know",
|
||||
"I have a general question": "I have a general question",
|
||||
"Most general questions are answered in our": "Most general questions are answered in our",
|
||||
"FAQ": "FAQ",
|
||||
"or exist in our": "or exist in our",
|
||||
"discussions": "discussions",
|
||||
"I want to build add-ons for Owncast": "I want to build add-ons for Owncast",
|
||||
"You can build your own bots, overlays, tools and add-ons with our": "You can build your own bots, overlays, tools and add-ons with our",
|
||||
"developer APIs": "developer APIs.",
|
||||
"How can we help you?": "How can we help you?",
|
||||
"Troubleshooting": "Troubleshooting",
|
||||
"Fix your problems": "Fix your problems",
|
||||
"Read the Docs": "Read the Docs",
|
||||
"Common tasks": "Common tasks",
|
||||
"Other": "Other",
|
||||
"Outbound Video Stream": "Outbound Video Stream",
|
||||
"Outbound Audio Stream": "Outbound Audio Stream",
|
||||
"Stream health represents": "Stream health represents",
|
||||
"Stream started": "Stream started",
|
||||
"Viewers": "Viewers",
|
||||
"Peak viewer count": "Peak viewer count",
|
||||
"Outbound Stream Details": "Outbound Stream Details",
|
||||
"Inbound Stream Details": "Inbound Stream Details",
|
||||
"Input": "Input",
|
||||
"Inbound Video Stream": "Inbound Video Stream",
|
||||
"Inbound Audio Stream": "Inbound Audio Stream",
|
||||
"Current stream": "Current stream",
|
||||
"Last 12 hours": "Last 12 hours",
|
||||
"Last 24 hours": "Last 24 hours",
|
||||
"Last 7 days": "Last 7 days",
|
||||
"Last 30 days": "Last 30 days",
|
||||
"Last 3 months": "Last 3 months",
|
||||
"Last 6 months": "Last 6 months",
|
||||
"Testing.simpleKey": "This default text should be ignored",
|
||||
"the next time goes live": "the next time goes live",
|
||||
"This stream is offline": "This stream is offline.",
|
||||
"Time": "Time",
|
||||
"Timestamp": "Timestamp",
|
||||
"to configure additional details about your viewers": "to configure additional details about your viewers.",
|
||||
"to have your instance join the Fediverse, allowing people to follow, share and engage with your live stream": "to have your instance join the Fediverse, allowing people to follow, share and engage with your live stream.",
|
||||
"TROUBLESHOOT": "TROUBLESHOOT",
|
||||
"Troubleshooting": "Troubleshooting",
|
||||
"Upload new emoji": "Upload new emoji",
|
||||
"Use your broadcasting software": "Use your broadcasting software",
|
||||
"used": "used",
|
||||
"User": "User",
|
||||
"View": "View",
|
||||
"Viewer Info": "Viewer Info",
|
||||
"Current viewers": "Current viewers",
|
||||
"Max viewers this stream": "Max viewers this stream",
|
||||
"Max viewers last stream": "Max viewers last stream",
|
||||
"max viewers": "max viewers",
|
||||
"No viewer data has been collected yet": "No viewer data has been collected yet."
|
||||
}
|
||||
"Viewers": "Viewers",
|
||||
"Visible messages": "Visible messages",
|
||||
"Visit the": "Visit the",
|
||||
"Want to upload custom emojis in bulk? Check out our": "Want to upload custom emojis in bulk? Check out our",
|
||||
"Want to upload custom emojis in bulk? Check out our <a href=\"https://owncast.online/docs/chat/emoji\" rel=\"noopener noreferrer\" target=\"_blank\">Emoji guide</a>.": "Want to upload custom emojis in bulk? Check out our <a href=\"https://owncast.online/docs/chat/emoji\" rel=\"noopener noreferrer\" target=\"_blank\">Emoji guide</a>.",
|
||||
"Warning": "Warning",
|
||||
"When a stream is active and chat is enabled, connected chat clients will be displayed here": "When a stream is active and chat is enabled, connected chat clients will be displayed here.",
|
||||
"Yes": "Yes",
|
||||
"You can build your own bots, overlays, tools and add-ons with our": "You can build your own bots, overlays, tools and add-ons with our",
|
||||
"You should start one": "You should start one."
|
||||
}
|
||||
Reference in New Issue
Block a user