Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
WIP organizing language pages strings, yet to do admin pages
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmason committed Apr 3, 2013
1 parent e2e105b commit 1f0ed6e
Show file tree
Hide file tree
Showing 22 changed files with 243 additions and 195 deletions.
239 changes: 143 additions & 96 deletions zanata-war/src/main/resources/messages.properties

Large diffs are not rendered by default.

Expand Up @@ -65,6 +65,9 @@
<h:outputText>#{messages['jsf.login.openid.SelectProvider']}</h:outputText>
<br/>
<br/>
<ui:remove>
<!-- TODO use localizable strings for tooltips. -->
</ui:remove>
<rich:spacer height="10"/>
<h:graphicImage id="fedora_signin" value="../images/openid/fedora.png" styleClass="login_option"
title="Fedora"
Expand Down
6 changes: 2 additions & 4 deletions zanata-war/src/main/webapp/account/activate.xhtml
Expand Up @@ -9,10 +9,8 @@
xmlns:a4j="http://richfaces.org/a4j"
template="../WEB-INF/layout/template.xhtml">

<ui:define name="page_title">Activate Account</ui:define>
<ui:define name="page_title">#{messages['jsf.ActivateAccount']}</ui:define>
<ui:define name="center_content">
</ui:define>




</ui:composition>
23 changes: 11 additions & 12 deletions zanata-war/src/main/webapp/account/inactive_account.xhtml
Expand Up @@ -7,7 +7,7 @@
xmlns:s="http://jboss.com/products/seam/taglib"
template="../WEB-INF/layout/template.xhtml">

<ui:define name="page_title">Inactive account</ui:define>
<ui:define name="page_title">#{messages['jsf.InactiveAccount']}</ui:define>

<ui:define name="head">
<script type="text/javascript">
Expand All @@ -22,7 +22,7 @@
document.getElementById("#{rich:clientId('updateEmailLoading')}").style.display='none';
}
}

function showSendEmailLoading(show)
{
if(show == true)
Expand All @@ -34,25 +34,24 @@
document.getElementById("#{rich:clientId('sendActivationEmail')}").style.display='none';
}
}
</script>
</script>
</ui:define>

<ui:define name="center_content">
<h:form styleClass="inactiveAccountForm">
<h:outputText value="Your account is not activated. Please select the following:" styleClass="inactive_message"/>
<h:outputText value="#{messages['jsf.inactiveaccount.PleaseSelectOne']}" styleClass="inactive_message"/>

<s:div styleClass="contentDiv">
<h:commandButton id="resendEmail" value="#{messages['jsf.ResendActivationEmail']}"
action="#{inactiveAccountAction.sendActivationEmail}" onclick="showSendEmailLoading(true)"/>
<h:graphicImage value="/images/loading.gif" id="sendActivationEmail" style="display:none" />
</s:div>
<h:outputText value="OR" styleClass="inactive_message_bold"/>

<h:outputText value="#{messages['jsf.or']}" styleClass="inactive_message_bold"/>

<s:div styleClass="contentDiv">
<h:outputText value="Update email address and resend activation email:" styleClass="inactive_message"/>


<h:outputText value="#{messages['jsf.inactiveaccount.UpdateAndResend']}" styleClass="inactive_message"/>

<s:decorate id="emailField" template="../WEB-INF/layout/edit.xhtml">
<ui:define name="label">#{messages['jsf.Email']}</ui:define>
<h:inputText id="email" value="#{inactiveAccountAction.email}">
Expand All @@ -65,7 +64,7 @@
</s:span>
</s:decorate>
<div style="clear:both;"/>

<h:commandButton id="updateEmail" value="#{messages['jsf.UpdateEmail']}"
action="#{inactiveAccountAction.changeEmail}" onclick="showUpdateEmailLoading(true)"/>
<h:graphicImage value="/images/loading.gif" id="updateEmailLoading" style="display:none" />
Expand Down
2 changes: 1 addition & 1 deletion zanata-war/src/main/webapp/account/login.xhtml
Expand Up @@ -8,7 +8,7 @@
xmlns:rich="http://richfaces.org/rich"
template="../WEB-INF/layout/template.xhtml">

<ui:define name="page_title">Log in</ui:define>
<ui:define name="page_title">#{messages['jsf.SignIn']}</ui:define>
<ui:define name="center_content">
</ui:define>
</ui:composition>
2 changes: 1 addition & 1 deletion zanata-war/src/main/webapp/account/login_input.xhtml
Expand Up @@ -8,7 +8,7 @@
xmlns:rich="http://richfaces.org/rich"
template="../WEB-INF/layout/template.xhtml">

<ui:define name="page_title">Log in</ui:define>
<ui:define name="page_title">#{messages['jsf.SignIn']}</ui:define>
<ui:define name="center_content">
<ui:include src="../WEB-INF/layout/login_form.xhtml"/>
</ui:define>
Expand Down
2 changes: 1 addition & 1 deletion zanata-war/src/main/webapp/account/logout.xhtml
Expand Up @@ -8,7 +8,7 @@
xmlns:rich="http://richfaces.org/rich"
template="../WEB-INF/layout/template.xhtml">

<ui:define name="page_title">Log out</ui:define>
<ui:define name="page_title">#{messages['jsf.SignOut']}</ui:define>
<ui:define name="center_content">
</ui:define>
</ui:composition>
19 changes: 10 additions & 9 deletions zanata-war/src/main/webapp/account/register.xhtml
Expand Up @@ -9,7 +9,7 @@
xmlns:a4j="http://richfaces.org/a4j"
template="../WEB-INF/layout/template.xhtml">

<ui:define name="page_title">Register</ui:define>
<ui:define name="page_title">#{messages['jsf.Register']}</ui:define>
<ui:define name="center_content">
<a4j:form id="registerForm" rendered="#{applicationConfiguration.internalAuth}">
<s:token allowMultiplePosts="true" />
Expand Down Expand Up @@ -72,18 +72,21 @@
<ui:define name="label"><h:graphicImage value="/seam/resource/captcha"/></ui:define>
<h:inputText id="verifyCaptcha" value="#{captcha.response}" required="true"/>
</s:decorate>


<ui:remove>
<!-- FIXME string concatenation not good for l10n -->
</ui:remove>
<s:decorate id="agreedToTerms" template="../WEB-INF/layout/edit.xhtml">
<h:selectBooleanCheckbox id="agreedToTerms" value="#{register.agreedToTermsOfUse}"/>
<label for="agreedToTerms">
#{messages['jsf.IAgreeToThe']}
<h:outputLink value="#" id="termsOfUseLink">
<h:outputText value="#{messages['jsf.TermsOfUse']}"/>
<h:outputText value=" #{messages['jsf.TermsOfUse']}"/>
<rich:componentControl for="termsOfUse" attachTo="termsOfUseLink" operation="show" event="onclick"/>
</h:outputLink>
</label>
</s:decorate>

<div style="clear:both"/>
<s:div rendered="#{applicationConfiguration.openIdAuth}">
<h:outputText value="#{messages['jsf.register.LoginUsingOpenId']}" escape="false"/>
Expand All @@ -93,7 +96,7 @@
</div>
</rich:panel>
</a4j:form>

<rich:modalPanel id="termsOfUse" width="640" height="480" rendered="#{not identity.loggedIn and applicationConfiguration.internalAuth}" >
<f:facet name="header">
<h:panelGroup>
Expand All @@ -118,9 +121,7 @@
<rich:panel rendered="#{not applicationConfiguration.internalAuth}">
<h:outputText value="#{messages['jsf.PleaseContactAdministrationToGetRegistrationLink']}"/>
</rich:panel>

</ui:define>




</ui:composition>
6 changes: 2 additions & 4 deletions zanata-war/src/main/webapp/account/validate_email.xhtml
Expand Up @@ -9,10 +9,8 @@
xmlns:a4j="http://richfaces.org/a4j"
template="../WEB-INF/layout/template.xhtml">

<ui:define name="page_title">Validate Email</ui:define>
<ui:define name="page_title">#{messages['jsf.ValidateEmail']}</ui:define>
<ui:define name="center_content">
</ui:define>




</ui:composition>
2 changes: 1 addition & 1 deletion zanata-war/src/main/webapp/edit_home_content.xhtml
Expand Up @@ -9,7 +9,7 @@
xmlns:rich="http://richfaces.org/rich"
template="/WEB-INF/layout/template.xhtml">

<ui:define name="page_title">Edit Home</ui:define>
<ui:define name="page_title">#{messages['jsf.EditHomePage']}</ui:define>
<ui:define name="center_content" >
<h1>#{messages['jsf.HomepageContent']}</h1>

Expand Down
2 changes: 1 addition & 1 deletion zanata-war/src/main/webapp/edit_home_content_code.xhtml
Expand Up @@ -9,7 +9,7 @@
xmlns:rich="http://richfaces.org/rich"
template="/WEB-INF/layout/template.xhtml">

<ui:define name="page_title">Edit Home Code</ui:define>
<ui:define name="page_title">#{messages['jsf.server.EditHomePageCode.label']}</ui:define>
<ui:define name="center_content" >
<h1>#{messages['jsf.HomepageContent']}</h1>

Expand Down
2 changes: 1 addition & 1 deletion zanata-war/src/main/webapp/error.xhtml
Expand Up @@ -7,7 +7,7 @@
xmlns:h="http://java.sun.com/jsf/html"
template="WEB-INF/layout/template.xhtml">

<ui:define name="page_title">Error</ui:define>
<ui:define name="page_title">#{messages['jsf.Error']}</ui:define>
<ui:param name="showGlobalMessages" value="false"/>
<ui:define name="center_content">

Expand Down
56 changes: 28 additions & 28 deletions zanata-war/src/main/webapp/glossary/view.xhtml
Expand Up @@ -14,19 +14,19 @@
function openDeletePanel() {
#{rich:component('deletePanel')}.show();
}

function hideDeletePanel() {
#{rich:component('deletePanel')}.hide();
}

function openUploadPanel() {
#{rich:component('uploadPanel')}.show();
}

function hideUploadPanel() {
#{rich:component('uploadPanel')}.hide();
}

function getFileExtension(fileName) {
var extensionIndex = fileName.lastIndexOf('.') + 1;
var fileExtension = "";
Expand All @@ -36,35 +36,35 @@
}
return fileExtension;
}

function updateForm(fileName) {
var fileExtension = getFileExtension(fileName).toUpperCase();
if(fileExtension == "CSV")
{
document.getElementById('targetLangDiv').style.display = "none";
document.getElementById('sourceLangDiv').style.display = "none";
document.getElementById('commentColsDiv').style.display = "";
document.getElementById('treatCommentSameDiv').style.display = "";
document.getElementById('targetLangDiv').style.display = "none";
document.getElementById('sourceLangDiv').style.display = "none";
document.getElementById('commentColsDiv').style.display = "";
document.getElementById('treatCommentSameDiv').style.display = "";
document.getElementById('#{rich:clientId('uploadButton')}').removeAttribute("disabled")
}
}
else if(fileExtension == "PO")
{
document.getElementById('targetLangDiv').style.display = "";
document.getElementById('sourceLangDiv').style.display = "";
document.getElementById('commentColsDiv').style.display = "none";
document.getElementById('treatCommentSameDiv').style.display = "";
document.getElementById('targetLangDiv').style.display = "";
document.getElementById('sourceLangDiv').style.display = "";
document.getElementById('commentColsDiv').style.display = "none";
document.getElementById('treatCommentSameDiv').style.display = "";
document.getElementById('#{rich:clientId('uploadButton')}').removeAttribute("disabled");
}
else
{
document.getElementById('targetLangDiv').style.display = "none";
document.getElementById('sourceLangDiv').style.display = "none";
document.getElementById('commentColsDiv').style.display = "none";
document.getElementById('treatCommentSameDiv').style.display = "none";
document.getElementById('targetLangDiv').style.display = "none";
document.getElementById('sourceLangDiv').style.display = "none";
document.getElementById('commentColsDiv').style.display = "none";
document.getElementById('treatCommentSameDiv').style.display = "none";
document.getElementById('#{rich:clientId('uploadButton')}').setAttribute("disabled", true);
}
}

function showLoading(show)
{
if(show == true)
Expand All @@ -76,7 +76,7 @@
document.getElementById("#{rich:clientId('fileUploading')}").style.display='none';
}
}

function showDeleting(show)
{
if(show == true)
Expand All @@ -88,7 +88,7 @@
document.getElementById("#{rich:clientId('deleting')}").style.display='none';
}
}

</script>
</ui:define>

Expand Down Expand Up @@ -129,7 +129,7 @@
<div>
<h:outputLabel value="#{messages['jsf.Glossary.supportedFileFormat']}" class="glossarySupportedFileLabel" />
</div>

<s:fileUpload id="fileUpload" accept="*"
data="#{glossaryAction.glossaryFileUpload.fileContents}"
fileName="#{glossaryAction.glossaryFileUpload.fileName}"
Expand All @@ -138,7 +138,7 @@

<div title="#{messages['jsf.Glossary.SourceLocale.Title']}"
class="glosaryFileUploadDialog" id="sourceLangDiv" style="display:none">
<h:outputLabel value="Source Language" />
<h:outputLabel value="#{messages['jsf.SourceLanguage']}" />
<h:selectOneMenu
value="#{glossaryAction.glossaryFileUpload.sourceLang}">
<s:selectItems value="#{glossaryAction.availableLocales}"
Expand All @@ -150,7 +150,7 @@
</div>
<div title="#{messages['jsf.Glossary.TargetLocale.Title']}"
class="glosaryFileUploadDialog" id="targetLangDiv" style="display:none">
<h:outputLabel value="Target Language" />
<h:outputLabel value="#{messages['jsf.TargetLanguage']}" />
<h:selectOneMenu
value="#{glossaryAction.glossaryFileUpload.transLang}">
<s:selectItems value="#{glossaryAction.availableLocales}"
Expand All @@ -163,7 +163,7 @@

<div class="glosaryFileUploadDialog" id="treatCommentSameDiv" style="display:none">
<h:outputText
value="#{messages['jsf.Glossary.TreatSourceCommentsAsTarget']}?"
value="#{messages['jsf.Glossary.TreatSourceCommentsAsTarget']}"
title="#{messages['jsf.Glossary.TreatSourceCommentsAsTarget.Title']}" />
<h:selectBooleanCheckbox
value="#{glossaryAction.glossaryFileUpload.treatSourceCommentsAsTarget}"
Expand All @@ -190,7 +190,7 @@
</div>
</h:form>
</rich:modalPanel>

<rich:modalPanel id="deletePanel" moveable="#{true}"
resizeable="#{false}" autosized="#{true}">
<f:facet name="header">
Expand All @@ -201,7 +201,7 @@
<span class="icon-attention warn"><h:outputText value="#{messages['jsf.ThisActionCannotBeUndone']}" /></span>

</div>

<h:form id="deleteForm">
<div class="glosaryDeleteDialog">
<h:outputLabel value="#{messages['jsf.SelectLocaleToDelete']}:" />
Expand Down Expand Up @@ -234,11 +234,11 @@
<f:facet name="header">#{messages['jsf.Actions']}</f:facet>
<s:fragment rendered="#{s:hasPermission('', 'glossary-insert')}">
<a href="#" onclick="openUploadPanel(); return false;"
class="action_link"> #{messages['jsf.Upload']} </a>
class="action_link">#{messages['jsf.Upload']}</a>
</s:fragment>
<s:fragment rendered="#{s:hasPermission('', 'glossary-delete')}">
<a href="#" onclick="openDeletePanel(); return false;"
class="action_link"> #{messages['jsf.Delete']} </a>
class="action_link">#{messages['jsf.Delete']}</a>
</s:fragment>
</rich:panel>
</ui:define>
Expand Down
8 changes: 4 additions & 4 deletions zanata-war/src/main/webapp/help/contact_admin.xhtml
Expand Up @@ -10,15 +10,15 @@
template="/WEB-INF/layout/template.xhtml">

<ui:param name="showGlobalMessages" value="true"/>
<ui:define name="page_title">Contact Admin</ui:define>

<ui:define name="page_title">#{messages['jsf.ContactAdmin']}</ui:define>
<ui:define name="center_content">
<h:form>
<s:token allowMultiplePosts="true" />
<h1>#{messages['jsf.ContactAdmin']}</h1>

<rich:panel>

<s:decorate id="nameField" template="../WEB-INF/layout/display.xhtml">
<ui:define name="label">#{messages['jsf.email.From']}</ui:define>
<h:outputText id="senderName" value="#{sendEmail.fromName}"
Expand Down
2 changes: 1 addition & 1 deletion zanata-war/src/main/webapp/help/edit_help_content.xhtml
Expand Up @@ -9,7 +9,7 @@
xmlns:rich="http://richfaces.org/rich"
template="/WEB-INF/layout/template.xhtml">

<ui:define name="page_title">Edit Help Content</ui:define>
<ui:define name="page_title">#{messages['jsf.EditHelpPageContent']}</ui:define>
<ui:define name="center_content" >
<h1>#{messages['jsf.Help']}</h1>

Expand Down

0 comments on commit 1f0ed6e

Please sign in to comment.