Private
Public Access
Translate all app and repository text to English for 0.6.2
This commit is contained in:
1 parent
ba87ee9260
commit
f3a9c0a0d8
9 files changed
+28
-28
No files matched your search
+10
-10
@@ -1,23 +1,23 @@
|
||||
'use strict';
|
||||
var pending=[];
|
||||
function call(method,done,data){
|
||||
if(typeof PalmServiceBridge==='undefined'){done({returnValue:false,errorText:'Diese App benötigt einen LG-TV mit installiertem nativem Dienst.'});return;}
|
||||
if(typeof PalmServiceBridge==='undefined'){done({returnValue:false,errorText:'This app requires an LG TV with the native service installed.'});return;}
|
||||
var bridge=new PalmServiceBridge(),timer,finished=false;
|
||||
function finish(value){if(finished)return;finished=true;clearTimeout(timer);var i=pending.indexOf(bridge);if(i>=0)pending.splice(i,1);done(value);}
|
||||
bridge.onservicecallback=function(raw){try{finish(JSON.parse(raw));}catch(e){finish({returnValue:false,errorText:'Ungültige Antwort vom Dienst'});}};
|
||||
pending.push(bridge);timer=setTimeout(function(){bridge.cancel();finish({returnValue:false,errorText:'Der Dienst antwortet nicht. Installation und Dienstprotokoll prüfen.'});},10000);
|
||||
bridge.onservicecallback=function(raw){try{finish(JSON.parse(raw));}catch(e){finish({returnValue:false,errorText:'Invalid service response'});}};
|
||||
pending.push(bridge);timer=setTimeout(function(){bridge.cancel();finish({returnValue:false,errorText:'The service is not responding. Check the installation and service log.'});},10000);
|
||||
bridge.call('luna://org.webosbrew.histogramhyperion.service/'+method,JSON.stringify(data||{}));
|
||||
}
|
||||
function display(result){
|
||||
if(typeof result.autostart==='boolean'){var toggle=document.getElementById('autostart');toggle.setAttribute('aria-checked',String(result.autostart));toggle.textContent='Autostart: '+(result.autostart?'Ein':'Aus');}
|
||||
if(typeof result.autostart==='boolean'){var toggle=document.getElementById('autostart');toggle.setAttribute('aria-checked',String(result.autostart));toggle.textContent='Autostart: '+(result.autostart?'On':'Off');}
|
||||
document.getElementById('error').textContent=result.errorText||result.error||'';
|
||||
document.getElementById('status').textContent=result.returnValue===false?'Dienst nicht bereit':(result.running?'Aktiv':'Gestoppt')+' · '+(result.frames||0)+' bestätigte Farbausgaben';
|
||||
if(result.colorValid)document.getElementById('status').textContent+=result.spatialOutput?' · '+result.ledCount+' LEDs aus 16 Farbbereichen':' · Gesendetes RGB: '+result.outputColor.join(', ');
|
||||
else if(result.returnValue!==false)document.getElementById('status').textContent+=' · Keine aktuelle Farbausgabe';
|
||||
if(result.blackBarDetection && result.running)document.getElementById('status').textContent+=result.letterboxDetected?' · Balken oben/unten erkannt':' · Vollbild-Erfassung';
|
||||
if(result.spatialInterpolation)document.getElementById('status').textContent+=' · Feine Farbübergänge';
|
||||
document.getElementById('status').textContent=result.returnValue===false?'Service unavailable':(result.running?'Running':'Stopped')+' · '+(result.frames||0)+' acknowledged color updates';
|
||||
if(result.colorValid)document.getElementById('status').textContent+=result.spatialOutput?' · '+result.ledCount+' LEDs from 16 color regions':' · Output RGB: '+result.outputColor.join(', ');
|
||||
else if(result.returnValue!==false)document.getElementById('status').textContent+=' · No current color output';
|
||||
if(result.blackBarDetection && result.running)document.getElementById('status').textContent+=result.letterboxDetected?' · Top/bottom black bars detected':' · Full-screen capture';
|
||||
if(result.spatialInterpolation)document.getElementById('status').textContent+=' · Smooth color transitions';
|
||||
var box=document.getElementById('regions');box.textContent='';
|
||||
(result.regions||[]).forEach(function(rgb,index){var e=document.createElement('div');e.className='swatch';e.style.backgroundColor='rgb('+rgb.join(',')+')';e.title='Histogramm '+index;box.appendChild(e);});
|
||||
(result.regions||[]).forEach(function(rgb,index){var e=document.createElement('div');e.className='swatch';e.style.backgroundColor='rgb('+rgb.join(',')+')';e.title='Histogram '+index;box.appendChild(e);});
|
||||
}
|
||||
document.getElementById('start').onclick=function(){call('start',function(r){if(r.returnValue===false)display(r);else call('status',display);});};
|
||||
document.getElementById('stop').onclick=function(){call('stop',function(){call('status',display);});};
|
||||
|
||||
Reference in new issue
Block a user