messages.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. // Copyright 2008 The Closure Library Authors. All Rights Reserved.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS-IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. /**
  15. * @fileoverview Messages common to Editor UI components.
  16. *
  17. * @author robbyw@google.com (Robby Walker)
  18. */
  19. goog.provide('goog.ui.editor.messages');
  20. goog.require('goog.html.uncheckedconversions');
  21. goog.require('goog.string.Const');
  22. /** @desc Link button / bubble caption. */
  23. goog.ui.editor.messages.MSG_LINK_CAPTION = goog.getMsg('Link');
  24. /** @desc Title for the dialog that edits a link. */
  25. goog.ui.editor.messages.MSG_EDIT_LINK = goog.getMsg('Edit Link');
  26. /** @desc Prompt the user for the text of the link they've written. */
  27. goog.ui.editor.messages.MSG_TEXT_TO_DISPLAY = goog.getMsg('Text to display:');
  28. /** @desc Prompt the user for the URL of the link they've created. */
  29. goog.ui.editor.messages.MSG_LINK_TO = goog.getMsg('Link to:');
  30. /** @desc Prompt the user to type a web address for their link. */
  31. goog.ui.editor.messages.MSG_ON_THE_WEB = goog.getMsg('Web address');
  32. /** @desc More details on what linking to a web address involves.. */
  33. goog.ui.editor.messages.MSG_ON_THE_WEB_TIP =
  34. goog.getMsg('Link to a page or file somewhere else on the web');
  35. /**
  36. * @desc Text for a button that allows the user to test the link that
  37. * they created.
  38. */
  39. goog.ui.editor.messages.MSG_TEST_THIS_LINK = goog.getMsg('Test this link');
  40. /**
  41. * @desc Explanation for how to create a link with the link-editing dialog.
  42. */
  43. goog.ui.editor.messages.MSG_TR_LINK_EXPLANATION = goog.getMsg(
  44. '{$startBold}Not sure what to put in the box?{$endBold} ' +
  45. 'First, find the page on the web that you want to ' +
  46. 'link to. (A {$searchEngineLink}search engine{$endLink} ' +
  47. 'might be useful.) Then, copy the web address from ' +
  48. "the box in your browser's address bar, and paste it into " +
  49. 'the box above.',
  50. {
  51. 'startBold': '<b>',
  52. 'endBold': '</b>',
  53. 'searchEngineLink': "<a href='http://www.google.com/' target='_new'>",
  54. 'endLink': '</a>'
  55. });
  56. /**
  57. * @return {!goog.html.SafeHtml} SafeHtml version of MSG_TR_LINK_EXPLANATION.
  58. */
  59. goog.ui.editor.messages.getTrLinkExplanationSafeHtml = function() {
  60. return goog.html.uncheckedconversions
  61. .safeHtmlFromStringKnownToSatisfyTypeContract(
  62. goog.string.Const.from('Parameterless translation'),
  63. goog.ui.editor.messages.MSG_TR_LINK_EXPLANATION);
  64. };
  65. /** @desc Prompt for the URL of a link that the user is creating. */
  66. goog.ui.editor.messages.MSG_WHAT_URL =
  67. goog.getMsg('To what URL should this link go?');
  68. /**
  69. * @desc Prompt for an email address, so that the user can create a link
  70. * that sends an email.
  71. */
  72. goog.ui.editor.messages.MSG_EMAIL_ADDRESS = goog.getMsg('Email address');
  73. /**
  74. * @desc Explanation of the prompt for an email address in a link.
  75. */
  76. goog.ui.editor.messages.MSG_EMAIL_ADDRESS_TIP =
  77. goog.getMsg('Link to an email address');
  78. /** @desc Error message when the user enters an invalid email address. */
  79. goog.ui.editor.messages.MSG_INVALID_EMAIL =
  80. goog.getMsg('Invalid email address');
  81. /**
  82. * @desc When the user creates a mailto link, asks them what email
  83. * address clicking on this link will send mail to.
  84. */
  85. goog.ui.editor.messages.MSG_WHAT_EMAIL =
  86. goog.getMsg('To what email address should this link?');
  87. /**
  88. * @desc Warning about the dangers of creating links with email
  89. * addresses in them.
  90. */
  91. goog.ui.editor.messages.MSG_EMAIL_EXPLANATION = goog.getMsg(
  92. '{$preb}Be careful.{$postb} ' +
  93. 'Remember that any time you include an email address on a web page, ' +
  94. 'nasty spammers can find it too.',
  95. {'preb': '<b>', 'postb': '</b>'});
  96. /**
  97. * @return {!goog.html.SafeHtml} SafeHtml version of MSG_EMAIL_EXPLANATION.
  98. */
  99. goog.ui.editor.messages.getEmailExplanationSafeHtml = function() {
  100. return goog.html.uncheckedconversions
  101. .safeHtmlFromStringKnownToSatisfyTypeContract(
  102. goog.string.Const.from('Parameterless translation'),
  103. goog.ui.editor.messages.MSG_EMAIL_EXPLANATION);
  104. };
  105. /**
  106. * @desc Label for the checkbox that allows the user to specify what when this
  107. * link is clicked, it should be opened in a new window.
  108. */
  109. goog.ui.editor.messages.MSG_OPEN_IN_NEW_WINDOW =
  110. goog.getMsg('Open this link in a new window');
  111. /** @desc Image bubble caption. */
  112. goog.ui.editor.messages.MSG_IMAGE_CAPTION = goog.getMsg('Image');