Index: lams_central/conf/language/ApplicationResources.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_central/conf/language/Attic/ApplicationResources.properties,v
diff -u -r1.1 -r1.2
--- lams_central/conf/language/ApplicationResources.properties 10 Apr 2006 11:05:19 -0000 1.1
+++ lams_central/conf/language/ApplicationResources.properties 11 Apr 2006 12:00:34 -0000 1.2
@@ -1,35 +1,12 @@
# CVS ID: $Id$
-# Language strings for the Authoring and Workspace classes. Mostly error messages.
-
-#=========================Error Messages===========================#
error.authorisation=You are not authorised to do this.
error.newpassword.mismatch=Your new passwords don't match each other.
error.oldpassword.mismatch=Your old password is not correct.
-
-# Flash related messages
-
-flash.validation.error.other=Other Error
-flash.validation.error.transitionNoActivityBeforeOrAfter=A Transition must have an activity before or after the transition
-flash.validation.error.activityWithNoTransition=An activity must have an input or output transition
-flash.validation.error.inputTransitionType1=There is more than one activity with no input transition
-flash.validation.error.inputTransitionType2=No activities are missing their input transition.
-flash.validation.error.outputTransitionType1=There is more than one activity with no output transition
-flash.validation.error.outputTransitionType2=No activities are missing their output transition.
-flash.validation.error.GroupingRequired=Grouping is required
-flash.validation.error.GroupingNotRequired=Grouping is not supported
-flash.validation.error.GroupingSelected=Grouping is selected but does not exist
-flash.validation.error.OptionalActivity=An Optional Activity must have one or more activities
-flash.validation.error.OptionalActivityOrderId=This Optional Activity has invalid order ids
-flash.validation.error.illegalScheduleGateOffsetsType1=A Schedule Gate cannot have equal start and end time offsets.
-flash.validation.error.illegalScheduleGateOffsetsType2=A Schedule Gate cannot have the start time offset greater than end time offset
-#
+# Invalid data sent from Flash to server.
invalid.wddx.packet=Invalid Object in WDDX packet. Error was {0}.
no.such.learningdesign.exist=No Learning Design with learning_design_id of:{0} exists.
no.such.user.exist=No such User with a user_id of: {0} exists.
no.such.workspace.exist=No such WorkspaceFolder with workspace_folder_id of:{0} exists.
-#====================================================================#
-#=========================WorkingSpace labels===========================#
-#====================================================================#
delete.resource.error=Cannot delete the resource: {0}
delete.resource.error.value.miss=deleteResource(Long resourceID, String resourceType, Integer userID) requires a value for resourceID, resourceType and userID.
delete.lesson.error=LAMS does not support deleting a lesson via the workspace interface.
@@ -48,11 +25,13 @@
move.resrouce.error.value.miss=moveResource(Long resourceID,Integer targetFolderID, String resourceType, Integer userID) requires a value for resourceID, targetFolderID, resourceType and userID
unsupport.move=LAMS does not support moving a file via the workspace interface.
creating.workspace.folder.error= Exception occured while creating workspaceFolderContent:{0}.
-resource.already.exist="The resource {0} already exists in the repository: {1}.
-no.such.content="No such content with versionID of {0} found in repository {1}.
+resource.already.exist=The resource {0} already exists in the repository: {1}.
+no.such.content=No such content with versionID of {0} found in repository {1}.
content.delete.success=Content Successfully deleted.
rename.resource.error=Cannot rename the resource: {0}
rename.resource.error.miss.vaue=renameResource(Long resourceID,Integer newName, String resourceType, Integer userID) requires a value for resourceID, targetFolderID, resourceType and userID.
rename.resource.unspport=LAMS does not support renaming a file via the workspace interface.
folder.already.exist=A folder with given name '{0}' already exists.
-can.not.rename.root.folder=Cannot rename the ROOT folder.
\ No newline at end of file
+can.not.rename.root.folder=Cannot rename the ROOT folder.
+organisations=Organisations
+folders=Folders
\ No newline at end of file
Index: lams_central/src/java/org/lamsfoundation/lams/workspace/workspaceApplicationContext.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/workspace/workspaceApplicationContext.xml,v
diff -u -r1.3 -r1.4
--- lams_central/src/java/org/lamsfoundation/lams/workspace/workspaceApplicationContext.xml 15 Feb 2006 05:05:39 -0000 1.3
+++ lams_central/src/java/org/lamsfoundation/lams/workspace/workspaceApplicationContext.xml 11 Apr 2006 12:00:34 -0000 1.4
@@ -6,7 +6,7 @@
- org.lamsfoundation.lams.applicationResources
+ org.lamsfoundation.lams.central.ApplicationResources
Index: lams_central/src/java/org/lamsfoundation/lams/workspace/service/IWorkspaceManagementService.java
===================================================================
RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/workspace/service/IWorkspaceManagementService.java,v
diff -u -r1.10 -r1.11
--- lams_central/src/java/org/lamsfoundation/lams/workspace/service/IWorkspaceManagementService.java 3 Apr 2006 23:28:17 -0000 1.10
+++ lams_central/src/java/org/lamsfoundation/lams/workspace/service/IWorkspaceManagementService.java 11 Apr 2006 12:00:34 -0000 1.11
@@ -31,6 +31,7 @@
import org.lamsfoundation.lams.usermanagement.exception.UserAccessDeniedException;
import org.lamsfoundation.lams.usermanagement.exception.UserException;
import org.lamsfoundation.lams.usermanagement.exception.WorkspaceFolderException;
+import org.lamsfoundation.lams.util.MessageService;
import org.lamsfoundation.lams.workspace.dto.FolderContentDTO;
/**
@@ -52,7 +53,14 @@
public static final String MSG_KEY_DELETE_VERSION = "deleteContentWithVersion";
public static final String MSG_KEY_ORG_BY_ROLE = "getOrganisationsByUserRole";
public static final String MSG_KEY_USER_BY_ROLE = "getUsersFromOrganisationByRole";
+
/**
+ * I18n Message service. The Workspace action class needs access to the message service.
+ * @param messageSource
+ */
+ public MessageService getMessageService();
+
+ /**
* Get the workspace folder for a particular id. Does not check the user permissions - that will be checked if you try to get
* anything from the folder.
*/
Index: lams_central/src/java/org/lamsfoundation/lams/workspace/service/WorkspaceManagementService.java
===================================================================
RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/workspace/service/WorkspaceManagementService.java,v
diff -u -r1.19 -r1.20
--- lams_central/src/java/org/lamsfoundation/lams/workspace/service/WorkspaceManagementService.java 3 Apr 2006 23:28:17 -0000 1.19
+++ lams_central/src/java/org/lamsfoundation/lams/workspace/service/WorkspaceManagementService.java 11 Apr 2006 12:00:34 -0000 1.20
@@ -111,6 +111,14 @@
this.messageService = messageService;
}
/**
+ * i18n Message service. The Workspace action class needs access to the message service.
+ * @param messageSource
+ */
+ public MessageService getMessageService() {
+ return messageService;
+ }
+
+ /**
* @param workspaceFolderContentDAO The workspaceFolderContentDAO to set.
*/
public void setWorkspaceFolderContentDAO(
Index: lams_central/src/java/org/lamsfoundation/lams/workspace/web/WorkspaceAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/workspace/web/WorkspaceAction.java,v
diff -u -r1.11 -r1.12
--- lams_central/src/java/org/lamsfoundation/lams/workspace/web/WorkspaceAction.java 3 Apr 2006 23:28:18 -0000 1.11
+++ lams_central/src/java/org/lamsfoundation/lams/workspace/web/WorkspaceAction.java 11 Apr 2006 12:00:34 -0000 1.12
@@ -38,6 +38,7 @@
import org.apache.struts.actions.DispatchAction;
import org.lamsfoundation.lams.usermanagement.WorkspaceFolder;
import org.lamsfoundation.lams.usermanagement.exception.UserAccessDeniedException;
+import org.lamsfoundation.lams.util.MessageService;
import org.lamsfoundation.lams.util.WebUtil;
import org.lamsfoundation.lams.util.wddx.FlashMessage;
import org.lamsfoundation.lams.web.util.AttributeNames;
@@ -183,14 +184,16 @@
try {
if ( BOOTSTRAP_FOLDER_ID.equals(folderID )) {
+ MessageService msgService = workspaceManagementService.getMessageService();
+
// return back the dummy org DTO and the user's workspace folder
Vector folders = new Vector();
FolderContentDTO userFolder = workspaceManagementService.getUserWorkspaceFolder(userID);
if ( userFolder != null )
folders.add(userFolder);
- // TODO I8N the organisation strings
- FolderContentDTO dummyOrgFolder = new FolderContentDTO("Organisations", "Folder",
+ FolderContentDTO dummyOrgFolder = new FolderContentDTO(msgService.getMessage("organisations"),
+ msgService.getMessage("folder"),
null, null,
FolderContentDTO.FOLDER, new Long(ORG_FOLDER_ID.longValue()), WorkspaceFolder.READ_ACCESS,
null);