Commit de2c7c2a by Antti Jaakkola

i18n for tournaments

1 parent 0815e5f8
...@@ -3,4 +3,16 @@ package fi.codecrew.moya.enums; ...@@ -3,4 +3,16 @@ package fi.codecrew.moya.enums;
public enum TournamentType { public enum TournamentType {
SINGLE_ELIMINATION, SINGLE_ELIMINATION,
DOUBLE_ELIMINATION DOUBLE_ELIMINATION
;
private final String key;
private static final String I18N_HEADER = "bortalApplication.tournament.";
private TournamentType() {
key = I18N_HEADER + name();
}
public String getI18nKey() {
return key;
}
} }
...@@ -77,13 +77,13 @@ ...@@ -77,13 +77,13 @@
<br /> <br />
<h:selectOneMenu value="#{tournamentCreateView.tournament.tournamentType}"> <h:selectOneMenu value="#{tournamentCreateView.tournament.tournamentType}">
<f:selectItems value="#{tournamentCreateView.tournamentTypes}" var="val" itemLabel="#{val}" /> <f:selectItems value="#{tournamentCreateView.tournamentTypes}" var="val" itemLabel="#{i18n[val.i18nKey]}" />
</h:selectOneMenu> </h:selectOneMenu>
<br /> <br />
<h:outputText value="#{i18n['tournaments.players_per_match']}" /> <h:outputText value="#{i18n['tournaments.players_per_match']}" />
<h:panelGrid columns="1" style="margin-bottom:10px"> <h:panelGrid columns="1" style="margin-bottom:10px">
<p:inputText id="playerSlider" value="#{tournamentCreateView.tournament.playersPerMatch}" /> <p:inputText id="playerSlider" value="#{tournamentCreateView.tournament.playersPerMatch}" />
<p:slider for="playerSlider" /> <p:slider for="playerSlider" />
</h:panelGrid> </h:panelGrid>
......
...@@ -81,6 +81,7 @@ bortalApplication.shop.SHOP_TO_OTHERS = Shop to other users ...@@ -81,6 +81,7 @@ bortalApplication.shop.SHOP_TO_OTHERS = Shop to other users
bortalApplication.terminal.CASHIER = Access cashier terminal functions bortalApplication.terminal.CASHIER = Access cashier terminal functions
bortalApplication.terminal.CUSTOMER = Access client terminal functions bortalApplication.terminal.CUSTOMER = Access client terminal functions
bortalApplication.terminal.SELFHELP = Self help terminal bortalApplication.terminal.SELFHELP = Self help terminal
bortalApplication.tournament.DOUBLE_ELIMINATION = Double elimination
bortalApplication.tournament.SINGLE_ELIMINATION = Single Elimination bortalApplication.tournament.SINGLE_ELIMINATION = Single Elimination
bortalApplication.user = User permissions bortalApplication.user = User permissions
bortalApplication.user.ANYUSER = All users have this anyways bortalApplication.user.ANYUSER = All users have this anyways
......
...@@ -159,7 +159,6 @@ bortalApplication.shop.SHOP_TO_OTHERS = Shop to other users ...@@ -159,7 +159,6 @@ bortalApplication.shop.SHOP_TO_OTHERS = Shop to other users
bortalApplication.terminal.CASHIER = Access cashier terminal functions bortalApplication.terminal.CASHIER = Access cashier terminal functions
bortalApplication.terminal.CUSTOMER = Access client terminal functions bortalApplication.terminal.CUSTOMER = Access client terminal functions
bortalApplication.terminal.SELFHELP = Self help terminal bortalApplication.terminal.SELFHELP = Self help terminal
bortalApplication.tournament.SINGLE_ELIMINATION = Single Elimination
bortalApplication.user = User permissions bortalApplication.user = User permissions
bortalApplication.user.ANYUSER = All users have this anyways bortalApplication.user.ANYUSER = All users have this anyways
bortalApplication.user.CREATE_NEW = Create new user bortalApplication.user.CREATE_NEW = Create new user
......
...@@ -160,7 +160,6 @@ bortalApplication.shop.SHOP_TO_OTHERS = Saa ostaa tuotteita muille ...@@ -160,7 +160,6 @@ bortalApplication.shop.SHOP_TO_OTHERS = Saa ostaa tuotteita muille
bortalApplication.terminal.CASHIER = Muokata rahastusp\u00E4\u00E4tteiden toimintoja bortalApplication.terminal.CASHIER = Muokata rahastusp\u00E4\u00E4tteiden toimintoja
bortalApplication.terminal.CUSTOMER = Muokata k\u00E4vij\u00E4p\u00E4\u00E4tteiden toimintoja bortalApplication.terminal.CUSTOMER = Muokata k\u00E4vij\u00E4p\u00E4\u00E4tteiden toimintoja
bortalApplication.terminal.SELFHELP = Itsepalvelup\u00E4\u00E4te bortalApplication.terminal.SELFHELP = Itsepalvelup\u00E4\u00E4te
bortalApplication.tournament.SINGLE_ELIMINATION = Single Elimination
bortalApplication.user = K\u00E4ytt\u00E4j\u00E4oikeudet bortalApplication.user = K\u00E4ytt\u00E4j\u00E4oikeudet
bortalApplication.user.ANYUSER = AINA kaikilla k\u00E4ytt\u00E4jill\u00E4 bortalApplication.user.ANYUSER = AINA kaikilla k\u00E4ytt\u00E4jill\u00E4
bortalApplication.user.CREATE_NEW = Voi luoda uuden k\u00E4ytt\u00E4j\u00E4n bortalApplication.user.CREATE_NEW = Voi luoda uuden k\u00E4ytt\u00E4j\u00E4n
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!