public UploadDetails uploadTerms ( String projectId , File translationFile , String [ ] allTags , String [ ] newTags , String [ ] obsoleteTags ) { Map < String , String [ ] > tags = new HashMap < String , String [ ] > ( ) ; if ( allTags != null ) { tags . put ( "all" , allTags ) ; } if ( newTags != null ) { tags . put ( "new" , newTags ) ; } if ( obsoleteTags != null ) { tags . put ( "obsolete" , obsoleteTags ) ; } String tagsStr = new Gson ( ) . toJson ( tags ) ; TypedFile typedFile = new TypedFile ( "application/xml" , translationFile ) ; UploadResponse ur = service . upload ( "upload" , apiKey , projectId , "terms" , typedFile , null , "0" , tagsStr ) ; ApiUtils . checkResponse ( ur . response ) ; return ur . details ; }
Uploads a translation file . For the moment it only takes terms into account .