add russian translation, translate share strings, add share to

vkontakte and update styles to account for longer texts
This commit is contained in:
Georg Fischer
2016-01-13 14:32:49 +01:00
parent eda5d0b20f
commit 3ec6a6b64e
16 changed files with 346 additions and 96 deletions
+11 -5
View File
@@ -77,9 +77,8 @@ define(
if ( el && attribute && key ) {
textElData.push( { el: el, attribute: attribute, key: key, wasUpdated: false, args: getArgs( arguments ) } );
} else {
if ( typeof el === 'string' ) {
return getTextForKey( el, getArgs( arguments, 1 ) );
}
var args = getArgs( arguments, 1 );
return getTextForKey( el, getArgs( arguments, 1 ) );
}
updateAllTexts();
@@ -117,7 +116,7 @@ define(
currentLanguage = newLanguageName;
languageWasLoaded = true;
texts = newLanguage;
saveLanguage( newLanguage );
resetAllTexts();
updateAllTexts();
@@ -191,7 +190,14 @@ define(
args.forEach( function ( arg, index ) {
regex = new RegExp( '{\\$' + ( index + 1 ) + '}' );
result = result.replace( regex, arg );
if ( typeof arg === 'string' ) {
result = result.replace( regex, arg );
} else {
if ( typeof arg === 'function' ) {
result = result.replace( regex, arg() );
}
}
} );
}