Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jungle] fixing i18n messages #861

Merged
merged 6 commits into from
Oct 28, 2014
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions vraptor-musicjungle/src/main/resources/messages.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
project_description=a place to upload, download and share your favorite musics.

user_added = new user added successfully.

user = User
Expand All @@ -11,11 +13,15 @@ user.default = (you can use default user and password: vraptor)
send=Send
logout=Logout

menu.home=Home
menu.about=About

music.title=Title
music.description=Description
music.type=Type
music.owners = Owners
music.upload = Music
music.download = Download

your_musics=Your musics
new_music=Add new musics to your collection
Expand Down Expand Up @@ -45,6 +51,8 @@ REGGAE=Reggae
FUNK=Funk
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh no :)

OTHER=Other

licence=Apache Licence

# errors
errors = Errors
login_already_exists = There is already someone registered under this login.
Expand Down
11 changes: 10 additions & 1 deletion vraptor-musicjungle/src/main/resources/messages_pt_BR.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
project_description=um lugar para baixar e compartilhar suas músicas favoritas.

user_added = novo usuario adicionado com sucesso
user = Usuário

Expand All @@ -10,16 +12,21 @@ user.default = (você pode usar o usuário e senha padrão: vra
send=Enviar
logout=Logout

menu.home=Home
menu.about=Sobre

music.title=Titulo
music.description=Descrição
music.type=Tipo
music.upload=Músicas
music.download = Download

your_musics=Suas músicas
new_music=Adicione novas músicas em sua coleção
music_added=Música adicionada
add_music=Adicionar Música

list_users=Registered users list
list_users=Usuários
search.music=Digite o titulo de uma má
view=view

Expand All @@ -42,6 +49,8 @@ REGGAE=Reggae
FUNK=Funk
OTHER=Outra

licence=Licença Apache

# errors
errors = Erros
login_already_exists = Já existe alguém cadastrado com o seu login.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<div class="well login-logo">
<span class="logo">VRaptor Music Jungle</span>
<span class="logo-message">a place to upload, download and share your favorite musics.</span>
<span class="logo-message"><fmt:message key="project_description"/></span>
</div>

<div class="container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th>Title</th>
<th>Description</th>
<th>Type</th>
<td>Owners</td>
<th><fmt:message key="music.title"/></th>
<th><fmt:message key="music.description"/></th>
<th><fmt:message key="music.type"/></th>
<td><fmt:message key="music.owners"/></td>
<td></td>
<td></td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th>Title</th>
<th>Description</th>
<th>Type</th>
<th>Download</th>
<th><fmt:message key="music.title"/></th>
<th><fmt:message key="music.description"/></th>
<th><fmt:message key="music.type"/></th>
<td><fmt:message key="music.download"/></td>
</tr>
</thead>
<tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th>Title</th>
<th>Description</th>
<th>Type</th>
<th><fmt:message key="music.title"/></th>
<th><fmt:message key="music.description"/></th>
<th><fmt:message key="music.type"/></th>
<th></th>
<th></th>
</tr>
Expand Down
6 changes: 3 additions & 3 deletions vraptor-musicjungle/src/main/webapp/footer.jsp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

</div>

<div class="footer v-footer">
<p>
<a href="http://www.apache.org/licenses/LICENSE-2.0">
Licença Apache
</a> | VRaptor @2013 Caelum - Ensino e Inovação
<fmt:message key="licence" />
</a> | VRaptor @2013 Caelum - Ensino e Inova��o
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I see a charset problem here.

</p>
</div>

Expand Down
21 changes: 14 additions & 7 deletions vraptor-musicjungle/src/main/webapp/header.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,21 @@
<body>
<c:set var="path"><c:url value="/"/></c:set>

<fmt:setLocale value="${locale}"/>

<c:if test="${not empty param.language}">
<c:set var="lang" value="${param.language}" scope="session"/>
<fmt:setLocale value="${param.language}" scope="session"/>
</c:if>

<div class="navbar navbar-default">
<div class="navbar-inner">
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="${path}"></i> Home</a></li>
<li><a href="${path}"></i> About</a></li>
<li class="active">
<a href="${path}"> <fmt:message key="menu.home"/> </a>
</li>
<li>
<a href="${path}"> <fmt:message key="menu.about"/> </a>
</li>
<li>
<a href="${linkTo[UsersController].list}">
<fmt:message key="list_users" />
Expand All @@ -51,13 +54,17 @@

<ul class="nav navbar-nav">
<li class="divider-vertical"></li>
<li class="active"><a href="?language=en">ENGLISH</a></li>
<li><a href="?language=pt_BR">PORTUGU�S</a></li>
<li class="${lang eq 'en' ? 'active' : ''}">
<a href="?language=en">ENGLISH</a>
</li>
<li class="${lang eq 'pt_BR' ? 'active' : ''}">
<a href="?language=pt_BR">PORTUGU�S</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Charset problem here too.

</li>
<li class="divider-vertical"></li>
</ul>

<span class="pull-right ${not empty userInfo.user ? '' : 'hidden'}">
${userInfo.user.name} (<a href="${linkTo[HomeController].logout}">Logout</a>)
${userInfo.user.name} (<a href="${linkTo[HomeController].logout}"><fmt:message key="logout"/></a>)
</span>
</div>
</div>
Expand Down