Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: quest_shiny_probability pokestop popup and add german translation #1097

Merged
merged 2 commits into from
Mar 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/locales/lib/human/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@
"with_ar": "Mit AR",
"without_ar": "Ohne AR",
"both": "Beide",
"shiny_probability": "Shinyrate: {{p}}",
"badge_0": "keiner",
"badge_1": "Basis",
"badge_2": "Bronze",
Expand Down
4 changes: 2 additions & 2 deletions src/features/pokestop/PokestopPopup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export function PokestopPopup({
}}
>
<QuestConditions {...quest} />
{quest.quest_shiny_probability && (
{!!quest.quest_shiny_probability && (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀 What is this fixing? Was it not working before?

Copy link
Contributor

@Fabio1988 Fabio1988 Mar 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments in Discord, weird symbols :)
Not sure what the required fix is :)

https://discord.com/channels/907337201044582452/968137447936491570/1349686252781309993

<>
<br />
<Typography variant="caption">
Expand Down Expand Up @@ -538,7 +538,7 @@ const readableProbability = (x) => {
const x_1 = Math.round(1 / x)
const percent = Math.round(x * 100)
return Math.abs(1 / x_1 - x) < Math.abs(percent * 0.01 - x)
? `1/${x_1}`
? `1:${x_1}`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with either but is there a reason to prefer this?

: `${percent}%`
}

Expand Down