Wed, 02 Jun 2021 17:30:01 +0200
Ported the plug-in to PyQt6 for eric7.
--- a/.hgignore Wed Jun 02 17:20:11 2021 +0200 +++ b/.hgignore Wed Jun 02 17:30:01 2021 +0200 @@ -1,11 +1,6 @@ +glob:.eric7project glob:.eric6project -glob:_eric6project -glob:.eric5project -glob:_eric5project -glob:.eric4project -glob:_eric4project glob:.ropeproject -glob:_ropeproject glob:.directory glob:**.pyc glob:**.pyo
--- a/ChangeLog Wed Jun 02 17:20:11 2021 +0200 +++ b/ChangeLog Wed Jun 02 17:30:01 2021 +0200 @@ -1,5 +1,10 @@ ChangeLog --------- +Version 1.0.0: +- first release of the eric7 variant + +************************************************************ + Version 3.2.0: - implemented some code simplifications
--- a/PluginWizardDataUriEncoder.e4p Wed Jun 02 17:20:11 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,516 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE Project SYSTEM "Project-5.1.dtd"> -<!-- eric project file for project PluginWizardDataUriEncoder --> -<!-- Copyright (C) 2020 Detlev Offenbach, detlevqdie-offenbachs.de --> -<Project version="5.1"> - <Language>en_US</Language> - <Hash>2144bd61ef339d39bc1790af5e236aaa2a8828ac</Hash> - <ProgLanguage mixed="0">Python3</ProgLanguage> - <ProjectType>E6Plugin</ProjectType> - <Description>Plug-in implementing a wizard for the generation of code for base64 encoded data URIs.</Description> - <Version>2.x</Version> - <Author>Detlev Offenbach</Author> - <Email>detlevqdie-offenbachs.de</Email> - <TranslationPattern>WizardDataUriEncoder/i18n/datauriencoder_%language%.ts</TranslationPattern> - <Eol index="1"/> - <Sources> - <Source>PluginWizardDataUriEncoder.py</Source> - <Source>WizardDataUriEncoder/DataUriEncoderWizardDialog.py</Source> - <Source>WizardDataUriEncoder/__init__.py</Source> - <Source>__init__.py</Source> - </Sources> - <Forms> - <Form>WizardDataUriEncoder/DataUriEncoderWizardDialog.ui</Form> - </Forms> - <Translations> - <Translation>WizardDataUriEncoder/i18n/datauriencoder_de.qm</Translation> - <Translation>WizardDataUriEncoder/i18n/datauriencoder_de.ts</Translation> - <Translation>WizardDataUriEncoder/i18n/datauriencoder_en.qm</Translation> - <Translation>WizardDataUriEncoder/i18n/datauriencoder_en.ts</Translation> - <Translation>WizardDataUriEncoder/i18n/datauriencoder_es.qm</Translation> - <Translation>WizardDataUriEncoder/i18n/datauriencoder_es.ts</Translation> - <Translation>WizardDataUriEncoder/i18n/datauriencoder_ru.qm</Translation> - <Translation>WizardDataUriEncoder/i18n/datauriencoder_ru.ts</Translation> - </Translations> - <Others> - <Other>.hgignore</Other> - <Other>ChangeLog</Other> - <Other>PKGLIST</Other> - <Other>PluginWizardDataUriEncoder.e4p</Other> - <Other>PluginWizardDataUriEncoder.zip</Other> - <Other>WizardDataUriEncoder/Documentation/LICENSE.GPL3</Other> - <Other>WizardDataUriEncoder/Documentation/source</Other> - </Others> - <MainScript>PluginWizardDataUriEncoder.py</MainScript> - <Vcs> - <VcsType>Mercurial</VcsType> - <VcsOptions> - <dict> - <key> - <string>add</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>checkout</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>commit</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>diff</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>export</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>global</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>history</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>log</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>remove</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>status</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>tag</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - <key> - <string>update</string> - </key> - <value> - <list> - <string></string> - </list> - </value> - </dict> - </VcsOptions> - </Vcs> - <FiletypeAssociations> - <FiletypeAssociation pattern="*.idl" type="INTERFACES"/> - <FiletypeAssociation pattern="*.py" type="SOURCES"/> - <FiletypeAssociation pattern="*.py3" type="SOURCES"/> - <FiletypeAssociation pattern="*.pyw" type="SOURCES"/> - <FiletypeAssociation pattern="*.pyw3" type="SOURCES"/> - <FiletypeAssociation pattern="*.qm" type="TRANSLATIONS"/> - <FiletypeAssociation pattern="*.qrc" type="RESOURCES"/> - <FiletypeAssociation pattern="*.ts" type="TRANSLATIONS"/> - <FiletypeAssociation pattern="*.ui" type="FORMS"/> - <FiletypeAssociation pattern="*.ui.h" type="FORMS"/> - <FiletypeAssociation pattern="Ui_*.py" type="__IGNORE__"/> - </FiletypeAssociations> - <Documentation> - <DocumentationParams> - <dict> - <key> - <string>ERIC4DOC</string> - </key> - <value> - <dict> - <key> - <string>cssFile</string> - </key> - <value> - <string>%PYTHON%/eric6/CSSs/default.css</string> - </value> - <key> - <string>ignoreDirectories</string> - </key> - <value> - <list> - <string>.eric5project</string> - <string>.hg</string> - <string>.ropeproject</string> - <string>_eric5project</string> - <string>_ropeproject</string> - <string>.eric6project</string> - <string>_eric6project</string> - </list> - </value> - <key> - <string>ignoreFilePatterns</string> - </key> - <value> - <list> - <string>Ui_*.py</string> - </list> - </value> - <key> - <string>noempty</string> - </key> - <value> - <bool>True</bool> - </value> - <key> - <string>outputDirectory</string> - </key> - <value> - <string>WizardDataUriEncoder/Documentation/source</string> - </value> - <key> - <string>qtHelpEnabled</string> - </key> - <value> - <bool>False</bool> - </value> - <key> - <string>useRecursion</string> - </key> - <value> - <bool>True</bool> - </value> - </dict> - </value> - </dict> - </DocumentationParams> - </Documentation> - <Checkers> - <CheckersParams> - <dict> - <key> - <string>Pep8Checker</string> - </key> - <value> - <dict> - <key> - <string>AnnotationsChecker</string> - </key> - <value> - <dict> - <key> - <string>MaximumComplexity</string> - </key> - <value> - <int>3</int> - </value> - <key> - <string>MinimumCoverage</string> - </key> - <value> - <int>75</int> - </value> - </dict> - </value> - <key> - <string>BlankLines</string> - </key> - <value> - <tuple> - <int>2</int> - <int>1</int> - </tuple> - </value> - <key> - <string>BuiltinsChecker</string> - </key> - <value> - <dict> - <key> - <string>bytes</string> - </key> - <value> - <list> - <string>unicode</string> - </list> - </value> - <key> - <string>chr</string> - </key> - <value> - <list> - <string>unichr</string> - </list> - </value> - <key> - <string>str</string> - </key> - <value> - <list> - <string>unicode</string> - </list> - </value> - </dict> - </value> - <key> - <string>CommentedCodeChecker</string> - </key> - <value> - <dict> - <key> - <string>Aggressive</string> - </key> - <value> - <bool>False</bool> - </value> - </dict> - </value> - <key> - <string>CopyrightAuthor</string> - </key> - <value> - <string></string> - </value> - <key> - <string>CopyrightMinFileSize</string> - </key> - <value> - <int>0</int> - </value> - <key> - <string>DocstringType</string> - </key> - <value> - <string>eric</string> - </value> - <key> - <string>EnabledCheckerCategories</string> - </key> - <value> - <string>C, D, E, M, N, S, W</string> - </value> - <key> - <string>ExcludeFiles</string> - </key> - <value> - <string>*/Ui_*.py, */*_rc.py</string> - </value> - <key> - <string>ExcludeMessages</string> - </key> - <value> - <string>C101,E265,E266,E305,E402,M811,N802,N803,N807,N808,N821,W293,W504,M305</string> - </value> - <key> - <string>FixCodes</string> - </key> - <value> - <string></string> - </value> - <key> - <string>FixIssues</string> - </key> - <value> - <bool>False</bool> - </value> - <key> - <string>FutureChecker</string> - </key> - <value> - <string></string> - </value> - <key> - <string>HangClosing</string> - </key> - <value> - <bool>False</bool> - </value> - <key> - <string>IncludeMessages</string> - </key> - <value> - <string></string> - </value> - <key> - <string>LineComplexity</string> - </key> - <value> - <int>20</int> - </value> - <key> - <string>LineComplexityScore</string> - </key> - <value> - <int>10</int> - </value> - <key> - <string>MaxCodeComplexity</string> - </key> - <value> - <int>10</int> - </value> - <key> - <string>MaxDocLineLength</string> - </key> - <value> - <int>79</int> - </value> - <key> - <string>MaxLineLength</string> - </key> - <value> - <int>79</int> - </value> - <key> - <string>NoFixCodes</string> - </key> - <value> - <string>E501</string> - </value> - <key> - <string>RepeatMessages</string> - </key> - <value> - <bool>True</bool> - </value> - <key> - <string>SecurityChecker</string> - </key> - <value> - <dict> - <key> - <string>CheckTypedException</string> - </key> - <value> - <bool>False</bool> - </value> - <key> - <string>HardcodedTmpDirectories</string> - </key> - <value> - <list> - <string>/tmp</string> - <string>/var/tmp</string> - <string>/dev/shm</string> - <string>~/tmp</string> - </list> - </value> - <key> - <string>InsecureHashes</string> - </key> - <value> - <list> - <string>md4</string> - <string>md5</string> - <string>sha</string> - <string>sha1</string> - </list> - </value> - <key> - <string>InsecureSslProtocolVersions</string> - </key> - <value> - <list> - <string>PROTOCOL_SSLv2</string> - <string>SSLv2_METHOD</string> - <string>SSLv23_METHOD</string> - <string>PROTOCOL_SSLv3</string> - <string>PROTOCOL_TLSv1</string> - <string>SSLv3_METHOD</string> - <string>TLSv1_METHOD</string> - </list> - </value> - <key> - <string>WeakKeySizeDsaHigh</string> - </key> - <value> - <string>1024</string> - </value> - <key> - <string>WeakKeySizeDsaMedium</string> - </key> - <value> - <string>2048</string> - </value> - <key> - <string>WeakKeySizeEcHigh</string> - </key> - <value> - <string>160</string> - </value> - <key> - <string>WeakKeySizeEcMedium</string> - </key> - <value> - <string>224</string> - </value> - <key> - <string>WeakKeySizeRsaHigh</string> - </key> - <value> - <string>1024</string> - </value> - <key> - <string>WeakKeySizeRsaMedium</string> - </key> - <value> - <string>2048</string> - </value> - </dict> - </value> - <key> - <string>ShowIgnored</string> - </key> - <value> - <bool>False</bool> - </value> - <key> - <string>ValidEncodings</string> - </key> - <value> - <string>latin-1, utf-8</string> - </value> - </dict> - </value> - </dict> - </CheckersParams> - </Checkers> -</Project>
--- a/PluginWizardDataUriEncoder.epj Wed Jun 02 17:20:11 2021 +0200 +++ b/PluginWizardDataUriEncoder.epj Wed Jun 02 17:30:01 2021 +0200 @@ -113,15 +113,12 @@ "DOCSTRING": "", "DOCUMENTATIONPARMS": { "ERIC4DOC": { - "cssFile": "%PYTHON%/eric6/CSSs/default.css", + "cssFile": "%PYTHON%/eric7/CSSs/default.css", "ignoreDirectories": [ - ".eric5project", ".hg", ".ropeproject", - "_eric5project", - "_ropeproject", ".eric6project", - "_eric6project" + ".eric7project" ], "ignoreFilePatterns": [ "Ui_*.py" @@ -135,17 +132,25 @@ "EMAIL": "detlevqdie-offenbachs.de", "EOL": 1, "FILETYPES": { + "*.epj": "OTHERS", "*.idl": "INTERFACES", + "*.md": "OTHERS", + "*.proto": "PROTOCOLS", "*.py": "SOURCES", "*.py3": "SOURCES", "*.pyw": "SOURCES", "*.pyw3": "SOURCES", "*.qm": "TRANSLATIONS", - "*.qrc": "RESOURCES", + "*.rst": "OTHERS", "*.ts": "TRANSLATIONS", + "*.txt": "OTHERS", "*.ui": "FORMS", - "*.ui.h": "FORMS", - "Ui_*.py": "__IGNORE__" + "GNUmakefile": "OTHERS", + "Makefile": "OTHERS", + "README": "OTHERS", + "README.*": "OTHERS", + "Ui_*.py": "__IGNORE__", + "makefile": "OTHERS" }, "FORMS": [ "WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" @@ -172,7 +177,6 @@ ".hgignore", "ChangeLog", "PKGLIST", - "PluginWizardDataUriEncoder.e4p", "PluginWizardDataUriEncoder.zip", "WizardDataUriEncoder/Documentation/LICENSE.GPL3", "WizardDataUriEncoder/Documentation/source", @@ -181,7 +185,7 @@ "OTHERTOOLSPARMS": {}, "PACKAGERSPARMS": {}, "PROGLANGUAGE": "Python3", - "PROJECTTYPE": "E6Plugin", + "PROJECTTYPE": "E7Plugin", "PROJECTTYPESPECIFICDATA": {}, "PROTOCOLS": [], "RCCPARAMS": { @@ -258,6 +262,6 @@ ] }, "VCSOTHERDATA": {}, - "VERSION": "2.x" + "VERSION": "" } } \ No newline at end of file
--- a/PluginWizardDataUriEncoder.py Wed Jun 02 17:20:11 2021 +0200 +++ b/PluginWizardDataUriEncoder.py Wed Jun 02 17:30:01 2021 +0200 @@ -9,19 +9,19 @@ import os -from PyQt5.QtCore import QObject, QTranslator -from PyQt5.QtWidgets import QDialog +from PyQt6.QtCore import QObject, QTranslator +from PyQt6.QtWidgets import QDialog -from E5Gui.E5Application import e5App -from E5Gui.E5Action import E5Action -from E5Gui import E5MessageBox +from EricWidgets.EricApplication import ericApp +from EricGui.EricAction import EricAction +from EricWidgets import EricMessageBox # Start-of-Header name = "Base64 Data URI Encoder Wizard Plug-in" author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "3.2.0" +version = "1.0.0" className = "WizardDataUriEncoderPlugin" packageName = "WizardDataUriEncoder" shortDescription = "Wizard for the creation of code for a base64 data URI." @@ -44,7 +44,8 @@ """ Constructor - @param ui reference to the user interface object (UI.UserInterface) + @param ui reference to the user interface object + @type UserInterface """ QObject.__init__(self, ui) @@ -58,7 +59,8 @@ """ Public method to activate this plug-in. - @return tuple of None and activation status (boolean) + @return tuple of None and activation status + @rtype (None, bool) """ self.__initAction() self.__initMenu() @@ -72,7 +74,7 @@ menu = self.__ui.getMenu("wizards") if menu: menu.removeAction(self.__action) - self.__ui.removeE5Actions([self.__action], 'wizards') + self.__ui.removeEricActions([self.__action], 'wizards') def __loadTranslator(self): """ @@ -88,7 +90,7 @@ loaded = translator.load(translation, locale_dir) if loaded: self.__translator = translator - e5App().installTranslator(self.__translator) + ericApp().installTranslator(self.__translator) else: print("Warning: translation file '{0}' could not be" " loaded.".format(translation)) @@ -98,7 +100,7 @@ """ Private method to initialize the action. """ - self.__action = E5Action( + self.__action = EricAction( self.tr('Base64 Data Uri Encoder Wizard'), self.tr('Base&64 Data Uri Encoder Wizard...'), 0, 0, self, @@ -112,7 +114,7 @@ )) self.__action.triggered.connect(self.__handle) - self.__ui.addE5Actions([self.__action], 'wizards') + self.__ui.addEricActions([self.__action], 'wizards') def __initMenu(self): """ @@ -126,10 +128,10 @@ """ Private method to handle the wizards action. """ - editor = e5App().getObject("ViewManager").activeWindow() + editor = ericApp().getObject("ViewManager").activeWindow() if editor is None: - E5MessageBox.critical( + EricMessageBox.critical( self.__ui, self.tr('No current editor'), self.tr('Please open or create a file first.')) @@ -138,7 +140,7 @@ DataUriEncoderWizardDialog ) dlg = DataUriEncoderWizardDialog(None) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: code = dlg.getCode() if code: line, index = editor.getCursorPosition()
--- a/WizardDataUriEncoder/DataUriEncoderWizardDialog.py Wed Jun 02 17:20:11 2021 +0200 +++ b/WizardDataUriEncoder/DataUriEncoderWizardDialog.py Wed Jun 02 17:30:01 2021 +0200 @@ -7,42 +7,57 @@ Module implementing the base64 data URI encoder wizard dialog. """ -import os -import mimetypes import base64 +import codecs +import datetime import getpass -import datetime +import mimetypes +import os -from PyQt5.QtCore import pyqtSlot -from PyQt5.QtWidgets import ( +from PyQt6.QtCore import pyqtSlot +from PyQt6.QtWidgets import ( QDialog, QDialogButtonBox, QApplication, QInputDialog ) -from E5Gui.E5Completers import E5FileCompleter -from E5Gui import E5FileDialog, E5MessageBox +from EricWidgets import EricMessageBox +from EricWidgets.EricPathPicker import EricPathPickerModes from .Ui_DataUriEncoderWizardDialog import Ui_DataUriEncoderWizardDialog import Preferences import Utilities -import UI.PixmapCache -Python3Template = """#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -from base64 import b64decode -from io import BytesIO - -#metadata -__author__ = '{0}' -__date__ = '{1}' - - -embedded_file = BytesIO(b64decode({2})) -print(embedded_file.read()) -""" - +DataUriTemplates = { + "Python3": "\n".join([ + "#!/usr/bin/env python3", + "# -*- coding: utf-8 -*-", + "", + "from base64 import b64decode", + "from io import BytesIO", + "", + "#metadata", + "__author__ = '{0}'", + "__date__ = '{1}'", + "", + "", + "embedded_file = BytesIO(b64decode(", + " {2}", + "))", + "print(embedded_file.read())", + ]), + + "CSS": + "html, body {{ margin:0; padding:0; background: url({0})" + " no-repeat center center fixed; background-size:cover" + " }}", + + "HTML": '<img src={0} alt="{1}" title="{1}"/>', + + "JavaScript": "var embedded_file = window.atob({0}); ", + + "QML": "Image {{ source: {0} }} " +} class DataUriEncoderWizardDialog(QDialog, Ui_DataUriEncoderWizardDialog): """ @@ -52,65 +67,45 @@ """ Constructor - @param parent reference to the parent widget (QWidget) + @param parent reference to the parent widget + @type QWidget """ super().__init__(parent) self.setupUi(self) - self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Ok).setEnabled(False) - self.__fileCompleter = E5FileCompleter(self.fileEdit) - - self.fileButton.setIcon(UI.PixmapCache.getIcon("open.png")) + self.filePicker.setWindowTitle(self.tr("Data URI Encoder")) + self.filePicker.setMode(EricPathPickerModes.OPEN_FILE_MODE) + self.filePicker.setFilters(self.tr( + "Audio Files (*.flac *.mp3 *.ogg *.wav *.weba *.wma);;" + "Image Files (*.gif *.ico *.jpg *.png *.svg *.tif *.webp" + " *.xpm);;" + "Video Files (*.3gp *.avi *.flv *.mp4 *.ogv *.webm *.wmv);;" + "All Files (*)" + )) + self.filePicker.setDefaultDirectory( + Preferences.getMultiProject("Workspace") or + Utilities.getHomeDir() + ) self.embeddingComboBox.addItems([ - self.tr('Do not generate code'), # 0 - self.tr('Generate Python3 embed code'), # 1 - self.tr('Generate CSS embed code'), # 2 - self.tr('Generate HTML embed code'), # 3 - self.tr('Generate JS embed code'), # 4 - self.tr('Generate QML embed code'), # 5 + self.tr('Do not generate code'), # 0 + self.tr('Generate Python3 embedding code'), # 1 + self.tr('Generate CSS embedding code'), # 2 + self.tr('Generate HTML embedding code'), # 3 + self.tr('Generate JavaScript embedding code'), # 4 + self.tr('Generate QML embedding code'), # 5 ]) - def __getStartDir(self): - """ - Private method to get the start directory for selection dialogs. - - @return start directory (string) - """ - return (Preferences.getMultiProject("Workspace") or - Utilities.getHomeDir()) - - @pyqtSlot() - def on_fileButton_clicked(self): - """ - Private slot to select the file to be encoded via a selection dialog. - """ - start = ( - Utilities.fromNativeSeparators(self.fileEdit.text()) or - self.__getStartDir() - ) - inputFile = E5FileDialog.getOpenFileName( - self, - self.tr("Data URI Encoder"), - start, - self.tr( - "Audio Files (*.flac *.mp3 *.ogg *.wav *.weba *.wma);;" - "Image Files (*.gif *.ico *.jpg *.png *.svg *.tif *.webp" - " *.xpm);;" - "Video Files (*.3gp *.avi *.flv *.mp4 *.ogv *.webm *.wmv);;" - "All Files (*)" - ) - ) - if inputFile: - self.fileEdit.setText(Utilities.toNativeSeparators(inputFile)) - @pyqtSlot(int) def on_embeddingComboBox_currentIndexChanged(self, index): """ Private slot to handle the selection of an embedding method. - @param index index of the selected entry (integer) + @param index index of the selected entry + @type int """ if index in [2, 3]: self.encryptCheckBox.setChecked(False) @@ -124,23 +119,22 @@ """ Private slot to encode the contents of the given file. """ - filepath = Utilities.toNativeSeparators(self.fileEdit.text().strip()) + filepath = self.filePicker.text().strip() mime = mimetypes.guess_type(filepath, strict=False) mimetype = mime if mime is not None else self.__askMime() if os.path.getsize(filepath) // 1024 // 1024 >= 1: - res = E5MessageBox.warning( + res = EricMessageBox.warning( self, self.tr("Data URI Encoder"), self.tr( """The file size is > 1 Megabyte. Encoding this will""" """ take some time depending on your CPU processing""" """ power!"""), - E5MessageBox.StandardButtons( - E5MessageBox.Cancel | - E5MessageBox.Ok), - E5MessageBox.Cancel) - if res == E5MessageBox.Cancel: + EricMessageBox.Cancel | + EricMessageBox.Ok, + EricMessageBox.Cancel) + if res == EricMessageBox.Cancel: return try: @@ -153,7 +147,7 @@ base64.b64encode(f.read()).decode() ) except OSError as err: - E5MessageBox.critical( + EricMessageBox.critical( self, self.tr("Data URI Encoder"), self.tr( @@ -161,23 +155,21 @@ """<p>Reason: {1}</p>""").format(filepath, str(err))) return if self.embeddingComboBox.currentIndex() == 1: # Python 3 - output = Python3Template.format( + output = DataUriTemplates["Python3"].format( getpass.getuser(), datetime.datetime.now().isoformat().split('.')[0], output) elif self.embeddingComboBox.currentIndex() == 2: # CSS - output = ('html, body {{ margin:0; padding:0; background: url({0})' - ' no-repeat center center fixed; background-size:cover' - ' }}'.format(output)) + output = DataUriTemplates["CSS"].format(output) elif self.embeddingComboBox.currentIndex() == 3: # HTML - output = '<img src={0} alt="{1}" title="{1}"/>'.format( + output = DataUriTemplates["HTML"].format( output, os.path.basename(filepath)) elif self.embeddingComboBox.currentIndex() == 4: # JS - output = 'var embedded_file = window.atob({0}); '.format(output) + output = DataUriTemplates["JavaScript"].format(output) elif self.embeddingComboBox.currentIndex() == 5: # QML - output = 'Image {{ source: {0} }} '.format(output) + output = DataUriTemplates["QML"].format(output) if self.encryptCheckBox.isChecked(): - output = output.encode('rot_13') + output = codecs.encode(output, 'rot_13') self.outputTextEdit.setPlainText(output) @@ -195,14 +187,16 @@ """ enable = bool(self.outputTextEdit.toPlainText()) self.copyButton.setEnabled(enable) - self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Ok).setEnabled(enable) @pyqtSlot(str) - def on_fileEdit_textChanged(self, txt): + def on_filePicker_textChanged(self, txt): """ Private slot to handle the editing of the file name. - @param txt current file name (string) + @param txt current file name + @type str """ self.encodeButton.setEnabled(bool(txt) and os.path.isfile(txt)) @@ -210,7 +204,8 @@ """ Private method to get the mime type from the user. - @return entered mime type (string) + @return entered mime type + @rtype str """ mimetypesList = [""] + list(sorted( set(mimetypes.types_map.values()).union( @@ -234,6 +229,7 @@ """ Public method to get the code. - @return generated code (string) + @return generated code + @rtype str """ return self.outputTextEdit.toPlainText()
--- a/WizardDataUriEncoder/DataUriEncoderWizardDialog.ui Wed Jun 02 17:20:11 2021 +0200 +++ b/WizardDataUriEncoder/DataUriEncoderWizardDialog.ui Wed Jun 02 17:30:01 2021 +0200 @@ -17,7 +17,7 @@ <bool>true</bool> </property> <layout class="QGridLayout" name="gridLayout"> - <item row="0" column="0" colspan="3"> + <item row="0" column="0" colspan="2"> <widget class="QLabel" name="label"> <property name="text"> <string><b>Encode file as plain text string</b></string> @@ -32,20 +32,22 @@ </widget> </item> <item row="1" column="1"> - <widget class="QLineEdit" name="fileEdit"> + <widget class="EricPathPicker" name="filePicker" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="focusPolicy"> + <enum>Qt::StrongFocus</enum> + </property> <property name="toolTip"> <string>Enter the file to be encoded</string> </property> </widget> </item> - <item row="1" column="2"> - <widget class="QToolButton" name="fileButton"> - <property name="toolTip"> - <string>Select the file to be encoded</string> - </property> - </widget> - </item> - <item row="2" column="0" colspan="3"> + <item row="2" column="0" colspan="2"> <layout class="QHBoxLayout" name="horizontalLayout"> <item> <widget class="QCheckBox" name="dataCheckBox"> @@ -76,14 +78,20 @@ </property> </widget> </item> - <item row="3" column="1" colspan="2"> + <item row="3" column="1"> <widget class="QComboBox" name="embeddingComboBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="toolTip"> <string>Select the embedding method</string> </property> </widget> </item> - <item row="4" column="0" colspan="3"> + <item row="4" column="0" colspan="2"> <layout class="QHBoxLayout" name="horizontalLayout_2"> <item> <spacer name="horizontalSpacer_2"> @@ -123,7 +131,7 @@ </item> </layout> </item> - <item row="5" column="0" colspan="3"> + <item row="5" column="0" colspan="2"> <widget class="Line" name="line"> <property name="lineWidth"> <number>2</number> @@ -133,21 +141,21 @@ </property> </widget> </item> - <item row="6" column="0" colspan="3"> + <item row="6" column="0" colspan="2"> <widget class="QLabel" name="label_4"> <property name="text"> <string>Base64 String Output:</string> </property> </widget> </item> - <item row="7" column="0" colspan="3"> + <item row="7" column="0" colspan="2"> <widget class="QPlainTextEdit" name="outputTextEdit"> <property name="readOnly"> <bool>true</bool> </property> </widget> </item> - <item row="8" column="0" colspan="3"> + <item row="8" column="0" colspan="2"> <layout class="QHBoxLayout" name="horizontalLayout_3"> <item> <widget class="QPushButton" name="copyButton"> @@ -177,7 +185,7 @@ </item> </layout> </item> - <item row="9" column="0" colspan="3"> + <item row="9" column="0" colspan="2"> <widget class="QDialogButtonBox" name="buttonBox"> <property name="orientation"> <enum>Qt::Horizontal</enum> @@ -189,16 +197,22 @@ </item> </layout> </widget> + <customwidgets> + <customwidget> + <class>EricPathPicker</class> + <extends>QWidget</extends> + <header>EricWidgets/EricPathPicker.h</header> + <container>1</container> + </customwidget> + </customwidgets> <tabstops> - <tabstop>fileEdit</tabstop> - <tabstop>fileButton</tabstop> + <tabstop>filePicker</tabstop> <tabstop>dataCheckBox</tabstop> <tabstop>encryptCheckBox</tabstop> <tabstop>embeddingComboBox</tabstop> <tabstop>encodeButton</tabstop> <tabstop>outputTextEdit</tabstop> <tabstop>copyButton</tabstop> - <tabstop>buttonBox</tabstop> </tabstops> <resources/> <connections>
--- a/WizardDataUriEncoder/Documentation/source/Plugin_Wizard_DataUriEncoder.PluginWizardDataUriEncoder.html Wed Jun 02 17:20:11 2021 +0200 +++ b/WizardDataUriEncoder/Documentation/source/Plugin_Wizard_DataUriEncoder.PluginWizardDataUriEncoder.html Wed Jun 02 17:30:01 2021 +0200 @@ -112,9 +112,9 @@ </p> <dl> -<dt><i>ui</i></dt> +<dt><i>ui</i> (UserInterface)</dt> <dd> -reference to the user interface object (UI.UserInterface) +reference to the user interface object </dd> </dl> <a NAME="WizardDataUriEncoderPlugin.__handle" ID="WizardDataUriEncoderPlugin.__handle"></a> @@ -155,7 +155,13 @@ <dl> <dt>Return:</dt> <dd> -tuple of None and activation status (boolean) +tuple of None and activation status +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +(None, bool) </dd> </dl> <a NAME="WizardDataUriEncoderPlugin.deactivate" ID="WizardDataUriEncoderPlugin.deactivate"></a>
--- a/WizardDataUriEncoder/Documentation/source/Plugin_Wizard_DataUriEncoder.WizardDataUriEncoder.DataUriEncoderWizardDialog.html Wed Jun 02 17:20:11 2021 +0200 +++ b/WizardDataUriEncoder/Documentation/source/Plugin_Wizard_DataUriEncoder.WizardDataUriEncoder.DataUriEncoderWizardDialog.html Wed Jun 02 17:30:01 2021 +0200 @@ -28,7 +28,7 @@ <h3>Global Attributes</h3> <table> -<tr><td>Python3Template</td></tr> +<tr><td>DataUriTemplates</td></tr> </table> <h3>Classes</h3> @@ -77,10 +77,6 @@ <td>Private method to get the mime type from the user.</td> </tr> <tr> -<td><a href="#DataUriEncoderWizardDialog.__getStartDir">__getStartDir</a></td> -<td>Private method to get the start directory for selection dialogs.</td> -</tr> -<tr> <td><a href="#DataUriEncoderWizardDialog.getCode">getCode</a></td> <td>Public method to get the code.</td> </tr> @@ -97,11 +93,7 @@ <td>Private slot to encode the contents of the given file.</td> </tr> <tr> -<td><a href="#DataUriEncoderWizardDialog.on_fileButton_clicked">on_fileButton_clicked</a></td> -<td>Private slot to select the file to be encoded via a selection dialog.</td> -</tr> -<tr> -<td><a href="#DataUriEncoderWizardDialog.on_fileEdit_textChanged">on_fileEdit_textChanged</a></td> +<td><a href="#DataUriEncoderWizardDialog.on_filePicker_textChanged">on_filePicker_textChanged</a></td> <td>Private slot to handle the editing of the file name.</td> </tr> <tr> @@ -124,9 +116,9 @@ </p> <dl> -<dt><i>parent</i></dt> +<dt><i>parent</i> (QWidget)</dt> <dd> -reference to the parent widget (QWidget) +reference to the parent widget </dd> </dl> <a NAME="DataUriEncoderWizardDialog.__askMime" ID="DataUriEncoderWizardDialog.__askMime"></a> @@ -139,20 +131,13 @@ <dl> <dt>Return:</dt> <dd> -entered mime type (string) +entered mime type </dd> </dl> -<a NAME="DataUriEncoderWizardDialog.__getStartDir" ID="DataUriEncoderWizardDialog.__getStartDir"></a> -<h4>DataUriEncoderWizardDialog.__getStartDir</h4> -<b>__getStartDir</b>(<i></i>) - -<p> - Private method to get the start directory for selection dialogs. -</p> <dl> -<dt>Return:</dt> +<dt>Return Type:</dt> <dd> -start directory (string) +str </dd> </dl> <a NAME="DataUriEncoderWizardDialog.getCode" ID="DataUriEncoderWizardDialog.getCode"></a> @@ -165,7 +150,13 @@ <dl> <dt>Return:</dt> <dd> -generated code (string) +generated code +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +str </dd> </dl> <a NAME="DataUriEncoderWizardDialog.on_copyButton_clicked" ID="DataUriEncoderWizardDialog.on_copyButton_clicked"></a> @@ -184,9 +175,9 @@ </p> <dl> -<dt><i>index</i></dt> +<dt><i>index</i> (int)</dt> <dd> -index of the selected entry (integer) +index of the selected entry </dd> </dl> <a NAME="DataUriEncoderWizardDialog.on_encodeButton_clicked" ID="DataUriEncoderWizardDialog.on_encodeButton_clicked"></a> @@ -196,25 +187,18 @@ <p> Private slot to encode the contents of the given file. </p> -<a NAME="DataUriEncoderWizardDialog.on_fileButton_clicked" ID="DataUriEncoderWizardDialog.on_fileButton_clicked"></a> -<h4>DataUriEncoderWizardDialog.on_fileButton_clicked</h4> -<b>on_fileButton_clicked</b>(<i></i>) - -<p> - Private slot to select the file to be encoded via a selection dialog. -</p> -<a NAME="DataUriEncoderWizardDialog.on_fileEdit_textChanged" ID="DataUriEncoderWizardDialog.on_fileEdit_textChanged"></a> -<h4>DataUriEncoderWizardDialog.on_fileEdit_textChanged</h4> -<b>on_fileEdit_textChanged</b>(<i>txt</i>) +<a NAME="DataUriEncoderWizardDialog.on_filePicker_textChanged" ID="DataUriEncoderWizardDialog.on_filePicker_textChanged"></a> +<h4>DataUriEncoderWizardDialog.on_filePicker_textChanged</h4> +<b>on_filePicker_textChanged</b>(<i>txt</i>) <p> Private slot to handle the editing of the file name. </p> <dl> -<dt><i>txt</i></dt> +<dt><i>txt</i> (str)</dt> <dd> -current file name (string) +current file name </dd> </dl> <a NAME="DataUriEncoderWizardDialog.on_outputTextEdit_textChanged" ID="DataUriEncoderWizardDialog.on_outputTextEdit_textChanged"></a>
--- a/WizardDataUriEncoder/i18n/datauriencoder_de.ts Wed Jun 02 17:20:11 2021 +0200 +++ b/WizardDataUriEncoder/i18n/datauriencoder_de.ts Wed Jun 02 17:30:01 2021 +0200 @@ -1,160 +1,155 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.0" language="de_DE"> -<context> +<TS version="2.1" language="de_DE"> + <context> <name>DataUriEncoderWizardDialog</name> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="235"/> - <source>Data URI Encoder</source> - <translation>Date URI Kodierer</translation> - </message> - <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="23"/> - <source><b>Encode file as plain text string</b></source> - <translation><b>Kodiere Datei als normaler Text</b></translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <location filename="../DataUriEncoderWizardDialog.py" line="219" /> + <location filename="../DataUriEncoderWizardDialog.py" line="152" /> + <location filename="../DataUriEncoderWizardDialog.py" line="129" /> + <location filename="../DataUriEncoderWizardDialog.py" line="79" /> + <source>Data URI Encoder</source> + <translation>Date URI Kodierer</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="30"/> - <source>File to Encode:</source> - <translation>Zu kodierende Datei:</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="81" /> + <source>Audio Files (*.flac *.mp3 *.ogg *.wav *.weba *.wma);;Image Files (*.gif *.ico *.jpg *.png *.svg *.tif *.webp *.xpm);;Video Files (*.3gp *.avi *.flv *.mp4 *.ogv *.webm *.wmv);;All Files (*)</source> + <translation>Audiodateien (*.flac *.mp3 *.ogg *.wav *.weba *.wma);;Bilddateien (*.gif *.ico *.jpg *.png *.svg *.tif *.webp *.xpm);;Videodateien (*.3gp *.avi *.flv *.mp4 *.ogv *.webm *.wmv);;Alle Dateien (*)</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="37"/> - <source>Enter the file to be encoded</source> - <translation>Gib die zu kodierende Datei ein</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="94" /> + <source>Do not generate code</source> + <translation>Kein Code generieren</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="44"/> - <source>Select the file to be encoded</source> - <translation>Wähle die zu kodierende Datei aus</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="95" /> + <source>Generate Python3 embedding code</source> + <translation>Generiere Python3 Code</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="53"/> - <source>Use "data:type/subtype;base64,..."</source> - <translation>Verwende "data:type/subtype;base64,..."</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="96" /> + <source>Generate CSS embedding code</source> + <translation>Generiere CSS Code</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="63"/> - <source>Select to encrypt the output with 'rot_13' (use "string".decode(rot_13) to decrypt it)</source> - <translation>Auswählen, um das Ergebnis mit 'rot_13' zu verschlüsseln (verwende "string".decode(rot_13) zur Entschlüsselung)</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="97" /> + <source>Generate HTML embedding code</source> + <translation>Generiere HTML Code</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="66"/> - <source>Use basic Caesar Cipher (rot_13)</source> - <translation>Verwende Cäsar Verschlüsselung (rot_13)</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="98" /> + <source>Generate JavaScript embedding code</source> + <translation>Generiere JavaScript Code</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="75"/> - <source>Embedding Template Code:</source> - <translation>Vorlagen zum Einbetten:</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="99" /> + <source>Generate QML embedding code</source> + <translation>Generiere QML Code</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="82"/> - <source>Select the embedding method</source> - <translation>Wähle die Method zur Einbettung</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="130" /> + <source>The file size is > 1 Megabyte. Encoding this will take some time depending on your CPU processing power!</source> + <translation>Die Datei ist größer als 1 Megabyte. Die Kodierung kann abhängig von der CPU Leistung einige Zeit dauern!</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="107"/> - <source>Encode BASE64</source> - <translation>Kodiere BASE64</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="153" /> + <source><p>The file <b>{0}</b> could not be read.</p><p>Reason: {1}</p></source> + <translation><p>Die Datei <b>{0}</b> konnte nicht gelesen werden.</p><p>Ursache: {1}</p></translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="139"/> - <source>Base64 String Output:</source> - <translation>Base64 Textausgabe:</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="220" /> + <source>Enter a mime type:</source> + <translation>Gib einen Mime Typen ein:</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="158"/> - <source>Press to copy the encoded output to the system clipboard</source> - <translation>Drücken, um die kodierte Ausgabe in die Zwischenablage zu kopieren</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source><b>Encode file as plain text string</b></source> + <translation><b>Kodiere Datei als normaler Text</b></translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="161"/> - <source>Copy encoded output to Clipboard</source> - <translation>Kopiere kodierte Ausgabe in Zwischenablage</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>File to Encode:</source> + <translation>Zu kodierende Datei:</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="77"/> - <source>Do not generate code</source> - <translation>Kein Code generieren</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Enter the file to be encoded</source> + <translation>Gib die zu kodierende Datei ein</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="77"/> - <source>Generate CSS embed code</source> - <translation>Generiere CSS Code</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Use "data:type/subtype;base64,..."</source> + <translation>Verwende "data:type/subtype;base64,..."</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="77"/> - <source>Generate Python3 embed code</source> - <translation>Generiere Python3 Code</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Select to encrypt the output with 'rot_13' (use "string".decode(rot_13) to decrypt it)</source> + <translation>Auswählen, um das Ergebnis mit 'rot_13' zu verschlüsseln (verwende "string".decode(rot_13) zur Entschlüsselung)</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="77"/> - <source>Generate Python2 embed code</source> - <translation>Generiere Python2 Code</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Use basic Caesar Cipher (rot_13)</source> + <translation>Verwende Cäsar Verschlüsselung (rot_13)</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="77"/> - <source>Generate HTML embed code</source> - <translation>Generiere HTML Code</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Embedding Template Code:</source> + <translation>Vorlagen zum Einbetten:</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="77"/> - <source>Generate JS embed code</source> - <translation>Generiere JS Code</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Select the embedding method</source> + <translation>Wähle die Method zur Einbettung</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="77"/> - <source>Generate QML embed code</source> - <translation>Generiere QML Code</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Encode BASE64</source> + <translation>Kodiere BASE64</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="103"/> - <source>Audio Files (*.flac *.mp3 *.ogg *.wav *.weba *.wma);;Image Files (*.gif *.ico *.jpg *.png *.svg *.tif *.webp *.xpm);;Video Files (*.3gp *.avi *.flv *.mp4 *.ogv *.webm *.wmv);;All Files (*)</source> - <translation>Audiodateien (*.flac *.mp3 *.ogg *.wav *.weba *.wma);;Bilddateien (*.gif *.ico *.jpg *.png *.svg *.tif *.webp *.xpm);;Videodateien (*.3gp *.avi *.flv *.mp4 *.ogv *.webm *.wmv);;Alle Dateien (*)</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Base64 String Output:</source> + <translation>Base64 Textausgabe:</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="142"/> - <source>The file size is > 1 Megabyte. Encoding this will take some time depending on your CPU processing power!</source> - <translation>Die Datei ist größer als 1 Megabyte. Die Kodierung kann abhängig von der CPU Leistung einige Zeit dauern!</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Press to copy the encoded output to the system clipboard</source> + <translation>Drücken, um die kodierte Ausgabe in die Zwischenablage zu kopieren</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="165"/> - <source><p>The file <b>{0}</b> could not be read.</p><p>Reason: {1}</p></source> - <translation><p>Die Datei <b>{0}</b> konnte nicht gelesen werden.</p><p>Ursache: {1}</p></translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Copy encoded output to Clipboard</source> + <translation>Kopiere kodierte Ausgabe in Zwischenablage</translation> </message> - <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="235"/> - <source>Enter a mime type:</source> - <translation>Gib einen Mime Typen ein:</translation> - </message> -</context> -<context> + </context> + <context> <name>WizardDataUriEncoderPlugin</name> <message> - <location filename="../../PluginWizardDataUriEncoder.py" line="113"/> - <source>Base64 Data Uri Encoder Wizard</source> - <translation>Base64 Data URI Kodierungsassistent</translation> + <location filename="../../PluginWizardDataUriEncoder.py" line="108" /> + <location filename="../../PluginWizardDataUriEncoder.py" line="104" /> + <source>Base64 Data Uri Encoder Wizard</source> + <translation>Base64 Data URI Kodierungsassistent</translation> </message> <message> - <location filename="../../PluginWizardDataUriEncoder.py" line="108"/> - <source>Base&64 Data Uri Encoder Wizard...</source> - <translation>Base&64 Data URI Kodierungsassistent...</translation> + <location filename="../../PluginWizardDataUriEncoder.py" line="105" /> + <source>Base&64 Data Uri Encoder Wizard...</source> + <translation>Base&64 Data URI Kodierungsassistent...</translation> </message> <message> - <location filename="../../PluginWizardDataUriEncoder.py" line="115"/> - <source><b>Base64 Data Uri Encoder Wizard</b><p>This wizard opens a dialog for entering all the parameters needed to create code for a base64 encoded data URI.</p></source> - <translation><b>Base64 Data URI Kodierungsassistent</b><p>Dieser Assistent öffnet einen Dialog zur Eingabe aller Parameter, um Code für einen base64 kodierten Data URI zu erzeugen.</p></translation> + <location filename="../../PluginWizardDataUriEncoder.py" line="110" /> + <source><b>Base64 Data Uri Encoder Wizard</b><p>This wizard opens a dialog for entering all the parameters needed to create code for a base64 encoded data URI.</p></source> + <translation><b>Base64 Data URI Kodierungsassistent</b><p>Dieser Assistent öffnet einen Dialog zur Eingabe aller Parameter, um Code für einen base64 kodierten Data URI zu erzeugen.</p></translation> </message> <message> - <location filename="../../PluginWizardDataUriEncoder.py" line="139"/> - <source>No current editor</source> - <translation>Kein aktueller Editor</translation> + <location filename="../../PluginWizardDataUriEncoder.py" line="136" /> + <source>No current editor</source> + <translation>Kein aktueller Editor</translation> </message> <message> - <location filename="../../PluginWizardDataUriEncoder.py" line="139"/> - <source>Please open or create a file first.</source> - <translation>Bitte öffne zuerst einen Editor.</translation> + <location filename="../../PluginWizardDataUriEncoder.py" line="137" /> + <source>Please open or create a file first.</source> + <translation>Bitte öffne zuerst einen Editor.</translation> </message> -</context> + </context> </TS>
--- a/WizardDataUriEncoder/i18n/datauriencoder_en.ts Wed Jun 02 17:20:11 2021 +0200 +++ b/WizardDataUriEncoder/i18n/datauriencoder_en.ts Wed Jun 02 17:30:01 2021 +0200 @@ -1,159 +1,155 @@ <?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS><TS version="2.0" language="en_US" sourcelanguage=""> -<context> +<!DOCTYPE TS> +<TS version="2.0" language="en_US" sourcelanguage=""> + <context> <name>DataUriEncoderWizardDialog</name> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="235"/> - <source>Data URI Encoder</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="23"/> - <source><b>Encode file as plain text string</b></source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <location filename="../DataUriEncoderWizardDialog.py" line="219" /> + <location filename="../DataUriEncoderWizardDialog.py" line="152" /> + <location filename="../DataUriEncoderWizardDialog.py" line="129" /> + <location filename="../DataUriEncoderWizardDialog.py" line="79" /> + <source>Data URI Encoder</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="30"/> - <source>File to Encode:</source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.py" line="81" /> + <source>Audio Files (*.flac *.mp3 *.ogg *.wav *.weba *.wma);;Image Files (*.gif *.ico *.jpg *.png *.svg *.tif *.webp *.xpm);;Video Files (*.3gp *.avi *.flv *.mp4 *.ogv *.webm *.wmv);;All Files (*)</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="37"/> - <source>Enter the file to be encoded</source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.py" line="94" /> + <source>Do not generate code</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="44"/> - <source>Select the file to be encoded</source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.py" line="95" /> + <source>Generate Python3 embedding code</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="53"/> - <source>Use "data:type/subtype;base64,..."</source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.py" line="96" /> + <source>Generate CSS embedding code</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="63"/> - <source>Select to encrypt the output with 'rot_13' (use "string".decode(rot_13) to decrypt it)</source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.py" line="97" /> + <source>Generate HTML embedding code</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="66"/> - <source>Use basic Caesar Cipher (rot_13)</source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.py" line="98" /> + <source>Generate JavaScript embedding code</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="75"/> - <source>Embedding Template Code:</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="82"/> - <source>Select the embedding method</source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.py" line="99" /> + <source>Generate QML embedding code</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="107"/> - <source>Encode BASE64</source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.py" line="130" /> + <source>The file size is > 1 Megabyte. Encoding this will take some time depending on your CPU processing power!</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="139"/> - <source>Base64 String Output:</source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.py" line="153" /> + <source><p>The file <b>{0}</b> could not be read.</p><p>Reason: {1}</p></source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="158"/> - <source>Press to copy the encoded output to the system clipboard</source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.py" line="220" /> + <source>Enter a mime type:</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="161"/> - <source>Copy encoded output to Clipboard</source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source><b>Encode file as plain text string</b></source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="77"/> - <source>Do not generate code</source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>File to Encode:</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="77"/> - <source>Generate CSS embed code</source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Enter the file to be encoded</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="77"/> - <source>Generate Python3 embed code</source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Use "data:type/subtype;base64,..."</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="77"/> - <source>Generate Python2 embed code</source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Select to encrypt the output with 'rot_13' (use "string".decode(rot_13) to decrypt it)</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="77"/> - <source>Generate HTML embed code</source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Use basic Caesar Cipher (rot_13)</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="77"/> - <source>Generate JS embed code</source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Embedding Template Code:</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="77"/> - <source>Generate QML embed code</source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Select the embedding method</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="103"/> - <source>Audio Files (*.flac *.mp3 *.ogg *.wav *.weba *.wma);;Image Files (*.gif *.ico *.jpg *.png *.svg *.tif *.webp *.xpm);;Video Files (*.3gp *.avi *.flv *.mp4 *.ogv *.webm *.wmv);;All Files (*)</source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Encode BASE64</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="142"/> - <source>The file size is > 1 Megabyte. Encoding this will take some time depending on your CPU processing power!</source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Base64 String Output:</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="165"/> - <source><p>The file <b>{0}</b> could not be read.</p><p>Reason: {1}</p></source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Press to copy the encoded output to the system clipboard</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="235"/> - <source>Enter a mime type:</source> - <translation type="unfinished"></translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Copy encoded output to Clipboard</source> + <translation type="unfinished" /> </message> -</context> -<context> + </context> + <context> <name>WizardDataUriEncoderPlugin</name> <message> - <location filename="../../PluginWizardDataUriEncoder.py" line="113"/> - <source>Base64 Data Uri Encoder Wizard</source> - <translation type="unfinished"></translation> + <location filename="../../PluginWizardDataUriEncoder.py" line="108" /> + <location filename="../../PluginWizardDataUriEncoder.py" line="104" /> + <source>Base64 Data Uri Encoder Wizard</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../PluginWizardDataUriEncoder.py" line="108"/> - <source>Base&64 Data Uri Encoder Wizard...</source> - <translation type="unfinished"></translation> + <location filename="../../PluginWizardDataUriEncoder.py" line="105" /> + <source>Base&64 Data Uri Encoder Wizard...</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../PluginWizardDataUriEncoder.py" line="115"/> - <source><b>Base64 Data Uri Encoder Wizard</b><p>This wizard opens a dialog for entering all the parameters needed to create code for a base64 encoded data URI.</p></source> - <translation type="unfinished"></translation> + <location filename="../../PluginWizardDataUriEncoder.py" line="110" /> + <source><b>Base64 Data Uri Encoder Wizard</b><p>This wizard opens a dialog for entering all the parameters needed to create code for a base64 encoded data URI.</p></source> + <translation type="unfinished" /> </message> <message> - <location filename="../../PluginWizardDataUriEncoder.py" line="139"/> - <source>No current editor</source> - <translation type="unfinished"></translation> + <location filename="../../PluginWizardDataUriEncoder.py" line="136" /> + <source>No current editor</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../PluginWizardDataUriEncoder.py" line="139"/> - <source>Please open or create a file first.</source> - <translation type="unfinished"></translation> + <location filename="../../PluginWizardDataUriEncoder.py" line="137" /> + <source>Please open or create a file first.</source> + <translation type="unfinished" /> </message> -</context> + </context> </TS>
--- a/WizardDataUriEncoder/i18n/datauriencoder_es.ts Wed Jun 02 17:20:11 2021 +0200 +++ b/WizardDataUriEncoder/i18n/datauriencoder_es.ts Wed Jun 02 17:30:01 2021 +0200 @@ -1,160 +1,183 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0" language="es_ES"> -<context> + <context> <name>DataUriEncoderWizardDialog</name> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="235"/> - <source>Data URI Encoder</source> - <translation>Codificador Datos URI</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <location filename="../DataUriEncoderWizardDialog.py" line="219" /> + <location filename="../DataUriEncoderWizardDialog.py" line="152" /> + <location filename="../DataUriEncoderWizardDialog.py" line="129" /> + <location filename="../DataUriEncoderWizardDialog.py" line="79" /> + <source>Data URI Encoder</source> + <translation>Codificador Datos URI</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="23"/> - <source><b>Encode file as plain text string</b></source> - <translation><b>Codificar archivo como cadena de texto plano</b></translation> - </message> - <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="30"/> - <source>File to Encode:</source> - <translation>Archivo a Codificar:</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="81" /> + <source>Audio Files (*.flac *.mp3 *.ogg *.wav *.weba *.wma);;Image Files (*.gif *.ico *.jpg *.png *.svg *.tif *.webp *.xpm);;Video Files (*.3gp *.avi *.flv *.mp4 *.ogv *.webm *.wmv);;All Files (*)</source> + <translation>Archivos de Audio (*.flac *.mp3 *.ogg *.wav *.weba *.wma);;Archivos de Imagen (*.gif *.ico *.jpg *.png *.svg *.tif *.webp *.xpm);;Archivos de Video (*.3gp *.avi *.flv *.mp4 *.ogv *.webm *.wmv);;Todos los Archivos (*)</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="37"/> - <source>Enter the file to be encoded</source> - <translation>Introducir el archivo a codificar</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="94" /> + <source>Do not generate code</source> + <translation>No generar código</translation> + </message> + <message> + <location filename="../DataUriEncoderWizardDialog.py" line="95" /> + <source>Generate Python3 embedding code</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="44"/> - <source>Select the file to be encoded</source> - <translation>Seleccionar el archivo a codificar</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="96" /> + <source>Generate CSS embedding code</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="53"/> - <source>Use "data:type/subtype;base64,..."</source> - <translation>Usar "data:type/subtype;base64,..."</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="97" /> + <source>Generate HTML embedding code</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="63"/> - <source>Select to encrypt the output with 'rot_13' (use "string".decode(rot_13) to decrypt it)</source> - <translation>Seleccionar para encriptar el output con 'rot_13' (utilizar "string".decode(rot_13) para desencriptarlo)</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="98" /> + <source>Generate JavaScript embedding code</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="66"/> - <source>Use basic Caesar Cipher (rot_13)</source> - <translation>Utilizar Cifrado básico Cesar Cipher (rot_13)</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="99" /> + <source>Generate QML embedding code</source> + <translation type="unfinished" /> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="75"/> - <source>Embedding Template Code:</source> - <translation>Plantilla de Código Incrustado:</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="130" /> + <source>The file size is > 1 Megabyte. Encoding this will take some time depending on your CPU processing power!</source> + <translation>El tamaño de archivo es > 1 Megabyte. Codificarlo puede llevar algún tiempo dependiendo de la capacidad de procesamiento de la CPU!</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="82"/> - <source>Select the embedding method</source> - <translation>Seleccionar el método de incrustación</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="153" /> + <source><p>The file <b>{0}</b> could not be read.</p><p>Reason: {1}</p></source> + <translation><p>No se ha podido leer el archivo <b>{0}</b>.</p><p>Razón: {1}</p></translation> + </message> + <message> + <location filename="../DataUriEncoderWizardDialog.py" line="220" /> + <source>Enter a mime type:</source> + <translation>Introducir un tipo mime:</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="107"/> - <source>Encode BASE64</source> - <translation>Codificar BASE64</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source><b>Encode file as plain text string</b></source> + <translation><b>Codificar archivo como cadena de texto plano</b></translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="139"/> - <source>Base64 String Output:</source> - <translation>Cadena de Output en Base64:</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>File to Encode:</source> + <translation>Archivo a Codificar:</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="158"/> - <source>Press to copy the encoded output to the system clipboard</source> - <translation>Pulsar para copiar el output codificado al portapapeles de sistema</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Enter the file to be encoded</source> + <translation>Introducir el archivo a codificar</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.ui" line="161"/> - <source>Copy encoded output to Clipboard</source> - <translation>Copiar output codificado al Portapapeles</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Use "data:type/subtype;base64,..."</source> + <translation>Usar "data:type/subtype;base64,..."</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="77"/> - <source>Do not generate code</source> - <translation>No generar código</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Select to encrypt the output with 'rot_13' (use "string".decode(rot_13) to decrypt it)</source> + <translation>Seleccionar para encriptar el output con 'rot_13' (utilizar "string".decode(rot_13) para desencriptarlo)</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="77"/> - <source>Generate CSS embed code</source> - <translation>Generar código incrustado CSS</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Use basic Caesar Cipher (rot_13)</source> + <translation>Utilizar Cifrado básico Cesar Cipher (rot_13)</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="77"/> - <source>Generate Python3 embed code</source> - <translation>Generar código incrustado Python3</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Embedding Template Code:</source> + <translation>Plantilla de Código Incrustado:</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="77"/> - <source>Generate Python2 embed code</source> - <translation>Generar código incrustado Python2</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Select the embedding method</source> + <translation>Seleccionar el método de incrustación</translation> + </message> + <message> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Encode BASE64</source> + <translation>Codificar BASE64</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="77"/> - <source>Generate HTML embed code</source> - <translation>Generar código incrustado HTML</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Base64 String Output:</source> + <translation>Cadena de Output en Base64:</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="77"/> - <source>Generate JS embed code</source> - <translation>Generar código incrustado JS</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Press to copy the encoded output to the system clipboard</source> + <translation>Pulsar para copiar el output codificado al portapapeles de sistema</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="77"/> - <source>Generate QML embed code</source> - <translation>Generar código incrustado QML</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Copy encoded output to Clipboard</source> + <translation>Copiar output codificado al Portapapeles</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="103"/> - <source>Audio Files (*.flac *.mp3 *.ogg *.wav *.weba *.wma);;Image Files (*.gif *.ico *.jpg *.png *.svg *.tif *.webp *.xpm);;Video Files (*.3gp *.avi *.flv *.mp4 *.ogv *.webm *.wmv);;All Files (*)</source> - <translation>Archivos de Audio (*.flac *.mp3 *.ogg *.wav *.weba *.wma);;Archivos de Imagen (*.gif *.ico *.jpg *.png *.svg *.tif *.webp *.xpm);;Archivos de Video (*.3gp *.avi *.flv *.mp4 *.ogv *.webm *.wmv);;Todos los Archivos (*)</translation> + <source>Select the file to be encoded</source> + <translation type="vanished">Seleccionar el archivo a codificar</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="142"/> - <source>The file size is > 1 Megabyte. Encoding this will take some time depending on your CPU processing power!</source> - <translation>El tamaño de archivo es > 1 Megabyte. Codificarlo puede llevar algún tiempo dependiendo de la capacidad de procesamiento de la CPU!</translation> + <source>Generate CSS embed code</source> + <translation type="vanished">Generar código incrustado CSS</translation> + </message> + <message> + <source>Generate Python3 embed code</source> + <translation type="vanished">Generar código incrustado Python3</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="165"/> - <source><p>The file <b>{0}</b> could not be read.</p><p>Reason: {1}</p></source> - <translation><p>No se ha podido leer el archivo <b>{0}</b>.</p><p>Razón: {1}</p></translation> + <source>Generate Python2 embed code</source> + <translation type="vanished">Generar código incrustado Python2</translation> </message> <message> - <location filename="../../WizardDataUriEncoder/DataUriEncoderWizardDialog.py" line="235"/> - <source>Enter a mime type:</source> - <translation>Introducir un tipo mime:</translation> + <source>Generate HTML embed code</source> + <translation type="vanished">Generar código incrustado HTML</translation> </message> -</context> -<context> - <name>WizardDataUriEncoderPlugin</name> <message> - <location filename="../../PluginWizardDataUriEncoder.py" line="113"/> - <source>Base64 Data Uri Encoder Wizard</source> - <translation>Asistente de codificación de datos Uri en Base64</translation> + <source>Generate JS embed code</source> + <translation type="vanished">Generar código incrustado JS</translation> </message> <message> - <location filename="../../PluginWizardDataUriEncoder.py" line="108"/> - <source>Base&64 Data Uri Encoder Wizard...</source> - <translation>Asistente de codificación de datos Uri en Base&64...</translation> + <source>Generate QML embed code</source> + <translation type="vanished">Generar código incrustado QML</translation> </message> + </context> + <context> + <name>WizardDataUriEncoderPlugin</name> <message> - <location filename="../../PluginWizardDataUriEncoder.py" line="115"/> - <source><b>Base64 Data Uri Encoder Wizard</b><p>This wizard opens a dialog for entering all the parameters needed to create code for a base64 encoded data URI.</p></source> - <translation><b>Asistente de codificación de datos Uri en Base64</b><p>Este asistente abre un diálogo para la introducción de todos los parémetros necesarios para crear código para datos URI codificados en base64.</p></translation> + <location filename="../../PluginWizardDataUriEncoder.py" line="108" /> + <location filename="../../PluginWizardDataUriEncoder.py" line="104" /> + <source>Base64 Data Uri Encoder Wizard</source> + <translation>Asistente de codificación de datos Uri en Base64</translation> </message> <message> - <location filename="../../PluginWizardDataUriEncoder.py" line="139"/> - <source>No current editor</source> - <translation>Sin editor actual</translation> + <location filename="../../PluginWizardDataUriEncoder.py" line="105" /> + <source>Base&64 Data Uri Encoder Wizard...</source> + <translation>Asistente de codificación de datos Uri en Base&64...</translation> + </message> + <message> + <location filename="../../PluginWizardDataUriEncoder.py" line="110" /> + <source><b>Base64 Data Uri Encoder Wizard</b><p>This wizard opens a dialog for entering all the parameters needed to create code for a base64 encoded data URI.</p></source> + <translation><b>Asistente de codificación de datos Uri en Base64</b><p>Este asistente abre un diálogo para la introducción de todos los parémetros necesarios para crear código para datos URI codificados en base64.</p></translation> </message> <message> - <location filename="../../PluginWizardDataUriEncoder.py" line="139"/> - <source>Please open or create a file first.</source> - <translation>Por favor, abre o crée un archivo primero.</translation> + <location filename="../../PluginWizardDataUriEncoder.py" line="136" /> + <source>No current editor</source> + <translation>Sin editor actual</translation> </message> -</context> + <message> + <location filename="../../PluginWizardDataUriEncoder.py" line="137" /> + <source>Please open or create a file first.</source> + <translation>Por favor, abre o crée un archivo primero.</translation> + </message> + </context> </TS>
--- a/WizardDataUriEncoder/i18n/datauriencoder_ru.ts Wed Jun 02 17:20:11 2021 +0200 +++ b/WizardDataUriEncoder/i18n/datauriencoder_ru.ts Wed Jun 02 17:30:01 2021 +0200 @@ -1,159 +1,183 @@ <?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS><TS version="2.0" language="ru" sourcelanguage="en"> -<context> +<!DOCTYPE TS> +<TS version="2.0" language="ru" sourcelanguage="en"> + <context> <name>DataUriEncoderWizardDialog</name> <message> - <location filename="../DataUriEncoderWizardDialog.py" line="238"/> - <source>Data URI Encoder</source> - <translation>URI кодировщик данных</translation> - </message> - <message> - <location filename="../DataUriEncoderWizardDialog.ui" line="23"/> - <source><b>Encode file as plain text string</b></source> - <translation><b>Кодировать файл в простую текстовую строку</b></translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <location filename="../DataUriEncoderWizardDialog.py" line="219" /> + <location filename="../DataUriEncoderWizardDialog.py" line="152" /> + <location filename="../DataUriEncoderWizardDialog.py" line="129" /> + <location filename="../DataUriEncoderWizardDialog.py" line="79" /> + <source>Data URI Encoder</source> + <translation>URI кодировщик данных</translation> </message> <message> - <location filename="../DataUriEncoderWizardDialog.ui" line="30"/> - <source>File to Encode:</source> - <translation>Файл для кодирования:</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="81" /> + <source>Audio Files (*.flac *.mp3 *.ogg *.wav *.weba *.wma);;Image Files (*.gif *.ico *.jpg *.png *.svg *.tif *.webp *.xpm);;Video Files (*.3gp *.avi *.flv *.mp4 *.ogv *.webm *.wmv);;All Files (*)</source> + <translation>Аудио файлы (*.flac *.mp3 *.ogg *.wav *.weba *.wma);;Файлы изображений (*.gif *.ico *.jpg *.png *.svg *.tif *.webp *.xpm);;Видео файлы (*.3gp *.avi *.flv *.mp4 *.ogv *.webm *.wmv);;Все файлы (*)</translation> + </message> + <message> + <location filename="../DataUriEncoderWizardDialog.py" line="94" /> + <source>Do not generate code</source> + <translation>Не генерировать код</translation> </message> <message> - <location filename="../DataUriEncoderWizardDialog.ui" line="37"/> - <source>Enter the file to be encoded</source> - <translation>Введите файл для кодирования</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="95" /> + <source>Generate Python3 embedding code</source> + <translation type="unfinished" /> </message> <message> - <location filename="../DataUriEncoderWizardDialog.ui" line="44"/> - <source>Select the file to be encoded</source> - <translation>Выбор файла для кодирования</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="96" /> + <source>Generate CSS embedding code</source> + <translation type="unfinished" /> </message> <message> - <location filename="../DataUriEncoderWizardDialog.ui" line="53"/> - <source>Use "data:type/subtype;base64,..."</source> - <translation>Использовать "data:type/subtype;base64,..."</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="97" /> + <source>Generate HTML embedding code</source> + <translation type="unfinished" /> </message> <message> - <location filename="../DataUriEncoderWizardDialog.ui" line="63"/> - <source>Select to encrypt the output with 'rot_13' (use "string".decode(rot_13) to decrypt it)</source> - <translation>Разрешить шифровать с помощью 'rot_13' (используйте "string".decode(rot_13) для расшифровки)</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="98" /> + <source>Generate JavaScript embedding code</source> + <translation type="unfinished" /> </message> <message> - <location filename="../DataUriEncoderWizardDialog.ui" line="66"/> - <source>Use basic Caesar Cipher (rot_13)</source> - <translation>Использовать основной шифр Цезаря (rot_13)</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="99" /> + <source>Generate QML embedding code</source> + <translation type="unfinished" /> </message> <message> - <location filename="../DataUriEncoderWizardDialog.ui" line="75"/> - <source>Embedding Template Code:</source> - <translation>Шаблон внедряемого кода:</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="130" /> + <source>The file size is > 1 Megabyte. Encoding this will take some time depending on your CPU processing power!</source> + <translation>Размер файла > 1 Мегабайта. Кодировка может потребовать значительного времени, в зависимости от вычислительной мощности вашего процессора! </translation> </message> <message> - <location filename="../DataUriEncoderWizardDialog.ui" line="82"/> - <source>Select the embedding method</source> - <translation>Выберите метод встраивания</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="153" /> + <source><p>The file <b>{0}</b> could not be read.</p><p>Reason: {1}</p></source> + <translation><p>Невозможно прочитать файл <b>{0}</b>.</p><p>Причина: {1}</p></translation> </message> <message> - <location filename="../DataUriEncoderWizardDialog.ui" line="107"/> - <source>Encode BASE64</source> - <translation>Кодировать BASE64</translation> + <location filename="../DataUriEncoderWizardDialog.py" line="220" /> + <source>Enter a mime type:</source> + <translation>Введите MIME тип:</translation> </message> <message> - <location filename="../DataUriEncoderWizardDialog.ui" line="139"/> - <source>Base64 String Output:</source> - <translation>Результат кодирования Base64:</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source><b>Encode file as plain text string</b></source> + <translation><b>Кодировать файл в простую текстовую строку</b></translation> </message> <message> - <location filename="../DataUriEncoderWizardDialog.ui" line="158"/> - <source>Press to copy the encoded output to the system clipboard</source> - <translation>Копировать результат кодирования в системный буфер обмена</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>File to Encode:</source> + <translation>Файл для кодирования:</translation> </message> <message> - <location filename="../DataUriEncoderWizardDialog.ui" line="161"/> - <source>Copy encoded output to Clipboard</source> - <translation>Копировать результат в буфер обмена</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Enter the file to be encoded</source> + <translation>Введите файл для кодирования</translation> </message> <message> - <location filename="../DataUriEncoderWizardDialog.py" line="80"/> - <source>Do not generate code</source> - <translation>Не генерировать код</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Use "data:type/subtype;base64,..."</source> + <translation>Использовать "data:type/subtype;base64,..."</translation> + </message> + <message> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Select to encrypt the output with 'rot_13' (use "string".decode(rot_13) to decrypt it)</source> + <translation>Разрешить шифровать с помощью 'rot_13' (используйте "string".decode(rot_13) для расшифровки)</translation> </message> <message> - <location filename="../DataUriEncoderWizardDialog.py" line="80"/> - <source>Generate CSS embed code</source> - <translation>Генерировать код CSS</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Use basic Caesar Cipher (rot_13)</source> + <translation>Использовать основной шифр Цезаря (rot_13)</translation> </message> <message> - <location filename="../DataUriEncoderWizardDialog.py" line="80"/> - <source>Generate Python3 embed code</source> - <translation>Генерировать код Python3</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Embedding Template Code:</source> + <translation>Шаблон внедряемого кода:</translation> </message> <message> - <location filename="../DataUriEncoderWizardDialog.py" line="80"/> - <source>Generate Python2 embed code</source> - <translation>Генерировать код Python2</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Select the embedding method</source> + <translation>Выберите метод встраивания</translation> + </message> + <message> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Encode BASE64</source> + <translation>Кодировать BASE64</translation> </message> <message> - <location filename="../DataUriEncoderWizardDialog.py" line="80"/> - <source>Generate HTML embed code</source> - <translation>Генерировать код HTML</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Base64 String Output:</source> + <translation>Результат кодирования Base64:</translation> </message> <message> - <location filename="../DataUriEncoderWizardDialog.py" line="80"/> - <source>Generate JS embed code</source> - <translation>Генерировать код JS</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Press to copy the encoded output to the system clipboard</source> + <translation>Копировать результат кодирования в системный буфер обмена</translation> </message> <message> - <location filename="../DataUriEncoderWizardDialog.py" line="80"/> - <source>Generate QML embed code</source> - <translation>Генерировать код QML</translation> + <location filename="../DataUriEncoderWizardDialog.ui" line="0" /> + <source>Copy encoded output to Clipboard</source> + <translation>Копировать результат в буфер обмена</translation> </message> <message> - <location filename="../DataUriEncoderWizardDialog.py" line="106"/> - <source>Audio Files (*.flac *.mp3 *.ogg *.wav *.weba *.wma);;Image Files (*.gif *.ico *.jpg *.png *.svg *.tif *.webp *.xpm);;Video Files (*.3gp *.avi *.flv *.mp4 *.ogv *.webm *.wmv);;All Files (*)</source> - <translation>Аудио файлы (*.flac *.mp3 *.ogg *.wav *.weba *.wma);;Файлы изображений (*.gif *.ico *.jpg *.png *.svg *.tif *.webp *.xpm);;Видео файлы (*.3gp *.avi *.flv *.mp4 *.ogv *.webm *.wmv);;Все файлы (*)</translation> + <source>Select the file to be encoded</source> + <translation type="vanished">Выбор файла для кодирования</translation> </message> <message> - <location filename="../DataUriEncoderWizardDialog.py" line="145"/> - <source>The file size is > 1 Megabyte. Encoding this will take some time depending on your CPU processing power!</source> - <translation>Размер файла > 1 Мегабайта. Кодировка может потребовать значительного времени, в зависимости от вычислительной мощности вашего процессора! </translation> + <source>Generate CSS embed code</source> + <translation type="vanished">Генерировать код CSS</translation> + </message> + <message> + <source>Generate Python3 embed code</source> + <translation type="vanished">Генерировать код Python3</translation> </message> <message> - <location filename="../DataUriEncoderWizardDialog.py" line="168"/> - <source><p>The file <b>{0}</b> could not be read.</p><p>Reason: {1}</p></source> - <translation><p>Невозможно прочитать файл <b>{0}</b>.</p><p>Причина: {1}</p></translation> + <source>Generate Python2 embed code</source> + <translation type="vanished">Генерировать код Python2</translation> </message> <message> - <location filename="../DataUriEncoderWizardDialog.py" line="238"/> - <source>Enter a mime type:</source> - <translation>Введите MIME тип:</translation> + <source>Generate HTML embed code</source> + <translation type="vanished">Генерировать код HTML</translation> </message> -</context> -<context> - <name>WizardDataUriEncoderPlugin</name> <message> - <location filename="../../PluginWizardDataUriEncoder.py" line="114"/> - <source>Base64 Data Uri Encoder Wizard</source> - <translation>Мастер кодировки Base64</translation> + <source>Generate JS embed code</source> + <translation type="vanished">Генерировать код JS</translation> </message> <message> - <location filename="../../PluginWizardDataUriEncoder.py" line="109"/> - <source>Base&64 Data Uri Encoder Wizard...</source> - <translation>Мастер кодировки Base&64...</translation> + <source>Generate QML embed code</source> + <translation type="vanished">Генерировать код QML</translation> </message> + </context> + <context> + <name>WizardDataUriEncoderPlugin</name> <message> - <location filename="../../PluginWizardDataUriEncoder.py" line="116"/> - <source><b>Base64 Data Uri Encoder Wizard</b><p>This wizard opens a dialog for entering all the parameters needed to create code for a base64 encoded data URI.</p></source> - <translation><b>Мастер кодировки Base64</b><p>Этот мастер использует диалог для ввода всех параметров необходимых для кодировки Base64.</p></translation> + <location filename="../../PluginWizardDataUriEncoder.py" line="108" /> + <location filename="../../PluginWizardDataUriEncoder.py" line="104" /> + <source>Base64 Data Uri Encoder Wizard</source> + <translation>Мастер кодировки Base64</translation> </message> <message> - <location filename="../../PluginWizardDataUriEncoder.py" line="140"/> - <source>No current editor</source> - <translation>Нет текущего редактора</translation> + <location filename="../../PluginWizardDataUriEncoder.py" line="105" /> + <source>Base&64 Data Uri Encoder Wizard...</source> + <translation>Мастер кодировки Base&64...</translation> + </message> + <message> + <location filename="../../PluginWizardDataUriEncoder.py" line="110" /> + <source><b>Base64 Data Uri Encoder Wizard</b><p>This wizard opens a dialog for entering all the parameters needed to create code for a base64 encoded data URI.</p></source> + <translation><b>Мастер кодировки Base64</b><p>Этот мастер использует диалог для ввода всех параметров необходимых для кодировки Base64.</p></translation> </message> <message> - <location filename="../../PluginWizardDataUriEncoder.py" line="140"/> - <source>Please open or create a file first.</source> - <translation>Пожалуйста сначала откройте или создайте файл.</translation> + <location filename="../../PluginWizardDataUriEncoder.py" line="136" /> + <source>No current editor</source> + <translation>Нет текущего редактора</translation> </message> -</context> + <message> + <location filename="../../PluginWizardDataUriEncoder.py" line="137" /> + <source>Please open or create a file first.</source> + <translation>Пожалуйста сначала откройте или создайте файл.</translation> + </message> + </context> </TS>