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

Commit

Permalink
Improve on glossary upload ui, implement supported file format label
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-sl-eng committed Sep 14, 2012
1 parent f1f0b58 commit 9f0ddf0
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 13 deletions.
13 changes: 8 additions & 5 deletions zanata-war/src/main/resources/messages.properties
Expand Up @@ -149,8 +149,6 @@ jsf.Coordinator=Coordinator
jsf.ContactAdmin=Contact Admin
jsf.contactLanguageTeamCoordinator=Contact Team Coordinators
jsf.contactLanguageTeamCoordinatorForLocale=Contact #{sendEmail.locale.localeId.id} (#{sendEmail.locale.retrieveNativeName()}) Language Team Coordinators
jsf.CommentColumnNames=Comment column names
jsf.CommentColumnNames.Title=Customized comment column headers for csv file format. Format of CSV: {source locale},{locale},{locale}...,pos,description OR {source locale},{locale},{locale}...,description1,description2... (Only apply for CSV file format)
jsf.CountryCode=Country Code
jsf.CreateANewProject=Create a New Project
jsf.CreateNewGroup=Create New Group
Expand Down Expand Up @@ -254,8 +252,15 @@ jsf.ForgotYourPassword=Forgot your password?
jsf.FoundResultsizeProjectsMatchingQuerySearchquery=Found #{projectSearch.resultSize} Projects matching query '#{projectSearch.searchQuery}'
jsf.GenerateProjectConfig=Generate project configuration file (zanata.xml)
jsf.Glossary=Glossary
jsf.Glossary.TargetLanguage.Title=Target language (Only apply for PO file format)
jsf.Glossary.SourceLocale.Title=Source locale (Only apply for PO file format)
jsf.Glossary.TargetLocale.Title=Target locale (Only apply for PO file format)
jsf.Glossary.supportedFileFormat=Supported file format: PO and CSV
jsf.GlossaryStatistics=Glossary Statistics
jsf.Glossary.CommentColumnNames=Comment column names
jsf.Glossary.CommentColumnNames.Title=Customized comment column headers for csv file format. Format of CSV: {source locale},{locale},{locale}...,pos,description OR {source locale},{locale},{locale}...,description1,description2... (Only apply for CSV file format)
jsf.Glossary.TreatSourceCommentsAsTarget=Treat source comments and ref as target comments
jsf.Glossary.TreatSourceCommentsAsTarget.Title=When checked, source comments and references will be used as target comments

jsf.GroupName=Group Name
jsf.GroupId=Group ID
jsf.GroupIdExample=Example: my-group
Expand Down Expand Up @@ -532,8 +537,6 @@ jsf.TotalDocuments=Total Documents
jsf.TotalWords=Total Words
jsf.Translate=Translate
jsf.TranslateGWTDevMode=Translate (GWT DevMode)
jsf.TreatSourceCommentsAsTarget=Treat source comments and ref as target comments
jsf.TreatSourceCommentsAsTarget.Title=When checked, source comments and references will be used as target comments
jsf.UnexpectedErrorPleaseTryAgain=Unexpected error. Please try again.
jsf.Untranslated=Untranslated
jsf.Upload=Upload
Expand Down
21 changes: 13 additions & 8 deletions zanata-war/src/main/webapp/glossary/view.xhtml
Expand Up @@ -126,13 +126,18 @@
<h:outputText value="#{messages['jsf.Upload']}" />
</f:facet>
<h:form id="uploadForm" enctype="multipart/form-data">
<div>
<h:outputLabel value="#{messages['jsf.Glossary.supportedFileFormat']}" class="glossarySupportedFileLabel" />
</div>

<s:fileUpload id="fileUpload" accept="*"
data="#{glossaryAction.glossaryFileUpload.fileContents}"
fileName="#{glossaryAction.glossaryFileUpload.fileName}"
onchange="updateForm(this.value)">
</s:fileUpload>

<div class="glosaryFileUploadDialog" id="sourceLangDiv" style="display:none">
<div title="#{messages['jsf.Glossary.SourceLocale.Title']}"
class="glosaryFileUploadDialog" id="sourceLangDiv" style="display:none">
<h:outputLabel value="Source Language" />
<h:selectOneMenu
value="#{glossaryAction.glossaryFileUpload.sourceLang}">
Expand All @@ -143,7 +148,7 @@

</h:selectOneMenu>
</div>
<div title="#{messages['jsf.Glossary.TargetLanguage.Title']}"
<div title="#{messages['jsf.Glossary.TargetLocale.Title']}"
class="glosaryFileUploadDialog" id="targetLangDiv" style="display:none">
<h:outputLabel value="Target Language" />
<h:selectOneMenu
Expand All @@ -158,19 +163,19 @@

<div class="glosaryFileUploadDialog" id="treatCommentSameDiv" style="display:none">
<h:outputText
value="#{messages['jsf.TreatSourceCommentsAsTarget']}?"
title="#{messages['jsf.TreatSourceCommentsAsTarget.Title']}" />
value="#{messages['jsf.Glossary.TreatSourceCommentsAsTarget']}?"
title="#{messages['jsf.Glossary.TreatSourceCommentsAsTarget.Title']}" />
<h:selectBooleanCheckbox
value="#{glossaryAction.glossaryFileUpload.treatSourceCommentsAsTarget}"
title="#{messages['jsf.TreatSourceCommentsAsTarget.Title']}" />
title="#{messages['jsf.Glossary.TreatSourceCommentsAsTarget.Title']}" />
</div>

<div class="glosaryFileUploadDialog" id="commentColsDiv" style="display:none">
<h:outputText value="#{messages['jsf.CommentColumnNames']}"
title="#{messages['jsf.CommentColumnNames.Title']}" />
<h:outputText value="#{messages['jsf.Glossary.CommentColumnNames']}"
title="#{messages['jsf.Glossary.CommentColumnNames.Title']}" />
<h:inputText
value="#{glossaryAction.glossaryFileUpload.commentCols}"
title="#{messages['jsf.CommentColumnNames.Title']}" />
title="#{messages['jsf.Glossary.CommentColumnNames.Title']}" />
</div>


Expand Down
7 changes: 7 additions & 0 deletions zanata-war/src/main/webapp/stylesheet/zanata.css
Expand Up @@ -1090,6 +1090,13 @@ div.glosaryDeleteWarn span.warn
color:#D77D00;
}

.glossarySupportedFileLabel
{
font-size:12px;
font-weight:bold;
color:#B62918;
}

/* ------------------------ End Glossary Page CSS --------------------------------------*/


Expand Down

0 comments on commit 9f0ddf0

Please sign in to comment.