"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "js/modules/i18n.js" between
Signal-Desktop-1.35.2.tar.gz and Signal-Desktop-1.36.1.tar.gz

About: Signal-Desktop is a cross-platform encrypted messaging service (also available for mobile devices).

i18n.js  (Signal-Desktop-1.35.2):i18n.js  (Signal-Desktop-1.36.1)
skipping to change at line 37 skipping to change at line 37
if ( if (
typeof substitutions === 'string' || typeof substitutions === 'string' ||
typeof substitutions === 'number' typeof substitutions === 'number'
) { ) {
throw new Error('You must provide either a map or an array'); throw new Error('You must provide either a map or an array');
} }
const { message } = entry; const { message } = entry;
if (!substitutions) { if (!substitutions) {
return message; return message;
} else if (Array.isArray(substitutions)) { }
if (Array.isArray(substitutions)) {
return substitutions.reduce( return substitutions.reduce(
(result, substitution) => result.replace(/\$.+?\$/, substitution), (result, substitution) => result.replace(/\$.+?\$/, substitution),
message message
); );
} }
const FIND_REPLACEMENTS = /\$([^$]+)\$/g; const FIND_REPLACEMENTS = /\$([^$]+)\$/g;
let match = FIND_REPLACEMENTS.exec(message); let match = FIND_REPLACEMENTS.exec(message);
let builder = ''; let builder = '';
 End of changes. 1 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)