Skip to content

Commit

Permalink
Merge pull request #54 from nvdaes/fixTranslation
Browse files Browse the repository at this point in the history
Fix translatable messages
  • Loading branch information
nvdaes authored Dec 19, 2024
2 parents 3bfcc53 + 20a5f50 commit b6f5573
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions addon/globalPlugins/readFeeds/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,11 @@ def onOpenHtml(self, evt):
def onCopy(self, evt):
address = self.body.findall("outline")[self.filteredItems[self.sel]].get("xmlUrl")
if gui.messageBox(
# Translators: the label of a message box dialog.
_("Do you want to copy feed address to the clipboard\r\n\r\n{feedAddress}?".format(feedAddress=address)),
_(
# Translators: the label of a message box dialog.
"Do you want to copy feed address to the clipboard?"
"\n{}"
).format({address}),
# Translators: the title of a message box dialog.
_("Copy feed address"),
wx.YES | wx.NO | wx.CANCEL | wx.ICON_QUESTION
Expand Down Expand Up @@ -543,17 +546,19 @@ def onArticlesListChoice(self, evt):
os.startfile(self.Parent.feed.getArticleLink(self.articlesList.Selection))

def onArticlesListInfo(self, evt):
articleInfo = "{title}\r\n\r\n{address}".format(
title=self.articlesList.StringSelection,
address=self.Parent.feed.getArticleLink(self.articlesList.Selection)
)
title = self.articlesList.StringSelection
address = self.Parent.feed.getArticleLink(self.articlesList.Selection)
if gui.messageBox(
# Translators: the label of a message box dialog.
_("%sDo you want to copy article title and link to the clipboard?" % (articleInfo + "\r\n\r\n")),
_(
# Translators: the label of a message box dialog.
"{}\n{}\n"
"Do you want to copy article title and link to the clipboard?"
).format(title, address),
# Translators: the title of a message box dialog.
_("Article information"),
wx.YES | wx.NO | wx.CANCEL | wx.ICON_QUESTION
) == wx.YES:
articleInfo = f"{title}\n{address}\n"
api.copyToClip(articleInfo)

def onClose(self, evt):
Expand Down

0 comments on commit b6f5573

Please sign in to comment.