Branch: refs/heads/master
  Home:   https://github.com/zanata/zanata-python-client
  Commit: deaabfc8d7bd1bace08bfcff11790882731be043
      
https://github.com/zanata/zanata-python-client/commit/deaabfc8d7bd1bace08bfcff11790882731be043
  Author: Daniel P. Berrangé <berra...@redhat.com>
  Date:   2018-04-06 (Fri, 06 Apr 2018)

  Changed paths:
    M zanataclient/publicanutil.py

  Log Message:
  -----------
  Fix incorrect "fuzzy" flags in po files when multiple langs are pulled

When saving po files, the poentry "flags" list is initialized with a
reference to the pot textflow "flags" list. The poentry "flags" list
is then extended to add the "fuzzy" flag for any translation which is
marked as needs review. This modifies the original pot textflow "flags"
list too.

As a result, when the next language is processed everything that was
marked fuzzy in all previous languages saved is also marked fuzzy in
this next language. IOW, when you download multiple lanuages, the po
files generated get an every increasing number of entries marked as
fuzzy despite being correctly translated. This totally trashes the
generated .po files, as fuzzy entries are discarded by gettext when
creating .gmo files.

The trivial fix is to just deep clone the flags list instead of sharing
the reference.

Any project which currently uses the zanata python client needs to
consider their current .po files as largely garbage, because they
will be full of inappropriate "fuzzy" annotations.

Signed-off-by: Daniel P. Berrangé <berra...@redhat.com>


  Commit: afca677edad0b004dff4821e206528b15b50d47e
      
https://github.com/zanata/zanata-python-client/commit/afca677edad0b004dff4821e206528b15b50d47e
  Author: Sundeep Anand <suan...@redhat.com>
  Date:   2018-04-16 (Mon, 16 Apr 2018)

  Changed paths:
    M zanataclient/publicanutil.py

  Log Message:
  -----------
  Merge pull request #51 from berrange/bad-fuzzy

Fix incorrect "fuzzy" flags in po files when multiple langs are pulled


Compare: 
https://github.com/zanata/zanata-python-client/compare/7cd8de85808c...afca677edad0
_______________________________________________
zanata-commits mailing list
zanata-commits@redhat.com
https://www.redhat.com/mailman/listinfo/zanata-commits

Reply via email to