Index: lams_central/conf/language/ApplicationResources.properties =================================================================== diff -u -ra7766445094c16b343aa56dc1f73fd3051cef1db -r9209fbea485f8b0f28a7374629d7cd3d3398cf41 --- lams_central/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision a7766445094c16b343aa56dc1f73fd3051cef1db) +++ lams_central/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision 9209fbea485f8b0f28a7374629d7cd3d3398cf41) @@ -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/service/IWorkspaceManagementService.java =================================================================== diff -u -rde1940e60766f8901436c6ab567c692685d5b35c -r9209fbea485f8b0f28a7374629d7cd3d3398cf41 --- lams_central/src/java/org/lamsfoundation/lams/workspace/service/IWorkspaceManagementService.java (.../IWorkspaceManagementService.java) (revision de1940e60766f8901436c6ab567c692685d5b35c) +++ lams_central/src/java/org/lamsfoundation/lams/workspace/service/IWorkspaceManagementService.java (.../IWorkspaceManagementService.java) (revision 9209fbea485f8b0f28a7374629d7cd3d3398cf41) @@ -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 =================================================================== diff -u -rde1940e60766f8901436c6ab567c692685d5b35c -r9209fbea485f8b0f28a7374629d7cd3d3398cf41 --- lams_central/src/java/org/lamsfoundation/lams/workspace/service/WorkspaceManagementService.java (.../WorkspaceManagementService.java) (revision de1940e60766f8901436c6ab567c692685d5b35c) +++ lams_central/src/java/org/lamsfoundation/lams/workspace/service/WorkspaceManagementService.java (.../WorkspaceManagementService.java) (revision 9209fbea485f8b0f28a7374629d7cd3d3398cf41) @@ -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 =================================================================== diff -u -rde1940e60766f8901436c6ab567c692685d5b35c -r9209fbea485f8b0f28a7374629d7cd3d3398cf41 --- lams_central/src/java/org/lamsfoundation/lams/workspace/web/WorkspaceAction.java (.../WorkspaceAction.java) (revision de1940e60766f8901436c6ab567c692685d5b35c) +++ lams_central/src/java/org/lamsfoundation/lams/workspace/web/WorkspaceAction.java (.../WorkspaceAction.java) (revision 9209fbea485f8b0f28a7374629d7cd3d3398cf41) @@ -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); Index: lams_central/src/java/org/lamsfoundation/lams/workspace/workspaceApplicationContext.xml =================================================================== diff -u -r05391c36b578d825a02985084cbdd948366ae182 -r9209fbea485f8b0f28a7374629d7cd3d3398cf41 --- lams_central/src/java/org/lamsfoundation/lams/workspace/workspaceApplicationContext.xml (.../workspaceApplicationContext.xml) (revision 05391c36b578d825a02985084cbdd948366ae182) +++ lams_central/src/java/org/lamsfoundation/lams/workspace/workspaceApplicationContext.xml (.../workspaceApplicationContext.xml) (revision 9209fbea485f8b0f28a7374629d7cd3d3398cf41) @@ -6,7 +6,7 @@ - org.lamsfoundation.lams.applicationResources + org.lamsfoundation.lams.central.ApplicationResources