Skip to content

Commit 77b52a4

Browse files
committed
Merge pull request ocpsoft#44 from leon/sv-translation-reworked
Shortened and fixed grammar for Swedish locale
2 parents 2b58558 + e29ccf7 commit 77b52a4

2 files changed

Lines changed: 80 additions & 80 deletions

File tree

‎core/src/main/java/org/ocpsoft/prettytime/i18n/Resources_sv.java‎

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/*
22
* Copyright 2012 <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
3-
*
3+
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
7-
*
7+
*
88
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
9+
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,90 +20,90 @@
2020
public class Resources_sv extends ListResourceBundle {
2121

2222
private static final Object[][] OBJECTS = new Object[][] {
23-
{ "CenturyPattern", "%n %u" },
23+
{ "CenturyPattern", "%n %u" },
2424
{ "CenturyFuturePrefix", "om " },
25-
{ "CenturyFutureSuffix", " från och med nu" },
26-
{ "CenturyPastPrefix", "för " },
25+
{ "CenturyFutureSuffix", "" },
26+
{ "CenturyPastPrefix", "" },
2727
{ "CenturyPastSuffix", " sedan" },
2828
{ "CenturySingularName", "århundrade" },
2929
{ "CenturyPluralName", "århundraden" },
30-
{ "DayPattern", "%n %u" },
30+
{ "DayPattern", "%n %u" },
3131
{ "DayFuturePrefix", "om " },
32-
{ "DayFutureSuffix", " från och med nu" },
33-
{ "DayPastPrefix", "för " },
34-
{ "DayPastSuffix", " sedan" },
32+
{ "DayFutureSuffix", "" },
33+
{ "DayPastPrefix", "" },
34+
{ "DayPastSuffix", " sedan" },
3535
{ "DaySingularName", "dag" },
36-
{ "DayPluralName", "dagar" },
36+
{ "DayPluralName", "dagar" },
3737
{ "DecadePattern", "%n %u" },
3838
{ "DecadeFuturePrefix", "om " },
39-
{ "DecadeFutureSuffix", " från och med nu" },
40-
{ "DecadePastPrefix", "för " },
41-
{ "DecadePastSuffix", " sedan" },
39+
{ "DecadeFutureSuffix", "" },
40+
{ "DecadePastPrefix", "" },
41+
{ "DecadePastSuffix", " sedan" },
4242
{ "DecadeSingularName", "årtionde" },
43-
{ "DecadePluralName", "årtionden" },
43+
{ "DecadePluralName", "årtionden" },
4444
{ "HourPattern", "%n %u" },
45-
{ "HourFuturePrefix", "om " },
46-
{ "HourFutureSuffix", " från och med nu" },
47-
{ "HourPastPrefix", "för " },
45+
{ "HourFuturePrefix", "om " },
46+
{ "HourFutureSuffix", "" },
47+
{ "HourPastPrefix", "" },
4848
{ "HourPastSuffix", " sedan" },
49-
{ "HourSingularName", "timme" },
49+
{ "HourSingularName", "timme" },
5050
{ "HourPluralName", "timmar" },
51-
{ "JustNowPattern", "%u" },
52-
{ "JustNowFuturePrefix", "om ett " },
53-
{ "JustNowFutureSuffix", " från nu" },
54-
{ "JustNowPastPrefix", "för ett " },
55-
{ "JustNowPastSuffix", " sedan" },
56-
{ "JustNowSingularName", "ögonblick" },
57-
{ "JustNowPluralName", "par ögonblick" },
51+
{ "JustNowPattern", "%u" },
52+
{ "JustNowFuturePrefix", "om " },
53+
{ "JustNowFutureSuffix", "en stund" },
54+
{ "JustNowPastPrefix", "en stund" },
55+
{ "JustNowPastSuffix", " sedan" },
56+
{ "JustNowSingularName", "" },
57+
{ "JustNowPluralName", "" },
5858
{ "MillenniumPattern", "%n %u" },
5959
{ "MillenniumFuturePrefix", "om " },
60-
{ "MillenniumFutureSuffix", " från och med nu" },
61-
{ "MillenniumPastPrefix", "för " },
60+
{ "MillenniumFutureSuffix", "" },
61+
{ "MillenniumPastPrefix", "" },
6262
{ "MillenniumPastSuffix", " sedan" },
6363
{ "MillenniumSingularName", "årtusende" },
6464
{ "MillenniumPluralName", "årtusenden" },
6565
{ "MillisecondPattern", "%n %u" },
6666
{ "MillisecondFuturePrefix", "om " },
67-
{ "MillisecondFutureSuffix", " från och med nu" },
68-
{ "MillisecondPastPrefix", "för " },
67+
{ "MillisecondFutureSuffix", "" },
68+
{ "MillisecondPastPrefix", "" },
6969
{ "MillisecondPastSuffix", " sedan" },
7070
{ "MillisecondSingularName", "millisekund" },
7171
{ "MillisecondPluralName", "millisekunder" },
72-
{ "MinutePattern", "%n %u" },
72+
{ "MinutePattern", "%n %u" },
7373
{ "MinuteFuturePrefix", "om " },
74-
{ "MinuteFutureSuffix", " från och med nu" },
75-
{ "MinutePastPrefix", "för " },
76-
{ "MinutePastSuffix", " sedan" },
74+
{ "MinuteFutureSuffix", "" },
75+
{ "MinutePastPrefix", "" },
76+
{ "MinutePastSuffix", " sedan" },
7777
{ "MinuteSingularName", "minut" },
78-
{ "MinutePluralName", "minuter" },
78+
{ "MinutePluralName", "minuter" },
7979
{ "MonthPattern", "%n %u" },
80-
{ "MonthFuturePrefix", "om " },
81-
{ "MonthFutureSuffix", " från och med nu" },
82-
{ "MonthPastPrefix", "för " },
80+
{ "MonthFuturePrefix", "om " },
81+
{ "MonthFutureSuffix", "" },
82+
{ "MonthPastPrefix", "" },
8383
{ "MonthPastSuffix", " sedan" },
84-
{ "MonthSingularName", "månad" },
84+
{ "MonthSingularName", "månad" },
8585
{ "MonthPluralName", "månader" },
86-
{ "SecondPattern", "%n %u" },
86+
{ "SecondPattern", "%n %u" },
8787
{ "SecondFuturePrefix", "om " },
88-
{ "SecondFutureSuffix", " från och med nu" },
89-
{ "SecondPastPrefix", "för " },
90-
{ "SecondPastSuffix", " sedan" },
88+
{ "SecondFutureSuffix", "" },
89+
{ "SecondPastPrefix", "" },
90+
{ "SecondPastSuffix", " sedan" },
9191
{ "SecondSingularName", "sekund" },
92-
{ "SecondPluralName", "sekunder" },
92+
{ "SecondPluralName", "sekunder" },
9393
{ "WeekPattern", "%n %u" },
94-
{ "WeekFuturePrefix", "om " },
95-
{ "WeekFutureSuffix", " från och med nu" },
96-
{ "WeekPastPrefix", "för " },
94+
{ "WeekFuturePrefix", "om " },
95+
{ "WeekFutureSuffix", "" },
96+
{ "WeekPastPrefix", "" },
9797
{ "WeekPastSuffix", " sedan" },
98-
{ "WeekSingularName", "vecka" },
98+
{ "WeekSingularName", "vecka" },
9999
{ "WeekPluralName", "veckor" },
100-
{ "YearPattern", "%n %u" },
100+
{ "YearPattern", "%n %u" },
101101
{ "YearFuturePrefix", "om " },
102-
{ "YearFutureSuffix", " från och med nu" },
103-
{ "YearPastPrefix", "för " },
104-
{ "YearPastSuffix", " sedan" },
102+
{ "YearFutureSuffix", "" },
103+
{ "YearPastPrefix", "" },
104+
{ "YearPastSuffix", " sedan" },
105105
{ "YearSingularName", "år" },
106-
{ "YearPluralName", "år" },
106+
{ "YearPluralName", "år" },
107107
{ "AbstractTimeUnitPattern", "" },
108108
{ "AbstractTimeUnitFuturePrefix", "" },
109109
{ "AbstractTimeUnitFutureSuffix", "" },
Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/*
22
* Copyright 2012 <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
3-
*
3+
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
7-
*
7+
*
88
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
9+
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -37,17 +37,17 @@ public void setUp() throws Exception
3737
public void testPrettyTime()
3838
{
3939
PrettyTime p = new PrettyTime(locale);
40-
assertEquals(p.format(new Date()), "om ett par ögonblick från nu");
40+
assertEquals(p.format(new Date()), "om en stund");
4141
}
4242

4343
@Test
4444
public void testPrettyTimeCenturies()
4545
{
4646
PrettyTime p = new PrettyTime(new Date(3155692597470L * 3L), locale);
47-
assertEquals("för 3 århundraden sedan", p.format(new Date(0)));
47+
assertEquals("3 århundraden sedan", p.format(new Date(0)));
4848

4949
p = new PrettyTime(new Date(0), locale);
50-
assertEquals("om 3 århundraden från och med nu", p.format(new Date(3155692597470L * 3L)));
50+
assertEquals("om 3 århundraden", p.format(new Date(3155692597470L * 3L)));
5151
}
5252

5353
@Test
@@ -56,85 +56,85 @@ public void testCeilingInterval() throws Exception
5656
Date then = format.parse("20/5/2009");
5757
Date ref = format.parse("17/6/2009");
5858
PrettyTime t = new PrettyTime(ref, locale);
59-
assertEquals("för 1 månad sedan", t.format(then));
59+
assertEquals("1 månad sedan", t.format(then));
6060
}
6161

6262
@Test(expected=IllegalArgumentException.class)
6363
public void testNullDate() throws Exception
6464
{
6565
PrettyTime t = new PrettyTime(locale);
6666
Date date = null;
67-
assertEquals("om ett par ögonblick från nu", t.format(date));
67+
assertEquals("om en stund", t.format(date));
6868
}
6969

7070
@Test
7171
public void testRightNow() throws Exception
7272
{
7373
PrettyTime t = new PrettyTime(locale);
74-
assertEquals("om ett par ögonblick från nu", t.format(new Date()));
74+
assertEquals("om en stund", t.format(new Date()));
7575
}
7676

7777
@Test
7878
public void testRightNowVariance() throws Exception
7979
{
8080
PrettyTime t = new PrettyTime(new Date(0), locale);
81-
assertEquals("om ett par ögonblick från nu", t.format(new Date(600)));
81+
assertEquals("om en stund", t.format(new Date(600)));
8282
}
8383

8484
@Test
8585
public void testMinutesFromNow() throws Exception
8686
{
8787
PrettyTime t = new PrettyTime(new Date(0), locale);
88-
assertEquals("om 12 minuter från och med nu", t.format(new Date(1000 * 60 * 12)));
88+
assertEquals("om 12 minuter", t.format(new Date(1000 * 60 * 12)));
8989
}
9090

9191
@Test
9292
public void testHoursFromNow() throws Exception
9393
{
9494
PrettyTime t = new PrettyTime(new Date(0), locale);
95-
assertEquals("om 3 timmar från och med nu", t.format(new Date(1000 * 60 * 60 * 3)));
95+
assertEquals("om 3 timmar", t.format(new Date(1000 * 60 * 60 * 3)));
9696
}
9797

9898
@Test
9999
public void testDaysFromNow() throws Exception
100100
{
101101
PrettyTime t = new PrettyTime(new Date(0), locale);
102-
assertEquals("om 3 dagar från och med nu", t.format(new Date(1000 * 60 * 60 * 24 * 3)));
102+
assertEquals("om 3 dagar", t.format(new Date(1000 * 60 * 60 * 24 * 3)));
103103
}
104104

105105
@Test
106106
public void testWeeksFromNow() throws Exception
107107
{
108108
PrettyTime t = new PrettyTime(new Date(0), locale);
109-
assertEquals("om 3 veckor från och med nu", t.format(new Date(1000 * 60 * 60 * 24 * 7 * 3)));
109+
assertEquals("om 3 veckor", t.format(new Date(1000 * 60 * 60 * 24 * 7 * 3)));
110110
}
111111

112112
@Test
113113
public void testMonthsFromNow() throws Exception
114114
{
115115
PrettyTime t = new PrettyTime(new Date(0), locale);
116-
assertEquals("om 3 månader från och med nu", t.format(new Date(2629743830L * 3L)));
116+
assertEquals("om 3 månader", t.format(new Date(2629743830L * 3L)));
117117
}
118118

119119
@Test
120120
public void testYearsFromNow() throws Exception
121121
{
122122
PrettyTime t = new PrettyTime(new Date(0), locale);
123-
assertEquals("om 3 år från och med nu", t.format(new Date(2629743830L * 12L * 3L)));
123+
assertEquals("om 3 år", t.format(new Date(2629743830L * 12L * 3L)));
124124
}
125125

126126
@Test
127127
public void testDecadesFromNow() throws Exception
128128
{
129129
PrettyTime t = new PrettyTime(new Date(0), locale);
130-
assertEquals("om 3 årtionden från och med nu", t.format(new Date(315569259747L * 3L)));
130+
assertEquals("om 3 årtionden", t.format(new Date(315569259747L * 3L)));
131131
}
132132

133133
@Test
134134
public void testCenturiesFromNow() throws Exception
135135
{
136136
PrettyTime t = new PrettyTime(new Date(0), locale);
137-
assertEquals("om 3 århundraden från och med nu", t.format(new Date(3155692597470L * 3L)));
137+
assertEquals("om 3 århundraden", t.format(new Date(3155692597470L * 3L)));
138138
}
139139

140140
/*
@@ -144,62 +144,62 @@ public void testCenturiesFromNow() throws Exception
144144
public void testMomentsAgo() throws Exception
145145
{
146146
PrettyTime t = new PrettyTime(new Date(6000), locale);
147-
assertEquals("för ett par ögonblick sedan", t.format(new Date(0)));
147+
assertEquals("en stund sedan", t.format(new Date(0)));
148148
}
149149

150150
@Test
151151
public void testMinutesAgo() throws Exception
152152
{
153153
PrettyTime t = new PrettyTime(new Date(1000 * 60 * 12), locale);
154-
assertEquals("för 12 minuter sedan", t.format(new Date(0)));
154+
assertEquals("12 minuter sedan", t.format(new Date(0)));
155155
}
156156

157157
@Test
158158
public void testHoursAgo() throws Exception
159159
{
160160
PrettyTime t = new PrettyTime(new Date(1000 * 60 * 60 * 3), locale);
161-
assertEquals("för 3 timmar sedan", t.format(new Date(0)));
161+
assertEquals("3 timmar sedan", t.format(new Date(0)));
162162
}
163163

164164
@Test
165165
public void testDaysAgo() throws Exception
166166
{
167167
PrettyTime t = new PrettyTime(new Date(1000 * 60 * 60 * 24 * 3), locale);
168-
assertEquals("för 3 dagar sedan", t.format(new Date(0)));
168+
assertEquals("3 dagar sedan", t.format(new Date(0)));
169169
}
170170

171171
@Test
172172
public void testWeeksAgo() throws Exception
173173
{
174174
PrettyTime t = new PrettyTime(new Date(1000 * 60 * 60 * 24 * 7 * 3), locale);
175-
assertEquals("för 3 veckor sedan", t.format(new Date(0)));
175+
assertEquals("3 veckor sedan", t.format(new Date(0)));
176176
}
177177

178178
@Test
179179
public void testMonthsAgo() throws Exception
180180
{
181181
PrettyTime t = new PrettyTime(new Date(2629743830L * 3L), locale);
182-
assertEquals("för 3 månader sedan", t.format(new Date(0)));
182+
assertEquals("3 månader sedan", t.format(new Date(0)));
183183
}
184184

185185
@Test
186186
public void testYearsAgo() throws Exception
187187
{
188188
PrettyTime t = new PrettyTime(new Date(2629743830L * 12L * 3L), locale);
189-
assertEquals("för 3 år sedan", t.format(new Date(0)));
189+
assertEquals("3 år sedan", t.format(new Date(0)));
190190
}
191191

192192
@Test
193193
public void testDecadesAgo() throws Exception
194194
{
195195
PrettyTime t = new PrettyTime(new Date(315569259747L * 3L), locale);
196-
assertEquals("för 3 årtionden sedan", t.format(new Date(0)));
196+
assertEquals("3 årtionden sedan", t.format(new Date(0)));
197197
}
198198

199199
@Test
200200
public void testCenturiesAgo() throws Exception
201201
{
202202
PrettyTime t = new PrettyTime(new Date(3155692597470L * 3L), locale);
203-
assertEquals("för 3 århundraden sedan", t.format(new Date(0)));
203+
assertEquals("3 århundraden sedan", t.format(new Date(0)));
204204
}
205205
}

0 commit comments

Comments
 (0)