Steps to reproduce:
* Create a .po file that solely consist of the text "test"
* Upload this file at https://meta.wikimedia.org/wiki/Special:ImportTranslations
This results in an internal error page: "Fatal exception of type MWException"
Instead, the user should receive a proper error message, if possible with more detail about the invalid parts. The corresponding internal error on testwiki at least tells the user that file lacks a valid header:
* Upload the file at https://test.wikipedia.org/wiki/Special:ImportTranslations
This results in the following error message:
Internal error - Test {{SITENAME}}
[609c3d98] /wiki/Special:ImportTranslations Exception from line 107 of /usr/local/apache/common-local/php-1.23wmf5/extensions/Translate/ffs/GettextFFS.php: Gettext file header was not found:
test
Backtrace:
#0 /usr/local/apache/common-local/php-1.23wmf5/extensions/Translate/ffs/GettextFFS.php(67): GettextFFS::parseGettextData(string, boolean, StringMatcher, string)
#1 /usr/local/apache/common-local/php-1.23wmf5/extensions/Translate/ffs/GettextFFS.php(47): GettextFFS->parseGettext(string)
#2 /usr/local/apache/common-local/php-1.23wmf5/extensions/Translate/specials/SpecialImportTranslations.php(196): GettextFFS->readFromVariable(string)
#3 /usr/local/apache/common-local/php-1.23wmf5/extensions/Translate/specials/SpecialImportTranslations.php(70): SpecialImportTranslations->parseFile(string)
#4 /usr/local/apache/common-local/php-1.23wmf5/includes/SpecialPage.php(670): SpecialImportTranslations->execute(NULL)
#5 /usr/local/apache/common-local/php-1.23wmf5/includes/SpecialPageFactory.php(488): SpecialPage->run(NULL)
#6 /usr/local/apache/common-local/php-1.23wmf5/includes/Wiki.php(298): SpecialPageFactory::executePath(Title, RequestContext)
#7 /usr/local/apache/common-local/php-1.23wmf5/includes/Wiki.php(596): MediaWiki->performRequest()
#8 /usr/local/apache/common-local/php-1.23wmf5/includes/Wiki.php(460): MediaWiki->main()
#9 /usr/local/apache/common-local/php-1.23wmf5/index.php(49): MediaWiki->run()
#10 /usr/local/apache/common-local/w/index.php(3): require(string)
#11 {main}
--------------------------
**Version**: unspecified
**Severity**: minor
**See Also**:
https://bugzilla.wikimedia.org/show_bug.cgi?id=40341