mirror of
https://github.com/maputnik/editor.git
synced 2026-12-05 16:24:20 +00:00
Follow-up to the review on #2403. New unit test `src/locales/translations.test.ts` runs the i18next-cli extractor (the code behind `npm run i18n:extract`) without writing anything. It fails if any locale is missing a key used in the code, or still has the `__STRING_NOT_TRANSLATED__` placeholder. It's part of `npm run test-unit`, so the existing unit test job in CI runs it and no workflow change is needed. On failure it lists each missing `locale: key`. On `main` the test fails with 8 keys missing in all 10 locales. They came from #2395, #2397 and #2405. This PR adds translations for them: - `{{label}} row {{row}} anchor` / `X offset` / `Y offset` - `Generate feature IDs`, `Feature ID property`, `Feature ID properties by source layer`, `Enter a JSON object mapping source layer names to property names.` - `Use current map view` The translators listed in `src/locales/README.md` may want to check the wording. I matched the terms each locale already uses (for example "Source Layer", "Map view"). The AGENTS.md Translations section now mentions the test. **Performance:** no runtime impact. It only adds JSON entries and a unit test, which takes about 2 seconds. ## Launch Checklist - [x] Briefly describe the changes in this PR. - [x] Link to related issues: follow-up to #2403. - [x] Include before/after visuals or gifs if this PR includes visual changes. (No visual change in English. The other locales show the new strings instead of the English fallback.) - [x] Write tests for all new functionality: `translations` in `src/locales/translations.test.ts`. It fails on `main` with the 8 missing keys. - [x] Add an entry to `CHANGELOG.md` under the `## main` section. Tested locally: `npm run lint` clean, `npm run build` clean, `npx vitest run` (60 passed), `npm run test-unit-ci` passed, and `npx i18next-cli extract --ci --dry-run` reports no changes. Before adding the translations, the new test failed with the 80 missing `locale: key` entries. Assisted-By: Claude Opus 5.5 (Claude Code). It helped write the test, the translations and this description. I've reviewed and tested the change and can answer questions about it.
6.9 KiB
6.9 KiB
main
✨ Features and improvements
- Edit generated or promoted feature IDs for GeoJSON sources and promoted feature IDs for vector sources.
- Add Polish to the language selector
- Preview sprites in all sprite-backed dropdowns, including icon-image and pattern properties, with searchable names and keyboard selection
- Replace Cypress with Playwright for end-to-end tests and Vitest browser mode (Playwright provider) for component tests; drop the
@shellygo/cypress-test-utilshelper in favour of aMaputnikDriverpage object - Upgrade to MapLibre GL JS 6 and Vite 8, and update the remaining dependencies
- Remove the RTL text plugin, since MapLibre GL JS now renders right-to-left text natively
- Exported HTML now loads MapLibre GL JS as an ES module, since v6 no longer ships a UMD bundle
- Add
font-faces,sky,rollandcenterAltitudeto the style settings modal - The sidebar can now be resized, both as a whole and in the split between the layer list and the layer editor
- Allow viewing and changing the map's max zoom in the debug modal
- Edit
text-variable-anchor-offsetas a list of anchors, each with an x and y offset; it previously showed no input - Set the min and max zoom of a PMTiles source, for example to overzoom past the last zoom level in the file
- Change a layer's type from the layer editor; properties the new type doesn't support are removed
- Add a "Line metrics" checkbox to GeoJSON sources, which
line-gradientneeds to render - Add a "Use current map view" button to the style settings modal that fills center, zoom, bearing and pitch from the map
- ...Add new stuff here...
🐞 Bug fixes
- Keep the color picker within the viewport when opening it near an edge, scrolling, or resizing.
- Open the color picker when clicking a color field's swatch, not only its text input.
- Apply layer renames when pressing Enter or leaving the ID field to avoid validating and saving the style on every keystroke.
- Add distinct screen reader labels for the anchor, X offset, and Y offset in each variable anchor offset row.
- Open
icon-paddingexpressions in the expression editor so they can be viewed and edited. - Fix
icon-paddingshowing four inputs and only saving once all four were filled; it now uses the same add/remove list as other number arrays, up to four values - Make small sprites easier to recognize in the sprite picker with fixed-size previews and high-resolution sprite assets
- Prevent a crash when converting a function to an expression
- Prevent a crash when deleting either stop from a function with two stops
- Preserve expanded layer groups when deleting layers, including the first layer of a group
- The map's data listener now fires on tile loads again, so source and vector layer field autocompletion is populated
- The
maputnikdesktop binary now opens the default browser automatically on startup (opt out with--no-browser) - Keyboard shortcuts now keep working while the map has focus, instead of going dead until the map is blurred
- The map no longer stays blank on load until it is moved, when the style loads before the map is ready
- The debug modal now shows the MapLibre options for any renderer other than OpenLayers (e.g.
mbgljs) - Checkboxes for properties that default to
true(e.g.fill-antialias,text-keep-upright) are now shown checked when the property is unset - Global state values are now saved as JSON (numbers, booleans, arrays, objects) instead of always as strings
- Translate the variable anchor offset row labels, the feature ID fields and the "Use current map view" button in every language, and add a unit test that fails when a translation is missing
- ...Add new stuff here...
3.1.0
✨ Features and improvements
- Added translation to "Links" in debug modal
- Add support for hillshade's color arrays and relief-color elevation expression
- Change layers icons to make them a bit more distinct
- Remove
@mdipackages in favor ofreact-icons - Add ability to control the projection of the map - either globe or mercator
- Add markdown support for doc related to the style-spec fields
- Added global state modal to allow editing the global state
- Added color highlight for problematic properties
- Upgraded codemirror from version 5 to version 6
- Add code editor to allow editing the entire style
- Add support for sprite object in setting modal
- Set the correct map view when opening a new style on an empty map
- Allow root-relative urls in the stylefile
🐞 Bug fixes
- Improved the local style open modal and local file upload.
- Fixed the Expression editor (for long expressions) being able to be float under other components further down
- Fixed an issue when clicking on a popup and then clicking on the map again
- Fix modal close button position
- Fixed an issue with the generation of translations
- Fix missing spec info when clicking next to a property
- Fix Firefox open file that stopped working due to react upgrade
- Fix issue with missing bottom error panel
- Fixed headers in left panes (Layers list and Layer editor) to remain visible when scrolling
- Fix error when using a source from localhost
- Fix an issue with scrolling when using the code editor
3.0.0
✨ Features and improvements
- Fix radio/delete filter buttons styling regression
- Add german translation
- Use same version number for web and desktop versions
- Add scheme type options for vector/raster tile
- Add
tileSizefield for raster and raster-dem tile sources - Update Protomaps Light gallery style to v4
- Add support to edit local files on the file system if supported by the browser
- Upgrade to MapLibre LG JS v5
- Upgrade Vite 6 and Cypress 14 (#970)
- Upgrade OpenLayers from v6 to v10
- When loading a style into localStorage that causes a QuotaExceededError, purge localStorage and retry
- Remove react-autobind dependency
- Remove usage of legacy
childContextTypesAPI - Refactor Field components to use arrow function syntax
- Replace react-autocomplete with Downshift in the autocomplete component
- Add LocationIQ as supported map provider with access token field and gallery style
- Use maputnik go binary for the docker image to allow file watching
- Revmove support for
debugandlocalporturl parameters - Replace react-sortable-hoc with dnd-kit to avoid react console warnings and also use a maintained library
🐞 Bug fixes
- Fix incorrect handing of network error response (#944)
- Show an error when adding a layer with a duplicate ID
- Replace deprecated
ReactDOM.renderusage withcreateRootand drop theDOMNodeRemovedcleanup hack
2.1.1
✨ Features and improvements
- Add GitHub workflows for releasing new versions
- Update desktop build to pull from this repo (#922)
2.0.0
- Update MapLibre to version 4 (#872)
- Start continuous deployment of maputnik website
1.7.0
- See release notes at https://maputnik.github.io/blog/2020/04/23/release-v1.7.0