[zanata/zanata-server] 6cf758: Workaround TM result coalescing bug.

GitHub noreply at github.com
Fri May 15 13:04:25 UTC 2015


  Branch: refs/heads/new-tm-endpoints-rhbz1209669
  Home:   https://github.com/zanata/zanata-server
  Commit: 6cf75833246c02dc6415c9b50a5b61517ef7ba6f
      https://github.com/zanata/zanata-server/commit/6cf75833246c02dc6415c9b50a5b61517ef7ba6f
  Author: David Mason <drdmason at gmail.com>
  Date:   2015-05-15 (Fri, 15 May 2015)

  Changed paths:
    M zanata-war/src/main/java/org/zanata/service/impl/TranslationMemoryServiceImpl.java
    M zanata-war/src/main/java/org/zanata/webtrans/shared/model/TransMemoryResultItem.java

  Log Message:
  -----------
  Workaround TM result coalescing bug.

Refactors the match processing code to make it clearer what type of
match is being added to a result item, and makes a few small changes
to minimize the incorrect behaviour:

 - No longer adds imported TM item id to the list that is used to look
   up text flows.
  A more complete fix is to wrap the Long id in a type so that
       all the ids are present and can be used sensibly. This just
       makes the list appropriate for the code that uses it right
       now, to delay spending the development time for the full fix.

 - Upgrades match type when a match has a higher match type, where
   ApprovedInternal > TranslatedInternal > Imported.
  Imported is treated as lowest just because the editor suppresses
       details display for Imported. Treating the others as higher will
       allow users to see text flow details for the other types.
  The full fix for this would be to inculde a summary of all the
       match types in the DTO, so the editor can display whatever
       makes sense.


  Commit: 4050e04f18eea5d487d887e9f4943cfc5fbc5744
      https://github.com/zanata/zanata-server/commit/4050e04f18eea5d487d887e9f4943cfc5fbc5744
  Author: David Mason <drdmason at gmail.com>
  Date:   2015-05-15 (Fri, 15 May 2015)

  Changed paths:
    A zanata-war/src/main/java/org/zanata/rest/editor/dto/suggestion/JsonDateSerializer.java
    A zanata-war/src/main/java/org/zanata/rest/editor/dto/suggestion/Suggestion.java
    A zanata-war/src/main/java/org/zanata/rest/editor/dto/suggestion/SuggestionDetail.java
    A zanata-war/src/main/java/org/zanata/rest/editor/dto/suggestion/TextFlowSuggestionDetail.java
    A zanata-war/src/main/java/org/zanata/rest/editor/dto/suggestion/TransMemoryUnitSuggestionDetail.java

  Log Message:
  -----------
  Add DTOs for suggestions and suggestion detail.

These DTO classes are only configured to serialize to JSON, and I have
not considered deserialization since this is query data and not expected
to be uploaded to the server.


  Commit: 837703a367ba2137719070162871c69919280da1
      https://github.com/zanata/zanata-server/commit/837703a367ba2137719070162871c69919280da1
  Author: David Mason <drdmason at gmail.com>
  Date:   2015-05-15 (Fri, 15 May 2015)

  Changed paths:
    M zanata-war/src/main/java/org/zanata/service/TranslationMemoryService.java
    M zanata-war/src/main/java/org/zanata/service/impl/TranslationMemoryServiceImpl.java

  Log Message:
  -----------
  Add method to get suggestions from TM service.

I have avoided changing the existing code paths for TM search for now
since it is a performance-critical component for translation copy. We
should combine the code paths in a separate operation as long as it
does not impact on performance.


  Commit: e572cf6bc6e4bd99810ebdf7fd767e8c041cbeb2
      https://github.com/zanata/zanata-server/commit/e572cf6bc6e4bd99810ebdf7fd767e8c041cbeb2
  Author: David Mason <drdmason at gmail.com>
  Date:   2015-05-15 (Fri, 15 May 2015)

  Changed paths:
    M zanata-war/src/main/java/org/zanata/rest/editor/MediaTypes.java
    A zanata-war/src/main/java/org/zanata/rest/editor/service/SuggestionsService.java
    A zanata-war/src/main/java/org/zanata/rest/editor/service/resource/SuggestionsResource.java

  Log Message:
  -----------
  Add REST endpoint for suggestions for editor.


Compare: https://github.com/zanata/zanata-server/compare/7f17e9b93504...e572cf6bc6e4


More information about the zanata-commits mailing list