diff --git a/src/static/css/pad/gritter.css b/src/static/css/pad/gritter.css index e17367efa..62a1e3de9 100644 --- a/src/static/css/pad/gritter.css +++ b/src/static/css/pad/gritter.css @@ -31,6 +31,8 @@ .gritter-item .gritter-content { flex: 1 auto; text-align: center; + width: 95%; + overflow-wrap: break-word; } .gritter-item .gritter-close { @@ -48,4 +50,4 @@ right: 1rem; transform: none; } -} \ No newline at end of file +} diff --git a/src/static/js/html10n.js b/src/static/js/html10n.js index ee7eec0a7..969a6a1a3 100644 --- a/src/static/js/html10n.js +++ b/src/static/js/html10n.js @@ -779,16 +779,16 @@ window.html10n = (function(window, document, undefined) { function substArguments(str, args) { var reArgs = /\{\{\s*([a-zA-Z\.]+)\s*\}\}/ , match - + var translations = html10n.translations; while (match = reArgs.exec(str)) { if (!match || match.length < 2) return str // argument key not found var arg = match[1] , sub = '' - if (arg in args) { + if (args && arg in args) { sub = args[arg] - } else if (arg in translations) { + } else if (translations && arg in translations) { sub = translations[arg] } else { console.warn('Could not find argument {{' + arg + '}}')