Commit cde45198 authored by yoshiki's avatar yoshiki Committed by Commit bot

Rename the VideoPlayer-related string IDs

- FILE_BROWSER_GALLERY_VIDEO_ERROR -> VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED
- FILE_BROWSER_GALLERY_VIDEO_DECODING_ERROR -> VIDEO_PLAYER_PLAYBACK_ERROR
- FILE_BROWSER_GALLERY_VIDEO_LOOPED_MODE -> IDS_VIDEO_PLAYER_LOOPED_MODE

BUG=none
TEST=none

Review URL: https://codereview.chromium.org/611243003

Cr-Commit-Position: refs/heads/master@{#300048}
parent 56f997e3
...@@ -361,15 +361,6 @@ Press any key to continue exploring. ...@@ -361,15 +361,6 @@ Press any key to continue exploring.
<message name="IDS_FILE_BROWSER_GALLERY_IMAGE_TOO_BIG_ERROR" desc="In the Gallery, message informing that the image is too big to be displayed."> <message name="IDS_FILE_BROWSER_GALLERY_IMAGE_TOO_BIG_ERROR" desc="In the Gallery, message informing that the image is too big to be displayed.">
This file is too large to be opened. This file is too large to be opened.
</message> </message>
<message name="IDS_FILE_BROWSER_GALLERY_VIDEO_ERROR" desc="In the Gallery, message informing that the video could not be played.">
This file could not be played.
</message>
<message name="IDS_FILE_BROWSER_GALLERY_VIDEO_DECODING_ERROR" desc="In the Gallery, message informing that an error occured while playing the movie.">
An error occurred. Click to restart from the beginning.
</message>
<message name="IDS_FILE_BROWSER_GALLERY_VIDEO_LOOPED_MODE" desc="In the Gallery, message informing that the movie will be played in a loop.">
This video will keep playing until the cows come home.
</message>
<message name="IDS_FILE_BROWSER_AUDIO_ERROR" desc="In the Audio Player, message informing that the file could not be played."> <message name="IDS_FILE_BROWSER_AUDIO_ERROR" desc="In the Audio Player, message informing that the file could not be played.">
This file could not be played. This file could not be played.
</message> </message>
...@@ -945,18 +936,27 @@ Press any key to continue exploring. ...@@ -945,18 +936,27 @@ Press any key to continue exploring.
</message> </message>
<!-- Video Player --> <!-- Video Player -->
<message name="IDS_VIDEO_PLAYER_PLAY_THIS_COMPUTER" desc="Message of menu item which is shown at the top of the list of Chromecasts. This menuitem is to play the video on this computer (locally), intead of on TVs with Chromecast."> <message name="IDS_VIDEO_PLAYER_PLAY_THIS_COMPUTER" desc="In the video player app, message of menu item which is shown at the top of the list of Chromecasts. This menuitem is to play the video on this computer (locally), intead of on TVs with Chromecast.">
This computer This computer
</message> </message>
<message name="IDS_VIDEO_PLAYER_PLAYING_ON" desc="Message is shown ahead of the name of the current chromecast which plays the video now. For example, if this message is 'Playing on' and the Chromecast name is 'Foocast', 'Playing on Foocast' is shown."> <message name="IDS_VIDEO_PLAYER_PLAYING_ON" desc="In the video player app, message is shown ahead of the name of the current chromecast which plays the video now. For example, if this message is 'Playing on' and the Chromecast name is 'Foocast', 'Playing on Foocast' is shown.">
Playing on Playing on
</message> </message>
<message name="IDS_VIDEO_PLAYER_PLAY_ON" desc="Message is shown above the list of cast devices. The user will select one of them to play the current video on selected device."> <message name="IDS_VIDEO_PLAYER_PLAY_ON" desc="In the video player app, message is shown above the list of cast devices. The user will select one of them to play the current video on selected device.">
Play on Play on
</message> </message>
<message name="IDS_VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED" desc="In the video player app, message informing that the video could not be played.">
This file could not be played.
</message>
<message name="IDS_VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED_FOR_CAST" desc="Error message which is shown when the video which an user tried to play is not supported by the current cast device."> <message name="IDS_VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED_FOR_CAST" desc="Error message which is shown when the video which an user tried to play is not supported by the current cast device.">
Sorry, this video is not supported by your cast device. Sorry, this video is not supported by your cast device.
</message> </message>
<message name="IDS_VIDEO_PLAYER_PLAYBACK_ERROR" desc="In the video player app, message informing that an error occured while playing the movie.">
An error occurred. Click to restart from the beginning.
</message>
<message name="IDS_VIDEO_PLAYER_LOOPED_MODE" desc="In the video player app, message informing that the movie will be played in a loop.">
This video will keep playing until the cows come home.
</message>
<!-- Imageburn Strings --> <!-- Imageburn Strings -->
<message name="IDS_CHECKING_FOR_UPDATES" desc="Notification for checking for update"> <message name="IDS_CHECKING_FOR_UPDATES" desc="Notification for checking for update">
......
...@@ -194,11 +194,6 @@ bool FileManagerPrivateGetStringsFunction::RunSync() { ...@@ -194,11 +194,6 @@ bool FileManagerPrivateGetStringsFunction::RunSync() {
SET_STRING("GALLERY_IMAGE_ERROR", IDS_FILE_BROWSER_GALLERY_IMAGE_ERROR); SET_STRING("GALLERY_IMAGE_ERROR", IDS_FILE_BROWSER_GALLERY_IMAGE_ERROR);
SET_STRING("GALLERY_IMAGE_TOO_BIG_ERROR", SET_STRING("GALLERY_IMAGE_TOO_BIG_ERROR",
IDS_FILE_BROWSER_GALLERY_IMAGE_TOO_BIG_ERROR); IDS_FILE_BROWSER_GALLERY_IMAGE_TOO_BIG_ERROR);
SET_STRING("GALLERY_VIDEO_ERROR", IDS_FILE_BROWSER_GALLERY_VIDEO_ERROR);
SET_STRING("GALLERY_VIDEO_DECODING_ERROR",
IDS_FILE_BROWSER_GALLERY_VIDEO_DECODING_ERROR);
SET_STRING("GALLERY_VIDEO_LOOPED_MODE",
IDS_FILE_BROWSER_GALLERY_VIDEO_LOOPED_MODE);
SET_STRING("AUDIO_ERROR", IDS_FILE_BROWSER_AUDIO_ERROR); SET_STRING("AUDIO_ERROR", IDS_FILE_BROWSER_AUDIO_ERROR);
SET_STRING("GALLERY_IMAGE_OFFLINE", IDS_FILE_BROWSER_GALLERY_IMAGE_OFFLINE); SET_STRING("GALLERY_IMAGE_OFFLINE", IDS_FILE_BROWSER_GALLERY_IMAGE_OFFLINE);
SET_STRING("GALLERY_VIDEO_OFFLINE", IDS_FILE_BROWSER_GALLERY_VIDEO_OFFLINE); SET_STRING("GALLERY_VIDEO_OFFLINE", IDS_FILE_BROWSER_GALLERY_VIDEO_OFFLINE);
...@@ -521,8 +516,12 @@ bool FileManagerPrivateGetStringsFunction::RunSync() { ...@@ -521,8 +516,12 @@ bool FileManagerPrivateGetStringsFunction::RunSync() {
IDS_VIDEO_PLAYER_PLAY_THIS_COMPUTER); IDS_VIDEO_PLAYER_PLAY_THIS_COMPUTER);
SET_STRING("VIDEO_PLAYER_PLAYING_ON", IDS_VIDEO_PLAYER_PLAYING_ON); SET_STRING("VIDEO_PLAYER_PLAYING_ON", IDS_VIDEO_PLAYER_PLAYING_ON);
SET_STRING("VIDEO_PLAYER_PLAY_ON", IDS_VIDEO_PLAYER_PLAY_ON); SET_STRING("VIDEO_PLAYER_PLAY_ON", IDS_VIDEO_PLAYER_PLAY_ON);
SET_STRING("VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED",
IDS_VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED);
SET_STRING("VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED_FOR_CAST", SET_STRING("VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED_FOR_CAST",
IDS_VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED_FOR_CAST); IDS_VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED_FOR_CAST);
SET_STRING("VIDEO_PLAYER_PLAYBACK_ERROR", IDS_VIDEO_PLAYER_PLAYBACK_ERROR);
SET_STRING("VIDEO_PLAYER_LOOPED_MODE", IDS_VIDEO_PLAYER_LOOPED_MODE);
#undef SET_STRING #undef SET_STRING
dict->SetBoolean("PDF_VIEW_ENABLED", dict->SetBoolean("PDF_VIEW_ENABLED",
......
...@@ -1095,7 +1095,7 @@ VideoControls.prototype.toggleLoopedModeWithFeedback = function(on) { ...@@ -1095,7 +1095,7 @@ VideoControls.prototype.toggleLoopedModeWithFeedback = function(on) {
this.toggleLoopedMode(on); this.toggleLoopedMode(on);
if (on) { if (on) {
// TODO(mtomasz): Simplify, crbug.com/254318. // TODO(mtomasz): Simplify, crbug.com/254318.
this.showTextBanner_('GALLERY_VIDEO_LOOPED_MODE'); this.showTextBanner_('VIDEO_PLAYER_LOOPED_MODE');
} }
}; };
......
...@@ -111,10 +111,10 @@ FullWindowVideoControls.prototype.onPlaybackError_ = function(error) { ...@@ -111,10 +111,10 @@ FullWindowVideoControls.prototype.onPlaybackError_ = function(error) {
if (this.casting) if (this.casting)
this.showErrorMessage('VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED_FOR_CAST'); this.showErrorMessage('VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED_FOR_CAST');
else else
this.showErrorMessage('GALLERY_VIDEO_ERROR'); this.showErrorMessage('VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED');
this.decodeErrorOccured = false; this.decodeErrorOccured = false;
} else { } else {
this.showErrorMessage('GALLERY_VIDEO_DECODING_ERROR'); this.showErrorMessage('VIDEO_PLAYER_PLAYBACK_ERROR');
this.decodeErrorOccured = true; this.decodeErrorOccured = true;
} }
...@@ -395,7 +395,8 @@ VideoPlayer.prototype.loadVideo_ = function(video, opt_callback) { ...@@ -395,7 +395,8 @@ VideoPlayer.prototype.loadVideo_ = function(video, opt_callback) {
videoPlayerElement.removeAttribute('loading'); videoPlayerElement.removeAttribute('loading');
console.error('Failed to initialize the video element.', console.error('Failed to initialize the video element.',
error.stack || error); error.stack || error);
this.controls_.showErrorMessage('GALLERY_VIDEO_ERROR'); this.controls_.showErrorMessage(
'VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED');
callback(); callback();
}.bind(this)); }.bind(this));
}.wrap(this)); }.wrap(this));
...@@ -613,7 +614,7 @@ VideoPlayer.prototype.onCurrentCastDisappear_ = function() { ...@@ -613,7 +614,7 @@ VideoPlayer.prototype.onCurrentCastDisappear_ = function() {
this.currentSession_.removeUpdateListener(this.onCastSessionUpdateBound_); this.currentSession_.removeUpdateListener(this.onCastSessionUpdateBound_);
this.currentSession_ = null; this.currentSession_ = null;
} }
this.controls.showErrorMessage('GALLERY_VIDEO_DECODING_ERROR'); this.controls.showErrorMessage('VIDEO_PLAYER_PLAYBACK_ERROR');
this.unloadVideo(); this.unloadVideo();
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment