@@ -68,8 +68,6 @@ public class ArtistPanel extends JScrollPane implements View {
6868 public static ArrayList <String > relatedArtistsUriCache = new ArrayList <>();
6969 public static ArrayList <String > discoveredOnUriCache = new ArrayList <>();
7070
71- private boolean trackPanelOpen = false ;
72-
7371 public ArtistPanel () {
7472 contentPanel = new JPanel ();
7573 contentPanel .setLayout (null );
@@ -99,7 +97,7 @@ public ArtistPanel() {
9997 backButton .addActionListener (new AsyncActionListener (e -> ContentPanel .switchView (ContentPanel .lastView )));
10098 contentPanel .add (backButton );
10199
102- artistPopularLabel = new JLabel ("Popular" ); //ToDo: Translate
100+ artistPopularLabel = new JLabel (PublicValues . language . translate ( "ui.artist.popular" ));
103101 artistPopularLabel .setBounds (5 , 291 , 137 , 27 );
104102 artistPopularLabel .setForeground (PublicValues .globalFontColor );
105103 contentPanel .add (artistPopularLabel );
@@ -171,12 +169,12 @@ public void mouseClicked(MouseEvent e) {
171169 artistAlbumScrollPane .setViewportView (artistAlbumTable );
172170 contentPanel .add (artistAlbumScrollPane );
173171
174- artistAlbumLabel = new JLabel ("Albums" ); //ToDo: Translate
172+ artistAlbumLabel = new JLabel (PublicValues . language . translate ( "ui.artist.album" ));
175173 artistAlbumLabel .setBounds (5 , 642 , 102 , 14 );
176174 artistAlbumLabel .setForeground (PublicValues .globalFontColor );
177175 contentPanel .add (artistAlbumLabel );
178176
179- relatedArtistsLabel = new JLabel ("Related Artists" );
177+ relatedArtistsLabel = new JLabel (PublicValues . language . translate ( "ui.artist.relatedartists" ) );
180178 relatedArtistsLabel .setBounds (5 , 1372 , 102 , 14 );
181179 relatedArtistsLabel .setForeground (PublicValues .globalFontColor );
182180 contentPanel .add (relatedArtistsLabel );
@@ -188,7 +186,7 @@ public void mouseClicked(MouseEvent e) {
188186 new Object [][]{
189187 },
190188 new String []{
191- "Artist"
189+ PublicValues . language . translate ( "ui.general.artist" )
192190 }
193191 ));
194192 relatedArtistsTable .addMouseListener (new AsyncMouseListener (new MouseAdapter () {
@@ -210,7 +208,7 @@ public void mouseClicked(MouseEvent e) {
210208 relatedArtistsScrollPane .setBounds (5 , 1397 , 760 , 295 );
211209 contentPanel .add (relatedArtistsScrollPane );
212210
213- discoveredOnLabel = new JLabel ("Discovered On" );
211+ discoveredOnLabel = new JLabel (PublicValues . language . translate ( "ui.artist.discoveredon" ) );
214212 discoveredOnLabel .setForeground (PublicValues .globalFontColor );
215213 discoveredOnLabel .setBounds (5 , 1007 , 102 , 14 );
216214 contentPanel .add (discoveredOnLabel );
@@ -222,7 +220,7 @@ public void mouseClicked(MouseEvent e) {
222220 new Object [][]{
223221 },
224222 new String []{
225- "Name" , "Description"
223+ PublicValues . language . translate ( "ui.general.name" ), PublicValues . language . translate ( "ui.general.description" )
226224 }
227225 ));
228226 discoveredOnTable .addMouseListener (new AsyncMouseListener (new MouseAdapter () {
@@ -256,7 +254,6 @@ public void run() {
256254 setVisible (true );
257255 ContentPanel .tabPanel .revalidate ();
258256 ContentPanel .tabPanel .repaint ();
259- trackPanelOpen = false ;
260257 }
261258 });
262259 }
@@ -297,7 +294,7 @@ public void fillWith(Artist artist) throws IOException {
297294 artistTitle .getStyledDocument ().getLength (),
298295 artist .getName () + "\n " ,
299296 style );
300- artistTitle .getStyledDocument ().insertString (artistTitle .getStyledDocument ().getLength (), artist .getFollowers ().getTotal ().toString () + " Followers" , null );
297+ artistTitle .getStyledDocument ().insertString (artistTitle .getStyledDocument ().getLength (), artist .getFollowers ().getTotal ().toString () + " " + PublicValues . language . translate ( "ui.artist.followers" ) , null );
301298 } catch (BadLocationException e ) {
302299 ConsoleLogging .Throwable (e );
303300 }
0 commit comments