react-pinterest2
Version:
Collection of embeddable Pinterest buttons and widgets
228 lines (224 loc) • 8.61 kB
JavaScript
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
/**
* This is a wrapper for all things related to internationalization
*/
exports.default = {
lang: 'en',
/**
* If the lang is supported (found has a key in Strings), set new lang.
* @param {string} _lang - the language code to set
*/
setLang: function setLang(lang) {
if (Strings[lang]) {
this.lang = lang;
}
},
/**
* This is a wrapper for translating strings. It provides simple
* interpolation via "test $1 $2". Each $index will be replaced
* with the argument at $index.
*
* @param {string} key - the string to translate
* @param {string} ...args - the list of arguments to use in interpolation
* @returns {string} the translated/interpolated string
*/
translate: function translate(key) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return Strings[this.lang][key].replace(/\$([1-9])/g, function (match, index) {
return args[index - 1] || match;
});
}
};
var Strings = {
'cs': {
'Follow On $1': 'Sledujte na $1',
'from <b>$1</b>': 'od $1',
'Copyright issue': 'Problém s autorskými právy',
'attribTo': 'od'
},
'da': {
'Follow On $1': 'Følg på $1',
'from <b>$1</b>': 'fra $1',
'Copyright issue': 'Problemer med ophavsret',
'attribTo': 'af'
},
'de': {
'Follow On $1': 'Auf $1 folgen',
'from <b>$1</b>': 'von $1',
'Copyright issue': 'Urheberrechtsverletzung',
'attribTo': 'von'
},
'el': {
'Follow On $1': 'Ακολουθήστε μας στο $1',
'from <b>$1</b>': 'από το $1',
'Copyright issue': 'Ζήτημα πνευματικών δικαιωμάτων',
'attribTo': 'αποδίδεται στο'
},
'en': {
'Follow On $1': 'Follow On $1',
'from <b>$1</b>': 'from $1',
'Copyright issue': 'Copyright issue',
'attribTo': 'by'
},
'en-gb': {
'Follow On $1': 'Follow On $1',
'from <b>$1</b>': 'from $1',
'Copyright issue': 'Copyright issue',
'attribTo': 'by'
},
'en-uk': {
'Follow On $1': 'Follow On $1',
'from <b>$1</b>': 'from $1',
'Copyright issue': 'Copyright issue',
'attribTo': 'by'
},
'es': {
'Follow On $1': 'Seguir en $1',
'from <b>$1</b>': 'de $1',
'report': 'Problema de copyright',
'attribTo': 'por'
},
'fi': {
'Follow On $1': 'Seuraa $1',
'from <b>$1</b>': 'palvelusta $1',
'Copyright issue': 'Tekijänoikeusloukkaus',
'attribTo': 'tekijä'
},
'fr': {
'Follow On $1': 'Suivre sur $1',
'from <b>$1</b>': 'à partir de $1',
'Copyright issue': 'Problème de droits d\'auteur',
'attribTo': 'par'
},
'hi': {
'Follow On $1': '$1 पे फॉलो करें',
'from <b>$1</b>': '$1 से',
'Copyright issue': 'कॉपीराइट का मुद्दा',
'attribTo': 'को श्रेय देना'
},
'hu': {
'Follow On $1': 'Kövesd a $1',
'from <b>$1</b>': 'innen: $1',
'Copyright issue': 'Szerzői jogi probléma',
'attribTo': 'Hozzárendelve a következőhöz:'
},
'id': {
'Follow On $1': 'Ikuti di Pinterest $1',
'from <b>$1</b>': 'dari $1',
'Copyright issue': 'Masalah hak cipta',
'attribTo': 'oleh'
},
'it': {
'Follow On $1': 'Segui su $1',
'from <b>$1</b>': 'da $1',
'Copyright issue': 'Problema di copyright',
'attribTo': 'da'
},
'ko': {
'Follow On $1': '$1에서 팔로우',
'from <b>$1</b>': '$1 에서',
'Copyright issue': '저작권 문제',
'attribTo': '이 핀함'
},
'ja': {
'Follow On $1': '$1 でフォロー',
'from <b>$1</b>': 'ピンもと:$1',
'Copyright issue': '著作権について報告する',
'attribTo': ''
},
'ms': {
'Follow On $1': 'Ikut di $1',
'from <b>$1</b>': 'dari $1',
'Copyright issue': 'Isu hak cipta',
'attribTo': 'attribut ke'
},
'nb': {
'Follow On $1': 'Følg på $1',
'from <b>$1</b>': 'fra $1',
'Copyright issue': 'Opphavsrettslig problem',
'attribTo': 'av'
},
'nl': {
'Follow On $1': 'Volgen op $1',
'from <b>$1</b>': 'van $1',
'Copyright issue': 'Probleem met copyright',
'attribTo': 'door'
},
'pl': {
'Follow On $1': 'Obserwuj na $1',
'from <b>$1</b>': 'od $1',
'Copyright issue': 'Problem z prawami autorskimi',
'attribTo': 'przez'
},
'pt': {
'Follow On $1': 'Seguir no $1',
'from <b>$1</b>': 'de $1',
'Copyright issue': 'Assunto relativo a direitos de autor',
'attribTo': 'por'
},
'pt-br': {
'Follow On $1': 'Seguir no $1',
'from <b>$1</b>': 'de $1',
'Copyright issue': 'Problema de direitos autorais',
'attribTo': 'por'
},
'ro': {
'Follow On $1': 'Urmărește pe $1',
'from <b>$1</b>': 'de la $1',
'Copyright issue': 'Problemă legată de drepturile de autor',
'attribTo': 'de la'
},
'ru': {
'Follow On $1': 'Подписаться в $1',
'from <b>$1</b>': 'из $1',
'Copyright issue': 'Вопрос об авторских правах',
'attribTo': 'пользователем'
},
'tl': {
'Follow On $1': 'Sundan sa $1',
'from <b>$1</b>': 'galing sa $1',
'Copyright issue': 'Isyu sa copyright',
'attribTo': ''
},
'th': {
'Follow On $1': 'ติดตามใน $1',
'from <b>$1</b>': 'จาก $1',
'Copyright issue': 'ปัญหาเรื่องลิขสิทธิ์',
'attribTo': 'เขียนโดย'
},
'sk': {
'Follow On $1': 'Sledujte na $1',
'from <b>$1</b>': 'od $1',
'Copyright issue': 'Problém s autorskými právami',
'attribTo': 'od'
},
'sv': {
'Follow On $1': 'Följ på $1',
'from <b>$1</b>': 'från $1',
'Copyright issue': 'Upphovsrättsligt problem',
'attribTo': 'av'
},
'tr': {
'Follow On $1': '$1 takip et',
'from <b>$1</b>': '$1 sitesinden',
'Copyright issue': 'Telif hakkı sorunu',
'attribTo': 'tarafından'
},
'ua': {
'Follow On $1': 'Подписаться в $1',
'from <b>$1</b>': 'від $1',
'Copyright issue': 'Проблема захисту авторських прав',
'attribTo': 'опис'
},
'vi': {
'Follow On $1': 'Theo dõi trên $1',
'from <b>$1</b>': 'từ $1',
'Copyright issue': 'Vấn đề về bản quyền',
'attribTo': 'đưa vào'
}
};