Skip to content

Commit

Permalink
fix opml attribute #270
Browse files Browse the repository at this point in the history
  • Loading branch information
yang991178 committed Jun 27, 2021
1 parent 9bdec16 commit ae37b2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/scripts/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
"cacheSize": "Dimensione Cache {size}",
"deleteChoices": "Rimuovi articoli di ... giorni fà",
"confirmDelete": "Rimuovi",
"daysAgo": "{giorni, plural, =1 {# giorno} other {# giorni}} fà",
"daysAgo": "{days, plural, =1 {# giorno} other {# giorni}} fà",
"deleteAll": "Rimuovi tutti gli articoli",
"calculatingSize": "Calcolo dimensione...",
"itemSize": "Gli articoli occupano {size} ",
Expand Down
6 changes: 3 additions & 3 deletions src/scripts/models/group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export function fixBrokenGroups(sources: SourceState): AppThunk {

function outlineToSource(outline: Element): [ReturnType<typeof addSource>, string] {
let url = outline.getAttribute("xmlUrl")
let name = outline.getAttribute("text") || outline.getAttribute("name")
let name = outline.getAttribute("text") || outline.getAttribute("title")
if (url) {
return [addSource(url.trim(), name, true), url]
} else {
Expand Down Expand Up @@ -258,7 +258,7 @@ export function importOPML(): AppThunk {
function sourceToOutline(source: RSSSource, xml: Document) {
let outline = xml.createElement("outline")
outline.setAttribute("text", source.name)
outline.setAttribute("name", source.name)
outline.setAttribute("title", source.name)
outline.setAttribute("type", "rss")
outline.setAttribute("xmlUrl", source.url)
return outline
Expand All @@ -279,7 +279,7 @@ export function exportOPML(): AppThunk {
if (group.isMultiple) {
let outline = xml.createElement("outline")
outline.setAttribute("text", group.name)
outline.setAttribute("name", group.name)
outline.setAttribute("title", group.name)
for (let sid of group.sids) {
outline.appendChild(sourceToOutline(state.sources[sid], xml))
}
Expand Down

0 comments on commit ae37b2e

Please sign in to comment.