Permalink
Browse files

SWITCHYARD-1659 externalize ui strings

  • Loading branch information...
1 parent 1692dad commit 83741534c7b05452d1ca5fec89dcdecb3aeff0a0 @rcernich rcernich committed Aug 22, 2013
Showing with 1,723 additions and 364 deletions.
  1. +19 −0 component/core/pom.xml
  2. +11 −8 ...ore/src/main/java/org/switchyard/console/components/client/ui/BaseComponentConfigurationView.java
  3. +4 −0 component/core/src/main/java/org/switchyard/console/components/client/ui/Messages.properties
  4. +19 −0 component/soap/pom.xml
  5. +3 −0 component/soap/src/main/java/org/switchyard/console/component/soap/client/Messages.properties
  6. +9 −7 ...ap/src/main/java/org/switchyard/console/component/soap/client/SOAPComponentConfigurationView.java
  7. +9 −0 gwt/pom.xml
  8. +1,092 −0 gwt/src/main/java/org/switchyard/console/client/Messages.java
  9. +24 −24 gwt/src/main/java/org/switchyard/console/client/NameTokens.java
  10. +14 −0 gwt/src/main/java/org/switchyard/console/client/gin/SwitchYardClientModule.java
  11. +6 −0 gwt/src/main/java/org/switchyard/console/client/gin/SwitchYardGinjector.java
  12. +1 −1 gwt/src/main/java/org/switchyard/console/client/model/ArtifactReferenceCategory.java
  13. +58 −55 gwt/src/main/java/org/switchyard/console/client/model/SwitchYardStoreImpl.java
  14. +12 −6 gwt/src/main/java/org/switchyard/console/client/ui/application/ApplicationPresenter.java
  15. +3 −2 gwt/src/main/java/org/switchyard/console/client/ui/application/ApplicationReferencesList.java
  16. +1 −1 gwt/src/main/java/org/switchyard/console/client/ui/application/ApplicationServicesEditor.java
  17. +4 −3 gwt/src/main/java/org/switchyard/console/client/ui/application/ApplicationServicesList.java
  18. +19 −18 gwt/src/main/java/org/switchyard/console/client/ui/application/ApplicationView.java
  19. +4 −3 gwt/src/main/java/org/switchyard/console/client/ui/application/ApplicationsList.java
  20. +4 −3 gwt/src/main/java/org/switchyard/console/client/ui/application/ComponentReferencesList.java
  21. +7 −6 gwt/src/main/java/org/switchyard/console/client/ui/application/ComponentServicesList.java
  22. +6 −5 gwt/src/main/java/org/switchyard/console/client/ui/application/ImplementationDetailsWidget.java
  23. +9 −3 gwt/src/main/java/org/switchyard/console/client/ui/artifacts/ArtifactPresenter.java
  24. +4 −3 gwt/src/main/java/org/switchyard/console/client/ui/artifacts/ArtifactReferencesList.java
  25. +7 −6 gwt/src/main/java/org/switchyard/console/client/ui/artifacts/ArtifactReferencesView.java
  26. +2 −2 gwt/src/main/java/org/switchyard/console/client/ui/common/AbstractDataTable.java
  27. +2 −2 gwt/src/main/java/org/switchyard/console/client/ui/common/GWTPTab.java
  28. +2 −2 gwt/src/main/java/org/switchyard/console/client/ui/common/GWTPTabPanel.java
  29. +20 −19 gwt/src/main/java/org/switchyard/console/client/ui/common/PlainColumnView.java
  30. +7 −6 gwt/src/main/java/org/switchyard/console/client/ui/common/TransformersList.java
  31. +6 −5 gwt/src/main/java/org/switchyard/console/client/ui/common/ValidatorsList.java
  32. +2 −1 gwt/src/main/java/org/switchyard/console/client/ui/component/ComponentPresenter.java
  33. +2 −2 gwt/src/main/java/org/switchyard/console/client/ui/component/ComponentView.java
  34. +3 −2 gwt/src/main/java/org/switchyard/console/client/ui/config/ComponentsList.java
  35. +5 −4 gwt/src/main/java/org/switchyard/console/client/ui/config/ConfigEditor.java
  36. +5 −4 gwt/src/main/java/org/switchyard/console/client/ui/config/ConfigPresenter.java
  37. +6 −4 gwt/src/main/java/org/switchyard/console/client/ui/config/ConfigView.java
  38. +8 −7 gwt/src/main/java/org/switchyard/console/client/ui/metrics/GatewayMetricsList.java
  39. +20 −19 gwt/src/main/java/org/switchyard/console/client/ui/metrics/MessageMetricsViewer.java
  40. +6 −5 gwt/src/main/java/org/switchyard/console/client/ui/metrics/MetricsPresenter.java
  41. +12 −11 gwt/src/main/java/org/switchyard/console/client/ui/metrics/MetricsView.java
  42. +5 −4 gwt/src/main/java/org/switchyard/console/client/ui/metrics/ReferenceDetailsWidget.java
  43. +6 −5 gwt/src/main/java/org/switchyard/console/client/ui/metrics/ServiceDetailsWidget.java
  44. +13 −12 gwt/src/main/java/org/switchyard/console/client/ui/metrics/ServiceMetricsList.java
  45. +7 −6 gwt/src/main/java/org/switchyard/console/client/ui/metrics/ServiceOperationMetricsList.java
  46. +7 −6 gwt/src/main/java/org/switchyard/console/client/ui/metrics/ServiceReferenceMetricsList.java
  47. +10 −9 gwt/src/main/java/org/switchyard/console/client/ui/reference/ReferenceEditor.java
  48. +11 −5 gwt/src/main/java/org/switchyard/console/client/ui/reference/ReferencePresenter.java
  49. +6 −5 gwt/src/main/java/org/switchyard/console/client/ui/reference/ReferenceView.java
  50. +4 −3 gwt/src/main/java/org/switchyard/console/client/ui/reference/ReferencesList.java
  51. +5 −5 gwt/src/main/java/org/switchyard/console/client/ui/service/BindingDetailsWidget.java
  52. +12 −11 gwt/src/main/java/org/switchyard/console/client/ui/service/GatewaysList.java
  53. +22 −21 gwt/src/main/java/org/switchyard/console/client/ui/service/ServiceEditor.java
  54. +12 −6 gwt/src/main/java/org/switchyard/console/client/ui/service/ServicePresenter.java
  55. +6 −5 gwt/src/main/java/org/switchyard/console/client/ui/service/ServiceView.java
  56. +4 −3 gwt/src/main/java/org/switchyard/console/client/ui/service/ServicesList.java
  57. +119 −9 gwt/src/main/resources/org/switchyard/console/client/Messages.properties
  58. +17 −0 pom.xml
View
@@ -30,4 +30,23 @@
<scope>provided</scope>
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <!-- GWT Maven Plugin -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>gwt-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>i18n</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <i18nMessagesBundle>org.switchyard.console.components.client.ui.Messages</i18nMessagesBundle>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
@@ -23,6 +23,7 @@
import org.switchyard.console.components.client.model.Component;
import org.switchyard.console.components.client.ui.ComponentConfigurationPresenter.ComponentConfigurationView;
+import com.google.gwt.core.client.GWT;
import com.google.gwt.user.cellview.client.TextColumn;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;
@@ -45,6 +46,8 @@
*/
public class BaseComponentConfigurationView extends ViewImpl implements ComponentConfigurationView {
+ private static final Messages MESSAGES = GWT.create(Messages.class);
+
private Label _componentNameLabel;
private Widget _widget;
private ComponentConfigurationPresenter _presenter;
@@ -55,7 +58,7 @@
public Widget asWidget() {
if (_widget == null) {
VerticalPanel layout = new VerticalPanel();
- layout.setStyleName("fill-layout-width");
+ layout.setStyleName("fill-layout-width"); //$NON-NLS-1$
_componentNameLabel = createComponentNameLabel();
if (_componentNameLabel != null) {
@@ -101,14 +104,14 @@ protected Component getComponent() {
* @return a control for viewing the component's name.
*/
protected Label createComponentNameLabel() {
- return new ContentGroupLabel("");
+ return new ContentGroupLabel(""); //$NON-NLS-1$
}
/**
* @return a control for viewing the component's activation types.
*/
protected Label createComponentTypeLabel() {
- return new ContentGroupLabel("");
+ return new ContentGroupLabel(""); //$NON-NLS-1$
}
/**
@@ -117,8 +120,8 @@ protected Label createComponentTypeLabel() {
@SuppressWarnings("unchecked")
protected Widget createComponentDetailsWidget() {
VerticalPanel layout = new VerticalPanel();
- layout.setStyleName("fill-layout-width");
- layout.add(new ContentGroupLabel("Configured Properties"));
+ layout.setStyleName("fill-layout-width"); //$NON-NLS-1$
+ layout.add(new ContentGroupLabel(MESSAGES.label_configuredProperties()));
DefaultCellTable<Entry<String, String>> table = new DefaultCellTable<Entry<String, String>>(5);
TextColumn<Entry<String, String>> nameColumn = new TextColumn<Entry<String, String>>() {
@@ -136,8 +139,8 @@ public String getValue(Entry<String, String> object) {
}
};
- table.addColumn(nameColumn, "Name");
- table.addColumn(valueColumn, "Value");
+ table.addColumn(nameColumn, MESSAGES.label_name());
+ table.addColumn(valueColumn, MESSAGES.label_value());
layout.add(table);
@@ -194,7 +197,7 @@ protected String getComponentName() {
}
private String getComponentNameLabelText() {
- return "Name: " + getComponentName();
+ return MESSAGES.label_nameInstance(getComponentName());
}
}
@@ -0,0 +1,4 @@
+label_configuredProperties=Configured Properties
+label_name=Name
+label_nameInstance=Name: {0}
+label_value=Value
View
@@ -30,4 +30,23 @@
<scope>provided</scope>
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <!-- GWT Maven Plugin -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>gwt-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>i18n</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <i18nMessagesBundle>org.switchyard.console.component.soap.client.Messages</i18nMessagesBundle>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
@@ -0,0 +1,3 @@
+constant_notSet=<not set>
+label_configuredProperties=Configured Properties
+label_socketAddress=Socket Address ({0})
@@ -22,6 +22,7 @@
import org.jboss.ballroom.client.widgets.forms.TextItem;
import org.switchyard.console.components.client.ui.BaseComponentConfigurationView;
+import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
@@ -34,23 +35,24 @@
*/
public class SOAPComponentConfigurationView extends BaseComponentConfigurationView {
- private static final String SOCKET_ADDR = "socketAddr";
+ private static final Messages MESSAGES = GWT.create(Messages.class);
+ private static final String SOCKET_ADDR = "socketAddr"; //$NON-NLS-1$
private TextItem _socketAddr;
@SuppressWarnings("rawtypes")
@Override
protected Widget createComponentDetailsWidget() {
VerticalPanel layout = new VerticalPanel();
- layout.setStyleName("fill-layout-width");
- layout.add(new ContentGroupLabel("Configured Properties"));
+ layout.setStyleName("fill-layout-width"); //$NON-NLS-1$
+ layout.add(new ContentGroupLabel(MESSAGES.label_configuredProperties()));
- String title = "Socket Address (" + SOCKET_ADDR + ")";
+ String title = MESSAGES.label_socketAddress(SOCKET_ADDR);
_socketAddr = new TextItem(SOCKET_ADDR, title) {
@Override
public void setValue(String value) {
if (value == null || value.length() == 0) {
- value = "<not set>";
+ value = MESSAGES.constant_notSet();
}
super.setValue(value);
}
@@ -59,7 +61,7 @@ public void setValue(String value) {
RenderMetaData metaData = new RenderMetaData();
metaData.setNumColumns(1);
metaData.setTitleWidth(title.length());
- layout.add(new DefaultGroupRenderer().render(metaData, "null",
+ layout.add(new DefaultGroupRenderer().render(metaData, "null", //$NON-NLS-1$
Collections.<String, FormItem> singletonMap(SOCKET_ADDR, _socketAddr)));
return layout;
@@ -76,7 +78,7 @@ protected void updateComponentDetails() {
@Override
protected String getComponentName() {
- return "SOAP";
+ return "SOAP"; //$NON-NLS-1$
}
}
View
@@ -87,7 +87,16 @@
<goals>
<goal>resources</goal>
<goal>test</goal>
+ <!--
+ ~ does not generate proper interfaces for
+ ~ non-string paramter types. until the problem
+ ~ is corrected, the Messages class will need to
+ ~ be maintained manually. update
+ ~ Messages.properties then run gwt:i18n goal and
+ ~ merge the newly generated file with the
+ ~ existing file.
<goal>i18n</goal>
+ -->
</goals>
</execution>
</executions>
Oops, something went wrong.

0 comments on commit 8374153

Please sign in to comment.