Skip to content

Commit

Permalink
feat: notify the user that caption language is used when caption labe…
Browse files Browse the repository at this point in the history
…l is set to empty
  • Loading branch information
amirch1 committed Aug 27, 2017
1 parent b8e823e commit ca18dcc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ export class EntryCaptionsEdit implements OnInit, AfterViewInit, OnDestroy{
public _saveAndClose(): void{
if (this.captionsEditForm.get("label").dirty) {
this.currentCaption.label = this.captionsEditForm.get("label").value;
if (this.captionsEditForm.get("label").value === ""){
this._browserService.alert(
{
header: this._appLocalization.get('app.common.attention'),
message: this._appLocalization.get('applications.content.entryDetails.captions.noLabel')
}
);
}
}
if (this.captionsEditForm.get("language").dirty) {
let langCode = this.captionsEditForm.get("language").value.toString().toLowerCase();
Expand Down
6 changes: 4 additions & 2 deletions src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"retry": "Retry",
"confirm": "Confirm",
"close": "Close",
"note": "Note:"
"note": "Note:",
"attention": "Attention"
},
"login": {
"login": {
Expand Down Expand Up @@ -511,7 +512,8 @@
"cancelEdit": "Cancel Edit",
"discard": "Discard all changes?",
"uploadError": "Upload Error",
"remove": "Remove"
"remove": "Remove",
"noLabel": "Since no label was provided, the caption language will be used in the player captions menu"
},
"live": {
"live": "Live Stream",
Expand Down

0 comments on commit ca18dcc

Please sign in to comment.