I am not sure if this is desired behavior or not. I have pot and po files generated by Cake’s i18n shell.
I have following translation in non default language pl
msgctxt "Navigation menu"
msgid "Search"
msgstr
And now, behavior is different depending on language beeing default or not.
__x("Navigation menu", "Search")
gives me an empty string in language pl. If i switch to any other language, so the default lang would be picked up (default.pot in my case) default value “Search” is returned as I would expect it to be.
Defining translation for example like this
msgctxt "Navigation menu"
msgid "Search"
msgstr "test test"
will result in returning “test test” for pl
and “Search” for default language.