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
I think this would be a great add-on for weblate. I am not sure about other formats but it works perfectly well in gettext.
My update script in our gettext websites includes this command:
msgattrib --set-obsolete --only-file=ignore.pot contents.pot -o contents.pot
And so I can add strings to the file ignore.pot in the repository, and those strings are removed every time I update the translations.
My ignore.pot strings are mostly code snippets and maybe some HTML stuff like anchors or code blocks. This file sits on a special src folder in the repo just besides my contents.pot file that weblate uses to update translations.
This command removes them from the contents.pot file which is used to update the translations, and this sentences don't even reach weblate.
Once the website is created, the strings are put back on the translation files, but as they are not translated they appear on the source language.
How I use it: when updating the translation, if i see a string that I don't want to send to weblate, I simply add it to the ignore.pot file and run the update script again.
As the websites change the ignore.pot starts accumulating strings that are not in the website anymore. So I have another script to remove them from the ignore.pot file:
msgattrib --set-obsolete --only-file=contents.pot.1 ignore.pot -o extra.pot msgattrib --set-obsolete --only-file=extra.pot ignore.pot -o ignore.pot
(where contents.pot.1 is a brand new contents.pot that has all strings, including the ignored ones)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I think this would be a great add-on for weblate. I am not sure about other formats but it works perfectly well in gettext.
My update script in our gettext websites includes this command:
msgattrib --set-obsolete --only-file=ignore.pot contents.pot -o contents.potAnd so I can add strings to the file ignore.pot in the repository, and those strings are removed every time I update the translations.
My ignore.pot strings are mostly code snippets and maybe some HTML stuff like anchors or code blocks. This file sits on a special
srcfolder in the repo just besides my contents.pot file that weblate uses to update translations.This command removes them from the
contents.potfile which is used to update the translations, and this sentences don't even reach weblate.Once the website is created, the strings are put back on the translation files, but as they are not translated they appear on the source language.
How I use it: when updating the translation, if i see a string that I don't want to send to weblate, I simply add it to the ignore.pot file and run the update script again.
As the websites change the ignore.pot starts accumulating strings that are not in the website anymore. So I have another script to remove them from the ignore.pot file:
msgattrib --set-obsolete --only-file=contents.pot.1 ignore.pot -o extra.pot msgattrib --set-obsolete --only-file=extra.pot ignore.pot -o ignore.pot(where contents.pot.1 is a brand new contents.pot that has all strings, including the ignored ones)
Beta Was this translation helpful? Give feedback.
All reactions