Skip to content
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
8 changes: 4 additions & 4 deletions changelog.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@
version = "2.0.0"
date = 2026-12-01
en = [
"European edition: this year's pictures come from all over Europe.",
"Europe edition: this year's pictures come from all over Europe.",
"New scoring: points go down smoothly the further off you are, and the clock wraps around midnight (23:50 is 20 minutes away from 00:10).",
"Same-day bonus: +20 points if you guess before the next picture unlocks.",
"You can sign up with an email and a password. Discord, GitHub and Microsoft still work.",
"New players get a random animal name, like brave-badger. You can change it from your profile page.",
"Players from 2025 keep their account and their name.",
"Last year's game is archived: switch to the Sweden 2025 edition on the leaderboard or on your profile to see the final ranking and your guesses.",
"Last year's game is archived: switch to 2025 on the leaderboard or on your profile to see the final ranking and your guesses.",
"The whole site was rebuilt from scratch on sturdier foundations.",
]
fr = [
"Édition européenne : les photos de cette année viennent de toute l'Europe.",
"Édition Europe : les photos de cette année viennent de toute l'Europe.",
"Nouveau calcul des points : ils baissent progressivement avec ton écart, et l'horloge fait le tour de minuit (23:50 est à 20 minutes de 00:10).",
"Bonus du jour : +20 points si tu devines avant que la photo suivante se débloque.",
"Tu peux t'inscrire avec un e-mail et un mot de passe. Discord, GitHub et Microsoft marchent toujours.",
"Les nouveaux joueurs reçoivent un nom d'animal au hasard, comme brave-badger. Tu peux le changer depuis ta page de profil.",
"Les joueurs de 2025 gardent leur compte et leur nom.",
"Le jeu de l'an dernier est archivé : passe à l'édition Stockholm 2025 sur le classement ou sur ton profil pour revoir le classement final et tes réponses.",
"Le jeu de l'an dernier est archivé : passe à 2025 sur le classement ou sur ton profil pour revoir le classement final et tes réponses.",
"Tout le site a été reconstruit de zéro, sur des bases plus solides.",
]
2 changes: 1 addition & 1 deletion locales/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ check_point_system = "Check point system"

[edition]
y2025 = "Sweden 2025 edition"
y2026 = "European 2026 edition"
y2026 = "Europe 2026 edition"

[index]
about = "About"
Expand Down
2 changes: 1 addition & 1 deletion locales/fr.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ check_point_system = "Calcul du score"

[edition]
y2025 = "Édition Stockholm 2025"
y2026 = "Édition européenne 2026"
y2026 = "Édition Europe 2026"

[index]
about = "À Propos"
Expand Down
12 changes: 6 additions & 6 deletions src/web/pages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ fn pick_edition(raw: Option<&str>) -> Option<&'static Edition> {

struct EditionLink {
href: String,
label: &'static str,
year: i32,
selected: bool,
}

/// The edition switcher on `path`, newest first.
fn edition_links(t: Tr, path: &str, selected: &Edition) -> Vec<EditionLink> {
/// The edition switcher on `path`, newest first. It shows only years: the page header names the edition.
fn edition_links(path: &str, selected: &Edition) -> Vec<EditionLink> {
game::EDITIONS
.iter()
.rev()
.map(|e| EditionLink {
href: format!("{path}?edition={}", e.year),
label: edition_label(t, e),
year: e.year,
selected: e.year == selected.year,
})
.collect()
Expand Down Expand Up @@ -391,7 +391,7 @@ pub async fn leaderboard(ctx: Ctx, State(state): State<AppState>, Query(query):
t: ctx.t,
year: edition.year,
edition_label: edition_label(ctx.t, edition),
editions: edition_links(ctx.t, "/leaderboard", edition),
editions: edition_links("/leaderboard", edition),
archived: edition.year != game::current().year,
max_score_text,
rows,
Expand Down Expand Up @@ -482,7 +482,7 @@ pub async fn profile(ctx: Ctx, State(state): State<AppState>, Query(query): Quer
render(ProfilePage {
t: ctx.t,
edition_label: edition_label(ctx.t, edition),
editions: edition_links(ctx.t, "/me", edition),
editions: edition_links("/me", edition),
archived: edition.year != game::current().year,
name: user.name,
account_label: provider,
Expand Down
7 changes: 5 additions & 2 deletions src/web/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ async fn static_pages_render() {

let footer = format!(r#"<a href="/changelog">v{}"#, crate::changelog::VERSION);
assert!(get(&app, "/", None).await.body.contains(&footer));
assert!(get(&app, "/changelog", None).await.body.contains("European edition"));
assert!(get(&app, "/changelog", None).await.body.contains("Europe edition"));
}

#[tokio::test]
Expand Down Expand Up @@ -338,7 +338,10 @@ async fn past_editions_stay_visible() {

let board = get(&app, "/leaderboard?edition=2025", None).await;
assert!(board.body.contains(&alice.name) && board.body.contains(&format!(r#"<td class="score">{points} "#)));
assert!(board.body.contains("Sweden 2025 edition") && board.body.contains(r#"href="/leaderboard?edition=2026""#));
assert!(
board.body.contains("Sweden 2025 edition")
&& board.body.contains(r#"<a href="/leaderboard?edition=2026">2026</a>"#)
);
assert!(
!board.body.contains("/about#faq-point-system"),
"the about page explains this year's scoring"
Expand Down
2 changes: 1 addition & 1 deletion templates/editions.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% if editions.len() > 1 %}
<p class="editions">
{% for e in editions %}{% if !loop.first %} · {% endif %}{% if e.selected %}<b>{{ e.label }}</b>{% else %}<a href="{{ e.href }}">{{ e.label }}</a>{% endif %}{% endfor %}
{% for e in editions %}{% if !loop.first %} · {% endif %}{% if e.selected %}<b>{{ e.year }}</b>{% else %}<a href="{{ e.href }}">{{ e.year }}</a>{% endif %}{% endfor %}
</p>
{% endif %}
Loading