Skip to content

Commit 2e71fdf

Browse files
authored
Move timing translations to be local to plugin (#678)
1 parent 0effe6e commit 2e71fdf

20 files changed

+135
-11
lines changed

src/main/frontend/common/i18n/translations.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,8 @@ describe("Translations", () => {
4242
});
4343
const translations = await getTranslations("en", [
4444
ResourceBundleName.messages,
45-
ResourceBundleName.timing,
4645
]);
4746

48-
expect(getResourceBundle).toHaveBeenCalledWith("hudson.Messages");
4947
expect(getResourceBundle).toHaveBeenCalledWith(
5048
"io.jenkins.plugins.pipelinegraphview.Messages",
5149
);

src/main/frontend/common/i18n/translations.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export function messageFormat(locale: string) {
4141

4242
export enum ResourceBundleName {
4343
messages = "io.jenkins.plugins.pipelinegraphview.Messages",
44-
timing = "hudson.Messages",
4544
}
4645

4746
export async function getTranslations(

src/main/frontend/multi-pipeline-graph-view/app.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ const App: FunctionComponent = () => {
1313
"en";
1414
return (
1515
<div>
16-
<I18NProvider
17-
bundles={[ResourceBundleName.messages, ResourceBundleName.timing]}
18-
locale={locale}
19-
>
16+
<I18NProvider bundles={[ResourceBundleName.messages]} locale={locale}>
2017
<MultiPipelineGraph />
2118
</I18NProvider>
2219
</div>

src/main/frontend/pipeline-console-view/app.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ export default function App() {
1313
document.getElementById("console-pipeline-root")?.dataset.userLocale ??
1414
"en";
1515
return (
16-
<I18NProvider
17-
bundles={[ResourceBundleName.messages, ResourceBundleName.timing]}
18-
locale={locale}
19-
>
16+
<I18NProvider bundles={[ResourceBundleName.messages]} locale={locale}>
2017
<FilterProvider>
2118
<PipelineConsole />
2219
</FilterProvider>

src/main/resources/io/jenkins/plugins/pipelinegraphview/Messages.properties

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,11 @@
2222

2323
startedAgo=Started {0} ago
2424
noBuilds=No builds
25+
26+
Util.millisecond={0} ms
27+
Util.second={0} sec
28+
Util.minute={0} min
29+
Util.hour ={0} hr
30+
Util.day ={0} {0,choice,0#days|1#day|1<days}
31+
Util.month ={0} mo
32+
Util.year ={0} yr

src/main/resources/io/jenkins/plugins/pipelinegraphview/Messages_bg.properties

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,18 @@
2222

2323
startedAgo=\
2424
Стартирано преди {0}
25+
26+
Util.millisecond=\
27+
{0} {0,choice,0#милисекунди|1#милисекунда|1<милисекунди}
28+
Util.second=\
29+
{0} {0,choice,0#секунди|1#секунда|1секунди}
30+
Util.minute=\
31+
{0} {0,choice,0#минути|1#минута|1<минути}
32+
Util.hour =\
33+
{0} {0,choice,0#часа|1#час|1<часа}
34+
Util.day =\
35+
{0} {0,choice,0#дни|1#ден|1<дни}
36+
Util.month =\
37+
{0} {0,choice,0#месеца|1#месец|1<месеца}
38+
Util.year =\
39+
{0} {0,choice,0#години|1#година|1<години}

src/main/resources/io/jenkins/plugins/pipelinegraphview/Messages_da.properties

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,11 @@
2121
# THE SOFTWARE.
2222

2323
startedAgo=Startede for {0} siden
24+
25+
Util.millisecond={0} ms
26+
Util.second={0} sek
27+
Util.minute={0} min
28+
Util.hour ={0} ti
29+
Util.day ={0} {0,choice,0#dage|1#dag|1<dage}
30+
Util.month ={0} må
31+
Util.year ={0} år

src/main/resources/io/jenkins/plugins/pipelinegraphview/Messages_de.properties

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,11 @@
2121
# THE SOFTWARE.
2222

2323
startedAgo=Vor {0} gestartet
24+
25+
Util.millisecond={0} ms
26+
Util.second={0} {0,choice,0#Sekunden|1#Sekunde|1<Sekunden}
27+
Util.minute={0} {0,choice,0#Minuten|1#Minute|1<Minuten}
28+
Util.day={0} {0,choice,0#Tage|1#Tag|1<Tage}
29+
Util.hour={0} {0,choice,0#Stunden|1#Stunde|1<Stunden}
30+
Util.month={0} {0,choice,0#Monate|1#Monat|1<Monate}
31+
Util.year={0} {0,choice,0#Jahre|1#Jahr|1<Jahre}

src/main/resources/io/jenkins/plugins/pipelinegraphview/Messages_es.properties

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,11 @@
2222
# THE SOFTWARE.
2323

2424
startedAgo=Comenzó hace {0}
25+
26+
Util.millisecond={0} Ms
27+
Util.second={0} Seg
28+
Util.minute={0} Min
29+
Util.hour ={0} Hor
30+
Util.day ={0} {0,choice,0#días|1#día|1<días}
31+
Util.month ={0} Mes
32+
Util.year ={0} Año

src/main/resources/io/jenkins/plugins/pipelinegraphview/Messages_fr.properties

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,11 @@
2121
# THE SOFTWARE.
2222

2323
startedAgo=Démarrée il y a {0}.
24+
25+
Util.millisecond={0} ms
26+
Util.second={0} s
27+
Util.minute={0} mn
28+
Util.hour ={0} h
29+
Util.day ={0} j
30+
Util.month ={0} mo.
31+
Util.year ={0} an.

0 commit comments

Comments
 (0)