remove unnecessary conditional branch
added specs for device.js and l10n.js
added specs for trans.js