<commit_before>/**
 * @license
 * Copyright 2015 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 */

CLASS({
  name: 'Message',
  package: 'foam.i18n',
  extendsModel: 'Message',

  requires: [ 'foam.i18n.Placeholder' ],
  imports: [ 'assert' ],

  ids: ['id'],

  properties: [
    {
      model_: 'StringProperty',
      name: 'id',
      lazyFactory: function() {
        return this.model.name + '_Message_' + this.name;
      }
    },
    {
      model_: 'StringProperty',
      name: 'description',
      required: true
    },
    {
      model_: 'ArrayProperty',
      name: 'placeholders',
      type: 'Array[foam.i18n.Placeholder]'
    }
  ],

  methods: [
    {
      name: 'validate',
      code: function() {
        var valueType = typeof this.value;<commit_msg>i18n message: Add StringProperty: meaning<commit_after>/**
 * @license
 * Copyright 2015 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 */

CLASS({
  name: 'Message',
  package: 'foam.i18n',
  extendsModel: 'Message',

  requires: [ 'foam.i18n.Placeholder' ],
  imports: [ 'assert' ],

  ids: ['id'],

  properties: [
    {
      model_: 'StringProperty',
      name: 'id',
      lazyFactory: function() {
        return this.model.name + '_Message_' + this.name;
      }
    },
    {
      model_: 'StringProperty',
      name: 'description',
      required: true
    },
    {
      model_: 'StringProperty',
      name: 'meaning'
    },
    {
      model_: 'ArrayProperty',
      name: 'placeholders',
      type: 'Array[foam.i18n.Placeholder]'
    }
  ],

  methods: [
    {
      name: 'validate',
      code: function() {
        var valueType = typeof this.value;
{'fraction_non_alphanumeric': 0.14196642685851318, 'fraction_numerical': 0.014388489208633094, 'mean_word_length': 2.4365733113673804, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5865043', 'n_tokens_mistral': 688, 'n_tokens_neox': 657, 'n_words': 177}