Permalink
Browse files

Translate the rest of the main menu

  • Loading branch information...
1 parent 1e31753 commit 9d71f76a72a139610e775a0a433c4ac4ac1f9d28 @robotboy655 robotboy655 committed Aug 22, 2014
@@ -21,7 +21,7 @@ INPUT.searchbox
border:0;
border-radius: 3px;
height: 24px;
- margin-right: 360px;
+ margin-right: 320px;
margin-top: 6px;
padding: 4px;
}
@@ -349,7 +349,7 @@ A.bglink
DIV.installgamemode
{
- margin-right: 360px;
+ margin-right: 320px;
height: 25px;
line-height: 26px;
font-size: 24px;
@@ -18,14 +18,14 @@ function ControllerNewGame( $scope, $element, $rootScope, $location )
$scope.Players =
[
- { num: 1, label: 'Single player' },
- { num: 2, label: '2 Players' },
- { num: 4, label: '4 Players' },
- { num: 8, label: '8 Players' },
- { num: 16, label: '16 Players' },
- { num: 32, label: '32 Players' },
- { num: 64, label: '64 Players' },
- { num: 128, label: '128 Players' },
+ { num: 1, label: 'maxplayers_1' },
+ { num: 2, label: 'maxplayers_2' },
+ { num: 4, label: 'maxplayers_4' },
+ { num: 8, label: 'maxplayers_8' },
+ { num: 16, label: 'maxplayers_16' },
+ { num: 32, label: 'maxplayers_32' },
+ { num: 64, label: 'maxplayers_64' },
+ { num: 128, label: 'maxplayers_128' },
]
$scope.MaxPlayersOption = $scope.Players[0];
@@ -12,12 +12,13 @@ angular.module( 'tranny', [] )
if ( IN_ENGINE == false ) return;
$(element).html( language.Update( strName ) );
+ $(element).attr( "placeholder", language.Update( strName ) );
}
scope.$watch( attrs.ngTranny, function ( value )
{
strName = value;
- update();
+ update();
});
scope.$on( 'languagechanged', function()
@@ -37,10 +38,10 @@ angular.module( 'tranny', [] )
scope.$watch( attrs.ngSeconds, function ( value )
{
if ( value < 60 )
- return $(element).html( Math.floor(value) + " sec" );
+ return $(element).html( Math.floor( value ) + " sec" );
if ( value < 60 * 60 )
- return $( element ).html( Math.floor(value / 60) + " min" );
+ return $( element ).html( Math.floor( value / 60 ) + " min" );
if ( value < 60 * 60 * 24 )
return $( element ).html( Math.floor( value / 60 / 60 ) + " hr" );
@@ -7,20 +7,20 @@
<ul>
<li class="noisy category {{IfElse( category.category == CurrentCategory, 'active', '' )}}" ng-repeat="category in MapList | orderBy:'order'" ng-hide="category.maps.length == 0" ng-click="SwitchCategory(category.category)">
<div class='name'>{{category.category}}</div>
- <div class='count'>{{CountFiltered(category.maps)}}</div>
+ <div class='count'>{{CountFiltered(category.maps)}}</div>
</li>
</ul>
<div class='search'>
- <input type="text" class="search" ng-model="SearchText" placeholder="Search" autofocus />
+ <input type="text" class="search" ng-model="SearchText" ng-tranny="'searchbar_placeholer'" autofocus />
</div>
</div>
<div class="scrollable" style="margin: 0px; top: 0px; left: 200px">
<ul class="category" ng-repeat="category in MapList | orderBy:'order'" ng-hide="category.maps.length == 0" ng-show="CurrentCategory == category.category">
- <li>{{category.category}} <small>{{category.maps.length}} maps</small></li>
+ <li>{{category.category}} <small>{{category.maps.length}} </small><small ng-tranny="category.maps.length == 1 && 'newgame_map' || 'newgame_maps'"></small></li>
<li class="icon mapicon {{MapClass( map )}}" ng-repeat="map in category.maps | orderBy:'Name' | filter:SearchText" >
<img ng-click="FavMap( map )" class="{{FavMapClass( map )}} {{FavMapHover( map )}}" src="img/empty.png" />
@@ -37,12 +37,12 @@
<div class="dropdown" style="margin: 10px;">
- <div class="label" onclick="$(this).siblings('.contents').toggle()">
+ <div class="label" onclick="$(this).siblings('.contents').toggle()" ng-tranny="MaxPlayersOption.label">
{{MaxPlayersOption.label}}
<i class='caret'></i>
</div>
<div class="contents" onclick="$(this).hide()">
- <div ng-repeat="ply in Players" ng-click="UpdateMaxPlayers( ply )">
+ <div ng-repeat="ply in Players" ng-click="UpdateMaxPlayers( ply )" ng-tranny="ply.label">
{{ply.label}}
</div>
</div>
@@ -45,11 +45,9 @@ <h1 class="menuheader"><span ng-Tranny="'servers_gamemodes'"></span><small ng-Tr
<img ng-src='../gamemodes/{{gamemode.name}}/icon24.png' onerror="MissingGamemodeIcon(this)"/>
- <div class='stats'>{{gamemode.num_players}} players on {{gamemode.num_servers}} servers</div>
+ <div class='stats'>{{gamemode.num_players}} <span ng-tranny="'servers_players_on'"></span> {{gamemode.num_servers}} <span ng-tranny="'servers_servers'"></span></div>
<div class='name'>
-
- {{GamemodeName(gamemode)}}
-
+ {{GamemodeName(gamemode)}}
</div>
<span class='installgamemode' ng-show="ShouldShowInstall( gamemode )" ng-click="InstallGamemode( gamemode );$event.stopPropagation()">&nbsp;</span>
@@ -66,13 +64,13 @@ <h1 class="menuheader"><span ng-Tranny="'servers_gamemodes'"></span><small ng-Tr
<h1 class="menuheader">
<span>{{GamemodeName(CurrentGamemode)}}</span>
- <small ng-tranny="'join_a_server'">pick a server to join</small>
+ <small ng-tranny="'join_a_server'"></small>
</h1>
- <div class='installgamemode' ng-show="ShouldShowInstall( CurrentGamemode )" ng-click="InstallGamemode( CurrentGamemode );$event.stopPropagation()">Install Gamemode</div>
+ <div class='installgamemode' ng-show="ShouldShowInstall( CurrentGamemode )" ng-click="InstallGamemode( CurrentGamemode );$event.stopPropagation()" ng-tranny="'servers_install_gamemode'"></div>
<div class='controls' style='position: absolute; left: 0; right: 0; margin-top: 5px;'>
- <input ng-model="CurrentGamemode.Search.$" class="searchbox" placeholder="Search" />
+ <input ng-model="CurrentGamemode.Search.$" class="searchbox" ng-Tranny="'searchbar_placeholer'" />
<a class='bglink' ng-click="SelectGamemode(null)"><img src='img/bg_arrow_left.png' /> <span ng-tranny="'return_to_gamemodes'"></span></a>
</div>
@@ -115,9 +113,9 @@ <h1 class="menuheader">
<table style="font-size: 12px; padding: 8px; width: 100%;">
<tr style="color: #999; font-weight: bold;">
- <td>name</td>
- <td style="text-align: center;">score</td>
- <td style="text-align: right;">time</td>
+ <td ng-tranny="'playerlist_name'"></td>
+ <td style="text-align: center;" ng-tranny="'playerlist_score'"></td>
+ <td style="text-align: right;" ng-tranny="'playerlist_time'"></td>
</tr>
<tr ng-repeat="player in CurrentGamemode.Selected.playerlist|orderBy:'time'">
@@ -132,7 +130,7 @@ <h1 class="menuheader">
<div class="cell" style="padding-top: 5px;">
<input type='password' ng-model="CurrentGamemode.Selected.password" ng-show="CurrentGamemode.Selected.pass" ui-keypress="{'enter':'JoinServer( CurrentGamemode.Selected )'}" placeholder="Password" />
- <button class="btn-primary" ng-click="JoinServer( CurrentGamemode.Selected )">Join Server</button>
+ <button class="btn-primary" ng-click="JoinServer( CurrentGamemode.Selected )" ng-tranny="'servers_join_server'"></button>
</div>
</footer>

2 comments on commit 9d71f76

@Bo98
Contributor
Bo98 commented on 9d71f76 Jan 8, 2015

searchbar_placeholer

Just noticed this now.

@robotboy655
Collaborator

:v It doesn't matter though since it is translated properly, I will probably fix it after next update.

Please sign in to comment.