Merge pull request #129 from steveseguin/language-russian-auto

Add files via upload
This commit is contained in:
Steve Seguin 2020-05-11 21:37:44 -04:00 committed by GitHub
commit d584a5cbdd
4 changed files with 163 additions and 16 deletions

53
main.js
View File

@ -105,29 +105,50 @@ if (urlParams.has('codec')){
session.codec = urlParams.get('codec');
}
if (urlParams.has('ln')){
if (urlParams.has('ln')){ // checking if manual lanuage override enabled
try {
fetch("./translations/"+urlParams.get('ln')+'.json').then(function(response){
if (response.status !== 200) {
console.log('Looks like there was a problem. Status Code: ' +
response.status);
return;
}
response.json().then(function(data) {
log(data);
document.querySelectorAll('[data-translate]').forEach(function(ele){
//log(ele.dataset.translate);
//log(translations[ele.dataset.translate]);
ele.innerHTML = data[ele.dataset.translate];
fetch("./translations/"+urlParams.get('ln')+'.json').then(function(response){
if (response.status !== 200) {
console.log('Looks like there was a problem. Status Code: ' +
response.status);
return;
}
response.json().then(function(data) {
log(data);
document.querySelectorAll('[data-translate]').forEach(function(ele){
//log(ele.dataset.translate);
//log(translations[ele.dataset.translate]);
ele.innerHTML = data[ele.dataset.translate];
});
});
}).catch(function(err){
errorlog(err);
});
}).catch(function(err){
errorlog(err);
});
} catch (error){
errorlog(error);
}
} else { // check if automatic language translation is available
if (window.navigator.language.slice(0, 2) !== 'en'){
fetch("./translations/"+window.navigator.language.slice(0, 2)+'.json').then(function(response){
if (response.status !== 200) {
logerror('Language translation file not found.' + response.status);
return;
}
response.json().then(function(data) {
log(data);
document.querySelectorAll('[data-translate]').forEach(function(ele){
//log(ele.dataset.translate);
//log(translations[ele.dataset.translate]);
ele.innerHTML = data[ele.dataset.translate];
});
});
}).catch(function(err){
errorlog(err);
});
}
}
if (urlParams.has('bitrate')){

42
translations/en.json Normal file
View File

@ -0,0 +1,42 @@
{
"GO": "GO",
"add-group-chat": "Add Group Chat to OBS",
"add-to-group": "Add to Group Scene",
"add-your-camera": "Add your Camera to OBS",
"added-notes": "\n\t\t\t\t<u><i>Added Notes:</i></u>\n\t\t\t\t<li>Anyone can enter a room if they know the name, so keep it unique</li>\n\t\t\t\t<li>Having more than four (4) people in a room is not advisable due to performance reasons, but it depends on your hardware.</li>\n\t\t\t\t<li>iOS devices are limited to group sizes of no more than two (2) people. This is a hardware limitation.</li>\n\t\t\t\t<li>The \"Recording\" option is new and is considered experimental.</li>\n\t\t\t\t<li>You must \"Add\" a video feed to the \"Group Scene\" for it to appear there.</li>\n\t\t\t\t<li>There is a new \"enhanced fullscreen\" button added to the Guest's view.</li>\n\t\t\t\t",
"advanced-paramaters": "Advanced Parameters",
"audio-sources": "Audio Sources",
"back": "Back",
"balanced": "Balanced",
"copy-this-url": "Copy this URL into an OBS \"Browser Source\"",
"copy-to-clipboard": "Copy to Clipboard",
"create-reusable-invite": "Create Reusable Invite",
"enable-stereo-and-pro": "Enable Stereo and Pro HD Audio",
"enter-the-rooms-control": "Enter the Room's Control Center",
"force-vp9-video-codec": "Force VP9 Video Codec (less artifacting)",
"generate-invite-link": "GENERATE THE INVITE LINK",
"here-you-can-pre-generate": "Here you can pre-generate a reusable Browser Source link and a related guest invite link.",
"high-security-mode": "High Security Mode",
"info-blob": "\n\t\t\t\t\t\t<h2>What is OBS.Ninja</h2><br>\n\t\t\t\t\t\t<li>100% <b>free</b>; no downloads; no personal data collection; no sign-in</li>\n\t\t\t\t\t\t<li>Bring video from your smartphone, laptop, computer, or from your friends directly into your OBS video stream</li>\n\t\t\t\t\t\t<li>We use cutting edge Peer-to-Peer forwarding technology that offers privacy and ultra-low latency</li>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<li>Youtube video <i class=\"fa fa-youtube-play\" aria-hidden=\"true\"></i> <a href=\"https://www.youtube.com/watch?v=6R_sQKxFAhg\">Demoing it here</a> </li>\n\t\t\t\t\t\t<li>Code is available here: <i class=\"fa fa-github\" aria-hidden=\"true\"></i> <a href=\"https://github.com/steveseguin/obsninja\">https://github.com/steveseguin/obsninja</a> </li>\n\t\t\t\t\t\t<li>You can also check out <a href=\"https://steves.app\">my other video app</a> designed for sharing video with friends and family</li>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<i><font style=\"color:red\">Known issues:</font></i><br>\n\n\t\t\t\t\t\t<li><i class=\"fa fa-apple\" aria-hidden=\"true\"></i> MacOS users need to use OBS v23 or resort to <i>Window Capturing</i> a Chrome Browser with OBS v25</li>\n\t\t\t\t\t\t<li>Some users will have \"pixelation\" problems with videos. Please add the URL parameter <b>&amp;codec=vp9</b> to the OBS Links to correct it.</li>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\n\t\t\t\t\t\tSite last updated: <a href=\"https://www.reddit.com/r/OBSNinja/comments/gf5pd3/new_version_released_today_along_with_new/\">May 7th, 2020.</a> The previous version can be found at <a href=\"https://obs.ninja/v3/\">https://obs.ninja/v3/</a> if you are having new issues.\n\n\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t<i></i><h3><i>Check out the <a href=\"https://www.reddit.com/r/OBSNinja/\">sub-reddit</a> <i class=\"fa fa-reddit-alien\" aria-hidden=\"true\"></i> for help and advanced info. I'm also on <a href=\"https://discord.gg/EksyhGA\">Discord</a> and you can email me at steve@seguin.email</i></h3>\n\t\t\t\t\t",
"joining-room": "You are joining room",
"logo-header": "<font id=\"qos\" style=\"color: white;\">O</font>BS.Ninja ",
"max-resolution": "Max Resolution",
"mute": "Mute",
"no-audio": "No Audio",
"note-share-audio": "\n\t\t\t\t\t<b>note</b>: Do not forget to click \"Share audio\" in Chrome.<br>(Firefox does not support audio sharing.)",
"open-in-new-tab": "Open in new Tab",
"record": "Record",
"remote-control-for-obs": "Remote Control for OBS",
"remote-screenshare-obs": "Remote Screenshare into OBS",
"room-name": "Room Name",
"rooms-allow-for": "Rooms allow for simplified group-chat and the advanced management of multiple streams at once.",
"select-audio-source": "Select Audio Sources",
"select-audio-video": "Select the audio/video source below",
"select-screen-to-share": "SELECT SCREEN TO SHARE",
"show-tips": "Show me some tips..",
"smooth-cool": "Smooth and Cool",
"unlock-video-bitrate": "Unlock Video Bitrate (20mbps)",
"video-source": "Video source",
"volume": "Volume",
"you-are-in-the-control-center": "You are in the room's control center"
}

42
translations/fr.json Normal file
View File

@ -0,0 +1,42 @@
{
"logo-header": "<font id=\"qos\" style=\"color: white;\">O</font>BS.Ninja ",
"GO": "Aller",
"add-group-chat": "Conversation de groupe",
"add-to-group": "Ajouter à la scène de groupe",
"add-your-camera": "Ajoutez votre caméra à OBS",
"added-notes": "\n\t\t\t\t<u><i>Added Notes:</i></u>\n\t\t\t\t<li>N'importe qui peut entrer dans une pièce s'il connaît le nom, alors gardez-le unique</li>\n\t\t\t\t<li>Il n'est pas conseillé d'avoir plus de quatre (4) personnes dans une pièce pour des raisons de performances, mais cela dépend de votre matériel.</li>\n\t\t\t\t<li>Les appareils iOS sont limités à des groupes de deux (2) personnes maximum. Il s'agit d'une limitation matérielle.</li>\n\t\t\t\t\n\t\t\t\t",
"advanced-paramaters": "Paramètres avancés",
"audio-sources": "Sources audio",
"back": "Retour",
"balanced": "Équilibré",
"copy-this-url": "Copiez cette URL dans un OBS \"Browser Source\"",
"copy-to-clipboard": "Copier dans le presse-papier",
"create-reusable-invite": "Créer une invitation réutilisable",
"enable-stereo-and-pro": "Activer l'audio stéréo et Pro HD",
"enter-the-rooms-control": "Entrez dans le centre de contrôle de la pièce",
"force-vp9-video-codec": "Forcer le codec vidéo VP9",
"generate-invite-link": "GÉNÉRER LE LIEN D'INVITATION",
"here-you-can-pre-generate": "Ici, vous pouvez pré-générer un lien de source de navigateur réutilisable et un lien d'invitation d'invité associé.",
"high-security-mode": "Mode haute sécurité",
"info-blob": "\n\t\t\t\t\t\t<h2>Qu'est-ce que OBS.Ninja</h2><br>\n\t\t\t\t\t\t<li>100% <b> gratuit </b>; aucun téléchargement; aucune collecte de données personnelles; pas de connexion</li>\n\t\t\t\t\t\t<li>Importez des vidéos de votre smartphone, ordinateur portable, ordinateur ou de vos amis directement dans votre flux vidéo OBS</li>\n\t\t\t\t\t\t<li>Nous utilisons une technologie de transfert Peer-to-Peer de pointe qui offre une confidentialité et une latence ultra-faible</li>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<li>Youtube video <i class=\"fa fa-youtube-play\" aria-hidden=\"true\"></i> <a href=\"https://www.youtube.com/watch?v=6R_sQKxFAhg\">Démonstration ici</a> </li>\n\t\t\t\t\t\t<li>Le code est disponible ici: <i class=\"fa fa-github\" aria-hidden=\"true\"></i> <a href=\"https://github.com/steveseguin/obsninja\">https://github.com/steveseguin/obsninja</a> </li>\n\t\t\t\t\t\t<h3>\n\t\t\t\t\t<i>Découvrez le <a href=\"https://www.reddit.com/r/OBSNinja/\">sub-reddit</a> <i class=\"fa fa-reddit-alien\" aria-hidden=\"true\"></i> pour de l'aide et des informations avancées.</i></h3>",
"joining-room": "Vous rejoignez la salle",
"max-resolution": "Résolution max",
"mute": "Mute",
"no-audio": "Pas de son",
"note-share-audio": "\n\t\t\t\t\t<b>note</b>: N'oubliez pas de cliquer sur Partager l'audio dans Chrome.<br>(Firefox ne prend pas en charge le partage audio.)",
"open-in-new-tab": "Ouvrir dans un nouvel onglet",
"record": "Record",
"remote-control-for-obs": "Télécommande pour OBS",
"remote-screenshare-obs": "Partage d'écran à distance dans OBS",
"room-name": "Nom de la salle",
"rooms-allow-for": "Les salles permettent une conversation de groupe simplifiée et la gestion avancée de plusieurs flux à la fois.",
"select-audio-source": "Sélectionnez les sources audio",
"select-audio-video": "Sélectionnez la source audio / vidéo ci-dessous",
"select-screen-to-share": "CHOISIR L'ÉCRAN À PARTAGER",
"show-tips": "Montrez-moi quelques conseils ..",
"smooth-cool": "Lisse et frais",
"unlock-video-bitrate": "Déverrouiller le débit vidéo (20 Mbps)",
"video-source": "Source vidéo",
"volume": "Volume",
"you-are-in-the-control-center": "Vous êtes dans le centre de contrôle de la pièce"
}

42
translations/ru.json Normal file
View File

@ -0,0 +1,42 @@
{
"GO": "ИДТИ",
"add-group-chat": "Добавить групповой чат в OBS",
"add-to-group": "Добавить в групповую сцену",
"add-your-camera": "Добавьте свою камеру в OBS",
"added-notes": "\n\t\t\t\t<u><i>Добавленные заметки:</i></u>\n\t\t\t\t<li>Любой может войти в комнату, если знает имя, поэтому оставьте его уникальным</li>\n\t\t\t\t<li>Наличие более четырех (4) человек в комнате не рекомендуется по причинам производительности, но это зависит от вашего оборудования.</li>\n\t\t\t\t<li>Устройства iOS ограничены размерами группы не более двух (2) человек. Это аппаратное ограничение.</li>\n\t\t\t\t",
"advanced-paramaters": "Расширенные параметры",
"audio-sources": "Аудио источники",
"back": "назад",
"balanced": "Сбалансированный",
"copy-this-url": "Скопируйте этот URL в OBS \"Browser Source\"",
"copy-to-clipboard": "Скопировать в буфер обмена",
"create-reusable-invite": "Создать многоразовое приглашение",
"enable-stereo-and-pro": "Включить стерео и Pro HD Audio",
"enter-the-rooms-control": "Войдите в Центр управления комнатой",
"force-vp9-video-codec": "Видеокодек Force VP9",
"generate-invite-link": "СОЗДАТЬ ПРИГЛАШАЮЩУЮ ССЫЛКУ",
"here-you-can-pre-generate": "Здесь вы можете предварительно сгенерировать повторно используемую ссылку на источник браузера и связанную гостевую ссылку для приглашения..",
"high-security-mode": "Режим высокой безопасности",
"info-blob": "\n\t\t\t\t\t\t<h2>Что такое OBS.Ninja</h2><br>\n\t\t\t\t\t\t<li>100% <b>бесплатно</b>; нет загрузок; нет сбора личных данных; нет входа</li>\n\t\t\t\t\t\t<li>Добавляйте видео со своего смартфона, ноутбука, компьютера или друзей прямо в видеопоток OBS</li>\n\t\t\t\t\t\t<li>Мы используем передовую технологию переадресации Peer-to-Peer, которая обеспечивает конфиденциальность и сверхнизкую задержку</li>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<li>Пользователям MacOS необходимо использовать OBS v23 или использовать <i> Window Capturing </ i> браузер Chrome с OBS v25</li>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\n\t\t\t\t\t\tСайт последний раз обновлялся: <a href=\"https://www.reddit.com/r/OBSNinja/comments/gf5pd3/new_version_released_today_along_with_new/\">May 7th, 2020.</a><br><br>\n\t\t\t\t\t\t<i></i><h3><i>Проверьте <a href=\"https://www.reddit.com/r/OBSNinja/\">sub-reddit</a> <i class=\"fa fa-reddit-alien\" aria-hidden=\"true\"></i> для помощи и расширенной информации.</i></h3>\n\t\t\t\t\t",
"joining-room": "Вы присоединяетесь к комнате",
"logo-header": "<font id=\"qos\" style=\"color: white;\">O</font>BS.Ninja (RU)",
"max-resolution": "Максимальное разрешение",
"mute": "сурдина",
"no-audio": "Нет звука",
"note-share-audio": "\n\t\t\t\t\tFirefox не поддерживает обмен аудио",
"open-in-new-tab": "Открыть в новой вкладке",
"record": "запись",
"remote-control-for-obs": "Пульт дистанционного управления для OBS",
"remote-screenshare-obs": "Удаленный просмотр экрана в OBS",
"room-name": "Название комнаты",
"rooms-allow-for": "В комнатах предусмотрены упрощенный групповой чат и расширенное управление несколькими потоками одновременно.",
"select-audio-source": "Выберите источники звука",
"select-audio-video": "Выберите источник аудио / видео ниже",
"select-screen-to-share": "Выберите экран, чтобы поделиться",
"show-tips": "Покажите мне несколько советов ..",
"smooth-cool": "Гладко и круто",
"unlock-video-bitrate": "Разблокировать видео битрейт",
"video-source": "Источник видео",
"volume": "громкость",
"you-are-in-the-control-center": "Вы находитесь в центре управления комнатой"
}