Find tools in the interface language, translate GeoLibre tool names, and name GeoLibre outputs
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- json, rust
- Domain
- internationalization, localization, search
Research direction
Three separable pieces: start with matches in crates/ui-egui/src/panes.rs, where the Tools pane filter compares the query against the English name, summary and id instead of the tl!(tool.name) the row renders; a unit test with a translated name and an accent-folded query pins it down. The larger piece lives in crates/geolibre (downloading, caching and schema-validating GeoLibre language packs off the UI thread, falling back to English), then crates/geolibre/src/lib.rs, which currently drops io_role: "output" parameters, needs an optional output-name field defaulting to the translated tool name with de-duplication. Done means translated tools are findable, GeoLibre names/descriptions resolve from a pack, and repeated runs get distinct output layer names.
Written by the indexing model from the issue text.
Description
Before you start
- I searched the existing issues and the roadmap and did not find a duplicate request.
What problem does this solve?
In a classroom with the interface in Portuguese (or any language other than English), students can't find tools by their own words, and GeoLibre results come back with English layer names they can't choose.
Three things together, all checked on main (573709f0):
- Find Tools only matches English. The filter in the Tools pane (
crates/ui-egui/src/panes.rs,geoprocessing) compares the query withx.name,x.summaryandx.id, which are the English strings, while the rows showtl!(tool.name). So even a built-in tool that is translated can't be found by what the user sees: with the interface in Portuguese, the row reads Dissolver, but typingdissolverfinds nothing ("dissolve".contains("dissolver")is false). The same goes for Densidade de kernel (Kernel Density). - GeoLibre tools have no translations at all. Their names and summaries come from the runner's manifest and aren't in
i18n/*.tsv, so the rows stay in English and the search has nothing else to match. Typingcurvas de nível(contour lines) returns Accumulation Curvature, Casorati Curvature, and so on, never Contours From Raster. A teacher has to hand out an English word list before every class. - No output name for GeoLibre tools.
crates/geolibre/src/lib.rsdrops the manifest'sio_role: "output"parameters from the form ("outputs are not form fields") and names the layer afterspec.name. Every run of Contours From Raster adds a layer calledContours From Raster, in English, and two runs (10 m and 50 m contours, say) give two layers with the same name that have to be renamed by hand. Built-in tools already takeoutputas the layer name.
Proposed solution
Choices in this proposal
- Search what the user sees, plus the English.
matchesalso teststl!(tool.name)andtl!(tool.summary), and folds accents on both sides, socurvas de nivelmatchescurvas de nível. English stays matched, so tutorials written in English still work. This part is small, needs no new strings, and already fixes built-in tools like Dissolver. - GeoLibre tools use GeoLibre's own language packs. opengeos/geolibre-language-packs (MIT) already translates this catalogue:
v1/whitebox/<locale>.json(schemaschema/v1.json, indexv1/index.json) has, for each tool id, its name, description and every parameter's label and description, plus the category and subcategory names. The Portuguese pack covers 1,066 tools;contours_from_rasteris "Curvas de nível a partir de raster". There are packs for the same languages RustGIS ships (de, es, fr, it, ja, ko, nl, pt, ru, tr, zh and others). GeoLibre keeps them out of the app and downloads one on demand, or imports it from a file. RustGIS can do the same: when the interface language has a pack, offer to download it next to the runner (or import it from a file), cache it, and look up a GeoLibre tool's name, summary, parameter labels, help and toolbox names there, falling back to English. That needs no new strings in RustGIS's catalogues and no translation work on our side, and stays in step with GeoLibre's catalogue. The packs are untrusted input, as GeoLibre treats them: validate them against the schema, accept string leaves only, and cap their size. - An optional "Output name" field on GeoLibre tools. For each
io_role: "output"parameter, the form gets a text field. It starts empty, and its hint shows the default name, which is now the translated tool name (tl!(spec.name), plus the output's label when there are several, as today). A name already in use gets a number, as withgp.batch'soutputPattern. From a script, the parameter takes the sameoutputkey the built-in tools use, sogp.runreads the same for both.
Estimated scope
Medium, in three PRs. Search: crates/ui-egui/src/panes.rs only. Language packs: crates/geolibre (download, cache, validation, lookup) and the tool form and rows, no new dependency (serde_json is already there); the download runs off the UI thread like the runner's download. Output name: crates/geolibre/src/lib.rs (form field and naming) plus the tool form.
Alternatives considered
- Our own catalogue of GeoLibre strings in
i18n/. A thousand-plus tools times every language, kept in step with the runner by hand, when GeoLibre already maintains the same strings. - Bundle the packs in RustGIS. About 1.8 MB per language. GeoLibre keeps them out of its builds for that reason, and an on-demand download fits RustGIS's handling of the runner itself.
- Only add aliases (keywords) to the search. Helps find a tool, but the rows and layer names stay in English, which is the confusing part for students.
- Keep the English layer name and let users rename. That is today's workaround. Two runs giving two layers with the same name is the part that trips people up.
Tests: a unit test for matches with a translated name and an accent-folded query, and one for the GeoLibre job naming the output from the given output and from the default.
- Dominant language
- Rust
- Stars
- 1.9k
- Forks
- 268
- Avg merge
- 11h 1m
- Merged PRs (30d)
- 942
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from opengeos/RustGIS
-
[Bug]: layer.move to the place a layer already has fails and stops a script; with several layers it leaves an empty undo stepPossibly taken @jgregoriorincon claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
opengeos/RustGIS#2621 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 61/100
opengeos/RustGIS#1446 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
All issues in opengeos/RustGIS
Similar issues
-
postgresql-rules / queue-rules: implicit KEY SHARE before a parent key update, and job self-overlapOpen
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
jonathanong/no-mistakes#3879 ·
Maintainers usually reply within 1 day
-
area:index v0.35.0
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
nautechsystems/nautilus_trader#5741 ·
Maintainers usually reply within 1 day
-
RunPlugin derives Hash over all fields while PartialEq compares only location and configurationOpen
Difficulty 1/5 Under an hour Newbie friendliness 86/100
zellij-org/zellij#5969 ·
Maintainers usually reply within 1 day
-
eth_get_proof reports another account's fields for an absent accountPossibly taken @Indian-boult claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day