Ignore:
Timestamp:
2019-05-18T18:41:43+02:00 (5 years ago)
Author:
Don-vip
Message:

fix #17526 - provide a "search string example" translation context to all new strings. The context can help to avoid translating key words. (patch by Hb---)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/SearchDialog.java

    r15080 r15090  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.tools.I18n.trc;
    56
    67import java.awt.Cursor;
     
    276277                .addKeyword(tr("\"Baker Street\""), "\"\"", tr("''Baker Street'' in any key"))
    277278                .addKeyword("<i>key</i>:<i>valuefragment</i>", null,
    278                         tr("''valuefragment'' anywhere in ''key''"), tr("name:str matches name=Bakerstreet"))
     279                        tr("''valuefragment'' anywhere in ''key''"),
     280                        trc("search string example", "name:str matches name=Bakerstreet"))
    279281                .addKeyword("-<i>key</i>:<i>valuefragment</i>", null, tr("''valuefragment'' nowhere in ''key''")),
    280282                GBC.eol());
     
    289291                        tr("to quote operators.<br>Within quoted strings the <b>\"</b> and <b>\\</b> characters need to be escaped " +
    290292                                "by a preceding <b>\\</b> (e.g. <b>\\\"</b> and <b>\\\\</b>)."),
    291                         tr("name=\"Baker Street\""),
     293                        trc("search string example", "name=\"Baker Street\""),
    292294                        "\"addr:street\""),
    293295                GBC.eol().anchor(GBC.CENTER));
     
    296298                .addKeyword("<i>expr</i> <i>expr</i>", null,
    297299                        tr("logical and (both expressions have to be satisfied)"),
    298                         tr("Baker Street"))
     300                        trc("search string example", "Baker Street"))
    299301                .addKeyword("<i>expr</i> | <i>expr</i>", "| ", tr("logical or (at least one expression has to be satisfied)"))
    300302                .addKeyword("<i>expr</i> OR <i>expr</i>", "OR ", tr("logical or (at least one expression has to be satisfied)"))
     
    320322            hintPanel.add(new SearchKeywordRow(hcbSearchString)
    321323                .addTitle(tr("metadata"))
    322                 .addKeyword("user:", "user:", tr("objects changed by user"), tr("user:anonymous"))
    323                 .addKeyword("id:", "id:", tr("objects with given ID"), tr("id:0 (new objects)"))
    324                 .addKeyword("version:", "version:", tr("objects with given version"), tr("version:0 (objects without an assigned version)"))
     324                .addKeyword("user:", "user:", tr("objects changed by author"),
     325                        trc("search string example", "user:<i>OSM username</i> (objects with the author <i>OSM username</i>)"),
     326                        trc("search string example", "user:anonymous (objects without an assigned author)"))
     327                .addKeyword("id:", "id:", tr("objects with given ID"),
     328                        trc("search string example", "id:0 (new objects)"))
     329                .addKeyword("version:", "version:", tr("objects with given version"),
     330                        trc("search string example", "version:0 (objects without an assigned version)"))
    325331                .addKeyword("changeset:", "changeset:", tr("objects with given changeset ID"),
    326                         tr("changeset:0 (objects without an assigned changeset)"))
     332                        trc("search string example", "changeset:0 (objects without an assigned changeset)"))
    327333                .addKeyword("timestamp:", "timestamp:", tr("objects with last modification timestamp within range"), "timestamp:2012/",
    328334                        "timestamp:2008/2011-02-04T12"),
Note: See TracChangeset for help on using the changeset viewer.