Skip to content

Commit

Permalink
Merge pull request #1 from linaizhong/master
Browse files Browse the repository at this point in the history
Migrate messages from direct English to I18N
  • Loading branch information
djtfmartin committed Jul 17, 2014
2 parents 325cf82 + e626311 commit 0e193de
Show file tree
Hide file tree
Showing 94 changed files with 4,876 additions and 1,275 deletions.
1,367 changes: 1,362 additions & 5 deletions grails-app/i18n/messages.properties

Large diffs are not rendered by default.

1,541 changes: 1,541 additions & 0 deletions grails-app/i18n/messages_zh.properties

Large diffs are not rendered by default.

777 changes: 777 additions & 0 deletions grails-app/i18n/messages_zh_CN.properties

Large diffs are not rendered by default.

80 changes: 40 additions & 40 deletions grails-app/views/admin/home.gsp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%@ page import="org.codehaus.groovy.grails.commons.ConfigurationHolder; au.org.ala.collectory.ProviderGroup" %>
<html>
<head>
<title>ALA Collections Management</title>
<title><g:message code="admin.home.title" /></title>
<meta name="layout" content="${grailsApplication.config.ala.skin}" />

</head>
Expand All @@ -11,30 +11,30 @@
<div id="nav">
<ul id="nav-primary" class="left">
<li class="nav-item active">
<g:link controller="admin" action="home" class="active" accesskey="2">home</g:link>
<g:link controller="admin" action="home" class="active" accesskey="2"><g:message code="admin.home.li.home" /></g:link>
</li>
</ul>
<ul id="nav-secondary" class="right">
<li class="nav-item">
<a href="${ConfigurationHolder.config.ala.baseURL}" accesskey="3">ala</a>
<a href="${ConfigurationHolder.config.ala.baseURL}" accesskey="3"><g:message code="admin.home.li.ala" /></a>
</li>
<li class="nav-item">
<a href="${ConfigurationHolder.config.grails.serverURL}" accesskey="4">collections</a>
<a href="${ConfigurationHolder.config.grails.serverURL}" accesskey="4"><g:message code="admin.home.li.collections" /></a>
</li>
<li class="nav-item">
<cl:isLoggedIn>
<a href="http://auth.ala.org.au/cas/logout?url=${ConfigurationHolder.config.grails.serverURL}/admin/home">logout</a>
<a href="http://auth.ala.org.au/cas/logout?url=${ConfigurationHolder.config.grails.serverURL}/admin/home"><g:message code="admin.logout" /></a>
</cl:isLoggedIn>
<cl:isNotLoggedIn>
<a href="http://auth.ala.org.au/cas/login?service=${ConfigurationHolder.config.security.cas.serverName}/${ConfigurationHolder.config.security.cas.context}/admin">login</a>
<a href="http://auth.ala.org.au/cas/login?service=${ConfigurationHolder.config.security.cas.serverName}/${ConfigurationHolder.config.security.cas.context}/admin"><g:message code="admin.login" /></a>
</cl:isNotLoggedIn>
</li>
</ul>
</div>

<div class="login-info">
<cl:isLoggedIn>
<span id="logged-in">Logged in as <cl:loggedInUsername/></span>
<span id="logged-in"><g:message code="admin.loggedin" /> <cl:loggedInUsername/></span>
</cl:isLoggedIn>
</div>

Expand All @@ -47,9 +47,9 @@
<div id="welcome">
<img width="130" height="109" src="${resource(dir:'images/admin',file:'swift-moth.gif')}"/>
<div>
<span style="font-size:12px;">Update our information about</span>
<h1>Natural History Collections and their Institutions</h1>
<p>Descriptions of Australian biodiversity collections can be added and updated here.</p>
<span style="font-size:12px;"><g:message code="admin.home.welcome.span01" /></span>
<h1><g:message code="admin.home.welcome.title01" /></h1>
<p><g:message code="admin.home.welcome.des01" />.</p>
</div>
</div>

Expand All @@ -59,34 +59,34 @@

<cl:isNotLoggedIn>
<div class="homeCell">
<h4 class="inline">Please log in</h4>
<h4 class="inline"><g:message code="admin.home.welcome.title02" /></h4>
<span style="" class="buttons" style="float: right;">
<a href="${ConfigurationHolder.config.security.cas.loginUrl}?service=${ConfigurationHolder.config.grails.serverURL}/admin">&nbsp;Log in&nbsp;</a>
<a href="${ConfigurationHolder.config.security.cas.loginUrl}?service=${ConfigurationHolder.config.grails.serverURL}/admin">&nbsp;<g:message code="admin.home.welcome.login" />&nbsp;</a>
</span>
<p>You must log in to manage collection records</p>
<p><g:message code="admin.home.welcome.des02" /></p>
</div>
</cl:isNotLoggedIn>
<div style="clear:both;"></div>

<div id="buttons">
<div class='link-group'>
<h2>Collections</h2>
<g:link class="mainLink" controller="collection" action="list">View all collections</g:link>
<g:link class="mainLink" controller="collection" action="myList" id="68">View my collections</g:link>
<g:link class="mainLink" controller="collection" action="create-notyet">Add a collection</g:link>
<span>Search for collections</span>
<h2><g:message code="admin.home.title01" /></h2>
<g:link class="mainLink" controller="collection" action="list"><g:message code="admin.home.link.vac" /></g:link>
<g:link class="mainLink" controller="collection" action="myList" id="68"><g:message code="admin.home.link.vmc" /></g:link>
<g:link class="mainLink" controller="collection" action="create-notyet"><g:message code="admin.home.link.aac" /></g:link>
<span><g:message code="admin.home.span01" /></span>
<g:form action="search">
<g:textField class="mainText" name="term"/><span class="search-button-wrapper">
<g:actionSubmitImage width="24" src="${resource(dir:'images/admin',file:'search.png')}" action="search" value="Search"/></span>
</g:form>
</div>

<div class='link-group'>
<h2>Institutions</h2>
<g:link class="mainLink" controller="institution" action="list">View all institutions</g:link>
<g:link class="mainLink" controller="institution" action="myList" id="68">View my institutions</g:link>
<g:link class="mainLink" controller="institution" action="create-notyet">Add an institution</g:link>
<span>Search for institutions</span>
<h2><g:message code="admin.home.title02" /></h2>
<g:link class="mainLink" controller="institution" action="list"><g:message code="admin.home.link.vai" /></g:link>
<g:link class="mainLink" controller="institution" action="myList" id="68"><g:message code="admin.home.link.vmi" /></g:link>
<g:link class="mainLink" controller="institution" action="create-notyet"><g:message code="admin.home.link.aai" /></g:link>
<span><g:message code="admin.home.span02" /></span>
<g:form action="search">
<g:textField class="mainText" name="term"/><span class="search-button-wrapper">
<g:actionSubmitImage src="${resource(dir:'images/admin',file:'search.png')}" action="search" value="Search"/></span>
Expand All @@ -95,38 +95,38 @@


<div class='link-group'>
<h2>Data sets</h2>
<g:link class="mainLink" controller="dataResource" action="list">View all data resources</g:link>
<g:link class="mainLink" controller="dataProvider" action="list">View all data providers</g:link>
<g:link class="mainLink" controller="institution" action="create-notyet">Add a data resource</g:link>
<span>Search for data sets</span>
<h2><g:message code="admin.home.title03" /></h2>
<g:link class="mainLink" controller="dataResource" action="list"><g:message code="admin.home.link.vadr" /></g:link>
<g:link class="mainLink" controller="dataProvider" action="list"><g:message code="admin.home.link.vadp" /></g:link>
<g:link class="mainLink" controller="institution" action="create-notyet"><g:message code="admin.home.link.aadr" /></g:link>
<span><g:message code="admin.home.span03" /></span>
<g:form action="search">
<g:textField class="mainText" name="term"/><span class="search-button-wrapper">
<g:actionSubmitImage src="${resource(dir:'images/admin',file:'search.png')}" action="search" value="Search"/></span>
</g:form>
</div>

<div class='link-group'>
<h2>Profile</h2>
<g:link class="mainLink" controller="contact" action="showProfile">Edit my profile</g:link>
<p class="mainText">View and edit your contact details, roles, notifications, etc.</p>
<h2><g:message code="admin.home.title04" /></h2>
<g:link class="mainLink" controller="contact" action="showProfile"><g:message code="admin.home.link.emp" /></g:link>
<p class="mainText"><g:message code="admin.home.des01" />.</p>
</div>

<g:if test="${request.isUserInRole(ProviderGroup.ROLE_ADMIN)}">

<div class='link-group admin'>
<h2>Admin</h2>
<g:link class="mainLink" controller="reports" action="home">View reports</g:link>
<g:link class="mainLink" controller="contact" action="list">Manage contacts</g:link>
<g:link class="mainLink" controller="admin" action="export">Export all data as JSON</g:link>
<h2><g:message code="admin.home.title05" /></h2>
<g:link class="mainLink" controller="reports" action="home"><g:message code="admin.home.link.vr" /></g:link>
<g:link class="mainLink" controller="contact" action="list"><g:message code="admin.home.link.mc" /></g:link>
<g:link class="mainLink" controller="admin" action="export"><g:message code="admin.home.link.eadaj" /></g:link>
</div>

<div class='link-group admin'>
<h2>Codes and maps</h2>
<g:link class="mainLink" controller="providerCode" action="list">Manage provider codes</g:link>
<p class="mainText">Edit the list of available collection and institution codes.</p>
<g:link class="mainLink" controller="providerMap" action="list">Manage provider maps</g:link>
<p class="mainText">Allocate collection and institution codes to collections.</p>
<h2><g:message code="admin.home.title06" /></h2>
<g:link class="mainLink" controller="providerCode" action="list"><g:message code="admin.home.link.mpc" /></g:link>
<p class="mainText"><g:message code="admin.home.link.elovc" />.</p>
<g:link class="mainLink" controller="providerMap" action="list"><g:message code="admin.home.link.mpm" /></g:link>
<p class="mainText"><g:message code="admin.home.link.acicc" />.</p>
</div>
</g:if>
</div>
Expand Down
66 changes: 33 additions & 33 deletions grails-app/views/admin/index.gsp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%@ page import="org.codehaus.groovy.grails.commons.ConfigurationHolder; au.org.ala.collectory.ProviderGroup" %>
<html>
<head>
<title>ALA Collections Management</title>
<title><g:message code="admin.index.title" /></title>
<meta name="layout" content="${grailsApplication.config.ala.skin}" />

</head>
Expand All @@ -10,10 +10,10 @@
<div class="floating-content">

<div style="float:right;">
<g:link class="mainLink" controller="public" action="map">View public site</g:link>
<g:link class="mainLink" controller="public" action="map"><g:message code="admin.index.link01" /></g:link>
</div>
<div id="welcome">
<h3>Natural History Collections Management</h3> <p>Information about Australian biodiversity collections can be added and updated here.</p>
<h3><g:message code="admin.index.title01" /></h3> <p><g:message code="admin.index.title02" />.</p>
</div>

<g:if test="${flash.message}">
Expand All @@ -22,83 +22,83 @@

<cl:isNotLoggedIn>
<div class="homeCell">
<h4 class="inline">Please log in</h4>
<h4 class="inline"><g:message code="admin.notlogin.title" /></h4>
<span class="buttons" style="float: right;">
<a href="${ConfigurationHolder.config.security.cas.loginUrl}?service=${ConfigurationHolder.config.grails.serverURL}/admin">&nbsp;Log in&nbsp;</a>
<a href="${ConfigurationHolder.config.security.cas.loginUrl}?service=${ConfigurationHolder.config.grails.serverURL}/admin">&nbsp;<g:message code="admin.notlogin.link" />&nbsp;</a>
</span>
<p>You must log in to manage collection records</p>
<p><g:message code="admin.notlogin.des" /></p>
</div>
</cl:isNotLoggedIn>

<div class="homeCell">
<g:link class="mainLink" controller="contact" action="showProfile">Edit my profile</g:link>
<p class="mainText">View and edit your contact details, roles, notifications, etc.</p>
<g:link class="mainLink" controller="contact" action="showProfile"><g:message code="admin.index.link02" /></g:link>
<p class="mainText"><g:message code="admin.index.des02" />.</p>
</div>

<div class="homeCell">
<g:link class="mainLink" controller="collection" action="list">View all collections</g:link>
<p class="mainText">Browse all current collections and update collection descriptions.</p>
<g:link class="mainLink" controller="collection" action="list"><g:message code="admin.index.link03" /></g:link>
<p class="mainText"><g:message code="admin.index.des03" />.</p>
</div>

<div class="homeCell">
<g:link class="mainLink" controller="collection" action="myList" id="68">View my collections</g:link>
<p class="mainText">Browse my collections and update collection descriptions.</p>
<g:link class="mainLink" controller="collection" action="myList" id="68"><g:message code="admin.index.link04" /></g:link>
<p class="mainText"><g:message code="admin.index.des04" />.</p>
</div>

<div class="homeCell">
<span class="mainLink">Search for collections</span>
<p class="mainText">Enter a part of the name of a collection or its acronym, eg insects, fungi, ANIC</p>
<span class="mainLink"><g:message code="admin.index.link05" /></span>
<p class="mainText"><g:message code="admin.index.des05" /></p>
<g:form action="search">
<g:textField class="mainText" name="term"/><g:submitButton style="margin-left:20px;" name="search" value="Search"/>
</g:form>
</div>

<div class="homeCell">
<g:link class="mainLink" controller="collection" action="create">Add a collection</g:link>
<p class="mainText">Describe a collection that is not currently listed.</p>
<g:link class="mainLink" controller="collection" action="create"><g:message code="admin.index.link06" /></g:link>
<p class="mainText"><g:message code="admin.index.des06" />.</p>
</div>

<div class="homeCell">
<g:link class="mainLink" controller="institution" action="list">View all institutions</g:link>
<p class="mainText">Browse the institutions that hold collections.</p>
<g:link class="mainLink" controller="institution" action="list"><g:message code="admin.index.link07" /></g:link>
<p class="mainText"><g:message code="admin.index.des07" />.</p>
</div>

<cl:ifGranted role="${ProviderGroup.ROLE_ADMIN}">
<br/><br/><p>These actions are only available to system admins.</p>
<br/><br/><p><g:message code="admin.index.des08" />.</p>

<div class="homeCell">
<g:link class="mainLink" controller="dataProvider" action="list">View all data providers</g:link>
<p class="mainText">Browse all current data providers.</p>
<g:link class="mainLink" controller="dataProvider" action="list"><g:message code="admin.index.link09" /></g:link>
<p class="mainText"><g:message code="admin.index.des09" />.</p>
</div>

<div class="homeCell">
<g:link class="mainLink" controller="dataResource" action="list">View all data resources</g:link>
<p class="mainText">Browse all current data resources.</p>
<g:link class="mainLink" controller="dataResource" action="list"><g:message code="admin.index.link10" /></g:link>
<p class="mainText"><g:message code="admin.index.des10" />.</p>
</div>

<div class="homeCell">
<g:link class="mainLink" controller="reports" action="list">View reports</g:link>
<p class="mainText">Browse summaries of Registry contents and usage.</p>
<g:link class="mainLink" controller="reports" action="list"><g:message code="admin.index.link11" /></g:link>
<p class="mainText"><g:message code="admin.index.des11" />.</p>
</div>

<div class="homeCell">
<g:link class="mainLink" controller="contact" action="list">Manage contacts</g:link>
<p class="mainText">View and edit all known contacts for collections and institutions.</p>
<g:link class="mainLink" controller="contact" action="list"><g:message code="admin.index.link12" /></g:link>
<p class="mainText"><g:message code="admin.index.des12" />.</p>
</div>

<div class="homeCell">
<g:link class="mainLink" controller="providerCode" action="list">Manage provider codes</g:link>
<p class="mainText">View and edit all known collection and institution codes.</p>
<g:link class="mainLink" controller="providerCode" action="list"><g:message code="admin.index.link14" /></g:link>
<p class="mainText"><g:message code="admin.index.des14" />.</p>
</div>

<div class="homeCell">
<g:link class="mainLink" controller="providerMap" action="list">Manage provider maps</g:link>
<p class="mainText">View and edit the allocation of collection and institution codes to collections.</p>
<g:link class="mainLink" controller="providerMap" action="list"><g:message code="admin.index.link15" /></g:link>
<p class="mainText"><g:message code="admin.index.des15" />.</p>
</div>

<div class="homeCell">
<g:link class="mainLink" controller="admin" action="export">Export all data as JSON</g:link>
<p class="mainText">All tables exported verbatim as JSON</p>
<g:link class="mainLink" controller="admin" action="export"><g:message code="admin.index.link16" /></g:link>
<p class="mainText"><g:message code="admin.index.des16" /></p>
</div>
</cl:ifGranted>
</div>
Expand Down
Loading

0 comments on commit 0e193de

Please sign in to comment.