rP18964 removed most of common/l10n.js which was introduced by rP16127.
This file should be removed since it contains about 30 lines of code related to the tooltips code (so prepare this in this patch).
One thing that was unfortunate by rP18964 is that it removed the warning that was shown if someone tried to translate a resource code that doesn't exist.
Another thing I don't feel comfortable with is that the "firstWord" and "withinSentence" translation context is duplicated. A typo in there would cause a new translation, which should really be avoided.
The previous code from l10n.js warned about that too. The proposed patch will remove the duplication and even better, prevent the creation of such a translation context and cause a JS reference error instead in such a case.
That the untranslated strings are exposed in Resources.GetNames() is deplorable, as coders might assume that this is already translated or forget to translate this.
So all references to it are removed as far as possible (should we move those two tooltip.js functions to globalscripts/Resources.js so as to nuke those two occurances too?).
The GUIInterface reference is needed for the AI, which only needs it in the chatHelper.js which passes the translatable string to a place where it is translated (instead of just passing the resource code. Refs the markForTranslation being uncomfortable #3665), so whatever.
Speaking of #3665, Player.SubtractResourcesOrNotify should also not use these four hardcoded strings but just reuse getLocalizedResourceAmounts if it worked as one might wish.
The ResourceSupply.js warning seems redundant with the template validation.