Opened 5 years ago
Closed 5 years ago
#18643 closed enhancement (fixed)
Improve i18n strings with undistinguished singular/plural form
Reported by: | simon04 | Owned by: | team |
---|---|---|---|
Priority: | minor | Milestone: | 20.03 |
Component: | Core | Version: | |
Keywords: | i18n | Cc: |
Description
tr("With the currently used mappaint style(s) the style for outer way mismatches the area style") tr("Multipolygon rings share node(s)") tr("Multipolygon outer way shares segment(s) with other ring") tr("Multipolygon member(s) repeated with different role") tr("Multipolygon member(s) repeated with same role") tr("Could not access data file(s):\n{0}", errorSources) tr("Disable access to the given resource(s), separated by comma") tr("Zoom to selected element(s)") tr("Copy the key and value of the selected tag(s) to clipboard") tr("Remove photo(s) from layer") tr("Delete photo file(s) from disk") tr("Delete file(s) from disk")
Attachments (0)
Change History (13)
comment:1 by , 5 years ago
Milestone: | 20.02 → 20.03 |
---|
follow-up: 3 comment:2 by , 5 years ago
comment:3 by , 5 years ago
Replying to Hb---:
Replying to simon04:
"Multipolygon rings share node(s)"
If this message is only called with two or more modes affected, then please use equal source strings for the singular and for the plural form, see #18814.
Can you please stop to ask for changes which violate our guidelines. I18n always has to have full strings independent from the possibly used numbers in the code, as:
- each language defines the strings different and
- code may change
follow-up: 6 comment:5 by , 5 years ago
I was unsuccessful for most strings. What about using the plural form instead of the nasty and typographically catastrophic word(s)
?
-
src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java
diff --git a/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java b/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java index 48f82e26f..a891fb000 100644
a b private void checkStyleConsistency(Relation r, Multipolygon polygon) { 163 163 if (areaOuter != null) { 164 164 if (!area.equals(areaOuter)) { 165 165 String message = !areaStyle ? tr("Style for outer way mismatches") 166 : tr("With the currently used mappaint style (s)the style for outer way mismatches the area style");166 : tr("With the currently used mappaint style the style for outer way mismatches the area style"); 167 167 errors.add(TestError.builder(this, Severity.OTHER, OUTER_STYLE_MISMATCH) 168 168 .message(message) 169 169 .primitives(Arrays.asList(r, wOuter)) … … private void checkPolygonsForSharedNodes(Relation r, PolyData pd1, PolyData pd2, 378 378 } 379 379 if (errorCode == RINGS_SHARE_NODES) { 380 380 errors.add(TestError.builder(this, Severity.OTHER, errorCode) 381 .message(tr("Multipolygon rings share node (s)"))381 .message(tr("Multipolygon rings share nodes")) 382 382 .primitives(prims) 383 383 .highlight(sharedByPolygons) 384 384 .build()); … … private static boolean checkIfNodeIsInsidePolygon(Node n, PolyData p) { 577 577 } else if (loop == 0 || samePoly || (loop == 1 && !allInner)) { 578 578 String msg = loop == 0 ? tr("Intersection between multipolygon ways") 579 579 : samePoly ? tr("Multipolygon ring contains segments twice") 580 : tr("Multipolygon outer way shares segment (s)with other ring");580 : tr("Multipolygon outer way shares segments with other ring"); 581 581 errors.add(TestError.builder(this, Severity.ERROR, CROSSING_WAYS) 582 582 .message(msg) 583 583 .primitives(Arrays.asList(r, ways.get(0), ways.get(1))) … … private boolean checkMembersAndRoles(Relation r, List<TestError> tmpErrors) { 692 692 693 693 /** 694 694 * Check for:<ul> 695 * <li>{@link #REPEATED_MEMBER_DIFF_ROLE}: Multipolygon member (s)repeated with different role</li>696 * <li>{@link #REPEATED_MEMBER_SAME_ROLE}: Multipolygon member (s)repeated with same role</li>695 * <li>{@link #REPEATED_MEMBER_DIFF_ROLE}: Multipolygon members repeated with different role</li> 696 * <li>{@link #REPEATED_MEMBER_SAME_ROLE}: Multipolygon members repeated with same role</li> 697 697 * </ul> 698 698 * @param r relation 699 699 * @return true if repeated members have been detected, false otherwise … … private boolean checkRepeatedWayMembers(Relation r) { 737 737 repeatedSameRole.addAll(primitives); 738 738 } 739 739 } 740 addRepeatedMemberError(r, repeatedDiffRole, REPEATED_MEMBER_DIFF_ROLE, tr("Multipolygon member (s)repeated with different role"));741 addRepeatedMemberError(r, repeatedSameRole, REPEATED_MEMBER_SAME_ROLE, tr("Multipolygon member (s)repeated with same role"));740 addRepeatedMemberError(r, repeatedDiffRole, REPEATED_MEMBER_DIFF_ROLE, tr("Multipolygon members repeated with different role")); 741 addRepeatedMemberError(r, repeatedSameRole, REPEATED_MEMBER_SAME_ROLE, tr("Multipolygon members repeated with same role")); 742 742 } 743 743 return hasDups; 744 744 } -
src/org/openstreetmap/josm/gui/dialogs/properties/CopyKeyValueAction.java
diff --git a/src/org/openstreetmap/josm/gui/dialogs/properties/CopyKeyValueAction.java b/src/org/openstreetmap/josm/gui/dialogs/properties/CopyKeyValueAction.java index d0aa336d1..b493b7056 100644
a b 31 31 public CopyKeyValueAction(JTable tagTable, IntFunction<String> keyFn, Supplier<Collection<? extends Tagged>> objectSp) { 32 32 super(tagTable, keyFn, objectSp); 33 33 setName(0); 34 putValue(SHORT_DESCRIPTION, tr("Copy the key and value of the selected tag (s)to clipboard"));34 putValue(SHORT_DESCRIPTION, tr("Copy the key and value of the selected tags to clipboard")); 35 35 } 36 36 37 37 private void setName(long n) { -
src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java
diff --git a/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java b/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java index b4f833894..5f18bc28a 100644
a b public void actionPerformed(ActionEvent e) { 289 289 290 290 private class ImageRemoveAction extends JosmAction { 291 291 ImageRemoveAction() { 292 super(null, new ImageProvider("dialogs", "delete"), tr("Remove photo (s)from layer"), Shortcut.registerShortcut(293 "geoimage:deleteimagefromlayer", tr("Geoimage: {0}", tr("Remove photo (s)from layer")), KeyEvent.VK_DELETE, Shortcut.SHIFT),292 super(null, new ImageProvider("dialogs", "delete"), tr("Remove photo from layer"), Shortcut.registerShortcut( 293 "geoimage:deleteimagefromlayer", tr("Geoimage: {0}", tr("Remove photo from layer")), KeyEvent.VK_DELETE, Shortcut.SHIFT), 294 294 false, null, false); 295 295 } 296 296 … … public void actionPerformed(ActionEvent e) { 304 304 305 305 private class ImageRemoveFromDiskAction extends JosmAction { 306 306 ImageRemoveFromDiskAction() { 307 super(null, new ImageProvider("dialogs", "geoimage/deletefromdisk"), tr("Delete photo file (s)from disk"),307 super(null, new ImageProvider("dialogs", "geoimage/deletefromdisk"), tr("Delete photo file from disk"), 308 308 Shortcut.registerShortcut( 309 "geoimage:deletefilefromdisk", tr("Geoimage: {0}", tr("Delete file (s)from disk")), KeyEvent.VK_DELETE, Shortcut.CTRL_SHIFT),309 "geoimage:deletefilefromdisk", tr("Geoimage: {0}", tr("Delete file from disk")), KeyEvent.VK_DELETE, Shortcut.CTRL_SHIFT), 310 310 false, null, false); 311 311 } 312 312
comment:6 by , 5 years ago
Replying to simon04:
I was unsuccessful for most strings. What about using the plural form instead of the nasty and typographically catastrophic
word(s)
?
Sounds better to me for the given cases.
comment:8 by , 5 years ago
For MultipolygonTest
I'd prefer the singular form in all cases where you use the plural form.
comment:11 by , 5 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
The term photo file
occurs only once in the JOSM translation set now.
The term image file
is used 16 times. Even the confirmation dialog of this action uses it (18 lines below in ImageViewerDialog.java).
Please replace photo file
completely with image file
.
-
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java
a b 304 304 305 305 private class ImageRemoveFromDiskAction extends JosmAction { 306 306 ImageRemoveFromDiskAction() { 307 super(null, new ImageProvider("dialogs", "geoimage/deletefromdisk"), tr("Delete photofile from disk"),307 super(null, new ImageProvider("dialogs", "geoimage/deletefromdisk"), tr("Delete image file from disk"), 308 308 Shortcut.registerShortcut( 309 "geoimage:deletefilefromdisk", tr("Geoimage: {0}", tr("Delete photofile from disk")), KeyEvent.VK_DELETE, Shortcut.CTRL_SHIFT),309 "geoimage:deletefilefromdisk", tr("Geoimage: {0}", tr("Delete image file from disk")), KeyEvent.VK_DELETE, Shortcut.CTRL_SHIFT), 310 310 false, null, false); 311 311 } 312 312 313 313 @Override 314 314 public void actionPerformed(ActionEvent e) { 315 315 if (currentData != null && currentData.getSelectedImage() != null) { 316 316 List<ImageEntry> toDelete = currentData.getSelectedImages(); 317 317 int size = toDelete.size(); 318 318 319 319 int result = new ExtendedDialog( 320 320 MainApplication.getMainFrame(), 321 321 tr("Delete image file from disk"), 322 322 tr("Cancel"), tr("Delete")) 323 323 .setButtonIcons("cancel", "dialogs/delete") 324 324 .setContent(new JLabel("<html><h3>" 325 325 + trn("Delete the file from disk?", 326 326 "Delete the {0} files from disk?", size, size) 327 327 + "<p>" + trn("The image file will be permanently lost!", 328 328 "The images files will be permanently lost!", size) + "</h3></html>", 329 329 ImageProvider.get("dialogs/geoimage/deletefromdisk"), SwingConstants.LEFT))
comment:13 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Replying to simon04:
If this message is only called with two or more modes affected, then please use equal source strings for the singular and for the plural form, see #18814.
This is accompanied with
Zoom to selection
in the same context menu. The meanings seem to contradict. Please consider to simply useZoom to
. This would be similar toEdit
andDelete
already present there. It would be equal to the context menu item in the relation editor.