Yes, the peculiar thing with the gettext .po-files is that they contain both derived material and source material.
During development & maintenance, they will grow from two sources:
1. msgid, i.e. the texts derived from source code, such as marked string literals in .py files, will be derived via the .pot files and merged into the .po files for the various locales.
2. msgstr, i.e. the translations of each msgid in whatever languages we use. This is source material and must absolutely not be discarded.
If I understand Builder.autoclean correctly, it will remove any file which was output from any build step, assuming this file only contains derived material. While the assumption (output == only derived data) is true in most cases, it's obviously false in this case, and I can imagine other scenarios. (Please correct me if I'm confused here, I only found this nice tool a few days ago). I include a couple of "grep sv_SE" from strace of the pybabel update below to show what happens in this particular case.
Anyway, I can imagine two approaches to fix the problem here:
1. Make fabricate.py figure out more in detail whether a file is completely derived, or if it contains source code as well.
2. Make it possible to somehow tell fabricate.py that some files (e.g. a pattern such as '*.po') should not be cleaned out.
Perhaps the second approach is more practical. I suspect the first approach will both complicate the code, and whatever we do, we might find out that there is some other case we didn't cover.
No change in the pot file since last update this time.
stat("i18n/sv_SE/LC_MESSAGES/messages.po", {st_mode=S_IFREG|0664, st_size=26004, ...}) = 0
write(2, "updating catalog 'i18n/sv_SE/LC_"..., 83updating catalog 'i18n/sv_SE/LC_MESSAGES/messages.po' based on 'i18n/messages.pot'
open("i18n/sv_SE/LC_MESSAGES/messages.po", O_RDONLY) = 3
stat("/usr/local/lib/python2.7/dist-packages/babel/localedata/sv_SE.dat", {st_mode=S_IFREG|0644, st_size=389, ...}) = 0
open("i18n/sv_SE/LC_MESSAGES/tmpmessages.po", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
rename("i18n/sv_SE/LC_MESSAGES/tmpmessages.po", "i18n/sv_SE/LC_MESSAGES/messages.po") = 0
stat("i18n/sv_SE/LC_MESSAGES/messages.po", {st_mode=S_IFREG|0664, st_size=26004, ...}) = 0
write(2, "updating catalog 'i18n/sv_SE/LC_"..., 83updating catalog 'i18n/sv_SE/LC_MESSAGES/messages.po' based on 'i18n/messages.pot'
open("i18n/sv_SE/LC_MESSAGES/messages.po", O_RDONLY) = 3
stat("/usr/local/lib/python2.7/dist-packages/babel/localedata/sv_SE.dat", {st_mode=S_IFREG|0644, st_size=389, ...}) = 0
open("i18n/sv_SE/LC_MESSAGES/tmpmessages.po", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
rename("i18n/sv_SE/LC_MESSAGES/tmpmessages.po", "i18n/sv_SE/LC_MESSAGES/messages.po") = 0
This time there was a change in the "messages.pot" file.
stat("i18n/sv_SE/LC_MESSAGES/messages.po", {st_mode=S_IFREG|0664, st_size=26004, ...}) = 0
write(2, "updating catalog 'i18n/sv_SE/LC_"..., 83updating catalog 'i18n/sv_SE/LC_MESSAGES/messages.po' based on 'i18n/messages.pot'
open("i18n/sv_SE/LC_MESSAGES/messages.po", O_RDONLY) = 3
stat("/usr/local/lib/python2.7/dist-packages/babel/localedata/sv_SE.dat", {st_mode=S_IFREG|0644, st_size=389, ...}) = 0
open("i18n/sv_SE/LC_MESSAGES/tmpmessages.po", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
rename("i18n/sv_SE/LC_MESSAGES/tmpmessages.po", "i18n/sv_SE/LC_MESSAGES/messages.po") = 0
stat("i18n/sv_SE/LC_MESSAGES/messages.po", {st_mode=S_IFREG|0664, st_size=26004, ...}) = 0
write(2, "updating catalog 'i18n/sv_SE/LC_"..., 83updating catalog 'i18n/sv_SE/LC_MESSAGES/messages.po' based on 'i18n/messages.pot'
open("i18n/sv_SE/LC_MESSAGES/messages.po", O_RDONLY) = 3
stat("/usr/local/lib/python2.7/dist-packages/babel/localedata/sv_SE.dat", {st_mode=S_IFREG|0644, st_size=389, ...}) = 0
open("i18n/sv_SE/LC_MESSAGES/tmpmessages.po", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
rename("i18n/sv_SE/LC_MESSAGES/tmpmessages.po", "i18n/sv_SE/LC_MESSAGES/messages.po") = 0
stat("i18n/sv_SE/LC_MESSAGES/messages.po", {st_mode=S_IFREG|0664, st_size=26065, ...}) = 0
write(2, "updating catalog 'i18n/sv_SE/LC_"..., 83updating catalog 'i18n/sv_SE/LC_MESSAGES/messages.po' based on 'i18n/messages.pot'
open("i18n/sv_SE/LC_MESSAGES/messages.po", O_RDONLY) = 3
stat("/usr/local/lib/python2.7/dist-packages/babel/localedata/sv_SE.dat", {st_mode=S_IFREG|0644, st_size=389, ...}) = 0
open("i18n/sv_SE/LC_MESSAGES/tmpmessages.po", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
rename("i18n/sv_SE/LC_MESSAGES/tmpmessages.po", "i18n/sv_SE/LC_MESSAGES/messages.po") = 0