diff --git a/package-lock.json b/package-lock.json index 175fc6fe..c343438f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "mapjs", - "version": "1.7.0", + "version": "1.7.4", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1335,7 +1335,7 @@ "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, "pogo-translations": { - "version": "git+https://github.com/bschultz/pogo-translations.git#5196fafac6b7f6590671cf5f55f1881f595770e1", + "version": "git+https://github.com/bschultz/pogo-translations.git#902373f280d59bf644557e3fa9e7b69ef58160d3", "from": "git+https://github.com/bschultz/pogo-translations.git" }, "prelude-ls": { diff --git a/src/views/index.mustache b/src/views/index.mustache index 1c1d79b1..9ae702cc 100644 --- a/src/views/index.mustache +++ b/src/views/index.mustache @@ -293,22 +293,22 @@   @@ -319,22 +319,22 @@ @@ -357,38 +357,38 @@ diff --git a/static/data/weathertypes.json b/static/data/weathertypes.json index 150b91bc..11e9abd5 100644 --- a/static/data/weathertypes.json +++ b/static/data/weathertypes.json @@ -1,34 +1,34 @@ { "0": { "types": [], - "name": "None" + "name": "none" }, "1": { - "types": ["Fire","Grass","Ground"], - "name": "Clear" + "types": ["fire","grass","ground"], + "name": "clear" }, "2": { - "types": ["Water","Electric","Bug"], - "name": "Rain" + "types": ["water","electric","bug"], + "name": "rain" }, "3": { - "types": ["Normal","Rock"], - "name": "Partly Cloudy" + "types": ["normal","rock"], + "name": "partly_cloudy" }, "4": { - "types": ["Fairy","Fighting","Poison"], - "name": "Cloudy" + "types": ["fairy","fighting","poison"], + "name": "cloudy" }, "5": { - "types": ["Dragon","Flying","Psychic"], - "name": "Windy" + "types": ["dragon","flying","psychic"], + "name": "windy" }, "6": { - "types": ["Ice","Steel"], - "name": "Snow" + "types": ["ice","steel"], + "name": "snow" }, "7" : { - "types": ["Dark","Ghost"], - "name": "Fog" + "types": ["dark","ghost"], + "name": "fog" } } \ No newline at end of file diff --git a/static/js/index.js b/static/js/index.js index 5a3c52af..f0f3111b 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -2976,9 +2976,9 @@ const getPvpRanks = (league, pokemon) => { let content = ` - Rank - CP - Lvl + ${i18n('popup_rank')} + ${i18n('popup_cp')} + ${i18n('popup_lvl')} ${showPvpPercent ? '%' : ''} `; let maxRankingToUse = showOnlyRank5Pvp ? 5 : configPvp.maxRank; @@ -3013,7 +3013,7 @@ const getPvpRanks = (league, pokemon) => { } } if (ranking.rank === null) { - content += `CP too high `; + content += `${i18n('popup_cp_too_high')} `; } else { content += `#${ranking.rank}`; } @@ -3097,10 +3097,10 @@ const getPokemonPopupContent = (pokemon) => { const getCP = (pokemon) => { let content = ``; if (popupDetails.pokemon.cp && pokemon.cp) { - content += `CP ${pokemon.cp}` + content += `${i18n('popup_cp')} ${pokemon.cp}` } if (popupDetails.pokemon.lvl && pokemon.cp) { - content += ` (Lvl ${pokemon.level})` + content += ` (${i18n('popup_lvl')} ${pokemon.level})` } return content += `` } @@ -3137,7 +3137,7 @@ const getPokemonPopupContent = (pokemon) => { if (showMinPokePopup && pokemon.expire_timestamp) { content += `
- Despawn: + ${i18n('popup_despawn')}:
@@ -3153,7 +3153,7 @@ const getPokemonPopupContent = (pokemon) => { content += `
- + @@ -3174,7 +3174,7 @@ const getPokemonPopupContent = (pokemon) => {
Despawn:${i18n('popup_despawn')}:
${despawnDate.toLocaleTimeString(dateTimeLocale)}
- + `; if (pokemon.first_seen_timestamp) { const firstSeenDate = new Date(pokemon.first_seen_timestamp * 1000); @@ -3201,7 +3201,7 @@ const getPokemonPopupContent = (pokemon) => { } content += `
First/Last Seen:${i18n('popup_first_last')}:
` if (content.includes('*')) { - content += `* Theoretical Mega Stat`; + content += `* ${i18n('popup_theoretical_mega_stat')}`; } return content += ``; } else { @@ -3217,9 +3217,9 @@ const getPokemonPopupContent = (pokemon) => {
- - - + + +
[Timer][Hide][Exclude][${i18n('popup_timer')}][${i18n('popup_hide')}][${i18n('popup_exclude')}]
`; @@ -3230,7 +3230,7 @@ const getPokemonPopupContent = (pokemon) => { return `

- Scan with event account + ${i18n('popup_scan_with_event_account')}
`; } let content = ` @@ -3368,7 +3368,7 @@ function getPokestopPopupContent (pokestop) { let content = '
'; if (pokestop.name === null || pokestop.name === '') { - content += '
Unknown Pokestop Name
'; + content += `
${i18n('unknown_pokestop_name')}
`; } else { content += '
' + pokestop.name + '
'; } @@ -3392,16 +3392,16 @@ function getPokestopPopupContent (pokestop) { '
'; if (isActiveLure) { - content += 'Lure Type: ' + getLureName(pokestop.lure_id) + '
'; - content += 'Lure End Time: ' + lureExpireDate.toLocaleTimeString(dateTimeLocale) + ' (' + getTimeUntil(lureExpireDate) + ')

'; + content += `${i18n('popup_lure_type')}: ${getLureName(pokestop.lure_id)}
`; + content += `${i18n('popup_lure_end_time')}: ${lureExpireDate.toLocaleTimeString(dateTimeLocale)} (${getTimeUntil(lureExpireDate)})

`; } if (invasionExpireDate >= now) { const gruntType = getGruntName(pokestop.grunt_type); content += `
- Team Rocket Invasion
+ ${i18n('popup_team_rocket_invasion')}
${gruntType}
- End Time: ${invasionExpireDate.toLocaleTimeString(dateTimeLocale)} (${getTimeUntil(invasionExpireDate)})
`; + ${i18n('popup_end_time')}: ${invasionExpireDate.toLocaleTimeString(dateTimeLocale)} (${getTimeUntil(invasionExpireDate)})`; content += getPossibleInvasionRewards(pokestop); } @@ -3423,10 +3423,10 @@ function getPokestopPopupContent (pokestop) { conditionsString += ')'; } - content += `Quest: ${getQuestName(pokestop.quest_type, pokestop.quest_target)}
${conditionsString}
`; + content += `${i18n('popup_quest')}: ${getQuestName(pokestop.quest_type, pokestop.quest_target)}
${conditionsString}
`; $.each(pokestop.quest_rewards, function (index, reward) { - content += 'Reward: ' + getQuestReward(reward) + '
'; + content += `${i18n('popup_reward')}: ${getQuestReward(reward)}
`; }); } @@ -3436,7 +3436,7 @@ function getPokestopPopupContent (pokestop) { const updatedDate = new Date(pokestop.updated * 1000); if (updatedDate) { - content += '
Last Updated: ' + updatedDate.toLocaleDateString(dateTimeLocale) + ' ' + updatedDate.toLocaleTimeString(dateTimeLocale) + '
'; + content += `
${i18n('popup_last_updated')}: ${updatedDate.toLocaleDateString(dateTimeLocale)} ${updatedDate.toLocaleTimeString()}
`; } const questReward = pokestop.quest_rewards ? pokestop.quest_rewards[0] : {}; @@ -3445,8 +3445,8 @@ function getPokestopPopupContent (pokestop) { @@ -3460,7 +3460,7 @@ const getPossibleInvasionRewards = pokestop => { const item = gruntTypes[pokestop.grunt_type]; if (!item) return ''; const encounterNum = { first: '#1', second: '#2', third: '#3' }; - const rewardPercent = item.type === 'Giovanni' ? { third: '100%' } + const rewardPercent = item.type === i18n('popup_giovanni') ? { third: '100%' } : item.second_reward ? { first: '85%', second: '15%' } : { first: '100%' }; @@ -3499,7 +3499,7 @@ function getGymPopupContent (gym) { let gymName = ''; if (gym.name === null || gym.name === '') { - gymName = 'Unknown Gym Name'; + gymName = `${i18n('popup_unknown_gym_name')}`; } else { gymName = gym.name; } @@ -3534,9 +3534,9 @@ function getGymPopupContent (gym) { if (hasRaidBoss) { pokemonName = getPokemonName(gym.raid_pokemon_id) + ' ' + getGenderIcon(gym.raid_pokemon_gender); } else if (isRaidBattle) { - pokemonName = 'Unknown Raid Boss'; + pokemonName = `${i18n('popup_unknown_raid_boss')}`; } else { - pokemonName = 'Level ' + gym.raid_level + ' Egg'; + pokemonName = `${i18n('popup_level')} ${gym.raid_level} ${i18n('popup_egg')}`; } const pokemonIcon = getPokemonIcon(gym.raid_pokemon_id, gym.raid_pokemon_form, gym.raid_pokemon_evolution, gym.raid_pokemon_gender, gym.raid_pokemon_costume); content += @@ -3574,34 +3574,34 @@ function getGymPopupContent (gym) { '' + pokemonName + '
'; if (hasRaidBoss) { if (gym.raid_pokemon_evolution) { - content += 'Evolution: ' + getEvolutionName(gym.raid_pokemon_evolution) + '
'; + content += `${i18n('popup_evolution')}: ${getEvolutionName(gym.raid_pokemon_evolution)}
`; } if (gym.raid_pokemon_cp !== null) { if (gym.raid_is_exclusive) { - content += 'Level: EX
'; + content += `${i18n('popup_level')}: ${i18n('popup_ex')}
`; } else if (gym.raid_level === 6) { - content += 'Level: Mega
'; + content += `${i18n('popup_level')}: ${i18n('popup_mega')}
`; } else { - content += 'Level: ' + gym.raid_level + '
'; + content += `${i18n('popup_level')}: ${gym.raid_level}
`; } } if (gym.raid_pokemon_move_1 !== null) { let move1 = getMoveName(gym.raid_pokemon_move_1); if (move1 !== null) { - content += 'Fast: ' + move1 + '
'; + content += `${i18n('popup_fast')}: ${move1}
`; } } if (gym.raid_pokemon_move_2 !== null) { let move2 = getMoveName(gym.raid_pokemon_move_2); if (move2 !== null) { - content += 'Charge: ' + move2 + '
'; + content += `${i18n('popup_charge')}: ${move2}
`; } } if (gym.in_battle) { - content += 'Gym last seen in battle!
'; + content += `${i18n('popup_gym_last_seen_in_battle')}
`; } if (gym.raid_pokemon_form !== null && gym.raid_pokemon_form > 0) { - content += 'Form: ' + getFormName(gym.raid_pokemon_form, true) + '
'; + content += `${i18n('popup_form')}: ${getFormName(gym.raid_pokemon_form, true)}
`; } } if (gym.ex_raid_eligible) { @@ -3633,17 +3633,16 @@ function getGymPopupContent (gym) { } content += // '
' + //START 2ND COL - '
' + // START 2ND COL - 'Team: ' + getTeamName(gym.team_id) + '
' + - 'Slots Available: ' + (gym.availble_slots === 0 ? 'Full' : gym.availble_slots === 6 ? 'Empty' : gym.availble_slots) + '
'; + `
+ ${i18n('popup_team')}: ${getTeamName(gym.team_id)}
${i18n('popup_slots_available')}: (${gym.availble_slots === 0 ? i18n('popup_full') : gym.availble_slots === 6 ? i18n('popup_empty') : gym.availble_slots})
`; if (gym.guarding_pokemon_id !== null) { - content += 'Guard: ' + getPokemonName(gym.guarding_pokemon_id) + '
'; + content += `${i18n('popup_guard')}: ${getPokemonName(gym.guarding_pokemon_id)}
`; } if (gym.total_cp !== null) { - content += 'Total CP: ' + gym.total_cp.toLocaleString() + '
'; + content += `${i18n('popup_total_cp')}: ${gym.total_cp.toLocaleString()}
`; } if (gym.in_battle) { - content += 'Gym is under attack!
'; + content += `${i18n('popup_gym_under_attack')}
`; } if (gym.ex_raid_eligible) { // content += 'Gym is EX-Raid eligible'; @@ -3657,13 +3656,13 @@ function getGymPopupContent (gym) { content += '
'; if (isRaid && !isRaidBattle) { - content += 'Raid Start: ' + raidBattleDate.toLocaleTimeString(dateTimeLocale) + ' (' + getTimeUntil(raidBattleDate) + ')
'; + content += `${i18n('popup_raid_start')}: ` + raidBattleDate.toLocaleTimeString(dateTimeLocale) + ' (' + getTimeUntil(raidBattleDate) + ')
'; } if (isRaid) { - content += 'Raid End: ' + raidEndDate.toLocaleTimeString(dateTimeLocale) + ' (' + getTimeUntil(raidEndDate) + ')
'; + content += `${i18n('popup_raid_end')}: ${raidEndDate.toLocaleTimeString(dateTimeLocale)} (${getTimeUntil(raidEndDate)})
`; if (gym.raid_pokemon_id > 0) { - content += `Perfect CP: ${getCpAtLevel(gym.raid_pokemon_id, gym.raid_pokemon_form, 20, true)} / Weather: ${getCpAtLevel(gym.raid_pokemon_id, gym.raid_pokemon_form, 25, true)}
`; - content += `Worst CP: ${getCpAtLevel(gym.raid_pokemon_id, gym.raid_pokemon_form, 20, false)} / Weather: ${getCpAtLevel(gym.raid_pokemon_id, gym.raid_pokemon_form, 25, false)}

`; + content += `${i18n('popup_perfect_cp')}: ${getCpAtLevel(gym.raid_pokemon_id, gym.raid_pokemon_form, 20, true)} / ${i18n('filters_weather')}: ${getCpAtLevel(gym.raid_pokemon_id, gym.raid_pokemon_form, 25, true)}
`; + content += `${i18n('popup_worst_cp')}: ${getCpAtLevel(gym.raid_pokemon_id, gym.raid_pokemon_form, 20, false)} / ${i18n('filters_weather')}: ${getCpAtLevel(gym.raid_pokemon_id, gym.raid_pokemon_form, 25, false)}

`; } } @@ -3676,10 +3675,10 @@ function getGymPopupContent (gym) { const updatedDate = new Date(gym.updated * 1000); const modifiedDate = new Date(gym.last_modified_timestamp * 1000); if (updatedDate) { - content += '
Last Updated: ' + updatedDate.toLocaleDateString(dateTimeLocale) + ' ' + updatedDate.toLocaleTimeString(dateTimeLocale) + ' (' + getTimeSince(updatedDate) + ')
'; + content += `
${i18n('popup_last_updated')}: ${updatedDate.toLocaleDateString(dateTimeLocale)} ${updatedDate.toLocaleTimeString(dateTimeLocale)} (${getTimeSince(updatedDate)})
`; } if (modifiedDate) { - content += '
Last Modified: ' + modifiedDate.toLocaleDateString(dateTimeLocale) + ' ' + modifiedDate.toLocaleTimeString(dateTimeLocale) + ' (' + getTimeSince(modifiedDate) + ')
'; + content += `
${i18n('popup_last_modified')}: ${modifiedDate.toLocaleDateString(dateTimeLocale)} ${modifiedDate.toLocaleTimeString(dateTimeLocale)} (${getTimeSince(modifiedDate)})
`; } content += getNavigation(gym); return content; @@ -3687,12 +3686,12 @@ function getGymPopupContent (gym) { function getCellPopupContent (cell) { let content = '
'; - content += '
Level ' + cell.level + ' S2 Cell
'; - content += 'Id: ' + cell.id + '
'; + content += `
${i18n('popup_level')} ${cell.level} ${i18n('popup_s2_cell')}
`; + content += `${i18n('popup_id')}: ${cell.id}
`; const updatedDate = new Date(cell.updated * 1000); - content += 'Last Updated: ' + updatedDate.toLocaleTimeString(dateTimeLocale) + ' (' + getTimeSince(updatedDate) + ')'; + content += `${i18n('popup_last_updated')}: ${updatedDate.toLocaleTimeString(dateTimeLocale)} (${getTimeSince(updatedDate)})`; content += '
'; return content; } @@ -3700,22 +3699,22 @@ function getCellPopupContent (cell) { function getSubmissionTypeCellPopupContent (cell) { let content = `
-
Level ${cell.level} S2 Cell
- Id: ${cell.id}
- Total Count: ${cell.count}
- Pokestop Count: ${cell.count_pokestops}
- Gym Count: ${cell.count_gyms}
+
${i18n('popup_level')} ${cell.level} ${i18n('popup_s2_cell')}
+ ${i18n('popup_id')}: ${cell.id}
+ ${i18n('popup_total_count')}: ${cell.count}
+ ${i18n('popup_pokestop_count')}: ${cell.count_pokestops}
+ ${i18n('popup_gym_count')} : ${cell.count_gyms}
`; const gymThreshold = [2, 6, 20]; if (cell.count_gyms < 3) { - content += 'Submissions until Gym: ' + (gymThreshold[cell.count_gyms] - cell.count); + content += `${i18n('popup_submissions_until_gym')}: (${gymThreshold[cell.count_gyms] - cell.count})`; } else { - content += 'Submissions until Gym: Never'; + content += `${i18n('popup_submissions_until_gym')}: ${i18n('popup_never')}`; } if ((cell.count === 1 && cell.count_gyms < 1) || (cell.count === 5 && cell.count_gyms < 2) || (cell.count === 19 && cell.count_gyms < 3)) { - content += '
Next submission will cause a Gym!'; + content += `
${i18n('popup_next_submission')}`; } content += '
'; @@ -3730,34 +3729,34 @@ function degreesToCardinal (d) { } function getWeatherPopupContent (weather) { - const weatherName = weatherTypes[weather.gameplay_condition].name; - const weatherType = weatherTypes[weather.gameplay_condition].types; + const weatherName = i18n(`weather_${weatherTypes[weather.gameplay_condition].name}`); + const weatherType = weatherTypes[weather.gameplay_condition].types.map(type => i18n(type)); const weatherTypeIcons = weatherType.map(type => { return `${type}/` }) const updatedDate = new Date(weather.updated * 1000); let extraContent = !showWeatherDetails ? `
` : - `
Cell ID: ${weather.id}
- Cell Level: ${weather.level}
- Lat: ${weather.latitude.toFixed(5)}
- Lon: ${weather.longitude.toFixed(5)}
- Gameplay Condition: ${getWeatherName(weather.gameplay_condition)}
- Wind Direction: ${weather.wind_direction}° (${degreesToCardinal(weather.wind_direction)})
- Cloud Level: ${weather.cloud_level}
- Rain Level: ${weather.rain_level}
- Wind Level: ${weather.wind_level}
- Snow Level: ${weather.snow_level}
- Fog Level: ${weather.fog_level}
- Special Effects Level: ${weather.special_effect_level}
- Severity: ${weather.severity}
- Weather Warning: ${weather.warn_weather}

` + `
${i18n('popup_cell_id')}: ${weather.id}
+ ${i18n('popup_cell_level')}: ${weather.level}
+ ${i18n('popup_lat')}: ${weather.latitude.toFixed(5)}
+ ${i18n('popup_lon')}: ${weather.longitude.toFixed(5)}
+ ${i18n('popup_gameplay_condition')}: ${getWeatherName(weather.gameplay_condition)}
+ ${i18n('popup_wind_direction')}: ${weather.wind_direction}° (${degreesToCardinal(weather.wind_direction)})
+ ${i18n('popup_cloud')}: ${weather.cloud_level}
+ ${i18n('popup_rain')}: ${weather.rain_level}
+ ${i18n('popup_wind')}: ${weather.wind_level}
+ ${i18n('popup_snow')}: ${weather.snow_level}
+ ${i18n('popup_fog')}: ${weather.fog_level}
+ ${i18n('popup_special_effects')}: ${weather.special_effect_level}
+ ${i18n('popup_severity')}: ${weather.severity}
+ ${i18n('popup_warning')}: ${weather.warn_weather}

` const content = `
-
${weatherName}
- Boosted Types:
${weatherType.join(', ')}
+
${weatherName}
+ ${i18n('popup_boosted')}:
${weatherType.join(', ')}
${weatherTypeIcons.join(' ')}
${extraContent} - Last Updated: ${updatedDate.toLocaleTimeString(dateTimeLocale)} (${getTimeSince(updatedDate)}) + ${i18n('popup_last_updated')}: ${updatedDate.toLocaleTimeString(dateTimeLocale)} (${getTimeSince(updatedDate)})
`; return content; } @@ -3768,13 +3767,13 @@ function getNestPopupContent(nest) { const content = `
Park: ${nest.name}
- Pokemon: ${pokemonName}
- Average: ${nest.pokemon_avg.toLocaleString()}
- Count: ${nest.pokemon_count.toLocaleString()}
-
Last Updated: ${lastUpdated.toLocaleString()}
+ ${i18n('filter_pokemon')}: ${pokemonName}
+ ${i18n('popup_average')}: ${nest.pokemon_avg.toLocaleString()}
+ ${i18n('popup_count')}: ${nest.pokemon_count.toLocaleString()}
+
${i18n('popup_last_updated')}: ${lastUpdated.toLocaleString()}

- Nest data is estimated
- Verify by checking current spawns
+ ${i18n('popup_nest_data')}
+ ${i18n('popup_verify_by_checking')}
`; return content; } @@ -3789,9 +3788,9 @@ function getPortalPopupContent(portal) {
- Last Updated: ${updated} + ${i18n('popup_last_updated')}: ${updated}

- Date Imported: ${imported} + ${i18n('popup_date_imported')}: ${imported}
` + getNavigation(portal) + ` `; return content; @@ -3811,17 +3810,17 @@ const getNavigation = (data) => { @@ -4445,7 +4444,7 @@ function getSpawnpointMarker (spawnpoint, ts) { const hasTimer = spawnpoint.despawn_second !== null; if (hasTimer) { const timer = Math.round(spawnpoint.despawn_second / 60); - content += '
Despawn Timer: ' + timer + ' minutes'; + content += `
${i18n('popup_despawn_timer')}: ${timer} ${i18n('popup_minutes')}`; } const circle = L.circle([spawnpoint.lat, spawnpoint.lon], { color: hasTimer ? 'green' : 'red', @@ -4571,13 +4570,13 @@ function getDeviceMarker (device, ts) { function getDevicePopupContent (device) { const lastSeenDate = new Date(device.last_seen * 1000); - const lastSeen = lastSeenDate.toLocaleTimeString(dateTimeLocale) + ' (' + getTimeSince(lastSeenDate) + ')'; + const lastSeen = `${lastSeenDate.toLocaleTimeString(dateTimeLocale)} (${getTimeSince(lastSeenDate)})`; const ts = Math.round((new Date()).getTime() / 1000); const isOffline = isDeviceOffline(device, ts); - const content = '
' + device.uuid + '

' + - 'Instance: ' + device.instance_name + '
' + - 'Last Seen: ' + lastSeen + '
' + - 'Status: ' + (isOffline ? 'Offline' : 'Online'); + const content = `
${device.uuid}

+ ${i18n('popup_instance')}:${device.instance_name}
+ ${i18n('popup_last_seen')}:${lastSeen}
+ ${i18n('popup_status')}:(${isOffline ? i18n('popup_offline') : i18n('popup_online')})`; return content; } @@ -5776,7 +5775,7 @@ function manageIVPopup (id, filter) { success = true; } else { success = false; - alert('Invalid IV Filter!'); + alert(`${i18n('popup_invalid_iv_filter')}`); } if (!success) { if (prevShow === true) { @@ -5804,7 +5803,7 @@ function manageColorPopup (id, filter) { success = true; } else { success = false; - alert('Invalid color value!'); + alert(`${i18n('popup_invalid_color_value')}`); } if (!success) { if (prevShow === true) { @@ -5824,7 +5823,7 @@ function manageGlobalIVPopup (id, filter) { filter['iv_' + id].filter = result; return true; } else { - alert('Invalid IV Filter!'); + alert(`${i18n('popup_invalid_iv_filter')}`); return false; } } @@ -5837,7 +5836,7 @@ function manageGlobalAveragePopup (id, filter) { filter[id].filter = result; return true; } else { - alert('Invalid Nest Filter!'); + alert(`${i18n('popup_invalid_nest_filter')}`); return false; } } @@ -5850,7 +5849,7 @@ function manageGlobalCandyCountPopup (id, filter) { filter[id].filter = result; return true; } else { - alert('Invalid Quest Filter!'); + alert(`${i18n('popup_invalid_candy_filter')}`); return false; } } @@ -5863,7 +5862,7 @@ function manageGlobalStardustCountPopup (id, filter) { filter[id].filter = result; return true; } else { - alert('Invalid Quest Filter!'); + alert(`${i18n('popup_invalid_stardust_filter')}`); return false; } } @@ -5934,11 +5933,11 @@ function getLureIconId (lureId) { } function getSize (size) { - if (size < 1.5) return 'Tiny'; - if (size <= 1.75) return 'Small'; - if (size < 2.25) return 'Normal'; - if (size <= 2.5) return 'Large'; - return 'Big'; + if (size < 1.5) return i18n('tiny'); + if (size <= 1.75) return i18n('small'); + if (size < 2.25) return i18n('normal'); + if (size <= 2.5) return i18n('large'); + return i18n('big'); } function getPokemonIcon(pokemonId, form = 0, evolution = 0, gender = 0, costume = 0, shiny = false) { diff --git a/static/locales/_en.json b/static/locales/_en.json index cd188577..89ab9463 100644 --- a/static/locales/_en.json +++ b/static/locales/_en.json @@ -5,6 +5,9 @@ "nav_logout": "Logout", "nav_register": "Register", "nav_login": "Login", + "nav_google_maps": "Open in Google Maps", + "nav_apple_maps": "Open in Apple Maps", + "nav_waze_maps": "Open in Wave", "title_profile": "Profile", "title_login": "Login", "title_register": "Login", @@ -83,10 +86,10 @@ "filter_global_avg": "Nest Avg Limit", "filter_global_candy_count": "Rare Candy Limit", "filter_global_stardust_count": "Stardust Limit", - "filter_and": "And", - "filter_or": "Or", - "filter_on": "On", - "filter_off": "Off", + "filter_and": "AND", + "filter_or": "OR", + "filter_on": "ON", + "filter_off": "OFF", "filter_old": "Old", "filter_new": "New", "filter_configure": "Configure", @@ -195,5 +198,157 @@ "prompt_color_value": "Please enter a color value. (i.e. red, blue, green, etc)", "prompt_nest_avg": "Please enter a nest count average to filter. Example: 5", "prompt_candy_amount": "Please enter a candy amount to filter. Example: 2", - "prompt_stardust_amount": "Please enter a stardust amount to filter. Example: 0, 200, 500, 1000, 1500, etc" -} \ No newline at end of file + "prompt_stardust_amount": "Please enter a stardust amount to filter. Example: 0, 200, 500, 1000, 1500, etc", + "popup_slots_available": "Slots Available", + "popup_guard": "Guard", + "popup_total_cp": "Total CP", + "popup_gym_under_attack": "Gym is Under Attack!", + "popup_raid_start": "Raid Start", + "popup_raid_end": "Raid End", + "popup_perfect_cp": "Perfect CP", + "popup_worst_cp": "Worst CP", + "popup_cp": "CP", + "popup_last_updated": "Last Updated", + "popup_last_modified": "Last Modified", + "popup_level": "Level", + "popup_s2_cell": "S2 Cell", + "popup_cell_id": "Cell ID", + "popup_cell_level": "Cell Level", + "popup_id": "ID", + "popup_lat": "Lat", + "popup_lon": "Lon", + "popup_gameplay_condition": "Gameplay Condition", + "popup_team": "Team", + "popup_gym_last_seen_in_battle": "Gym last seen in battle!", + "popup_ex": "EX", + "popup_mega": "Mega", + "popup_evolution": "Evolution", + "popup_fast": "Fast", + "popup_charge": "Charge", + "popup_unknown_raid_boss": "Unknown Raid Boss", + "popup_egg": "Egg", + "popup_unknown_gym_name": "Unknown Gym Name", + "popup_giovanni": "Giovanni", + "popup_exclude_quest": "Exclude Quest", + "popup_filter_quest": "Filter Quest", + "popup_hide_quest": "Hide Quest", + "popup_reward": "Reward", + "popup_quest": "Quest", + "popup_team_rocket_invasion": "Team Rocket Invasion", + "popup_end_time": "End Time", + "popup_lure_type": "Lure Type", + "popup_lure_end_time": "Lure End Time", + "popup_unknown_pokestop_name": "Unknown Pokestop Name", + "popup_scan_with_event_account": "Scan with Event Account", + "popup_timer": "Timer", + "popup_hide": "Hide", + "popup_exclude": "Exclude", + "popup_theoretical_mega_stat": "Theoretical Mega Stat", + "popup_first_last": "First/Last Seen", + "popup_last_seen": "Last Seen", + "popup_despawn": "Despawn", + "popup_lvl": "Lvl", + "popup_cp_too_high": "CP Too High", + "popup_rank": "Rank", + "popup_form": "Form", + "popup_count": "Count", + "popup_total": "Total", + "popup_total_count": "Total Count", + "popup_pokestop_count": "Pokestop Count", + "popup_gym_count": "Gym Count", + "popup_submissions_until_gym": "Submissions Until New Gym", + "popup_never": "Never", + "popup_next_submission": "Next submission will cause a Gym!", + "popup_wind_direction": "Wind Direction", + "popup_wind": "Wind Level", + "popup_cloud": "Cloud Level", + "popup_rain": "Rain Level", + "popup_snow": "Snow Level", + "popup_fog": "Fog Level", + "popup_special_effects": "Special Effects Level", + "popup_severity": "Severity", + "popup_warning": "Weather Warning", + "popup_boosted": "Boosted Types", + "popup_park": "Park", + "popup_average": "Average", + "popup_nest_data": "Nest Data is Estimated", + "popup_verify_by_checking": "Verify by Checking Current Spawns", + "popup_date_imported": "Date Imported", + "popup_despawn_timer": "Despawn Timer", + "popup_minutes": "Minutes", + "popup_instance": "Instance", + "popup_status": "Status", + "popup_online": "Online", + "popup_offline": "Offline", + "popup_invalid_iv_filter": "Invalid IV Filter!", + "popup_invalid_color_value": "Invalid Color Value!", + "popup_invalid_nest_filter": "Invalid Nest Filter!", + "popup_invalid_candy_filter": "Invalid Candy Filter!", + "popup_invalid_stardust_filter": "Invalid Stardust Filter!", + "tiny": "Tiny", + "small": "Small", + "normal": "Normal", + "large": "Large", + "big": "Big", + "weather_none": "None", + "weather_clear": "Clear", + "weather_rain": "Rain", + "weather_partly_cloudy": "Partly Cloudy", + "weather_cloudy": "Cloudy", + "weather_windy": "Windy", + "weather_snow": "Snow", + "weather_fog": "Fog", + "fire": "Fire", + "grass": "Grass", + "ground": "Ground", + "water": "Water", + "electric": "Electric", + "bug": "Bug", + "rock": "Rock", + "fairy": "Fairy", + "fighting": "Fighting", + "poison": "Poison", + "dragon": "Dragon", + "flying": "Flying", + "psychic": "Psychic", + "ice": "Ice", + "steel": "Steel", + "dark": "Dark", + "ghost": "Ghost", + "common": "Common", + "uncommon": "Uncommon", + "rare": "Rare", + "ultra_rare": "Ultra Rare", + "regional": "Regional", + "event": "Event", + "kanto": "Kanto", + "johto": "Johto", + "hoenn": "Hoenn", + "sinnoh": "Sinnoh", + "unova": "Unova", + "kalos": "Kalos", + "alolan": "Alolan", + "galarian": "Galarian", + "ways_to_filter": "Ways to Filter", + "general_basics": "General Basics", + "iv_range": "IV Range", + "iv_result": "90-100% IV Pokemon", + "level_range": "Level Range", + "level_result": "Level 30 to 35 Pokemon", + "stats": "Stats", + "stats_result": "Pokemon with 0-1 Attack, 14 Defense, & 15 Stamina", + "cp_result": "All Pokemon with CP of 2000-3000", + "not": "NOT", + "not_result": "All Pokemon that do not have their IVs scanned", + "pvp": "PVP", + "pvp_result": "Pokemon that are rank 1-3 for either Great League OR Ultra League", + "stringing_conditions_together": "Stringing Conditions Together", + "or": "OR", + "or_explanation": "OR operator, for setting separate conditions", + "example": "Example", + "or_result": "Returns all Pokemon that are either 95-100% IV, L35, OR have a CP of 2500-4000", + "and_explanation": "AND operator, for chaining conditions together", + "and_result": "All Pokemon with IVs between 80-100, are L25-30, AND have stats of 15/10/10", + "advanced": "Advanced", + "advanced_result": "Returns all Pokemon that have either CP1400-1500 OR CP2400-2500 AND have 0-1 Attack, 15 Defense, 15 Stamina, OR level 34-35 OR 90-100% IVs OR PVP Great or Ultra league rank between 1-3." + } \ No newline at end of file
- +      - +      - +