{
  "custom": {},
  "params": {
    "data": ""
  },
  "propConfig": {
    "params.data": {
      "paramDirection": "input",
      "persistent": true
    }
  },
  "props": {},
  "root": {
    "children": [
      {
        "meta": {
          "name": "Table"
        },
        "position": {
          "basis": "400px",
          "grow": 1
        },
        "propConfig": {
          "props.data": {
            "binding": {
              "config": {
                "path": "view.params.data"
              },
              "type": "property"
            }
          }
        },
        "type": "ia.display.table"
      },
      {
        "children": [
          {
            "events": {
              "component": {
                "onActionPerformed": {
                  "config": {
                    "script": "\t\n\tsystem.perspective.closePopup(\u0027BulkTerms\u0027)"
                  },
                  "scope": "G",
                  "type": "script"
                }
              }
            },
            "meta": {
              "name": "btn_cancel"
            },
            "position": {
              "basis": "100px"
            },
            "props": {
              "style": {
                "classes": "Buttons/Medium_Button"
              },
              "text": "Cancel"
            },
            "type": "ia.input.button"
          },
          {
            "meta": {
              "name": "lbl_spacer"
            },
            "position": {
              "basis": "50px"
            },
            "type": "ia.display.label"
          },
          {
            "events": {
              "component": {
                "onActionPerformed": {
                  "config": {
                    "script": "\t\n\tfrom com.inductiveautomation.ignition.gateway import IgnitionGateway\n\tfrom com.inductiveautomation.ignition.gateway.script import GatewaySystemUtilities\n\tpackage \u003d IgnitionGateway.get().getLocalizationManager().loadFullPackage()\n\t\n\t\"\"\"\n\tpackage directory:\n\t[\u0027__class__\u0027, \u0027__copy__\u0027, \u0027__deepcopy__\u0027, \u0027__delattr__\u0027, \u0027__doc__\u0027, \u0027__ensure_finalizer__\u0027, \u0027__eq__\u0027, \u0027__format__\u0027, \n\t\u0027__getattribute__\u0027, \u0027__hash__\u0027, \u0027__init__\u0027, \u0027__ne__\u0027, \u0027__new__\u0027, \u0027__reduce__\u0027, \u0027__reduce_ex__\u0027, \u0027__repr__\u0027, \u0027__setattr__\u0027, \n\t\u0027__str__\u0027, \u0027__subclasshook__\u0027, \u0027__unicode__\u0027, \u0027addTerm\u0027, \u0027addTranslation\u0027, \u0027addTranslations\u0027, \u0027allTranslations\u0027, \n\t\u0027applyPackage\u0027, \u0027availableKeys\u0027, \u0027availableLocales\u0027, \u0027baseLocale\u0027, \u0027class\u0027, \u0027createDiff\u0027, \u0027ensureLocaleExists\u0027, \u0027equals\u0027, \n\t\u0027get\u0027, \u0027getAllTranslations\u0027, \u0027getAvailableKeys\u0027, \u0027getAvailableLocales\u0027, \u0027getBaseLocale\u0027, \u0027getBundle\u0027, \u0027getClass\u0027, \u0027getIndex\u0027,\n\t \u0027getKeyHashRule\u0027, \u0027getOrCreateBundle\u0027, \u0027getStrict\u0027, \u0027getTranslationsFor\u0027, \u0027hashCode\u0027, \u0027index\u0027, \u0027isDefined\u0027, \u0027keyHashRule\u0027, \n\t \u0027notify\u0027, \u0027notifyAll\u0027, \u0027removeKey\u0027, \u0027removeLocale\u0027, \u0027removeTranslation\u0027, \u0027setBaseLocale\u0027, \u0027setIndex\u0027, \u0027setKeyHashRule\u0027, \n\t \u0027toString\u0027, \u0027updateIndex\u0027, \u0027wait\u0027]\n\t\"\"\"\n\t\n\tterms \u003d package.getAvailableKeys()\n\t\t\n\t#get current locale\n\tlocale \u003d GatewaySystemUtilities.LOCAL_LOCALE.get()\n\tlocalestr \u003d self.session.props.locale\n\t#read each term\n\tds \u003d self.parent.parent.getChild(\"Table\").props.data\n\tpending_translations \u003d {}\n\tfor row in range(ds.getRowCount()):\n\t\tterm \u003d ds.getValueAt(row, \u0027Term\u0027).rstrip(\u0027 \u0027)\n\t\ttranslation \u003d ds.getValueAt(row, 1).rstrip(\u0027 \u0027)\n\t\t\n\t\tif len(translation) \u003c\u003d 1:\n\t\t\ttranslation \u003d term\n\t\tpending_translations.update({term:translation})\n\t\t\n\tif len(pending_translations) \u003e 0:\n\t\tpayload \u003d {\u0027locale\u0027:self.session.props.locale,\u0027pending_translations\u0027:pending_translations}\n\t\tsystem.perspective.sendMessage(\"update-translation-table\", payload)\n\n\tsystem.perspective.closePopup(\u0027BulkTerms\u0027)"
                  },
                  "scope": "G",
                  "type": "script"
                }
              }
            },
            "meta": {
              "name": "btn_confirm"
            },
            "position": {
              "basis": "100px"
            },
            "props": {
              "style": {
                "classes": "Buttons/Medium_Button"
              },
              "text": "Confirm"
            },
            "type": "ia.input.button"
          }
        ],
        "meta": {
          "name": "flx_buttons"
        },
        "position": {
          "basis": "60px"
        },
        "props": {
          "justify": "center",
          "style": {
            "marginBottom": 20,
            "marginTop": 20
          }
        },
        "type": "ia.container.flex"
      }
    ],
    "meta": {
      "name": "root"
    },
    "props": {
      "direction": "column"
    },
    "type": "ia.container.flex"
  }
}