mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Fix i18n of timer options
It is important to return something falsey in the case where there is no translation. // FREEBIE
This commit is contained in:
@@ -5,7 +5,10 @@
|
||||
'use strict';
|
||||
var json = window.env.locale_json;
|
||||
window.i18n = function (message, substitutions) {
|
||||
var s = json[message] ? json[message].message : message;
|
||||
if (!json[message]) {
|
||||
return;
|
||||
}
|
||||
var s = json[message].message;
|
||||
if (substitutions instanceof Array) {
|
||||
substitutions.forEach(function(sub) {
|
||||
s = s.replace(/\$.+?\$/, sub);
|
||||
|
||||
Reference in New Issue
Block a user