TranslatePress – Translate Multilingual sites - Version 1.5.6

Version Description

  • Improved speed on Gettext exclusion
  • Make Gettext exclusion work without a domain in Advanced Settings
  • Allow po/mo localization files to translate excluded Gettext strings
  • Added Advanced setting to Exclude selectors from translation
  • Added option to change floating language switcher position
  • Added compatibility with CartFlows plugin
  • Added compatibility with NextGen plugin
  • Added compatibility with Ninja Popups plugin mails
  • Added compatibility with Woo Tours plugin
  • Fixed issue with trp-gettext wrappings in WooCommerce REST API
  • Fixed issue with translating images run through JetPack CDN
  • Fixed edge case where gettext inside script tag attributes was breaking html
  • Translated title of product in WooCommerce "Product has been added to cart" message
  • Better handling of string overdetection in dynamic string translation
  • Better handling of sql errors and machine translation
  • Fixed WooCommerce Product Translation on Cart Page for products with hyphen in their names
Download this release

Release Info

Developer madalin.ungureanu
Plugin Icon 128x128 TranslatePress – Translate Multilingual sites
Version 1.5.6
Comparing to
See all releases

Code changes from version 1.5.5 to 1.5.6

assets/css/trp-floater-language-switcher.css CHANGED
@@ -9,6 +9,35 @@
9
  overflow: hidden;
10
  }
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  #trp-floater-ls.trp-floater-ls-names {
13
  max-width: 160px;
14
  }
@@ -88,10 +117,4 @@
88
 
89
  #trp-floater-ls a {
90
  text-decoration: none;
91
- }
92
-
93
- @media only screen and ( max-width: 800px ) {
94
- #trp-floater-ls {
95
- left: 5%;
96
- }
97
  }
9
  overflow: hidden;
10
  }
11
 
12
+ #trp-floater-ls.trp-bottom-left{
13
+ left: 10%;
14
+ }
15
+
16
+ #trp-floater-ls.trp-top-right{
17
+ bottom:auto;
18
+ top: 0;
19
+ border-radius: 0 0 5px 5px;
20
+ }
21
+
22
+ #trp-floater-ls.trp-top-left{
23
+ bottom:auto;
24
+ top: 0;
25
+ left: 10%;
26
+ border-radius: 0 0 5px 5px;
27
+ }
28
+
29
+ body.admin-bar #trp-floater-ls.trp-top-right,
30
+ body.admin-bar #trp-floater-ls.trp-top-left{
31
+ top: 32px;
32
+ }
33
+
34
+ @media screen and (max-width: 782px) {
35
+ body.admin-bar #trp-floater-ls.trp-top-right,
36
+ body.admin-bar #trp-floater-ls.trp-top-left {
37
+ top: 46px;
38
+ }
39
+ }
40
+
41
  #trp-floater-ls.trp-floater-ls-names {
42
  max-width: 160px;
43
  }
117
 
118
  #trp-floater-ls a {
119
  text-decoration: none;
 
 
 
 
 
 
120
  }
assets/js/trp-editor.js CHANGED
@@ -714,7 +714,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _uti
714
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
715
 
716
  "use strict";
717
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _translation_input_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./translation-input.vue */ \"./assets/src/js/components/translation-input.vue\");\n/* harmony import */ var _translation_memory_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./translation-memory.vue */ \"./assets/src/js/components/translation-memory.vue\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n props: ['selectedIndexesArray', 'dictionary', 'currentLanguage', 'onScreenLanguage', 'languageNames', 'settings', 'showChangesUnsavedMessage', 'editorStrings', 'flagsPath', 'iframe', 'nonces', 'ajax_url'],\n data: function data() {\n return {\n languages: [],\n completeLanguageNames: Object.assign({\n 'original': 'Original String'\n }, this.languageNames),\n othersButtonPositionOffset: 1,\n showOtherLanguages: false,\n orderedLanguages: [],\n showImageIcon: true\n };\n },\n components: {\n translationInput: _translation_input_vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n translationMemory: _translation_memory_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n },\n mounted: function mounted() {\n this.determineLanguageOrder();\n this.addKeyboardShortcutsListener();\n },\n updated: function updated() {\n // if already active do nothing\n if (document.activeElement.classList.contains('trp-translation-input')) {\n return;\n } // place the cursor in the first textarea or input for translation\n\n\n var translationSection = document.getElementById('trp-translation-section');\n\n if (translationSection) {\n var focusableSelectors = ['textarea:not([readonly])', 'input[type=\"text\"]:not([readonly])'];\n\n for (var i = 0; i < focusableSelectors.length; i++) {\n var focusable = document.getElementById('trp-translation-section').querySelector(focusableSelectors[i]);\n\n if (focusable) {\n focusable.focus();\n break;\n }\n }\n }\n },\n watch: {\n selectedIndexesArray: function selectedIndexesArray() {\n this.updateLanguages();\n },\n onScreenLanguage: function onScreenLanguage() {\n this.determineLanguageOrder();\n this.updateLanguages();\n }\n },\n computed: {\n othersButtonPosition: function othersButtonPosition() {\n if (this.currentLanguage === this.settings['default-language'] || this.settings['translation-languages'].length <= 2) {\n // don't display it\n return 999;\n } else {\n return this.othersButtonPositionOffset;\n }\n }\n },\n methods: {\n determineLanguageOrder: function determineLanguageOrder() {\n var self = this;\n var filteredLanguages = this.settings['translation-languages'].filter(function (language, index, array) {\n // all languages except default and current or on screen language.\n return self.settings['default-language'] !== language && self.onScreenLanguage !== language;\n });\n this.orderedLanguages = [];\n this.orderedLanguages.push(this.settings['default-language']);\n if (this.onScreenLanguage !== '') this.orderedLanguages.push(this.onScreenLanguage);\n this.orderedLanguages = this.orderedLanguages.concat(filteredLanguages);\n },\n updateLanguages: function updateLanguages() {\n this.languages = [];\n var self = this;\n var defaultLanguage = this.settings['default-language'];\n var translateToDefault = false;\n this.showImageIcon = false;\n this.othersButtonPositionOffset = 1;\n this.selectedIndexesArray.forEach(function (selectedIndex) {\n if (self.dictionary[selectedIndex] && self.dictionary[selectedIndex].translationsArray[defaultLanguage]) translateToDefault = true;\n if (self.dictionary[selectedIndex] && self.dictionary[selectedIndex].attribute === 'src') self.showImageIcon = true;\n });\n\n if (translateToDefault) {\n this.languages.push('original');\n this.othersButtonPositionOffset++;\n }\n\n this.languages = this.languages.concat(this.orderedLanguages);\n },\n discardChanges: function discardChanges(selectedIndex, languageCode) {\n this.dictionary[selectedIndex].translationsArray[languageCode].editedTranslation = this.dictionary[selectedIndex].translationsArray[languageCode].translated;\n this.$emit('discarded-changes');\n },\n hasUnsavedChanges: function hasUnsavedChanges(selectedIndex, languageCode) {\n return this.dictionary[selectedIndex].translationsArray[languageCode].translated !== this.dictionary[selectedIndex].translationsArray[languageCode].editedTranslation;\n },\n discardAll: function discardAll() {\n var self = this;\n this.selectedIndexesArray.forEach(function (selectedIndex) {\n self.settings['translation-languages'].forEach(function (languageCode) {\n if (self.dictionary[selectedIndex].translationsArray[languageCode] && self.dictionary[selectedIndex].translationsArray[languageCode].translated !== self.dictionary[selectedIndex].translationsArray[languageCode].editedTranslation) {\n self.discardChanges(selectedIndex, languageCode);\n }\n });\n });\n\n if (this.$parent.mergingString === true) {\n this.$parent.selectedString = null;\n var previouslyHighlighted = this.iframe.getElementsByClassName('trp-create-translation-block');\n\n if (previouslyHighlighted.length > 0) {\n var i;\n\n for (i = 0; i < previouslyHighlighted.length; i++) {\n previouslyHighlighted[i].classList.remove('trp-highlight');\n previouslyHighlighted[i].classList.remove('trp-create-translation-block');\n }\n }\n\n this.$parent.mergingString = false;\n this.$parent.mergeData = [];\n }\n },\n addKeyboardShortcutsListener: function addKeyboardShortcutsListener() {\n document.addEventListener(\"keydown\", function (e) {\n // CTRL + ALT + Z\n if ((window.navigator.platform.match(\"Mac\") ? e.metaKey : e.ctrlKey) && e.altKey && e.keyCode === 90) {\n e.preventDefault();\n window.dispatchEvent(new Event('trp_trigger_discard_all_changes_event'));\n }\n }, false);\n window.addEventListener('trp_trigger_discard_all_changes_event', this.discardAll);\n }\n }\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vYXNzZXRzL3NyYy9qc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3MnLFxyXG4gICAgICAgICAgICAnZmxhZ3NQYXRoJyxcclxuICAgICAgICAgICAgJ2lmcmFtZScsXHJcbiAgICAgICAgICAgICdub25jZXMnLFxyXG4gICAgICAgICAgICAnYWpheF91cmwnXHJcbiAgICAgICAgXSxcclxuICAgICAgICBkYXRhKCl7XHJcbiAgICAgICAgICAgIHJldHVybntcclxuICAgICAgICAgICAgICAgIGxhbmd1YWdlcyAgICAgICAgICAgICAgICAgIDogW10sXHJcbiAgICAgICAgICAgICAgICBjb21wbGV0ZUxhbmd1YWdlTmFtZXMgICAgICA6IE9iamVjdC5hc3NpZ24oIHsgJ29yaWdpbmFsJzogJ09yaWdpbmFsIFN0cmluZycgfSwgdGhpcy5sYW5ndWFnZU5hbWVzICksXHJcbiAgICAgICAgICAgICAgICBvdGhlcnNCdXR0b25Qb3NpdGlvbk9mZnNldCA6IDEsXHJcbiAgICAgICAgICAgICAgICBzaG93T3RoZXJMYW5ndWFnZXMgICAgICAgICA6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgb3JkZXJlZExhbmd1YWdlcyAgICAgICAgICAgOiBbXSxcclxuICAgICAgICAgICAgICAgIHNob3dJbWFnZUljb24gICAgICAgICAgICAgIDogdHJ1ZVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICBjb21wb25lbnRzOntcclxuICAgICAgICAgICAgdHJhbnNsYXRpb25JbnB1dCxcclxuICAgICAgICAgICAgdHJhbnNsYXRpb25NZW1vcnlcclxuICAgICAgICB9LFxyXG4gICAgICAgIG1vdW50ZWQoKXtcclxuICAgICAgICAgICAgdGhpcy5kZXRlcm1pbmVMYW5ndWFnZU9yZGVyKClcclxuICAgICAgICAgICAgdGhpcy5hZGRLZXlib2FyZFNob3J0Y3V0c0xpc3RlbmVyKClcclxuICAgICAgICB9LFxyXG4gICAgICAgIHVwZGF0ZWQoKXtcclxuICAgICAgICAgICAgLy8gaWYgYWxyZWFkeSBhY3RpdmUgZG8gbm90aGluZ1xyXG4gICAgICAgICAgICBpZiAoIGRvY3VtZW50LmFjdGl2ZUVsZW1lbnQuY2xhc3NMaXN0LmNvbnRhaW5zKCAndHJwLXRyYW5zbGF0aW9uLWlucHV0JyApKXtcclxuICAgICAgICAgICAgICAgIHJldHVyblxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIC8vIHBsYWNlIHRoZSBjdXJzb3IgaW4gdGhlIGZpcnN0IHRleHRhcmVhIG9yIGlucHV0IGZvciB0cmFuc2xhdGlvblxyXG4gICAgICAgICAgICBsZXQgdHJhbnNsYXRpb25TZWN0aW9uID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoICd0cnAtdHJhbnNsYXRpb24tc2VjdGlvbicgKVxyXG4gICAgICAgICAgICBpZiAoIHRyYW5zbGF0aW9uU2VjdGlvbiApICB7XHJcbiAgICAgICAgICAgICAgICBsZXQgZm9jdXNhYmxlU2VsZWN0b3JzID0gWyd0ZXh0YXJlYTpub3QoW3JlYWRvbmx5XSknLCAnaW5wdXRbdHlwZT1cInRleHRcIl06bm90KFtyZWFkb25seV0pJ11cclxuICAgICAgICAgICAgICAgIGZvciAoIHZhciBpID0gMDsgaTxmb2N1c2FibGVTZWxlY3RvcnMubGVuZ3RoOyBpKysgKXtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgZm9jdXNhYmxlID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoICd0cnAtdHJhbnNsYXRpb24tc2VjdGlvbicgKS5xdWVyeVNlbGVjdG9yKGZvY3VzYWJsZVNlbGVjdG9yc1tpXSlcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIGZvY3VzYWJsZSApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZm9jdXNhYmxlLmZvY3VzKClcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICB3YXRjaDoge1xyXG4gICAgICAgICAgICBzZWxlY3RlZEluZGV4ZXNBcnJheTogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy51cGRhdGVMYW5ndWFnZXMoKVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBvblNjcmVlbkxhbmd1YWdlOiBmdW5jdGlvbigpe1xyXG4gICAgICAgICAgICAgICAgdGhpcy5kZXRlcm1pbmVMYW5ndWFnZU9yZGVyKClcclxuICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlTGFuZ3VhZ2VzKClcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgY29tcHV0ZWQ6e1xyXG4gICAgICAgICAgICBvdGhlcnNCdXR0b25Qb3NpdGlvbjogZnVuY3Rpb24gKCl7XHJcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5jdXJyZW50TGFuZ3VhZ2UgPT09IHRoaXMuc2V0dGluZ3NbJ2RlZmF1bHQtbGFuZ3VhZ2UnXSB8fCB0aGlzLnNldHRpbmdzWyd0cmFuc2xhdGlvbi1sYW5ndWFnZXMnXS5sZW5ndGggPD0gMiApIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyBkb24ndCBkaXNwbGF5IGl0XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDk5OVxyXG4gICAgICAgICAgICAgICAgfWVsc2V7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMub3RoZXJzQnV0dG9uUG9zaXRpb25PZmZzZXRcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgbWV0aG9kczp7XHJcbiAgICAgICAgICAgIGRldGVybWluZUxhbmd1YWdlT3JkZXI6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIGxldCBzZWxmID0gdGhpc1xyXG4gICAgICAgIC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ICAgPSBbXVxyXG4gICAgICAgICAgICAgICAgbGV0IHNlbGYgICAgICAgICAgICAgICAgICAgICAgICA9IHRoaXNcclxuICAgICAgICAgICAgICAgIGxldCBkZWZhdWx0TGFuZ3VhZ2UgICAgICAgICAgICAgPSB0aGlzLnNldHRpbmdzWydkZWZhdWx0LWxhbmd1YWdlJ11cclxuICAgICAgICAgICAgICAgIGxldCB0cmFuc2xhdGVUb0RlZmF1bHQgICAgICAgICAgPSBmYWxzZVxyXG4gICAgICAgICAgICAgICAgdGhpcy5zaG93SW1hZ2VJY29uICAgICAgICAgICAgICA9IGZhbHNlXHJcbiAgICAgICAgICAgICAgICB0aGlzLm90aGVyc0J1dHRvblBvc2l0aW9uT2Zmc2V0ID0gMVxyXG5cclxuICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRJbmRleGVzQXJyYXkuZm9yRWFjaChmdW5jdGlvbiAoc2VsZWN0ZWRJbmRleCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmKCBzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0gJiYgc2VsZi5kaWN0aW9uYXJ5W3NlbGVjdGVkSW5kZXhdLnRyYW5zbGF0aW9uc0FycmF5W2RlZmF1bHRMYW5ndWFnZV0gKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2xhdGVUb0RlZmF1bHQgPSB0cnVlXHJcbiAgICAgICAgICAgICAgICAgICAgaWYoIHNlbGYuZGljdGlvbmFyeVtzZWxlY3RlZEluZGV4XSAmJiBzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0uYXR0cmlidXRlID09PSAnc3JjJyApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuc2hvd0ltYWdlSWNvbiA9IHRydWVcclxuICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKHRyYW5zbGF0ZVRvRGVmYXVsdCkge1xyXG4gICAgICAgICAgICAgICAgICAg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cHJldmlvdXNseUhpZ2hsaWdodGVkID0gdGhpcy5pZnJhbWUuZ2V0RWxlbWVudHNCeUNsYXNzTmFtZSggJ3RycC1jcmVhdGUtdHJhbnNsYXRpb24tYmxvY2snIClcclxuICAgICAgICAgICAgICAgICAgICBpZiggcHJldmlvdXNseUhpZ2hsaWdodGVkLmxlbmd0aCA+IDAgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoIGkgPSAwOyBpIDwgcHJldmlvdXNseUhpZ2hsaWdodGVkLmxlbmd0aDsgaSsrICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJldmlvdXNseUhpZ2hsaWdodGVkW2ldLmNsYXNzTGlzdC5yZW1vdmUoJ3RycC1oaWdobGlnaHQnKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJldmlvdXNseUhpZ2hsaWdodGVkW2ldLmNsYXNzTGlzdC5yZW1vdmUoJ3RycC1jcmVhdGUtdHJhbnNsYXRpb24tYmxvY2snKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuJHBhcmVudC5tZXJnaW5nU3RyaW5nID0gZmFsc2VcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLiRwYXJlbnQubWVyZ2VEYXRhID0gW11cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgYWRkS2V5Ym9hcmRTaG9ydGN1dHNMaXN0ZW5lcigpe1xyXG4gICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcihcImtleWRvd25cIiwgZnVuY3Rpb24oZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIENUUkwgKyBBTFQgKyBaXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCh3aW5kb3cubmF2aWdhdG9yLnBsYXRmb3JtLm1hdGNoKFwiTWFjXCIpID8gZS5tZXRhS2V5IDogZS5jdHJsS2V5KSAmJiBlLmFsdEtleSAmJiBlLmtleUNvZGUgPT09IDkwICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5kaXNwYXRjaEV2ZW50KG5ldyBFdmVudCgndHJwX3RyaWdnZXJfZGlzY2FyZF9hbGxfY2hhbmdlc19ldmVudCcpKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9LCBmYWxzZSk7XHJcblxyXG4gICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoICd0cnBfdHJpZ2dlcl9kaXNjYXJkX2FsbF9jaGFuZ2VzX2V2ZW50JywgdGhpcy5kaXNjYXJkQWxsIClcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuPC9zY3JpcHQ+XHJcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./assets/src/js/components/language-boxes.vue?vue&type=script&lang=js&\n");
718
 
719
  /***/ }),
720
 
@@ -875,7 +875,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
875
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
876
 
877
  "use strict";
878
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _vm.selectedIndexesArray\n ? _c(\n \"div\",\n {\n staticClass: \"trp-controls-section-content\",\n attrs: { id: \"trp-translation-section\" }\n },\n [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.showChangesUnsavedMessage,\n expression: \"showChangesUnsavedMessage\"\n }\n ],\n staticClass: \"trp-changes-unsaved-message\"\n },\n [\n _vm._v(_vm._s(_vm.editorStrings.unsaved_changes) + \" \"),\n _c(\n \"span\",\n {\n staticClass: \"trp-unsaved-changes trp-discard-changes \",\n attrs: { title: _vm.editorStrings.discard_all_title_attr },\n on: { click: _vm.discardAll }\n },\n [_vm._v(_vm._s(_vm.editorStrings.discard_all))]\n ),\n _vm._v(\"?\")\n ]\n ),\n _vm._v(\" \"),\n _vm._l(_vm.languages, function(languageCode, key) {\n return _c(\n \"div\",\n { attrs: { id: \"trp-language-\" + languageCode } },\n [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value:\n (key <= _vm.othersButtonPosition ||\n _vm.showOtherLanguages) &&\n (_vm.selectedIndexesArray &&\n _vm.selectedIndexesArray.length > 0),\n expression:\n \"( (key <= othersButtonPosition) || showOtherLanguages ) && ( selectedIndexesArray && selectedIndexesArray.length > 0 )\"\n }\n ],\n staticClass: \"trp-language-container\"\n },\n [\n _c(\"div\", { staticClass: \"trp-language-name\" }, [\n key == 0\n ? _c(\"span\", [\n _vm._v(_vm._s(_vm.editorStrings.from) + \" \")\n ])\n : _c(\"span\", [\n _vm._v(_vm._s(_vm.editorStrings.to) + \" \")\n ]),\n _vm._v(\n \"\\n \" +\n _vm._s(_vm.completeLanguageNames[languageCode]) +\n \"\\n \"\n ),\n languageCode != \"original\"\n ? _c(\"img\", {\n staticClass: \"trp-language-box-flag-image\",\n attrs: {\n src:\n _vm.flagsPath[languageCode] +\n \"/\" +\n languageCode +\n \".png\",\n width: \"18\",\n height: \"12\",\n alt: languageCode,\n title: _vm.completeLanguageNames[languageCode]\n }\n })\n : _vm._e()\n ]),\n _vm._v(\" \"),\n _c(\n \"table\",\n { staticClass: \"trp-translations-for-language\" },\n [\n _vm.showImageIcon\n ? _c(\n \"td\",\n { staticClass: \"trp-translation-icon-container\" },\n [\n _c(\"span\", {\n staticClass:\n \"trp-translation-icon dashicons dashicons-format-image\"\n })\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"td\",\n { staticClass: \"trp-translations-container\" },\n _vm._l(_vm.selectedIndexesArray, function(\n selectedIndex\n ) {\n return _c(\n \"div\",\n { staticClass: \"trp-string-container\" },\n [\n _vm.dictionary[selectedIndex] &&\n _vm.dictionary[selectedIndex].translationsArray[\n languageCode\n ]\n ? _c(\n \"div\",\n { key: selectedIndex },\n [\n _c(\"translation-input\", {\n attrs: {\n string:\n _vm.dictionary[selectedIndex],\n highlightUnsavedChanges:\n _vm.showChangesUnsavedMessage &&\n _vm.hasUnsavedChanges(\n selectedIndex,\n languageCode\n ),\n editorStrings: _vm.editorStrings\n },\n model: {\n value:\n _vm.dictionary[selectedIndex]\n .translationsArray[languageCode]\n .editedTranslation,\n callback: function($$v) {\n _vm.$set(\n _vm.dictionary[selectedIndex]\n .translationsArray[\n languageCode\n ],\n \"editedTranslation\",\n $$v\n )\n },\n expression:\n \"dictionary[selectedIndex].translationsArray[languageCode].editedTranslation\"\n }\n })\n ],\n 1\n )\n : _vm.dictionary[selectedIndex]\n ? _c(\n \"div\",\n { key: selectedIndex },\n [\n _c(\"translation-input\", {\n attrs: {\n readonly: true,\n string:\n _vm.dictionary[selectedIndex],\n value:\n _vm.dictionary[selectedIndex]\n .original,\n editorStrings: _vm.editorStrings\n }\n })\n ],\n 1\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n staticClass: \"trp-translation-input-footer\",\n attrs: {\n \"data-dictionary-entry\": JSON.stringify(\n _vm.dictionary[selectedIndex]\n )\n }\n },\n [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value:\n _vm.dictionary[selectedIndex]\n .attribute != \"content\" ||\n _vm.dictionary[selectedIndex]\n .attribute != \"\",\n expression:\n \"dictionary[selectedIndex].attribute != 'content' || dictionary[selectedIndex].attribute != ''\"\n }\n ],\n staticClass: \"trp-attribute-name\"\n },\n [\n _vm._v(\n _vm._s(\n _vm.editorStrings[\n _vm.dictionary[selectedIndex]\n .attribute\n ]\n ? _vm.editorStrings[\n _vm.dictionary[selectedIndex]\n .attribute\n ]\n : _vm.editorStrings.text\n )\n )\n ]\n ),\n _vm._v(\" \"),\n _vm.dictionary[selectedIndex] &&\n _vm.dictionary[selectedIndex]\n .translationsArray[languageCode]\n ? _c(\n \"div\",\n {\n staticClass:\n \"trp-discard-changes trp-discard-individual-changes\",\n class: {\n \"trp-unsaved-changes\": _vm.hasUnsavedChanges(\n selectedIndex,\n languageCode\n )\n },\n attrs: {\n title:\n _vm.editorStrings\n .discard_individual_changes_title_attribute\n },\n on: {\n click: function($event) {\n _vm.discardChanges(\n selectedIndex,\n languageCode\n )\n }\n }\n },\n [\n _vm._v(\n _vm._s(_vm.editorStrings.discard)\n )\n ]\n )\n : _vm._e()\n ]\n ),\n _vm._v(\" \"),\n _vm.dictionary[selectedIndex] &&\n _vm.dictionary[selectedIndex].translationsArray[\n languageCode\n ]\n ? _c(\n \"div\",\n {\n key: selectedIndex,\n staticClass:\n \"trp-translation-memory-wrap\"\n },\n [\n _c(\"translation-memory\", {\n attrs: {\n string:\n _vm.dictionary[selectedIndex],\n editorStrings: _vm.editorStrings,\n ajax_url: _vm.ajax_url,\n nonces: _vm.nonces,\n languageCode: languageCode\n }\n })\n ],\n 1\n )\n : _vm._e()\n ]\n )\n }),\n 0\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: key == _vm.othersButtonPosition,\n expression: \"key == othersButtonPosition\"\n }\n ]\n },\n [\n _c(\n \"div\",\n {\n staticClass: \"trp-toggle-languages\",\n class: {\n \"trp-show-other-languages\":\n _vm.showOtherLanguages,\n \"trp-hide-other-languages\": !_vm.showOtherLanguages\n },\n on: {\n click: function($event) {\n _vm.showOtherLanguages = !_vm.showOtherLanguages\n }\n }\n },\n [\n _c(\"span\", [\n _vm._v(\n _vm._s(_vm.showOtherLanguages ? \"⯆\" : \"⯈\") +\n \" \" +\n _vm._s(_vm.editorStrings.other_lang)\n )\n ])\n ]\n )\n ]\n )\n ]\n )\n ]\n )\n })\n ],\n 2\n )\n : _vm._e()\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9hc3NldHMvc3JjL2pzL2NvbXBvbmVudHMvbGFuZ3VhZ2UtYm94ZXMudnVlP2IxNGIiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esa0JBQWtCO0FBQ2xCLFNBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGFBQWE7QUFDYjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSwwQkFBMEIsa0RBQWtEO0FBQzVFLHVCQUF1QjtBQUN2QixpQkFBaUI7QUFDakI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsZUFBZSxTQUFTLHFDQUFxQyxFQUFFO0FBQy9EO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG1CQUFtQjtBQUNuQjtBQUNBLCtCQUErQixtQ0FBbU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ICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgIG5hbWU6IFwic2hvd1wiLFxuICAgICAgICAgICAgICAgICAgcmF3TmFtZTogXCJ2LXNob3dcIixcbiAgICAgICAgICAgICAgICAgIHZhbHVlOiBfdm0uc2hvd0NoYW5nZXNVbnNhdmVkTWVzc2FnZSxcbiAgICAgICAgICAgICAgICAgIGV4cHJlc3Npb246IFwic2hvd0NoYW5nZXNVbnNhdmVkTWVzc2FnZVwiXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJ0cnAtY2hhbmdlcy11bnNhdmVkLW1lc3NhZ2VcIlxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgX3ZtLl92KF92bS5fcyhfdm0uZWRpdG9yU3RyaW5ncy51bnNhdmVkX2NoYW5nZXMpICsgXCIgXCIpLFxuICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICBcInNwYW5cIixcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJ0cnAtdW5zYXZlZC1jaGFuZ2VzIHRycC1kaXNjYXJkLWNoYW5nZXMgXCIsXG4gICAgICAgICAgICAgICAgICBhdHRyczogeyB0aXRsZTogX3ZtLmVkaXRvclN0cmluZ3MuZGlzY2FyZF9hbGxfdGl0bGVfYXR0ciB9LFxuICAgICAgICAgICAgICAgICAgb246IHsgY2xpY2s6IF92bS5kaXNjYXJkQWxsIH1cbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIFtfdm0uX3YoX3ZtLl9zKF92bS5lZGl0b3JTdHJpbmdzLmRpc2NhcmRfYWxsKSldXG4gICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgIF92bS5fdihcIj9cIilcbiAgICAgICAgICAgIF1cbiAgICAgICAgICApLFxuICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgX3ZtLl9sKF92bS5sYW5ndWFnZXMsIGZ1bmN0aW9uKGxhbmd1YWdlQ29kZSwga2V5KSB7XG4gICAgICAgICAgICByZXR1cm4gX2MoXG4gICAgICAgICAgICAgIFwiZGl2XCIsXG4gICAgICAgICAgICAgIHsgYXR0cnM6IHsgaWQ6IFwidHJwLWxhbmd1YWdlLVwiICsgbGFuZ3VhZ2VDb2RlIH0gfSxcbiAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgXCJkaXZcIixcbiAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgZGlyZWN0aXZlczogW1xuICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IFwic2hvd1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgcmF3TmFtZTogXCJ2LXNob3dcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAoa2V5IDw9IF92bS5vdGhlcnNCdXR0b25Qb3NpdGlvbiB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5zaG93T3RoZXJMYW5ndWFnZXMpICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgIChfdm0uc2VsZWN0ZWRJbmRleGVzQXJyYXkgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uc2VsZWN0ZWRJbmRleGVzQXJyYXkubGVuZ3RoID4gMCksXG4gICAgICAgICAgICAgICAgICAgICAgICBleHByZXNzaW9uOlxuICAgICAgICAgICAgICAgICAgICAgICAgICBcIiggKGtleSA8PSBvdGhlcnNCdXR0b25Qb3NpdGlvbikgfHwgc2hvd090aGVyTGFuZ3VhZ2VzICkgJiYgKCBzZWxlY3RlZEluZGV4ZXNBcnJheSAmJiBzZWxlY3RlZEluZGV4ZXNBcnJheS5sZW5ndGggPiAwIClcIlxuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6IFwidHJwLWxhbmd1YWdlLWNvbnRhaW5lclwiXG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICBfYyhcImRpdlwiLCB7IHN0YXRpY0NsYXNzOiBcInRycC1sYW5ndWFnZS1uYW1lXCIgfSwgW1xuICAgICAgICAgICAgICAgICAgICAgIGtleSA9PSAwXG4gICAgICAgICAgICAgICAgICAgICAgICA/IF9jKFwic3BhblwiLCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLl92KF92bS5fcyhfdm0uZWRpdG9yU3RyaW5ncy5mcm9tKSArIFwiIFwiKVxuICAgICAgICAgICAgICAgICAgICAgICAgICBdKVxuICAgICAgICAgICAgICAgICAgICAgICAgOiBfYyhcInNwYW5cIiwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihfdm0uX3MoX3ZtLmVkaXRvclN0cmluZ3MudG8pICsgXCIgXCIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiXFxuICAgICAgICAgICAgICAgIFwiICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLl9zKF92bS5jb21wbGV0ZUxhbmd1YWdlTmFtZXNbbGFuZ3VhZ2VDb2RlXSkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICBcIlxcbiAgICAgICAgICAgICAgICBcIlxuICAgICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICAgICAgbGFuZ3VhZ2VDb2RlICE9IFwib3JpZ2luYWxcIlxuICAgICAgICAgICAgICAgICAgICAgICAgPyBfYyhcImltZ1wiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6IFwidHJwLWxhbmd1YWdlLWJveC1mbGFnLWltYWdlXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNyYzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmZsYWdzUGF0aFtsYW5ndWFnZUNvZGVdICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCIvXCIgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYW5ndWFnZUNvZGUgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIi5wbmdcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiBcIjE4XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IFwiMTJcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsdDogbGFuZ3VhZ2VDb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IF92bS5jb21wbGV0ZUxhbmd1YWdlTmFtZXNbbGFuZ3VhZ2VDb2RlXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgIDogX3ZtLl9lKClcbiAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICAgIFwidGFibGVcIixcbiAgICAgICAgICAgICAgICAgICAgICB7IHN0YXRpY0NsYXNzOiBcInRycC10cmFuc2xhdGlvbnMtZm9yLWxhbmd1YWdlXCIgfSxcbiAgICAgICAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICAgICAgICBfdm0uc2hvd0ltYWdlSWNvblxuICAgICAgICAgICAgICAgICAgICAgICAgICA/IF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJ0ZFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeyBzdGF0aWNDbGFzczogXCJ0cnAtdHJhbnNsYXRpb24taWNvbi1jb250YWluZXJcIiB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfYyhcInNwYW5cIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJ0cnAtdHJhbnNsYXRpb24taWNvbiBkYXNoaWNvbnMgZGFzaGljb25zLWZvcm1hdC1pbWFnZVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICA6IF92bS5fZSgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgICBcInRkXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHsgc3RhdGljQ2xhc3M6IFwidHJwLXRyYW5zbGF0aW9ucy1jb250YWluZXJcIiB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uX2woX3ZtLnNlbGVjdGVkSW5kZXhlc0FycmF5LCBmdW5jdGlvbihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZEluZGV4XG4gICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfYyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiZGl2XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7IHN0YXRpY0NsYXNzOiBcInRycC1zdHJpbmctY29udGFpbmVyXCIgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0gJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0udHJhbnNsYXRpb25zQXJyYXlbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFuZ3VhZ2VDb2RlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcImRpdlwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7IGtleTogc2VsZWN0ZWRJbmRleCB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX2MoXCJ0cmFuc2xhdGlvbi1pbnB1dFwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJpbmc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhpZ2hsaWdodFVuc2F2ZWRDaGFuZ2VzOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5zaG93Q2hhbmdlc1Vuc2F2ZWRNZXNzYWdlICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmhhc1Vuc2F2ZWRDaGFuZ2VzKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWRJbmRleCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhbmd1YWdlQ29kZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVkaXRvclN0cmluZ3M6IF92bS5lZGl0b3JTdHJpbmdzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kZWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC50cmFuc2xhdGlvbnNBcnJheVtsYW5ndWFnZUNvZGVdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZWRpdGVkVHJhbnNsYXRpb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrOiBmdW5jdGlvbigkJHYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uJHNldChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5kaWN0aW9uYXJ5W3NlbGVjdGVkSW5kZXhdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC50cmFuc2xhdGlvbnNBcnJheVtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFuZ3VhZ2VDb2RlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJlZGl0ZWRUcmFuc2xhdGlvblwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCR2XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHByZXNzaW9uOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiZGljdGlvbmFyeVtzZWxlY3RlZEluZGV4XS50cmFuc2xhdGlvbnNBcnJheVtsYW5ndWFnZUNvZGVdLmVkaXRlZFRyYW5zbGF0aW9uXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBfdm0uZGljdGlvbmFyeVtzZWxlY3RlZEluZGV4XVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gX2MoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiZGl2XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsga2V5OiBzZWxlY3RlZEluZGV4IH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfYyhcInRyYW5zbGF0aW9uLWlucHV0XCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlYWRvbmx5OiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJpbmc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5kaWN0aW9uYXJ5W3NlbGVjdGVkSW5kZXhdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAub3JpZ2luYWwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVkaXRvclN0cmluZ3M6IF92bS5lZGl0b3JTdHJpbmdzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogX3ZtLl9lKCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiZGl2XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6IFwidHJwLXRyYW5zbGF0aW9uLWlucHV0LWZvb3RlclwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJkYXRhLWRpY3Rpb25hcnktZW50cnlcIjogSlNPTi5zdHJpbmdpZnkoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiZGl2XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXJlY3RpdmVzOiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IFwic2hvd1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByYXdOYW1lOiBcInYtc2hvd1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uZGljdGlvbmFyeVtzZWxlY3RlZEluZGV4XVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmF0dHJpYnV0ZSAhPSBcImNvbnRlbnRcIiB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5kaWN0aW9uYXJ5W3NlbGVjdGVkSW5kZXhdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuYXR0cmlidXRlICE9IFwiXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4cHJlc3Npb246XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJkaWN0aW9uYXJ5W3NlbGVjdGVkSW5kZXhdLmF0dHJpYnV0ZSAhPSAnY29udGVudCcgfHwgZGljdGlvbmFyeVtzZWxlY3RlZEluZGV4XS5hdHRyaWJ1dGUgIT0gJydcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6IFwidHJwLWF0dHJpYnV0ZS1uYW1lXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5fcyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmVkaXRvclN0cmluZ3NbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5hdHRyaWJ1dGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gX3ZtLmVkaXRvclN0cmluZ3NbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5kaWN0aW9uYXJ5W3NlbGVjdGVkSW5kZXhdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmF0dHJpYnV0ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogX3ZtLmVkaXRvclN0cmluZ3MudGV4dFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uZGljdGlvbmFyeVtzZWxlY3RlZEluZGV4XSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnRyYW5zbGF0aW9uc0FycmF5W2xhbmd1YWdlQ29kZV1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBfYyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiZGl2XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwidHJwLWRpc2NhcmQtY2hhbmdlcyB0cnAtZGlzY2FyZC1pbmRpdmlkdWFsLWNoYW5nZXNcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcInRycC11bnNhdmVkLWNoYW5nZXNcIjogX3ZtLmhhc1Vuc2F2ZWRDaGFuZ2VzKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWRJbmRleCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhbmd1YWdlQ29kZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5lZGl0b3JTdHJpbmdzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5kaXNjYXJkX2luZGl2aWR1YWxfY2hhbmdlc190aXRsZV9hdHRyaWJ1dGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb246IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGljazogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uZGlzY2FyZENoYW5nZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkSW5kZXgsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhbmd1YWdlQ29kZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLl92KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5fcyhfdm0uZWRpdG9yU3RyaW5ncy5kaXNjYXJkKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IF92bS5fZSgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uZGljdGlvbmFyeVtzZWxlY3RlZEluZGV4XSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uZGljdGlvbmFyeVtzZWxlY3RlZEluZGV4XS50cmFuc2xhdGlvbnNBcnJheVtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYW5ndWFnZUNvZGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gX2MoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiZGl2XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IHNlbGVjdGVkSW5kZXgsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcInRycC10cmFuc2xhdGlvbi1tZW1vcnktd3JhcFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfYyhcInRyYW5zbGF0aW9uLW1lbW9yeVwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJpbmc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVkaXRvclN0cmluZ3M6IF92bS5lZGl0b3JTdHJpbmdzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhamF4X3VybDogX3ZtLmFqYXhfdXJsLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub25jZXM6IF92bS5ub25jZXMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhbmd1YWdlQ29kZTogbGFuZ3VhZ2VDb2RlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogX3ZtLl9lKClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICAgICAgICBcImRpdlwiLFxuICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpcmVjdGl2ZXM6IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IFwic2hvd1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJhd05hbWU6IFwidi1zaG93XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IGtleSA9PSBfdm0ub3RoZXJzQnV0dG9uUG9zaXRpb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhwcmVzc2lvbjogXCJrZXkgPT0gb3RoZXJzQnV0dG9uUG9zaXRpb25cIlxuICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXCJkaXZcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcInRycC10b2dnbGUtbGFuZ3VhZ2VzXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwidHJwLXNob3ctb3RoZXItbGFuZ3VhZ2VzXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5zaG93T3RoZXJMYW5ndWFnZXMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcInRycC1oaWRlLW90aGVyLWxhbmd1YWdlc1wiOiAhX3ZtLnNob3dPdGhlckxhbmd1YWdlc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb246IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLnNob3dPdGhlckxhbmd1YWdlcyA9ICFfdm0uc2hvd090aGVyTGFuZ3VhZ2VzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX2MoXCJzcGFuXCIsIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLl9zKF92bS5zaG93T3RoZXJMYW5ndWFnZXMgPyBcIuKvhlwiIDogXCLir4hcIikgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiIFwiICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uX3MoX3ZtLmVkaXRvclN0cmluZ3Mub3RoZXJfbGFuZylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICBdXG4gICAgICAgICAgICApXG4gICAgICAgICAgfSlcbiAgICAgICAgXSxcbiAgICAgICAgMlxuICAgICAgKVxuICAgIDogX3ZtLl9lKClcbn1cbnZhciBzdGF0aWNSZW5kZXJGbnMgPSBbXVxucmVuZGVyLl93aXRoU3RyaXBwZWQgPSB0cnVlXG5cbmV4cG9ydCB7IHJlbmRlciwgc3RhdGljUmVuZGVyRm5zIH0iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./assets/src/js/components/language-boxes.vue?vue&type=template&id=3f80cf10&\n");
879
 
880
  /***/ }),
881
 
714
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
715
 
716
  "use strict";
717
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _translation_input_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./translation-input.vue */ \"./assets/src/js/components/translation-input.vue\");\n/* harmony import */ var _translation_memory_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./translation-memory.vue */ \"./assets/src/js/components/translation-memory.vue\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n props: ['selectedIndexesArray', 'dictionary', 'currentLanguage', 'onScreenLanguage', 'languageNames', 'settings', 'showChangesUnsavedMessage', 'editorStrings', 'flagsPath', 'iframe', 'nonces', 'ajax_url'],\n data: function data() {\n return {\n languages: [],\n completeLanguageNames: Object.assign({\n 'original': 'Original String'\n }, this.languageNames),\n othersButtonPositionOffset: 1,\n showOtherLanguages: false,\n orderedLanguages: [],\n showImageIcon: true\n };\n },\n components: {\n translationInput: _translation_input_vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n translationMemory: _translation_memory_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n },\n mounted: function mounted() {\n this.determineLanguageOrder();\n this.addKeyboardShortcutsListener();\n },\n updated: function updated() {\n // if already active do nothing\n if (document.activeElement.classList.contains('trp-translation-input')) {\n return;\n } // place the cursor in the first textarea or input for translation\n\n\n var translationSection = document.getElementById('trp-translation-section');\n\n if (translationSection) {\n var focusableSelectors = ['textarea:not([readonly])', 'input[type=\"text\"]:not([readonly])'];\n\n for (var i = 0; i < focusableSelectors.length; i++) {\n var focusable = document.getElementById('trp-translation-section').querySelector(focusableSelectors[i]);\n\n if (focusable) {\n focusable.focus();\n break;\n }\n }\n }\n },\n watch: {\n selectedIndexesArray: function selectedIndexesArray() {\n this.updateLanguages();\n },\n onScreenLanguage: function onScreenLanguage() {\n this.determineLanguageOrder();\n this.updateLanguages();\n }\n },\n computed: {\n othersButtonPosition: function othersButtonPosition() {\n if (this.currentLanguage === this.settings['default-language'] || this.settings['translation-languages'].length <= 2) {\n // don't display it\n return 999;\n } else {\n return this.othersButtonPositionOffset;\n }\n }\n },\n methods: {\n determineLanguageOrder: function determineLanguageOrder() {\n var self = this;\n var filteredLanguages = this.settings['translation-languages'].filter(function (language, index, array) {\n // all languages except default and current or on screen language.\n return self.settings['default-language'] !== language && self.onScreenLanguage !== language;\n });\n this.orderedLanguages = [];\n this.orderedLanguages.push(this.settings['default-language']);\n if (this.onScreenLanguage !== '') this.orderedLanguages.push(this.onScreenLanguage);\n this.orderedLanguages = this.orderedLanguages.concat(filteredLanguages);\n },\n updateLanguages: function updateLanguages() {\n this.languages = [];\n var self = this;\n var defaultLanguage = this.settings['default-language'];\n var translateToDefault = false;\n this.showImageIcon = false;\n this.othersButtonPositionOffset = 1;\n this.selectedIndexesArray.forEach(function (selectedIndex) {\n if (self.dictionary[selectedIndex] && self.dictionary[selectedIndex].translationsArray[defaultLanguage]) translateToDefault = true;\n if (self.dictionary[selectedIndex] && self.dictionary[selectedIndex].attribute === 'src') self.showImageIcon = true;\n });\n\n if (translateToDefault) {\n this.languages.push('original');\n this.othersButtonPositionOffset++;\n }\n\n this.languages = this.languages.concat(this.orderedLanguages);\n },\n discardChanges: function discardChanges(selectedIndex, languageCode) {\n this.dictionary[selectedIndex].translationsArray[languageCode].editedTranslation = this.dictionary[selectedIndex].translationsArray[languageCode].translated;\n this.$emit('discarded-changes');\n },\n hasUnsavedChanges: function hasUnsavedChanges(selectedIndex, languageCode) {\n return this.dictionary[selectedIndex].translationsArray[languageCode].translated !== this.dictionary[selectedIndex].translationsArray[languageCode].editedTranslation;\n },\n discardAll: function discardAll() {\n var self = this;\n this.selectedIndexesArray.forEach(function (selectedIndex) {\n self.settings['translation-languages'].forEach(function (languageCode) {\n if (self.dictionary[selectedIndex].translationsArray[languageCode] && self.dictionary[selectedIndex].translationsArray[languageCode].translated !== self.dictionary[selectedIndex].translationsArray[languageCode].editedTranslation) {\n self.discardChanges(selectedIndex, languageCode);\n }\n });\n });\n\n if (this.$parent.mergingString === true) {\n this.$parent.selectedString = null;\n var previouslyHighlighted = this.iframe.getElementsByClassName('trp-create-translation-block');\n\n if (previouslyHighlighted.length > 0) {\n var i;\n\n for (i = 0; i < previouslyHighlighted.length; i++) {\n previouslyHighlighted[i].classList.remove('trp-highlight');\n previouslyHighlighted[i].classList.remove('trp-create-translation-block');\n }\n }\n\n this.$parent.mergingString = false;\n this.$parent.mergeData = [];\n }\n },\n addKeyboardShortcutsListener: function addKeyboardShortcutsListener() {\n document.addEventListener(\"keydown\", function (e) {\n // CTRL + ALT + Z\n if ((window.navigator.platform.match(\"Mac\") ? e.metaKey : e.ctrlKey) && e.altKey && e.keyCode === 90) {\n e.preventDefault();\n window.dispatchEvent(new Event('trp_trigger_discard_all_changes_event'));\n }\n }, false);\n window.addEventListener('trp_trigger_discard_all_changes_event', this.discardAll);\n }\n }\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vYXNzZXRzL3NyYy9qcy9jb21wb25lbnRzL2xhbmd1YWdlLWJveGVzLnZ1ZT80OWJjIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUE0Q0E7QUFDQ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IF0sXHJcbiAgICAgICAgZGF0YSgpe1xyXG4gICAgICAgICAgICByZXR1cm57XHJcbiAgICAgICAgICAgICAgICBsYW5ndWFnZXMgICAgICAgICAgICAgICAgICA6IFtdLFxyXG4gICAgICAgICAgICAgICAgY29tcGxldGVMYW5ndWFnZU5hbWVzICAgICAgOiBPYmplY3QuYXNzaWduKCB7ICdvcmlnaW5hbCc6ICdPcmlnaW5hbCBTdHJpbmcnIH0sIHRoaXMubGFuZ3VhZ2VOYW1lcyApLFxyXG4gICAgICAgICAgICAgICAgb3RoZXJzQnV0dG9uUG9zaXRpb25PZmZzZXQgOiAxLFxyXG4gICAgICAgICAgICAgICAgc2hvd090aGVyTGFuZ3VhZ2VzICAgICAgICAgOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIG9yZGVyZWRMYW5ndWFnZXMgICAgICAgICAgIDogW10sXHJcbiAgICAgICAgICAgICAgICBzaG93SW1hZ2VJY29uICAgICAgICAgICAgICA6IHRydWVcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgY29tcG9uZW50czp7XHJcbiAgICAgICAgICAgIHRyYW5zbGF0aW9uSW5wdXQsXHJcbiAgICAgICAgICAgIHRyYW5zbGF0aW9uTWVtb3J5XHJcbiAgICAgICAgfSxcclxuICAgICAgICBtb3VudGVkKCl7XHJcbiAgICAgICAgICAgIHRoaXMuZGV0ZXJtaW5lTGFuZ3VhZ2VPcmRlcigpXHJcbiAgICAgICAgICAgIHRoaXMuYWRkS2V5Ym9hcmRTaG9ydGN1dHNMaXN0ZW5lcigpXHJcbiAgICAgICAgfSxcclxuICAgICAgICB1cGRhdGVkKCl7XHJcbiAgICAgICAgICAgIC8vIGlmIGFscmVhZHkgYWN0aXZlIGRvIG5vdGhpbmdcclxuICAgICAgICAgICAgaWYgKCBkb2N1bWVudC5hY3RpdmVFbGVtZW50LmNsYXNzTGlzdC5jb250YWlucyggJ3RycC10cmFuc2xhdGlvbi1pbnB1dCcgKSl7XHJcbiAgICAgICAgICAgICAgICByZXR1cm5cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAvLyBwbGFjZSB0aGUgY3Vyc29yIGluIHRoZSBmaXJzdCB0ZXh0YXJlYSBvciBpbnB1dCBmb3IgdHJhbnNsYXRpb25cclxuICAgICAgICAgICAgbGV0IHRyYW5zbGF0aW9uU2VjdGlvbiA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCAndHJwLXRyYW5zbGF0aW9uLXNlY3Rpb24nIClcclxuICAgICAgICAgICAgaWYgKCB0cmFuc2xhdGlvblNlY3Rpb24gKSAge1xyXG4gICAgICAgICAgICAgICAgbGV0IGZvY3VzYWJsZVNlbGVjdG9ycyA9IFsndGV4dGFyZWE6bm90KFtyZWFkb25seV0pJywgJ2lucHV0W3R5cGU9XCJ0ZXh0XCJdOm5vdChbcmVhZG9ubHldKSddXHJcbiAgICAgICAgICAgICAgICBmb3IgKCB2YXIgaSA9IDA7IGk8Zm9jdXNhYmxlU2VsZWN0b3JzLmxlbmd0aDsgaSsrICl7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGZvY3VzYWJsZSA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCAndHJwLXRyYW5zbGF0aW9uLXNlY3Rpb24nICkucXVlcnlTZWxlY3Rvcihmb2N1c2FibGVTZWxlY3RvcnNbaV0pXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCBmb2N1c2FibGUgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvY3VzYWJsZS5mb2N1cygpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgd2F0Y2g6IHtcclxuICAgICAgICAgICAgc2VsZWN0ZWRJbmRleGVzQXJyYXk6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlTGFuZ3VhZ2VzKClcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgb25TY3JlZW5MYW5ndWFnZTogZnVuY3Rpb24oKXtcclxuICAgICAgICAgICAgICAgIHRoaXMuZGV0ZXJtaW5lTGFuZ3VhZ2VPcmRlcigpXHJcbiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZUxhbmd1YWdlcygpXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIGNvbXB1dGVkOntcclxuICAgICAgICAgICAgb3RoZXJzQnV0dG9uUG9zaXRpb246IGZ1bmN0aW9uICgpe1xyXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuY3VycmVudExhbmd1YWdlID09PSB0aGlzLnNldHRpbmdzWydkZWZhdWx0LWxhbmd1YWdlJ10gfHwgdGhpcy5zZXR0aW5nc1sndHJhbnNsYXRpb24tbGFuZ3VhZ2VzJ10ubGVuZ3RoIDw9IDIgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gZG9uJ3QgZGlzcGxheSBpdFxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiA5OTlcclxuICAgICAgICAgICAgICAgIH1lbHNle1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLm90aGVyc0J1dHRvblBvc2l0aW9uT2Zmc2V0XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIG1ldGhvZHM6e1xyXG4gICAgICAgICAgICBkZXRlcm1pbmVMYW5ndWFnZU9yZGVyOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuICAgICAgICAgICAgICAgIGxldCBmaWx0ZXJlZExhbmd1YWdlcyA9IHRoaXMuc2V0dGluZ3NbJ3RyYW5zbGF0aW9uLWxhbmd1YWdlcyddLmZpbHRlcihmdW5jdGlvbihsYW5ndWFnZSwgaW5kZXgsIGFycmF5KXtcclxuICAgICAgICAgICAgICAgICAgICAvLyBhbGwgbGFuZ3VhZ2VzIGV4Y2VwdCBkZWZhdWx0IGFuZCBjdXJyZW50IG9yIG9uIHNjcmVlbiBsYW5ndWFnZS5cclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gKCBzZWxmLnNldHRpbmdzWydkZWZhdWx0LWxhbmd1YWdlJ10gIT09IGxhbmd1YWdlICkgJiYgKCBzZWxmLm9uU2NyZWVuTGFuZ3VhZ2UgIT09IGxhbmd1YWdlIClcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgdGhpcy5vcmRlcmVkTGFuZ3VhZ2VzID0gW11cclxuICAgICAgICAgICAgICAgIHRoaXMub3JkZXJlZExhbmd1YWdlcy5wdXNoKCB0aGlzLnNldHRpbmdzWydkZWZhdWx0LWxhbmd1YWdlJ10gKVxyXG4gICAgICAgICAgICAgICAgaWYgKCB0aGlzLm9uU2NyZWVuTGFuZ3VhZ2UgIT09ICcnIClcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLm9yZGVyZWRMYW5ndWFnZXMucHVzaCggdGhpcy5vblNjcmVlbkxhbmd1YWdlIClcclxuICAgICAgICAgICAgICAgIHRoaXMub3JkZXJlZExhbmd1YWdlcyA9IHRoaXMub3JkZXJlZExhbmd1YWdlcy5jb25jYXQoIGZpbHRlcmVkTGFuZ3VhZ2VzIClcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgdXBkYXRlTGFuZ3VhZ2VzOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmxhbmd1YWdlcyAgICAgICAgICAgICAgICAgID0gW11cclxuICAgICAgICAgICAgICAgIGxldCBzZWxmICAgICAgICAgICAgICAgICAgICAgICAgPSB0aGlzXHJcbiAgICAgICAgICAgICAgICBsZXQgZGVmYXVsdExhbmd1YWdlICAgICAgICAgICAgID0gdGhpcy5z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YoIHByZXZpb3VzbHlIaWdobGlnaHRlZC5sZW5ndGggPiAwICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgaVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKCBpID0gMDsgaSA8IHByZXZpb3VzbHlIaWdobGlnaHRlZC5sZW5ndGg7IGkrKyApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZXZpb3VzbHlIaWdobGlnaHRlZFtpXS5jbGFzc0xpc3QucmVtb3ZlKCd0cnAtaGlnaGxpZ2h0JylcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZXZpb3VzbHlIaWdobGlnaHRlZFtpXS5jbGFzc0xpc3QucmVtb3ZlKCd0cnAtY3JlYXRlLXRyYW5zbGF0aW9uLWJsb2NrJylcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB0aGlzLiRwYXJlbnQubWVyZ2luZ1N0cmluZyA9IGZhbHNlXHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy4kcGFyZW50Lm1lcmdlRGF0YSA9IFtdXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGFkZEtleWJvYXJkU2hvcnRjdXRzTGlzdGVuZXIoKXtcclxuICAgICAgICAgICAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoXCJrZXlkb3duXCIsIGZ1bmN0aW9uKGUpIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyBDVFJMICsgQUxUICsgWlxyXG4gICAgICAgICAgICAgICAgICAgIGlmICgod2luZG93Lm5hdmlnYXRvci5wbGF0Zm9ybS5tYXRjaChcIk1hY1wiKSA/IGUubWV0YUtleSA6IGUuY3RybEtleSkgJiYgZS5hbHRLZXkgJiYgZS5rZXlDb2RlID09PSA5MCApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuZGlzcGF0Y2hFdmVudChuZXcgRXZlbnQoJ3RycF90cmlnZ2VyX2Rpc2NhcmRfYWxsX2NoYW5nZXNfZXZlbnQnKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSwgZmFsc2UpO1xyXG5cclxuICAgICAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCAndHJwX3RyaWdnZXJfZGlzY2FyZF9hbGxfY2hhbmdlc19ldmVudCcsIHRoaXMuZGlzY2FyZEFsbCApXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcbjwvc2NyaXB0PlxyXG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./assets/src/js/components/language-boxes.vue?vue&type=script&lang=js&\n");
718
 
719
  /***/ }),
720
 
875
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
876
 
877
  "use strict";
878
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _vm.selectedIndexesArray\n ? _c(\n \"div\",\n {\n staticClass: \"trp-controls-section-content\",\n attrs: { id: \"trp-translation-section\" }\n },\n [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.showChangesUnsavedMessage,\n expression: \"showChangesUnsavedMessage\"\n }\n ],\n staticClass: \"trp-changes-unsaved-message\"\n },\n [\n _vm._v(_vm._s(_vm.editorStrings.unsaved_changes) + \" \"),\n _c(\n \"span\",\n {\n staticClass: \"trp-unsaved-changes trp-discard-changes \",\n attrs: { title: _vm.editorStrings.discard_all_title_attr },\n on: { click: _vm.discardAll }\n },\n [_vm._v(_vm._s(_vm.editorStrings.discard_all))]\n ),\n _vm._v(\"?\")\n ]\n ),\n _vm._v(\" \"),\n _vm._l(_vm.languages, function(languageCode, key) {\n return _c(\n \"div\",\n { attrs: { id: \"trp-language-\" + languageCode } },\n [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value:\n (key <= _vm.othersButtonPosition ||\n _vm.showOtherLanguages) &&\n (_vm.selectedIndexesArray &&\n _vm.selectedIndexesArray.length > 0),\n expression:\n \"( (key <= othersButtonPosition) || showOtherLanguages ) && ( selectedIndexesArray && selectedIndexesArray.length > 0 )\"\n }\n ],\n staticClass: \"trp-language-container\"\n },\n [\n _c(\"div\", { staticClass: \"trp-language-name\" }, [\n key == 0\n ? _c(\"span\", [\n _vm._v(_vm._s(_vm.editorStrings.from) + \" \")\n ])\n : _c(\"span\", [\n _vm._v(_vm._s(_vm.editorStrings.to) + \" \")\n ]),\n _vm._v(\n \"\\n \" +\n _vm._s(_vm.completeLanguageNames[languageCode]) +\n \"\\n \"\n ),\n languageCode != \"original\"\n ? _c(\"img\", {\n staticClass: \"trp-language-box-flag-image\",\n attrs: {\n src:\n _vm.flagsPath[languageCode] +\n \"/\" +\n languageCode +\n \".png\",\n width: \"18\",\n height: \"12\",\n alt: languageCode,\n title: _vm.completeLanguageNames[languageCode]\n }\n })\n : _vm._e()\n ]),\n _vm._v(\" \"),\n _c(\n \"table\",\n { staticClass: \"trp-translations-for-language\" },\n [\n _vm.showImageIcon\n ? _c(\n \"td\",\n { staticClass: \"trp-translation-icon-container\" },\n [\n _c(\"span\", {\n staticClass:\n \"trp-translation-icon dashicons dashicons-format-image\"\n })\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"td\",\n { staticClass: \"trp-translations-container\" },\n _vm._l(_vm.selectedIndexesArray, function(\n selectedIndex\n ) {\n return _c(\n \"div\",\n { staticClass: \"trp-string-container\" },\n [\n _vm.dictionary[selectedIndex] &&\n _vm.dictionary[selectedIndex].translationsArray[\n languageCode\n ]\n ? _c(\n \"div\",\n { key: selectedIndex },\n [\n _c(\"translation-input\", {\n attrs: {\n string:\n _vm.dictionary[selectedIndex],\n highlightUnsavedChanges:\n _vm.showChangesUnsavedMessage &&\n _vm.hasUnsavedChanges(\n selectedIndex,\n languageCode\n ),\n editorStrings: _vm.editorStrings\n },\n model: {\n value:\n _vm.dictionary[selectedIndex]\n .translationsArray[languageCode]\n .editedTranslation,\n callback: function($$v) {\n _vm.$set(\n _vm.dictionary[selectedIndex]\n .translationsArray[\n languageCode\n ],\n \"editedTranslation\",\n $$v\n )\n },\n expression:\n \"dictionary[selectedIndex].translationsArray[languageCode].editedTranslation\"\n }\n })\n ],\n 1\n )\n : _vm.dictionary[selectedIndex]\n ? _c(\n \"div\",\n { key: selectedIndex },\n [\n _c(\"translation-input\", {\n attrs: {\n readonly: true,\n string:\n _vm.dictionary[selectedIndex],\n value:\n _vm.dictionary[selectedIndex]\n .original,\n editorStrings: _vm.editorStrings\n }\n })\n ],\n 1\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n staticClass: \"trp-translation-input-footer\",\n attrs: {\n \"data-dictionary-entry\": JSON.stringify(\n _vm.dictionary[selectedIndex]\n )\n }\n },\n [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value:\n _vm.dictionary[selectedIndex]\n .attribute != \"content\" ||\n _vm.dictionary[selectedIndex]\n .attribute != \"\",\n expression:\n \"dictionary[selectedIndex].attribute != 'content' || dictionary[selectedIndex].attribute != ''\"\n }\n ],\n staticClass: \"trp-attribute-name\"\n },\n [\n _vm._v(\n _vm._s(\n _vm.editorStrings[\n _vm.dictionary[selectedIndex]\n .attribute\n ]\n ? _vm.editorStrings[\n _vm.dictionary[selectedIndex]\n .attribute\n ]\n : _vm.editorStrings.text\n )\n )\n ]\n ),\n _vm._v(\" \"),\n _vm.dictionary[selectedIndex] &&\n _vm.dictionary[selectedIndex]\n .translationsArray[languageCode]\n ? _c(\n \"div\",\n {\n staticClass:\n \"trp-discard-changes trp-discard-individual-changes\",\n class: {\n \"trp-unsaved-changes\": _vm.hasUnsavedChanges(\n selectedIndex,\n languageCode\n )\n },\n attrs: {\n title:\n _vm.editorStrings\n .discard_individual_changes_title_attribute\n },\n on: {\n click: function($event) {\n _vm.discardChanges(\n selectedIndex,\n languageCode\n )\n }\n }\n },\n [\n _vm._v(\n _vm._s(_vm.editorStrings.discard)\n )\n ]\n )\n : _vm._e()\n ]\n ),\n _vm._v(\" \"),\n _vm.dictionary[selectedIndex] &&\n _vm.dictionary[selectedIndex].translationsArray[\n languageCode\n ]\n ? _c(\n \"div\",\n {\n key: \"trp_tmw_\" + selectedIndex,\n staticClass:\n \"trp-translation-memory-wrap\"\n },\n [\n _c(\"translation-memory\", {\n attrs: {\n string:\n _vm.dictionary[selectedIndex],\n editorStrings: _vm.editorStrings,\n ajax_url: _vm.ajax_url,\n nonces: _vm.nonces,\n languageCode: languageCode\n }\n })\n ],\n 1\n )\n : _vm._e()\n ]\n )\n }),\n 0\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: key == _vm.othersButtonPosition,\n expression: \"key == othersButtonPosition\"\n }\n ]\n },\n [\n _c(\n \"div\",\n {\n staticClass: \"trp-toggle-languages\",\n class: {\n \"trp-show-other-languages\":\n _vm.showOtherLanguages,\n \"trp-hide-other-languages\": !_vm.showOtherLanguages\n },\n on: {\n click: function($event) {\n _vm.showOtherLanguages = !_vm.showOtherLanguages\n }\n }\n },\n [\n _c(\"span\", [\n _vm._v(\n _vm._s(_vm.showOtherLanguages ? \"⯆\" : \"⯈\") +\n \" \" +\n _vm._s(_vm.editorStrings.other_lang)\n )\n ])\n ]\n )\n ]\n )\n ]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gICAgICAgICAgICAgIGV4cHJlc3Npb246IFwic2hvd0NoYW5nZXNVbnNhdmVkTWVzc2FnZVwiXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJ0cnAtY2hhbmdlcy11bnNhdmVkLW1lc3NhZ2VcIlxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgX3ZtLl92KF92bS5fcyhfdm0uZWRpdG9yU3RyaW5ncy51bnNhdmVkX2NoYW5nZXMpICsgXCIgXCIpLFxuICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICBcInNwYW5cIixcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJ0cnAtdW5zYXZlZC1jaGFuZ2VzIHRycC1kaXNjYXJkLWNoYW5nZXMgXCIsXG4gICAgICAgICAgICAgICAgICBhdHRyczogeyB0aXRsZTogX3ZtLmVkaXRvclN0cmluZ3MuZGlzY2FyZF9hbGxfdGl0bGVfYXR0ciB9LFxuICAgICAgICAgICAgICAgICAgb246IHsgY2xpY2s6IF92bS5kaXNjYXJkQWxsIH1cbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIFtfdm0uX3YoX3ZtLl9zKF92bS5lZGl0b3JTdHJpbmdzLmRpc2NhcmRfYWxsKSldXG4gICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgIF92bS5fdihcIj9cIilcbiAgICAgICAgICAgIF1cbiAgICAgICAgICApLFxuICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgX3ZtLl9sKF92bS5sYW5ndWFnZXMsIGZ1bmN0aW9uKGxhbmd1YWdlQ29kZSwga2V5KSB7XG4gICAgICAgICAgICByZXR1cm4gX2MoXG4gICAgICAgICAgICAgIFwiZGl2XCIsXG4gICAgICAgICAgICAgIHsgYXR0cnM6IHsgaWQ6IFwidHJwLWxhbmd1YWdlLVwiICsgbGFuZ3VhZ2VDb2RlIH0gfSxcbiAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgXCJkaXZcIixcbiAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgZGlyZWN0aXZlczogW1xuICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IFwic2hvd1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgcmF3TmFtZTogXCJ2LXNob3dcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAoa2V5IDw9IF92bS5vdGhlcnNCdXR0b25Qb3NpdGlvbiB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5zaG93T3RoZXJMYW5ndWFnZXMpICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgIChfdm0uc2VsZWN0ZWRJbmRleGVzQXJyYXkgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uc2VsZWN0ZWRJbmRleGVzQXJyYXkubGVuZ3RoID4gMCksXG4gICAgICAgICAgICAgICAgICAgICAgICBleHByZXNzaW9uOlxuICAgICAgICAgICAgICAgICAgICAgICAgICBcIiggKGtleSA8PSBvdGhlcnNCdXR0b25Qb3NpdGlvbikgfHwgc2hvd090aGVyTGFuZ3VhZ2VzICkgJiYgKCBzZWxlY3RlZEluZGV4ZXNBcnJheSAmJiBzZWxlY3RlZEluZGV4ZXNBcnJheS5sZW5ndGggPiAwIClcIlxuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6IFwidHJwLWxhbmd1YWdlLWNvbnRhaW5lclwiXG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICBfYyhcImRpdlwiLCB7IHN0YXRpY0NsYXNzOiBcInRycC1sYW5ndWFnZS1uYW1lXCIgfSwgW1xuICAgICAgICAgICAgICAgICAgICAgIGtleSA9PSAwXG4gICAgICAgICAgICAgICAgICAgICAgICA/IF9jKFwic3BhblwiLCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLl92KF92bS5fcyhfdm0uZWRpdG9yU3RyaW5ncy5mcm9tKSArIFwiIFwiKVxuICAgICAgICAgICAgICAgICAgICAgICAgICBdKVxuICAgICAgICAgICAgICAgICAgICAgICAgOiBfYyhcInNwYW5cIiwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihfdm0uX3MoX3ZtLmVkaXRvclN0cmluZ3MudG8pICsgXCIgXCIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiXFxuICAgICAgICAgICAgICAgIFwiICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLl9zKF92bS5jb21wbGV0ZUxhbmd1YWdlTmFtZXNbbGFuZ3VhZ2VDb2RlXSkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICBcIlxcbiAgICAgICAgICAgICAgICBcIlxuICAgICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICAgICAgbGFuZ3VhZ2VDb2RlICE9IFwib3JpZ2luYWxcIlxuICAgICAgICAgICAgICAgICAgICAgICAgPyBfYyhcImltZ1wiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6IFwidHJwLWxhbmd1YWdlLWJveC1mbGFnLWltYWdlXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNyYzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmZsYWdzUGF0aFtsYW5ndWFnZUNvZGVdICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCIvXCIgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYW5ndWFnZUNvZGUgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIi5wbmdcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiBcIjE4XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IFwiMTJcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsdDogbGFuZ3VhZ2VDb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IF92bS5jb21wbGV0ZUxhbmd1YWdlTmFtZXNbbGFuZ3VhZ2VDb2RlXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgIDogX3ZtLl9lKClcbiAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICAgIFwidGFibGVcIixcbiAgICAgICAgICAgICAgICAgICAgICB7IHN0YXRpY0NsYXNzOiBcInRycC10cmFuc2xhdGlvbnMtZm9yLWxhbmd1YWdlXCIgfSxcbiAgICAgICAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICAgICAgICBfdm0uc2hvd0ltYWdlSWNvblxuICAgICAgICAgICAgICAgICAgICAgICAgICA/IF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJ0ZFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeyBzdGF0aWNDbGFzczogXCJ0cnAtdHJhbnNsYXRpb24taWNvbi1jb250YWluZXJcIiB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfYyhcInNwYW5cIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJ0cnAtdHJhbnNsYXRpb24taWNvbiBkYXNoaWNvbnMgZGFzaGljb25zLWZvcm1hdC1pbWFnZVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICA6IF92bS5fZSgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgICBcInRkXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHsgc3RhdGljQ2xhc3M6IFwidHJwLXRyYW5zbGF0aW9ucy1jb250YWluZXJcIiB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uX2woX3ZtLnNlbGVjdGVkSW5kZXhlc0FycmF5LCBmdW5jdGlvbihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZEluZGV4XG4gICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfYyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiZGl2XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7IHN0YXRpY0NsYXNzOiBcInRycC1zdHJpbmctY29udGFpbmVyXCIgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0gJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0udHJhbnNsYXRpb25zQXJyYXlbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFuZ3VhZ2VDb2RlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcImRpdlwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7IGtleTogc2VsZWN0ZWRJbmRleCB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX2MoXCJ0cmFuc2xhdGlvbi1pbnB1dFwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJpbmc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhpZ2hsaWdodFVuc2F2ZWRDaGFuZ2VzOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5zaG93Q2hhbmdlc1Vuc2F2ZWRNZXNzYWdlICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmhhc1Vuc2F2ZWRDaGFuZ2VzKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWRJbmRleCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhbmd1YWdlQ29kZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVkaXRvclN0cmluZ3M6IF92bS5lZGl0b3JTdHJpbmdzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kZWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC50cmFuc2xhdGlvbnNBcnJheVtsYW5ndWFnZUNvZGVdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZWRpdGVkVHJhbnNsYXRpb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrOiBmdW5jdGlvbigkJHYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uJHNldChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5kaWN0aW9uYXJ5W3NlbGVjdGVkSW5kZXhdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC50cmFuc2xhdGlvbnNBcnJheVtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFuZ3VhZ2VDb2RlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJlZGl0ZWRUcmFuc2xhdGlvblwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCR2XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHByZXNzaW9uOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiZGljdGlvbmFyeVtzZWxlY3RlZEluZGV4XS50cmFuc2xhdGlvbnNBcnJheVtsYW5ndWFnZUNvZGVdLmVkaXRlZFRyYW5zbGF0aW9uXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBfdm0uZGljdGlvbmFyeVtzZWxlY3RlZEluZGV4XVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gX2MoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiZGl2XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsga2V5OiBzZWxlY3RlZEluZGV4IH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfYyhcInRyYW5zbGF0aW9uLWlucHV0XCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlYWRvbmx5OiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJpbmc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5kaWN0aW9uYXJ5W3NlbGVjdGVkSW5kZXhdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAub3JpZ2luYWwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVkaXRvclN0cmluZ3M6IF92bS5lZGl0b3JTdHJpbmdzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogX3ZtLl9lKCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiZGl2XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6IFwidHJwLXRyYW5zbGF0aW9uLWlucHV0LWZvb3RlclwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJkYXRhLWRpY3Rpb25hcnktZW50cnlcIjogSlNPTi5zdHJpbmdpZnkoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiZGl2XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXJlY3RpdmVzOiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IFwic2hvd1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByYXdOYW1lOiBcInYtc2hvd1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uZGljdGlvbmFyeVtzZWxlY3RlZEluZGV4XVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmF0dHJpYnV0ZSAhPSBcImNvbnRlbnRcIiB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5kaWN0aW9uYXJ5W3NlbGVjdGVkSW5kZXhdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuYXR0cmlidXRlICE9IFwiXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4cHJlc3Npb246XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJkaWN0aW9uYXJ5W3NlbGVjdGVkSW5kZXhdLmF0dHJpYnV0ZSAhPSAnY29udGVudCcgfHwgZGljdGlvbmFyeVtzZWxlY3RlZEluZGV4XS5hdHRyaWJ1dGUgIT0gJydcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6IFwidHJwLWF0dHJpYnV0ZS1uYW1lXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5fcyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmVkaXRvclN0cmluZ3NbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5hdHRyaWJ1dGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gX3ZtLmVkaXRvclN0cmluZ3NbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5kaWN0aW9uYXJ5W3NlbGVjdGVkSW5kZXhdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmF0dHJpYnV0ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogX3ZtLmVkaXRvclN0cmluZ3MudGV4dFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uZGljdGlvbmFyeVtzZWxlY3RlZEluZGV4XSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnRyYW5zbGF0aW9uc0FycmF5W2xhbmd1YWdlQ29kZV1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBfYyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiZGl2XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwidHJwLWRpc2NhcmQtY2hhbmdlcyB0cnAtZGlzY2FyZC1pbmRpdmlkdWFsLWNoYW5nZXNcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcInRycC11bnNhdmVkLWNoYW5nZXNcIjogX3ZtLmhhc1Vuc2F2ZWRDaGFuZ2VzKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWRJbmRleCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhbmd1YWdlQ29kZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5lZGl0b3JTdHJpbmdzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5kaXNjYXJkX2luZGl2aWR1YWxfY2hhbmdlc190aXRsZV9hdHRyaWJ1dGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb246IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGljazogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uZGlzY2FyZENoYW5nZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkSW5kZXgsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhbmd1YWdlQ29kZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLl92KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5fcyhfdm0uZWRpdG9yU3RyaW5ncy5kaXNjYXJkKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IF92bS5fZSgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uZGljdGlvbmFyeVtzZWxlY3RlZEluZGV4XSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uZGljdGlvbmFyeVtzZWxlY3RlZEluZGV4XS50cmFuc2xhdGlvbnNBcnJheVtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYW5ndWFnZUNvZGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gX2MoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiZGl2XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IFwidHJwX3Rtd19cIiArIHNlbGVjdGVkSW5kZXgsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcInRycC10cmFuc2xhdGlvbi1tZW1vcnktd3JhcFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfYyhcInRyYW5zbGF0aW9uLW1lbW9yeVwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJpbmc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVkaXRvclN0cmluZ3M6IF92bS5lZGl0b3JTdHJpbmdzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhamF4X3VybDogX3ZtLmFqYXhfdXJsLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub25jZXM6IF92bS5ub25jZXMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhbmd1YWdlQ29kZTogbGFuZ3VhZ2VDb2RlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogX3ZtLl9lKClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICAgICAgICBcImRpdlwiLFxuICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpcmVjdGl2ZXM6IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IFwic2hvd1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJhd05hbWU6IFwidi1zaG93XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IGtleSA9PSBfdm0ub3RoZXJzQnV0dG9uUG9zaXRpb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhwcmVzc2lvbjogXCJrZXkgPT0gb3RoZXJzQnV0dG9uUG9zaXRpb25cIlxuICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXCJkaXZcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcInRycC10b2dnbGUtbGFuZ3VhZ2VzXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwidHJwLXNob3ctb3RoZXItbGFuZ3VhZ2VzXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5zaG93T3RoZXJMYW5ndWFnZXMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcInRycC1oaWRlLW90aGVyLWxhbmd1YWdlc1wiOiAhX3ZtLnNob3dPdGhlckxhbmd1YWdlc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb246IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLnNob3dPdGhlckxhbmd1YWdlcyA9ICFfdm0uc2hvd090aGVyTGFuZ3VhZ2VzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX2MoXCJzcGFuXCIsIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLl9zKF92bS5zaG93T3RoZXJMYW5ndWFnZXMgPyBcIuKvhlwiIDogXCLir4hcIikgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiIFwiICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uX3MoX3ZtLmVkaXRvclN0cmluZ3Mub3RoZXJfbGFuZylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICBdXG4gICAgICAgICAgICApXG4gICAgICAgICAgfSlcbiAgICAgICAgXSxcbiAgICAgICAgMlxuICAgICAgKVxuICAgIDogX3ZtLl9lKClcbn1cbnZhciBzdGF0aWNSZW5kZXJGbnMgPSBbXVxucmVuZGVyLl93aXRoU3RyaXBwZWQgPSB0cnVlXG5cbmV4cG9ydCB7IHJlbmRlciwgc3RhdGljUmVuZGVyRm5zIH0iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./assets/src/js/components/language-boxes.vue?vue&type=template&id=3f80cf10&\n");
879
 
880
  /***/ }),
881
 
assets/js/trp-translate-dom-changes.js CHANGED
@@ -18,6 +18,8 @@ function TRP_Translator(){
18
  var language_to_query;
19
  var except_characters = " \t\n\r  �.,/`~!@#$€£%^&*():;-_=+[]{}\\|?/<>1234567890'";
20
  var trim_characters = " \t\n\r  �\x0A\x0B" + "\302" + "\240";
 
 
21
 
22
  /**
23
  * Ajax request to get translations for strings
@@ -122,6 +124,7 @@ function TRP_Translator(){
122
  }
123
  }
124
 
 
125
  if ( ! translation_found ){
126
  if ( nodeInfo.attribute ){
127
  if ( nodeInfo.attribute != 'src' ) {
@@ -138,6 +141,7 @@ function TRP_Translator(){
138
  window.parent.dispatchEvent( new Event( 'trp_iframe_page_updated' ) );
139
  window.dispatchEvent( new Event( 'trp_iframe_page_updated' ) );
140
  }
 
141
  }else{
142
  for (var j = 0 ; j < nodesInfo.length; j++){
143
  if ( nodesInfo[j].attribute ){
@@ -147,7 +151,7 @@ function TRP_Translator(){
147
  }else {
148
  nodesInfo[j].node.textContent = nodesInfo[j].original;
149
  }
150
-
151
  }
152
  }
153
  _this.resume_observer();
@@ -227,6 +231,13 @@ function TRP_Translator(){
227
  return false;
228
  };
229
 
 
 
 
 
 
 
 
230
  this.skip_string_attribute = function(node, attribute){
231
  // skip nodes containing these attributes
232
  var selectors = trp_data.trp_base_selectors;
@@ -241,7 +252,7 @@ function TRP_Translator(){
241
  this.in_array = function (needle, array ) {
242
  var i
243
  var length = array.length
244
- for( i = 0; i < length; i++ ){
245
  if ( array[i] === needle ){
246
  return true
247
  }
@@ -259,12 +270,14 @@ function TRP_Translator(){
259
  // a text without HTML was added
260
  if ( _this.trim( direct_string.textContent, except_characters ) != '' ) {
261
  var extracted_original = _this.trim(direct_string.textContent, trim_characters);
262
- nodesInfo.push({ node: node, original: extracted_original, attribute: '' });
263
- string_originals.push(extracted_original)
 
264
 
265
- direct_string.textContent = '';
266
- if ( _this.is_editor ) {
267
- jQuery(node).wrap('<translate-press></translate-press>');
 
268
  }
269
  }
270
  }else{
@@ -282,10 +295,12 @@ function TRP_Translator(){
282
  var all_strings_length = all_strings.length;
283
  for (var j = 0; j < all_strings_length; j++ ) {
284
  if ( _this.trim( all_strings[j].textContent, except_characters ) != '' ) {
285
- nodesInfo.push({node: all_strings[j], original: all_strings[j].textContent, attribute: '' });
286
- string_originals.push( all_strings[j].textContent )
287
- if ( trp_data ['showdynamiccontentbeforetranslation'] == false ) {
288
- all_strings[j].textContent = '';
 
 
289
  }
290
  }
291
  }
@@ -312,6 +327,9 @@ function TRP_Translator(){
312
  }
313
 
314
  var attribute_content = all_nodes[j].getAttribute( attribute_selector_item.accessor )
 
 
 
315
  if ( attribute_content && _this.trim( attribute_content.trim(), except_characters ) != '' ) {
316
  nodesInfo.push({node: all_nodes[j], original: attribute_content, attribute: attribute_selector_item.accessor });
317
  string_originals.push( attribute_content )
18
  var language_to_query;
19
  var except_characters = " \t\n\r  �.,/`~!@#$€£%^&*():;-_=+[]{}\\|?/<>1234567890'";
20
  var trim_characters = " \t\n\r  �\x0A\x0B" + "\302" + "\240";
21
+ var already_detected = [];
22
+ var duplicate_detections_allowed = parseInt( trp_data.duplicate_detections_allowed )
23
 
24
  /**
25
  * Ajax request to get translations for strings
124
  }
125
  }
126
 
127
+ already_detected[ initial_value ] = (initial_value in already_detected ) ? already_detected[ initial_value ] + 1 : 0
128
  if ( ! translation_found ){
129
  if ( nodeInfo.attribute ){
130
  if ( nodeInfo.attribute != 'src' ) {
141
  window.parent.dispatchEvent( new Event( 'trp_iframe_page_updated' ) );
142
  window.dispatchEvent( new Event( 'trp_iframe_page_updated' ) );
143
  }
144
+
145
  }else{
146
  for (var j = 0 ; j < nodesInfo.length; j++){
147
  if ( nodesInfo[j].attribute ){
151
  }else {
152
  nodesInfo[j].node.textContent = nodesInfo[j].original;
153
  }
154
+ already_detected[ nodesInfo[j].original ] = (nodesInfo[j].original in already_detected ) ? already_detected[ nodesInfo[j].original ] + 1 : 0
155
  }
156
  }
157
  _this.resume_observer();
231
  return false;
232
  };
233
 
234
+ /*
235
+ * Skip string based on original string text
236
+ */
237
+ this.skip_string_original = function ( string ){
238
+ return ( ( already_detected[string] > duplicate_detections_allowed ) || _this.in_array( string, trp_data.skip_strings_from_dynamic_translation ) )
239
+ }
240
+
241
  this.skip_string_attribute = function(node, attribute){
242
  // skip nodes containing these attributes
243
  var selectors = trp_data.trp_base_selectors;
252
  this.in_array = function (needle, array ) {
253
  var i
254
  var length = array.length
255
+ for( i = length - 1; i >= 0; i-- ){
256
  if ( array[i] === needle ){
257
  return true
258
  }
270
  // a text without HTML was added
271
  if ( _this.trim( direct_string.textContent, except_characters ) != '' ) {
272
  var extracted_original = _this.trim(direct_string.textContent, trim_characters);
273
+ if ( ! _this.skip_string_original( extracted_original )) {
274
+ nodesInfo.push({node: node, original: extracted_original, attribute: ''});
275
+ string_originals.push(extracted_original)
276
 
277
+ direct_string.textContent = '';
278
+ if (_this.is_editor) {
279
+ jQuery(node).wrap('<translate-press></translate-press>');
280
+ }
281
  }
282
  }
283
  }else{
295
  var all_strings_length = all_strings.length;
296
  for (var j = 0; j < all_strings_length; j++ ) {
297
  if ( _this.trim( all_strings[j].textContent, except_characters ) != '' ) {
298
+ if ( ! _this.skip_string_original( all_strings[j].textContent )) {
299
+ nodesInfo.push({node: all_strings[j], original: all_strings[j].textContent, attribute: ''});
300
+ string_originals.push(all_strings[j].textContent)
301
+ if (trp_data ['showdynamiccontentbeforetranslation'] == false) {
302
+ all_strings[j].textContent = '';
303
+ }
304
  }
305
  }
306
  }
327
  }
328
 
329
  var attribute_content = all_nodes[j].getAttribute( attribute_selector_item.accessor )
330
+ if ( _this.skip_string_original( attribute_content )){
331
+ continue;
332
+ }
333
  if ( attribute_content && _this.trim( attribute_content.trim(), except_characters ) != '' ) {
334
  nodesInfo.push({node: all_nodes[j], original: attribute_content, attribute: attribute_selector_item.accessor });
335
  string_originals.push( attribute_content )
class-translate-press.php CHANGED
@@ -49,7 +49,7 @@ class TRP_Translate_Press{
49
  define( 'TRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
50
  define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) );
51
  define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' );
52
- define( 'TRP_PLUGIN_VERSION', '1.5.5' );
53
 
54
  wp_cache_add_non_persistent_groups(array('trp'));
55
 
@@ -232,12 +232,7 @@ class TRP_Translate_Press{
232
  $this->loader->add_filter( "trp_before_translate_content", $this->translation_render, 'handle_cdata', 1000 );
233
  $this->loader->add_action( "trp_set_translation_for_attribute", $this->translation_render, 'translate_image_srcset_attributes', 10, 3 );
234
  $this->loader->add_action( "trp_allow_machine_translation_for_string", $this->translation_render, 'allow_machine_translation_for_string', 10, 4 );
235
-
236
- /* apply translation filters for REST API response */
237
- $post_types = get_post_types();
238
- foreach ( $post_types as $post_type ) {
239
- $this->loader->add_filter( 'rest_prepare_'.$post_type, $this->translation_render, 'handle_rest_api_translations' );
240
- }
241
 
242
 
243
 
@@ -288,7 +283,7 @@ class TRP_Translate_Press{
288
  $this->loader->add_filter( 'trp_languages', $this->languages, 'reorder_languages', 10, 2 );
289
 
290
  /* set up wp_mail hooks */
291
- $this->loader->add_filter( 'wp_mail', $this->translation_render, 'wp_mail_filter', 200 );
292
 
293
  /* hide php ors and notice when we are storing strings in db */
294
  $this->loader->add_action( 'init', $this->translation_render, 'trp_debug_mode_off', 0 );
49
  define( 'TRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
50
  define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) );
51
  define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' );
52
+ define( 'TRP_PLUGIN_VERSION', '1.5.6' );
53
 
54
  wp_cache_add_non_persistent_groups(array('trp'));
55
 
232
  $this->loader->add_filter( "trp_before_translate_content", $this->translation_render, 'handle_cdata', 1000 );
233
  $this->loader->add_action( "trp_set_translation_for_attribute", $this->translation_render, 'translate_image_srcset_attributes', 10, 3 );
234
  $this->loader->add_action( "trp_allow_machine_translation_for_string", $this->translation_render, 'allow_machine_translation_for_string', 10, 4 );
235
+ $this->loader->add_action( "init", $this->translation_render, 'add_callbacks_for_translating_rest_api', 10, 4 );
 
 
 
 
 
236
 
237
 
238
 
283
  $this->loader->add_filter( 'trp_languages', $this->languages, 'reorder_languages', 10, 2 );
284
 
285
  /* set up wp_mail hooks */
286
+ $this->loader->add_filter( 'wp_mail', $this->translation_render, 'wp_mail_filter', 1 );
287
 
288
  /* hide php ors and notice when we are storing strings in db */
289
  $this->loader->add_action( 'init', $this->translation_render, 'trp_debug_mode_off', 0 );
includes/advanced-settings/{skip-dynamic-selectors.php → exclude-dynamic-selectors.php} RENAMED
File without changes
includes/advanced-settings/exclude-gettext-strings.php CHANGED
@@ -10,7 +10,7 @@ function trp_register_exclude_gettext_strings( $settings_array ){
10
  'domain' => __('Domain', 'translatepress-multilingual')
11
  ),
12
  'label' => esc_html__( 'Exclude Gettext Strings', 'translatepress-multilingual' ),
13
- 'description' => wp_kses( __( 'Exclude these strings from being translated as Gettext strings. <br/>Can still be translated as regular strings.', 'translatepress-multilingual' ), array( 'br' => array() ) ),
14
  );
15
  return $settings_array;
16
  }
@@ -18,16 +18,33 @@ function trp_register_exclude_gettext_strings( $settings_array ){
18
  /**
19
  * Exclude gettext from being translated
20
  */
21
- add_filter('gettext', 'trpc_exclude_strings', 1000, 3 );
22
- function trpc_exclude_strings ($translation, $text, $domain ){
23
  $option = get_option( 'trp_advanced_settings', true );
 
 
 
 
 
 
 
 
 
24
  if ( isset( $option['exclude_gettext_strings'] ) ) {
25
 
26
- foreach( $option['exclude_gettext_strings']['domain'] as $key => $value ){
27
- if ( $domain === $value && $text === $option['exclude_gettext_strings']['string'][$key] ){
28
- return $text;
 
 
 
 
 
 
29
  }
 
30
  }
31
  }
32
- return $translation;
33
- }
 
10
  'domain' => __('Domain', 'translatepress-multilingual')
11
  ),
12
  'label' => esc_html__( 'Exclude Gettext Strings', 'translatepress-multilingual' ),
13
+ 'description' => wp_kses( __( 'Exclude these strings from being translated as Gettext strings by TranslatePress. Leave the domain empty to take into account any Gettext string.<br/>Can still be translated through po/mo files.', 'translatepress-multilingual' ), array( 'br' => array() ) ),
14
  );
15
  return $settings_array;
16
  }
18
  /**
19
  * Exclude gettext from being translated
20
  */
21
+ add_action( 'init', 'trp_load_exclude_strings' );
22
+ function trp_load_exclude_strings(){
23
  $option = get_option( 'trp_advanced_settings', true );
24
+
25
+ if( isset( $option['exclude_gettext_strings'] ) && count( $option['exclude_gettext_strings']['string'] ) > 0 )
26
+ add_filter('trp_skip_gettext_processing', 'trp_exclude_strings', 1000, 4 );
27
+
28
+ }
29
+
30
+ function trp_exclude_strings ( $return, $translation, $text, $domain ){
31
+ $option = get_option( 'trp_advanced_settings', true );
32
+
33
  if ( isset( $option['exclude_gettext_strings'] ) ) {
34
 
35
+ foreach( $option['exclude_gettext_strings']['string'] as $key => $string ){
36
+
37
+ if( $text === $string ){
38
+
39
+ if( empty( $option['exclude_gettext_strings']['domain'][$key] ) )
40
+ return true;
41
+ else if( $domain === $option['exclude_gettext_strings']['domain'][$key] )
42
+ return true;
43
+
44
  }
45
+
46
  }
47
  }
48
+
49
+ return $return;
50
+ }
includes/advanced-settings/exclude-selectors.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ add_filter( 'trp_register_advanced_settings', 'trp_register_exclude_selectors', 110 );
4
+ function trp_register_exclude_selectors( $settings_array ){
5
+ $settings_array[] = array(
6
+ 'name' => 'exclude_translate_selectors',
7
+ 'type' => 'list',
8
+ 'columns' => array(
9
+ 'selector' => __('Selector', 'translatepress-multilingual' ),
10
+ ),
11
+ 'label' => esc_html__( 'Exclude selectors from translation', 'translatepress-multilingual' ),
12
+ 'description' => wp_kses( __( 'Do not translate strings that are found in html nodes matching these selectors.<br>Excludes all the children of HTML nodes matching these selectors from being translated.', 'translatepress-multilingual' ), array( 'br' => array() ) ),
13
+ );
14
+ return $settings_array;
15
+ }
16
+
17
+
18
+ add_filter( 'trp_no_translate_selectors', 'trp_skip_translation_for_selectors' );
19
+ function trp_skip_translation_for_selectors( $skip_selectors ){
20
+ $option = get_option( 'trp_advanced_settings', true );
21
+ $add_skip_selectors = array( );
22
+ if ( isset( $option['exclude_translate_selectors'] ) && is_array( $option['exclude_translate_selectors']['selector'] ) ) {
23
+ $add_skip_selectors = $option['exclude_translate_selectors']['selector'];
24
+ }
25
+
26
+ return array_merge( $skip_selectors, $add_skip_selectors );
27
+ }
28
+
includes/advanced-settings/show-dynamic-content-before-translation.php CHANGED
@@ -5,8 +5,8 @@ function trp_register_show_dynamic_content_before_translation( $settings_array )
5
  $settings_array[] = array(
6
  'name' => 'show_dynamic_content_before_translation',
7
  'type' => 'checkbox',
8
- 'label' => esc_html__( 'Show dynamic content before translation', 'translatepress-multilingual' ),
9
- 'description' => wp_kses( __( 'Shows dynamically inserted content in original language for a moment before the translation request is finished. <br> May help fix missing content inserted using JavaScript.', 'translatepress-multilingual' ), array( 'br' => array()) ),
10
  );
11
  return $settings_array;
12
  }
5
  $settings_array[] = array(
6
  'name' => 'show_dynamic_content_before_translation',
7
  'type' => 'checkbox',
8
+ 'label' => esc_html__( 'Fix missing dynamic content', 'translatepress-multilingual' ),
9
+ 'description' => wp_kses( __( 'May help fix missing content inserted using JavaScript. <br> It shows dynamically inserted content in original language for a moment before the translation request is finished.', 'translatepress-multilingual' ), array( 'br' => array()) ),
10
  );
11
  return $settings_array;
12
  }
includes/class-language-switcher.php CHANGED
@@ -218,6 +218,10 @@ class TRP_Language_Switcher{
218
  $floater_flags_class = 'trp-with-flags';
219
  }
220
 
 
 
 
 
221
  $current_language = array();
222
  $other_languages = array();
223
 
218
  $floater_flags_class = 'trp-with-flags';
219
  }
220
 
221
+ if( $this->settings['floater-position'] ) {
222
+ $floater_class .= ' trp-' . esc_attr($this->settings['floater-position']);
223
+ }
224
+
225
  $current_language = array();
226
  $other_languages = array();
227
 
includes/class-query.php CHANGED
@@ -75,6 +75,10 @@ class TRP_Query{
75
  $query .= "( " . implode ( ", ", $placeholders ) . " )";
76
  $prepared_query = $this->db->prepare( $query, $values );
77
  $dictionary = $this->db->get_results( $prepared_query, OBJECT_K );
 
 
 
 
78
  return apply_filters( 'trp_get_existing_translations', $dictionary, $prepared_query, $strings_array );
79
  }
80
 
75
  $query .= "( " . implode ( ", ", $placeholders ) . " )";
76
  $prepared_query = $this->db->prepare( $query, $values );
77
  $dictionary = $this->db->get_results( $prepared_query, OBJECT_K );
78
+
79
+ if ($this->db->last_error !== '')
80
+ $dictionary = false;
81
+
82
  return apply_filters( 'trp_get_existing_translations', $dictionary, $prepared_query, $strings_array );
83
  }
84
 
includes/class-settings.php CHANGED
@@ -50,6 +50,31 @@ class TRP_Settings{
50
  echo $output;
51
  }
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  /**
54
  * Returns settings_option.
55
  *
@@ -178,17 +203,21 @@ class TRP_Settings{
178
  $settings['trp-ls-floater'] = 'no';
179
  }
180
 
181
- $available_options = $this->get_language_switcher_options();
182
- if ( ! isset( $available_options[ $settings['shortcode-options'] ] ) ){
183
  $settings['shortcode-options'] = 'flags-full-names';
184
  }
185
- if ( ! isset( $available_options[ $settings['menu-options'] ] ) ){
186
  $settings['menu-options'] = 'flags-full-names';
187
  }
188
- if ( ! isset( $available_options[ $settings['floater-options'] ] ) ){
189
  $settings['floater-options'] = 'flags-full-names';
190
  }
191
 
 
 
 
 
192
  if ( ! isset( $settings['url-slugs'] ) ){
193
  $settings['url-slugs'] = $this->trp_languages->get_iso_codes( $settings['translation-languages'] );
194
  }
@@ -266,6 +295,7 @@ class TRP_Settings{
266
  'shortcode-options' => 'flags-full-names',
267
  'menu-options' => 'flags-full-names',
268
  'floater-options' => 'flags-full-names',
 
269
  'url-slugs' => array( 'en_US' => 'en', '' ),
270
  'advanced_settings' => array(get_option('trp_advanced_settings', array() )),
271
  );
50
  echo $output;
51
  }
52
 
53
+ /**
54
+ * Echo html for selecting language from all available language in settings.
55
+ *
56
+ * @param string $ls_type shortcode_options | menu_options | floater_options
57
+ * @param string $ls_setting The selected language switcher customization setting (get_language_switcher_options())
58
+ */
59
+ public function output_language_switcher_floater_possition( $ls_position ){
60
+ $ls_options = array(
61
+ 'bottom-right' => array( 'label' => __( 'Bottom Right', 'translatepress-multilingual' ) ),
62
+ 'bottom-left' => array( 'label' => __( 'Bottom Left', 'translatepress-multilingual' ) ),
63
+ 'top-right' => array( 'label' => __( 'Top Right', 'translatepress-multilingual' ) ),
64
+ 'top-left' => array( 'label' => __( 'Top Left', 'translatepress-multilingual' ) ),
65
+
66
+ );
67
+
68
+ $output = '<select id="floater-position" name="trp_settings[floater-position]" class="trp-select trp-ls-select-option">';
69
+ foreach( $ls_options as $key => $ls_option ){
70
+ $selected = ( $ls_position == $key ) ? 'selected' : '';
71
+ $output .= '<option value="' . esc_attr( $key ) . '" ' . esc_attr( $selected ) . ' >' . esc_html( $ls_option['label'] ). '</option>';
72
+ }
73
+ $output .= '</select>';
74
+
75
+ echo $output;
76
+ }
77
+
78
  /**
79
  * Returns settings_option.
80
  *
203
  $settings['trp-ls-floater'] = 'no';
204
  }
205
 
206
+ $language_switcher_options = $this->get_language_switcher_options();
207
+ if ( ! isset( $language_switcher_options[ $settings['shortcode-options'] ] ) ){
208
  $settings['shortcode-options'] = 'flags-full-names';
209
  }
210
+ if ( ! isset( $language_switcher_options[ $settings['menu-options'] ] ) ){
211
  $settings['menu-options'] = 'flags-full-names';
212
  }
213
+ if ( ! isset( $language_switcher_options[ $settings['floater-options'] ] ) ){
214
  $settings['floater-options'] = 'flags-full-names';
215
  }
216
 
217
+ if ( ! isset( $settings['floater-position'] ) ){
218
+ $settings['floater-position'] = 'bottom-right';
219
+ }
220
+
221
  if ( ! isset( $settings['url-slugs'] ) ){
222
  $settings['url-slugs'] = $this->trp_languages->get_iso_codes( $settings['translation-languages'] );
223
  }
295
  'shortcode-options' => 'flags-full-names',
296
  'menu-options' => 'flags-full-names',
297
  'floater-options' => 'flags-full-names',
298
+ 'floater-position' => 'bottom-right',
299
  'url-slugs' => array( 'en_US' => 'en', '' ),
300
  'advanced_settings' => array(get_option('trp_advanced_settings', array() )),
301
  );
includes/class-translation-manager.php CHANGED
@@ -508,6 +508,9 @@ class TRP_Translation_Manager{
508
  if( isset( $_REQUEST['action'] ) && strpos($_REQUEST['action'], 'trp_') === 0 )
509
  return $translation;
510
 
 
 
 
511
  //use a global for is_ajax_on_frontend() so we don't execute it multiple times
512
  global $tp_gettext_is_ajax_on_frontend;
513
  if( !isset($tp_gettext_is_ajax_on_frontend) )
508
  if( isset( $_REQUEST['action'] ) && strpos($_REQUEST['action'], 'trp_') === 0 )
509
  return $translation;
510
 
511
+ if( apply_filters( 'trp_skip_gettext_processing', false, $translation, $text, $domain ) )
512
+ return $translation;
513
+
514
  //use a global for is_ajax_on_frontend() so we don't execute it multiple times
515
  global $tp_gettext_is_ajax_on_frontend;
516
  if( !isset($tp_gettext_is_ajax_on_frontend) )
includes/class-translation-render.php CHANGED
@@ -264,12 +264,30 @@ class TRP_Translation_Render{
264
  * @return mixed
265
  */
266
  public function handle_rest_api_translations($response){
267
- $response->data['title']['rendered'] = $this->translate_page( $response->data['title']['rendered'] );
268
- $response->data['excerpt']['rendered'] = $this->translate_page( $response->data['excerpt']['rendered'] );
269
- $response->data['content']['rendered'] = $this->translate_page( $response->data['content']['rendered'] );
 
 
 
 
 
 
 
 
270
  return $response;
271
  }
272
 
 
 
 
 
 
 
 
 
 
 
273
  /**
274
  * Finding translateable strings and replacing with translations.
275
  *
@@ -302,7 +320,9 @@ class TRP_Translation_Render{
302
 
303
  /* make sure we only translate on the rest_prepare_$post_type filter in REST requests and not the whole json */
304
  if( strpos( $this->url_converter->cur_page_url(), get_rest_url() ) !== false && strpos( current_filter(), 'rest_prepare_' ) !== 0){
305
- return $output;
 
 
306
  }
307
 
308
  global $TRP_LANGUAGE;
@@ -495,7 +515,14 @@ class TRP_Translation_Render{
495
  }
496
  foreach ($node_from_value->find('trp-gettext') as $nfv_row) {
497
  $nfv_row->outertext = $nfv_row->innertext();
498
- $row->setAttribute($attr_name, esc_attr( $node_from_value->save() ) );
 
 
 
 
 
 
 
499
  $row->setAttribute($no_translate_attribute . '-' . $attr_name, '');
500
  // we are in the editor
501
  if (isset($_REQUEST['trp-edit-translation']) && $_REQUEST['trp-edit-translation'] == 'preview') {
@@ -771,23 +798,27 @@ class TRP_Translation_Render{
771
  */
772
  public function translate_image_srcset_attributes( $node, $accessor, $translated_string){
773
  if( $accessor === 'src' ) {
774
- if ( $node->getAttribute( 'srcset' ) ) {
 
 
775
  $attachment_id = attachment_url_to_postid( $translated_string );
776
  if ( $attachment_id ) {
777
- $translated_srcset = null;
778
  if ( function_exists( 'wp_get_attachment_image_srcset' ) ) {
779
  // get width of the image in order, to set the largest possible size for srcset
780
  $meta_data = wp_get_attachment_metadata( $attachment_id );
781
  $width = ( $meta_data && isset( $meta_data['width'] ) ) ? $meta_data['width'] : 'large';
782
  $translated_srcset = wp_get_attachment_image_srcset( $attachment_id, $width );
783
  }
784
- if ( $translated_srcset ) {
785
  $node->setAttribute( 'srcset', $translated_srcset );
786
- } else {
787
- $node->setAttribute( 'srcset', '' );
 
788
  }
789
  } else {
790
  $node->setAttribute( 'srcset', '' );
 
791
  }
792
  }
793
  if ( $node->getAttribute( 'data-src' ) ) {
@@ -1209,17 +1240,19 @@ class TRP_Translation_Render{
1209
  $language_to_query = ( count ( $this->settings['translation-languages'] ) < 2 ) ? '' : $language_to_query;
1210
 
1211
  return array(
1212
- 'trp_custom_ajax_url' => apply_filters('trp_custom_ajax_url', TRP_PLUGIN_URL . 'includes/trp-ajax.php' ),
1213
- 'trp_wp_ajax_url' => apply_filters('trp_wp_ajax_url', admin_url('admin-ajax.php')),
1214
- 'trp_language_to_query' => $language_to_query,
1215
- 'trp_original_language' => $this->settings['default-language'],
1216
- 'trp_current_language' => $TRP_LANGUAGE,
1217
- 'trp_skip_selectors' => apply_filters( 'trp_skip_selectors_from_dynamic_translation', array( '[data-no-translation]', '[data-no-dynamic-translation]', '[data-trp-translate-id-innertext]', 'script', 'style', 'head', 'trp-span', 'translate-press' ), $TRP_LANGUAGE, $this->settings ), // data-trp-translate-id-innertext refers to translation block and it shouldn't be detected
1218
- 'trp_base_selectors' => $this->get_base_attribute_selectors(),
1219
- 'trp_attributes_selectors' => $this->get_node_accessors(),
1220
- 'trp_attributes_accessors' => $this->get_accessors_array(),
1221
- 'gettranslationsnonceregular' => $nonces['gettranslationsnonceregular'],
1222
- 'showdynamiccontentbeforetranslation' => apply_filters( 'trp_show_dynamic_content_before_translation', false )
 
 
1223
  );
1224
  }
1225
 
264
  * @return mixed
265
  */
266
  public function handle_rest_api_translations($response){
267
+ if ( isset( $response->data ) ) {
268
+ if ( isset( $response->data['title'] ) && isset( $response->data['title']['rendered'] ) ) {
269
+ $response->data['title']['rendered'] = $this->translate_page( $response->data['title']['rendered'] );
270
+ }
271
+ if ( isset( $response->data['excerpt'] ) && isset( $response->data['excerpt']['rendered'] ) ) {
272
+ $response->data['excerpt']['rendered'] = $this->translate_page( $response->data['excerpt']['rendered'] );
273
+ }
274
+ if ( isset( $response->data['content'] ) && isset( $response->data['content']['rendered'] ) ) {
275
+ $response->data['content']['rendered'] = $this->translate_page( $response->data['content']['rendered'] );
276
+ }
277
+ }
278
  return $response;
279
  }
280
 
281
+ /**
282
+ * Apply translation filters for REST API response
283
+ */
284
+ public function add_callbacks_for_translating_rest_api(){
285
+ $post_types = get_post_types();
286
+ foreach ( $post_types as $post_type ) {
287
+ add_filter( 'rest_prepare_'. $post_type, array( $this, 'handle_rest_api_translations' ) );
288
+ }
289
+ }
290
+
291
  /**
292
  * Finding translateable strings and replacing with translations.
293
  *
320
 
321
  /* make sure we only translate on the rest_prepare_$post_type filter in REST requests and not the whole json */
322
  if( strpos( $this->url_converter->cur_page_url(), get_rest_url() ) !== false && strpos( current_filter(), 'rest_prepare_' ) !== 0){
323
+ $trpremoved = preg_replace( '/(<|&lt;)trp-gettext (.*?)(>|&gt;)/', '', $output );
324
+ $trpremoved = preg_replace( '/(<|&lt;)(\\\\)*\/trp-gettext(>|&gt;)/', '', $trpremoved );
325
+ return $trpremoved;
326
  }
327
 
328
  global $TRP_LANGUAGE;
515
  }
516
  foreach ($node_from_value->find('trp-gettext') as $nfv_row) {
517
  $nfv_row->outertext = $nfv_row->innertext();
518
+ $saved_node_from_value = $node_from_value->save();
519
+
520
+ // attributes of these tags are not handled well by the parser so don't escape them [see iss6264]
521
+ if ( $row->tag != 'script' && $row->tag != 'style' ){
522
+ $saved_node_from_value = esc_attr($saved_node_from_value);
523
+ }
524
+
525
+ $row->setAttribute($attr_name, $saved_node_from_value );
526
  $row->setAttribute($no_translate_attribute . '-' . $attr_name, '');
527
  // we are in the editor
528
  if (isset($_REQUEST['trp-edit-translation']) && $_REQUEST['trp-edit-translation'] == 'preview') {
798
  */
799
  public function translate_image_srcset_attributes( $node, $accessor, $translated_string){
800
  if( $accessor === 'src' ) {
801
+ $srcset = $node->getAttribute( 'srcset' );
802
+ $datasrcset = $node->getAttribute( 'data-srcset' );
803
+ if ( $srcset || $datasrcset ) {
804
  $attachment_id = attachment_url_to_postid( $translated_string );
805
  if ( $attachment_id ) {
806
+ $translated_srcset = '';
807
  if ( function_exists( 'wp_get_attachment_image_srcset' ) ) {
808
  // get width of the image in order, to set the largest possible size for srcset
809
  $meta_data = wp_get_attachment_metadata( $attachment_id );
810
  $width = ( $meta_data && isset( $meta_data['width'] ) ) ? $meta_data['width'] : 'large';
811
  $translated_srcset = wp_get_attachment_image_srcset( $attachment_id, $width );
812
  }
813
+ if ( $srcset ){
814
  $node->setAttribute( 'srcset', $translated_srcset );
815
+ }
816
+ if ( $datasrcset ){
817
+ $node->setAttribute( 'data-srcset', $translated_srcset );
818
  }
819
  } else {
820
  $node->setAttribute( 'srcset', '' );
821
+ $node->setAttribute( 'data-srcset', '' );
822
  }
823
  }
824
  if ( $node->getAttribute( 'data-src' ) ) {
1240
  $language_to_query = ( count ( $this->settings['translation-languages'] ) < 2 ) ? '' : $language_to_query;
1241
 
1242
  return array(
1243
+ 'trp_custom_ajax_url' => apply_filters('trp_custom_ajax_url', TRP_PLUGIN_URL . 'includes/trp-ajax.php' ),
1244
+ 'trp_wp_ajax_url' => apply_filters('trp_wp_ajax_url', admin_url('admin-ajax.php')),
1245
+ 'trp_language_to_query' => $language_to_query,
1246
+ 'trp_original_language' => $this->settings['default-language'],
1247
+ 'trp_current_language' => $TRP_LANGUAGE,
1248
+ 'trp_skip_selectors' => apply_filters( 'trp_skip_selectors_from_dynamic_translation', array( '[data-no-translation]', '[data-no-dynamic-translation]', '[data-trp-translate-id-innertext]', 'script', 'style', 'head', 'trp-span', 'translate-press' ), $TRP_LANGUAGE, $this->settings ), // data-trp-translate-id-innertext refers to translation block and it shouldn't be detected
1249
+ 'trp_base_selectors' => $this->get_base_attribute_selectors(),
1250
+ 'trp_attributes_selectors' => $this->get_node_accessors(),
1251
+ 'trp_attributes_accessors' => $this->get_accessors_array(),
1252
+ 'gettranslationsnonceregular' => $nonces['gettranslationsnonceregular'],
1253
+ 'showdynamiccontentbeforetranslation' => apply_filters( 'trp_show_dynamic_content_before_translation', false ),
1254
+ 'skip_strings_from_dynamic_translation' => apply_filters( 'trp_skip_strings_from_dynamic_translation', array() ),
1255
+ 'duplicate_detections_allowed' => apply_filters( 'trp_duplicate_detections_allowed', 20 )
1256
  );
1257
  }
1258
 
includes/functions.php CHANGED
@@ -813,3 +813,133 @@ function trp_force_include_scripts( $final_html, $TRP_LANGUAGE, $language_code,
813
  return $final_html;
814
  }
815
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
813
  return $final_html;
814
  }
815
 
816
+ /*
817
+ * Compatibility with plugins sending Gettext strings in requests such as Cartflows
818
+ *
819
+ * Strip gettext wrappings from the requests made from http->post()
820
+ */
821
+ // Strip of gettext wrappings all the values of the body request array
822
+ add_filter( 'http_request_args', 'trp_strip_trpst_from_requests', 10, 2 );
823
+ function trp_strip_trpst_from_requests($args, $url){
824
+ if( is_array( $args['body'] ) ) {
825
+ array_walk_recursive( $args['body'], 'trp_array_walk_recursive_strip_gettext_tags' );
826
+ }else{
827
+ $args['body'] = TRP_Translation_Manager::strip_gettext_tags( $args['body'] );
828
+ }
829
+ return $args;
830
+ }
831
+ function trp_array_walk_recursive_strip_gettext_tags( &$value ){
832
+ $value = TRP_Translation_Manager::strip_gettext_tags( $value );
833
+ }
834
+
835
+ // Strip of gettext wrappings the customer_name and customer_email keys. Found in WC Stripe and Cartflows
836
+ add_filter( 'wc_stripe_payment_metadata', 'trp_strip_request_metadata_keys' );
837
+ function trp_strip_request_metadata_keys( $metadata ){
838
+ foreach( $metadata as $key => $value ) {
839
+ $stripped_key = TRP_Translation_Manager::strip_gettext_tags( $key );
840
+ if ( $stripped_key != $key ) {
841
+ $metadata[ $stripped_key ] = $value;
842
+ unset( $metadata[ $key ] );
843
+ }
844
+ }
845
+ return $metadata;
846
+ }
847
+
848
+ /**
849
+ * Compatibility with NextGEN Gallery
850
+ *
851
+ * They start an output buffer at init -1 (before ours at init 0). They print footer scripts after we run translate_page,
852
+ * resulting in outputting scripts that won't be stripped of trpst trp-gettext wrappings.
853
+ * This includes WooCommerce Checkout scripts, resulting in trpst wrappings around form fields like Street Address.
854
+ *
855
+ * Solution is to move their hook to priority 1
856
+ *
857
+ * This is the chosen hook (after_setup_theme) because
858
+ * it needs to be after plugins_loaded (because TP is loading this file later)
859
+ * and before init (because the we need to unregister the NextGen Gallery plugin's function hooked on init with priority -1 )
860
+ */
861
+ add_action( 'after_setup_theme', 'trp_nextgen_compatibility' );
862
+ function trp_nextgen_compatibility(){
863
+ if ( class_exists( 'C_Photocrati_Resource_Manager' ) ) {
864
+ $object_C_Photocrati_Resource_Manager = C_Photocrati_Resource_Manager::$instance;
865
+
866
+ // move from priority -1 to 1 because it needs to be after our hook on priority 0
867
+ remove_action( 'init', array( &$object_C_Photocrati_Resource_Manager, 'start_buffer' ) );
868
+ add_action( 'init', array( &$object_C_Photocrati_Resource_Manager, 'start_buffer', ), 1 );
869
+ }
870
+ }
871
+
872
+ /**
873
+ * Compatibility with WooCommerce added to cart message
874
+ *
875
+ * Makes sure title of product is translated.
876
+ *
877
+ * The title of product is added through sprintf %s of a Gettext.
878
+ *
879
+ */
880
+ add_filter( 'the_title', 'trp_woo_translate_product_title_added_to_cart', 10, 2 );
881
+ function trp_woo_translate_product_title_added_to_cart( $title, $id ){
882
+ if( class_exists( 'WooCommerce' ) ){
883
+ if ( version_compare( PHP_VERSION, '5.4.0', '>=' ) ) {
884
+ $callstack_functions = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 15);//set a limit if it is supported to improve performance
885
+ }
886
+ else{
887
+ $callstack_functions = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
888
+ }
889
+
890
+ $list_of_functions = apply_filters( 'trp_woo_translate_title_before_translate_page', array( 'wc_add_to_cart_message' ) );
891
+ if( !empty( $callstack_functions ) ) {
892
+ foreach ( $callstack_functions as $callstack_function ) {
893
+ if ( in_array( $callstack_function['function'], $list_of_functions ) ) {
894
+ $trp = TRP_Translate_Press::get_trp_instance();
895
+ $translation_render = $trp->get_component( 'translation_render' );
896
+ $title = $translation_render->translate_page($title);
897
+ break;
898
+ }
899
+ }
900
+ }
901
+ }
902
+ return $title;
903
+ }
904
+
905
+ /**
906
+ * Compatibility with WooTour plugin
907
+ *
908
+ * They replace spaces (" ") with \u0020, after we apply #trpst and because we don't strip them it breaks html
909
+ */
910
+ add_action('init', 'trp_wootour_add_gettext_filter');
911
+ function trp_wootour_add_gettext_filter(){
912
+ if ( class_exists( 'WooTour_Booking' ) ){
913
+ add_filter('gettext', 'trp_wootour_exclude_gettext_strings', 1000, 3 );
914
+ }
915
+ }
916
+ function trp_wootour_exclude_gettext_strings($translation, $text, $domain){
917
+ if ( $domain == 'woo-tour' ){
918
+ if ( in_array( $text, array( 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ) ) ){
919
+ return TRP_Translation_Manager::strip_gettext_tags( $translation );
920
+ }
921
+ }
922
+ return $translation;
923
+ }
924
+
925
+ /**
926
+ * Compatibility with WooCommerce cart product name translation
927
+ * For products with the character - in the product name.
928
+ *
929
+ * There is a difference between the rendered – and –. Two different characters.
930
+ * Somehow in the cart is the minus one, in the shop listing is the longer separator.
931
+ * Make the cart contain the same type of character which is obtained using get_the_title.
932
+ */
933
+ add_filter( 'woocommerce_cart_item_name', 'trp_woo_cart_item_name', 8, 3 );
934
+ function trp_woo_cart_item_name( $product_name, $cart_item, $cart_item_key ){
935
+ if ( isset( $cart_item['product_id'] ) ){
936
+ $title = get_the_title( $cart_item['product_id'] );
937
+ if ( !empty( $title )){
938
+ if ( strpos( $product_name, '</a>' ) ) {
939
+ preg_match_all('~<a(.*?)href="([^"]+)"(.*?)>~', $product_name, $matches);
940
+ $product_name = sprintf( '<a href="%s">%s</a>', esc_url( $matches[2][0] ), $title );
941
+ }
942
+ }
943
+ }
944
+ return $product_name;
945
+ }
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: TranslatePress - Multilingual
4
  Plugin URI: https://translatepress.com/
5
  Description: Experience a better way of translating your WordPress site using a visual front-end translation editor, with full support for WooCommerce and site builders.
6
- Version: 1.5.5
7
  Author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban
8
  Author URI: https://cozmoslabs.com/
9
  Text Domain: translatepress-multilingual
3
  Plugin Name: TranslatePress - Multilingual
4
  Plugin URI: https://translatepress.com/
5
  Description: Experience a better way of translating your WordPress site using a visual front-end translation editor, with full support for WooCommerce and site builders.
6
+ Version: 1.5.6
7
  Author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban
8
  Author URI: https://cozmoslabs.com/
9
  Text Domain: translatepress-multilingual
languages/translatepress-multilingual.catalog.php CHANGED
@@ -29,19 +29,21 @@
29
  <?php __("It disables detection of strings displayed dynamically using JavaScript. <br/>Strings loaded via a server side AJAX call will still be translated.", "translatepress-multilingual"); ?>
30
  <?php __("Automatically translate slugs", "translatepress-multilingual"); ?>
31
  <?php __("Generate automatic translations of slugs for posts, pages and Custom Post Types.<br/>Requires <a href=\"https://translatepress.com/docs/addons/seo-pack/\" title=\"TranslatePress Add-on SEO Pack documentation\" target=\"_blank\"> SEO Pack Add-on</a> to be installed and activated.", "translatepress-multilingual"); ?>
 
 
 
32
  <?php __("Gettext String", "translatepress-multilingual"); ?>
33
  <?php __("Domain", "translatepress-multilingual"); ?>
34
  <?php __("Exclude Gettext Strings", "translatepress-multilingual"); ?>
35
- <?php __("Exclude these strings from being translated as Gettext strings. <br/>Can still be translated as regular strings.", "translatepress-multilingual"); ?>
 
 
36
  <?php __("Fix broken HTML", "translatepress-multilingual"); ?>
37
  <?php __("General attempt to fix broken or missing HTML on translated pages.<br/><strong>Only try this if the \"Fix spaces between html attribute\" did not solve the issue.</strong>", "translatepress-multilingual"); ?>
38
  <?php __("Fix spaces between HTML attributes", "translatepress-multilingual"); ?>
39
  <?php __("Fixes attributes without spaces between them because they are not valid HTML.<br> May help fix missing or broken content from the HTML on translated pages.", "translatepress-multilingual"); ?>
40
- <?php __("Show dynamic content before translation", "translatepress-multilingual"); ?>
41
- <?php __("Shows dynamically inserted content in original language for a moment before the translation request is finished. <br> May help fix missing content inserted using JavaScript.", "translatepress-multilingual"); ?>
42
- <?php __("Selector", "translatepress-multilingual"); ?>
43
- <?php __("Exclude from dynamic translation", "translatepress-multilingual"); ?>
44
- <?php __("Do not dynamically translate strings that are found in html nodes matching these selectors.<br>Excludes all the children of HTML nodes matching these selectors from being translated using JavaScript.<br/>These strings will still be translated on the server side if possible.", "translatepress-multilingual"); ?>
45
  <?php __("Filter Gettext wrapping from post content and title", "translatepress-multilingual"); ?>
46
  <?php __("Filters gettext wrapping such as #!trpst#trp-gettext from all updated post content and post title. Does not affect previous post content. <br/><strong>Database backup is recommended before switching on.</strong>", "translatepress-multilingual"); ?>
47
  <?php __("Filter Gettext wrapping from post meta", "translatepress-multilingual"); ?>
@@ -69,6 +71,10 @@
69
  <?php __("Flags with Full Language Names", "translatepress-multilingual"); ?>
70
  <?php __("Flags with Short Language Names", "translatepress-multilingual"); ?>
71
  <?php __("Only Flags", "translatepress-multilingual"); ?>
 
 
 
 
72
  <?php __("Current Language", "translatepress-multilingual"); ?>
73
  <?php __("General", "translatepress-multilingual"); ?>
74
  <?php __("Translate Site", "translatepress-multilingual"); ?>
29
  <?php __("It disables detection of strings displayed dynamically using JavaScript. <br/>Strings loaded via a server side AJAX call will still be translated.", "translatepress-multilingual"); ?>
30
  <?php __("Automatically translate slugs", "translatepress-multilingual"); ?>
31
  <?php __("Generate automatic translations of slugs for posts, pages and Custom Post Types.<br/>Requires <a href=\"https://translatepress.com/docs/addons/seo-pack/\" title=\"TranslatePress Add-on SEO Pack documentation\" target=\"_blank\"> SEO Pack Add-on</a> to be installed and activated.", "translatepress-multilingual"); ?>
32
+ <?php __("Selector", "translatepress-multilingual"); ?>
33
+ <?php __("Exclude from dynamic translation", "translatepress-multilingual"); ?>
34
+ <?php __("Do not dynamically translate strings that are found in html nodes matching these selectors.<br>Excludes all the children of HTML nodes matching these selectors from being translated using JavaScript.<br/>These strings will still be translated on the server side if possible.", "translatepress-multilingual"); ?>
35
  <?php __("Gettext String", "translatepress-multilingual"); ?>
36
  <?php __("Domain", "translatepress-multilingual"); ?>
37
  <?php __("Exclude Gettext Strings", "translatepress-multilingual"); ?>
38
+ <?php __("Exclude these strings from being translated as Gettext strings by TranslatePress. Leave the domain empty to take into account any Gettext string.<br/>Can still be translated through po/mo files.", "translatepress-multilingual"); ?>
39
+ <?php __("Exclude selectors from translation", "translatepress-multilingual"); ?>
40
+ <?php __("Do not translate strings that are found in html nodes matching these selectors.<br>Excludes all the children of HTML nodes matching these selectors from being translated.", "translatepress-multilingual"); ?>
41
  <?php __("Fix broken HTML", "translatepress-multilingual"); ?>
42
  <?php __("General attempt to fix broken or missing HTML on translated pages.<br/><strong>Only try this if the \"Fix spaces between html attribute\" did not solve the issue.</strong>", "translatepress-multilingual"); ?>
43
  <?php __("Fix spaces between HTML attributes", "translatepress-multilingual"); ?>
44
  <?php __("Fixes attributes without spaces between them because they are not valid HTML.<br> May help fix missing or broken content from the HTML on translated pages.", "translatepress-multilingual"); ?>
45
+ <?php __("Fix missing dynamic content", "translatepress-multilingual"); ?>
46
+ <?php __("May help fix missing content inserted using JavaScript. <br> It shows dynamically inserted content in original language for a moment before the translation request is finished.", "translatepress-multilingual"); ?>
 
 
 
47
  <?php __("Filter Gettext wrapping from post content and title", "translatepress-multilingual"); ?>
48
  <?php __("Filters gettext wrapping such as #!trpst#trp-gettext from all updated post content and post title. Does not affect previous post content. <br/><strong>Database backup is recommended before switching on.</strong>", "translatepress-multilingual"); ?>
49
  <?php __("Filter Gettext wrapping from post meta", "translatepress-multilingual"); ?>
71
  <?php __("Flags with Full Language Names", "translatepress-multilingual"); ?>
72
  <?php __("Flags with Short Language Names", "translatepress-multilingual"); ?>
73
  <?php __("Only Flags", "translatepress-multilingual"); ?>
74
+ <?php __("Bottom Right", "translatepress-multilingual"); ?>
75
+ <?php __("Bottom Left", "translatepress-multilingual"); ?>
76
+ <?php __("Top Right", "translatepress-multilingual"); ?>
77
+ <?php __("Top Left", "translatepress-multilingual"); ?>
78
  <?php __("Current Language", "translatepress-multilingual"); ?>
79
  <?php __("General", "translatepress-multilingual"); ?>
80
  <?php __("Translate Site", "translatepress-multilingual"); ?>
languages/translatepress-multilingual.pot CHANGED
@@ -61,7 +61,7 @@ msgstr ""
61
  msgid "Select how the language should be detected for first time visitors.<br>The visitor's last displayed language will be remembered through cookies."
62
  msgstr ""
63
 
64
- #: ../tp-add-on-extra-languages/class-extra-languages.php:57, ../translatepress/includes/class-settings.php:308
65
  msgid "Error! Duplicate URL slug values."
66
  msgstr ""
67
 
@@ -133,6 +133,18 @@ msgstr ""
133
  msgid "Generate automatic translations of slugs for posts, pages and Custom Post Types.<br/>Requires <a href=\"https://translatepress.com/docs/addons/seo-pack/\" title=\"TranslatePress Add-on SEO Pack documentation\" target=\"_blank\"> SEO Pack Add-on</a> to be installed and activated."
134
  msgstr ""
135
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  #: ../translatepress/includes/advanced-settings/exclude-gettext-strings.php:9
137
  msgid "Gettext String"
138
  msgstr ""
@@ -146,7 +158,15 @@ msgid "Exclude Gettext Strings"
146
  msgstr ""
147
 
148
  #: ../translatepress/includes/advanced-settings/exclude-gettext-strings.php:13
149
- msgid "Exclude these strings from being translated as Gettext strings. <br/>Can still be translated as regular strings."
 
 
 
 
 
 
 
 
150
  msgstr ""
151
 
152
  #: ../translatepress/includes/advanced-settings/fix-broken-html.php:8
@@ -166,23 +186,11 @@ msgid "Fixes attributes without spaces between them because they are not valid H
166
  msgstr ""
167
 
168
  #: ../translatepress/includes/advanced-settings/show-dynamic-content-before-translation.php:8
169
- msgid "Show dynamic content before translation"
170
  msgstr ""
171
 
172
  #: ../translatepress/includes/advanced-settings/show-dynamic-content-before-translation.php:9
173
- msgid "Shows dynamically inserted content in original language for a moment before the translation request is finished. <br> May help fix missing content inserted using JavaScript."
174
- msgstr ""
175
-
176
- #: ../translatepress/includes/advanced-settings/skip-dynamic-selectors.php:9
177
- msgid "Selector"
178
- msgstr ""
179
-
180
- #: ../translatepress/includes/advanced-settings/skip-dynamic-selectors.php:11
181
- msgid "Exclude from dynamic translation"
182
- msgstr ""
183
-
184
- #: ../translatepress/includes/advanced-settings/skip-dynamic-selectors.php:12
185
- msgid "Do not dynamically translate strings that are found in html nodes matching these selectors.<br>Excludes all the children of HTML nodes matching these selectors from being translated using JavaScript.<br/>These strings will still be translated on the server side if possible."
186
  msgstr ""
187
 
188
  #: ../translatepress/includes/advanced-settings/strip-gettext-post-content.php:7
@@ -293,31 +301,47 @@ msgstr ""
293
  msgid "Only Flags"
294
  msgstr ""
295
 
296
- #: ../translatepress/includes/class-settings.php:344
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
297
  msgid "Current Language"
298
  msgstr ""
299
 
300
- #: ../translatepress/includes/class-settings.php:385
301
  msgid "General"
302
  msgstr ""
303
 
304
- #: ../translatepress/includes/class-settings.php:390, ../translatepress/includes/class-translation-manager.php:242
305
  msgid "Translate Site"
306
  msgstr ""
307
 
308
- #: ../translatepress/includes/class-settings.php:395
309
  msgid "Addons"
310
  msgstr ""
311
 
312
- #: ../translatepress/includes/class-settings.php:403
313
  msgid "License"
314
  msgstr ""
315
 
316
- #: ../translatepress/includes/class-settings.php:431, ../translatepress/includes/class-translation-manager.php:274
317
  msgid "Settings"
318
  msgstr ""
319
 
320
- #: ../translatepress/includes/class-settings.php:435
321
  msgid "Pro Features"
322
  msgstr ""
323
 
@@ -565,11 +589,11 @@ msgstr ""
565
  msgid "Translate Page"
566
  msgstr ""
567
 
568
- #: ../translatepress/includes/class-translation-manager.php:950
569
  msgid "Security check"
570
  msgstr ""
571
 
572
- #: ../translatepress/includes/class-translation-manager.php:1024
573
  msgid "<strong>Warning:</strong> Some strings have possibly incorrectly encoded characters. This may result in breaking the queries, rendering the page untranslated in live mode. Consider revising the following strings or their method of outputting."
574
  msgstr ""
575
 
@@ -873,7 +897,7 @@ msgstr ""
873
  msgid "Floating language selection"
874
  msgstr ""
875
 
876
- #: ../translatepress/partials/main-settings-page.php:132
877
  msgid "Add a floating dropdown that follows the user on every page."
878
  msgstr ""
879
 
61
  msgid "Select how the language should be detected for first time visitors.<br>The visitor's last displayed language will be remembered through cookies."
62
  msgstr ""
63
 
64
+ #: ../tp-add-on-extra-languages/class-extra-languages.php:57, ../translatepress/includes/class-settings.php:338
65
  msgid "Error! Duplicate URL slug values."
66
  msgstr ""
67
 
133
  msgid "Generate automatic translations of slugs for posts, pages and Custom Post Types.<br/>Requires <a href=\"https://translatepress.com/docs/addons/seo-pack/\" title=\"TranslatePress Add-on SEO Pack documentation\" target=\"_blank\"> SEO Pack Add-on</a> to be installed and activated."
134
  msgstr ""
135
 
136
+ #: ../translatepress/includes/advanced-settings/exclude-dynamic-selectors.php:9, ../translatepress/includes/advanced-settings/exclude-selectors.php:9
137
+ msgid "Selector"
138
+ msgstr ""
139
+
140
+ #: ../translatepress/includes/advanced-settings/exclude-dynamic-selectors.php:11
141
+ msgid "Exclude from dynamic translation"
142
+ msgstr ""
143
+
144
+ #: ../translatepress/includes/advanced-settings/exclude-dynamic-selectors.php:12
145
+ msgid "Do not dynamically translate strings that are found in html nodes matching these selectors.<br>Excludes all the children of HTML nodes matching these selectors from being translated using JavaScript.<br/>These strings will still be translated on the server side if possible."
146
+ msgstr ""
147
+
148
  #: ../translatepress/includes/advanced-settings/exclude-gettext-strings.php:9
149
  msgid "Gettext String"
150
  msgstr ""
158
  msgstr ""
159
 
160
  #: ../translatepress/includes/advanced-settings/exclude-gettext-strings.php:13
161
+ msgid "Exclude these strings from being translated as Gettext strings by TranslatePress. Leave the domain empty to take into account any Gettext string.<br/>Can still be translated through po/mo files."
162
+ msgstr ""
163
+
164
+ #: ../translatepress/includes/advanced-settings/exclude-selectors.php:11
165
+ msgid "Exclude selectors from translation"
166
+ msgstr ""
167
+
168
+ #: ../translatepress/includes/advanced-settings/exclude-selectors.php:12
169
+ msgid "Do not translate strings that are found in html nodes matching these selectors.<br>Excludes all the children of HTML nodes matching these selectors from being translated."
170
  msgstr ""
171
 
172
  #: ../translatepress/includes/advanced-settings/fix-broken-html.php:8
186
  msgstr ""
187
 
188
  #: ../translatepress/includes/advanced-settings/show-dynamic-content-before-translation.php:8
189
+ msgid "Fix missing dynamic content"
190
  msgstr ""
191
 
192
  #: ../translatepress/includes/advanced-settings/show-dynamic-content-before-translation.php:9
193
+ msgid "May help fix missing content inserted using JavaScript. <br> It shows dynamically inserted content in original language for a moment before the translation request is finished."
 
 
 
 
 
 
 
 
 
 
 
 
194
  msgstr ""
195
 
196
  #: ../translatepress/includes/advanced-settings/strip-gettext-post-content.php:7
301
  msgid "Only Flags"
302
  msgstr ""
303
 
304
+ #: ../translatepress/includes/class-settings.php:61
305
+ msgid "Bottom Right"
306
+ msgstr ""
307
+
308
+ #: ../translatepress/includes/class-settings.php:62
309
+ msgid "Bottom Left"
310
+ msgstr ""
311
+
312
+ #: ../translatepress/includes/class-settings.php:63
313
+ msgid "Top Right"
314
+ msgstr ""
315
+
316
+ #: ../translatepress/includes/class-settings.php:64
317
+ msgid "Top Left"
318
+ msgstr ""
319
+
320
+ #: ../translatepress/includes/class-settings.php:374
321
  msgid "Current Language"
322
  msgstr ""
323
 
324
+ #: ../translatepress/includes/class-settings.php:415
325
  msgid "General"
326
  msgstr ""
327
 
328
+ #: ../translatepress/includes/class-settings.php:420, ../translatepress/includes/class-translation-manager.php:242
329
  msgid "Translate Site"
330
  msgstr ""
331
 
332
+ #: ../translatepress/includes/class-settings.php:425
333
  msgid "Addons"
334
  msgstr ""
335
 
336
+ #: ../translatepress/includes/class-settings.php:433
337
  msgid "License"
338
  msgstr ""
339
 
340
+ #: ../translatepress/includes/class-settings.php:461, ../translatepress/includes/class-translation-manager.php:274
341
  msgid "Settings"
342
  msgstr ""
343
 
344
+ #: ../translatepress/includes/class-settings.php:465
345
  msgid "Pro Features"
346
  msgstr ""
347
 
589
  msgid "Translate Page"
590
  msgstr ""
591
 
592
+ #: ../translatepress/includes/class-translation-manager.php:953
593
  msgid "Security check"
594
  msgstr ""
595
 
596
+ #: ../translatepress/includes/class-translation-manager.php:1027
597
  msgid "<strong>Warning:</strong> Some strings have possibly incorrectly encoded characters. This may result in breaking the queries, rendering the page untranslated in live mode. Consider revising the following strings or their method of outputting."
598
  msgstr ""
599
 
897
  msgid "Floating language selection"
898
  msgstr ""
899
 
900
+ #: ../translatepress/partials/main-settings-page.php:133
901
  msgid "Add a floating dropdown that follows the user on every page."
902
  msgstr ""
903
 
partials/main-settings-page.php CHANGED
@@ -127,6 +127,7 @@
127
  <label><input type="checkbox" id="trp-ls-floater" name="trp_settings[trp-ls-floater]" value="yes" <?php if ( isset($this->settings['trp-ls-floater']) && ( $this->settings['trp-ls-floater'] == 'yes' ) ){ echo 'checked'; } ?>><b><?php esc_html_e( 'Floating language selection', 'translatepress-multilingual' ); ?></b></label>
128
  <div>
129
  <?php $this->output_language_switcher_select( 'floater-options', $this->settings['floater-options'] ); ?>
 
130
  </div>
131
  <p class="description">
132
  <?php esc_html_e( 'Add a floating dropdown that follows the user on every page.', 'translatepress-multilingual' ); ?>
127
  <label><input type="checkbox" id="trp-ls-floater" name="trp_settings[trp-ls-floater]" value="yes" <?php if ( isset($this->settings['trp-ls-floater']) && ( $this->settings['trp-ls-floater'] == 'yes' ) ){ echo 'checked'; } ?>><b><?php esc_html_e( 'Floating language selection', 'translatepress-multilingual' ); ?></b></label>
128
  <div>
129
  <?php $this->output_language_switcher_select( 'floater-options', $this->settings['floater-options'] ); ?>
130
+ <?php $this->output_language_switcher_floater_possition( $this->settings['floater-position'] ); ?>
131
  </div>
132
  <p class="description">
133
  <?php esc_html_e( 'Add a floating dropdown that follows the user on every page.', 'translatepress-multilingual' ); ?>
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: cozmoslabs, razvan.mo, madalin.ungureanu, cristophor
3
  Donate link: https://www.translatepress.com/
4
  Tags: translate, translation, multilingual, automatic translation, bilingual, front-end translation, google translate, language
5
  Requires at least: 3.1.0
6
- Tested up to: 5.2.2
7
  Requires PHP: 5.6.20
8
- Stable tag: 1.5.5
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -142,6 +142,24 @@ For more information please check out [TranslatePress - Multilingual plugin docu
142
 
143
 
144
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
  = 1.5.5 =
146
  * Fixed warnings regarding settings that appeared on fresh installs
147
 
3
  Donate link: https://www.translatepress.com/
4
  Tags: translate, translation, multilingual, automatic translation, bilingual, front-end translation, google translate, language
5
  Requires at least: 3.1.0
6
+ Tested up to: 5.2.3
7
  Requires PHP: 5.6.20
8
+ Stable tag: 1.5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
142
 
143
 
144
  == Changelog ==
145
+ = 1.5.6 =
146
+ * Improved speed on Gettext exclusion
147
+ * Make Gettext exclusion work without a domain in Advanced Settings
148
+ * Allow po/mo localization files to translate excluded Gettext strings
149
+ * Added Advanced setting to Exclude selectors from translation
150
+ * Added option to change floating language switcher position
151
+ * Added compatibility with CartFlows plugin
152
+ * Added compatibility with NextGen plugin
153
+ * Added compatibility with Ninja Popups plugin mails
154
+ * Added compatibility with Woo Tours plugin
155
+ * Fixed issue with trp-gettext wrappings in WooCommerce REST API
156
+ * Fixed issue with translating images run through JetPack CDN
157
+ * Fixed edge case where gettext inside script tag attributes was breaking html
158
+ * Translated title of product in WooCommerce "Product has been added to cart" message
159
+ * Better handling of string overdetection in dynamic string translation
160
+ * Better handling of sql errors and machine translation
161
+ * Fixed WooCommerce Product Translation on Cart Page for products with hyphen in their names
162
+
163
  = 1.5.5 =
164
  * Fixed warnings regarding settings that appeared on fresh installs
165