Find tools in the interface language, translate GeoLibre tool names, and name GeoLibre outputs
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- json, rust
- Ambito
- internationalization, localization, search
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 1.9k
- Fork
- 268
- Merge medio
- 11h 1m
- PR unite (30g)
- 942
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di 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 stepForse già presa @jgregoriorincon l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
opengeos/RustGIS#2621 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 61/100
opengeos/RustGIS#1446 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di opengeos/RustGIS
Issue simili
-
文件夹重大BUG:不支持重命名Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
postgresql-rules / queue-rules: implicit KEY SHARE before a parent key update, and job self-overlapAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
jonathanong/no-mistakes#3879 ·
I maintainer di solito rispondono entro 1 giorno
-
area:index v0.35.0
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
pbakaus/impeccable#1653 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
nautechsystems/nautilus_trader#5741 ·
I maintainer di solito rispondono entro 1 giorno