Add missing popup i18n messages

This commit is contained in:
hensm
2019-05-01 19:32:34 +01:00
committed by Matt Hensman
parent 85c4d11ebf
commit fc1dd28254
4 changed files with 14 additions and 4 deletions

View File

@@ -28,6 +28,8 @@ struct InitData: Codable {
let i18n_mediaTypeApp: String
let i18n_mediaTypeTab: String
let i18n_mediaTypeScreen: String
let i18n_mediaSelectCastLabel: String
let i18n_mediaSelectToLabel: String
}
struct ReceiverSelection: Codable {
@@ -101,9 +103,9 @@ class ViewController: NSViewController {
self.mediaTypePopUpButton.selectItem(at: initData.defaultMediaType.rawValue)
let mediaTypeStackView = NSStackView(views: [
makeLabel("Cast"),
makeLabel(initData.i18n_mediaSelectCastLabel),
self.mediaTypePopUpButton,
makeLabel("to:")
makeLabel(initData.i18n_mediaSelectToLabel)
])

View File

@@ -15,6 +15,12 @@
, "popupMediaTypeScreen": {
"message": "Screen"
}
, "popupMediaSelectCastLabel": {
"message": "Cast"
}
, "popupMediaSelectToLabel": {
"message": "to:"
}
, "popupCastButtonLabel": {
"message": "Cast"
}

View File

@@ -61,6 +61,8 @@ class NativeMacReceiverSelectorManager
, i18n_mediaTypeApp: _("popupMediaTypeApp")
, i18n_mediaTypeTab: _("popupMediaTypeTab")
, i18n_mediaTypeScreen: _("popupMediaTypeScreen")
, i18n_mediaSelectCastLabel: _("popupMediaSelectCastLabel")
, i18n_mediaSelectToLabel: _("popupMediaSelectToLabel")
})
});
}

View File

@@ -97,7 +97,7 @@ class PopupApp extends Component<{}, PopupAppState> {
return (
<div>
<div className="media-select">
Cast
{ _("popupMediaSelectCastLabel") }
<select value={ this.state.mediaType }
onChange={ this.onSelectChange }
className="media-select-dropdown">
@@ -115,7 +115,7 @@ class PopupApp extends Component<{}, PopupAppState> {
{ _("popupMediaTypeScreen") }
</option>
</select>
to:
{ _("popupMediaSelectToLabel") }
</div>
<ul className="receivers">
{ this.state.receivers.map((receiver, i) => {