1/*
2 * Copyright (C) 2003, 2006, 2009, 2011, 2012, 2013 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Igalia S.L
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#ifndef LocalizedStrings_h
28#define LocalizedStrings_h
29
30#include <wtf/Forward.h>
31
32#if USE(GLIB) && defined(GETTEXT_PACKAGE)
33#include <glib/gi18n-lib.h>
34#endif
35
36namespace WebCore {
37
38 class IntSize;
39
40 String inputElementAltText();
41 String resetButtonDefaultLabel();
42 String searchableIndexIntroduction();
43 String submitButtonDefaultLabel();
44 String fileButtonChooseFileLabel();
45 String fileButtonChooseMultipleFilesLabel();
46 String fileButtonNoFileSelectedLabel();
47 String fileButtonNoFilesSelectedLabel();
48 String defaultDetailsSummaryText();
49
50#if PLATFORM(COCOA)
51 String copyImageUnknownFileLabel();
52#endif
53
54#if ENABLE(CONTEXT_MENUS)
55 WEBCORE_EXPORT String contextMenuItemTagOpenLinkInNewWindow();
56 String contextMenuItemTagDownloadLinkToDisk();
57 String contextMenuItemTagCopyLinkToClipboard();
58 String contextMenuItemTagOpenImageInNewWindow();
59 String contextMenuItemTagDownloadImageToDisk();
60 String contextMenuItemTagCopyImageToClipboard();
61#if PLATFORM(GTK)
62 String contextMenuItemTagCopyImageUrlToClipboard();
63#endif
64 String contextMenuItemTagOpenFrameInNewWindow();
65 String contextMenuItemTagCopy();
66 String contextMenuItemTagGoBack();
67 String contextMenuItemTagGoForward();
68 String contextMenuItemTagStop();
69 String contextMenuItemTagReload();
70 String contextMenuItemTagCut();
71 String contextMenuItemTagPaste();
72#if PLATFORM(GTK)
73 String contextMenuItemTagDelete();
74 String contextMenuItemTagInputMethods();
75 String contextMenuItemTagUnicode();
76 String contextMenuItemTagUnicodeInsertLRMMark();
77 String contextMenuItemTagUnicodeInsertRLMMark();
78 String contextMenuItemTagUnicodeInsertLREMark();
79 String contextMenuItemTagUnicodeInsertRLEMark();
80 String contextMenuItemTagUnicodeInsertLROMark();
81 String contextMenuItemTagUnicodeInsertRLOMark();
82 String contextMenuItemTagUnicodeInsertPDFMark();
83 String contextMenuItemTagUnicodeInsertZWSMark();
84 String contextMenuItemTagUnicodeInsertZWJMark();
85 String contextMenuItemTagUnicodeInsertZWNJMark();
86 String contextMenuItemTagSelectAll();
87 String contextMenuItemTagInsertEmoji();
88#endif
89 String contextMenuItemTagNoGuessesFound();
90 String contextMenuItemTagIgnoreSpelling();
91 String contextMenuItemTagLearnSpelling();
92 String contextMenuItemTagSearchWeb();
93 String contextMenuItemTagLookUpInDictionary(const String& selectedString);
94 WEBCORE_EXPORT String contextMenuItemTagOpenLink();
95 WEBCORE_EXPORT String contextMenuItemTagIgnoreGrammar();
96 WEBCORE_EXPORT String contextMenuItemTagSpellingMenu();
97 WEBCORE_EXPORT String contextMenuItemTagShowSpellingPanel(bool show);
98 WEBCORE_EXPORT String contextMenuItemTagCheckSpelling();
99 WEBCORE_EXPORT String contextMenuItemTagCheckSpellingWhileTyping();
100 WEBCORE_EXPORT String contextMenuItemTagCheckGrammarWithSpelling();
101 WEBCORE_EXPORT String contextMenuItemTagFontMenu();
102 WEBCORE_EXPORT String contextMenuItemTagBold();
103 WEBCORE_EXPORT String contextMenuItemTagItalic();
104 WEBCORE_EXPORT String contextMenuItemTagUnderline();
105 WEBCORE_EXPORT String contextMenuItemTagOutline();
106 WEBCORE_EXPORT String contextMenuItemTagWritingDirectionMenu();
107 String contextMenuItemTagTextDirectionMenu();
108 WEBCORE_EXPORT String contextMenuItemTagDefaultDirection();
109 WEBCORE_EXPORT String contextMenuItemTagLeftToRight();
110 WEBCORE_EXPORT String contextMenuItemTagRightToLeft();
111#if PLATFORM(COCOA)
112 String contextMenuItemTagSearchInSpotlight();
113 WEBCORE_EXPORT String contextMenuItemTagShowFonts();
114 WEBCORE_EXPORT String contextMenuItemTagStyles();
115 WEBCORE_EXPORT String contextMenuItemTagShowColors();
116 WEBCORE_EXPORT String contextMenuItemTagSpeechMenu();
117 WEBCORE_EXPORT String contextMenuItemTagStartSpeaking();
118 WEBCORE_EXPORT String contextMenuItemTagStopSpeaking();
119 WEBCORE_EXPORT String contextMenuItemTagCorrectSpellingAutomatically();
120 WEBCORE_EXPORT String contextMenuItemTagSubstitutionsMenu();
121 WEBCORE_EXPORT String contextMenuItemTagShowSubstitutions(bool show);
122 WEBCORE_EXPORT String contextMenuItemTagSmartCopyPaste();
123 WEBCORE_EXPORT String contextMenuItemTagSmartQuotes();
124 WEBCORE_EXPORT String contextMenuItemTagSmartDashes();
125 WEBCORE_EXPORT String contextMenuItemTagSmartLinks();
126 WEBCORE_EXPORT String contextMenuItemTagTextReplacement();
127 WEBCORE_EXPORT String contextMenuItemTagTransformationsMenu();
128 WEBCORE_EXPORT String contextMenuItemTagMakeUpperCase();
129 WEBCORE_EXPORT String contextMenuItemTagMakeLowerCase();
130 WEBCORE_EXPORT String contextMenuItemTagCapitalize();
131 String contextMenuItemTagChangeBack(const String& replacedString);
132#endif
133 String contextMenuItemTagOpenVideoInNewWindow();
134 String contextMenuItemTagOpenAudioInNewWindow();
135 String contextMenuItemTagDownloadVideoToDisk();
136 String contextMenuItemTagDownloadAudioToDisk();
137 String contextMenuItemTagCopyVideoLinkToClipboard();
138 String contextMenuItemTagCopyAudioLinkToClipboard();
139 String contextMenuItemTagToggleMediaControls();
140 String contextMenuItemTagShowMediaControls();
141 String contextMenuItemTagHideMediaControls();
142 String contextMenuItemTagToggleMediaLoop();
143 String contextMenuItemTagEnterVideoFullscreen();
144 String contextMenuItemTagExitVideoFullscreen();
145#if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)
146 String contextMenuItemTagEnterVideoEnhancedFullscreen();
147 String contextMenuItemTagExitVideoEnhancedFullscreen();
148#endif
149 String contextMenuItemTagMediaPlay();
150 String contextMenuItemTagMediaPause();
151 String contextMenuItemTagMediaMute();
152 WEBCORE_EXPORT String contextMenuItemTagInspectElement();
153#endif // ENABLE(CONTEXT_MENUS)
154
155#if !PLATFORM(IOS_FAMILY)
156 String searchMenuNoRecentSearchesText();
157 String searchMenuRecentSearchesText();
158 String searchMenuClearRecentSearchesText();
159#endif
160
161 String AXWebAreaText();
162 String AXLinkText();
163 String AXListMarkerText();
164 String AXImageMapText();
165 String AXHeadingText();
166 String AXColorWellText();
167 String AXDefinitionText();
168 String AXDescriptionListText();
169 String AXDescriptionListTermText();
170 String AXDescriptionListDetailText();
171 String AXFooterRoleDescriptionText();
172 String AXFileUploadButtonText();
173 String AXOutputText();
174 String AXSearchFieldCancelButtonText();
175 String AXAttachmentRoleText();
176 String AXDetailsText();
177 String AXSummaryText();
178 String AXFeedText();
179 String AXFigureText();
180 String AXEmailFieldText();
181 String AXTelephoneFieldText();
182 String AXURLFieldText();
183 String AXDateFieldText();
184 String AXTimeFieldText();
185 String AXDateTimeFieldText();
186 String AXMonthFieldText();
187 String AXNumberFieldText();
188 String AXWeekFieldText();
189
190 String AXButtonActionVerb();
191 String AXRadioButtonActionVerb();
192 String AXTextFieldActionVerb();
193 String AXCheckedCheckBoxActionVerb();
194 String AXUncheckedCheckBoxActionVerb();
195 String AXMenuListActionVerb();
196 String AXMenuListPopupActionVerb();
197 String AXLinkActionVerb();
198 String AXListItemActionVerb();
199
200#if ENABLE(INPUT_TYPE_WEEK)
201 // weekFormatInLDML() returns week and year format in LDML, Unicode
202 // technical standard 35, Locale Data Markup Language, e.g. "'Week' ww, yyyy"
203 String weekFormatInLDML();
204#endif
205#if PLATFORM(COCOA)
206 String AXARIAContentGroupText(const String& ariaType);
207 String AXHorizontalRuleDescriptionText();
208 String AXMarkText();
209#if ENABLE(METER_ELEMENT)
210 String AXMeterGaugeRegionOptimumText();
211 String AXMeterGaugeRegionSuboptimalText();
212 String AXMeterGaugeRegionLessGoodText();
213#endif
214#endif
215#if ENABLE(APPLE_PAY)
216 String AXApplePayPlainLabel();
217 String AXApplePayBuyLabel();
218 String AXApplePaySetupLabel();
219 String AXApplePayDonateLabel();
220 String AXApplePayCheckOutLabel();
221 String AXApplePayBookLabel();
222 String AXApplePaySubscribeLabel();
223#endif
224
225 String AXAutoFillCredentialsLabel();
226 String AXAutoFillContactsLabel();
227 String AXAutoFillStrongPasswordLabel();
228 String AXAutoFillCreditCardLabel();
229 String autoFillStrongPasswordLabel();
230
231 String missingPluginText();
232 String crashedPluginText();
233 String blockedPluginByContentSecurityPolicyText();
234 String insecurePluginVersionText();
235 String unsupportedPluginText();
236 WEBCORE_EXPORT String pluginTooSmallText();
237
238 WEBCORE_EXPORT String multipleFileUploadText(unsigned numberOfFiles);
239 String unknownFileSizeText();
240
241#if PLATFORM(WIN)
242 String uploadFileText();
243 String allFilesText();
244#endif
245
246#if PLATFORM(COCOA)
247 WEBCORE_EXPORT String builtInPDFPluginName();
248 WEBCORE_EXPORT String pdfDocumentTypeDescription();
249 WEBCORE_EXPORT String postScriptDocumentTypeDescription();
250 String keygenMenuItem2048();
251 WEBCORE_EXPORT String keygenKeychainItemName(const String& host);
252#endif
253
254#if PLATFORM(IOS_FAMILY)
255 String htmlSelectMultipleItems(size_t num);
256 String fileButtonChooseMediaFileLabel();
257 String fileButtonChooseMultipleMediaFilesLabel();
258 String fileButtonNoMediaFileSelectedLabel();
259 String fileButtonNoMediaFilesSelectedLabel();
260#endif
261
262 String imageTitle(const String& filename, const IntSize& size);
263
264 String mediaElementLoadingStateText();
265 String mediaElementLiveBroadcastStateText();
266 String localizedMediaControlElementString(const String&);
267 String localizedMediaControlElementHelpText(const String&);
268 String localizedMediaTimeDescription(float);
269
270 String validationMessageValueMissingText();
271 String validationMessageValueMissingForCheckboxText();
272 String validationMessageValueMissingForFileText();
273 String validationMessageValueMissingForMultipleFileText();
274 String validationMessageValueMissingForRadioText();
275 String validationMessageValueMissingForSelectText();
276 String validationMessageTypeMismatchText();
277 String validationMessageTypeMismatchForEmailText();
278 String validationMessageTypeMismatchForMultipleEmailText();
279 String validationMessageTypeMismatchForURLText();
280 String validationMessagePatternMismatchText();
281 String validationMessageTooShortText(int valueLength, int minLength);
282 String validationMessageTooLongText(int valueLength, int maxLength);
283 String validationMessageRangeUnderflowText(const String& minimum);
284 String validationMessageRangeOverflowText(const String& maximum);
285 String validationMessageStepMismatchText(const String& base, const String& step);
286 String validationMessageBadInputForNumberText();
287#if USE(SOUP)
288 String unacceptableTLSCertificate();
289#endif
290
291 String clickToExitFullScreenText();
292
293#if ENABLE(VIDEO_TRACK)
294 String textTrackSubtitlesText();
295 String textTrackOffMenuItemText();
296 String textTrackAutomaticMenuItemText();
297 String textTrackNoLabelText();
298 String audioTrackNoLabelText();
299#if PLATFORM(COCOA) || PLATFORM(WIN)
300 String textTrackCountryAndLanguageMenuItemText(const String& title, const String& country, const String& language);
301 String textTrackLanguageMenuItemText(const String& title, const String& language);
302 String closedCaptionTrackMenuItemText(const String&);
303 String sdhTrackMenuItemText(const String&);
304 String easyReaderTrackMenuItemText(const String&);
305 String forcedTrackMenuItemText(const String&);
306 String audioDescriptionTrackSuffixText(const String&);
307#endif
308#endif
309
310 String snapshottedPlugInLabelTitle();
311 String snapshottedPlugInLabelSubtitle();
312
313 WEBCORE_EXPORT String useBlockedPlugInContextMenuTitle();
314
315#if ENABLE(WEB_CRYPTO)
316 String webCryptoMasterKeyKeychainLabel(const String& localizedApplicationName);
317 String webCryptoMasterKeyKeychainComment();
318#endif
319
320#if PLATFORM(MAC)
321 WEBCORE_EXPORT String insertListTypeNone();
322 WEBCORE_EXPORT String insertListTypeBulleted();
323 WEBCORE_EXPORT String insertListTypeBulletedAccessibilityTitle();
324 WEBCORE_EXPORT String insertListTypeNumbered();
325 WEBCORE_EXPORT String insertListTypeNumberedAccessibilityTitle();
326 WEBCORE_EXPORT String exitFullScreenButtonAccessibilityTitle();
327#endif
328
329#if PLATFORM(WATCHOS)
330 WEBCORE_EXPORT String numberPadOKButtonTitle();
331 WEBCORE_EXPORT String formControlCancelButtonTitle();
332 WEBCORE_EXPORT String formControlDoneButtonTitle();
333 WEBCORE_EXPORT String formControlHideButtonTitle();
334 WEBCORE_EXPORT String formControlGoButtonTitle();
335 WEBCORE_EXPORT String formControlSearchButtonTitle();
336 WEBCORE_EXPORT String datePickerSetButtonTitle();
337 WEBCORE_EXPORT String datePickerDayLabelTitle();
338 WEBCORE_EXPORT String datePickerMonthLabelTitle();
339 WEBCORE_EXPORT String datePickerYearLabelTitle();
340#endif
341
342#if USE(GLIB) && defined(GETTEXT_PACKAGE)
343#define WEB_UI_STRING(string, description) WebCore::localizedString(_(string))
344#define WEB_UI_STRING_KEY(string, key, description) WebCore::localizedString(C_(key, string))
345#define WEB_UI_STRING_WITH_MNEMONIC(string, mnemonic, description) WebCore::localizedString(_(mnemonic))
346#else
347#define WEB_UI_STRING(string, description) WebCore::localizedString(string)
348#define WEB_UI_STRING_KEY(string, key, description) WebCore::localizedString(key)
349#define WEB_UI_STRING_WITH_MNEMONIC(string, mnemonic, description) WebCore::localizedString(string)
350#endif
351
352#if USE(CF)
353// This is exactly as WEB_UI_STRING, but renamed to ensure the string is not scanned by non-CF ports.
354#define WEB_UI_CFSTRING(string, description) WebCore::localizedString(string)
355#endif
356
357 WEBCORE_EXPORT String localizedString(const char* key);
358 String formatLocalizedString(String format, ...);
359
360#ifdef __OBJC__
361#define WEB_UI_NSSTRING(string, description) WebCore::localizedNSString(string)
362 WEBCORE_EXPORT NSString *localizedNSString(NSString *key) NS_FORMAT_ARGUMENT(1);
363#endif
364
365} // namespace WebCore
366
367#endif // LocalizedStrings_h
368