source: osm/applications/editors/josm/plugins/smed2/src/messages/Messages.java@ 30315

Last change on this file since 30315 was 30298, checked in by malcolmh, 11 years ago

save

File size: 809 bytes
Line 
1/* Copyright 2014 Malcolm Herring
2 *
3 * This is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, version 3 of the License.
6 *
7 * For a copy of the GNU General Public License, see <http://www.gnu.org/licenses/>.
8 */
9
10package messages;
11
12import java.util.MissingResourceException;
13import java.util.ResourceBundle;
14
15public class Messages {
16 private static final String BUNDLE_NAME = "resources/msg.messages";
17
18 private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
19
20 private Messages() {
21 }
22
23 public static String getString(String key) {
24 try {
25 return RESOURCE_BUNDLE.getString(key);
26 } catch (MissingResourceException e) {
27 return '!' + key + '!';
28 }
29 }
30}
Note: See TracBrowser for help on using the repository browser.