Changeset 15080 in josm


Ignore:
Timestamp:
2019-05-15T22:49:16+02:00 (5 months ago)
Author:
Don-vip
Message:

fix #17526 - Search action dialog: New tooltip and more translations (patch by Hb---)

File:
1 edited

Legend:

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

    r14927 r15080  
    5353
    5454    private final HistoryComboBox hcbSearchString = new HistoryComboBox();
    55     private final JCheckBox addOnToolbar = new JCheckBox(tr("add toolbar button"), false);
    56 
     55
     56    private JCheckBox addOnToolbar;
    5757    private JCheckBox caseSensitive;
    5858    private JCheckBox allElements;
     
    7676        super(MainApplication.getMainFrame(),
    7777                initialValues instanceof Filter ? tr("Filter") : tr("Search"),
    78                 initialValues instanceof Filter ? tr("Submit filter") : tr("Start Search"),
     78                initialValues instanceof Filter ? tr("Submit filter") : tr("Search"),
    7979                tr("Cancel"));
    8080        this.searchSettings = new SearchSetting(initialValues);
     
    9999        label.setLabelFor(hcbSearchString);
    100100
    101         replace = new JRadioButton(tr("replace selection"), searchSettings.mode == SearchMode.replace);
     101        replace = new JRadioButton(tr("select"), searchSettings.mode == SearchMode.replace);
    102102        add = new JRadioButton(tr("add to selection"), searchSettings.mode == SearchMode.add);
    103103        remove = new JRadioButton(tr("remove from selection"), searchSettings.mode == SearchMode.remove);
     
    112112        allElements = new JCheckBox(tr("all objects"), searchSettings.allElements);
    113113        allElements.setToolTipText(tr("Also include incomplete and deleted objects in search."));
     114        addOnToolbar = new JCheckBox(tr("add toolbar button"), false);
     115        addOnToolbar.setToolTipText(tr("Add a button with this search expression to the toolbar."));
    114116
    115117        standardSearch = new JRadioButton(tr("standard"), !searchSettings.regexSearch && !searchSettings.mapCSSSearch);
     
    122124
    123125        JPanel selectionSettings = new JPanel(new GridBagLayout());
    124         selectionSettings.setBorder(BorderFactory.createTitledBorder(tr("Selection settings")));
     126        selectionSettings.setBorder(BorderFactory.createTitledBorder(tr("Results")));
    125127        selectionSettings.add(replace, GBC.eol().anchor(GBC.WEST).fill(GBC.HORIZONTAL));
    126128        selectionSettings.add(add, GBC.eol());
     
    129131
    130132        JPanel additionalSettings = new JPanel(new GridBagLayout());
    131         additionalSettings.setBorder(BorderFactory.createTitledBorder(tr("Additional settings")));
     133        additionalSettings.setBorder(BorderFactory.createTitledBorder(tr("Options")));
    132134        additionalSettings.add(caseSensitive, GBC.eol().anchor(GBC.WEST).fill(GBC.HORIZONTAL));
    133135
     
    267269    private static JPanel buildHintsSection(HistoryComboBox hcbSearchString, boolean expertMode) {
    268270        JPanel hintPanel = new JPanel(new GridBagLayout());
    269         hintPanel.setBorder(BorderFactory.createTitledBorder(tr("Search hints")));
     271        hintPanel.setBorder(BorderFactory.createTitledBorder(tr("Hints")));
    270272
    271273        hintPanel.add(new SearchKeywordRow(hcbSearchString)
     
    274276                .addKeyword(tr("\"Baker Street\""), "\"\"", tr("''Baker Street'' in any key"))
    275277                .addKeyword("<i>key</i>:<i>valuefragment</i>", null,
    276                         tr("''valuefragment'' anywhere in ''key''"), "name:str matches name=Bakerstreet")
     278                        tr("''valuefragment'' anywhere in ''key''"), tr("name:str matches name=Bakerstreet"))
    277279                .addKeyword("-<i>key</i>:<i>valuefragment</i>", null, tr("''valuefragment'' nowhere in ''key''")),
    278280                GBC.eol());
     
    287289                        tr("to quote operators.<br>Within quoted strings the <b>\"</b> and <b>\\</b> characters need to be escaped " +
    288290                                "by a preceding <b>\\</b> (e.g. <b>\\\"</b> and <b>\\\\</b>)."),
     291                        tr("name=\"Baker Street\""),
    289292                        "\"addr:street\""),
    290293                GBC.eol().anchor(GBC.CENTER));
    291294        hintPanel.add(new SearchKeywordRow(hcbSearchString)
    292295                .addTitle(tr("combinators"))
    293                 .addKeyword("<i>expr</i> <i>expr</i>", null, tr("logical and (both expressions have to be satisfied)"))
     296                .addKeyword("<i>expr</i> <i>expr</i>", null,
     297                        tr("logical and (both expressions have to be satisfied)"),
     298                        tr("Baker Street"))
    294299                .addKeyword("<i>expr</i> | <i>expr</i>", "| ", tr("logical or (at least one expression has to be satisfied)"))
    295300                .addKeyword("<i>expr</i> OR <i>expr</i>", "OR ", tr("logical or (at least one expression has to be satisfied)"))
     
    315320            hintPanel.add(new SearchKeywordRow(hcbSearchString)
    316321                .addTitle(tr("metadata"))
    317                 .addKeyword("user:", "user:", tr("objects changed by user", "user:anonymous"))
    318                 .addKeyword("id:", "id:", tr("objects with given ID"), "id:0 (new objects)")
    319                 .addKeyword("version:", "version:", tr("objects with given version"), "version:0 (objects without an assigned version)")
     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)"))
    320325                .addKeyword("changeset:", "changeset:", tr("objects with given changeset ID"),
    321                         "changeset:0 (objects without an assigned changeset)")
     326                        tr("changeset:0 (objects without an assigned changeset)"))
    322327                .addKeyword("timestamp:", "timestamp:", tr("objects with last modification timestamp within range"), "timestamp:2012/",
    323328                        "timestamp:2008/2011-02-04T12"),
Note: See TracChangeset for help on using the changeset viewer.