You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it would be great if the file-source item in the translation file could be skipped by the extract command. Maybe make it configurable via the translation.yaml.
Background: When changing translations, I like to review all changes in the xliff files before committing them to git. The problem is that if I've been working on same pages and files, the changeset is always huge since a lot of line numbers change. That makes it really hard to see what translations were added, removed or changed.
I don't have any use for the file-source information.
The text was updated successfully, but these errors were encountered:
Hi @arneee
I think this could be linked to #404 maybe?
Some huge changes are planned in php-translation foundation in order to fix a bunch of bugs at the same time, including #404.
I let your issue open for now and we'll see later if it's still a needed change.
We've been struggling with this for a few years, too. It's a huge pain for code reviews, merge requests, merge conflicts, etc...
We do not have any use for the information as well, because we follow file and key naming conventions that give enough context.
Quick Tip: we added a bash command as a pre-commit hook:
sed -i '/category="file-source"/d'$(find translations -name '*.xlf')
This will remove any line that contains category="file-source". If you want to go even further and strip all notes:
sed -i '/<\/\?notes\?/d'$(find translations -name '*.xlf')
Remember to stage the changes again so that they will be part of the commit:
Hi,
it would be great if the
file-source
item in the translation file could be skipped by theextract
command. Maybe make it configurable via the translation.yaml.Background: When changing translations, I like to review all changes in the xliff files before committing them to git. The problem is that if I've been working on same pages and files, the changeset is always huge since a lot of line numbers change. That makes it really hard to see what translations were added, removed or changed.
I don't have any use for the
file-source
information.The text was updated successfully, but these errors were encountered: