<commit_before>
Rich.I18n = (function() {
  return {
    beforeEdit: function(inputs, selector, specs, identifier) {
      var translated_keys = $("<input name='content_item[derivative_keys]' type='hidden'/>")
      
      translated_keys.val($(identifier).map(function() {
                            return $(this).attr("data-derivative_key");
                          }).toArray().join(";"));
                        
      inputs.append(translated_keys);
    },
    afterUpdate: function(form, response, selector, specs, identifier) {
      $.each(response.translations, function(key, value) {
        $( "span.i18n" + identifier + "[data-derivative_key=" + key + "]")            .attr("data-value", response.value).html(              value);
        $("input.i18n" + identifier + "[data-derivative_key=" + key + "][value]")     .attr("data-value", response.value).attr("value"     , value);
        $("input.i18n" + identifier + "[data-derivative_key=" + key + "][seatholder]").attr("data-value", response.value).attr("seatholder", value);
      });
      SeatHolder.rebind();
    }
  };
}());<commit_msg>Corrected Rich.I18n.afterUpdate() so certain page elements will be updated again after updating translations<commit_after>
Rich.I18n = (function() {
  return {
    beforeEdit: function(inputs, selector, specs, identifier) {
      var translated_keys = $("<input name='content_item[derivative_keys]' type='hidden'/>")
      
      translated_keys.val($(identifier).map(function() {
                            return $(this).attr("data-derivative_key");
                          }).toArray().join(";"));
                        
      inputs.append(translated_keys);
    },
    afterUpdate: function(form, response, selector, specs, identifier) {
      $.each(response.translations, function(key, value) {
        $(     ".i18n" + identifier + "[data-derivative_key=" + key + "]")            .attr("data-value", response.value).html(              value);
        $("input.i18n" + identifier + "[data-derivative_key=" + key + "][value]")     .attr("data-value", response.value).attr("value"     , value);
        $("input.i18n" + identifier + "[data-derivative_key=" + key + "][seatholder]").attr("data-value", response.value).attr("seatholder", value);
      });
      SeatHolder.rebind();
    }
  };
}());
{'fraction_non_alphanumeric': 0.17867932671558048, 'fraction_numerical': 0.007768666378938282, 'mean_word_length': 2.6735340729001584, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6059963', 'n_tokens_mistral': 700, 'n_tokens_neox': 668, 'n_words': 114}