Commit 86e6433b authored by yPhil's avatar yPhil

Sys: Console messages handling (type & translations)

parent 78a0360a
......@@ -135,7 +135,6 @@ PTL.feed = {
// $feedIcon.css('background-image', iconImg);
console.log('iconImg: ', $(this).data('img'));
if ($(this).data('img') !== 'none') {
$feedToggle.css('background-image', $(this).data('img'));
......@@ -267,7 +266,8 @@ PTL.feed = {
.attr('title', (data.feedTitle || PTL.tr('Untitled')) + ' (' + feedUrl + ')');
if (data.error) {
console.info('Pétrolette | bad Feed: (%s) error: [%s]', feedUrl, data.error);
console.warn('Pétrolette | ' + PTL.tr('Problem reading source [%1] Error type [%2]', feedUrl, data.error));
var $w3cLink = $('<a>'),
$validCssIcon = $('<i>');
......@@ -400,7 +400,6 @@ PTL.feed = {
var myArray = item['media:group']['media:content'];
for (var i = 0; i < myArray.length; i++) {
if (myArray[i]['@'].url) {
console.log('media:group! (%s)', feedUrl);
imageUrl = myArray[i]['@'].url;
}
}
......
......@@ -210,7 +210,20 @@ PTL.i18n.translations = {
"Loading of [%1] OK" : { fr: "Lecture de [%1] OK" , ja: "[%1]をロードしました。OK", es: "Cargado [%1] bien" },
"Erase all" : { fr: "Tout effacer" , ja: "すべてを消去する", es: "Borrar todo" },
"You can't create more than %1 resources of each type." : { fr: "Vous ne pouvez pas créer plus de %1 ressources de chaque type.", ja: "各種%以上の財源を作ることはできません。" },
"Connected to remote storage" : { fr: "Connecté au stockage distant" , ja: "リモートストレージに接続", es: "Conectado al almacenamiento remoto" },
"Disconnected from remote storage" : { fr: "Déconnecté du stockage distant" , ja: "リモートストレージから切断されました", es: "Desconectado de almacenamiento remoto" },
"Remote file validation NOT OK (error [%1]) now reading from browser cache" : { fr: "Validation de fichier à distance NOT OK (erreur [%1]) lecture depuis le cache du navigateur" , ja: "リモートファイルの検証NOT OK(エラー[%1])がブラウザのキャッシュから読み込み中です", es: "La validación remota de archivos NO está OK (error [%1]) leyendo desde el caché del navegador" },
"Remote file validation OK" : { fr: "Validation fichier distant OK" , ja: "リモートファイルの検証OK", es: "Validación remota de archivos OK" },
"Problem reading source [%1] Error type [%2]" : { fr: "Problème lecture source [%1] Type d'erreur [%2]", ja: "問題の読書の問題[%1]エラータイプ[%2]", es: "Problema al leer la fuente [%1] Tipo de error [%2]" },
"ERROR TYPE" : { fr: "TYPE D'ERREUR", ja: "エラータイプ", es: "TIPO DE ERROR" },
"Error" : { fr: "Erreur", ja: "エラー", es: "Error" },
"error" : { fr: "erreur", ja: "エラー", es: "error" },
......
PTL.menu = {
top:function() {
$('<div id="topMenu">').appendTo($('header')).load('/static/templates/menu.html nav#topnav', function() {
console.log('plop!');
});
$('<div id="topMenu">').appendTo($('header')).load('/static/templates/menu.html nav#topnav', null);
},
side:function() {
......
......@@ -36,12 +36,12 @@ PTL.sync = (function() {
remoteStorage.on('connected', function() {
synchronized = true;
console.info('Pétrolette | Connected to remote storage');
console.info('Pétrolette | ' + PTL.tr('Connected to remote storage'));
});
remoteStorage.on('disconnected', function() {
synchronized = false;
console.info('Pétrolette | Disconnected from remote storage');
console.warn('Pétrolette | ' + PTL.tr('Disconnected from remote storage'));
});
return {
......@@ -62,13 +62,13 @@ PTL.sync = (function() {
if (PTL.prefs.isValidSourcesFile(JSON.parse(data))) {
console.info('Pétrolette | Remote file validation OK');
console.info('Pétrolette | ' + PTL.tr('Remote file validation OK'));
return PTL.tab.populate(JSON.parse(data));
} else {
console.error('Pétrolette | Remote file validation NOT OK(%s) Tryin browser cache', data);
console.warn('Pétrolette | ' + PTL.tr('Remote file validation NOT OK (error [%1]) now reading from browser cache', data));
if (PTL.prefs.isValidSourcesFile(JSON.parse(PTL.prefs.readConfig('tabs')))) {
console.log('plop');
......
PTL.tab = {
init:function() {
console.info('Pétrolette | Starting UP!');
var $tabs = $('#tabs').tabs({
heightStyle: 'content',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment