client/locations-list-map.js
// The filters which are selectable on the webpage will also be translated here
The filters which are selectable on the webpage will also be translated here
The filters which are selectable on the webpage will also be translated here
function createFilters(data) {
  const datasetFilters = filtersByDataset[gDataset];
  const filters = {
    states: {},
    entryAge: {
      '0-7': {
        name: $.i18n('ftm-entry-age-1-7'),
        isSet: false,
        value: '1-7',
      },
      '7-14': {
        name: $.i18n('ftm-entry-age-8-14'),
        isSet: false,
        value: '8-14',
      },
      '14-21': {
        name: $.i18n('ftm-entry-age-15-21'),
        isSet: false,
        value: '15-21',
      },
      '21+': {
        name: $.i18n('ftm-entry-age-21-plus'),
        isSet: false,
        value: '21',
      },
      '6++': {
        name: $.i18n('ftm-entry-age-june-later'),
        isSet: true,
        value: 'June+',
      },
      placeholder: $.i18n('ftm-entry-age-placeholder'),
    },
  };
  for (const state of Object.keys(data)) {
    filters.states[state] = { name: state, isSet: false };
  }
  try {
    const dataFilters = parseFiltersFromData(data, datasetFilters);
    Object.keys(datasetFilters).forEach((datasetFilterKey) => {
      filters[datasetFilterKey] = translatedFilterItems(dataFilters[datasetFilterKey]);
    });
  } catch (e) {
    console.error(e);
  }
  return filters;
}
function createFilters ( data ) { const datasetFilters = filtersByDataset [ gDataset ] ; const filters = { states : { } , entryAge : { '0-7' : { name : $ . i18n ( 'ftm-entry-age-1-7' ) , isSet : false , value : '1-7' , } , '7-14' : { name : $ . i18n ( 'ftm-entry-age-8-14' ) , isSet : false , value : '8-14' , } , '14-21' : { name : $ . i18n ( 'ftm-entry-age-15-21' ) , isSet : false , value : '15-21' , } , '21+' : { name : $ . i18n ( 'ftm-entry-age-21-plus' ) , isSet : false , value : '21' , } , '6++' : { name : $ . i18n ( 'ftm-entry-age-june-later' ) , isSet : true , value : 'June+' , } , placeholder : $ . i18n ( 'ftm-entry-age-placeholder' ) , } , } ; for ( const state of Object . keys ( data ) ) { filters . states [ state ] = { name : state , isSet : false } ; } try { const dataFilters = parseFiltersFromData ( data , datasetFilters ) ; Object . keys ( datasetFilters ) . forEach ( ( datasetFilterKey ) => { filters [ datasetFilterKey ] = translatedFilterItems ( dataFilters [ datasetFilterKey ] ) ; } ) ; } catch ( e ) { console . error ( e ) ; } return filters ; }
The filters which are selectable on the webpage will also be translated here
The filters which are selectable on the webpage will also be translated here
// All states are included as potential filters. These are not selectable through dropdown lists, // but are available via URL query parameters. // Load all other possible allowlisted filters with their accepted, translated values