OK, I've dug some more. With a Spanish language pack installed, if permissions.sqlite contains an imap record, then `GetStringFromName("inboxFolderName", kLocalizedInboxName);` returns "Inbox", with no permissions.sqlite (or no imap record) it returns "Bandeja de entrada". So this seems to a Mozilla platform bug, somehow there must be a connection between L10N and the content of the permissions database. The calls were looking for won't be found in C-C code but in M-C code. So this code https://searchfox.org/comm-central/rev/29706036071c4629c2b44512d1acecb64008cc46/mailnews/base/util/nsMsgDBFolder.cpp#2737 always runs, but the result differs on content of permissions.sqlite.
Bug 1575512 Comment 50 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
OK, I've dug some more. With a Spanish language pack installed, if permissions.sqlite contains an imap record, then `GetStringFromName("inboxFolderName", kLocalizedInboxName);` returns "Inbox", with no permissions.sqlite (or no imap record) it returns "Bandeja de entrada". So this seems to a Mozilla platform bug, somehow there must be a connection between L10N and the content of the permissions database. The calls were looking for won't be found in C-C code but in M-C code. So this code https://searchfox.org/comm-central/rev/29706036071c4629c2b44512d1acecb64008cc46/mailnews/base/util/nsMsgDBFolder.cpp#2737 always runs, but the result differs depending on content of permissions.sqlite.