1/* 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 3 * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com 4 * Copyright (C) 2007 Holger Hans Peter Freyther 5 * Copyright (C) 2008 Christian Dywan <christian@imendio.com> 6 * Copyright (C) 2008 Nuanti Ltd. 7 * Copyright (C) 2008 INdT Instituto Nokia de Tecnologia 8 * Copyright (C) 2009-2010 ProFUSION embedded systems 9 * Copyright (C) 2009-2010 Samsung Electronics 10 * 11 * Redistribution and use in source and binary forms, with or without 12 * modification, are permitted provided that the following conditions 13 * are met: 14 * 1. Redistributions of source code must retain the above copyright 15 * notice, this list of conditions and the following disclaimer. 16 * 2. Redistributions in binary form must reproduce the above copyright 17 * notice, this list of conditions and the following disclaimer in the 18 * documentation and/or other materials provided with the distribution. 19 * 20 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY 21 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR 24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 28 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include "config.h" 34#include "LocalizedStrings.h" 35 36#include "NotImplemented.h" 37#include <wtf/text/WTFString.h> 38 39namespace WebCore { 40 41String submitButtonDefaultLabel() 42{ 43 return String::fromUTF8("Submit"); 44} 45 46String inputElementAltText() 47{ 48 return String::fromUTF8("Submit"); 49} 50 51String resetButtonDefaultLabel() 52{ 53 return String::fromUTF8("Reset"); 54} 55 56String defaultDetailsSummaryText() 57{ 58 return String::fromUTF8("Details"); 59} 60 61String searchableIndexIntroduction() 62{ 63 return String::fromUTF8("This is a searchable index. Enter search keywords: "); 64} 65 66String fileButtonChooseFileLabel() 67{ 68 return String::fromUTF8("Choose File"); 69} 70 71String fileButtonChooseMultipleFilesLabel() 72{ 73 return String::fromUTF8("Choose Files"); 74} 75 76String fileButtonNoFileSelectedLabel() 77{ 78 return String::fromUTF8("No file selected"); 79} 80 81String fileButtonNoFilesSelectedLabel() 82{ 83 return String::fromUTF8("No files selected"); 84} 85 86String contextMenuItemTagOpenLinkInNewWindow() 87{ 88 return String::fromUTF8("Open Link in New Window"); 89} 90 91String contextMenuItemTagDownloadLinkToDisk() 92{ 93 return String::fromUTF8("Download Linked File"); 94} 95 96String contextMenuItemTagCopyLinkToClipboard() 97{ 98 return String::fromUTF8("Copy Link Location"); 99} 100 101String contextMenuItemTagOpenImageInNewWindow() 102{ 103 return String::fromUTF8("Open Image in New Window"); 104} 105 106String contextMenuItemTagDownloadImageToDisk() 107{ 108 return String::fromUTF8("Save Image As"); 109} 110 111String contextMenuItemTagCopyImageToClipboard() 112{ 113 return String::fromUTF8("Copy Image"); 114} 115 116String contextMenuItemTagCopyImageUrlToClipboard() 117{ 118 return String::fromUTF8("Copy Image Address"); 119} 120 121String contextMenuItemTagOpenVideoInNewWindow() 122{ 123 return String::fromUTF8("Open Video in New Window"); 124} 125 126String contextMenuItemTagOpenAudioInNewWindow() 127{ 128 return String::fromUTF8("Open Audio in New Window"); 129} 130 131String contextMenuItemTagDownloadVideoToDisk() 132{ 133 return String::fromUTF8("Download Video"); 134} 135 136String contextMenuItemTagDownloadAudioToDisk() 137{ 138 return String::fromUTF8("Download Audio"); 139} 140 141String contextMenuItemTagCopyVideoLinkToClipboard() 142{ 143 return String::fromUTF8("Copy Video Link Location"); 144} 145 146String contextMenuItemTagCopyAudioLinkToClipboard() 147{ 148 return String::fromUTF8("Copy Audio Link Location"); 149} 150 151String contextMenuItemTagToggleMediaControls() 152{ 153 return String::fromUTF8("Toggle Media Controls"); 154} 155 156String contextMenuItemTagShowMediaControls() 157{ 158 return String::fromUTF8("Show Media Controls"); 159} 160 161String contextMenuitemTagHideMediaControls() 162{ 163 return String::fromUTF8("Hide Media Controls"); 164} 165 166String contextMenuItemTagToggleMediaLoop() 167{ 168 return String::fromUTF8("Toggle Media Loop Playback"); 169} 170 171String contextMenuItemTagEnterVideoFullscreen() 172{ 173 return String::fromUTF8("Switch Video to Fullscreen"); 174} 175 176String contextMenuItemTagMediaPlay() 177{ 178 return String::fromUTF8("Play"); 179} 180 181String contextMenuItemTagMediaPause() 182{ 183 return String::fromUTF8("Pause"); 184} 185 186String contextMenuItemTagMediaMute() 187{ 188 return String::fromUTF8("Mute"); 189} 190 191String contextMenuItemTagOpenFrameInNewWindow() 192{ 193 return String::fromUTF8("Open Frame in New Window"); 194} 195 196String contextMenuItemTagCopy() 197{ 198 return String::fromUTF8("Copy"); 199} 200 201String contextMenuItemTagDelete() 202{ 203 return String::fromUTF8("Delete"); 204} 205 206String contextMenuItemTagSelectAll() 207{ 208 return String::fromUTF8("Select All"); 209} 210 211String contextMenuItemTagUnicode() 212{ 213 return String::fromUTF8("Insert Unicode Control Character"); 214} 215 216String contextMenuItemTagInputMethods() 217{ 218 return String::fromUTF8("Input Methods"); 219} 220 221String contextMenuItemTagGoBack() 222{ 223 return String::fromUTF8("Go Back"); 224} 225 226String contextMenuItemTagGoForward() 227{ 228 return String::fromUTF8("Go Forward"); 229} 230 231String contextMenuItemTagStop() 232{ 233 return String::fromUTF8("Stop"); 234} 235 236String contextMenuItemTagReload() 237{ 238 return String::fromUTF8("Reload"); 239} 240 241String contextMenuItemTagCut() 242{ 243 return String::fromUTF8("Cut"); 244} 245 246String contextMenuItemTagPaste() 247{ 248 return String::fromUTF8("Paste"); 249} 250 251String contextMenuItemTagNoGuessesFound() 252{ 253 return String::fromUTF8("No Guesses Found"); 254} 255 256String contextMenuItemTagIgnoreSpelling() 257{ 258 return String::fromUTF8("Ignore Spelling"); 259} 260 261String contextMenuItemTagLearnSpelling() 262{ 263 return String::fromUTF8("Learn Spelling"); 264} 265 266String contextMenuItemTagSearchWeb() 267{ 268 return String::fromUTF8("Search the Web"); 269} 270 271String contextMenuItemTagLookUpInDictionary(const String&) 272{ 273 return String::fromUTF8("Look Up in Dictionary"); 274} 275 276String contextMenuItemTagOpenLink() 277{ 278 return String::fromUTF8("Open Link"); 279} 280 281String contextMenuItemTagIgnoreGrammar() 282{ 283 return String::fromUTF8("Ignore Grammar"); 284} 285 286String contextMenuItemTagSpellingMenu() 287{ 288 return String::fromUTF8("Spelling and Grammar"); 289} 290 291String contextMenuItemTagShowSpellingPanel(bool show) 292{ 293 return String::fromUTF8(show ? "Show Spelling and Grammar" : "Hide Spelling and Grammar"); 294} 295 296String contextMenuItemTagCheckSpelling() 297{ 298 return String::fromUTF8("Check Document Now"); 299} 300 301String contextMenuItemTagCheckSpellingWhileTyping() 302{ 303 return String::fromUTF8("Check Spelling While Typing"); 304} 305 306String contextMenuItemTagCheckGrammarWithSpelling() 307{ 308 return String::fromUTF8("Check Grammar With Spelling"); 309} 310 311String contextMenuItemTagFontMenu() 312{ 313 return String::fromUTF8("Font"); 314} 315 316String contextMenuItemTagBold() 317{ 318 return String::fromUTF8("Bold"); 319} 320 321String contextMenuItemTagItalic() 322{ 323 return String::fromUTF8("Italic"); 324} 325 326String contextMenuItemTagUnderline() 327{ 328 return String::fromUTF8("Underline"); 329} 330 331String contextMenuItemTagOutline() 332{ 333 return String::fromUTF8("Outline"); 334} 335 336String contextMenuItemTagInspectElement() 337{ 338 return String::fromUTF8("Inspect Element"); 339} 340 341String contextMenuItemTagRightToLeft() 342{ 343 return String::fromUTF8("Right to Left"); 344} 345 346String contextMenuItemTagLeftToRight() 347{ 348 return String::fromUTF8("Left to Right"); 349} 350 351String contextMenuItemTagWritingDirectionMenu() 352{ 353 return String::fromUTF8("Writing Direction"); 354} 355 356String contextMenuItemTagTextDirectionMenu() 357{ 358 return String::fromUTF8("Text Direction"); 359} 360 361String contextMenuItemTagDefaultDirection() 362{ 363 return String::fromUTF8("Default"); 364} 365 366String searchMenuNoRecentSearchesText() 367{ 368 return String::fromUTF8("No recent searches"); 369} 370 371String searchMenuRecentSearchesText() 372{ 373 return String::fromUTF8("Recent searches"); 374} 375 376String searchMenuClearRecentSearchesText() 377{ 378 return String::fromUTF8("Clear recent searches"); 379} 380 381String AXDefinitionText() 382{ 383 return String::fromUTF8("definition"); 384} 385 386String AXDescriptionListText() 387{ 388 return String::fromUTF8("description list"); 389} 390 391String AXDescriptionListTermText() 392{ 393 return String::fromUTF8("term"); 394} 395 396String AXDescriptionListDetailText() 397{ 398 return String::fromUTF8("description"); 399} 400 401String AXFooterRoleDescriptionText() 402{ 403 return String::fromUTF8("footer"); 404} 405 406String AXSearchFieldCancelButtonText() 407{ 408 return String::fromUTF8("cancel"); 409} 410 411String AXButtonActionVerb() 412{ 413 return String::fromUTF8("press"); 414} 415 416String AXRadioButtonActionVerb() 417{ 418 return String::fromUTF8("select"); 419} 420 421String AXTextFieldActionVerb() 422{ 423 return String::fromUTF8("activate"); 424} 425 426String AXCheckedCheckBoxActionVerb() 427{ 428 return String::fromUTF8("uncheck"); 429} 430 431String AXUncheckedCheckBoxActionVerb() 432{ 433 return String::fromUTF8("check"); 434} 435 436String AXLinkActionVerb() 437{ 438 return String::fromUTF8("jump"); 439} 440 441String unknownFileSizeText() 442{ 443 return String::fromUTF8("Unknown"); 444} 445 446String imageTitle(const String&, const IntSize&) 447{ 448 notImplemented(); 449 return String(); 450} 451 452String AXListItemActionVerb() 453{ 454 notImplemented(); 455 return String(); 456} 457 458#if ENABLE(VIDEO) 459String localizedMediaControlElementString(const String& name) 460{ 461 if (name == "AudioElement") 462 return String::fromUTF8("audio playback"); 463 if (name == "VideoElement") 464 return String::fromUTF8("video playback"); 465 if (name == "MuteButton") 466 return String::fromUTF8("mute"); 467 if (name == "UnMuteButton") 468 return String::fromUTF8("unmute"); 469 if (name == "PlayButton") 470 return String::fromUTF8("play"); 471 if (name == "PauseButton") 472 return String::fromUTF8("pause"); 473 if (name == "Slider") 474 return String::fromUTF8("movie time"); 475 if (name == "SliderThumb") 476 return String::fromUTF8("timeline slider thumb"); 477 if (name == "RewindButton") 478 return String::fromUTF8("back 30 seconds"); 479 if (name == "ReturnToRealtimeButton") 480 return String::fromUTF8("return to realtime"); 481 if (name == "CurrentTimeDisplay") 482 return String::fromUTF8("elapsed time"); 483 if (name == "TimeRemainingDisplay") 484 return String::fromUTF8("remaining time"); 485 if (name == "StatusDisplay") 486 return String::fromUTF8("status"); 487 if (name == "EnterFullscreenButton") 488 return String::fromUTF8("enter fullscreen"); 489 if (name == "ExitFullscreenButton") 490 return String::fromUTF8("exit fullscreen"); 491 if (name == "SeekForwardButton") 492 return String::fromUTF8("fast forward"); 493 if (name == "SeekBackButton") 494 return String::fromUTF8("fast reverse"); 495 if (name == "ShowClosedCaptionsButton") 496 return String::fromUTF8("show closed captions"); 497 if (name == "HideClosedCaptionsButton") 498 return String::fromUTF8("hide closed captions"); 499 if (name == "ControlsPanel") 500 return String::fromUTF8("media controls"); 501 502 ASSERT_NOT_REACHED(); 503 return String(); 504} 505 506String localizedMediaControlElementHelpText(const String&) 507{ 508 notImplemented(); 509 return String(); 510} 511 512String localizedMediaTimeDescription(float) 513{ 514 notImplemented(); 515 return String(); 516} 517#endif 518 519String mediaElementLoadingStateText() 520{ 521 return String::fromUTF8("Loading..."); 522} 523 524String mediaElementLiveBroadcastStateText() 525{ 526 return String::fromUTF8("Live Broadcast"); 527} 528 529String validationMessagePatternMismatchText() 530{ 531 return ASCIILiteral("Please match the requested format:"); 532} 533 534String validationMessageRangeOverflowText(const String& maximum) 535{ 536 return ASCIILiteral("Value must be less than or equal to ") + maximum; 537} 538 539String validationMessageRangeUnderflowText(const String& minimum) 540{ 541 return ASCIILiteral("Value must be greater than or equal to ") + minimum; 542} 543 544String validationMessageStepMismatchText(const String&, const String&) 545{ 546 return String::fromUTF8("step mismatch"); 547} 548 549String validationMessageTooLongText(int, int) 550{ 551 return String::fromUTF8("too long"); 552} 553 554String validationMessageTypeMismatchText() 555{ 556 return String::fromUTF8("type mismatch"); 557} 558 559String validationMessageTypeMismatchForEmailText() 560{ 561 return ASCIILiteral("Please enter an email address"); 562} 563 564String validationMessageTypeMismatchForMultipleEmailText() 565{ 566 return ASCIILiteral("Please enter an email address"); 567} 568 569String validationMessageTypeMismatchForURLText() 570{ 571 return ASCIILiteral("Please enter a URL"); 572} 573 574String validationMessageValueMissingText() 575{ 576 return ASCIILiteral("Please fill out this field."); 577} 578 579String validationMessageValueMissingForCheckboxText() 580{ 581 return ASCIILiteral("Please check this box if you want to proceed."); 582} 583 584String validationMessageValueMissingForFileText() 585{ 586 return ASCIILiteral("Please select a file."); 587} 588 589String validationMessageValueMissingForMultipleFileText() 590{ 591 return ASCIILiteral("Please select one or more files."); 592} 593 594String validationMessageValueMissingForRadioText() 595{ 596 return ASCIILiteral("Please select one of these options."); 597} 598 599String validationMessageValueMissingForSelectText() 600{ 601 return ASCIILiteral("Please select an item in the list."); 602} 603 604String validationMessageBadInputForNumberText() 605{ 606 return ASCIILiteral("Please enter a number."); 607} 608 609String missingPluginText() 610{ 611 return String::fromUTF8("missing plugin"); 612} 613 614String AXMenuListPopupActionVerb() 615{ 616 return String(); 617} 618 619String AXMenuListActionVerb() 620{ 621 return String(); 622} 623 624String multipleFileUploadText(unsigned numberOfFiles) 625{ 626 return String::number(numberOfFiles) + String::fromUTF8(" files"); 627} 628 629String crashedPluginText() 630{ 631 return String::fromUTF8("plugin crashed"); 632} 633 634String blockedPluginByContentSecurityPolicyText() 635{ 636 notImplemented(); 637 return String(); 638} 639 640String insecurePluginVersionText() 641{ 642 notImplemented(); 643 return String(); 644} 645 646String inactivePluginText() 647{ 648 notImplemented(); 649 return String(); 650} 651 652String unacceptableTLSCertificate() 653{ 654 return String::fromUTF8("Unacceptable TLS certificate"); 655} 656 657String localizedString(const char* key) 658{ 659 return String::fromUTF8(key, strlen(key)); 660} 661 662#if ENABLE(VIDEO_TRACK) 663String textTrackClosedCaptionsText() 664{ 665 return String::fromUTF8("Closed Captions"); 666} 667 668String textTrackSubtitlesText() 669{ 670 return String::fromUTF8("Subtitles"); 671} 672 673String textTrackOffMenuItemText() 674{ 675 return String::fromUTF8("Off"); 676} 677 678String textTrackAutomaticMenuItemText() 679{ 680 return String::fromUTF8("Auto"); 681} 682 683String textTrackNoLabelText() 684{ 685 return String::fromUTF8("No label"); 686} 687#endif 688 689String snapshottedPlugInLabelTitle() 690{ 691 return String("Snapshotted Plug-In"); 692} 693 694String snapshottedPlugInLabelSubtitle() 695{ 696 return String("Click to restart"); 697} 698 699 700} 701