Build removes language files

Gents,
I have some trouble with some language files. They are removed during the build, and I dont find the reason why.
I have stripped down the tarball to one language in trouble, handcrafted the .po file with poedit, and generated the .mo using msgfmt.
The build process looks good in the beginning:

  111s] creating /home/abuild/rpmbuild/BUILDROOT/tryton-3.6.1.1-6.1.i386/usr/share/locale/nl_NL
  111s] creating /home/abuild/rpmbuild/BUILDROOT/tryton-3.6.1.1-6.1.i386/usr/share/locale/nl_NL/LC_MESSAGES
  111s] copying share/locale/nl_NL/LC_MESSAGES/tryton.mo -> /home/abuild/rpmbuild/BUILDROOT/tryton-3.6.1.1-6.1.i386/usr/share/locale/nl_NL/LC_MESSAGES
  111s] copying share/locale/nl_NL/LC_MESSAGES/tryton.po -> /home/abuild/rpmbuild/BUILDROOT/tryton-3.6.1.1-6.1.i386/usr/share/locale/nl_NL/LC_MESSAGES

But when find-lang runs, it removes the .mo without further error message:

  111s] + /usr/lib/rpm/find-lang.sh /home/abuild/rpmbuild/BUILDROOT/tryton-3.6.1.1-6.1.i386 tryton
  111s] removing translation /usr/share/locale/nl_NL/LC_MESSAGES/tryton.mo: 278 translated messages.

So, when packing in the end of the build, it fails due to the missing language file.
Now the interesting part: when I manually run
/usr/lib/rpm/find-lang.sh /home/abuild/rpmbuild/BUILD/tryton-3.6.1.1 tryton
everthing works fine…
Any idea what this could be? Other languages are fine in this package…

The comment above the function that does this in find_lang.sh says:

remove languages we do not yet support - but give out statistics

It then goes on and removes all language files which are not in one of the locale directories that the filesystem RPM brings. nl_NL isn’t in there, only

  • /usr/share/locale/nl
  • /usr/share/locale/nl_BE

Thanks Henne!
Now I need to understand what the criteria are that drive the inclusion in the filesystem-package. nl_NL looks like an ‘official’ locale: Locale Helper: nl_NL

Is there a way to build w/o heavily modifying the source package (it is not only nl that causes the problem…)?

For the records: a patch to the setup.py script and moving all languages to its ‘short form’ (nl_NL > nl) in the spec-file fixed it finally.
Thanks guys!