Improved I18N support:
* GamePageData now includes the selected language's code. * Added support for multiple fetches in one call to the Translator service.
This commit is contained in:
parent
c7949e41cc
commit
9a7bc03171
9 changed files with 316 additions and 50 deletions
legacyworlds-server-data
db-structure/parts/040-functions
src/main/java/com/deepclone/lw/sqld/game
|
@ -506,6 +506,7 @@ CREATE VIEW emp.enemies
|
|||
-- General information view
|
||||
--
|
||||
|
||||
DROP VIEW IF EXISTS emp.general_information CASCADE;
|
||||
CREATE VIEW emp.general_information
|
||||
AS SELECT e.name_id AS id , en.name AS name ,
|
||||
( CASE
|
||||
|
@ -516,13 +517,17 @@ CREATE VIEW emp.general_information
|
|||
END ) AS status ,
|
||||
e.cash AS cash , a.tag AS alliance ,
|
||||
st.next_tick AS game_time ,
|
||||
av.id AS account_id
|
||||
av.id AS account_id ,
|
||||
av.language AS language
|
||||
FROM emp.empires e
|
||||
INNER JOIN naming.empire_names en ON en.id = e.name_id
|
||||
INNER JOIN users.accounts_view av ON av.id = en.owner_id
|
||||
INNER JOIN naming.empire_names en
|
||||
ON en.id = e.name_id
|
||||
INNER JOIN users.accounts_view av
|
||||
ON av.id = en.owner_id
|
||||
LEFT OUTER JOIN emp.alliance_members am
|
||||
ON am.empire_id = e.name_id AND NOT am.is_pending
|
||||
LEFT OUTER JOIN emp.alliances a ON a.id = am.alliance_id
|
||||
LEFT OUTER JOIN emp.alliances a
|
||||
ON a.id = am.alliance_id
|
||||
CROSS JOIN sys.status st;
|
||||
|
||||
GRANT SELECT ON emp.general_information TO :dbuser;
|
||||
|
|
|
@ -3,11 +3,12 @@ package com.deepclone.lw.sqld.game;
|
|||
|
||||
public class GeneralInformation
|
||||
{
|
||||
private String name;
|
||||
|
||||
private String language;
|
||||
|
||||
private Character status;
|
||||
|
||||
private String name;
|
||||
|
||||
private String tag;
|
||||
|
||||
private long cash;
|
||||
|
@ -17,50 +18,87 @@ public class GeneralInformation
|
|||
private int accountId;
|
||||
|
||||
|
||||
public GeneralInformation( Character status , String name , String tag , long cash , long nextTick , int accountId )
|
||||
public String getName( )
|
||||
{
|
||||
return this.name;
|
||||
}
|
||||
|
||||
|
||||
public void setName( String name )
|
||||
{
|
||||
this.status = status;
|
||||
this.name = name;
|
||||
this.tag = tag;
|
||||
this.cash = cash;
|
||||
this.nextTick = nextTick;
|
||||
this.accountId = accountId;
|
||||
}
|
||||
|
||||
|
||||
public String getLanguage( )
|
||||
{
|
||||
return this.language;
|
||||
}
|
||||
|
||||
|
||||
public void setLanguage( String language )
|
||||
{
|
||||
this.language = language;
|
||||
}
|
||||
|
||||
|
||||
public Character getStatus( )
|
||||
{
|
||||
return status;
|
||||
return this.status;
|
||||
}
|
||||
|
||||
|
||||
public String getName( )
|
||||
public void setStatus( Character status )
|
||||
{
|
||||
return name;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
|
||||
public String getTag( )
|
||||
{
|
||||
return tag;
|
||||
return this.tag;
|
||||
}
|
||||
|
||||
|
||||
public void setTag( String tag )
|
||||
{
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
|
||||
public long getCash( )
|
||||
{
|
||||
return cash;
|
||||
return this.cash;
|
||||
}
|
||||
|
||||
|
||||
public void setCash( long cash )
|
||||
{
|
||||
this.cash = cash;
|
||||
}
|
||||
|
||||
|
||||
public long getNextTick( )
|
||||
{
|
||||
return nextTick;
|
||||
return this.nextTick;
|
||||
}
|
||||
|
||||
|
||||
public void setNextTick( long nextTick )
|
||||
{
|
||||
this.nextTick = nextTick;
|
||||
}
|
||||
|
||||
|
||||
public int getAccountId( )
|
||||
{
|
||||
return accountId;
|
||||
return this.accountId;
|
||||
}
|
||||
|
||||
|
||||
public void setAccountId( int accountId )
|
||||
{
|
||||
this.accountId = accountId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Reference in a new issue