Updated to Drupal 8.6.4, which is PHP 7.3 friendly. Also updated HTMLaw library....
[yaffs-website] / web / core / modules / locale / locale.bulk.js
1 /**
2 * DO NOT EDIT THIS FILE.
3 * See the following change record for more information,
4 * https://www.drupal.org/node/2815083
5 * @preserve
6 **/
7
8 (function ($, Drupal) {
9   Drupal.behaviors.importLanguageCodeSelector = {
10     attach: function attach(context, settings) {
11       var $form = $('#locale-translate-import-form').once('autodetect-lang');
12       if ($form.length) {
13         var $langcode = $form.find('.langcode-input');
14         $form.find('.file-import-input').on('change', function () {
15           var matches = $(this).val().match(/([^.][.]*)([\w-]+)\.po$/);
16           if (matches && $langcode.find('option[value="' + matches[2] + '"]').length) {
17             $langcode.val(matches[2]);
18           }
19         });
20       }
21     }
22   };
23 })(jQuery, Drupal);