Commit 524b3c0f authored by webchick's avatar webchick

Issue #2529292 by nod_, eiriksm: JSDoc locale module

parent e7573712
...@@ -11,6 +11,11 @@ ...@@ -11,6 +11,11 @@
* Marks changes of translations. * Marks changes of translations.
* *
* @type {Drupal~behavior} * @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 = { Drupal.behaviors.localeTranslateDirty = {
attach: function () { attach: function () {
...@@ -50,6 +55,9 @@ ...@@ -50,6 +55,9 @@
* Show/hide the description details on Available translation updates page. * Show/hide the description details on Available translation updates page.
* *
* @type {Drupal~behavior} * @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches behavior for toggling details on the translation update page.
*/ */
Drupal.behaviors.hideUpdateInformation = { Drupal.behaviors.hideUpdateInformation = {
attach: function (context, settings) { attach: function (context, settings) {
...@@ -85,16 +93,20 @@ ...@@ -85,16 +93,20 @@
$.extend(Drupal.theme, /** @lends Drupal.theme */{ $.extend(Drupal.theme, /** @lends Drupal.theme */{
/** /**
* Creates markup for a changed translation marker.
* *
* @return {string} * @return {string}
* Markup for the marker.
*/ */
localeTranslateChangedMarker: function () { localeTranslateChangedMarker: function () {
return '<abbr class="warning ajax-changed" title="' + Drupal.t('Changed') + '">*</abbr>'; return '<abbr class="warning ajax-changed" title="' + Drupal.t('Changed') + '">*</abbr>';
}, },
/** /**
* Creates markup for the translation changed warning.
* *
* @return {string} * @return {string}
* Markup for the warning.
*/ */
localeTranslateChangedWarning: function () { 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>'; 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 @@ ...@@ -13,6 +13,9 @@
* This only works if the file name ends with "LANGCODE.po". * This only works if the file name ends with "LANGCODE.po".
* *
* @type {Drupal~behavior} * @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches behavior for preselecting language code based on filename.
*/ */
Drupal.behaviors.importLanguageCodeSelector = { Drupal.behaviors.importLanguageCodeSelector = {
attach: function (context, settings) { 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