File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed
engine/src/main/java/org/terasology/rendering/nui/layers/mainMenu Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,8 @@ Contributors
235235 [ Chris 'cwgreene' Greene] ( https://github.com/cwgreene ) ,
236236 [ AdamAboudi] ( https://github.com/AdamAboudi ) ,
237237 [ lgzy] ( https://github.com/lgzy ) ,
238- [ dave2s] ( https://github.com/dave2s )
238+ [ dave2s] ( https://github.com/dave2s ) ,
239+ [ asiekierka] ( https://github.com/asiekierka )
239240* GUI Team:
240241 [ Anton "small-jeeper" Kireev] ( https://github.com/small-jeeper ) ,
241242 [ miniME89] ( https://github.com/miniME89 ) ,
Original file line number Diff line number Diff line change 1919import org .slf4j .LoggerFactory ;
2020import org .terasology .assets .ResourceUrn ;
2121import org .terasology .config .Config ;
22+ import org .terasology .i18n .TranslationSystem ;
2223import org .terasology .registry .In ;
2324import org .terasology .rendering .nui .CoreScreenLayer ;
2425import org .terasology .rendering .nui .WidgetUtil ;
@@ -38,6 +39,9 @@ public class CreditsScreen extends CoreScreenLayer {
3839 @ In
3940 private Config config ;
4041
42+ @ In
43+ private TranslationSystem translationSystem ;
44+
4145 private UIScrollingText creditsScroll ;
4246
4347 @ Override
@@ -54,7 +58,7 @@ public void initialise() {
5458 ClassLoader classloader = getClass ().getClassLoader ();
5559 InputStream is = classloader .getResourceAsStream ("Credits.md" );
5660 if (is == null ) {
57- credits .append ("${engine:menu#error-credits-not-found}" );
61+ credits .append (translationSystem . translate ( "${engine:menu#error-credits-not-found}" ) );
5862 } else {
5963 try (BufferedReader br = new BufferedReader (new InputStreamReader (is , StandardCharsets .UTF_8 ))) {
6064 String line ;
@@ -79,7 +83,7 @@ public void initialise() {
7983 Logger logger = LoggerFactory .getLogger (CreditsScreen .class );
8084 logger .info ("Could not open Credits file" );
8185
82- credits = new StringBuilder ("${engine:menu#error-credits-open" );
86+ credits = new StringBuilder (translationSystem . translate ( "${engine:menu#error-credits-open" ) );
8387 }
8488 }
8589
Original file line number Diff line number Diff line change @@ -213,11 +213,20 @@ task createVersionFile(type: Copy) {
213213 filter(FixCrLfFilter , eol :FixCrLfFilter.CrLf . newInstance(" crlf" ))
214214}
215215
216+ // TODO: This could probably be done more Gradley (engine project resource dir instead of direct path?) and with some variables
217+ task copyCreditsFile (type : Copy ) {
218+ description " Copies the credits file into the engine's resource dir where it'll be read at runtime"
219+ from " $rootDir /docs"
220+ into " $rootDir /engine/src/main/resources"
221+ include " Credits.md"
222+ }
223+
216224// Main application dist target. Does NOT include any modules.
217225task distApp (type : Sync ) {
218226 description = " Creates an application package for distribution"
219227
220228 dependsOn createVersionFile
229+ dependsOn copyCreditsFile
221230 dependsOn rootProject. extractNatives
222231 dependsOn jar
223232
You can’t perform that action at this time.
0 commit comments