Return the localized name or default name for the given record

@param {object} wofData
@returns {false|string}
507331
function getName(wofData) {

  // if this is a US county, use the qs:a2_alt for county
  // eg - wof:name = 'Lancaster' and qs:a2_alt = 'Lancaster County', use latter
  if (isUsCounty(wofData)) {
    return getPropertyValue(wofData, 'qs:a2_alt');
  }

  // attempt to use the following in order of priority and fallback to wof:name if all else fails
  return getLocalizedName(wofData, 'wof:lang_x_spoken') ||
         getLocalizedName(wofData, 'wof:lang_x_official') ||
         getLocalizedName(wofData, 'wof:lang') ||
         getPropertyValue(wofData, 'wof:label') ||
         getPropertyValue(wofData, 'wof:name');
}
910719
function(record, extraNames) {
      var fieldNames = record.getFields().map(function (field) {
        return field.getName();
      });

      if (extraNames) {
        fieldNames = fieldNames.concat(extraNames);
      }
      return fieldNames;
    }
1254562
function defaultTaskData(data) {
  data.params = data.params || {};
  data.plugins = data.plugins || [];
  data.groups = data.groups || [];
  return data;
}
830198
public String getDefaultWorkspaceName() {
        Document workspaces = doc.getDocument(FieldName.WORKSPACES);
        if (workspaces != null) {
            return workspaces.getString(FieldName.DEFAULT, Default.DEFAULT);
        }
        return Default.DEFAULT;
    }
716562
function getNameOfType(x) {
  switch (false) {
    case !(x == null):
      return `${x}`; // null / undefined
    case !is.String(x):
      return x;
    case !is.Function(x):
      return x.name;
    case !is.NaN(x):
      return 'NaN';
    default:
      return x;
  }
}
898214
function isUsCounty(base_record, wof_country, qs_a2_alt) {
  return 'US' === wof_country &&
          'county' === base_record.place_type &&
          !_.isUndefined(qs_a2_alt);
}
496191
def data_name(data_token)
      return unless data_token # nil or false

      return data_token.values.first if data_token.is_a?(Hash) # @user => :user

      data = data_object(data_token)

      if is_collection?(data) # data is a collection
        object_name = collection_root_name if collection_root_name
        object_name ||= data.table_name if data.respond_to?(:table_name)

        if object_name.nil? && data.respond_to?(:first)
          first = data.first
          object_name = data_name(first).to_s.pluralize if first.present?
        end

        object_name ||= data_token if data_token.is_a?(Symbol)
        object_name
      elsif is_object?(data) # data is an object
        object_name = object_root_name if object_root_name
        object_name ||= data if data.is_a?(Symbol)
        object_name ||= collection_root_name.to_s.singularize if collection_root_name
        object_name ||= data.class.respond_to?(:model_name) ? data.class.model_name.element : data.class.to_s.downcase
        object_name
      else
        data_token
      end
    end
1327347
function askForTableName() {
    if (this.force) {
        return;
    }

    const validateTableName = dbh.validateTableName;
    const done = this.async();

    this.prompt([
        {
            type: 'input',
            name: 'dbhTableName',
            validate: ((input) => {
                const prodDatabaseType = this.jhipsterAppConfig.prodDatabaseType;
                return validateTableName(input, prodDatabaseType);
            }),
            message: 'What is the table name for this entity ?',
            default: this.entityTableName
        }
    ]).then((props) => {
        this.tableNameInput = props.dbhTableName;
        done();
    });
}
385928
function buildPrefixLabelParts(schema, record) {
  if (isRegion(record.layer) &&
    isGeonamesOrWhosOnFirst(record.source) &&
    isInUSAOrCAN(record)) {
    return [];
  }

  if (isCountry(record.layer)) {
    return [];
  }

  if (isInKOR(record)) {
    return [];
  }

  // support name aliases
  if (Array.isArray(record.name.default)) {
    return record.name.default.slice(0,1);
  }

  return [record.name.default];

}
20625
public function name() {
		if( empty($this->data->names) )
			return null;
		// check if we have result for locale
		if ( isset( $this->data->names->{$this->default_locale} ) )
            return $this->data->names->{$this->default_locale};
        // otherwise fallback to english
		if ( isset( $this->data->names->en ) )
            return $this->data->names->en;
        // none of the above, return first result
        return $this->data->names[0];
	}
465346
private String getFieldAccessorName(TypeToken<?> recordType, String fieldName) {
    return String.format("%s$%s", normalizeTypeName(recordType), fieldName);
  }
321138
function getLocaleEraNames(locale, width) {
    var /** @type {?} */ data = findLocaleData(locale);
    var /** @type {?} */ erasData = /** @type {?} */ (data[7 /* Eras */]);
    return getLastDefinedValue(erasData, width);
}
663567
public static String getWthInsiCode(Map wthData) {
        String wst_name = getValueOr(wthData, "wst_name", "");
        if (wst_name.matches("(\\w{4})|(\\w{8})")) {
            return wst_name;
        }

        String wst_id = getValueOr(wthData, "wst_id", "");
        if (wst_id.matches("(\\w{4})|(\\w{8})")) {
            return wst_id;
        }

        wst_id = getValueOr(wthData, "dssat_insi", "");
        if (wst_id.matches("(\\w{4})|(\\w{8})")) {
            return wst_id;
        }

        return "";
    }
1042925
public static Locale getLocaleFromName(String name) {
        String language = "";
        String country = "";
        String variant = "";

        int i1 = name.indexOf('_');
        if (i1 < 0) {
            language = name;
        } else {
            language = name.substring(0, i1);
            ++i1;
            int i2 = name.indexOf('_', i1);
            if (i2 < 0) {
                country = name.substring(i1);
            } else {
                country = name.substring(i1, i2);
                variant = name.substring(i2+1);
            }
        }

        return new Locale(language, country, variant);
    }
63000
function (name, defaultVal) {
        return (
          this.editorManager.i18n.data[(this.settings.language || 'en') + '.' + name] ||
          (defaultVal !== undefined ? defaultVal : '{#' + name + '}')
        );
      }
383029
def fetch_attribute(locale, name)
      translation = record.translation_for(locale)
      return translation && translation.send(name)
    end
909213
function getIriLocalName(iri) {
  if (memory[iri]) return memory[iri]; // !
  if (!(typeof iri === 'string' && iri.includes(colon))) throw new Error(`Given IRI "${iri}" is invalid`);

  let workingIri = iri;
  const protocolArray = iri.split('://');

  if (protocolArray.length > 2) throw new Error(`Given IRI "${iri}" is invalid`);
  if (protocolArray.length > 1) workingIri = protocolArray[1];

  const resPound = sliceOrFail(workingIri, pound);

  if (typeof resPound === 'string') {
    if (!resPound.length) throw new Error(`Given IRI "${iri}" is invalid`);

    return memory[iri] = resPound;
  }

  const resSlash = sliceOrFail(workingIri, slash);

  if (typeof resSlash === 'string') {
    if (!resSlash.length) throw new Error(`Given IRI "${iri}" is invalid`);

    return memory[iri] = resSlash;
  }
  const resColon = sliceOrFail(workingIri, colon);

  if (typeof resColon === 'string') {
    if (!resColon.length) throw new Error(`Given IRI "${iri}" is invalid`);

    return memory[iri] = resColon;
  }

  throw new Error(`Given IRI "${iri}" is invalid`);
}