Path: blob/trunk/third_party/closure/goog/ui/editor/messages.js
4116 views
/**1* @license2* Copyright The Closure Library Authors.3* SPDX-License-Identifier: Apache-2.04*/56/**7* @fileoverview Messages common to Editor UI components.8*/910goog.provide('goog.ui.editor.messages');1112goog.require('goog.html.SafeHtmlFormatter');13goog.requireType('goog.html.SafeHtml');141516/** @desc Link button / bubble caption. */17goog.ui.editor.messages.MSG_LINK_CAPTION = goog.getMsg('Link');181920/** @desc Title for the dialog that edits a link. */21goog.ui.editor.messages.MSG_EDIT_LINK = goog.getMsg('Edit Link');222324/** @desc Prompt the user for the text of the link they've written. */25goog.ui.editor.messages.MSG_TEXT_TO_DISPLAY = goog.getMsg('Text to display:');262728/** @desc Prompt the user for the URL of the link they've created. */29goog.ui.editor.messages.MSG_LINK_TO = goog.getMsg('Link to:');303132/** @desc Prompt the user to type a web address for their link. */33goog.ui.editor.messages.MSG_ON_THE_WEB = goog.getMsg('Web address');343536/** @desc More details on what linking to a web address involves.. */37goog.ui.editor.messages.MSG_ON_THE_WEB_TIP =38goog.getMsg('Link to a page or file somewhere else on the web');394041/**42* @desc Text for a button that allows the user to test the link that43* they created.44*/45goog.ui.editor.messages.MSG_TEST_THIS_LINK = goog.getMsg('Test this link');464748/**49* @return {!goog.html.SafeHtml} SafeHtml version of MSG_TR_LINK_EXPLANATION.50*/51goog.ui.editor.messages.getTrLinkExplanationSafeHtml = function() {52'use strict';53const formatter = new goog.html.SafeHtmlFormatter();5455/**56* @desc Explanation for how to create a link with the link-editing dialog.57*/58const MSG_TR_LINK_EXPLANATION = goog.getMsg(59'{$startBold}Not sure what to put in the box?{$endBold} ' +60'First, find the page on the web that you want to ' +61'link to. (A {$searchEngineLink}search engine{$endLink} ' +62'might be useful.) Then, copy the web address from ' +63'the box in your browser\'s address bar, and paste it into ' +64'the box above.',65{66'startBold': formatter.startTag('b'),67'endBold': formatter.endTag('b'),68'searchEngineLink': formatter.startTag(69'a', {'href': 'http://www.google.com/', 'target': '_new'}),70'endLink': formatter.endTag('a')71});7273return formatter.format(MSG_TR_LINK_EXPLANATION);74};757677/** @desc Prompt for the URL of a link that the user is creating. */78goog.ui.editor.messages.MSG_WHAT_URL =79goog.getMsg('To what URL should this link go?');808182/**83* @desc Prompt for an email address, so that the user can create a link84* that sends an email.85*/86goog.ui.editor.messages.MSG_EMAIL_ADDRESS = goog.getMsg('Email address');878889/**90* @desc Explanation of the prompt for an email address in a link.91*/92goog.ui.editor.messages.MSG_EMAIL_ADDRESS_TIP =93goog.getMsg('Link to an email address');949596/** @desc Error message when the user enters an invalid email address. */97goog.ui.editor.messages.MSG_INVALID_EMAIL =98goog.getMsg('Invalid email address');99100101/**102* @desc When the user creates a mailto link, asks them what email103* address clicking on this link will send mail to.104*/105goog.ui.editor.messages.MSG_WHAT_EMAIL =106goog.getMsg('To what email address should this link?');107108109/**110* @return {!goog.html.SafeHtml} SafeHtml version of MSG_EMAIL_EXPLANATION.111*/112goog.ui.editor.messages.getEmailExplanationSafeHtml = function() {113'use strict';114const formatter = new goog.html.SafeHtmlFormatter();115116/**117* @desc Warning about the dangers of creating links with email118* addresses in them.119*/120const MSG_EMAIL_EXPLANATION = goog.getMsg(121'{$preb}Be careful.{$postb} ' +122'Remember that any time you include an email address on a web ' +123'page, nasty spammers can find it too.',124{'preb': formatter.startTag('b'), 'postb': formatter.endTag('b')});125126return formatter.format(MSG_EMAIL_EXPLANATION);127};128129130/**131* @desc Label for the checkbox that allows the user to specify what when this132* link is clicked, it should be opened in a new window.133*/134goog.ui.editor.messages.MSG_OPEN_IN_NEW_WINDOW =135goog.getMsg('Open this link in a new window');136137138/** @desc Image bubble caption. */139goog.ui.editor.messages.MSG_IMAGE_CAPTION = goog.getMsg('Image');140141142