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

GitHub noreply at github.com
Thu Jun 4 03:15:22 UTC 2015


  Branch: refs/heads/new-tm-endpoints-rhbz1209669
  Home:   https://github.com/zanata/zanata-server
  Commit: a53c3cc85f312fcbdfb7c1bb411ae4b3330ad1b6
      https://github.com/zanata/zanata-server/commit/a53c3cc85f312fcbdfb7c1bb411ae4b3330ad1b6
  Author: David Mason <drdmason at gmail.com>
  Date:   2015-06-04 (Thu, 04 Jun 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: bee070e731f99b45248f5fbc15b4fc6af9c3a717
      https://github.com/zanata/zanata-server/commit/bee070e731f99b45248f5fbc15b4fc6af9c3a717
  Author: David Mason <drdmason at gmail.com>
  Date:   2015-06-04 (Thu, 04 Jun 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: 3b8addd059cdf0587283c20064913d0622471486
      https://github.com/zanata/zanata-server/commit/3b8addd059cdf0587283c20064913d0622471486
  Author: David Mason <drdmason at gmail.com>
  Date:   2015-06-04 (Thu, 04 Jun 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: 727c0a08108950976a38600f9e5a4e443b070164
      https://github.com/zanata/zanata-server/commit/727c0a08108950976a38600f9e5a4e443b070164
  Author: David Mason <drdmason at gmail.com>
  Date:   2015-06-04 (Thu, 04 Jun 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.


  Commit: 0b8e828fa773afd9ba25fba5986984cb77f1e4cb
      https://github.com/zanata/zanata-server/commit/0b8e828fa773afd9ba25fba5986984cb77f1e4cb
  Author: David Mason <drdmason at gmail.com>
  Date:   2015-06-04 (Thu, 04 Jun 2015)

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

  Log Message:
  -----------
  Keep format strings in the same scope as String.format()

Format strings were being passed to a function, which seems confusing
and so more error-prone. Changed to passing an already-formatted string
so that the format strings can be inlined in the call to String.format()
so that it is obvious that they are format strings and what the
placeholders represent.


  Commit: 68a25b8b81085009fb430456217edd37d39e4d7e
      https://github.com/zanata/zanata-server/commit/68a25b8b81085009fb430456217edd37d39e4d7e
  Author: David Mason <drdmason at gmail.com>
  Date:   2015-06-04 (Thu, 04 Jun 2015)

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

  Log Message:
  -----------
  Make search type lookup case-insensitive.

The try block could be removed because iterating enum values will not
give nulls, and equalsIgnoreCase will behave sensibly with an entered
null value.


  Commit: 03068168eec7d8bb94265d2633e4e3cd3416fb6c
      https://github.com/zanata/zanata-server/commit/03068168eec7d8bb94265d2633e4e3cd3416fb6c
  Author: David Mason <drdmason at gmail.com>
  Date:   2015-06-04 (Thu, 04 Jun 2015)

  Changed paths:
    M zanata-war/src/main/java/org/zanata/rest/editor/service/SuggestionsService.java
    M zanata-war/src/main/java/org/zanata/service/impl/LocaleServiceImpl.java

  Log Message:
  -----------
  Prevent undeclared IllegalArgumentException when looking up locales.


  Commit: 7d65aeacab4c8638d1d4368f87a1b475355790bd
      https://github.com/zanata/zanata-server/commit/7d65aeacab4c8638d1d4368f87a1b475355790bd
  Author: David Mason <drdmason at gmail.com>
  Date:   2015-06-04 (Thu, 04 Jun 2015)

  Changed paths:
    M zanata-war/src/main/java/org/zanata/service/LocaleService.java
    M zanata-war/src/main/java/org/zanata/service/impl/LocaleServiceImpl.java

  Log Message:
  -----------
  Add @Nullable annotation to locale lookup.


  Commit: 36bf6b771000b16fa3da26b89541bec8fb20c4e7
      https://github.com/zanata/zanata-server/commit/36bf6b771000b16fa3da26b89541bec8fb20c4e7
  Author: David Mason <drdmason at gmail.com>
  Date:   2015-06-04 (Thu, 04 Jun 2015)

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

  Log Message:
  -----------
  Use Option instead of Either in SuggestionService


  Commit: d98a2fa0a2f03f1c450729258dbff1178c64d568
      https://github.com/zanata/zanata-server/commit/d98a2fa0a2f03f1c450729258dbff1178c64d568
  Author: David Mason <drdmason at gmail.com>
  Date:   2015-06-04 (Thu, 04 Jun 2015)

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

  Log Message:
  -----------
  Remove unused media type string for suggestions.

Changed to use the JSON media type for suggestions.


  Commit: 0a4e2c558576d0db7438d6b7ac4bd2edfb25070a
      https://github.com/zanata/zanata-server/commit/0a4e2c558576d0db7438d6b7ac4bd2edfb25070a
  Author: David Mason <drdmason at gmail.com>
  Date:   2015-06-04 (Thu, 04 Jun 2015)

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

  Log Message:
  -----------
  Change source and translation locales for suggestions endpoint to query params.

Since locales can contain non-url-friendly characters, they are better included
as part of the query string.


  Commit: f64358706047919ad2acdec1e3e37ad25ecb0b79
      https://github.com/zanata/zanata-server/commit/f64358706047919ad2acdec1e3e37ad25ecb0b79
  Author: David Mason <drdmason at gmail.com>
  Date:   2015-06-04 (Thu, 04 Jun 2015)

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

  Log Message:
  -----------
  Refactor LocaleServiceImpl.getByLocaleId(String) for brevity.


  Commit: 68b2b27bfd75d85fcd6cbd419b7b6af965b89037
      https://github.com/zanata/zanata-server/commit/68b2b27bfd75d85fcd6cbd419b7b6af965b89037
  Author: David Mason <drdmason at gmail.com>
  Date:   2015-06-04 (Thu, 04 Jun 2015)

  Changed paths:
    M docs/release-notes.md

  Log Message:
  -----------
  Add release note for suggestions endpoint.


  Commit: c20e1b77327ab2b0b5cbd85810cc954758588428
      https://github.com/zanata/zanata-server/commit/c20e1b77327ab2b0b5cbd85810cc954758588428
  Author: David Mason <drdmason at gmail.com>
  Date:   2015-06-04 (Thu, 04 Jun 2015)

  Changed paths:
    M zanata-war/src/main/webapp/app/config.json
    M zanata-war/src/main/webapp/app/css/app.css
    M zanata-war/src/main/webapp/app/index.html
    M zanata-war/src/main/webapp/app/js/app.js
    M zanata-war/src/main/webapp/app/js/libs.js
    M zanata-war/src/main/webapp/app/js/templates.js
    M zanata-war/src/main/webapp/app/maps/app.js.map
    M zanata-war/src/main/webapp/app/maps/libs.js.map

  Log Message:
  -----------
  Update zanata-spa to commit 402c57d0ebff0ea957f31e4a4e508974b89d9099


  Commit: 990e0ad9e06c4064dfef7bb4d71c44ec04eee904
      https://github.com/zanata/zanata-server/commit/990e0ad9e06c4064dfef7bb4d71c44ec04eee904
  Author: David Mason <drdmason at gmail.com>
  Date:   2015-06-04 (Thu, 04 Jun 2015)

  Changed paths:
    M zanata-war/src/main/webapp/app/config.json
    M zanata-war/src/main/webapp/app/css/app.css
    M zanata-war/src/main/webapp/app/css/libs.css
    M zanata-war/src/main/webapp/app/images/logo-loader/logo.svg
    M zanata-war/src/main/webapp/app/index.html
    M zanata-war/src/main/webapp/app/js/app.js
    M zanata-war/src/main/webapp/app/js/libs.js
    M zanata-war/src/main/webapp/app/js/templates.js
    M zanata-war/src/main/webapp/app/maps/app.js.map

  Log Message:
  -----------
  Update zanata-spa to commit 194a5e237ff5edd47953b89e2e31255de67d0a1d


Compare: https://github.com/zanata/zanata-server/compare/bad1c3ff4feb...990e0ad9e06c


More information about the zanata-commits mailing list