(language, command)
| 1692 | |
| 1693 | // Escaping ", ' and ` chars |
| 1694 | function localize(language, command) { |
| 1695 | |
| 1696 | !language && (language = 'default'); |
| 1697 | |
| 1698 | if (F.resources[language] && F.resources[language].$empty) |
| 1699 | return command.command; |
| 1700 | |
| 1701 | var output = F.translate(language, command.command); |
| 1702 | |
| 1703 | if (command.escape) { |
| 1704 | var index = 0; |
| 1705 | while (true) { |
| 1706 | index = output.indexOf(command.escape, index); |
| 1707 | if (index === -1) |
| 1708 | break; |
| 1709 | var c = output[index - 1]; |
| 1710 | if (c !== '\\') { |
| 1711 | output = output.substring(0, index) + '\\' + output.substring(index); |
| 1712 | index++; |
| 1713 | } else |
| 1714 | index += 2; |
| 1715 | } |
| 1716 | } |
| 1717 | |
| 1718 | return output; |
| 1719 | } |
| 1720 | |
| 1721 | var VIEW_IF = { 'if ': 1, 'if(': 1 }; |
| 1722 |
no outgoing calls
no test coverage detected