Changeset 28475 in osm for applications/editors/josm/plugins/wikipedia
- Timestamp:
- 2012-07-12T14:08:18+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaToggleDialog.java
r28474 r28475 67 67 new SideButton(new OpenWikipediaArticleAction()), 68 68 new SideButton(new WikipediaSettingsAction(), false))); 69 setTitle(/* I18n: [language].Wikipedia.org */ tr("{0}.Wikipedia.org", wikipediaLang.get())); 69 70 } 70 71 final StringProperty wikipediaLang = new StringProperty("wikipedia.lang", LanguageInfo.getJOSMLocaleCode().substring(0, 2)); … … 98 99 if (entry.getWiwosmStatus() != null && entry.getWiwosmStatus()) { 99 100 label.setIcon(ImageProvider.getIfAvailable("misc", "grey_check")); 100 label.setToolTipText( tr("Available via WIWOSM server"));101 label.setToolTipText(/* I18n: WIWOSM server already links Wikipedia article to object/s */ tr("Available via WIWOSM server")); 101 102 } else if (articles.contains(entry.wikipediaArticle)) { 102 103 label.setIcon(ImageProvider.getIfAvailable("misc", "green_check")); 103 label.setToolTipText( tr("Available in local dataset"));104 label.setToolTipText(/* I18n: object/s from dataset contain link to Wikipedia article */ tr("Available in local dataset")); 104 105 } else { 105 106 label.setToolTipText(tr("Not linked yet")); 106 107 } 108 if (entry.description != null) { 109 label.setToolTipText("<html>" + entry.description + "</html>"); 110 } 107 111 return label; 108 112 } 109 113 }); 110 }111 112 @Override113 public String getToolTipText(MouseEvent e) {114 final int index = locationToIndex(e.getPoint());115 if (index >= 0) {116 final String description = ((WikipediaEntry) model.getElementAt(index)).description;117 if (description != null) {118 return "<html>" + description + "</html>";119 }120 }121 return super.getToolTipText(e);122 114 } 123 115 }; … … 300 292 // add entries to list model 301 293 setWikipediaEntries(entries); 294 setTitle(/* I18n: [language].Wikipedia.org: coordinates */ tr("{0}.Wikipedia.org: coordinates", wikipediaLang.get())); 302 295 } catch (Exception ex) { 303 296 throw new RuntimeException(ex); … … 336 329 Collections.sort(entries); 337 330 setWikipediaEntries(entries); 331 setTitle(/* I18n: [language].Wikipedia.org: [category] */ tr("{0}.Wikipedia.org: {1}", wikipediaLang.get(), category)); 338 332 } catch (IOException ex) { 339 333 throw new RuntimeException(ex);
Note:
See TracChangeset
for help on using the changeset viewer.