mirror of
https://github.com/Prominence/grails-translations-plugin.git
synced 2026-07-03 02:36:46 +03:00
Changed domain models. Added page for changing translations (just a model).
Added tag lib.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" %>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="layout" content="main"/>
|
||||
<title><g:message code="plugin.translations.overview.edit.page.title" args="${[bundle.name]}"/></title>
|
||||
<r:require modules="bootstrap"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<g:each in="${bundle.languages}" var="language">
|
||||
<g:render template="templates/language" model="${[language: language]}" />
|
||||
<br />
|
||||
</g:each>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -12,20 +12,22 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<g:each in="${bundle.propertiesList}" var="propertyFile">
|
||||
<th>${propertyFile.name}</th>
|
||||
<g:each in="${bundle.languages}" var="language">
|
||||
<th>${language.languageTag.toUpperCase()}</th>
|
||||
</g:each>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<g:each in="${bundle.propertiesList}" var="propertyFile">
|
||||
<td>${propertyFile.text}</td>
|
||||
<g:each in="${bundle.languages}" var="language">
|
||||
<td>${language.translations.each {key, value ->
|
||||
print (key + '=' + value)
|
||||
}}</td>
|
||||
</g:each>
|
||||
</tr>
|
||||
<tr>
|
||||
<g:each in="${bundle.propertiesList}" var="propertyFile">
|
||||
<td><g:message code="plugin.translations.totalRecords" args="${propertyFile.readLines()?.size() ?: '0'}"/></td>
|
||||
<g:each in="${bundle.languages}" var="language">
|
||||
<td><g:message code="plugin.translations.totalRecords" args="${language.translations.size() ?: '0'}"/></td>
|
||||
</g:each>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<g:form action="saveFile" name="${language.languageTag}">
|
||||
<h3>${language.languageTag.toUpperCase()}</h3>
|
||||
<g:each in="${language.translations}" var="translation">
|
||||
<g:set var="key" value="${ts.propertyKey(property: translation)}"/>
|
||||
<label>${key}</label> <g:textField name="${key}" value="${ts.propertyValue(property: translation)}" />
|
||||
<br/>
|
||||
</g:each>
|
||||
<g:submitButton name="save" class="btn btn-primary" value="${g.message(code: 'plugin.translations.action.save')}"/>
|
||||
</g:form>
|
||||
Reference in New Issue
Block a user