WeblateOrg / weblate

Web based localization tool with tight version control integration.
https://weblate.org/
GNU General Public License v3.0
4.59k stars 1.02k forks source link

Add glossary check for source stings problematic in CSV #12792

Open nijel opened 2 weeks ago

nijel commented 2 weeks ago

Describe the problem

Some strings can't be exposed in CSV to automatic translation backends (see https://github.com/WeblateOrg/weblate/issues/12791). Weblate should warn that these are problematic.

Describe the solution you would like

Add glossary only check to warn about using any of =+@- at the beginning of the string for both source and translation.

Describe alternatives you have considered

https://github.com/WeblateOrg/weblate/issues/12791 will deal with such strings, but these will be missing from the sync (or problematic characters stripped), so user should be notified of that.

Screenshots

No response

Additional context

Currently, no checks are triggered on glossary components:

https://github.com/WeblateOrg/weblate/blob/64aa009bb957309a6938724b2e493ff69354c49c/weblate/trans/models/unit.py#L1353-L1355

github-actions[bot] commented 4 days ago

Thank you for your report; the issue you have reported has just been fixed.

gersona commented 3 days ago

@nijel you reopened the issue after #12806 was merged, is there anything that needs to be corrected ?

nijel commented 3 days ago

That addresses https://github.com/WeblateOrg/weblate/issues/12791. There still remains this issue to let user be aware that something is wrong with the glossary term.