Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multilingual UI support for the adLabel "N of N" string #592

Merged
merged 3 commits into from
Apr 18, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ the previous snippet. A summary of all settings follows:
| adTagUrl | string | REQUIRED IF adsResponse IS NOT PROVIDED A URL which returns a VAST, VMAP or ad rules,response. |
| adsResponse | string | REQUIRED IF adTagUrl IS NOT PROVIDED The VAST, VMAP, or ad rules response to use,in lieu of fetching one an ad tag. |
| adLabel | string | Replaces the "Advertisement" text in the ad label. Added for multilingual UI support. |
| adLabelNofN | string | Replaces the "of" text in the ad label (e.g. ... (1 of 2) ...). Added for multilingual UI support. |
| adsRenderingSettings | object | JSON object with ads rendering settings as defined in the IMA SDK,Docs(1). |
| autoPlayAdBreaks | boolean | Whether or not to automatically play VMAP or ad rules ad breaks. Defaults,to true. |
| **deprecated** adWillPlayMuted | boolean | Notifies the SDK whether the player intends to start ad while muted. Changing this setting will have no impact on ad playback. Defaults,to false. |
Expand Down
2 changes: 1 addition & 1 deletion src/ad-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ AdUi.prototype.updateAdUi =
}
let podCount = ': ';
if (totalAds > 1) {
podCount = ' (' + adPosition + ' of ' + totalAds + '): ';
podCount = ' (' + adPosition + ' ' + this.controller.getSettings().adLabelNofN + ' ' + totalAds + '): ';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line too long - max length is 80 characters.

}
this.countdownDiv.innerHTML =
this.controller.getSettings().adLabel + podCount +
Expand Down
1 change: 1 addition & 0 deletions src/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ Controller.IMA_DEFAULTS = {
timeout: 5000,
prerollTimeout: 1000,
adLabel: 'Advertisement',
adLabelNofN: 'of',
showControlsForJSAds: true,
};

Expand Down