Different game page header and texts
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Sat, 19 Sep 2009 08:54:30 +0200
changeset 9837ac8eb59b1b
parent 97 3af50ab53c15
child 99 fed05535725f
Different game page header and texts
freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/Bundle.properties
freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/Bundle_cs.properties
freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/game.fmt
     1.1 --- a/freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/Bundle.properties	Sat Sep 19 08:18:39 2009 +0200
     1.2 +++ b/freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/Bundle.properties	Sat Sep 19 08:54:30 2009 +0200
     1.3 @@ -24,9 +24,14 @@
     1.4  WHITE=White
     1.5  BLACK=Black
     1.6  
     1.7 +BOARD_IMAGE=Image
     1.8 +BOARD_TEXT=Text View
     1.9 +
    1.10  players={0} vs. {1}
    1.11  PLACE=Place!
    1.12  MOVE=Move!
    1.13 +TO_MOVE=to move
    1.14 +HAS_WON=won
    1.15  RESIGN=Resign!
    1.16  H=Horizontal
    1.17  V=Vertical
    1.18 @@ -35,8 +40,6 @@
    1.19  MOVENUMBER=#
    1.20  MOVES=Moves
    1.21  ROOT=Home
    1.22 -MOVE_WHO=It is {0}\'s turn.
    1.23 -WON={0} won
    1.24  
    1.25  
    1.26  NAME=Name
     2.1 --- a/freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/Bundle_cs.properties	Sat Sep 19 08:18:39 2009 +0200
     2.2 +++ b/freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/Bundle_cs.properties	Sat Sep 19 08:54:30 2009 +0200
     2.3 @@ -33,9 +33,11 @@
     2.4    432000#{4}-ti dny\
     2.5  }
     2.6  
     2.7 +BOARD_IMAGE=Grafick\u00FD pohled
     2.8 +BOARD_TEXT=Textov\u00FD pohled
     2.9 +
    2.10  players={0} proti {1}
    2.11  PLACE=Um\u00EDstit
    2.12 -MOVE=T\u00E1hnout
    2.13  RESIGN=Vzd\u00E1t
    2.14  H=Horizont\u00E1ln\u011B
    2.15  V=Vertik\u00E1ln\u011B
    2.16 @@ -44,8 +46,9 @@
    2.17  MOVENUMBER=Tah
    2.18  MOVES=Z\u00E1pis
    2.19  ROOT=Dom\u016F
    2.20 -MOVE_WHO=Na tahu je {0}
    2.21 -WON=Vyhr\u00E1l {0}
    2.22 +MOVE=T\u00E1hnout
    2.23 +TO_MOVE=na tahu
    2.24 +HAS_WON=vyhr\u00E1no
    2.25  TITLE=Komunitn\u00ED server Quoridor
    2.26  NAME=Jm\u00E9no
    2.27  PASSWORD=Heslo
     3.1 --- a/freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/game.fmt	Sat Sep 19 08:18:39 2009 +0200
     3.2 +++ b/freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/game.fmt	Sat Sep 19 08:54:30 2009 +0200
     3.3 @@ -15,7 +15,23 @@
     3.4    </head>
     3.5    <body>
     3.6        <h1>${bundle.GAME}</h1>
     3.7 -      <h3>${bundle("players", doc.game.id.@white?string, doc.game.id.@black?string)}</h3>
     3.8 +
     3.9 +      <#macro status who>
    3.10 +          ${who?string}
    3.11 +          <#if who = doc.game.@currentPlayer>
    3.12 +              <#if doc.game.id.@status = "whiteWon" || doc.game.id.@status = "blackWon" >
    3.13 +                - ${bundle.HAS_WON}
    3.14 +              <#else>
    3.15 +                - ${bundle.TO_MOVE}
    3.16 +              </#if>
    3.17 +          </#if>
    3.18 +      </#macro>
    3.19 +
    3.20 +
    3.21 +      <p>
    3.22 +          <b>${bundle.WHITE}:</b> <@status doc.game.id.@white/><br>
    3.23 +          <b>${bundle.BLACK}:</b> <@status doc.game.id.@black/><br>
    3.24 +      </p>
    3.25  
    3.26        <p>
    3.27        <a href="/games/${doc.game.id.@id}">${bundle.RELOAD}</a>
    3.28 @@ -31,14 +47,7 @@
    3.29        <#assign play = false>
    3.30  
    3.31        <#if doc.game.id.@status = "whiteMove" || doc.game.id.@status = "blackMove" >
    3.32 -          ${bundle("MOVE_WHO", doc.game.@currentPlayer?string)}
    3.33            <#assign play = user = doc.game.@currentPlayer>
    3.34 -      <#else>
    3.35 -        <#if doc.game.id.@status = "whiteWon">
    3.36 -          ${bundle("WON", doc.game.id.@white?string)}
    3.37 -        <#else>
    3.38 -          ${bundle("WON", doc.game.id.@black?string)}
    3.39 -        </#if>
    3.40        </#if>
    3.41        <#if  play>
    3.42            <form action="/games/${doc.game.id.@id}/move">
    3.43 @@ -94,12 +103,12 @@
    3.44  
    3.45        <#if format?? && format = "text">
    3.46          <pre>${doc.game.board}</pre>
    3.47 -        <a href="/games/${doc.game.id.@id}?format=image">Image</a>
    3.48 +        <a href="/games/${doc.game.id.@id}?format=image">${bundle.BOARD_IMAGE}</a>
    3.49        <#else>
    3.50          <p>
    3.51          <img src="/api/games/${doc.game.id.@id}" alt="text">
    3.52          </p>
    3.53 -        <a href="/games/${doc.game.id.@id}?format=text">Text</a>
    3.54 +        <a href="/games/${doc.game.id.@id}?format=text">${bundle.BOARD_TEXT}</a>
    3.55  
    3.56        </#if>
    3.57