Home | History | Annotate | Download | only in platform
      1 /*
      2  * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
      3  *
      4  * Redistribution and use in source and binary forms, with or without
      5  * modification, are permitted provided that the following conditions
      6  * are met:
      7  * 1. Redistributions of source code must retain the above copyright
      8  *    notice, this list of conditions and the following disclaimer.
      9  * 2. Redistributions in binary form must reproduce the above copyright
     10  *    notice, this list of conditions and the following disclaimer in the
     11  *    documentation and/or other materials provided with the distribution.
     12  *
     13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     14  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     15  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     16  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     17  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     18  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     19  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     20  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     21  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     22  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     23  * THE POSSIBILITY OF SUCH DAMAGE.
     24  */
     25 
     26 #ifndef DefaultLocalizationStrategy_h
     27 #define DefaultLocalizationStrategy_h
     28 
     29 #if USE(PLATFORM_STRATEGIES)
     30 
     31 #include "LocalizationStrategy.h"
     32 #include <wtf/text/WTFString.h>
     33 
     34 namespace WebCore {
     35 
     36 class DefaultLocalizationStrategy : public LocalizationStrategy {
     37 public:
     38     DefaultLocalizationStrategy();
     39 
     40 private:
     41     virtual String inputElementAltText();
     42     virtual String resetButtonDefaultLabel();
     43     virtual String searchableIndexIntroduction();
     44     virtual String submitButtonDefaultLabel();
     45     virtual String fileButtonChooseFileLabel();
     46     virtual String fileButtonNoFileSelectedLabel();
     47     virtual String defaultDetailsSummaryText();
     48 #if PLATFORM(MAC)
     49     virtual String copyImageUnknownFileLabel();
     50 #endif
     51 #if ENABLE(CONTEXT_MENUS)
     52     virtual String contextMenuItemTagOpenLinkInNewWindow();
     53     virtual String contextMenuItemTagDownloadLinkToDisk();
     54     virtual String contextMenuItemTagCopyLinkToClipboard();
     55     virtual String contextMenuItemTagOpenImageInNewWindow();
     56     virtual String contextMenuItemTagDownloadImageToDisk();
     57     virtual String contextMenuItemTagCopyImageToClipboard();
     58 #if PLATFORM(QT)
     59     virtual String contextMenuItemTagCopyImageUrlToClipboard();
     60 #endif
     61     virtual String contextMenuItemTagOpenFrameInNewWindow();
     62     virtual String contextMenuItemTagCopy();
     63     virtual String contextMenuItemTagGoBack();
     64     virtual String contextMenuItemTagGoForward();
     65     virtual String contextMenuItemTagStop();
     66     virtual String contextMenuItemTagReload();
     67     virtual String contextMenuItemTagCut();
     68     virtual String contextMenuItemTagPaste();
     69 #if PLATFORM(GTK)
     70     virtual String contextMenuItemTagDelete();
     71     virtual String contextMenuItemTagInputMethods();
     72     virtual String contextMenuItemTagUnicode();
     73 #endif
     74 #if PLATFORM(GTK) || PLATFORM(QT)
     75     virtual String contextMenuItemTagSelectAll();
     76 #endif
     77     virtual String contextMenuItemTagNoGuessesFound();
     78     virtual String contextMenuItemTagIgnoreSpelling();
     79     virtual String contextMenuItemTagLearnSpelling();
     80     virtual String contextMenuItemTagSearchWeb();
     81     virtual String contextMenuItemTagLookUpInDictionary(const String& selectedString);
     82     virtual String contextMenuItemTagOpenLink();
     83     virtual String contextMenuItemTagIgnoreGrammar();
     84     virtual String contextMenuItemTagSpellingMenu();
     85     virtual String contextMenuItemTagShowSpellingPanel(bool show);
     86     virtual String contextMenuItemTagCheckSpelling();
     87     virtual String contextMenuItemTagCheckSpellingWhileTyping();
     88     virtual String contextMenuItemTagCheckGrammarWithSpelling();
     89     virtual String contextMenuItemTagFontMenu();
     90     virtual String contextMenuItemTagBold();
     91     virtual String contextMenuItemTagItalic();
     92     virtual String contextMenuItemTagUnderline();
     93     virtual String contextMenuItemTagOutline();
     94     virtual String contextMenuItemTagWritingDirectionMenu();
     95     virtual String contextMenuItemTagTextDirectionMenu();
     96     virtual String contextMenuItemTagDefaultDirection();
     97     virtual String contextMenuItemTagLeftToRight();
     98     virtual String contextMenuItemTagRightToLeft();
     99 #if PLATFORM(MAC)
    100     virtual String contextMenuItemTagSearchInSpotlight();
    101     virtual String contextMenuItemTagShowFonts();
    102     virtual String contextMenuItemTagStyles();
    103     virtual String contextMenuItemTagShowColors();
    104     virtual String contextMenuItemTagSpeechMenu();
    105     virtual String contextMenuItemTagStartSpeaking();
    106     virtual String contextMenuItemTagStopSpeaking();
    107     virtual String contextMenuItemTagCorrectSpellingAutomatically();
    108     virtual String contextMenuItemTagSubstitutionsMenu();
    109     virtual String contextMenuItemTagShowSubstitutions(bool show);
    110     virtual String contextMenuItemTagSmartCopyPaste();
    111     virtual String contextMenuItemTagSmartQuotes();
    112     virtual String contextMenuItemTagSmartDashes();
    113     virtual String contextMenuItemTagSmartLinks();
    114     virtual String contextMenuItemTagTextReplacement();
    115     virtual String contextMenuItemTagTransformationsMenu();
    116     virtual String contextMenuItemTagMakeUpperCase();
    117     virtual String contextMenuItemTagMakeLowerCase();
    118     virtual String contextMenuItemTagCapitalize();
    119     virtual String contextMenuItemTagChangeBack(const String& replacedString);
    120 #endif
    121     virtual String contextMenuItemTagInspectElement();
    122     virtual String contextMenuItemTagOpenVideoInNewWindow();
    123     virtual String contextMenuItemTagOpenAudioInNewWindow();
    124     virtual String contextMenuItemTagCopyVideoLinkToClipboard();
    125     virtual String contextMenuItemTagCopyAudioLinkToClipboard();
    126     virtual String contextMenuItemTagToggleMediaControls();
    127     virtual String contextMenuItemTagToggleMediaLoop();
    128     virtual String contextMenuItemTagEnterVideoFullscreen();
    129     virtual String contextMenuItemTagMediaPlay();
    130     virtual String contextMenuItemTagMediaPause();
    131     virtual String contextMenuItemTagMediaMute();
    132 #endif // ENABLE(CONTEXT_MENUS)
    133     virtual String searchMenuNoRecentSearchesText();
    134     virtual String searchMenuRecentSearchesText();
    135     virtual String searchMenuClearRecentSearchesText();
    136     virtual String AXWebAreaText();
    137     virtual String AXLinkText();
    138     virtual String AXListMarkerText();
    139     virtual String AXImageMapText();
    140     virtual String AXHeadingText();
    141     virtual String AXDefinitionListTermText();
    142     virtual String AXDefinitionListDefinitionText();
    143 #if PLATFORM(MAC)
    144     virtual String AXARIAContentGroupText(const String& ariaType);
    145 #endif
    146     virtual String AXButtonActionVerb();
    147     virtual String AXRadioButtonActionVerb();
    148     virtual String AXTextFieldActionVerb();
    149     virtual String AXCheckedCheckBoxActionVerb();
    150     virtual String AXUncheckedCheckBoxActionVerb();
    151     virtual String AXMenuListActionVerb();
    152     virtual String AXMenuListPopupActionVerb();
    153     virtual String AXLinkActionVerb();
    154     virtual String missingPluginText();
    155     virtual String crashedPluginText();
    156     virtual String multipleFileUploadText(unsigned numberOfFiles);
    157     virtual String unknownFileSizeText();
    158 #if PLATFORM(WIN)
    159     virtual String uploadFileText();
    160     virtual String allFilesText();
    161 #endif
    162 #if PLATFORM(MAC)
    163     virtual String keygenMenuItem512();
    164     virtual String keygenMenuItem1024();
    165     virtual String keygenMenuItem2048();
    166     virtual String keygenKeychainItemName(const String& host);
    167 #endif
    168     virtual String imageTitle(const String& filename, const IntSize&);
    169     virtual String mediaElementLoadingStateText();
    170     virtual String mediaElementLiveBroadcastStateText();
    171     virtual String localizedMediaControlElementString(const String&);
    172     virtual String localizedMediaControlElementHelpText(const String&);
    173     virtual String localizedMediaTimeDescription(float);
    174     virtual String validationMessageValueMissingText();
    175     virtual String validationMessageTypeMismatchText();
    176     virtual String validationMessagePatternMismatchText();
    177     virtual String validationMessageTooLongText();
    178     virtual String validationMessageRangeUnderflowText();
    179     virtual String validationMessageRangeOverflowText();
    180     virtual String validationMessageStepMismatchText();
    181 };
    182 
    183 } // namespace WebCore
    184 
    185 #endif // USE(PLATFORM_STRATEGIES)
    186 
    187 #endif // DefaultLocalizationStrategy_h
    188