mozilla / pontoon

Mozilla's Localization Platform
https://pontoon.mozilla.org
BSD 3-Clause "New" or "Revised" License
1.46k stars 529 forks source link

Consider using BaseNode.equals for comparing strings #2120

Open bugzilla-to-github opened 6 years ago

bugzilla-to-github commented 6 years ago

This issue was created automatically by a script.

Bug 1444848

Bug Reporter: @mathjazz CC: @zbraniecki

BaseNode.equals (https://github.com/projectfluent/python-fluent/blob/0.6.3/fluent/syntax/ast.py#L76) is intended to compare two AST nodes. We should consider using it for comparing translations instead of using simple string comparison to avoid problems with syntax changes that we faced in bug 1441020 for example.

We might also need a JS counterpart when it's available.

bugzilla-to-github commented 6 years ago

Comment Author: @Pike

This might be quite similar to using some of the compare-locales cross-channel merge code, we might be able to use some of the work here to use compare-locales more generally for syncing localizations.

bugzilla-to-github commented 5 years ago

Comment Author: @mathjazz

Note that we're using this method on frontend as of bug #1575875.