#17514 closed enhancement (fixed)
Allow to paste full changeset URL in fields where a changeset id is expected
Reported by: | GerdP | Owned by: | Upliner |
---|---|---|---|
Priority: | normal | Milestone: | 19.03 |
Component: | Plugin reverter | Version: | |
Keywords: | Cc: |
Description
When you have a full URL like https://www.openstreetmap.org/changeset/68423696
in the clipboard
and open the reverter dialog (Ctrl+Shift+T) the dialog will show an empty field.
If the clipboard contains a number, e.g. 68423696 the dialog will show that number.
The dialog should be able to extract the changeset id from a full URL or a list of URLs separated by space.
Similar problem is in the Changeset Manager dialog, but it doesn't even try to automatically evaluate the clipboard.
Attachments (3)
Change History (17)
by , 6 years ago
Attachment: | 17514.patch added |
---|
by , 6 years ago
Attachment: | 17514-v2.patch added |
---|
comment:1 by , 6 years ago
Please review: Version 2 of the patch also changes the tooltip texts and adds some Javadoc.
I am not sure if the usage I18N.tr()
is OK?
comment:2 by , 6 years ago
No. You never append tr() strings or modify them in any way. If you want to include something, then add {0} and pass it as argument.
Never make assumptions about the structure in other languages. Other languages may have such texts at the beginning, in the middle, with quotes around or whatever.
comment:3 by , 6 years ago
reverter fixed with [o34938:34939]
Hope I got the I18N usage right now. Working now on a patch for the core.
follow-up: 5 comment:4 by , 6 years ago
typo: The current value is not a a list of valid changeset IDs
by , 6 years ago
Attachment: | 17514-core.patch added |
---|
comment:5 by , 6 years ago
Replying to Don-vip:
typo:
The current value is not a a list of valid changeset IDs
Oops. Should I just remove the duplicated a or should I change it to
The current input is not a list of valid changeset IDs
?
comment:6 by , 6 years ago
There is a problem with the ChangesetCacheManager and the automatic evaluation of the clipboard. This works only when the ChangesetCacheManager is used for the first time. Working on that as well...
comment:7 by , 6 years ago
It's {0}, not {0], but you're still making assumptions.
If you have, like here, strings which seem to have something in common, do NOT extract the common part. Simply make two strings, each one correct and leave the duplicated parts duplicate. With such "optimizations" you don't make life easier for translators, but harder.
comment:8 by , 6 years ago
OK, how do I write this long string?
feedbackInvalid(tr("The current input is not a list of valid changeset IDs. Please enter one or more integer values > 0 or full changeset URLs."));
so that I don't get a checktyle warning "line too long"?
comment:9 by , 6 years ago
From the javadoc I learn this should work:
feedbackInvalid(tr("The current input is not a list of valid changeset IDs. " + "Please enter one or more integer values > 0 or full changeset URLs."));
comment:12 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:13 by , 6 years ago
Milestone: | → 19.03 |
---|
comment:14 by , 6 years ago
Replying to GerdP:
In 14930/josm:
It would be good if you could document such enhancements in the wiki. This way chances are higher that some users actually discover and use these features.
In this case it's just an addition of a part of a sentence: wiki:/Help/Dialog/ChangesetManager#QueryanddownloadachangesetbyitsuniqueID.
patch for reverter plugin