diff options
Diffstat (limited to 'WebKit/win/WebCoreLocalizedStrings.cpp')
| -rw-r--r-- | WebKit/win/WebCoreLocalizedStrings.cpp | 121 |
1 files changed, 119 insertions, 2 deletions
diff --git a/WebKit/win/WebCoreLocalizedStrings.cpp b/WebKit/win/WebCoreLocalizedStrings.cpp index 389b1c0..03d03e7 100644 --- a/WebKit/win/WebCoreLocalizedStrings.cpp +++ b/WebKit/win/WebCoreLocalizedStrings.cpp @@ -94,8 +94,6 @@ String WebCore::AXLinkActionVerb() { return String(LPCTSTR_UI_STRING("jump", "Ve String WebCore::unknownFileSizeText() { return String(LPCTSTR_UI_STRING("Unknown", "Unknown filesize FTP directory listing item")); } String WebCore::uploadFileText() { return String(LPCTSTR_UI_STRING("Upload file", "(Windows) Form submit file upload dialog title")); } String WebCore::allFilesText() { return String(LPCTSTR_UI_STRING("All Files", "(Windows) Form submit file upload all files pop-up")); } -String WebCore::mediaElementLoadingStateText() { return String(LPCTSTR_UI_STRING("Loading...", "Media controller status message when the media is loading")); } -String WebCore::mediaElementLiveBroadcastStateText() { return String(LPCTSTR_UI_STRING("Live Broadcast", "Media controller status message when watching a live broadcast")); } String WebCore::imageTitle(const String& filename, const IntSize& size) { @@ -114,3 +112,122 @@ String multipleFileUploadText(unsigned numberOfFiles) return result.get(); } + +#if ENABLE(VIDEO) +String WebCore::mediaElementLoadingStateText() { return String(LPCTSTR_UI_STRING("Loading...", "Media controller status message when the media is loading")); } +String WebCore::mediaElementLiveBroadcastStateText() { return String(LPCTSTR_UI_STRING("Live Broadcast", "Media controller status message when watching a live broadcast")); } + +String WebCore::localizedMediaControlElementString(const String& name) +{ + if (name == "AudioElement") + return String(LPCTSTR_UI_STRING("audio element controller", "accessibility role description for audio element controller")); + if (name == "VideoElement") + return String(LPCTSTR_UI_STRING("video element controller", "accessibility role description for video element controller")); + if (name == "MuteButton") + return String(LPCTSTR_UI_STRING("mute", "accessibility role description for mute button")); + if (name == "UnMuteButton") + return String(LPCTSTR_UI_STRING("unmute", "accessibility role description for turn mute off button")); + if (name == "PlayButton") + return String(LPCTSTR_UI_STRING("play", "accessibility role description for play button")); + if (name == "PauseButton") + return String(LPCTSTR_UI_STRING("pause", "accessibility role description for pause button")); + if (name == "Slider") + return String(LPCTSTR_UI_STRING("movie time", "accessibility role description for timeline slider")); + if (name == "SliderThumb") + return String(LPCTSTR_UI_STRING("timeline slider thumb", "accessibility role description for timeline thumb")); + if (name == "RewindButton") + return String(LPCTSTR_UI_STRING("back 30 seconds", "accessibility role description for seek back 30 seconds button")); + if (name == "ReturnToRealtimeButton") + return String(LPCTSTR_UI_STRING("return to realtime", "accessibility role description for return to real time button")); + if (name == "CurrentTimeDisplay") + return String(LPCTSTR_UI_STRING("elapsed time", "accessibility role description for elapsed time display")); + if (name == "TimeRemainingDisplay") + return String(LPCTSTR_UI_STRING("remaining time", "accessibility role description for time remaining display")); + if (name == "StatusDisplay") + return String(LPCTSTR_UI_STRING("status", "accessibility role description for movie status")); + if (name == "FullscreenButton") + return String(LPCTSTR_UI_STRING("fullscreen", "accessibility role description for enter fullscreen button")); + if (name == "SeekForwardButton") + return String(LPCTSTR_UI_STRING("fast forward", "accessibility role description for fast forward button")); + if (name == "SeekBackButton") + return String(LPCTSTR_UI_STRING("fast reverse", "accessibility role description for fast reverse button")); + + ASSERT_NOT_REACHED(); + return String(); +} + +String WebCore::localizedMediaControlElementHelpText(const String& name) +{ + if (name == "AudioElement") + return String(LPCTSTR_UI_STRING("audio element playback controls and status display", "accessibility role description for audio element controller")); + if (name == "VideoElement") + return String(LPCTSTR_UI_STRING("video element playback controls and status display", "accessibility role description for video element controller")); + if (name == "MuteButton") + return String(LPCTSTR_UI_STRING("mute audio tracks", "accessibility help text for mute button")); + if (name == "UnMuteButton") + return String(LPCTSTR_UI_STRING("unmute audio tracks", "accessibility help text for un mute button")); + if (name == "PlayButton") + return String(LPCTSTR_UI_STRING("begin playback", "accessibility help text for play button")); + if (name == "PauseButton") + return String(LPCTSTR_UI_STRING("pause playback", "accessibility help text for pause button")); + if (name == "Slider") + return String(LPCTSTR_UI_STRING("movie time scrubber", "accessibility help text for timeline slider")); + if (name == "SliderThumb") + return String(LPCTSTR_UI_STRING("movie time scrubber thumb", "accessibility help text for timeline slider thumb")); + if (name == "RewindButton") + return String(LPCTSTR_UI_STRING("seek movie back 30 seconds", "accessibility help text for jump back 30 seconds button")); + if (name == "ReturnToRealtimeButton") + return String(LPCTSTR_UI_STRING("return streaming movie to real time", "accessibility help text for return streaming movie to real time button")); + if (name == "CurrentTimeDisplay") + return String(LPCTSTR_UI_STRING("current movie time in seconds", "accessibility help text for elapsed time display")); + if (name == "TimeRemainingDisplay") + return String(LPCTSTR_UI_STRING("number of seconds of movie remaining", "accessibility help text for remaining time display")); + if (name == "StatusDisplay") + return String(LPCTSTR_UI_STRING("current movie status", "accessibility help text for movie status display")); + if (name == "SeekBackButton") + return String(LPCTSTR_UI_STRING("seek quickly back", "accessibility help text for fast rewind button")); + if (name == "SeekForwardButton") + return String(LPCTSTR_UI_STRING("seek quickly forward", "accessibility help text for fast forward button")); + if (name == "FullscreenButton") + return String(LPCTSTR_UI_STRING("Play movie in fullscreen mode", "accessibility help text for enter fullscreen button")); + + ASSERT_NOT_REACHED(); + return String(); +} + +String WebCore::localizedMediaTimeDescription(float time) +{ + if (!isfinite(time)) + return String(LPCTSTR_UI_STRING("indefinite time", "string for an indefinite movie time")); + + int seconds = (int)fabsf(time); + int days = seconds / (60 * 60 * 24); + int hours = seconds / (60 * 60); + int minutes = (seconds / 60) % 60; + seconds %= 60; + + if (days) { + static RetainPtr<CFStringRef> format(AdoptCF, UI_STRING("date.format.for.days", "string for days, hours, minutes & seconds")); + RetainPtr<CFStringRef> result(AdoptCF, CFStringCreateWithFormat(0, 0, format.get(), days, hours, minutes, seconds)); + return result.get(); + } + + if (hours) { + static RetainPtr<CFStringRef> format(AdoptCF, UI_STRING("date.format.for.hours", "string for hours, minutes & seconds")); + RetainPtr<CFStringRef> result(AdoptCF, CFStringCreateWithFormat(0, 0, format.get(), hours, minutes, seconds)); + return result.get(); + } + + if (minutes) { + static RetainPtr<CFStringRef> format(AdoptCF, UI_STRING("date.format.for.minutes", "string for minutes & seconds")); + RetainPtr<CFStringRef> result(AdoptCF, CFStringCreateWithFormat(0, 0, format.get(), minutes, seconds)); + return result.get(); + } + + static RetainPtr<CFStringRef> format(AdoptCF, UI_STRING("date.format.for.seconds", "string for seconds")); + RetainPtr<CFStringRef> result(AdoptCF, CFStringCreateWithFormat(0, 0, format.get(), seconds)); + return result.get(); +} + +#endif // ENABLE(VIDEO) + |
