Merge pull request #187 from rehandalal/notifications

[bug 1201865] Fix notifications
This commit is contained in:
R&D 2015-09-24 13:52:48 -04:00
Родитель 33717e78ab e0b2e00ca3
Коммит 043660fb96
2 изменённых файлов: 9 добавлений и 3 удалений

Просмотреть файл

@ -10,12 +10,14 @@
<link rel="stylesheet" href="css/animations.css"> <link rel="stylesheet" href="css/animations.css">
</head> </head>
<body> <body>
<script src="js/load_translations.js"></script>
<script src="js/libs/l10n.js"></script> <script src="js/libs/l10n.js"></script>
<script src="js/settings.js"></script> <script src="js/settings.js"></script>
<script src="js/utils.js"></script> <script src="js/utils.js"></script>
<script src="js/libs/lodash.custom.min.js"></script> <script src="js/libs/lodash.custom.min.js"></script>
<script src="js/libs/async_storage.js"></script> <script src="js/libs/async_storage.js"></script>
<script src="js/user.js"></script> <script src="js/user.js"></script>
<script src="js/l10n.js"></script>
<script src="js/sumo_db.js"></script> <script src="js/sumo_db.js"></script>
<script src="js/notifications.js"></script> <script src="js/notifications.js"></script>
<script src="js/launch_checks.js"></script> <script src="js/launch_checks.js"></script>

Просмотреть файл

@ -34,7 +34,9 @@
if (!('n' in formatKwargs)) { if (!('n' in formatKwargs)) {
throw 'nggettext calls must have a kwarg "n" for arity.'; throw 'nggettext calls must have a kwarg "n" for arity.';
} }
return format(window._getPluralTranslation(singular, plural, formatKwargs.n), formatKwargs); return format(
window._getPluralTranslation(singular, plural, formatKwargs.n),
formatKwargs);
} }
if (window.gettext) { if (window.gettext) {
@ -51,6 +53,8 @@
window.gettext = gettext; window.gettext = gettext;
window.ngettext = ngettext; window.ngettext = ngettext;
if (window.nunjucksEnv) {
window.nunjucksEnv.addGlobal('_', window.gettext); window.nunjucksEnv.addGlobal('_', window.gettext);
window.nunjucksEnv.addGlobal('_plural', window.ngettext); window.nunjucksEnv.addGlobal('_plural', window.ngettext);
}
})(); })();