Last change
on this file since 104 was 104, checked in by imi, 18 years ago |
- started i18n
- started "download incomplete ways" action
- added straight line selection mode
|
File size:
646 bytes
|
Line | |
---|
1 | package org.openstreetmap.josm.tools;
|
---|
2 |
|
---|
3 | import java.text.MessageFormat;
|
---|
4 |
|
---|
5 | /**
|
---|
6 | * Internationalisation support.
|
---|
7 | *
|
---|
8 | * @author Immanuel.Scholz
|
---|
9 | */
|
---|
10 | public class I18n {
|
---|
11 | public static String tr(String text, Object... objects) {
|
---|
12 | MessageFormat mf = new MessageFormat(text);
|
---|
13 | return mf.format(objects);
|
---|
14 | }
|
---|
15 |
|
---|
16 | public static String tr(String text) {
|
---|
17 | return text;
|
---|
18 | }
|
---|
19 |
|
---|
20 | public static String trn(String text, String pluralText, long n, Object... objects) {
|
---|
21 | return n==1 ? tr(text,objects) : tr(pluralText,objects);
|
---|
22 | }
|
---|
23 |
|
---|
24 | public static String trn(String text, String pluralText, long n) {
|
---|
25 | return n==1 ? text : pluralText;
|
---|
26 | }
|
---|
27 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.