| 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 | |
| 36 | namespace 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 (); |
| 56 | String (); |
| 57 | String (); |
| 58 | String (); |
| 59 | String (); |
| 60 | String (); |
| 61 | #if PLATFORM(GTK) |
| 62 | String (); |
| 63 | #endif |
| 64 | String (); |
| 65 | String (); |
| 66 | String (); |
| 67 | String (); |
| 68 | String (); |
| 69 | String (); |
| 70 | String (); |
| 71 | String (); |
| 72 | #if PLATFORM(GTK) |
| 73 | String (); |
| 74 | String (); |
| 75 | String (); |
| 76 | String (); |
| 77 | String (); |
| 78 | String (); |
| 79 | String (); |
| 80 | String (); |
| 81 | String (); |
| 82 | String (); |
| 83 | String (); |
| 84 | String (); |
| 85 | String (); |
| 86 | String (); |
| 87 | String (); |
| 88 | #endif |
| 89 | String (); |
| 90 | String (); |
| 91 | String (); |
| 92 | String (); |
| 93 | String (const String& selectedString); |
| 94 | WEBCORE_EXPORT String (); |
| 95 | WEBCORE_EXPORT String (); |
| 96 | WEBCORE_EXPORT String (); |
| 97 | WEBCORE_EXPORT String (bool show); |
| 98 | WEBCORE_EXPORT String (); |
| 99 | WEBCORE_EXPORT String (); |
| 100 | WEBCORE_EXPORT String (); |
| 101 | WEBCORE_EXPORT String (); |
| 102 | WEBCORE_EXPORT String (); |
| 103 | WEBCORE_EXPORT String (); |
| 104 | WEBCORE_EXPORT String (); |
| 105 | WEBCORE_EXPORT String (); |
| 106 | WEBCORE_EXPORT String (); |
| 107 | String (); |
| 108 | WEBCORE_EXPORT String (); |
| 109 | WEBCORE_EXPORT String (); |
| 110 | WEBCORE_EXPORT String (); |
| 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 (); |
| 134 | String (); |
| 135 | String (); |
| 136 | String (); |
| 137 | String (); |
| 138 | String (); |
| 139 | String (); |
| 140 | String (); |
| 141 | String (); |
| 142 | String (); |
| 143 | String (); |
| 144 | String (); |
| 145 | #if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE) |
| 146 | String contextMenuItemTagEnterVideoEnhancedFullscreen(); |
| 147 | String contextMenuItemTagExitVideoEnhancedFullscreen(); |
| 148 | #endif |
| 149 | String (); |
| 150 | String (); |
| 151 | String (); |
| 152 | WEBCORE_EXPORT String (); |
| 153 | #endif // ENABLE(CONTEXT_MENUS) |
| 154 | |
| 155 | #if !PLATFORM(IOS_FAMILY) |
| 156 | String (); |
| 157 | String (); |
| 158 | String (); |
| 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 (); |
| 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 (); |
| 196 | String (); |
| 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 (); |
| 296 | String (); |
| 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 (); |
| 314 | |
| 315 | #if ENABLE(WEB_CRYPTO) |
| 316 | String webCryptoMasterKeyKeychainLabel(const String& localizedApplicationName); |
| 317 | String (); |
| 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 | |