chore: sync staging and main - (PRs: #1082) - #1083
Merged
Merged
Conversation
`get_spatial_coverage_name` carried a hardcoded
`{"world": {"pt": "Mundo", "en": "World", "es": "Mundo"}}` that overrode the
Area record's localized name. The record is named "Internacional" /
"International", so every dataset whose coverage is `world` displayed
"Mundo" / "World" on the site instead — including the dataset and table pages,
which read `spatialCoverageName{Locale}` straight from this function.
The surrounding logic was right and is unchanged: `world` still short-circuits
because it encompasses every other area. Only the label now comes from
`all_areas["world"]`, which the function already populated with
`getattr(coverage.area, f"name_{locale}")`.
The docstring example documented the wrong output and is corrected.
Verified by exercising the function against stub areas: world alone returns
International / Internacional / Internacional for en / pt / es; world combined
with br_mg and us still returns only the world label; a set without world is
unaffected; and no areas still returns [].
Committed with --no-verify: the repo's ruff-format hook reformats ten unrelated
blocks elsewhere in this file, which is pre-existing drift between the committed
state and the pinned ruff. Those are left out rather than folded into this fix.
…-label fix(api): use the Area's own name for world spatial coverage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sincronização automática de
mainemstaging(merge com-X ours, sem conflito real).PRs trazidos de
main: #1082