(${gym.availble_slots === 0 ? i18n('popup_full') : gym.availble_slots === 6 ? i18n('popup_empty') : gym.availble_slots})
';
@@ -3699,13 +3698,13 @@ function getGymPopupContent (gym) {
content += '
';
if (isRaid && !isRaidBattle) {
- content += '
Raid Start: ' + raidBattleDate.toLocaleTimeString() + ' (' + getTimeUntil(raidBattleDate) + ')
';
+ content += `
${i18n('popup_raid_start')}: ` + raidBattleDate.toLocaleTimeString() + ' (' + getTimeUntil(raidBattleDate) + ')
';
}
if (isRaid) {
- content += '
Raid End: ' + raidEndDate.toLocaleTimeString() + ' (' + getTimeUntil(raidEndDate) + ')
';
+ content += `
${i18n('popup_raid_end')}: ${raidEndDate.toLocaleTimeString()} (${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)}
`;
}
}
@@ -3718,10 +3717,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() + ' ' + updatedDate.toLocaleTimeString() + ' (' + getTimeSince(updatedDate) + ')
';
+ content += `
${i18n('popup_last_updated')}: ${updatedDate.toLocaleDateString()} ${updatedDate.toLocaleTimeString()} (${getTimeSince(updatedDate)})
`;
}
if (modifiedDate) {
- content += '
Last Modified: ' + modifiedDate.toLocaleDateString() + ' ' + modifiedDate.toLocaleTimeString() + ' (' + getTimeSince(modifiedDate) + ')
';
+ content += `
${i18n('popup_last_modified')}: ${modifiedDate.toLocaleDateString()} ${modifiedDate.toLocaleTimeString()} (${getTimeSince(modifiedDate)})
`;
}
content += getNavigation(gym);
return content;
@@ -3729,12 +3728,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() + ' (' + getTimeSince(updatedDate) + ')';
+ content += `${i18n('popup_last_updated')}: ${updatedDate.toLocaleTimeString()} (${getTimeSince(updatedDate)})`;
content += ' ';
return content;
}
@@ -3742,22 +3741,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 += ' ';
@@ -3779,27 +3778,27 @@ function getWeatherPopupContent (weather) {
})
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(', ')}
+ ${i18n('popup_boosted')}: ${weatherType.join(', ')}
${weatherTypeIcons.join(' ')}
${extraContent}
- Last Updated: ${updatedDate.toLocaleTimeString()} (${getTimeSince(updatedDate)})
+ ${i18n('popup_last_updated')}: ${updatedDate.toLocaleTimeString()} (${getTimeSince(updatedDate)})
`;
return content;
}
@@ -3810,13 +3809,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;
}
@@ -3831,9 +3830,9 @@ function getPortalPopupContent(portal) {
- Last Updated: ${updated}
+ ${i18n('popup_last_updated')}: ${updated}
-
Date Imported: ${imported}
+
${i18n('popup_date_imported')}: ${imported}
` + getNavigation(portal) + `
`;
return content;
@@ -3853,17 +3852,17 @@ const getNavigation = (data) => {
-
+
-
+
-
+
@@ -4487,7 +4486,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',
@@ -4613,13 +4612,13 @@ function getDeviceMarker (device, ts) {
function getDevicePopupContent (device) {
const lastSeenDate = new Date(device.last_seen * 1000);
- const lastSeen = lastSeenDate.toLocaleTimeString() + ' (' + getTimeSince(lastSeenDate) + ')';
+ const lastSeen = `${lastSeenDate.toLocaleTimeString()} (${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;
}
@@ -5818,7 +5817,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) {
@@ -5846,7 +5845,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) {
@@ -5866,7 +5865,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;
}
}
@@ -5879,7 +5878,7 @@ function manageGlobalAveragePopup (id, filter) {
filter[id].filter = result;
return true;
} else {
- alert('Invalid Nest Filter!');
+ alert(`${i18n('popup_invalid_nest_filter')}!`);
return false;
}
}
@@ -5892,7 +5891,7 @@ function manageGlobalCandyCountPopup (id, filter) {
filter[id].filter = result;
return true;
} else {
- alert('Invalid Quest Filter!');
+ alert(`${i18n('popup_invalid_candy_filter')}!`);
return false;
}
}
@@ -5905,7 +5904,7 @@ function manageGlobalStardustCountPopup (id, filter) {
filter[id].filter = result;
return true;
} else {
- alert('Invalid Quest Filter!');
+ alert(`${i18n('popup_invalid_stardust_filter')}!`);
return false;
}
}
@@ -5976,11 +5975,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..24cbf1be 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",
@@ -195,5 +198,97 @@
"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",
+ "popup_invalid_candy_filter": "Invalid Candy Filter",
+ "popup_invalid_stardust_filter": "Invalid Stardust Filter",
+ "tiny": "Tiny",
+ "small": "Small",
+ "normal": "Normal",
+ "large": "Large",
+ "big": "Big",
+ "default_stuff": "Default"
+ }
\ No newline at end of file
From c2c205571d5dfad138060f5b18127059b177717a Mon Sep 17 00:00:00 2001
From: TurtIeSocks <58572875+TurtIeSocks@users.noreply.github.com>
Date: Thu, 8 Apr 2021 17:30:08 -0400
Subject: [PATCH 2/3] More Translations
- Move ! into translation
- Translate Rarity Tiers
- Translate help menu
- Translate weather and boosted types
---
src/views/index.mustache | 92 +++++++++++++++++------------------
static/data/weathertypes.json | 30 ++++++------
static/js/index.js | 24 ++++-----
static/locales/_en.json | 80 ++++++++++++++++++++++++++----
4 files changed, 143 insertions(+), 83 deletions(-)
diff --git a/src/views/index.mustache b/src/views/index.mustache
index 0d923bd9..b995fa4b 100644
--- a/src/views/index.mustache
+++ b/src/views/index.mustache
@@ -292,22 +292,22 @@
@@ -318,22 +318,22 @@
{{quick_start_pokemon_btn}}
@@ -356,38 +356,38 @@
-
Ways To Filter
+
{{ways_to_filter}}
-
General Basics
+
{{general_basics}}
- IV Range: 90-100 - 90-100% IV Pokemon
- Level Range: L30-35 - Level 30 to 35 Pokemon
- Stats: A0-1 & D14 & S15 - Pokemon with 0-1 Attack, 14 Defense & 15 Stamina
- CP: CP2000-3000 - All Pokemon with CP of 2000-3000
- NOT: !0-100 - All Pokemon that do not have their IVs scanned
- PVP: GL1-3 | UL1-3 - Pokemon that are rank 1-3 for either Great League or Ultra League
+ {{iv_range}}: 90-100 - {{iv_example}}
+ {{level_range}}: L30-35 - {{level_example}}
+ {{stats}}: A0-1 & D14 & S15 - {{stats_example}}
+ {{popup_cp}}: CP2000-3000 - {{cp_example}}
+ {{not}}: !0-100 - {{not_example}}
+ {{pvp}}: GL1-3 | UL1-3 - {{pvp_example}}
-
Stringing Conditions Together
+
{{stringing_conditions_together}}
- | or , - OR operator, for setting separate conditions
- Example: 95-100 | L35 | CP2500-4000
- Returns all Pokemon that are either 95-100% IV, L35, or have a CP of 2500-4000
+ | {{or}} , - {{or_explanation}}
+ {{example}}: 95-100 | L35 | CP2500-4000
+ {{or_result}}
- & - AND operator, for chaining conditions together
- Example: 80-100 & L25-30 & (A15 & D10 & S10)
- All Pokemon with IVs between 80-100, are L25-30, and have stats of 15/10/10
+ & - {{and_explanation}}
+ {{example}}: 80-100 & L25-30 & (A15 & D10 & S10)
+ {{and_result}}
-
Advanced
+
{{advanced}}
- Example: (A0-1 & D15 & S15 & (CP1400-1500 | CP2400-2500)) | L34-35,90-100 | GL1-3,UL1-3
- 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 betwen 1-3.
+ {{example}}: (A0-1 & D15 & S15 & (CP1400-1500 | CP2400-2500)) | L34-35,90-100 | GL1-3,UL1-3
+ {{advanced_results}}
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 0953e6a4..78bcc56f 100644
--- a/static/js/index.js
+++ b/static/js/index.js
@@ -3640,7 +3640,7 @@ function getGymPopupContent (gym) {
}
}
if (gym.in_battle) {
- content += `${i18n('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 += `${i18n('popup_form')}: ${getFormName(gym.raid_pokemon_form, true)} `;
@@ -3684,7 +3684,7 @@ function getGymPopupContent (gym) {
content += `${i18n('popup_total_cp')}: ${gym.total_cp.toLocaleString()} `;
}
if (gym.in_battle) {
- content += `${i18n('popup_gym_under_attack')}! `;
+ content += `${i18n('popup_gym_under_attack')} `;
}
if (gym.ex_raid_eligible) {
// content += 'Gym is EX-Raid eligible ';
@@ -3756,7 +3756,7 @@ function getSubmissionTypeCellPopupContent (cell) {
}
if ((cell.count === 1 && cell.count_gyms < 1) || (cell.count === 5 && cell.count_gyms < 2) || (cell.count === 19 && cell.count_gyms < 3)) {
- content += `${i18n('popup_next_submission')}!`;
+ content += `${i18n('popup_next_submission')}`;
}
content += '';
@@ -3771,8 +3771,8 @@ 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 ` `
})
@@ -3794,7 +3794,7 @@ function getWeatherPopupContent (weather) {
${i18n('popup_warning')}: ${weather.warn_weather} `
const content = `
- ${weatherName}
+ ${weatherName}
${i18n('popup_boosted')}: ${weatherType.join(', ')}
${weatherTypeIcons.join(' ')}
${extraContent}
@@ -5817,7 +5817,7 @@ function manageIVPopup (id, filter) {
success = true;
} else {
success = false;
- alert(`${i18n('popup_invalid_iv_filter')}!`);
+ alert(`${i18n('popup_invalid_iv_filter')}`);
}
if (!success) {
if (prevShow === true) {
@@ -5845,7 +5845,7 @@ function manageColorPopup (id, filter) {
success = true;
} else {
success = false;
- alert(`${i18n('popup_invalid_color_value')}!`);
+ alert(`${i18n('popup_invalid_color_value')}`);
}
if (!success) {
if (prevShow === true) {
@@ -5865,7 +5865,7 @@ function manageGlobalIVPopup (id, filter) {
filter['iv_' + id].filter = result;
return true;
} else {
- alert(`${i18n('popup_invalid_iv_filter')}!`);
+ alert(`${i18n('popup_invalid_iv_filter')}`);
return false;
}
}
@@ -5878,7 +5878,7 @@ function manageGlobalAveragePopup (id, filter) {
filter[id].filter = result;
return true;
} else {
- alert(`${i18n('popup_invalid_nest_filter')}!`);
+ alert(`${i18n('popup_invalid_nest_filter')}`);
return false;
}
}
@@ -5891,7 +5891,7 @@ function manageGlobalCandyCountPopup (id, filter) {
filter[id].filter = result;
return true;
} else {
- alert(`${i18n('popup_invalid_candy_filter')}!`);
+ alert(`${i18n('popup_invalid_candy_filter')}`);
return false;
}
}
@@ -5904,7 +5904,7 @@ function manageGlobalStardustCountPopup (id, filter) {
filter[id].filter = result;
return true;
} else {
- alert(`${i18n('popup_invalid_stardust_filter')}!`);
+ alert(`${i18n('popup_invalid_stardust_filter')}`);
return false;
}
}
diff --git a/static/locales/_en.json b/static/locales/_en.json
index 24cbf1be..d54d3302 100644
--- a/static/locales/_en.json
+++ b/static/locales/_en.json
@@ -202,7 +202,7 @@
"popup_slots_available": "Slots Available",
"popup_guard": "Guard",
"popup_total_cp": "Total CP",
- "popup_gym_under_attack": "Gym is Under Attack",
+ "popup_gym_under_attack": "Gym is Under Attack!",
"popup_raid_start": "Raid Start",
"popup_raid_end": "Raid End",
"popup_perfect_cp": "Perfect CP",
@@ -219,7 +219,7 @@
"popup_lon": "Lon",
"popup_gameplay_condition": "Gameplay Condition",
"popup_team": "Team",
- "popup_gym_last_seen_in_battle": "Gym last seen in battle",
+ "popup_gym_last_seen_in_battle": "Gym last seen in battle!",
"popup_ex": "EX",
"popup_mega": "Mega",
"popup_evolution": "Evolution",
@@ -258,7 +258,7 @@
"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_next_submission": "Next submission will cause a Gym!",
"popup_wind_direction": "Wind Direction",
"popup_wind": "Wind Level",
"popup_cloud": "Cloud Level",
@@ -280,15 +280,75 @@
"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",
- "popup_invalid_candy_filter": "Invalid Candy Filter",
- "popup_invalid_stardust_filter": "Invalid Stardust Filter",
+ "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",
- "default_stuff": "Default"
- }
\ No newline at end of file
+ "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_example": "90-100% IV Pokemon",
+ "level_range": "Level Range",
+ "level_example": "Level 30 to 35 Pokemon",
+ "stats": "Stats",
+ "stats_example": "Pokemon with 0-1 Attack, 14 Defense, & 15 Stamina",
+ "cp_example": "All Pokemon with CP of 2000-3000",
+ "not": "NOT",
+ "not_example": "All Pokemon that do not have their IVs scanned",
+ "pvp": "PVP",
+ "pvp_example": "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
From 03bd94ae03a4578a953693046011f3d6b1f5a384 Mon Sep 17 00:00:00 2001
From: TurtIeSocks <58572875+TurtIeSocks@users.noreply.github.com>
Date: Fri, 9 Apr 2021 10:33:23 -0400
Subject: [PATCH 3/3] Cleanup
- More consist use of caps
- Clarified examples->results
---
src/views/index.mustache | 14 +++++++-------
static/locales/_en.json | 26 +++++++++++++-------------
2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/src/views/index.mustache b/src/views/index.mustache
index b995fa4b..aa90d9fa 100644
--- a/src/views/index.mustache
+++ b/src/views/index.mustache
@@ -361,12 +361,12 @@
{{general_basics}}
- {{iv_range}}: 90-100 - {{iv_example}}
- {{level_range}}: L30-35 - {{level_example}}
- {{stats}}: A0-1 & D14 & S15 - {{stats_example}}
- {{popup_cp}}: CP2000-3000 - {{cp_example}}
- {{not}}: !0-100 - {{not_example}}
- {{pvp}}: GL1-3 | UL1-3 - {{pvp_example}}
+ {{iv_range}}: 90-100 - {{iv_result}}
+ {{level_range}}: L30-35 - {{level_result}}
+ {{stats}}: A0-1 & D14 & S15 - {{stats_result}}
+ {{popup_cp}}: CP2000-3000 - {{cp_result}}
+ {{not}}: !0-100 - {{not_result}}
+ {{pvp}}: GL1-3 | UL1-3 - {{pvp_result}}
@@ -387,7 +387,7 @@
{{example}}: (A0-1 & D15 & S15 & (CP1400-1500 | CP2400-2500)) | L34-35,90-100 | GL1-3,UL1-3
- {{advanced_results}}
+ {{advanced_result}}
diff --git a/static/locales/_en.json b/static/locales/_en.json
index d54d3302..89ab9463 100644
--- a/static/locales/_en.json
+++ b/static/locales/_en.json
@@ -86,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",
@@ -332,23 +332,23 @@
"ways_to_filter": "Ways to Filter",
"general_basics": "General Basics",
"iv_range": "IV Range",
- "iv_example": "90-100% IV Pokemon",
+ "iv_result": "90-100% IV Pokemon",
"level_range": "Level Range",
- "level_example": "Level 30 to 35 Pokemon",
+ "level_result": "Level 30 to 35 Pokemon",
"stats": "Stats",
- "stats_example": "Pokemon with 0-1 Attack, 14 Defense, & 15 Stamina",
- "cp_example": "All Pokemon with CP of 2000-3000",
+ "stats_result": "Pokemon with 0-1 Attack, 14 Defense, & 15 Stamina",
+ "cp_result": "All Pokemon with CP of 2000-3000",
"not": "NOT",
- "not_example": "All Pokemon that do not have their IVs scanned",
+ "not_result": "All Pokemon that do not have their IVs scanned",
"pvp": "PVP",
- "pvp_example": "Pokemon that are rank 1-3 for either Great League or Ultra League",
+ "pvp_result": "Pokemon that are rank 1-3 for either Great League OR Ultra League",
"stringing_conditions_together": "Stringing Conditions Together",
- "or": "or",
+ "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",
+ "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",
+ "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