Commit bdcf33d8 authored by yPhil's avatar yPhil

Sys: Renaming (s/Source/Feed/g) OK, still some translations to update

parent 913d65d3
......@@ -142,7 +142,7 @@ body {
font-family: LobsterRegular;
}
#preload > .source-title {
#preload > .feed-title {
font-family: BebasNeueRegular;
}
......@@ -325,7 +325,7 @@ i.item-icon {
}
i.tab-closer:hover,
i.source-control:hover {
i.feed-control:hover {
color: var(--color-ui-sec);
}
......@@ -334,27 +334,27 @@ i.dangerous:hover {
color: var(--color-ui-danger);
}
.source-header > .source-title > a:link,
.source-header > .source-title > a:visited {
.feed-header > .feed-title > a:link,
.feed-header > .feed-title > a:visited {
color: var(--color-pri);
}
.source-header > .source-title > a.danger:link,
.source-header > .source-title > a.danger:visited {
.feed-header > .feed-title > a.danger:link,
.feed-header > .feed-title > a.danger:visited {
color: var(--color-ui-danger);
}
.source-header > .source-title > a.danger:hover,
.source-header > .source-title > a:hover {
.feed-header > .feed-title > a.danger:hover,
.feed-header > .feed-title > a:hover {
color: var(--color-sec);
}
li.source-item:not(.error) a {
li.feed-item:not(.error) a {
display: block;
width:100%;
}
li.source-item.error > strong.key {
li.feed-item.error > strong.key {
color: var(--color-ui-danger);
}
......@@ -720,7 +720,7 @@ button.ui-state-error {
padding: .4em;
}
.source-header > .source-handle,
.feed-header > .feed-handle,
.dialog .help-bookmarklet {
cursor: grab;
}
......@@ -877,7 +877,7 @@ div.testFlex {
/* .column:first-child { margin-left: 0 !important; } */
/* .column:last-child { margin-right: 0 !important; } */
.new-source-button {
.new-feed-button {
margin-bottom: 0 !important;;
}
......@@ -970,7 +970,7 @@ ul.column div.buttons > button {
margin-bottom: .2em;
}
/* Source */
/* Feed */
li.feed {
position:relative;
......@@ -991,11 +991,11 @@ li.feed {
background: none !important;
}
.source-body {
.feed-body {
margin: 0;
}
.selected .source-body {
.selected .feed-body {
opacity: 0.8;
}
......@@ -1004,7 +1004,7 @@ li.feed {
text-overflow: ellipsis;
}
.source-header {
.feed-header {
display: flex;
flex-direction:row;
height: var(--header-height);
......@@ -1021,7 +1021,7 @@ li.feed {
outline: 3px dashed var(--color-qui);
}
.source-header > .source-title {
.feed-header > .feed-title {
color: var(--color-ter);
flex-basis: auto;
flex-grow: 4;
......@@ -1033,7 +1033,7 @@ li.feed {
margin-left: var(--title-margin-left);
}
.source-header > .source-handle {
.feed-header > .feed-handle {
background-color: transparent;
border-left: 3px dotted var(--color-oct);
border-right: 3px dotted var(--color-oct);
......@@ -1043,33 +1043,33 @@ li.feed {
visibility: var(--handle-visibility);
}
.source-header > .source-controls {
.feed-header > .feed-controls {
display: flex;
flex-basis: 0px;
flex-grow: 0;
flex-shrink: 0;
}
.source-header .source-controls div {
.feed-header .feed-controls div {
margin: 0 2px 0 0;
}
.source-header > .source-toggle,
.source-header .source-controls div {
.feed-header > .feed-toggle,
.feed-header .feed-controls div {
text-align: center;
}
.source-header .source-controls div.collapsible {
.feed-header .feed-controls div.collapsible {
display:none;
}
.source-control {
.feed-control {
cursor: pointer;
font-size: var(--controls-font-size);
margin: 0 0 0 2px;
}
.source-header > .source-toggle {
.feed-header > .feed-toggle {
margin: 2px;
flex-basis: auto;
flex-grow: 0;
......@@ -1084,7 +1084,7 @@ li.feed {
min-width: var(--controls-toggle-size) !important;
}
.source-header > .source-toggle i {
.feed-header > .feed-toggle i {
margin: var(--controls-toggle-margin);
}
......@@ -1100,7 +1100,7 @@ li.feed {
color: var(--color-ui-rss) !important;
}
li.source-item {
li.feed-item {
-moz-hyphens: auto;
-ms-hyphens: auto;
-webkit-hyphens: auto;
......@@ -1113,51 +1113,51 @@ li.source-item {
word-wrap: break-word;
}
li.source-item > div.itemDiv > a > img {
li.feed-item > div.itemDiv > a > img {
float:left;
margin: 0 .2rem .2rem 0;
max-width:30%;
}
li.source-item > div.itemDiv > a > img.full {
li.feed-item > div.itemDiv > a > img.full {
min-width:100%;
}
table tr,
li.source-item {
li.feed-item {
background-color: var(--color-sep);
}
table tr:nth-child(even),
li.source-item:nth-child(even) {
li.feed-item:nth-child(even) {
background-color: var(--color-non);
}
table tr:nth-child(even),
li.source-item:nth-child(even) {
li.feed-item:nth-child(even) {
background-color: var(--color-non);
}
li.source-item:hover {
li.feed-item:hover {
background-color: var(--color-sen);
color: var(--color-sep);
}
a.source-link:hover {
a.feed-link:hover {
color: var(--color-sec) !important;
}
li.feed div.source-body {
li.feed div.feed-body {
border-right: 1px solid var(--color-non);
border-bottom: 1px solid var(--color-non);
border-left: 1px solid var(--color-non);
}
li.feed:hover div.source-body {
li.feed:hover div.feed-body {
border-color: var(--color-den);
}
li.source-item > div.itemDiv > a > img:hover {
li.feed-item > div.itemDiv > a > img:hover {
outline: 1px solid var(--color-sec);
}
......@@ -1165,7 +1165,7 @@ li.feed {
padding: 0;
}
.source-header > .source-handle:hover {
.feed-header > .feed-handle:hover {
border-color: var(--color-sec);
}
......@@ -1176,13 +1176,13 @@ li.feed {
color: var(--color-pri) !important;
}
li.source-item:hover {
li.feed-item:hover {
background-color: none !important;
}
li.feed a:active,
li.feed a:hover,
.source-control:hover,
.feed-control:hover,
.item-icon:hover {
color: none !important;
}
......@@ -1204,7 +1204,7 @@ div.introjs-helperLayer {
background-color: rgba(255,255,255,.2);
}
.source-header {
.feed-header {
background-color: var(--color-sen);
color: var(--color-pri);
transition: all .3s linear;
......
......@@ -33,16 +33,16 @@ PTL.col = {
var $srcLegend = $('<legend>')
.attr('class', 'legend unique')
.text(PTL.tr('Source'));
.text(PTL.tr('Feed'));
var $column = $('<ul>')
.attr('class', 'column')
.append($colButtons);
var $srcNewButton = $('<button>')
.attr('title', PTL.tr('Add a source to this column'))
.data('title', 'Add a source to this column')
.attr('class', 'icon-plus unique translate new-source-button button-column last')
.attr('title', PTL.tr('Add a feed to this column'))
.data('title', 'Add a feed to this column')
.attr('class', 'icon-plus unique translate new-feed-button button-column last')
.button()
.data('colIndex', colIndex);
......@@ -63,10 +63,10 @@ PTL.col = {
$colDelButton.bind('click', function() {
var $column = $(this).parent().parent(),
$sourcesInCol = $column.find('.feed'),
nbOfSourcesInCol = $sourcesInCol.length;
$feedsInCol = $column.find('.feed'),
nbOfFeedsInCol = $feedsInCol.length;
if (nbOfSourcesInCol < 1) {
if (nbOfFeedsInCol < 1) {
PTL.col.del($column);
} else {
PTL.dialog.killColumn($(this));
......@@ -90,7 +90,7 @@ PTL.col = {
$column.sortable({
cursor: 'move',
handle: ".source-handle",
handle: ".feed-handle",
connectWith: ".column",
cursorAt: {top: 10, left: 32},
receive: function(e, ui) {
......@@ -123,7 +123,7 @@ PTL.col = {
ui.item.siblings('.selected').removeClass('hidden');
//unselect since the operation is complete
$('.selected').removeClass('selected ui-state-hover');
$(this).find('i.source-select').removeClass('icon-ok').addClass('icon-check-empty-1');
$(this).find('i.feed-select').removeClass('icon-ok').addClass('icon-check-empty-1');
PTL.tab.saveTabs();
}
}).disableSelection();
......
......@@ -39,7 +39,7 @@ PTL.dialog = {
$(this).find('.help-button').button();
$(this).find('.help-bookmarklet').attr('href', 'javascript:void(window.open("' + document.URL + '?source=" + window.location.href))');
$(this).find('.help-bookmarklet').attr('href', 'javascript:void(window.open("' + document.URL + '?feed=" + window.location.href))');
$('.help-tour').on('click', function() {
PTL.sideMenu('close');
......@@ -82,7 +82,7 @@ PTL.dialog = {
$('.help-rss').attr('href', 'https://' + PTL.language + '.wikipedia.org/wiki/RSS');
$dialog.dialog({
title: isNewFeed ? PTL.tr('New source') : PTL.tr('Source'),
title: isNewFeed ? PTL.tr('New feed') : PTL.tr('Feed'),
autoOpen: false,
closeOnEscape: true,
resizable: true,
......@@ -184,13 +184,13 @@ PTL.dialog = {
$guessButton
.addClass('ui-state-error')
.attr('title', PTL.tr('No valid source found at this address')) ;
.attr('title', PTL.tr('No valid feed found at this address')) ;
$okButton.addClass('ui-state-error');
}
var $tabFeedId = $('li#' + $dataStore.data('id')),
$sourceRefresh = $tabFeedId.find('.sourceRefresh'),
$feedRefresh = $tabFeedId.find('.feedRefresh'),
$guessButton = $dialog.find('button#feed-guess').button(),
$guessSpinner = $dialog.find('button#feed-guess > i'),
$guessField = $dialog.find('input#feed-guess'),
......@@ -246,7 +246,7 @@ PTL.dialog = {
$guessButton
.addClass('ui-state-success')
.attr('title', PTL.tr('Valid source found! Now just press OK')) ;
.attr('title', PTL.tr('Valid feed found! Now just press OK')) ;
}).fail(function(feed, status) {
guessError();
......@@ -292,7 +292,7 @@ PTL.dialog = {
});
$dialog.on('submit', function () {
PTL.src.populate($sourceRefresh);
PTL.src.populate($feedRefresh);
PTL.tab.saveTabs();
......@@ -324,8 +324,8 @@ PTL.dialog = {
$columnsInTab = $panel.find('.column'),
nbOfColumnsInTab = $columnsInTab.length,
colIndex = $panel.find('.column').index($column),
$sourcesInCol = $column.find('.feed'),
nbOfSourcesInCol = $sourcesInCol.length,
$feedsInCol = $column.find('.feed'),
nbOfFeedsInCol = $feedsInCol.length,
$icon = $dialog.find('div.icon > i');
$icon.addClass('icon-trash-empty danger');
......@@ -366,8 +366,8 @@ PTL.dialog = {
$dialog.find('h1').text(PTL.tr('Really delete this column?'));
$dialog.find('h2#name').text(PTL.tr('Index'));
$dialog.find('p#name').text((colIndex + 1));
$dialog.find('h2#number').text(PTL.tr('Number of sources'));
$dialog.find('p#number').text(nbOfSourcesInCol);
$dialog.find('h2#number').text(PTL.tr('Number of feeds'));
$dialog.find('p#number').text(nbOfFeedsInCol);
}
});
......@@ -506,7 +506,7 @@ PTL.dialog = {
$dialog.dialog('open');
});
},
addSource:function(sourceUrl) {
addFeed:function(feedUrl) {
$('#dialogs').load('/static/templates/dialogs.html #question-dialog', function() {
......@@ -520,7 +520,7 @@ PTL.dialog = {
// console.log('There is %s cols in the %s panel', nbOfColumnsInTab, $panel.attr('id'));
$dialog.dialog({
title: PTL.tr('Add source'),
title: PTL.tr('Add feed'),
autoOpen: false,
closeOnEscape: true,
resizable: false,
......@@ -538,22 +538,22 @@ PTL.dialog = {
},
{
text: PTL.tr('Add'),
title: PTL.tr('Add source'),
title: PTL.tr('Add feed'),
class: "translate",
click: function() {
PTL.src.add($('.column').first(), sourceUrl, 'mixed', 8, true, false);
PTL.src.add($('.column').first(), feedUrl, 'mixed', 8, true, false);
PTL.dialog.kill($dialog);
}
}
],
open: function () {
if (!PTL.util.isUrl(sourceUrl)) {
if (!PTL.util.isUrl(feedUrl)) {
h1 = 'Whoops!';
h2 = PTL.tr('Unrecognized URL: %1', sourceUrl);
h2 = PTL.tr('Unrecognized URL: %1', feedUrl);
} else {
isUrl = true;
h1 = PTL.tr('New source');
h1 = PTL.tr('New feed');
h2 = PTL.tr('URL');
}
......@@ -563,7 +563,7 @@ PTL.dialog = {
$dialog.find('h1').text(h1);
$dialog.find('h2#name').text(h2);
$dialog.find('p#name').text((sourceUrl));
$dialog.find('p#name').text((feedUrl));
}
});
......@@ -616,7 +616,7 @@ PTL.dialog = {
PTL.tab.saveTabs();
PTL.dialog.kill($dialog);
if ($.parseJSON(PTL.prefs.readConfig('sources')).length > 0) {
if ($.parseJSON(PTL.prefs.readConfig('feeds')).length > 0) {
$tabs.tabs('option', 'active', previousTabIndex).tabs('refresh');
} else {
PTL.util.console(PTL.tr('Zero tabs!'), 'error');
......@@ -634,7 +634,7 @@ PTL.dialog = {
$dialog.find('h1').text(PTL.tr('Really delete this group?'));
$dialog.find('h2#name').text(PTL.tr('Name'));
$dialog.find('p#name').text($a.text());
$dialog.find('h2#number').text(PTL.tr('Number of sources'));
$dialog.find('h2#number').text(PTL.tr('Number of feeds'));
$dialog.find('p#number').text($selectedPanel.find('li.feed').length);
}
......@@ -650,7 +650,7 @@ PTL.dialog = {
var $dialog = $(this),
$thisFeed = $button.parent().parent().parent().parent(),
thisFeedId = $button.parent().parent().parent().parent().attr('id'),
thisFeedName = $button.parent().parent().parent().find('.source-title').text(),
thisFeedName = $button.parent().parent().parent().find('.feed-title').text(),
$icon = $dialog.find('div.icon > i');
$icon.addClass('icon-trash-empty danger');
......@@ -658,7 +658,7 @@ PTL.dialog = {
console.log('feedId: %s, thisFeedName: %s', thisFeedId, thisFeedName);
$dialog.dialog({
title: PTL.tr('Delete source'),
title: PTL.tr('Delete feed'),
autoOpen: false,
closeOnEscape: true,
resizable: false,
......@@ -693,7 +693,7 @@ PTL.dialog = {
PTL.dialog.kill($dialog);
});
$dialog.find('h1').text(PTL.tr('Really delete this source?'));
$dialog.find('h1').text(PTL.tr('Really delete this feed?'));
$dialog.find('h2#name').text(PTL.tr('Name'));
$dialog.find('p#name').text(thisFeedName);
......
This diff is collapsed.
......@@ -4,7 +4,7 @@ var PTL = (function() {
return {
// language: Prefs.readConfig('lang'),
sourceTypes: ['text', 'mixed', 'photo'],
feedTypes: ['text', 'mixed', 'photo'],
language: 'en',
start : function() {
......@@ -12,7 +12,7 @@ var PTL = (function() {
var $menu = $('nav#side-menu'),
$overlay = $('#overlay'),
$sourceCodeButton = $('button#sourceCode'),
$feedCodeButton = $('button#feedCode'),
$importButton = $("button#fileImport"),
$fileImportInput = $("input#fileImport"),
$saveButton = $('#saveTabs'),
......@@ -44,7 +44,7 @@ var PTL = (function() {
PTL.dialog.help();
});
$('body').on('click','.new-source-button', function() {
$('body').on('click','.new-feed-button', function() {
var $column;
......@@ -58,10 +58,10 @@ var PTL = (function() {
}
PTL.sideMenu('close');
PTL.src.add($column, PTL.tr('New source'), 'mixed', 8, true, false);
PTL.src.add($column, PTL.tr('New feed'), 'mixed', 8, true, false);
});
$sourceCodeButton.click(function(event) {
$feedCodeButton.click(function(event) {
event.preventDefault();
window.open('https://framagit.org/yphil/petrolette');
});
......
......@@ -47,7 +47,7 @@ PTL.prefs = (function() {
'gallerySlideTransition': 'fade',
'gallerySlideshowSpeed': 3000,
'lang': 'en',
'sources': JSON.stringify(newList),
'feeds': JSON.stringify(newList),
'tabDropActivate': true,
'theme': 'night',
'writeTime': Date.now()
......@@ -67,7 +67,7 @@ PTL.prefs = (function() {
$('div#logo-title i').addClass('writing');
if (key === 'sources') {
if (key === 'feeds') {
localStorage.setItem('writeTime', Date.now());
}
......
......@@ -7,31 +7,31 @@ PTL.src = {
var feedIndex = $('#tabs').find('.feed').length;
var $feedIcon = $('<i>')
.attr('class', 'source-control feedIcon icon-rzz rotate translate')
.data('title', 'Fold / unfold this source (%1)', url)
.attr('title', PTL.tr('Fold / unfold this source (%1)', url));
.attr('class', 'feed-control feedIcon icon-rzz rotate translate')
.data('title', 'Fold / unfold this feed (%1)', url)
.attr('title', PTL.tr('Fold / unfold this feed (%1)', url));
var $feedSelect = $('<i>')
.attr('class', 'source-control translate icon-uncheck source-select')
.data('title', 'Select this source (%1)', url)
.attr('title', PTL.tr('Select this source (%1)', url));
.attr('class', 'feed-control translate icon-uncheck feed-select')
.data('title', 'Select this feed (%1)', url)
.attr('title', PTL.tr('Select this feed (%1)', url));
var $feedDelete = $('<i>')
.attr('class', 'source-control translate icon-cancel source-delete')
.data('title', 'Delete this source (%1)', url)
.attr('title', PTL.tr('Delete this source (%1)', url));
.attr('class', 'feed-control translate icon-cancel feed-delete')
.data('title', 'Delete this feed (%1)', url)
.attr('title', PTL.tr('Delete this feed (%1)', url));
var $feedPrefs = $('<i>')
.attr('class', 'source-control translate icon-pencil source-edit')
.data('title', PTL.tr('Change this source (%1) parameters', url))
.attr('title', PTL.tr('Change this source (%1) parameters', url));
.attr('class', 'feed-control translate icon-pencil feed-edit')
.data('title', PTL.tr('Change this feed (%1) parameters', url))
.attr('title', PTL.tr('Change this feed (%1) parameters', url));
var $feedReload = $('<i>')
.attr('class', 'source-control translate icon-arrows-cw source-refresh')
.data('title', PTL.tr('Refresh this source (%1)', url))
.attr('title', PTL.tr('Refresh this source (%1)', url));
.attr('class', 'feed-control translate icon-arrows-cw feed-refresh')
.data('title', PTL.tr('Refresh this feed (%1)', url))
.attr('title', PTL.tr('Refresh this feed (%1)', url));
var $feedControls = $('<div>').attr('class', 'source-controls dataStore')
var $feedControls = $('<div>').attr('class', 'feed-controls dataStore')
.data('id', 'feed-' + feedIndex)
.data('index', feedIndex)
.data('url', url)
......@@ -40,7 +40,7 @@ PTL.src = {
$feedIcon.click(function() {
$(this).toggleClass('down');
$(this).parent().parent().parent().children('div.source-body').slideToggle(350);
$(this).parent().parent().parent().children('div.feed-body').slideToggle(350);
});
$feedSelect.click(function() {
......@@ -61,10 +61,10 @@ PTL.src = {
});
var $feedBody = $('<div>')
.attr('class', 'source-body');
.attr('class', 'feed-body');
var $feedBodyUl = $('<ul>')
.attr('class', 'source-body');
.attr('class', 'feed-body');
var $feed = $('<li>')
.attr('id', 'feed-' + feedIndex)
......@@ -74,15 +74,15 @@ PTL.src = {
.data('limit', limit);
var $header = $('<div>')
.attr('class', 'source-header');
.attr('class', 'feed-header');
var $feedToggle = $('<div>')
.attr('class', 'source-toggle');
.attr('class', 'feed-toggle');
var $feedHandle = $('<div>')
.data('title', PTL.tr('Move this source (%1)', url))
.attr('title', PTL.tr('Move this source (%1)', url))
.attr('class', 'source-handle');
.data('title', PTL.tr('Move this feed (%1)', url))
.attr('title', PTL.tr('Move this feed (%1)', url))
.attr('class', 'feed-handle');
var $selectDiv = $('<div>'),
$deleteDiv = $('<div>'),
......@@ -91,7 +91,7 @@ PTL.src = {
var $titleDiv = $('<div>')
.attr('title', url)
.attr('class', 'source-title truncate');
.attr('class', 'feed-title truncate');
var $titleLink = $('<a>')
.attr('href', url)
......@@ -177,18 +177,18 @@ PTL.src = {
populate:function($button, progress) {
var $dataStore = $button.parent().parent(),
$refreshButton = $dataStore.find('i.source-refresh'),
$refreshButton = $dataStore.find('i.feed-refresh'),
$header = $dataStore.parent(),
$panel = $dataStore.parent().parent().parent(),
$feed = $dataStore.parent().parent(),
$feedTitle = $feed.children().children('.source-title'),
$feedTitle = $feed.children().children('.feed-title'),
$feedLink = $feedTitle.children('a'),
$feedBody = $feed.children().children('ul.source-body'),
$feedBody = $feed.children().children('ul.feed-body'),
feedUrl = $dataStore.data('url'),
feedType = $dataStore.data('type'),
feedLimit = $dataStore.data('limit'),
$feedToggle = $feed.find('.source-toggle'),
$feedIcon = $feed.find('.source-toggle > i');
$feedToggle = $feed.find('.feed-toggle'),
$feedIcon = $feed.find('.feed-toggle > i');
var l = PTL.util.getLocation(feedUrl),
feedProtocol = l.protocol + '//' || '//',
......@@ -207,11 +207,11 @@ PTL.src = {
dataType: "json"
}, function() {
// console.log('feedHost: %s (icon %s)', feedHost, icon);
$feedIcon.removeClass('icon-rzz');
}).done(function(icon) {
$feedToggle.css('background-image','url(' + icon + ')');
$header.data('img',icon);
$feedIcon.removeClass('icon-rzz');
$header.data('img', icon);
}).fail(function() {
$feedIcon.addClass('icon-rzz yowzo');
......@@ -233,7 +233,7 @@ PTL.src = {
if (data.error) {
PTL.util.console(PTL.tr('Problem reading source [%1] Error type [%2]', feedUrl, data.error), 'warning');
PTL.util.console(PTL.tr('Problem reading feed [%1] Error type [%2]', feedUrl, data.error), 'warning');
var $w3cLink = $('<a>'),
$validCssIcon = $('<i>');
......@@ -242,7 +242,7 @@ PTL.src = {
$validCssIcon
.attr('class', 'item-icon icon-w3c')
.attr('titre', PTL.tr('Validate /verify this source file with the W3C'));
.attr('titre', PTL.tr('Validate /verify this feed file with the W3C'));
$validCssIcon.appendTo($w3cLink);
$w3cLink.appendTo($feedBody);
......@@ -275,7 +275,7 @@ PTL.src = {
.text(PTL.tr('validate'));
var $errorItem = $('<li>')
.attr('class', 'source-item error')
.attr('class', 'feed-item error')
.append($errorTitle)
.append('&nbsp;')
.append($errorLink)
......@@ -303,7 +303,6 @@ PTL.src = {
var imageUrl;
var $imageLink = $('<a>').attr('target', '_blank'),
$itemLink = $('<a>').attr('target', '_blank'),
$soundLink = $('<a>').attr('target', '_blank'),
......@@ -318,8 +317,8 @@ PTL.src = {