Created
December 30, 2013 17:14
-
-
Save zoobestik/8184946 to your computer and use it in GitHub Desktop.
bug extend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var def = { | |
l10n: | |
{ langdetectDataPath: '/usr/share/yandex/lang_detect_data.txt', | |
'default': 'ru', | |
langParamName: 'lang', | |
localeParamName: 'locale', | |
currencyParamName: 'currency', | |
rewriteRegionIfNotInLocaleCountry: false, | |
decl: | |
{ ru: | |
{ defaultRegionId: 213, | |
defaultCountryId: 225, | |
langs: [ 'ru', 'uk', 'en' ], | |
currencies: [ 'RUR', 'USD', 'EUR', 'UAH', 'BYR', 'KZT' ] } } } | |
}, | |
client = { | |
l10n: | |
{ rewriteRegionIfNotInLocaleCountry: true, | |
'default': 'ru', | |
decl: | |
{ ru: | |
{ id: 'ru', | |
defaultRegionId: 213, | |
defaultCountryId: 227, | |
langs: [ 'ru' ], | |
currencies: [ 'RUR', 'USD', 'EUR' ] } } } }; | |
var util = require('nodules-libs').util; | |
console.log('default', def.l10n.decl.ru); | |
console.log('clinet', client.l10n.decl.ru); | |
console.log('result', util.extend(true, {}, def, client).l10n.decl.ru); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment