diff --git a/ext/src/_locales/en/messages.json b/ext/src/_locales/en/messages.json index 105032c..eb40472 100755 --- a/ext/src/_locales/en/messages.json +++ b/ext/src/_locales/en/messages.json @@ -327,6 +327,75 @@ "message": "App ID for a registered Chromecast receiver application. Advanced use only. Must be compatible with the default app (see GitHub repo)." , "description": "Mirroring app ID option description." } + + , "optionsAirPlayCategoryName": { + "message": "AirPlay" + , "description": "Options page AirPlay category name." + } + , "optionsAirPlayCategoryDescription": { + "message": "Management of AirPlay devices and API settings." + , "description": "Options page AirPlay category description." + } + , "optionsAirPlayDeviceManager": { + "message": "Device manager" + , "description": "Label for the options page AirPlay device manager control." + } + , "optionsAirPlayDeviceManagerNoDevices": { + "message": "No devices paired" + , "description": "Message displayed in the AirPlay device manager when there are no paired devices to display." + } + , "optionsAirPlayDeviceManagerNewName": { + "message": "Device name" + , "description": "Label for the AirPlay device manager new device name field." + } + , "optionsAirPlayDeviceManagerNewAddress": { + "message": "Device address" + , "description": "Label for the AirPlay device manager new device name field." + } + , "optionsAirPlayDeviceManagerNewSubmit": { + "message": "Add Device" + , "description": "Label for the AirPlay device manager new device submit button." + } + , "optionsAirPlayDeviceRemove": { + "message": "Remove Device" + , "description": "AirPlay device remove button label." + } + , "optionsAirPlayDevicePair": { + "message": "Pair Device" + , "description": "AirPlay device pair button label. Ellipsis indicates additional action required as it requires the user to enter additional info (pairing PIN)." + } + , "optionsAirPlayDevicePairedStatusPaired": { + "message": "Paired" + , "description": "AirPlay device status for paired devices." + } + , "optionsAirPlayDevicePairedStatusUnpaired": { + "message": "Unpaired" + , "description": "AirPlay device status for unpaired devices." + } + , "optionsAirPlayDeviceCredentials": { + "message": "Credentials" + , "description": "AirPlay device credentials label." + } + , "optionsAirPlayDeviceCredentialsClientId": { + "message": "Client ID" + , "description": "AirPlay device credentials client ID table header." + } + , "optionsAirPlayDeviceCredentialsPrivateKey": { + "message": "Private key" + , "description": "AirPlay device credentials private key table header." + } + , "optionsAirPlayDeviceCredentialsPublicKey": { + "message": "Public key" + , "description": "AirPlay device credentials public key table header." + } + , "optionsAirPlayDeviceCredentialsRegenerate": { + "message": "Regenerate Credentials" + , "description": "AirPlay device credentials regenerate button label." + } + , "optionsAirPlayDeviceCredentialsCopyToClipboard": { + "message": "Copy to Clipboard" + , "description": "AirPlay device credentials copy to clipbard button label." + } , "optionsReset": { "message": "Restore Defaults" diff --git a/ext/src/ui/options/AirPlayDeviceManager.tsx b/ext/src/ui/options/AirPlayDeviceManager.tsx index 2f16f70..d24b2f4 100644 --- a/ext/src/ui/options/AirPlayDeviceManager.tsx +++ b/ext/src/ui/options/AirPlayDeviceManager.tsx @@ -7,7 +7,7 @@ import * as base64 from "../../lib/base64"; import * as devices from "./devices"; -//const _ = browser.i18n.getMessage; +const _ = browser.i18n.getMessage; interface AirPlayDeviceProps { @@ -41,7 +41,7 @@ const AirPlayDevice = (props: AirPlayDeviceProps) => { onClick={ () => { props.onRemove(props.data); }}> - Remove Device + { _("optionsAirPlayDeviceRemove") } { props.data.isPaired || @@ -49,14 +49,16 @@ const AirPlayDevice = (props: AirPlayDeviceProps) => { onClick={ () => { props.onPairCredentials(props.data); }}> - Pair Device + { _("optionsAirPlayDevicePair") } }
{ props.data.name } - { props.data.isPaired ? "Paired" : "Unpaired" } + { props.data.isPaired + ? _("optionsAirPlayDevicePairedStatusPaired") + : _("optionsAirPlayDevicePairedStatusUnpaired") }
@@ -64,19 +66,19 @@ const AirPlayDevice = (props: AirPlayDeviceProps) => {
- Credentials + { _("optionsAirPlayDeviceCredentials") } - + - + - +
Client ID{ _("optionsAirPlayDeviceCredentialsClientId") } { props.data.credentials.clientId }
Private key{ _("optionsAirPlayDeviceCredentialsPrivateKey") } { clientSk }
Public key{ _("optionsAirPlayDeviceCredentialsPublicKey") } { clientPk }
@@ -86,11 +88,11 @@ const AirPlayDevice = (props: AirPlayDeviceProps) => { onClick={ () => { props.onRegenCredentials(props.data); }}> - Regenerate Credentials + { _("optionsAirPlayDeviceCredentialsRegenerate") }
@@ -154,7 +156,7 @@ export default class AirPlayDeviceManager extends Component< onRegenCredentials={this.onDeviceRegenCredentials } onPairCredentials={ this.onDevicePairCredentials } /> )) :
- No devices added + { _("optionsAirPlayDeviceManagerNoDevices") }
} @@ -164,7 +166,7 @@ export default class AirPlayDeviceManager extends Component<