-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Osmose Q/A layer #7095
Add Osmose Q/A layer #7095
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@SilentSpike Thanks for your continued work on this! Let us know if you need any advice/assistance and when this is ready for review.
Hmm we don't really have any other external translation integrations like this but it'd be worth looking into if there are are lots of strings. |
For now the Osmose analyzers (backend) have more than 500 strings. But I am on integrating doc to transifex. Each class of issue will have a title, a description, a how to fix, a tips on trap to avoid and example plus a contextual message with placeholder. For now only title and contextual message are present. The process of adding the others is ongoing. The text with placeholder are already replaced and translated on Osmose API, the placeholder are not available at the API level. Osmose analyzers also run JOSM validator and reuse the JOSM translation. The Osmose API aka Frontend aka Website also contains issues reported by other parties. We have no the hand over thus texts and availability of translations. |
Note this API http://osmose.openstreetmap.fr/api/0.3beta/items |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
It is better to use "issue" than "error" on buttons. The ignore button is not well named. It is not an ignore action, but flag the issue as false positive for the current user, but all the users. Then no more displayed. |
Easily changed, those are just reused strings from the other QA services. We actually seem to interchange "error" and "issue" in a few places would be good to make those all consistent. |
This comment has been minimized.
This comment has been minimized.
I am interested in improving the wording directly into Osmose. Plus it can help to avoid re-wording/translation in iD.
When it will be ready! The API 0.3 was started in summer '18, so I do not know I will be completed. Sure, it will take some more months. But if you choose to use the 0.3beta we will pay attention to it. Some other few softwares already use it. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@frodrigo Had a quick discussion and we agree that it'd be ideal to use the Osmose strings directly and align our interests. In terms of the API "wants" to make this possible for iD:
In the meantime I've forked the backend and will see about updating some of the English titles |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Also only add sections where appropriate
Providing a `langs` param that's currently not implemented so these will all be English until that is done.
- Only requesting the data we need (Osmose has many more issue types than iD will ever display)
Improves structure of the details UI and introduces the use of flexboxes for this. Does not break UI for other error services with shared classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again, @SilentSpike, this looks awesome. I made a few nitpicky comments about UI stuff but the underlying functionality appears to work fine.
The one thing I'd like to hold back on for the moment is adding the closed issue changeset tags. Other than that we can address the UI stuff before or after merging.
data/core.yaml
Outdated
elems_title: Issue Elements | ||
fix_title: Fix Guidelines | ||
trap_title: Common Mistakes | ||
translation: Translations supplied by Osmose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might just say "Translate", and maybe hide the button unless there are untranslated strings onscreen.
Separately, we should add text to iD's documentation about where you can translate the Osmose strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe there's no way for us to check whether untranslated strings are present (since the API automatically falls back to English strings and they all get cached under the current language code).
My thinking with not using a "call to action" here is that if there are issues with the strings or missing translations then a user inclined to improve them knows where they come from - and if there aren't then it's still nice to acknowledge they're supplied by a 3rd party.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm we could fetch the English strings too and see if they're equivalent? The issue for me is that the string is sort of long and overly draws my attention. "Translations by Osmose" might be a small improvement. It'd also help to put the button under the grey box or to at least give it a greater margin.
Another issue is that I think we use a verb phrase everywhere else we use the outlink icon. Something like "View translations" would keep that while being less "asky". We could also use a different icon.
Just note that the API 0.3 of Osmose is now released. No change in the API, just it is now 0.3 in place of 0.3beta. The 0.3beta is still valid URL path and redirect to 0.3. |
Great to hear! I'll update the iD source to use the new path 🥳 |
Closes #5682
This is a functional Q/A layer with support for a reasonable number of issue types. Supporting new issues is as simple as giving them an icon entry in the
qa_errors.json
data file.Some implementation notes:
item
andclass
combination (both integer values). To identify specific issues we concatenate as a stringitem-class
.item-class
indata/qa_errors.json
.item=
filter since Osmose tiles can return a maximum number of issues (we want to show the user as many as possible).langs=
filter and as individual requests for eachitem-class
(as Promises).Preview of the UI in action:
