Merge branch 'master' into notes

* master:
  simplify material display
  disallow search engine to crawlers
  pl "polski" translation #10503. Author: O-O-O-O-O. It is OK.
  es "español, castellano" translation #10501. Author: DJValen. 272/302 Removed "es" (it's not needed in spanish). 3/302 "dale" substituted by  "pasa" 29/302 added "puede haber" meaning "may" 30/302 "Forzar visctoria" explains better the button 46/302 The article was missing for "computadora" 55/302 Tiempos de movimiento is wrong,  tiempo por movimiento is better 75/302  The last sentence was missing, fixed.
  bs "bosanski jezik" translation #10500. Author: Jaksha.
  sr "Српски језик" translation #10499. Author: Jaksha.
  fix i18n JS dump
  remove unused JS function
  fix theme dropdown when chrome zoom=90% (..)
This commit is contained in:
Thibault Duplessis 2014-12-09 09:14:00 +01:00
commit ad0b7f3e49
11 changed files with 43 additions and 35 deletions

View file

@ -3,6 +3,7 @@ package controllers
import play.api.mvc.Action
import lila.app._
import lila.common.HTTPRequest
import lila.game.{ Game => GameModel, GameRepo }
import play.api.http.ContentTypes
import views._
@ -16,7 +17,8 @@ object Game extends LilaController with BaseGame {
def searchForm = searchEnv.forms.search
def search(page: Int) = OpenBody { implicit ctx =>
Reasonable(page, 100) {
if (HTTPRequest.isBot(ctx.req)) notFound
else Reasonable(page, 100) {
implicit def req = ctx.body
makeListMenu flatMap { listMenu =>
searchForm.bindFromRequest.fold(

View file

@ -17,7 +17,7 @@ moreJs = moreJs,
moreCss = moreCss) {
<div class="content_box no_padding">
<h1 class="title">@trans.advancedSearch()</h1>
<form class="search" action="@routes.Game.search()" method="get">
<form rel="nofollow" class="search" action="@routes.Game.search()" method="get">
<table>
<tr>
<th>

View file

@ -48,6 +48,7 @@ theComputerAnalysisHasFailed=Računarska analiza nije uspjela
viewTheComputerAnalysis=Pogledajte računarsku analizu
requestAComputerAnalysis=Zahtijevajte računarsku analizu
computerAnalysis=Računarska analiza
analysis=Analiza
blunders=Grubi previdi
mistakes=Greške
inaccuracies=Nepreciznosti
@ -80,6 +81,12 @@ players=Igrači
minutesPerSide=Minuta po igraču
variant=Varijanta
timeControl=Vremenska kontrola
clock=Sat
correspondence=Dopisni sah
daysPerTurn=Dana po potezu
oneDay=Jedan dan
nbDays=%s dana
nbHours=%s sati
time=Vrijeme
username=Korisničko ime
password=Lozinka
@ -97,6 +104,10 @@ drawOfferSent=Ponuda za remi poslana
drawOfferDeclined=Ponuda za remi odbijena
drawOfferAccepted=Ponuda za remi prihvaćena
drawOfferCanceled=Ponuda za remi povučena
whiteOffersDraw=Beli nudi remi
blackOffersDraw=Crni nudi remi
whiteDeclinesDraw=Beli odbija ponudu za remi
blackDeclinesDraw=Crni odbija ponudu za remi
yourOpponentOffersADraw=Protivnik nudi remi
accept=Prihvatite
decline=Odbijte

View file

@ -1,6 +1,6 @@
playWithAFriend=Juega con un amigo
playWithTheMachine=Juega contra el ordenador
toInviteSomeoneToPlayGiveThisUrl=Para invitar a alguien a jugar, dale este enlace
toInviteSomeoneToPlayGiveThisUrl=Para invitar a alguien a jugar, pasa este enlace
gameOver=Fin del juego
waitingForOpponent=Esperando a tu rival
waiting=Esperando
@ -26,12 +26,12 @@ yourOpponentWantsToPlayANewGameWithYou=Tu rival quiere la revancha
joinTheGame=Unirse a la partida
whitePlays=Juegan blancas
blackPlays=Juegan negras
theOtherPlayerHasLeftTheGameYouCanForceResignationOrWaitForHim=El otro jugador ha abandonado la partida. Puedes reclamar el triunfo, declararlo empate, o esperar.
makeYourOpponentResign=Haz que tu rival se rinda
theOtherPlayerHasLeftTheGameYouCanForceResignationOrWaitForHim=El otro jugador puede haber abandonado la partida. Puedes reclamar el triunfo, declararlo empate, o esperar.
makeYourOpponentResign=Forzar victoria
forceResignation=Reclamar la victoria
forceDraw=Declarar tablas
talkInChat=Hablar en el chat
theFirstPersonToComeOnThisUrlWillPlayWithYou=La primera persona que entre en este enlace jugará contigo
theFirstPersonToComeOnThisUrlWillPlayWithYou=La primera persona que entre en este enlace jugará contigo.
whiteCreatesTheGame=Las blancas han creado la partida
blackCreatesTheGame=Las negras han creado la partida
whiteJoinsTheGame=Las blancas se han unido a la partida
@ -43,7 +43,7 @@ blackLeftTheGame=Las negras han abandonado la partida
shareThisUrlToLetSpectatorsSeeTheGame=Comparte este enlace para que espectadores puedan ver la partida
youAreViewingThisGameAsASpectator=Estás viendo esta partida como espectador
replayAndAnalyse=Repetición y análisis
computerAnalysisInProgress=Análisis de computadora en progreso
computerAnalysisInProgress=Análisis de la computadora en progreso
theComputerAnalysisHasFailed=El análisis de la computadora ha fallado
viewTheComputerAnalysis=Ver el análisis de la computadora
requestAComputerAnalysis=Solicitar un análisis de la computadora
@ -52,7 +52,7 @@ analysis=Análisis
blunders=Despistes
mistakes=Errores
inaccuracies=Imprecisiones
moveTimes=Tiempos de movimiento
moveTimes=Tiempo por movimiento
flipBoard=Girar el tablero
threefoldRepetition=Repetición de jugadas
claimADraw=Reclamar tablas
@ -60,19 +60,19 @@ offerDraw=Ofrecer tablas
draw=Tablas
nbConnectedPlayers=%s jugadores
gamesBeingPlayedRightNow=Partidas jugándose ahora mismo
viewAllNbGames=%s partidas
viewNbCheckmates=%s mates
nbBookmarks=%s marcadores
nbPopularGames=%s partidas populares
nbAnalysedGames=%s partidas analizadas
viewAllNbGames=%s Partidas
viewNbCheckmates=%s Mates
nbBookmarks=%s Marcadores
nbPopularGames=%s Partidas populares
nbAnalysedGames=%s Partidas analizadas
bookmarkedByNbPlayers=Marcado por %s jugadores
viewInFullSize=Ver a tamaño real
viewInFullSize=Ver a tamaño completo
logOut=Cerrar sesión
signIn=Iniciar sesión
newToLichess=¿Nuevo en Lichess?
youNeedAnAccountToDoThat=Necesitas crear una cuenta para hacer eso
signUp=Regístrate
computersAreNotAllowedToPlay=Las computadoras y los jugadores con ayuda de computadora, no se les permite jugar. Por favor, no recibir ayuda de los motores de ajedrez, bases de datos o de otros jugadores durante el juego.
computersAreNotAllowedToPlay=Las computadoras y los jugadores con ayuda de la computadora, no se les permite jugar. Por favor, no recibas ayuda de los motores de ajedrez, bases de datos o de otros jugadores durante el juego. También ten cuenta que crear múltiples cuentas es desalentador y excesivas cuentas puede resultar en un baneo.
games=Partidas
forum=Foro
xPostedInForumY=%s ha escrito en el foro %s
@ -269,7 +269,7 @@ activeThisWeek=Activos esta semana
activePlayers=Jugadores en activo
bewareTheGameIsRatedButHasNoClock=¡Cuidado, el juego es con puntaje pero sin reloj!
training=Entrenamiento
yourPuzzleRatingX=Tu puntuación en los puzzles es: %s
yourPuzzleRatingX=Tu puntuación en los puzzles: %s
findTheBestMoveForWhite=Encuentra el mejor movimiento para las blancas.
findTheBestMoveForBlack=Encuentra el mejor movimiento para las negras.
toTrackYourProgress=Para monitorizar tu progreso:
@ -277,7 +277,7 @@ trainingSignupExplanation=Lichess te proporciona puzzles de acuerdo con tu habil
recentlyPlayedPuzzles=Puzzles jugados recientemente
puzzleId=Puzzle %s
puzzleOfTheDay=Rompecabezas del día
clickToSolve=Clickea para resolver
clickToSolve=Clica para resolver
goodMove=Buen movimiento
butYouCanDoBetter=Pero puedes hacerlo mejor.
bestMove=El mejor movimiento!

View file

@ -1,6 +1,6 @@
playWithAFriend=Zagraj z przyjacielem
playWithTheMachine=Zagraj z komputerem
toInviteSomeoneToPlayGiveThisUrl=Aby zaprosić kogokolwiek do gry, przekaż mu ten adres:
toInviteSomeoneToPlayGiveThisUrl=Aby zaprosić kogokolwiek do gry, przekaż mu ten adres
gameOver=Koniec gry
waitingForOpponent=Oczekiwanie na przeciwnika
waiting=Czekaj

View file

@ -86,6 +86,7 @@ correspondence=Коресподенције
daysPerTurn=Дана по потезу
oneDay=Један дан
nbDays=%s дана
nbHours=%s сати
time=Време
username=Корисничко име
password=Лозинка

View file

@ -64,18 +64,23 @@ private[i18n] final class JsDump(
private val pathFile = new File(path)
private def write(messages: List[I18nKey])(lang: Lang) {
val code = s"""lichess_translations = ${dump(messages, lang)};"""
val code = s"""lichess_translations = ${dumpFromDefault(messages, lang)};"""
val file = new File("%s/%s.js".format(pathFile.getCanonicalPath, lang.language))
val out = new PrintWriter(file)
try { out.print(code) }
finally { out.close }
}
private def dump(messages: List[I18nKey], lang: Lang): String =
private def dumpFromDefault(messages: List[I18nKey], lang: Lang): String =
messages.map { key =>
""""%s":"%s"""".format(escape(key.to(pool.default)()), escape(key.to(lang)()))
}.mkString("{", ",", "}")
private def dumpFromKey(messages: List[I18nKey], lang: Lang): String =
messages.map { key =>
""""%s":"%s"""".format(key.key, escape(key.to(lang)()))
}.mkString("{", ",", "}")
private def writeRefs {
val code = pool.names.toList.sortBy(_._1).map {
case (code, name) => s"""["$code","$name"]"""
@ -88,7 +93,7 @@ private[i18n] final class JsDump(
private def writeFullJson {
pool.langs foreach { lang =>
val code = dump(keys.keys, lang)
val code = dumpFromKey(keys.keys, lang)
val file = new File("%s/%s.all.json".format(pathFile.getCanonicalPath, lang.language))
val out = new PrintWriter(file)
try { out.print(code) }

View file

@ -1328,12 +1328,8 @@ div.cemetery .tomb {
display: inline-block;
margin-left: 10px;
}
div.cemetery .grave {
div.cemetery .mono-piece {
margin-left: -10px;
width: 32px;
height: 32px;
position: relative;
display: inline-block;
}
div.under_chat {
width: 228px;

View file

@ -1269,7 +1269,7 @@ ul.language_links li:last-child {
}
#themepicker.shown div.dropdown {
display: block;
width: 240px;
width: 241px;
text-align: center;
}
body #themepicker div.is2d,

View file

@ -1,13 +1,6 @@
var m = require('mithril');
var game = require('../game');
function getPlayerRating(ctrl, player) {
if (player.user) {
var perf = player.user.perfs[ctrl.game.perf];
if (perf) return perf.rating;
}
}
function ratingDiff(player) {
if (typeof player.ratingDiff === 'undefined') return null;
if (player.ratingDiff === 0) return m('span.rp.null', 0);

View file

@ -12,7 +12,7 @@ var keyboard = require('../replay/keyboard');
function renderMaterial(ctrl, material) {
var children = [];
for (var role in material) {
var piece = m('div.grave', m('div.mono-piece.' + role));
var piece = m('div.mono-piece.' + role);
var count = material[role];
var content;
if (count === 1) content = piece;