Commit 524b3c0f authored by webchick's avatar webchick

Issue #2529292 by nod_, eiriksm: JSDoc locale module

parent e7573712
......@@ -11,6 +11,11 @@
* Marks changes of translations.
*
* @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches behavior to show the user if translations has changed.
* @prop {Drupal~behaviorDetach} detach
* Detach behavior to show the user if translations has changed.
*/
Drupal.behaviors.localeTranslateDirty = {
attach: function () {
......@@ -50,6 +55,9 @@
* Show/hide the description details on Available translation updates page.
*
* @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches behavior for toggling details on the translation update page.
*/
Drupal.behaviors.hideUpdateInformation = {
attach: function (context, settings) {
......@@ -85,16 +93,20 @@
$.extend(Drupal.theme, /** @lends Drupal.theme */{
/**
* Creates markup for a changed translation marker.
*
* @return {string}
* Markup for the marker.
*/
localeTranslateChangedMarker: function () {
return '<abbr class="warning ajax-changed" title="' + Drupal.t('Changed') + '">*</abbr>';
},
/**
* Creates markup for the translation changed warning.
*
* @return {string}
* Markup for the warning.
*/
localeTranslateChangedWarning: function () {
return '<div class="clearfix messages messages--warning">' + Drupal.theme('localeTranslateChangedMarker') + ' ' + Drupal.t('Changes made in this table will not be saved until the form is submitted.') + '</div>';
......
......@@ -13,6 +13,9 @@
* This only works if the file name ends with "LANGCODE.po".
*
* @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches behavior for preselecting language code based on filename.
*/
Drupal.behaviors.importLanguageCodeSelector = {
attach: function (context, settings) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment