If Gettext-based projects don't use Pontoon hooks (l10n comments in the DOM to define translatable nodes), match entities against DOM nodes with exact same contents
Change order of functions (from general to specific)