@@ -7,6 +7,7 @@ import imaginaryLogoPath from "../assets/img/imaginary-logo.png";
77import mpiLogoPath from "../assets/img/mpi-logo.png" ;
88import { inputs } from "../inputs" ;
99import { LayoutContainer } from "@pixi/layout/components" ;
10+ import { setI18nKey } from "../i18n" ;
1011
1112export default class Credits extends GameNode {
1213 onFinish ?: ( ) => void ;
@@ -40,7 +41,6 @@ export default class Credits extends GameNode {
4041
4142 const titleText = new HTMLText ( {
4243 layout : true ,
43- text : "Credits" ,
4444 style : {
4545 align : "center" ,
4646 fill : theme . colors . primary ,
@@ -49,6 +49,7 @@ export default class Credits extends GameNode {
4949 fontSize : 72 ,
5050 } ,
5151 } ) ;
52+ setI18nKey ( titleText , "credits.title" ) ;
5253 credits . addChild ( titleText ) ;
5354
5455 const columns = new Container ( {
@@ -77,28 +78,30 @@ export default class Credits extends GameNode {
7778 columns . addChild ( column1 ) ;
7879 columns . addChild ( column2 ) ;
7980
80- column1 . addChild ( this . drawCredit ( "Concept & Development" , "Nat Alison" ) ) ;
81+ column1 . addChild (
82+ this . drawCredit ( "credits.concept_development" , "Nat Alison" )
83+ ) ;
8184
8285 column1 . addChild (
8386 this . drawCredit (
84- "Content & Coordination " ,
87+ "credits.content_coord " ,
8588 "Christian Stussak" ,
8689 "Andreas Matt" ,
8790 "Skye Rothstein"
8891 )
8992 ) ;
90- column1 . addChild ( this . drawCredit ( "Music " , "Landis Seralian" ) ) ;
93+ column1 . addChild ( this . drawCredit ( "credits.music " , "Landis Seralian" ) ) ;
9194
92- column2 . addChild ( this . drawCredit ( "Support" , "Karla Schön" , "Oliver Schön" ) ) ;
9395 column2 . addChild (
94- this . drawCredit ( "Arcade Machine Graphic Design" , "Eric Londaits" )
96+ this . drawCredit ( "credits.support" , "Karla Schön" , "Oliver Schön" )
97+ ) ;
98+ column2 . addChild (
99+ this . drawCredit ( "credits.graphic_design" , "Eric Londaits" )
95100 ) ,
96- column2 . addChild (
97- this . drawCredit ( "Arcade Machine Building" , "Retr-O-Mat" )
98- ) ;
101+ column2 . addChild ( this . drawCredit ( "credits.building" , "Retr-O-Mat" ) ) ;
99102 }
100103
101- drawCredit ( title : string , ...names : string [ ] ) {
104+ drawCredit ( key : string , ...names : string [ ] ) {
102105 const credit = new Container ( {
103106 layout : {
104107 display : "flex" ,
@@ -108,7 +111,6 @@ export default class Credits extends GameNode {
108111 } ) ;
109112 const titleText = new HTMLText ( {
110113 layout : true ,
111- text : title ,
112114 style : {
113115 align : "center" ,
114116 fill : theme . colors . primary ,
@@ -117,6 +119,7 @@ export default class Credits extends GameNode {
117119 fontSize : 40 ,
118120 } ,
119121 } ) ;
122+ setI18nKey ( titleText , key ) ;
120123 credit . addChild ( titleText ) ;
121124
122125 for ( let [ _i , name ] of names . entries ( ) ) {
@@ -169,7 +172,6 @@ export default class Credits extends GameNode {
169172 const ministryLogoTexture = await Assets . load ( ministryLogoPath ) ;
170173 const titleText = new HTMLText ( {
171174 layout : true ,
172- text : "Funded by" ,
173175 style : {
174176 align : "center" ,
175177 fill : "black" ,
@@ -178,6 +180,7 @@ export default class Credits extends GameNode {
178180 fontSize : 40 ,
179181 } ,
180182 } ) ;
183+ setI18nKey ( titleText , "credits.funded_by" ) ;
181184 fundedBy . addChild ( titleText ) ;
182185 fundedBy . addChild ( this . drawImage ( ministryLogoTexture , 250 ) ) ;
183186 logos . addChild ( fundedBy ) ;
@@ -194,7 +197,6 @@ export default class Credits extends GameNode {
194197 const mpiLogoTexture = await Assets . load ( mpiLogoPath ) ;
195198 const titleText2 = new HTMLText ( {
196199 layout : true ,
197- text : "Part of quantum-arcade.org by" ,
198200 style : {
199201 align : "center" ,
200202 fill : "black" ,
@@ -203,6 +205,7 @@ export default class Credits extends GameNode {
203205 fontSize : 40 ,
204206 } ,
205207 } ) ;
208+ setI18nKey ( titleText2 , "credits.part_of" ) ;
206209 partOf . addChild ( titleText2 ) ;
207210 const partOfSprites = new Container ( {
208211 layout : {
0 commit comments