modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/tree/BundleTreeDataSource.java | 29 ++++------ modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/BundleVersionListView.java | 2 modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/BundleVersionView.java | 28 +++++---- modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/file/FileListView.java | 10 +-- 4 files changed, 34 insertions(+), 35 deletions(-)
New commits: commit da647cc55a4f482c78964397589c7f443a3df63c Author: John Mazzitelli mazz@redhat.com Date: Thu Nov 18 10:00:19 2010 -0500
i18n
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/tree/BundleTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/tree/BundleTreeDataSource.java index a083ac9..7cdb894 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/tree/BundleTreeDataSource.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/tree/BundleTreeDataSource.java @@ -67,15 +67,15 @@ public class BundleTreeDataSource extends RPCDataSource { protected List<DataSourceField> addDataSourceFields() { List<DataSourceField> fields = super.addDataSourceFields();
- DataSourceField idDataField = new DataSourceTextField("id", "ID"); + DataSourceField idDataField = new DataSourceTextField("id", MSG.common_title_id()); idDataField.setPrimaryKey(true); fields.add(idDataField);
- DataSourceTextField nameDataField = new DataSourceTextField("name", "Name"); + DataSourceTextField nameDataField = new DataSourceTextField("name", MSG.common_title_name()); nameDataField.setCanEdit(false); fields.add(nameDataField);
- DataSourceTextField parentIdField = new DataSourceTextField("parentId", "Parent ID"); + DataSourceTextField parentIdField = new DataSourceTextField("parentId", MSG.common_title_id_parent()); parentIdField.setForeignKey("id"); fields.add(parentIdField);
@@ -96,7 +96,7 @@ public class BundleTreeDataSource extends RPCDataSource {
bundleService.findBundlesByCriteria(criteria, new AsyncCallback<PageList<Bundle>>() { public void onFailure(Throwable caught) { - CoreGUI.getErrorHandler().handleError("Failed to load bundle data", caught); + CoreGUI.getErrorHandler().handleError(MSG.view_bundle_tree_loadFailure(), caught); response.setStatus(DSResponse.STATUS_FAILURE); processResponse(request.getRequestId(), response); } @@ -114,7 +114,7 @@ public class BundleTreeDataSource extends RPCDataSource { criteria.addFilterBundleId(bundleId); bundleService.findBundleVersionsByCriteria(criteria, new AsyncCallback<PageList<BundleVersion>>() { public void onFailure(Throwable caught) { - CoreGUI.getErrorHandler().handleError("Failed to load bundle data", caught); + CoreGUI.getErrorHandler().handleError(MSG.view_bundle_tree_loadFailure(), caught); response.setStatus(DSResponse.STATUS_FAILURE); processResponse(request.getRequestId(), response); } @@ -133,7 +133,7 @@ public class BundleTreeDataSource extends RPCDataSource { bundleService.findBundleDeploymentsByCriteria(criteria, new AsyncCallback<PageList<BundleDeployment>>() { public void onFailure(Throwable caught) { - CoreGUI.getErrorHandler().handleError("Failed to load bundle", caught); + CoreGUI.getErrorHandler().handleError(MSG.view_bundle_tree_loadFailure(), caught); }
public void onSuccess(PageList<BundleDeployment> result) { @@ -148,7 +148,7 @@ public class BundleTreeDataSource extends RPCDataSource { bundleService.findBundleDestinationsByCriteria(criteria, new AsyncCallback<PageList<BundleDestination>>() { public void onFailure(Throwable caught) { - CoreGUI.getErrorHandler().handleError("Failed to load bundle destinations", caught); + CoreGUI.getErrorHandler().handleError(MSG.view_bundle_tree_loadFailure(), caught); }
public void onSuccess(PageList<BundleDestination> result) { @@ -156,11 +156,8 @@ public class BundleTreeDataSource extends RPCDataSource { processResponse(request.getRequestId(), response); } }); - } - } - }
@Override @@ -175,23 +172,23 @@ public class BundleTreeDataSource extends RPCDataSource { }
List<ListGridRecord> records = new ArrayList<ListGridRecord>(); - + for (Object item : list) { records.add(copyValues(item)); if (item instanceof Bundle) { Bundle bundle = (Bundle) item;
- TreeNode versionNode = new TreeNode("Versions"); + TreeNode versionNode = new TreeNode(MSG.view_bundle_versions()); versionNode.setID(bundle.getId() + "_versions"); versionNode.setParentID(String.valueOf(bundle.getId())); - versionNode.setName("Versions"); - versionNode.setAttribute("name", "Versions"); + versionNode.setName(MSG.view_bundle_versions()); + versionNode.setAttribute("name", MSG.view_bundle_versions()); records.add(versionNode);
- TreeNode deploymentsNode = new TreeNode("Destinations"); + TreeNode deploymentsNode = new TreeNode(MSG.view_bundle_destinations()); deploymentsNode.setID(bundle.getId() + "_destinations"); deploymentsNode.setParentID(String.valueOf(bundle.getId())); - deploymentsNode.setName("Destinations"); + deploymentsNode.setName(MSG.view_bundle_versions()); records.add(deploymentsNode); } } diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/BundleVersionListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/BundleVersionListView.java index 69e182c..68fd97a 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/BundleVersionListView.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/BundleVersionListView.java @@ -41,7 +41,7 @@ public class BundleVersionListView extends Table { }
public BundleVersionListView(String locatorId, Criteria criteria) { - super(locatorId, "Bundle Versions", criteria); + super(locatorId, MSG.view_bundle_bundleVersions(), criteria); setHeaderIcon("subsystems/bundle/BundleVersion_24.png"); BundleVersionDataSource bundleVersionsDataSource = new BundleVersionDataSource(); setDataSource(bundleVersionsDataSource); diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/BundleVersionView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/BundleVersionView.java index de63f77..807ec93 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/BundleVersionView.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/BundleVersionView.java @@ -84,8 +84,8 @@ public class BundleVersionView extends LocatableVLayout implements BookmarkableV
// tabs.addTab(createUpdateHistoryTab());
- addMember(new BackButton(extendLocatorId("BackButton"), "Back to Bundle: " + version.getBundle().getName(), - "Bundles/Bundle/" + version.getBundle().getId())); + addMember(new BackButton(extendLocatorId("BackButton"), MSG.view_bundle_version_backToBundle() + ": " + + version.getBundle().getName(), "Bundles/Bundle/" + version.getBundle().getId()));
addMember(new HeaderLabel(Canvas.getImgURL("subsystems/bundle/BundleVersion_24.png"), version.getName() + ": " + version.getVersion())); @@ -106,14 +106,14 @@ public class BundleVersionView extends LocatableVLayout implements BookmarkableV }
private Tab createSummaryTab() { - LocatableTab tab = new LocatableTab(extendLocatorId("Summary"), "Summary"); + LocatableTab tab = new LocatableTab(extendLocatorId("Summary"), MSG.common_title_summary());
LocatableDynamicForm form = new LocatableDynamicForm(tab.getLocatorId()); form.setWidth100(); form.setHeight100(); form.setNumCols(4);
- StaticTextItem versionItem = new StaticTextItem("version", "Version"); + StaticTextItem versionItem = new StaticTextItem("version", MSG.common_title_version()); versionItem.setValue(version.getVersion());
CanvasItem tagItem = new CanvasItem("tag"); @@ -124,12 +124,14 @@ public class BundleVersionView extends LocatableVLayout implements BookmarkableV GWTServiceLookup.getTagService().updateBundleVersionTags(version.getId(), tags, new AsyncCallback<Void>() { public void onFailure(Throwable caught) { - CoreGUI.getErrorHandler().handleError("Failed to update bundle version's tags", caught); + CoreGUI.getErrorHandler().handleError( + MSG.view_bundle_version_bundleVersionTagUpdateFailure(), caught); }
public void onSuccess(Void result) { CoreGUI.getMessageCenter().notify( - new Message("Bundle Version tags updated", Message.Severity.Info)); + new Message(MSG.view_bundle_version_bundleVersionTagUpdateSuccessful(), + Message.Severity.Info)); } }); } @@ -138,16 +140,16 @@ public class BundleVersionView extends LocatableVLayout implements BookmarkableV tagItem.setCanvas(tagEditor); tagItem.setRowSpan(4);
- StaticTextItem descriptionItem = new StaticTextItem("description", "Description"); + StaticTextItem descriptionItem = new StaticTextItem("description", MSG.common_title_description()); descriptionItem.setValue(version.getDescription());
- StaticTextItem liveDeploymentsItem = new StaticTextItem("deployments", "Deployments"); + StaticTextItem liveDeploymentsItem = new StaticTextItem("deployments", MSG.view_bundle_deployments()); liveDeploymentsItem.setValue(version.getBundleDeployments().size());
- StaticTextItem filesItems = new StaticTextItem("files", "Files"); + StaticTextItem filesItems = new StaticTextItem("files", MSG.view_bundle_files()); filesItems.setValue(version.getBundleFiles().size());
- TextAreaItem recipeItem = new TextAreaItem("recipe", "Recipe"); + TextAreaItem recipeItem = new TextAreaItem("recipe", MSG.view_bundle_recipe()); recipeItem.setDisabled(true); recipeItem.setTitleOrientation(TitleOrientation.TOP); recipeItem.setColSpan(4); @@ -163,7 +165,7 @@ public class BundleVersionView extends LocatableVLayout implements BookmarkableV }
private Tab createLiveDeploymentsTab() { - LocatableTab tab = new LocatableTab(extendLocatorId("Deployments"), "Deployments"); + LocatableTab tab = new LocatableTab(extendLocatorId("Deployments"), MSG.view_bundle_deployments());
Criteria criteria = new Criteria(); criteria.setAttribute("bundleVersionId", version.getId()); @@ -174,7 +176,7 @@ public class BundleVersionView extends LocatableVLayout implements BookmarkableV }
private Tab createFilesTab() { - LocatableTab tab = new LocatableTab(extendLocatorId("Files"), "Files"); + LocatableTab tab = new LocatableTab(extendLocatorId("Files"), MSG.view_bundle_files());
FileListView filesView = new FileListView(tab.getLocatorId(), version.getId());
@@ -199,7 +201,7 @@ public class BundleVersionView extends LocatableVLayout implements BookmarkableV GWTServiceLookup.getBundleService().findBundleVersionsByCriteria(criteria, new AsyncCallback<PageList<BundleVersion>>() { public void onFailure(Throwable caught) { - CoreGUI.getErrorHandler().handleError("Failed to load budle version", caught); + CoreGUI.getErrorHandler().handleError(MSG.view_bundle_version_loadFailure(), caught); }
public void onSuccess(PageList<BundleVersion> result) { diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/file/FileListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/file/FileListView.java index c398661..305871a 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/file/FileListView.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/file/FileListView.java @@ -52,15 +52,15 @@ public class FileListView extends LocatableVLayout {
private void viewFiles(PageList<BundleFile> files) {
- Table table = new Table(extendLocatorId("BundleFiles"), "Bundle Files"); + Table table = new Table(extendLocatorId("BundleFiles"), MSG.view_bundle_bundleFiles());
- ListGridField id = new ListGridField("id", "Id"); + ListGridField id = new ListGridField("id", MSG.common_title_id()); id.setWidth("20%");
- ListGridField name = new ListGridField("name", "Name"); + ListGridField name = new ListGridField("name", MSG.common_title_name()); name.setWidth("60%");
- ListGridField size = new ListGridField("size", "File Size"); + ListGridField size = new ListGridField("size", MSG.view_bundle_fileListView_fileSize()); name.setWidth("20%");
// To get the ListGrid the Table must be initialized (via onInit()) by adding to the Canvas @@ -81,7 +81,7 @@ public class FileListView extends LocatableVLayout { GWTServiceLookup.getBundleService().findBundleFilesByCriteria(criteria, new AsyncCallback<PageList<BundleFile>>() { public void onFailure(Throwable caught) { - CoreGUI.getErrorHandler().handleError("Failed to load bundle file data", caught); + CoreGUI.getErrorHandler().handleError(MSG.view_bundle_fileListView_loadFailure(), caught); }
public void onSuccess(PageList<BundleFile> result) {
rhq-commits@lists.fedorahosted.org