Improving the add-ons generator to deal with apps (bug 1080145)

Cancel and replace PR#320
It looks a bit overkill to me for now. Maybe later if we have to test more locales.