from PySide6.QtWebEngineCore import QWebEnginePage
from PySide6.QtWebEngineWidgets import QWebEngineView
def zh_CN(web: QWebEngineView):
web.pageAction(QWebEnginePage.WebAction.NoWebAction).setText("")
web.pageAction(QWebEnginePage.WebAction.Back).setText("返回")
web.pageAction(QWebEnginePage.WebAction.Forward).setText("前进")
web.pageAction(QWebEnginePage.WebAction.Reload).setText("刷新")
web.pageAction(QWebEnginePage.WebAction.Stop).setText("停止加载")
web.pageAction(QWebEnginePage.WebAction.Cut).setText("剪切")
web.pageAction(QWebEnginePage.WebAction.Copy).setText("复制")
web.pageAction(QWebEnginePage.WebAction.Paste).setText("粘贴")
web.pageAction(QWebEnginePage.WebAction.Undo).setText("撤销")
web.pageAction(QWebEnginePage.WebAction.Redo).setText("重做")
web.pageAction(QWebEnginePage.WebAction.SelectAll).setText("全选")
web.pageAction(QWebEnginePage.WebAction.ReloadAndBypassCache).setText("ReloadAndBypassCache")
web.pageAction(QWebEnginePage.WebAction.PasteAndMatchStyle).setText("PasteAndMatchStyle")
web.pageAction(QWebEnginePage.WebAction.OpenLinkInThisWindow).setText("在此标签页中打开链接")
web.pageAction(QWebEnginePage.WebAction.OpenLinkInNewWindow).setText("在新窗口中打开链接")
web.pageAction(QWebEnginePage.WebAction.OpenLinkInNewTab).setText("在新标签页中打开链接")
web.pageAction(QWebEnginePage.WebAction.CopyLinkToClipboard).setText("复制链接")
web.pageAction(QWebEnginePage.WebAction.DownloadLinkToDisk).setText("将链接另存为...")
web.pageAction(QWebEnginePage.WebAction.CopyImageToClipboard).setText("复制图片")
web.pageAction(QWebEnginePage.WebAction.CopyImageUrlToClipboard).setText("复制图片链接")
web.pageAction(QWebEnginePage.WebAction.DownloadImageToDisk).setText("保存图片")
web.pageAction(QWebEnginePage.WebAction.CopyMediaUrlToClipboard).setText("复制视频链接")
web.pageAction(QWebEnginePage.WebAction.ToggleMediaControls).setText("ToggleMediaControls")
web.pageAction(QWebEnginePage.WebAction.ToggleMediaLoop).setText("ToggleMediaLoop")
web.pageAction(QWebEnginePage.WebAction.ToggleMediaPlayPause).setText("ToggleMediaPlayPause")
web.pageAction(QWebEnginePage.WebAction.ToggleMediaMute).setText("ToggleMediaMute")
web.pageAction(QWebEnginePage.WebAction.DownloadMediaToDisk).setText("保存视频")
web.pageAction(QWebEnginePage.WebAction.InspectElement).setText("InspectElement")
web.pageAction(QWebEnginePage.WebAction.ExitFullScreen).setText("ExitFullScreen")
web.pageAction(QWebEnginePage.WebAction.RequestClose).setText("RequestClose")
web.pageAction(QWebEnginePage.WebAction.Unselect).setText("反选")
web.pageAction(QWebEnginePage.WebAction.SavePage).setText("保存网页")
web.pageAction(QWebEnginePage.WebAction.OpenLinkInNewBackgroundTab).setText("OpenLinkInNewBackgroundTab")
web.pageAction(QWebEnginePage.WebAction.ViewSource).setText("查看网页源代码")
web.pageAction(QWebEnginePage.WebAction.ToggleBold).setText("ToggleBold")
web.pageAction(QWebEnginePage.WebAction.ToggleItalic).setText("ToggleItalic")
web.pageAction(QWebEnginePage.WebAction.ToggleUnderline).setText("ToggleUnderline")
web.pageAction(QWebEnginePage.WebAction.ToggleStrikethrough).setText("ToggleStrikethrough")
web.pageAction(QWebEnginePage.WebAction.AlignLeft).setText("AlignLeft")
web.pageAction(QWebEnginePage.WebAction.AlignCenter).setText("AlignCenter")
web.pageAction(QWebEnginePage.WebAction.AlignRight).setText("AlignRight")
web.pageAction(QWebEnginePage.WebAction.AlignJustified).setText("AlignJustified")
web.pageAction(QWebEnginePage.WebAction.Indent).setText("Indent")
web.pageAction(QWebEnginePage.WebAction.Outdent).setText("Outdent")
web.pageAction(QWebEnginePage.WebAction.InsertOrderedList).setText("InsertOrderedList")
web.pageAction(QWebEnginePage.WebAction.InsertUnorderedList).setText("")
web.pageAction(QWebEnginePage.WebAction.ChangeTextDirectionLTR).setText("InsertUnorderedList")
web.pageAction(QWebEnginePage.WebAction.ChangeTextDirectionRTL).setText("ChangeTextDirectionRTL")
web.pageAction(QWebEnginePage.WebAction.WebActionCount).setText("WebActionCount")
标签:web,PySide,pageAction,setText,QWebEnginePage,WebAction,PyQt,右键,链接
From: https://blog.csdn.net/2402_84665876/article/details/142668141