gettext-template: Update POTFILES if there are removed or added files that includes translatable strings
Prerequisites
- [x] I have searched open and closed issues for duplicates.
Feature
Is your feature request related to a problem? Please describe.
Editing POTFILES is not automated at the moment, so if we forget to update POTFILES when adding/removing files that include translatable strings, Gettext Actions will fail.
Describe the solution you'd like
It would be useful if the Gettext Actions can detect added/removed files from a project, check if they include translatable strings (_(), ngettext (), dgettext (), etc.), and if so remove/add the path to them from POTFILES automatically.
Existing work N/A
Describe alternatives you've considered N/A
Additional context N/A
I'm still not able to work on this but left a regex to detect translatable strings like _("Hello world!") or ngettext ("%i item", "%i items", item_count).printf (item_count) in vala code:
((|Q|N|NC|C)\_|(d|dc|n|dn)gettext|dpgettext(2)?)\s?\("