Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
SeleniumHQ
GitHub Repository: SeleniumHQ/Selenium
Path: blob/trunk/third_party/closure/goog/ui/editor/messages.js
4116 views
1
/**
2
* @license
3
* Copyright The Closure Library Authors.
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
/**
8
* @fileoverview Messages common to Editor UI components.
9
*/
10
11
goog.provide('goog.ui.editor.messages');
12
13
goog.require('goog.html.SafeHtmlFormatter');
14
goog.requireType('goog.html.SafeHtml');
15
16
17
/** @desc Link button / bubble caption. */
18
goog.ui.editor.messages.MSG_LINK_CAPTION = goog.getMsg('Link');
19
20
21
/** @desc Title for the dialog that edits a link. */
22
goog.ui.editor.messages.MSG_EDIT_LINK = goog.getMsg('Edit Link');
23
24
25
/** @desc Prompt the user for the text of the link they've written. */
26
goog.ui.editor.messages.MSG_TEXT_TO_DISPLAY = goog.getMsg('Text to display:');
27
28
29
/** @desc Prompt the user for the URL of the link they've created. */
30
goog.ui.editor.messages.MSG_LINK_TO = goog.getMsg('Link to:');
31
32
33
/** @desc Prompt the user to type a web address for their link. */
34
goog.ui.editor.messages.MSG_ON_THE_WEB = goog.getMsg('Web address');
35
36
37
/** @desc More details on what linking to a web address involves.. */
38
goog.ui.editor.messages.MSG_ON_THE_WEB_TIP =
39
goog.getMsg('Link to a page or file somewhere else on the web');
40
41
42
/**
43
* @desc Text for a button that allows the user to test the link that
44
* they created.
45
*/
46
goog.ui.editor.messages.MSG_TEST_THIS_LINK = goog.getMsg('Test this link');
47
48
49
/**
50
* @return {!goog.html.SafeHtml} SafeHtml version of MSG_TR_LINK_EXPLANATION.
51
*/
52
goog.ui.editor.messages.getTrLinkExplanationSafeHtml = function() {
53
'use strict';
54
const formatter = new goog.html.SafeHtmlFormatter();
55
56
/**
57
* @desc Explanation for how to create a link with the link-editing dialog.
58
*/
59
const MSG_TR_LINK_EXPLANATION = goog.getMsg(
60
'{$startBold}Not sure what to put in the box?{$endBold} ' +
61
'First, find the page on the web that you want to ' +
62
'link to. (A {$searchEngineLink}search engine{$endLink} ' +
63
'might be useful.) Then, copy the web address from ' +
64
'the box in your browser\'s address bar, and paste it into ' +
65
'the box above.',
66
{
67
'startBold': formatter.startTag('b'),
68
'endBold': formatter.endTag('b'),
69
'searchEngineLink': formatter.startTag(
70
'a', {'href': 'http://www.google.com/', 'target': '_new'}),
71
'endLink': formatter.endTag('a')
72
});
73
74
return formatter.format(MSG_TR_LINK_EXPLANATION);
75
};
76
77
78
/** @desc Prompt for the URL of a link that the user is creating. */
79
goog.ui.editor.messages.MSG_WHAT_URL =
80
goog.getMsg('To what URL should this link go?');
81
82
83
/**
84
* @desc Prompt for an email address, so that the user can create a link
85
* that sends an email.
86
*/
87
goog.ui.editor.messages.MSG_EMAIL_ADDRESS = goog.getMsg('Email address');
88
89
90
/**
91
* @desc Explanation of the prompt for an email address in a link.
92
*/
93
goog.ui.editor.messages.MSG_EMAIL_ADDRESS_TIP =
94
goog.getMsg('Link to an email address');
95
96
97
/** @desc Error message when the user enters an invalid email address. */
98
goog.ui.editor.messages.MSG_INVALID_EMAIL =
99
goog.getMsg('Invalid email address');
100
101
102
/**
103
* @desc When the user creates a mailto link, asks them what email
104
* address clicking on this link will send mail to.
105
*/
106
goog.ui.editor.messages.MSG_WHAT_EMAIL =
107
goog.getMsg('To what email address should this link?');
108
109
110
/**
111
* @return {!goog.html.SafeHtml} SafeHtml version of MSG_EMAIL_EXPLANATION.
112
*/
113
goog.ui.editor.messages.getEmailExplanationSafeHtml = function() {
114
'use strict';
115
const formatter = new goog.html.SafeHtmlFormatter();
116
117
/**
118
* @desc Warning about the dangers of creating links with email
119
* addresses in them.
120
*/
121
const MSG_EMAIL_EXPLANATION = goog.getMsg(
122
'{$preb}Be careful.{$postb} ' +
123
'Remember that any time you include an email address on a web ' +
124
'page, nasty spammers can find it too.',
125
{'preb': formatter.startTag('b'), 'postb': formatter.endTag('b')});
126
127
return formatter.format(MSG_EMAIL_EXPLANATION);
128
};
129
130
131
/**
132
* @desc Label for the checkbox that allows the user to specify what when this
133
* link is clicked, it should be opened in a new window.
134
*/
135
goog.ui.editor.messages.MSG_OPEN_IN_NEW_WINDOW =
136
goog.getMsg('Open this link in a new window');
137
138
139
/** @desc Image bubble caption. */
140
goog.ui.editor.messages.MSG_IMAGE_CAPTION = goog.getMsg('Image');
141
142