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

Commit

Permalink
Merge branch 'release' of github.com:zanata/zanata-server into rhbz11…
Browse files Browse the repository at this point in the history
…00131
  • Loading branch information
Patrick Huang committed May 22, 2014
2 parents 9c41355 + fa2ac56 commit fc970e2
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 12 deletions.
Expand Up @@ -24,6 +24,7 @@
import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang.StringEscapeUtils;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
Expand Down Expand Up @@ -116,14 +117,14 @@ public String getActivityMessage(Activity activity) {
"jsf.dashboard.activity.translate.message",
activity.getWordCount(), getProjectUrl(activity),
getProjectName(activity), getEditorUrl(activity),
getLastTextFlowContent(activity));
StringEscapeUtils.escapeHtml(getLastTextFlowContent(activity)));

case REVIEWED_TRANSLATION:
return zanataMessages.getMessage(
"jsf.dashboard.activity.review.message",
activity.getWordCount(), getProjectUrl(activity),
getProjectName(activity), getEditorUrl(activity),
getLastTextFlowContent(activity));
StringEscapeUtils.escapeHtml(getLastTextFlowContent(activity)));

case UPLOAD_SOURCE_DOCUMENT:
return zanataMessages.getMessage(
Expand Down
5 changes: 4 additions & 1 deletion zanata-war/src/main/java/org/zanata/action/VersionHome.java
Expand Up @@ -123,7 +123,10 @@ public void init(boolean isNewInstance) {
selectedProjectType = projectType.name();
}
} else {
selectedProjectType = getInstance().getProjectType().name();
ProjectType versionProjectType = getInstance().getProjectType();
if(versionProjectType != null) {
selectedProjectType = versionProjectType.name();
}
}
}

Expand Down
Expand Up @@ -43,7 +43,7 @@
public class TransFilterPresenter extends WidgetPresenter<TransFilterDisplay>
implements TransFilterDisplay.Listener, UserConfigChangeHandler,
FilterViewEventHandler {
private static final String DATE_PATTERN = "dd-mm-yyyy";
private static final String DATE_PATTERN = "yyyy-mm-dd";

private final History history;

Expand Down Expand Up @@ -84,7 +84,7 @@ public void searchTerm(String searchTerm) {
if (invalidBefore || invalidAfter) {
eventBus.fireEvent(new NotificationEvent(
NotificationEvent.Severity.Warning,
"Invalid date, expected format dd-mm-yyyy"));
"Invalid date, expected format yyyy-mm-dd"));

display.selectPartialText(invalidBefore ? editorFilter
.getLastModifiedBefore() : editorFilter
Expand Down
Expand Up @@ -49,8 +49,8 @@
<li class="js-suggest__result autocomplete__result" data-key="text">text: <span class="txt--understated">source and target text</span></li>
<li class="js-suggest__result autocomplete__result" data-key="resource-id">resource-id: <span class="txt--understated">exact Resource ID for a string</span></li>
<li class="js-suggest__result autocomplete__result" data-key="last-modified-by">last-modified-by: <span class="txt--understated">username</span></li>
<li class="js-suggest__result autocomplete__result" data-key="last-modified-before">last-modified-before: <span class="txt--understated">date in format dd-mm-yyyy</span></li>
<li class="js-suggest__result autocomplete__result" data-key="last-modified-after">last-modified-after: <span class="txt--understated">date in format dd-mm-yyyy</span></li>
<li class="js-suggest__result autocomplete__result" data-key="last-modified-before">last-modified-before: <span class="txt--understated">date in format yyyy-mm-dd</span></li>
<li class="js-suggest__result autocomplete__result" data-key="last-modified-after">last-modified-after: <span class="txt--understated">date in format yyyy-mm-dd</span></li>
<li class="js-suggest__result autocomplete__result" data-key="source-comment">source-comment: <span class="txt--understated">source comment text</span></li>
<li class="js-suggest__result autocomplete__result" data-key="translation-comment">translation-comment: <span class="txt--understated">translation comment text</span></li>
<li class="js-suggest__result autocomplete__result" data-key="msgctxt">msgctxt: <span class="txt--understated">exact Message Context for a string</span></li>
Expand Down
Expand Up @@ -79,9 +79,8 @@ public class GetTransUnitListHandler extends
@In(value = "webtrans.gwt.GetTransUnitsNavigationHandler", create = true)
private GetTransUnitsNavigationService getTransUnitsNavigationService;

// TODO pahuang this needs to be standardized in client
private DateTimeFormatter dateFormatter =
DateTimeFormat.forPattern("dd-mm-yyyy");
DateTimeFormat.forPattern("yyyy-mm-dd");

@Override
public GetTransUnitListResult execute(GetTransUnitList action,
Expand Down
4 changes: 2 additions & 2 deletions zanata-war/src/main/resources/messages.properties
Expand Up @@ -838,9 +838,9 @@ jsf.config.PiwikIdSitetooltip=Website Id in Piwik
jsf.config.TermsOfUseUrl=Terms of Use URL
jsf.config.TermsOfUseUrltooltip=The URL for terms of use statement
jsf.config.MaxConcurrentRequestsPerApiKey=Max concurrent requests per API key
jsf.config.MaxConcurrentRequestsPerApiKeytooltip=Max concurrent requests per API key. Once over the limit server will return status code 403. 0 means no limit.
jsf.config.MaxConcurrentRequestsPerApiKeytooltip=Max concurrent requests per API key. Once over the limit server will return status code 403. 0 means no limit. Default(blank) is 6.
jsf.config.MaxActiveRequestsPerApiKey=Max active requests per API key
jsf.config.MaxActiveRequestsPerApiKeytooltip=Max active requests per API key. Request may block. 0 means no limit. If this is greater than max concurrent request limit, it will have no effect.
jsf.config.MaxActiveRequestsPerApiKeytooltip=Max active requests per API key. Request may block. 0 means no limit. Default(blank) is 2. If this is greater than max concurrent request limit, it will have no effect.



Expand Down
Expand Up @@ -55,7 +55,7 @@
<a4j:status name="projectList-loader">
<f:facet name="start"><zanata:loader/></f:facet>
</a4j:status>
<h:form id="projectListForm">
<h:form id="projectListForm" class="l--push-bottom-1">
<ul id="maintainedProjects" class="list--stats">
<ui:repeat value="#{dashboardAction.projectList.currentPage}" var="project">
<li class="list__item--actionable">
Expand Down
2 changes: 2 additions & 0 deletions zanata-war/src/main/webapp/admin/server_configuration.xhtml
Expand Up @@ -211,6 +211,7 @@
<h:inputText id="maxConcurrentPerApiKeyEml"
value="#{serverConfigurationBean.maxConcurrentRequestsPerApiKey}">
<a4j:ajax event="blur" render="maxConcurrentPerApiKeyField"/>
<rich:placeholder value="default is 6" styleClass="txt--neutral" />
</h:inputText>

<s:span styleClass="icon-info-circle-2 input_help"
Expand All @@ -229,6 +230,7 @@
value="#{serverConfigurationBean.maxActiveRequestsPerApiKey}">
<a4j:ajax event="blur"
render="maxActiveRequestsPerApiKeyField"/>
<rich:placeholder value="default is 2" styleClass="txt--neutral" />
</h:inputText>

<s:span styleClass="icon-info-circle-2 input_help"
Expand Down

0 comments on commit fc970e2

Please sign in to comment.