I have .po file with translation and I have it in modulename/translation/xy.po
When I installed profile in XY language the file was not loaded. I did a little digging and found that \FileTranslation::getTranslationFilesPattern looks for drupal-8.xy.po pattern so I renamed the file, reinstalled my profile but the language still was not picked up. The interface translation was downloaded just fine though. If I manually import the file it works. So it looks to me like the directory for translations has changed maybe?
I have checked the installer and it looks like Drupal only looks into the site's files/translations directory. So how are modules supposed to ship with translations?
So it looks like the translations ARE being imported just fine(entries are present in the locales_source table), but for some reason not everything is displayed translated.
Ok, so I came to a conclusion that my translation file is not imported at all. The reason for incomplete translation is because it comes from downloaded Drupal localization and not my file. I am looking at installer and there is nothing that would suggest po files discovery mechanism in any way, only the drupal core(or any po file) in the files/translations directory(which is where the drupal translation is downloaded into).