Updates translations

        overwrite: set it to True if you want to overwrite definitions
        fuzzy_trigger: set it to True to mark corresponding translations from the
            other languages as fuzzy for the updated values
767763
def update_translations(self, project_id, file_path=None,
                            language_code=None, overwrite=False, fuzzy_trigger=None):
        
        return self._upload(
            project_id=project_id,
            updating=self.UPDATING_TRANSLATIONS,
            file_path=file_path,
            language_code=language_code,
            overwrite=overwrite,
            fuzzy_trigger=fuzzy_trigger
        )
276091
private void notifyLanguageChanged() {
        sendOnBeforeLocaleChangedEvent();
        activity.getIntent().putExtra(KEY_ACTIVITY_LOCALE_CHANGED, true);
        callDummyActivity();
        activity.recreate();
    }
1284952
protected function updateAttributesWithTranslated()
    {
        $translationInfo = $this->translationAnalyzer()->analyze($this->model());

        $attributes = $this->info['attributes'];

        // Mark the fillable fields on the translation model
        foreach ($translationInfo['attributes'] as $key => $attribute) {

            /** @var ModelAttributeData $attribute */
            if ( ! $attribute->translated) {
                continue;
            }

            if ( ! isset($attributes[$key])) {
                $attributes[$key] = $attribute;
            }

            /** @var ModelAttributeData $attributeData */
            $attributeData = $attributes[$key];
            $attributeData->merge($attribute);

            $attributes[$key] = $attributeData;
        }

        $this->info['attributes'] = $attributes;
    }
380680
def update(self, new_data: IntentDict):
        

        for locale, data in new_data.items():
            if locale not in self.dict:
                self.dict[locale] = {}

            self.dict[locale].update(data)
214179
public function updateRegistry()
    {
        if (is_cli()) {
            output()->verbose(
                (new Format())
                    ->setContextualClass(Format::WARNING)
                    ->setString(language()->getLine('CLI_REGISTRY_LANGUAGE_VERB_UPDATE_START'))
                    ->setNewLinesBefore(1)
                    ->setNewLinesAfter(2)
            );
        }

        $cacheItemPool = cache()->getObject('default');

        if (cache()->exists('registry')) {
            $cacheItemPool = cache()->getObject('registry');
        }

        if ($cacheItemPool instanceof CacheItemPoolInterface) {
            $this->registry = $this->fetchRegistry();
            $cacheItemPool->save(new Item('o2languages', $this->registry, false));
        }

        if (count($this->registry) and is_cli()) {
            output()->verbose(
                (new Format())
                    ->setContextualClass(Format::SUCCESS)
                    ->setString(language()->getLine('CLI_REGISTRY_LANGUAGE_VERB_UPDATE_SUCCESS'))
                    ->setNewLinesBefore(1)
                    ->setNewLinesAfter(2)
            );
        } elseif (is_cli()) {
            output()->verbose(
                (new Format())
                    ->setContextualClass(Format::DANGER)
                    ->setString(language()->getLine('CLI_REGISTRY_LANGUAGE_VERB_UPDATE_FAILED'))
                    ->setNewLinesBefore(1)
                    ->setNewLinesAfter(2)
            );
        }
    }
1061411
def update(self, data: TransDict, flags: Flags):
        

        for lang, lang_data in data.items():
            self.update_lang(lang, lang_data, flags)
934446
private void updateTransitions(List<Long> transList,
                                   AbstractWordBasedDTNode<I, Boolean, StateInfo<I, Boolean>> oldDtTarget) { // TODO: replace with primitive specialization
        int numTrans = transList.size();

        final List<Word<I>> transAs = new ArrayList<>(numTrans);

        for (int i = 0; i < numTrans; i++) {
            long encodedTrans = transList.get(i);

            int sourceState = (int) (encodedTrans >> StateInfo.INTEGER_WORD_WIDTH);
            int transIdx = (int) (encodedTrans);

            StateInfo<I, Boolean> sourceInfo = stateInfos.get(sourceState);
            I symbol = alphabet.getSymbol(transIdx);

            transAs.add(sourceInfo.accessSequence.append(symbol));
        }

        final List<StateInfo<I, Boolean>> succs = sift(Collections.nCopies(numTrans, oldDtTarget), transAs);

        for (int i = 0; i < numTrans; i++) {
            long encodedTrans = transList.get(i);

            int sourceState = (int) (encodedTrans >> StateInfo.INTEGER_WORD_WIDTH);
            int transIdx = (int) (encodedTrans);

            setTransition(sourceState, transIdx, succs.get(i));
        }
    }
520355
private static void applyOverrides() {
        // Get the appropriate InputStream to read overrides from, if any.
        InputStream stream = getContentTypesPropertiesStream();
        if (stream == null) {
            return;
        }

        try {
            try {
                // Read the properties file...
                Properties overrides = new Properties();
                overrides.load(stream);
                // And translate its mapping to ours...
                for (Map.Entry<Object, Object> entry : overrides.entrySet()) {
                    String extension = (String) entry.getKey();
                    String mimeType = (String) entry.getValue();
                    add(mimeType, extension);
                }
            } finally {
                stream.close();
            }
        } catch (IOException ignored) {
        }
    }
107013
public function afterUpdate()
    {
        /** @var ActiveRecord $owner */
        $owner = $this->owner;

        if ($owner->isRelationPopulated('translations')) {
            $translations = $this->indexByLanguage($owner->getRelatedRecords()['translations']);
            $this->saveTranslations($translations);
        }
    }
1277718
protected function setTitleEditTrigger()
    {
        if (isset($this->data_trigger['name'])) {
            $title = $this->text('Edit %name', array('%name' => $this->data_trigger['name']));
        } else {
            $title = $this->text('Add trigger');
        }

        $this->setTitle($title);
    }
68844
protected function setDataEditTrigger()
    {
        $conditions = $this->getData('trigger.data.conditions');

        if (empty($conditions) || !is_array($conditions)) {
            return null;
        }

        if (!$this->isError()) {
            gplcart_array_sort($conditions);
        }

        $modified = array();

        foreach ($conditions as $condition) {
            $modified[] = is_string($condition) ? $condition : $condition['original'];
        }

        $this->setData('trigger.data.conditions', implode("\n", $modified));
    }
970667
def override_language(self, language):
        
        previous_language = self._linguist.language
        self._linguist.language = language
        yield
        self._linguist.language = previous_language
1097268
def update(self, prob):
        # type: (float) -> bool
        """"""
        chunk_activated = prob > 1.0 - self.sensitivity

        if chunk_activated or self.activation < 0:
            self.activation += 1
            has_activated = self.activation > self.trigger_level
            if has_activated or chunk_activated and self.activation < 0:
                self.activation = -(8 * 2048) // self.chunk_size

            if has_activated:
                return True
        elif self.activation > 0:
            self.activation -= 1
        return False
1271798
private function ensureIndexNameAttIdLanguage()
    {
        if (!($this->database->tableExists('tl_metamodel_translatedurl'))) {
            return;
        }

        // Renamed in 2.0.0-alpha2 (due to database.sql => dca movement).
        if (!$this->database->indexExists('att_lang', 'tl_metamodel_translatedurl', true)) {
            return;
        }
        $this->database->execute(
            'ALTER TABLE `tl_metamodel_translatedurl` DROP INDEX `att_lang`;'
        );
        $this->database->execute(
            'ALTER TABLE `tl_metamodel_translatedurl` ADD KEY `att_id_language` (`att_id`, `language`);'
        );
    }
1281732
public function actionUpdateAll()
    {
        
        // Scan the locales folder for languages in the wwextension and
        // launch actionUpdate for each of them.

    	// Get the list of languages that will be updated.
		$locales = $this->getLanguageList();

		// We now identified locales to be updated.
    	$this->outVerbose("Languages '" . implode(',', $locales) . "' will be updated for extension '" . $this->options['extension'] . "'.");
    	foreach ($locales as $l) {
    		$this->options['language'] = $l;
    		$this->checkUpdateInput();
    		$this->actionUpdate();
    		
    		$this->outVerbose("");
    	}
        
    }
325842
def add(msgid, transtr, fuzzy):
    
    global MESSAGES
    if not fuzzy and transtr and not transtr.startswith('\0'):
        MESSAGES[msgid] = transtr
1061802
def update_from_field(field_name)
      if fields[field_name].localized?
        read_attribute(field_name).to_a.map { |lang, value| cast_value(value, language: lang) }.flatten
      else
        cast_value send(field_name)
      end
    end