fix opml attribute #270
This commit is contained in:
parent
9bdec161b0
commit
ae37b2ed36
|
@ -212,7 +212,7 @@
|
||||||
"cacheSize": "Dimensione Cache {size}",
|
"cacheSize": "Dimensione Cache {size}",
|
||||||
"deleteChoices": "Rimuovi articoli di ... giorni fà",
|
"deleteChoices": "Rimuovi articoli di ... giorni fà",
|
||||||
"confirmDelete": "Rimuovi",
|
"confirmDelete": "Rimuovi",
|
||||||
"daysAgo": "{giorni, plural, =1 {# giorno} other {# giorni}} fà",
|
"daysAgo": "{days, plural, =1 {# giorno} other {# giorni}} fà",
|
||||||
"deleteAll": "Rimuovi tutti gli articoli",
|
"deleteAll": "Rimuovi tutti gli articoli",
|
||||||
"calculatingSize": "Calcolo dimensione...",
|
"calculatingSize": "Calcolo dimensione...",
|
||||||
"itemSize": "Gli articoli occupano {size} ",
|
"itemSize": "Gli articoli occupano {size} ",
|
||||||
|
|
|
@ -188,7 +188,7 @@ export function fixBrokenGroups(sources: SourceState): AppThunk {
|
||||||
|
|
||||||
function outlineToSource(outline: Element): [ReturnType<typeof addSource>, string] {
|
function outlineToSource(outline: Element): [ReturnType<typeof addSource>, string] {
|
||||||
let url = outline.getAttribute("xmlUrl")
|
let url = outline.getAttribute("xmlUrl")
|
||||||
let name = outline.getAttribute("text") || outline.getAttribute("name")
|
let name = outline.getAttribute("text") || outline.getAttribute("title")
|
||||||
if (url) {
|
if (url) {
|
||||||
return [addSource(url.trim(), name, true), url]
|
return [addSource(url.trim(), name, true), url]
|
||||||
} else {
|
} else {
|
||||||
|
@ -258,7 +258,7 @@ export function importOPML(): AppThunk {
|
||||||
function sourceToOutline(source: RSSSource, xml: Document) {
|
function sourceToOutline(source: RSSSource, xml: Document) {
|
||||||
let outline = xml.createElement("outline")
|
let outline = xml.createElement("outline")
|
||||||
outline.setAttribute("text", source.name)
|
outline.setAttribute("text", source.name)
|
||||||
outline.setAttribute("name", source.name)
|
outline.setAttribute("title", source.name)
|
||||||
outline.setAttribute("type", "rss")
|
outline.setAttribute("type", "rss")
|
||||||
outline.setAttribute("xmlUrl", source.url)
|
outline.setAttribute("xmlUrl", source.url)
|
||||||
return outline
|
return outline
|
||||||
|
@ -279,7 +279,7 @@ export function exportOPML(): AppThunk {
|
||||||
if (group.isMultiple) {
|
if (group.isMultiple) {
|
||||||
let outline = xml.createElement("outline")
|
let outline = xml.createElement("outline")
|
||||||
outline.setAttribute("text", group.name)
|
outline.setAttribute("text", group.name)
|
||||||
outline.setAttribute("name", group.name)
|
outline.setAttribute("title", group.name)
|
||||||
for (let sid of group.sids) {
|
for (let sid of group.sids) {
|
||||||
outline.appendChild(sourceToOutline(state.sources[sid], xml))
|
outline.appendChild(sourceToOutline(state.sources[sid], xml))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue