pax_global_header00006660000000000000000000000064141340135660014515gustar00rootroot0000000000000052 comment=1a05970e43b4effe5239da8e6ad21078b99200a8 dialect-1.4.1/000077500000000000000000000000001413401356600131255ustar00rootroot00000000000000dialect-1.4.1/.github/000077500000000000000000000000001413401356600144655ustar00rootroot00000000000000dialect-1.4.1/.github/workflows/000077500000000000000000000000001413401356600165225ustar00rootroot00000000000000dialect-1.4.1/.github/workflows/CI.yml000066400000000000000000000010211413401356600175320ustar00rootroot00000000000000on: push: branches: [main] pull_request: name: CI jobs: flatpak-builder: name: "Flatpak Builder" runs-on: ubuntu-latest container: image: bilelmoussaoui/flatpak-github-actions:gnome-40 options: --privileged steps: - uses: actions/checkout@v2 with: submodules: recursive - uses: bilelmoussaoui/flatpak-github-actions@v2 with: bundle: "dialect-dev.flatpak" manifest-path: "build-aux/flatpak/com.github.gi_lom.dialect.json" run-tests: "true" dialect-1.4.1/.gitignore000066400000000000000000000035701413401356600151220ustar00rootroot00000000000000# Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python build/ builddir/ _build/ .flatpak/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ pip-wheel-metadata/ share/python-wheels/ *.egg-info/ .installed.cfg *.egg MANIFEST # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .nox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *.cover *.py,cover .hypothesis/ .pytest_cache/ # Translations *.mo # Django stuff: *.log local_settings.py db.sqlite3 db.sqlite3-journal # Flask stuff: instance/ .webassets-cache # Scrapy stuff: .scrapy # Sphinx documentation docs/_build/ # PyBuilder target/ # Jupyter Notebook .ipynb_checkpoints # IPython profile_default/ ipython_config.py # pyenv .python-version # pipenv # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. # However, in case of collaboration, if having platform-specific dependencies or dependencies # having no cross-platform support, pipenv may install dependencies that don't work, or not # install all needed dependencies. #Pipfile.lock # PEP 582; used by e.g. github.com/David-OConnor/pyflow __pypackages__/ # Celery stuff celerybeat-schedule celerybeat.pid # SageMath parsed files *.sage.py # Environments .env .venv env/ venv/ ENV/ env.bak/ venv.bak/ # Spyder project settings .spyderproject .spyproject # Rope project settings .ropeproject # mkdocs documentation /site # mypy .mypy_cache/ .dmypy.json dmypy.json # Pyre type checker .pyre/ # Glade backup *.ui~ # Other backup files *.backup # VSCode Workspace settings .vscode/ dialect-1.4.1/.gitmodules000066400000000000000000000001051413401356600152760ustar00rootroot00000000000000[submodule "po"] path = po url = https://github.com/dialect-app/po dialect-1.4.1/LICENSE000066400000000000000000001045151413401356600141400ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . dialect-1.4.1/README.md000066400000000000000000000050621413401356600144070ustar00rootroot00000000000000 # Dialect A translation app for GNOME. ![Dialect](preview.png?raw=true) ## Features - Translation based on the [googletrans](https://github.com/ssut/py-googletrans) Python API, an unofficial API for Google Translate - Translation based on the LibreTranslate API, allowing you to use any public instance - Translation history - Automatic language detection - Text to speech - Clipboard buttons ## Installation ### Flathub Download on Flathub ### AUR Arch-based distro users can install from the AUR: [`dialect`](https://aur.archlinux.org/packages/dialect) for the stable version or [`dialect-git`](https://aur.archlinux.org/packages/dialect-git/) for the latest git revision. ### Fedora Dialect is available for Fedora 33 and later: ```bash sudo dnf install dialect ``` ## Building ### Requirements - Python 3 `python` - PyGObject `python-gobject` - GTK3 `gtk3` - libhandy (>= 0.90.0) `libhandy` - GStreamer 1.0 `gstreamer` - Meson `meson` - Ninja `ninja` - Googletrans `python-googletrans` - gTTS `python-gtts` - D-Bus `python-dbus` - HTTPX `python-httpx` If official packages are not available for any of the python dependencies, you can install them from pip: ```bash pip install googletrans gtts ``` ### Building from Git ```bash git clone --recurse-submodules https://github.com/dialect-app/dialect.git cd dialect meson builddir --prefix=/usr/local sudo ninja -C builddir install ``` For testing and development purposes, you may run a local build: ```bash git clone --recurse-submodules https://github.com/dialect-app/dialect.git cd dialect meson builddir meson configure builddir -Dprefix=$(pwd)/builddir/testdir ninja -C builddir install ninja -C builddir run ``` ## Contributing Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. ### Translations Dialect has already been translated into many languages (see the [translations repository](https://github.com/dialect-app/po/blob/main/README.md) file). Please help translate Dialect into more languages through [Weblate](https://hosted.weblate.org/engage/dialect/). Translation status ## License [GNU General Public License 3 or later](https://www.gnu.org/licenses/gpl-3.0.en.html) dialect-1.4.1/build-aux/000077500000000000000000000000001413401356600150175ustar00rootroot00000000000000dialect-1.4.1/build-aux/flatpak/000077500000000000000000000000001413401356600164415ustar00rootroot00000000000000dialect-1.4.1/build-aux/flatpak/com.github.gi_lom.dialect.json000066400000000000000000000013661413401356600242520ustar00rootroot00000000000000{ "app-id" : "com.github.gi_lom.dialect", "runtime" : "org.gnome.Platform", "runtime-version" : "40", "sdk" : "org.gnome.Sdk", "command" : "dialect", "finish-args" : [ "--share=network", "--share=ipc", "--device=dri", "--socket=fallback-x11", "--socket=wayland", "--socket=pulseaudio", "--own-name=com.github.gi_lom.dialect.SearchProvider" ], "modules" : [ "pypi-dependencies.json", { "name" : "dialect", "builddir" : true, "buildsystem" : "meson", "sources" : [ { "type" : "dir", "path" : "../../." } ] } ] } dialect-1.4.1/build-aux/flatpak/pypi-dependencies.json000066400000000000000000000275431413401356600227540ustar00rootroot00000000000000{ "name": "python3-modules", "buildsystem": "simple", "build-commands": [], "modules": [ { "name": "python3-dbus-python", "buildsystem": "simple", "build-commands": [ "pip3 install --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"dbus-python\"" ], "sources": [ { "type": "file", "url": "https://files.pythonhosted.org/packages/62/7e/d4fb56a1695fa65da0c8d3071855fa5408447b913c58c01933c2f81a269a/dbus-python-1.2.16.tar.gz", "sha256": "11238f1d86c995d8aed2e22f04a1e3779f0d70e587caffeab4857f3c662ed5a4" } ] }, { "name": "python3-googletrans", "buildsystem": "simple", "build-commands": [ "pip3 install --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"googletrans==3.1.0a0\"" ], "sources": [ { "type": "file", "url": "https://files.pythonhosted.org/packages/19/0c/bf88182bcb5dce3094e2f3e4fe20db28a9928cb7bd5b08024030e4b140db/hyperframe-5.2.0-py2.py3-none-any.whl", "sha256": "5187962cb16dcc078f23cb5a4b110098d546c3f41ff2d4038a9896893bbd0b40" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/8a/cc/e53517f4a1e13f74776ca93271caef378dadec14d71c61c949d759d3db69/hpack-3.0.0-py2.py3-none-any.whl", "sha256": "0edd79eda27a53ba5be2dfabf3b15780928a0dff6eb0c60a3d6767720e970c89" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/25/de/da019bcc539eeab02f6d45836f23858ac467f584bfec7a526ef200242afe/h2-3.2.0-py2.py3-none-any.whl", "sha256": "61e0f6601fa709f35cdb730863b4e5ec7ad449792add80d1410d4174ed139af5" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/5a/fd/3dad730b0f95e78aeeb742f96fa7bbecbdd56a58e405d3da440d5bfb90c6/h11-0.9.0-py2.py3-none-any.whl", "sha256": "4bc6d6a1238b7615b266ada57e0618568066f57dd6fa967d1290ec9309b2f2f1" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/dd/d5/e4ff9318693ac6101a2095e580908b591838c6f33df8d3ee8dd953ba96a8/httpcore-0.9.1-py3-none-any.whl", "sha256": "9850fe97a166a794d7e920590d5ec49a05488884c9fc8b5dba8561effab0c2a0" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/5e/a0/5f06e1e1d463903cf0c0eebeb751791119ed7a4b3737fdc9a77f1cdfb51f/certifi-2020.12.5-py2.py3-none-any.whl", "sha256": "719a74fb9e33b9bd44cc7f3a8d94bc35e4049deebe19ba7d8e108280cfd59830" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/a2/38/928ddce2273eaa564f6f50de919327bf3a00f091b5baba8dfa9460f3a8a8/idna-2.10-py2.py3-none-any.whl", "sha256": "b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/d3/3c/cdeaf9ab0404853e77c45d9e8021d0d2c01f70a1bb26e460090926fe2a5e/hstspreload-2020.11.21-py3-none-any.whl", "sha256": "7bf30f772ebc5ef3b1261d44636d5892f153393b34e51f365357e6c38d38a572" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/52/b0/7b2e028b63d092804b6794595871f936aafa5e9322dcaaad50ebf67445b3/sniffio-1.2.0-py3-none-any.whl", "sha256": "471b71698eac1c2112a40ce2752bb2f4a4814c22a54a3eed3676bc0f5ca9f663" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl", "sha256": "fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/78/be/7b8b99fd74ff5684225f50dd0e865393d2265656ef3b4ba9eaaaffe622b8/rfc3986-1.4.0-py2.py3-none-any.whl", "sha256": "af9147e9aceda37c91a05f4deb128d4b4b49d6b199775fd2d2927768abdc8f50" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/54/b4/698b284c6aed4d7c2b4fe3ba5df1fcf6093612423797e76fbb24890dd22f/httpx-0.13.3-py3-none-any.whl", "sha256": "32d930858eab677bc29a742aaa4f096de259f1c78c68a90ad11f5c3c04f08335" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/19/3d/4e3a1609bf52f2f7b00436cc751eb977e27040665dde2bd57e7152989672/googletrans-3.1.0a0.tar.gz", "sha256": "d20373a7975791318a7e5d6c6e3205012d7a990b8fabbfc6b0c16017a6dfae04" } ] }, { "name": "python3-gtts", "buildsystem": "simple", "build-commands": [ "pip3 install --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"gtts\"" ], "sources": [ { "type": "file", "url": "https://files.pythonhosted.org/packages/23/fc/8a49991f7905261f9ca9df5aa9b58363c3c821ce3e7f671895442b7100f2/urllib3-1.26.3-py2.py3-none-any.whl", "sha256": "1b465e494e3e0d8939b50680403e3aedaa2bc434b7d5af64dfd3c958d7f5ae80" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl", "sha256": "8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/a2/38/928ddce2273eaa564f6f50de919327bf3a00f091b5baba8dfa9460f3a8a8/idna-2.10-py2.py3-none-any.whl", "sha256": "b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl", "sha256": "fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/5e/a0/5f06e1e1d463903cf0c0eebeb751791119ed7a4b3737fdc9a77f1cdfb51f/certifi-2020.12.5-py2.py3-none-any.whl", "sha256": "719a74fb9e33b9bd44cc7f3a8d94bc35e4049deebe19ba7d8e108280cfd59830" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/29/c1/24814557f1d22c56d50280771a17307e6bf87b70727d975fd6b2ce6b014a/requests-2.25.1-py2.py3-none-any.whl", "sha256": "c210084e36a42ae6b9219e00e48287def368a26d03a048ddad7bfee44f75871e" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/d2/3d/fa76db83bf75c4f8d338c2fd15c8d33fdd7ad23a9b5e57eb6c5de26b430e/click-7.1.2-py2.py3-none-any.whl", "sha256": "dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/5f/b9/94e59337107be134b21ce395a29fc0715b707b560108d6797de2d93e1178/gTTS-2.2.2-py3-none-any.whl", "sha256": "10efdecde4e272dee48ef0e8aa217de7f0bd5f914c368a92a6a14edbc0cd9cff" } ] }, { "name": "python3-httpx", "buildsystem": "simple", "build-commands": [ "pip3 install --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"httpx[http2]\"" ], "sources": [ { "type": "file", "url": "https://files.pythonhosted.org/packages/a6/ae/44ed7978bcb1f6337a3e2bef19c941de750d73243fc9389140d62853b686/sniffio-1.2.0.tar.gz", "sha256": "c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/70/e2/1344681ad04a0971e8884b9a9856e5a13cc4824d15c047f8b0bbcc0b2029/rfc3986-1.4.0.tar.gz", "sha256": "112398da31a3344dc25dbf477d8df6cb34f9278a94fee2625d89e4514be8bb9d" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/9f/24/1444ee2c9aee531783c031072a273182109c6800320868ab87675d147a05/idna-3.1.tar.gz", "sha256": "c5b02147e01ea9920e6b0a3f1f7bb833612d507592c837a6c49552768f4054e1" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/e6/7f/9a4834af1010dc1d570d5f394dfd9323a7d7ada7d25586bd299fc4cb0356/hyperframe-5.2.0.tar.gz", "sha256": "a9f5c17f2cc3c719b917c4f33ed1c61bd1f8dfac4b1bd23b7c80b3400971b41f" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/28/1e/1726b212239edc78999874e0ba8c86baec99e5d36ccfae9911514feae80c/httpx-0.16.1.tar.gz", "sha256": "126424c279c842738805974687e0518a94c7ae8d140cd65b9c4f77ac46ffa537" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/bd/e9/72c3dc8f7dd7874812be6a6ec788ba1300bfe31570963a7e788c86280cb9/h11-0.12.0.tar.gz", "sha256": "47222cb6067e4a307d535814917cd98fd0a57b6788ce715755fa2b6c28b56042" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/e0/c5/c6aa5cdf93808549d8495569f12757f9800a1c59be4b153b23814712a604/httpcore-0.12.3.tar.gz", "sha256": "37ae835fb370049b2030c3290e12ed298bf1473c41bb72ca4aa78681eba9b7c9" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/44/f1/b4440e46e265a29c0cb7b09b6daec6edf93c79eae713cfed93fbbf8716c5/hpack-3.0.0.tar.gz", "sha256": "8eec9c1f4bfae3408a3f30500261f7e6a65912dc138526ea054f9ad98892e9d2" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/08/0a/033df0fc05fe94f72517ccd393dd9ff99b1773fd198307638e6d3568a518/h2-3.2.0.tar.gz", "sha256": "875f41ebd6f2c44781259005b157faed1a5031df3ae5aa7bcb4628a6c0782f14" }, { "type": "file", "url": "https://files.pythonhosted.org/packages/06/a9/cd1fd8ee13f73a4d4f491ee219deeeae20afefa914dfb4c130cfc9dc397a/certifi-2020.12.5.tar.gz", "sha256": "1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c" } ] } ] } dialect-1.4.1/build-aux/meson/000077500000000000000000000000001413401356600161405ustar00rootroot00000000000000dialect-1.4.1/build-aux/meson/postinstall.py000077500000000000000000000012121413401356600210650ustar00rootroot00000000000000#!/usr/bin/env python3 from os import environ, path from subprocess import call prefix = environ.get('MESON_INSTALL_PREFIX', '/usr/local') datadir = path.join(prefix, 'share') destdir = environ.get('DESTDIR', '') # Package managers set this so we don't need to run if not destdir: print('Updating icon cache...') call(['gtk-update-icon-cache', '-qtf', path.join(datadir, 'icons', 'hicolor')]) print('Updating desktop database...') call(['update-desktop-database', '-q', path.join(datadir, 'applications')]) print('Compiling GSettings schemas...') call(['glib-compile-schemas', path.join(datadir, 'glib-2.0', 'schemas')]) dialect-1.4.1/data/000077500000000000000000000000001413401356600140365ustar00rootroot00000000000000dialect-1.4.1/data/com.github.gi_lom.dialect-symbolic.svg000066400000000000000000000013541413401356600233110ustar00rootroot00000000000000 dialect-1.4.1/data/com.github.gi_lom.dialect.Devel.svg000066400000000000000000000161151413401356600225310ustar00rootroot00000000000000 dialect-1.4.1/data/com.github.gi_lom.dialect.Source.svg000066400000000000000000001233111413401356600227270ustar00rootroot00000000000000 Adwaita Icon Template image/svg+xml GNOME Design Team Adwaita Icon Template D D dialect-1.4.1/data/com.github.gi_lom.dialect.desktop.in000077500000000000000000000007611413401356600227550ustar00rootroot00000000000000[Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Terminal=false Exec=dialect Name=Dialect Comment=Translate between languages Categories=Network;GTK; Icon=com.github.gi_lom.dialect # Translators: These are search terms to find this application. Do NOT translate or localize the semicolons. The list MUST also end with a semicolon. Keywords=translate;translation; # Translators: Do NOT translate or transliterate this text (these are enum types)! X-Purism-FormFactor=Workstation;Mobile; dialect-1.4.1/data/com.github.gi_lom.dialect.gschema.xml000066400000000000000000000043341413401356600231020ustar00rootroot00000000000000 [800, 300] false false false true 0 DEPRECATED: This key is deprecated and normally ignored. -1 "google" "{}" "google" DEPRECATED: This key is deprecated and normally ignored. [] DEPRECATED: This key is deprecated and normally ignored. [] DEPRECATED: This key is deprecated and normally ignored. [] DEPRECATED: This key is deprecated and normally ignored. [] DEPRECATED: This key is deprecated and normally ignored. "" dialect-1.4.1/data/com.github.gi_lom.dialect.metainfo.xml.in000066400000000000000000000102231413401356600236740ustar00rootroot00000000000000 com.github.gi_lom.dialect CC0-1.0 GPL-3.0-or-later Dialect Translate between languages

A translation app for GNOME.

Features:

  • Translation based on an unofficial API for Google Translate
  • Translation based on the LibreTranslate API, allowing you use any instance available online
  • Text to speech
  • Translation history
  • Automatic language detection
  • Clipboard buttons
https://github.com/dialect-app/dialect/ https://github.com/dialect-app/dialect/issues/ https://hosted.weblate.org/engage/dialect/ The Dialect Authors com.github.gi_lom.dialect.desktop dialect https://raw.githubusercontent.com/dialect-app/dialect/main/preview.png https://raw.githubusercontent.com/dialect-app/dialect/main/preview-2.png https://raw.githubusercontent.com/dialect-app/dialect/main/preview-mobile.png
  • Fix shortcut bug
  • Added accels for most actions
  • Added localized language names
  • Added new translations
  • Fixed several minor bugs
  • Backend refactor
  • Added option to disable Google TTS
  • Added Czech translation
  • Fixed several minor bugs
  • Switch to a new icon
  • Added LibreTranslate backend
  • Added Pronunciations support in Google Translate
  • Added Swedish translation
  • Added Croatian translation
  • Fixed several minor bugs
  • Added a shortcuts window
  • Added Indonesian translation
  • Added Portugese (BR) translation
  • Fixed several bugs
  • Added a search provider for GNOME
  • Added support for "Did you mean" suggestions
  • Added a Ctrl+Q shortcut to quit
  • Added Hungarian translation
  • Added Italian translation
  • Added Persian translation
  • Added Russian translation
  • Added Turkish translation
  • Fixed some issues with the icon
  • Fixed several bugs
  • Made some minor UI improvements

Initial release.

ModernToolkit HiDpiIcon SearchProvider workstation mobile
dialect-1.4.1/data/com.github.gi_lom.dialect.svg000066400000000000000000000056711413401356600215000ustar00rootroot00000000000000 dialect-1.4.1/data/meson.build000066400000000000000000000031211413401356600161750ustar00rootroot00000000000000subdir('resources') # Install desktop desktop_file = i18n.merge_file( input: 'com.github.gi_lom.dialect.desktop.in', output: 'com.github.gi_lom.dialect.desktop', type: 'desktop', po_dir: '../po', install: true, install_dir: join_paths(get_option('datadir'), 'applications') ) desktop_utils = find_program('desktop-file-validate', required: false) if desktop_utils.found() test('Validate desktop file', desktop_utils, args: [desktop_file] ) endif # Install metainfo appstream_file = i18n.merge_file( input: 'com.github.gi_lom.dialect.metainfo.xml.in', output: 'com.github.gi_lom.dialect.metainfo.xml', po_dir: '../po', install: true, install_dir: join_paths(get_option('datadir'), 'metainfo') ) appstream_util = find_program('appstream-util', required: false) if appstream_util.found() test('Validate appstream file', appstream_util, args: ['validate-relax', appstream_file] ) endif # Install gsettings schema install_data('com.github.gi_lom.dialect.gschema.xml', install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas') ) compile_schemas = find_program('glib-compile-schemas', required: false) if compile_schemas.found() test('Validate schema file', compile_schemas, args: ['--strict', '--dry-run', meson.current_source_dir()] ) endif # Install colored icon install_data( 'com.github.gi_lom.dialect.svg', install_dir: join_paths(get_option('datadir'), 'icons/hicolor/scalable/apps') ) # Install symbolic icon install_data( 'com.github.gi_lom.dialect-symbolic.svg', install_dir: join_paths(get_option('datadir'), 'icons/hicolor/scalable/apps') ) dialect-1.4.1/data/resources/000077500000000000000000000000001413401356600160505ustar00rootroot00000000000000dialect-1.4.1/data/resources/about.ui000066400000000000000000000020651413401356600175240ustar00rootroot00000000000000 False True True dialog Dialect Copyright 2020–⁠2021 The Dialect Authors A translation app for GNOME. https://github.com/dialect-app/dialect GitHub page gi-lom Mufeed Ali Rafael Mardojai CM translator-credits gpl-3-0 dialect-1.4.1/data/resources/dialect.gresource.xml000066400000000000000000000005231413401356600221740ustar00rootroot00000000000000 menu.ui window.ui about.ui preferences.ui lang-selector.ui shortcuts-window.ui style.css dialect-1.4.1/data/resources/lang-selector.ui000066400000000000000000000104141413401356600211460ustar00rootroot00000000000000 dialect-1.4.1/data/resources/menu.ui000066400000000000000000000016401413401356600173540ustar00rootroot00000000000000
preferences-section Show Pronunciation app.pronunciation
help-section Preferences app.preferences Keyboard Shortcuts app.shortcuts About Dialect app.about
dialect-1.4.1/data/resources/meson.build000066400000000000000000000003721413401356600202140ustar00rootroot00000000000000pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name()) gnome = import('gnome') gnome.compile_resources('dialect', 'dialect.gresource.xml', gresource_bundle: true, install: true, install_dir: pkgdatadir, ) dialect-1.4.1/data/resources/preferences.ui000066400000000000000000000237671413401356600207270ustar00rootroot00000000000000 dialect-1.4.1/data/resources/shortcuts-window.ui000066400000000000000000000133111413401356600217510ustar00rootroot00000000000000 True True shortcuts 10 True Translator True Translate <Primary>Return True Switch Languages <Primary>S True Clear source text <Primary>D True Copy translation <Primary><shift>C True Show Pronunciation <Primary>P True Text-to-Speech True Listen to source text <Primary><shift>L True Listen to translation <Primary>L True Navigation True Go back in history <Primary>Left True Go forward in history <Primary>Right True General True Preferences <Primary>comma True Shortcuts <Primary>question True Quit <Primary>Q dialect-1.4.1/data/resources/style.css000066400000000000000000000017231413401356600177250ustar00rootroot00000000000000.toolbox { background: @theme_base_color; border: 1px solid @borders; border-bottom-left-radius: 9px; border-bottom-right-radius: 9px; border-top: 0; padding: 6px; } .mistakes { border-left: 1px solid @borders; border-right: 1px solid @borders; } .pronunciation { border: 1px solid @borders; border-top: 0; } .translation-frame { background: @theme_base_color; border-top-left-radius: 9px; border-top-right-radius: 9px; } .translation-frame:disabled { background: @insensitive_bg_color; } .translation-frame:backdrop { background: @theme_unfocused_base_color; } .translation-frame scrollbar { padding-top: 3px; } .translation-frame scrollbar:dir(ltr) { border-top-right-radius: 9px; } .translation-frame scrollbar:dir(rtl) { border-top-left-radius: 9px; } .langselector { border-radius: 4px; } .bottomlang { background: @theme_base_color; border: 1px solid @borders; border-bottom: 0; border-left: 0; border-right: 0; } dialect-1.4.1/data/resources/window.ui000066400000000000000000001375761413401356600177410ustar00rootroot00000000000000 dialect-1.4.1/dialect.doap000066400000000000000000000026431413401356600154040ustar00rootroot00000000000000 Dialect Translate between languages Python Mufeed Ali fushinari Rafael Mardojai CM rafaelmardojai dialect-1.4.1/dialect/000077500000000000000000000000001413401356600145325ustar00rootroot00000000000000dialect-1.4.1/dialect/__init__.py000066400000000000000000000000001413401356600166310ustar00rootroot00000000000000dialect-1.4.1/dialect/define.py000066400000000000000000000005501413401356600163360ustar00rootroot00000000000000# Copyright 2020 gi-lom # Copyright 2020-2021 Mufeed Ali # Copyright 2020-2021 Rafael Mardojai CM # SPDX-License-Identifier: GPL-3.0-or-later APP_ID = 'com.github.gi_lom.dialect' RES_PATH = '/com/github/gi_lom/dialect' MAX_LENGTH = 5000 # maximum number of characters you can translate at once TRANS_NUMBER = 10 # number of translations to save in history dialect-1.4.1/dialect/dialect.in000077500000000000000000000020671413401356600164770ustar00rootroot00000000000000#!@PYTHON@ # Copyright 2020 gi-lom # Copyright 2020 Rafael Mardojai CM # SPDX-License-Identifier: GPL-3.0-or-later import os import sys import signal import locale import gettext VERSION = '@VERSION@' pkgdatadir = '@pkgdatadir@' localedir = '@localedir@' builddir = os.environ.get('MESON_BUILD_ROOT') if builddir: sys.dont_write_bytecode = True sys.path.insert(1, os.environ['MESON_SOURCE_ROOT']) data_dir = os.path.join(builddir, '@prefix@', '@datadir@') os.putenv('XDG_DATA_DIRS', '%s:%s' % (data_dir, os.getenv('XDG_DATA_DIRS', '/usr/local/share/:/usr/share/'))) sys.path.insert(1, pkgdatadir) signal.signal(signal.SIGINT, signal.SIG_DFL) gettext.install('dialect', localedir) locale.bindtextdomain('dialect', localedir) locale.textdomain('dialect') gettext.bindtextdomain('dialect', localedir) gettext.textdomain('dialect') if __name__ == '__main__': from gi.repository import Gio resource = Gio.Resource.load(os.path.join(pkgdatadir, 'dialect.gresource')) resource._register() from dialect import main sys.exit(main.main(VERSION)) dialect-1.4.1/dialect/lang_selector.py000066400000000000000000000073551413401356600177370ustar00rootroot00000000000000# Copyright 2020-2021 Mufeed Ali # Copyright 2020-2021 Rafael Mardojai CM # SPDX-License-Identifier: GPL-3.0-or-later import re from gi.repository import GObject, Gtk from dialect.define import RES_PATH from dialect.translators import get_lang_name @Gtk.Template(resource_path=f'{RES_PATH}/lang-selector.ui') class DialectLangSelector(Gtk.Popover): __gtype_name__ = 'DialectLangSelector' # Get widgets search = Gtk.Template.Child() scroll = Gtk.Template.Child() revealer = Gtk.Template.Child() recent_list = Gtk.Template.Child() separator = Gtk.Template.Child() lang_list = Gtk.Template.Child() # Propeties selected = GObject.Property(type=str) # Key of the selected lang def __init__(self, **kwargs): super().__init__(**kwargs) # Connect popover closed signal self.connect('closed', self._closed) # Connect list signals self.recent_list.connect('row-activated', self._activated) self.lang_list.connect('row-activated', self._activated) # Set filter func to lang list self.lang_list.set_filter_func(self.filter_func, None, False) # Connect search entry changed signal self.search.connect('changed', self._update_search) def filter_func(self, row, _data, _notify_destroy): search = self.search.get_text() return bool(re.search(search, row.name, re.IGNORECASE)) def set_languages(self, languages): # Clear list children = self.lang_list.get_children() for child in children: self.lang_list.remove(child) # Load langs list for code in languages: row_selected = (code == self.selected) self.lang_list.insert(LangRow(code, get_lang_name(code), row_selected), -1) def insert_recent(self, code, name, position=-1): row_selected = (code == self.selected) self.recent_list.insert(LangRow(code, name, row_selected), position) def clear_recent(self): children = self.recent_list.get_children() for child in children: self.recent_list.remove(child) def refresh_selected(self): for lang in self.lang_list.get_children(): lang.selected = (lang.code == self.selected) def _activated(self, _list, row): # Close popover self.popdown() # Set selected property self.set_property('selected', row.code) def _closed(self, _popover): # Reset scroll vscroll = self.scroll.get_vadjustment() vscroll.set_value(0) # Clear search self.search.set_text('') def _update_search(self, _entry): search = self.search.get_text() if search != '': self.revealer.set_reveal_child(False) else: self.revealer.set_reveal_child(True) self.lang_list.invalidate_filter() class LangRow(Gtk.ListBoxRow): def __init__(self, code, name, selected=False, **kwargs): super().__init__(**kwargs) self.code = code self.name = name row_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=12) label = Gtk.Label(self.name, halign=Gtk.Align.START, margin_start=4) self.get_style_context().add_class('langselector') row_box.pack_start(label, False, True, 0) self.selected_icon = Gtk.Image.new_from_icon_name('object-select-symbolic', Gtk.IconSize.BUTTON) row_box.pack_start(self.selected_icon, False, True, 0) self.add(row_box) self.show_all() self.selected = selected @property def selected(self): return self.selected_icon.get_visible() @selected.setter def selected(self, value): self.selected_icon.set_visible(value) dialect-1.4.1/dialect/main.py000077500000000000000000000207001413401356600160320ustar00rootroot00000000000000# Copyright 2020 gi-lom # Copyright 2020-2021 Mufeed Ali # Copyright 2020-2021 Rafael Mardojai CM # SPDX-License-Identifier: GPL-3.0-or-later # Initial setup import sys from gettext import gettext as _ import gi gi.require_version('Gdk', '3.0') gi.require_version('Gtk', '3.0') gi.require_version('Gst', '1.0') gi.require_version('Handy', '1') from gi.repository import Gdk, Gio, GLib, Gst, Gtk, Handy from dialect.define import APP_ID, RES_PATH from dialect.preferences import DialectPreferencesWindow from dialect.settings import Settings from dialect.window import DialectWindow class Dialect(Gtk.Application): def __init__(self, version): Gtk.Application.__init__( self, application_id=APP_ID, flags=Gio.ApplicationFlags.HANDLES_COMMAND_LINE ) # App window self.version = version self.window = None self.launch_text = '' self.launch_langs = {} # Add command line options self.add_main_option('text', b't', GLib.OptionFlags.NONE, GLib.OptionArg.STRING, 'Text to translate', None) self.add_main_option('src', b's', GLib.OptionFlags.NONE, GLib.OptionArg.STRING, 'Source lang code', None) self.add_main_option('dest', b'd', GLib.OptionFlags.NONE, GLib.OptionArg.STRING, 'Destination lang code', None) self.setup_actions() def do_activate(self): self.window = self.props.active_window if not self.window: width, height = Settings.get().window_size self.window = DialectWindow( application=self, # Translators: Do not translate the app name! title=_('Dialect'), default_height=height, default_width=width, text=self.launch_text, langs=self.launch_langs ) self.setup_actions_signals() self.window.present() def do_command_line(self, command_line): options = command_line.get_options_dict() options = options.end().unpack() text = '' langs = { 'src': None, 'dest': None } if 'text' in options: text = options['text'] if 'src' in options: langs['src'] = options['src'] if 'dest' in options: langs['dest'] = options['dest'] if self.window is not None: self.window.translate(text, langs['src'], langs['dest']) else: self.launch_text = text self.launch_langs = langs self.activate() return 0 def do_startup(self): Gtk.Application.do_startup(self) GLib.set_application_name(_('Dialect')) GLib.set_prgname('com.github.gi_lom.dialect') Handy.init() # Init Handy Gst.init(None) # Init Gst # Load CSS css_provider = Gtk.CssProvider() css_provider.load_from_resource(f'{RES_PATH}/style.css') screen = Gdk.Screen.get_default() style_context = Gtk.StyleContext() style_context.add_provider_for_screen(screen, css_provider, Gtk.STYLE_PROVIDER_PRIORITY_USER) def setup_actions(self): """ Setup menu actions """ self.pronunciation_action = Gio.SimpleAction.new_stateful( 'pronunciation', None, Settings.get().show_pronunciation_value ) self.set_accels_for_action('app.pronunciation', ['P']) self.add_action(self.pronunciation_action) self.preferences_action = Gio.SimpleAction.new('preferences', None) self.set_accels_for_action('app.preferences', ['comma']) self.add_action(self.preferences_action) self.shortcuts_action = Gio.SimpleAction.new('shortcuts', None) self.set_accels_for_action('app.shortcuts', ['question']) self.add_action(self.shortcuts_action) self.about_action = Gio.SimpleAction.new('about', None) self.add_action(self.about_action) self.back_action = Gio.SimpleAction.new('back', None) self.back_action.set_enabled(False) self.set_accels_for_action('app.back', ['Left']) self.add_action(self.back_action) self.forward_action = Gio.SimpleAction.new('forward', None) self.forward_action.set_enabled(False) self.set_accels_for_action('app.forward', ['Right']) self.add_action(self.forward_action) self.switch_action = Gio.SimpleAction.new('switch', None) self.set_accels_for_action('app.switch', ['S']) self.add_action(self.switch_action) self.clear_action = Gio.SimpleAction.new('clear', None) self.clear_action.set_enabled(False) self.set_accels_for_action('app.clear', ['D']) self.add_action(self.clear_action) self.paste_action = Gio.SimpleAction.new('paste', None) self.set_accels_for_action('app.paste', ['V']) self.add_action(self.paste_action) self.copy_action = Gio.SimpleAction.new('copy', None) self.copy_action.set_enabled(False) self.set_accels_for_action('app.copy', ['C']) self.add_action(self.copy_action) self.listen_dest_action = Gio.SimpleAction.new('listen-dest', None) self.set_accels_for_action('app.listen-dest', ['L']) self.add_action(self.listen_dest_action) self.listen_src_action = Gio.SimpleAction.new('listen-src', None) self.set_accels_for_action('app.listen-src', ['L']) self.add_action(self.listen_src_action) self.quit_action = Gio.SimpleAction.new('quit', None) self.set_accels_for_action('app.quit', ['Q']) self.add_action(self.quit_action) def setup_actions_signals(self): self.pronunciation_action.connect('change-state', self.on_pronunciation) self.preferences_action.connect('activate', self.on_preferences) self.shortcuts_action.connect('activate', self.on_shortcuts) self.about_action.connect('activate', self.on_about) self.back_action.connect('activate', self.window.ui_return) self.forward_action.connect('activate', self.window.ui_forward) self.switch_action.connect('activate', self.window.ui_switch) self.clear_action.connect('activate', self.window.ui_clear) self.paste_action.connect('activate', self.window.ui_paste) self.copy_action.connect('activate', self.window.ui_copy) self.listen_dest_action.connect('activate', self.window.ui_dest_voice) self.listen_src_action.connect('activate', self.window.ui_src_voice) self.quit_action.connect('activate', self.on_quit) def on_pronunciation(self, action, value): """ Update show pronunciation setting """ action.set_state(value) Settings.get().show_pronunciation = value # Update UI if self.window.trans_src_pron is not None: self.window.src_pron_revealer.set_reveal_child(value) if self.window.trans_dest_pron is not None: self.window.dest_pron_revealer.set_reveal_child(value) def on_preferences(self, _action, _param): """ Show preferences window """ window = DialectPreferencesWindow(self.window) window.set_transient_for(self.window) window.present() def on_shortcuts(self, _action, _param): """Launch the Keyboard Shortcuts window.""" builder = Gtk.Builder.new_from_resource(f'{RES_PATH}/shortcuts-window.ui') translate_shortcut = builder.get_object('translate_shortcut') translate_shortcut.set_visible(not Settings.get().live_translation) translate_shortcut.set_property('accelerator', Settings.get().translate_accel) shortcuts_window = builder.get_object('shortcuts') shortcuts_window.set_transient_for(self.window) shortcuts_window.show() def on_about(self, _action, _param): """ Show about dialog """ builder = Gtk.Builder.new_from_resource(f'{RES_PATH}/about.ui') about = builder.get_object('about') about.set_transient_for(self.window) about.set_logo_icon_name(APP_ID) about.set_version(self.version) about.connect('response', lambda dialog, response: dialog.destroy()) about.present() def on_quit(self, _action, _param): self.quit() def main(version): # Run the Application app = Dialect(version) return app.run(sys.argv) dialect-1.4.1/dialect/meson.build000066400000000000000000000012611413401356600166740ustar00rootroot00000000000000python = import('python') # Generate dialect bin configure_file( input: 'dialect.in', output: 'dialect', configuration: conf, install: true, install_dir: get_option('bindir') ) launcher = join_paths(meson.build_root(), 'dialect', meson.project_name()) run_target('run', command: [launcher] ) subdir('search_provider') # Python sources sources = [ '__init__.py', 'main.py', 'define.py', 'window.py', 'preferences.py', 'lang_selector.py', 'settings.py', ] # Install sources install_data(sources, install_dir: moduledir) # Install translators and tts providers install_subdir('translators', install_dir: moduledir) install_subdir('tts', install_dir: moduledir) dialect-1.4.1/dialect/preferences.py000066400000000000000000000255571413401356600174230ustar00rootroot00000000000000# Copyright 2020-2021 Mufeed Ali # Copyright 2020-2021 Rafael Mardojai CM # SPDX-License-Identifier: GPL-3.0-or-later import os import re import threading from gettext import gettext as _ from gi.repository import Gio, GLib, GObject, Gtk, Handy from dialect.define import RES_PATH from dialect.settings import Settings from dialect.translators import TRANSLATORS from dialect.tts import TTS @Gtk.Template(resource_path=f'{RES_PATH}/preferences.ui') class DialectPreferencesWindow(Handy.PreferencesWindow): __gtype_name__ = 'DialectPreferencesWindow' parent = NotImplemented # Get preferences widgets dark_mode = Gtk.Template.Child() live_translation = Gtk.Template.Child() translate_accel = Gtk.Template.Child() src_auto = Gtk.Template.Child() backend = Gtk.Template.Child() backend_instance = Gtk.Template.Child() backend_instance_row = Gtk.Template.Child() backend_instance_stack = Gtk.Template.Child() backend_instance_label = Gtk.Template.Child() backend_instance_edit = Gtk.Template.Child() backend_instance_save = Gtk.Template.Child() backend_instance_reset = Gtk.Template.Child() backend_instance_edit_box = Gtk.Template.Child() tts = Gtk.Template.Child() tts_row = Gtk.Template.Child() search_provider = Gtk.Template.Child() def __init__(self, parent, **kwargs): super().__init__(**kwargs) self.parent = parent self.setup() def setup(self): # Disable search, we have few preferences self.set_search_enabled(False) # Temporal fix for crash self.connect('destroy', self._unbind_settings) # Setup translate accel combo row model = Gio.ListStore.new(Handy.ValueObject) options = ['Ctrl + Enter', 'Enter'] for index, value in enumerate(options): model.insert(index, Handy.ValueObject.new(value)) self.translate_accel.bind_name_model(model, Handy.ValueObject.dup_string) # Setup backends combo row self.backend_model = Gio.ListStore.new(BackendObject) backend_options = [ BackendObject(translator.name, translator.prettyname) for translator in TRANSLATORS.values() ] selected_backend_index = 0 for index, value in enumerate(backend_options): self.backend_model.insert(index, value) if value.name == Settings.get().backend: selected_backend_index = index self.backend.bind_name_model(self.backend_model, BackendObject.get_name) # Bind preferences with GSettings Settings.get().bind('dark-mode', self.dark_mode, 'active', Gio.SettingsBindFlags.DEFAULT) Settings.get().bind('live-translation', self.live_translation, 'active', Gio.SettingsBindFlags.DEFAULT) Settings.get().bind('translate-accel', self.translate_accel, 'selected-index', Gio.SettingsBindFlags.DEFAULT) Settings.get().bind('src-auto', self.src_auto, 'active', Gio.SettingsBindFlags.DEFAULT) # Setup TTS self.tts_row.set_visible(len(TTS) >= 1) self.tts.set_active(Settings.get().tts != '') # Toggle dark mode self.dark_mode.connect('notify::active', self._toggle_dark_mode) # Set translate accel sensitivity by live translation state self.translate_accel.set_sensitive(not self.live_translation.get_active()) self.live_translation.connect('notify::active', self._toggle_accel_pref) # Switch backends self.backend.set_selected_index(selected_backend_index) self.backend.connect('notify::selected-index', self._switch_backends) self.parent.connect('notify::backend-loading', self._on_backend_loading) # Toggle TTS self.tts.connect('notify::active', self._toggle_tts) # Change translator instance Settings.get().connect('changed', self._on_settings_changed) self.backend_instance_edit.connect('clicked', self._on_edit_backend_instance) self.backend_instance_save.connect('clicked', self._on_save_backend_instance) self.backend_instance_reset.connect('clicked', self._on_reset_backend_instance) self.__check_instance_support() self.instance_save_image = Gtk.Image.new_from_icon_name( 'emblem-ok-symbolic', Gtk.IconSize.BUTTON) self.backend_instance_save.add(self.instance_save_image) self.instance_save_spinner = Gtk.Spinner() self.instance_save_image.show() self.instance_save_spinner.show() self.error_popover = Gtk.Popover( relative_to=self.backend_instance, can_focus=False, modal=False) self.error_label = Gtk.Label(label='Not a valid instance') error_icon = Gtk.Image.new_from_icon_name( 'dialog-error-symbolic', Gtk.IconSize.LARGE_TOOLBAR) error_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, margin=8, spacing=8) error_box.pack_start(error_icon, False, False, 0) error_box.pack_start(self.error_label, False, False, 0) self.error_popover.add(error_box) self.error_popover.set_position(Gtk.PositionType.BOTTOM) error_box.show_all() self.error_popover.hide() # Search Provider if os.getenv('XDG_CURRENT_DESKTOP') != 'GNOME': self.search_provider.hide() def _unbind_settings(self, *args, **kwargs): Settings.get().unbind(self.dark_mode, 'active') Settings.get().unbind(self.live_translation, 'active') Settings.get().unbind(self.src_auto, 'active') def _on_settings_changed(self, _settings, key): backend = Settings.get().backend if key == 'backend-settings': if TRANSLATORS[backend].supported_features['change-instance']: # Update backend Settings.get().reset_src_langs(backend) Settings.get().reset_dest_langs(backend) self.parent.change_backends(backend) def _toggle_dark_mode(self, switch, _active): gtk_settings = Gtk.Settings.get_default() active = switch.get_active() gtk_settings.set_property('gtk-application-prefer-dark-theme', active) def _toggle_accel_pref(self, switch, _active): self.translate_accel.set_sensitive(not switch.get_active()) def _toggle_tts(self, switch, _active): value = '' if switch.get_active() and len(TTS) >= 1: tts = list(TTS.keys()) value = str(tts[0]) self.parent.src_voice_btn.set_sensitive(False) self.parent.src_voice_btn.set_visible(switch.get_active()) self.parent.dest_voice_btn.set_sensitive(False) self.parent.dest_voice_btn.set_visible(switch.get_active()) Settings.get().tts = value if switch.get_active(): threading.Thread( target=self.parent.load_lang_speech, daemon=True ).start() def _switch_backends(self, row, _value): backend = self.backend_model[row.get_selected_index()].name Settings.get().backend = backend self.__check_instance_support() self.parent.change_backends(backend) def _on_backend_loading(self, window, _value): self.backend.set_sensitive(not window.get_property('backend-loading')) self.backend_instance_row.set_sensitive(not window.get_property('backend-loading')) def _on_edit_backend_instance(self, _button): backend = Settings.get().backend self.backend_instance_stack.set_visible_child_name('edit') self.backend_instance.set_text(Settings.get().get_instance_url(backend)) def _on_save_backend_instance(self, _button): backend = Settings.get().backend old_value = Settings.get().get_instance_url(backend) new_value = self.backend_instance.get_text() url = re.compile(r"https?://(www\.)?") new_value = url.sub('', new_value).strip().strip('/') if new_value != old_value: # Validate threading.Thread( target=self.__validate_new_backend_instance, args=[new_value], daemon=True ).start() else: self.backend_instance_stack.set_visible_child_name('view') def _on_reset_backend_instance(self, _button): backend = Settings.get().backend Settings.get().reset_instance_url(backend) self.backend_instance_stack.set_visible_child_name('view') Gtk.StyleContext.remove_class(self.backend_instance.get_style_context(), 'error') self.error_popover.popdown() def __check_instance_support(self): backend = Settings.get().backend if TRANSLATORS[backend].supported_features['change-instance']: self.backend_instance_row.set_visible(True) self.backend_instance_label.set_label(Settings.get().get_instance_url(backend)) else: self.backend_instance_row.set_visible(False) def __validate_new_backend_instance(self, url): def spinner_start(): self.backend.set_sensitive(False) self.backend_instance_row.set_sensitive(False) self.backend_instance_save.remove(self.instance_save_image) self.backend_instance_save.add(self.instance_save_spinner) self.instance_save_spinner.start() def spinner_end(): self.backend.set_sensitive(True) self.backend_instance_row.set_sensitive(True) self.backend_instance_save.remove(self.instance_save_spinner) self.backend_instance_save.add(self.instance_save_image) self.backend_instance_label.set_label(Settings.get().get_instance_url(backend)) self.instance_save_spinner.stop() GLib.idle_add(spinner_start) backend = Settings.get().backend validate = TRANSLATORS[backend].validate_instance_url(url) if validate: Settings.get().set_instance_url(backend, url) GLib.idle_add(Gtk.StyleContext.remove_class, self.backend_instance.get_style_context(), 'error') GLib.idle_add(self.backend_instance_stack.set_visible_child_name, 'view') GLib.idle_add(self.error_popover.popdown) else: GLib.idle_add(Gtk.StyleContext.add_class, self.backend_instance.get_style_context(), 'error') error_text = _('Not a valid {backend} instance') error_text = error_text.format(backend=TRANSLATORS[backend].prettyname) GLib.idle_add(self.error_label.set_label, error_text) GLib.idle_add(self.error_popover.popup) GLib.idle_add(spinner_end) class BackendObject(GObject.Object): name = None prettyname = None def __init__(self, name, prettyname): super().__init__() self.name = name self.prettyname = prettyname def get_name(self): return self.prettyname dialect-1.4.1/dialect/search_provider/000077500000000000000000000000001413401356600177115ustar00rootroot00000000000000dialect-1.4.1/dialect/search_provider/com.github.gi_lom.dialect.SearchProvider.ini000066400000000000000000000002641413401356600302430ustar00rootroot00000000000000[Shell Search Provider] DesktopId=com.github.gi_lom.dialect.desktop BusName=com.github.gi_lom.dialect.SearchProvider ObjectPath=/com/github/gi_lom/dialect/SearchProvider Version=2 dialect-1.4.1/dialect/search_provider/com.github.gi_lom.dialect.SearchProvider.service.in000066400000000000000000000001401413401356600315220ustar00rootroot00000000000000[D-BUS Service] Name=com.github.gi_lom.dialect.SearchProvider Exec=@pkgdatadir@/search_provider dialect-1.4.1/dialect/search_provider/meson.build000066400000000000000000000011741413401356600220560ustar00rootroot00000000000000serarch_provider_dir = join_paths(get_option('prefix'), get_option('datadir'), 'gnome-shell', 'search-providers') service_dir = join_paths(get_option('prefix'), get_option('datadir'), 'dbus-1', 'services') install_data( 'com.github.gi_lom.dialect.SearchProvider.ini', install_dir: serarch_provider_dir, ) configure_file( input: 'com.github.gi_lom.dialect.SearchProvider.service.in', output: 'com.github.gi_lom.dialect.SearchProvider.service', configuration: conf, install_dir: service_dir, ) configure_file( input: 'search_provider.in', output: 'search_provider', configuration: conf, install_dir: pkgdatadir, ) dialect-1.4.1/dialect/search_provider/search_provider.in000077500000000000000000000160271413401356600234310ustar00rootroot00000000000000#!@PYTHON@ # Copyright 2020 gi-lom # Copyright 2020 Nikita Kravets # Copyright 2020 Rafael Mardojai CM # Copyright 2021 Mufeed Ali # SPDX-License-Identifier: GPL-3.0-or-later import dbus import dbus.service import threading from dbus.mainloop.glib import DBusGMainLoop from gi.repository import GLib from dialect.translators import TRANSLATORS from dialect.settings import Settings APP_ID = 'com.github.gi_lom.dialect' search_bus_name = 'org.gnome.Shell.SearchProvider2' sbn = dict(dbus_interface=search_bus_name) class TranslateService(dbus.service.Object): bus_name = 'com.github.gi_lom.dialect.SearchProvider' _object_path = '/' + bus_name.replace('.', '/') def __init__(self): # init dbus self.session_bus = dbus.SessionBus() bus_name = dbus.service.BusName(self.bus_name, bus=self.session_bus) dbus.service.Object.__init__(self, bus_name, self._object_path) self.live_enabled = False # Translations running now self.translations = dict() Settings.get().connect('changed', self._on_settings_changed) self.dest_language = None self.active_thread = None self.trans_queue = [] self.translator = self._get_translator() @dbus.service.method(in_signature='as', out_signature='as', **sbn) def GetInitialResultSet(self, terms): """ Join separate terms in one ID line, start translation and send this line back on start of input """ self.live_enabled = self.is_live_enabled() if self.live_enabled: text = ' '.join(terms) self.translation(text) return [text] return None @dbus.service.method(in_signature='as', out_signature='aa{sv}', **sbn) def GetResultMetas(self, ids): """Send translated text""" translate_id = ids[0] # wait for the translation to finish if translate_id in self.translations: while self.translations[translate_id] == '': pass name = self.translations[translate_id] lang = self.translator.languages[self.dest_language].capitalize() self.translations.clear() return [ dict( id=id, name=name, description=lang or '', ) for id in ids ] # if there is no translation of this text send the original text return [ dict( id=id, name=id, ) for id in ids ] @dbus.service.method(in_signature='asas', out_signature='as', **sbn) def GetSubsearchResultSet(self, previous_results, new_terms): """ Join separate terms in one ID line, start translation and send this line back on update of text """ if self.live_enabled: text = ' '.join(new_terms) self.translation(text) return [text] return None @dbus.service.method(in_signature='sasu', **sbn) def ActivateResult(self, id, terms, timestamp): text = ' '.join(terms) GLib.spawn_async_with_pipes( None, ['@BIN@', '--text', text], None, GLib.SpawnFlags.SEARCH_PATH, None ) @dbus.service.method(in_signature='asu', terms='as', timestamp='u', **sbn) def LaunchSearch(self, terms, timestamp): text = ' '.join(terms) GLib.spawn_async_with_pipes( None, ['@BIN@', '--text', text], None, GLib.SpawnFlags.SEARCH_PATH, None ) def translation(self, src_text): """Start a new translation""" self.translations[src_text] = '' # set dest_language to last used language and src_language to auto detection src_language = 'auto' src_language_saved = Settings.get().get_src_langs(self.translator.name)[0] dest_language = Settings.get().get_dest_langs(self.translator.name)[0] if self.trans_queue: self.trans_queue.pop(0) self.trans_queue.append({ 'src_text': src_text, 'src_language': src_language, 'src_language_saved': src_language_saved, 'dest_language': dest_language }) # Check if there are any active threads. if self.active_thread is not None: self.active_thread.join() del self.active_thread self.active_thread = threading.Thread(target=self.run_translation) self.active_thread.start() def run_translation(self): """ Translate all text in the queue """ while self.trans_queue: # If the first language is revealed automatically, let's set it trans_dict = self.trans_queue.pop(0) src_text = trans_dict['src_text'] src_language = trans_dict['src_language'] src_language_saved = trans_dict['src_language_saved'] self.dest_language = trans_dict['dest_language'] try: if src_language == 'auto' and src_text != '': src_language = self.translator.detect(src_text).lang if isinstance(src_language, list): src_language = src_language[0] # If the two languages are the same, translate into last used source language if src_language == self.dest_language: self.dest_language = src_language_saved # If the two languages are slill the same, nothing is done if src_language != self.dest_language: dest_text = '' # THIS IS WHERE THE TRANSLATION HAPPENS. The try is necessary to circumvent a bug of the used API if src_text != '': dest_text = self.translator.translate( src_text, src=src_language, dest=self.dest_language ).text else: pass if src_text in self.translations: self.translations[src_text] = dest_text else: self.translations[src_text] = src_text except Exception: self.translations[src_text] = '_error_' return def is_live_enabled(self): return Settings.get().live_translation def _get_translator(self): backend = Settings.get().backend if TRANSLATORS[backend].supported_features['change-instance']: translator = TRANSLATORS[backend]( base_url=Settings.get().get_instance_url(TRANSLATORS[backend].name) ) else: translator = TRANSLATORS[backend]() return translator def _on_settings_changed(self, _settings, key): if key == 'backend-name' or key == 'backend-settings': self.translator = self._get_translator() if __name__ == "__main__": DBusGMainLoop(set_as_default=True) TranslateService() GLib.MainLoop().run() dialect-1.4.1/dialect/settings.py000066400000000000000000000171371413401356600167550ustar00rootroot00000000000000# Copyright 2021 Mufeed Ali # Copyright 2021 Rafael Mardojai CM # SPDX-License-Identifier: GPL-3.0-or-later import json from gi.repository import Gio, GLib from dialect.define import APP_ID from dialect.translators import ( check_backend_availability, get_fallback_backend_name, TRANSLATORS ) from dialect.tts import TTS class Settings(Gio.Settings): """ Dialect settings handler """ instance = None def __init__(self): Gio.Settings.__init__(self) @staticmethod def new(): """Create a new instance of Settings.""" g_settings = Gio.Settings.new(APP_ID) g_settings.__class__ = Settings return g_settings @staticmethod def get(): """Return an active instance of Settings.""" if Settings.instance is None: Settings.instance = Settings.new() return Settings.instance @property def window_size(self): value = self.get_value('window-size') return (value[0], value[1]) @window_size.setter def window_size(self, size): width, height = size self.set_value('window-size', GLib.Variant('ai', [width, height])) @property def translate_accel(self): """Return the user's preferred translation shortcut.""" value = self.translate_accel_value if value == 0: return 'Return' if value == 1: return 'Return' return 'Return' @property def translate_accel_value(self): """Return the user's preferred translation shortcut value.""" return self.get_int('translate-accel') @property def tts(self): """Return the user's preferred TTS service.""" value = self.get_string('tts-name') if value not in TTS.keys(): value = '' self.tts = value return value @tts.setter def tts(self, value): """Set the user's preferred TTS service.""" self.set_string('tts-name', value) @property def dark_mode(self): return self.get_boolean('dark-mode') @dark_mode.setter def dark_mode(self, state): self.set_boolean('dark-mode', state) @property def live_translation(self): return self.get_boolean('live-translation') @live_translation.setter def live_translation(self, state): self.set_boolean('live-translation', state) @property def show_pronunciation(self): return self.get_boolean('show-pronunciation') @property def show_pronunciation_value(self): return self.get_value('show-pronunciation') @show_pronunciation.setter def show_pronunciation(self, state): self.set_boolean('show-pronunciation', state) @property def src_auto(self): return self.get_boolean('src-auto') @src_auto.setter def src_auto(self, state): self.set_boolean('src-auto', state) @property def backend(self): """Return the user's preferred backend.""" # Dialect 1.2.0 and below used the backend key and # stored the index of the chosen backend as an int. value = self.get_int('backend') if value == -1: value = self.get_string('backend-name') else: if value == 0: value = 'google' elif value == 1: value = 'libretranslate' if check_backend_availability(value): return value self.backend = get_fallback_backend_name() return get_fallback_backend_name() @backend.setter def backend(self, name): """ Set the user's preferred backend. :param name: name of backend :type name: string """ self._delete_int_key('backend') # Set deprecated key to unused state. self.set_string('backend-name', name) def get_instance_url(self, backend): # Dialect 1.2.0 and below used separate keys for each # backend-specific setting. instance_url = self.get_string(f'{backend}-instance') if instance_url: return instance_url settings = self.backend_settings.get(backend) if settings is not None and settings.get('instance-url'): return settings.get('instance-url') return TRANSLATORS[backend].instance_url def set_instance_url(self, backend, instance_url): self._delete_str_key(f'{backend}-instance') # Set deprecated key to unused state. self._set_backend_setting(backend, 'instance-url', instance_url) def reset_instance_url(self, backend): self._delete_str_key(f'{backend}-instance') # Set deprecated key to unused state. self._set_backend_setting(backend, 'instance-url', TRANSLATORS[backend].instance_url) def get_dest_langs(self, backend): # Dialect 1.2.0 and below used separate keys for each # backend-specific setting. dest_langs = list(self.get_value(f'{backend}-dest-langs')) if dest_langs: return dest_langs settings = self.backend_settings.get(backend) if settings is not None and settings.get('dest-langs'): return settings.get('dest-langs') return TRANSLATORS[backend].dest_langs def set_dest_langs(self, backend, langs): self._delete_arr_key(f'{backend}-dest-langs') # Set deprecated key to unused state. self._set_backend_setting(backend, 'dest-langs', langs) def reset_dest_langs(self, backend): self._delete_arr_key(f'{backend}-dest-langs') # Set deprecated key to unused state. self._set_backend_setting(backend, 'dest-langs', TRANSLATORS[backend].dest_langs) def get_src_langs(self, backend): # Dialect 1.2.0 and below used separate keys for each # backend-specific setting. src_langs = list(self.get_value(f'{backend}-src-langs')) if src_langs: return src_langs settings = self.backend_settings.get(backend) if settings is not None and settings.get('src-langs'): return settings.get('src-langs') return TRANSLATORS[backend].src_langs def set_src_langs(self, backend, langs): self._delete_arr_key(f'{backend}-src-langs') # Set deprecated key to unused state. self._set_backend_setting(backend, 'src-langs', langs) def reset_src_langs(self, backend): self._delete_arr_key(f'{backend}-src-langs') # Set deprecated key to unused state. self._set_backend_setting(backend, 'src-langs', TRANSLATORS[backend].src_langs) @property def backend_settings(self): return json.loads(self.get_string('backend-settings')) @backend_settings.setter def backend_settings(self, value): self.set_string('backend-settings', json.dumps(value)) def _set_backend_setting(self, backend, key, value): """ Sets the backend settings with key and value. """ settings = self.backend_settings if backend not in settings: settings[backend] = {} settings[backend][key] = value self.backend_settings = settings def _delete_arr_key(self, key): val = self.get_strv(key) if val != []: self.set_value(key, GLib.Variant('as', [])) def _delete_enum_key(self, key): val = self.get_enum(key) if val > -1: self.set_enum(key, -1) def _delete_int_key(self, key): val = self.get_int(key) if val > -1: self.set_int(key, -1) def _delete_str_key(self, key): val = self.get_string(key) if val != '': self.set_value( key, GLib.Variant('s', '') ) dialect-1.4.1/dialect/translators/000077500000000000000000000000001413401356600171065ustar00rootroot00000000000000dialect-1.4.1/dialect/translators/__init__.py000066400000000000000000000064431413401356600212260ustar00rootroot00000000000000import importlib from gettext import gettext as _ import pkgutil TRANSLATORS = {} for _importer, modname, _ispkg in pkgutil.iter_modules(__path__): if modname != 'basetrans': modclass = importlib.import_module('dialect.translators.' + modname).Translator TRANSLATORS[modclass.name] = modclass def check_backend_availability(backend_name): if backend_name in TRANSLATORS: return True return False def get_fallback_backend_name(): if TRANSLATORS: return next(iter(TRANSLATORS)) return None LANGUAGES = { 'af': _('Afrikaans'), 'sq': _('Albanian'), 'am': _('Amharic'), 'ar': _('Arabic'), 'hy': _('Armenian'), 'az': _('Azerbaijani'), 'eu': _('Basque'), 'be': _('Belarusian'), 'bn': _('Bengali'), 'bs': _('Bosnian'), 'bg': _('Bulgarian'), 'ca': _('Catalan'), 'ceb': _('Cebuano'), 'ny': _('Chichewa'), 'zh': _('Chinese'), 'zh-CN': _('Chinese (Simplified)'), 'zh-TW': _('Chinese (Traditional)'), 'co': _('Corsican'), 'hr': _('Croatian'), 'cs': _('Czech'), 'da': _('Danish'), 'nl': _('Dutch'), 'en': _('English'), 'eo': _('Esperanto'), 'et': _('Estonian'), 'tl': _('Filipino'), 'fi': _('Finnish'), 'fr': _('French'), 'fy': _('Frisian'), 'gl': _('Galician'), 'ka': _('Georgian'), 'de': _('German'), 'el': _('Greek'), 'gu': _('Gujarati'), 'ht': _('Haitian Creole'), 'ha': _('Hausa'), 'haw': _('Hawaiian'), 'iw': _('Hebrew'), 'he': _('Hebrew'), 'hi': _('Hindi'), 'hmn': _('Hmong'), 'hu': _('Hungarian'), 'is': _('Icelandic'), 'ig': _('Igbo'), 'id': _('Indonesian'), 'ga': _('Irish'), 'it': _('Italian'), 'ja': _('Japanese'), 'jw': _('Javanese'), 'kn': _('Kannada'), 'kk': _('Kazakh'), 'km': _('Khmer'), 'rw': _('Kinyarwanda'), 'ko': _('Korean'), 'ku': _('Kurdish (Kurmanji)'), 'ky': _('Kyrgyz'), 'lo': _('Lao'), 'la': _('Latin'), 'lv': _('Latvian'), 'lt': _('Lithuanian'), 'lb': _('Luxembourgish'), 'mk': _('Macedonian'), 'mg': _('Malagasy'), 'ms': _('Malay'), 'ml': _('Malayalam'), 'mt': _('Maltese'), 'mi': _('Maori'), 'mr': _('Marathi'), 'mn': _('Mongolian'), 'my': _('Myanmar (Burmese)'), 'ne': _('Nepali'), 'no': _('Norwegian'), 'or': _('Odia (Oriya)'), 'ps': _('Pashto'), 'fa': _('Persian'), 'pl': _('Polish'), 'pt': _('Portuguese'), 'pa': _('Punjabi'), 'ro': _('Romanian'), 'ru': _('Russian'), 'sm': _('Samoan'), 'gd': _('Scots Gaelic'), 'sr': _('Serbian'), 'st': _('Sesotho'), 'sn': _('Shona'), 'sd': _('Sindhi'), 'si': _('Sinhala'), 'sk': _('Slovak'), 'sl': _('Slovenian'), 'so': _('Somali'), 'es': _('Spanish'), 'su': _('Sundanese'), 'sw': _('Swahili'), 'sv': _('Swedish'), 'tg': _('Tajik'), 'ta': _('Tamil'), 'tt': _('Tatar'), 'te': _('Telugu'), 'th': _('Thai'), 'tr': _('Turkish'), 'tk': _('Turkmen'), 'uk': _('Ukrainian'), 'ur': _('Urdu'), 'ug': _('Uyghur'), 'uz': _('Uzbek'), 'vi': _('Vietnamese'), 'cy': _('Welsh'), 'xh': _('Xhosa'), 'yi': _('Yiddish'), 'yo': _('Yoruba'), 'zu': _('Zulu'), } def get_lang_name(code): return LANGUAGES.get(code, code) dialect-1.4.1/dialect/translators/basetrans.py000066400000000000000000000024141413401356600214430ustar00rootroot00000000000000# Copyright 2021 Mufeed Ali # Copyright 2021 Rafael Mardojai CM # SPDX-License-Identifier: GPL-3.0-or-later class TranslatorBase: name = '' prettyname = '' history = [] languages = ['en'] supported_features = { 'mistakes': False, 'pronunciation': False, 'change-instance': False, } instance_url = '' src_langs = ['en', 'fr', 'es', 'de'] dest_langs = ['fr', 'es', 'de', 'en'] @staticmethod def validate_instance_url(url): pass def detect(self, src_text): pass def translate(self, src_text, src, dest): pass class TranslationError(Exception): """Exception raised when translation fails.""" def __init__(self, cause, message='Translation has failed'): self.cause = cause self.message = message super().__init__(self.message) class Translation: text = None extra_data = { 'possible-mistakes': None, 'src-pronunciation': None, 'dest-pronunciation': None, } def __init__(self, text, extra_data): self.text = text self.extra_data = extra_data class Detected: lang = '' confidence = 0.0 def __init__(self, lang, confidence): self.lang = lang self.confidence = confidence dialect-1.4.1/dialect/translators/gtrans.py000066400000000000000000000054101413401356600207560ustar00rootroot00000000000000# Copyright 2021 Mufeed Ali # Copyright 2021 Rafael Mardojai CM # SPDX-License-Identifier: GPL-3.0-or-later from googletrans import Translator as GoogleTranslator from dialect.translators.basetrans import TranslatorBase, TranslationError, Translation class Translator(TranslatorBase): name = 'google' prettyname = 'Google Translate' history = [] languages = [ 'af', 'sq', 'am', 'ar', 'hy', 'az', 'eu', 'be', 'bn', 'bs', 'bg', 'ca', 'ceb', 'ny', 'zh-CN', 'zh-TW', 'co', 'hr', 'cs', 'da', 'nl', 'en', 'eo', 'et', 'tl', 'fi', 'fr', 'fy', 'gl', 'ka', 'de', 'el', 'gu', 'ht', 'ha', 'haw', 'iw', 'he', 'hi', 'hmn', 'hu', 'is', 'ig', 'id', 'ga', 'it', 'ja', 'jw', 'kn', 'kk', 'km', 'ko', 'ku', 'ky', 'lo', 'la', 'lv', 'lt', 'lb', 'mk', 'mg', 'ms', 'ml', 'mt', 'mi', 'mr', 'mn', 'my', 'ne', 'no', 'or', 'ps', 'fa', 'pl', 'pt', 'pa', 'ro', 'ru', 'sm', 'gd', 'sr', 'st', 'sn', 'sd', 'si', 'sk', 'sl', 'so', 'es', 'su', 'sw', 'sv', 'tg', 'ta', 'te', 'th', 'tr', 'uk', 'ur', 'ug', 'uz', 'vi', 'cy', 'xh', 'yi', 'yo', 'zu' ] supported_features = { 'mistakes': True, 'pronunciation': True, 'change-instance': False, } def __init__(self, **kwargs): self._translator = GoogleTranslator(raise_exception=True) def detect(self, src_text): try: if callable(getattr(self._translator, 'detect_legacy', None)): return self._translator.detect_legacy(src_text) return self._translator.detect(src_text) except Exception as exc: raise TranslationError(exc) from exc def translate(self, src_text, src, dest): try: if callable(getattr(self._translator, 'translate_legacy', None)): translated = self._translator.translate_legacy(src_text, src=src, dest=dest) else: translated = self._translator.translate(src_text, src=src, dest=dest) result = Translation( translated.text, { 'possible-mistakes': translated.extra_data['possible-mistakes'], 'src-pronunciation': None, 'dest-pronunciation': None, }, ) try: result.extra_data['src-pronunciation'] = translated.extra_data['translation'][1][3] except IndexError: result.extra_data['src-pronunciation'] = None try: result.extra_data['dest-pronunciation'] = translated.extra_data['translation'][1][2] except IndexError: result.extra_data['dest-pronunciation'] = None return result except Exception as exc: raise TranslationError(exc) from exc dialect-1.4.1/dialect/translators/libretrans.py000066400000000000000000000057621413401356600216370ustar00rootroot00000000000000# Copyright 2021 Mufeed Ali # Copyright 2021 Rafael Mardojai CM # SPDX-License-Identifier: GPL-3.0-or-later import httpx from dialect.translators.basetrans import Detected, TranslatorBase, TranslationError, Translation class Translator(TranslatorBase): name = 'libretranslate' prettyname = 'LibreTranslate' client = None history = [] languages = [] supported_features = { 'mistakes': False, 'pronunciation': False, 'change-instance': True, } instance_url = 'translate.astian.org' def __init__(self, base_url=None, **kwargs): if base_url is not None: self.instance_url = base_url self.client = httpx.Client() r = self.client.get(self.lang_url) for lang in r.json(): self.languages.append(lang['code']) @property def detect_url(self): if self.instance_url.startswith('localhost:'): return 'http://' + self.instance_url + '/detect' return 'https://' + self.instance_url + '/detect' @property def translate_url(self): if self.instance_url.startswith('localhost:'): return 'http://' + self.instance_url + '/translate' return 'https://' + self.instance_url + '/translate' @property def lang_url(self): if self.instance_url.startswith('localhost:'): return 'http://' + self.instance_url + '/languages' return 'https://' + self.instance_url + '/languages' @staticmethod def validate_instance_url(url): if url.startswith('localhost:'): url = 'http://' + url + '/spec' else: url = 'https://' + url + '/spec' client = httpx.Client() try: r = client.get(url) data = r.json() if data['info']['title'] == 'LibreTranslate': return True return False except Exception: return False def detect(self, src_text): """Detect the language using the same mechanisms that LibreTranslate uses but locally.""" try: r = self.client.post( self.detect_url, data={ 'q': src_text, }, ) return Detected(r.json()[0]['language'], r.json()[0]['confidence']) except Exception as exc: raise TranslationError(exc) from exc def translate(self, src_text, src, dest): try: r = self.client.post( self.translate_url, data={ 'q': src_text, 'source': src, 'target': dest, }, ) return Translation( r.json()['translatedText'], { 'possible-mistakes': None, 'src-pronunciation': None, 'dest-pronunciation': None, }, ) except Exception as exc: raise TranslationError(exc) from exc dialect-1.4.1/dialect/tts/000077500000000000000000000000001413401356600153445ustar00rootroot00000000000000dialect-1.4.1/dialect/tts/__init__.py000066400000000000000000000004011413401356600174500ustar00rootroot00000000000000import importlib import pkgutil TTS = {} for _importer, modname, _ispkg in pkgutil.iter_modules(__path__): if modname != 'basetts': modclass = importlib.import_module('dialect.tts.' + modname).TextToSpeech TTS[modclass.name] = modclass dialect-1.4.1/dialect/tts/basetts.py000066400000000000000000000007671413401356600173750ustar00rootroot00000000000000# Copyright 2021 Mufeed Ali # Copyright 2021 Rafael Mardojai CM # SPDX-License-Identifier: GPL-3.0-or-later class TextToSpeechBase: name = '' prettyname = '' languages = ['en'] def download_voice(self, text, language, file): pass class TextToSpeechError(Exception): """Exception raised when tts fails.""" def __init__(self, cause, message='Text to Speech has failed'): self.cause = cause self.message = message super().__init__(self.message) dialect-1.4.1/dialect/tts/gtts.py000066400000000000000000000012571413401356600167040ustar00rootroot00000000000000# Copyright 2021 Mufeed Ali # Copyright 2021 Rafael Mardojai CM # SPDX-License-Identifier: GPL-3.0-or-later from gtts import gTTS, lang from dialect.tts.basetts import TextToSpeechBase, TextToSpeechError class TextToSpeech(TextToSpeechBase): name = 'google' prettyname = 'Google Text-to-Speech' languages = [] def __init__(self, **kwargs): self.languages = list(lang.tts_langs().keys()) def download_voice(self, text, language, file): try: tts = gTTS(text, lang=language, lang_check=False) tts.write_to_fp(file) file.seek(0) except Exception as exc: raise TextToSpeechError(exc) from exc dialect-1.4.1/dialect/window.py000066400000000000000000001144241413401356600164210ustar00rootroot00000000000000# Copyright 2020 gi-lom # Copyright 2020-2021 Mufeed Ali # Copyright 2020-2021 Rafael Mardojai CM # SPDX-License-Identifier: GPL-3.0-or-later import threading from gettext import gettext as _ from tempfile import NamedTemporaryFile from gi.repository import Gdk, GLib, GObject, Gst, Gtk, Handy from dialect.define import APP_ID, MAX_LENGTH, RES_PATH, TRANS_NUMBER from dialect.lang_selector import DialectLangSelector from dialect.settings import Settings from dialect.translators import TRANSLATORS, get_lang_name from dialect.tts import TTS @Gtk.Template(resource_path=f'{RES_PATH}/window.ui') class DialectWindow(Handy.ApplicationWindow): __gtype_name__ = 'DialectWindow' # Get widgets main_stack = Gtk.Template.Child() error_message = Gtk.Template.Child() translator_box = Gtk.Template.Child() retry_backend_btn = Gtk.Template.Child() title_stack = Gtk.Template.Child() langs_button_box = Gtk.Template.Child() switch_btn = Gtk.Template.Child() src_lang_btn = Gtk.Template.Child() src_lang_label = Gtk.Template.Child() dest_lang_btn = Gtk.Template.Child() dest_lang_label = Gtk.Template.Child() return_btn = Gtk.Template.Child() forward_btn = Gtk.Template.Child() menu_btn = Gtk.Template.Child() src_pron_revealer = Gtk.Template.Child() src_pron_label = Gtk.Template.Child() mistakes = Gtk.Template.Child() mistakes_label = Gtk.Template.Child() char_counter = Gtk.Template.Child() src_text = Gtk.Template.Child() clear_btn = Gtk.Template.Child() paste_btn = Gtk.Template.Child() src_voice_btn = Gtk.Template.Child() translate_btn = Gtk.Template.Child() dest_box = Gtk.Template.Child() dest_pron_revealer = Gtk.Template.Child() dest_pron_label = Gtk.Template.Child() dest_text = Gtk.Template.Child() trans_spinner = Gtk.Template.Child() trans_warning = Gtk.Template.Child() copy_btn = Gtk.Template.Child() dest_voice_btn = Gtk.Template.Child() actionbar = Gtk.Template.Child() src_lang_btn2 = Gtk.Template.Child() switch_btn2 = Gtk.Template.Child() dest_lang_btn2 = Gtk.Template.Child() notification_revealer = Gtk.Template.Child() notification_label = Gtk.Template.Child() translator = None # Translator object # Text to speech tts = None tts_langs = None voice_loading = False # tts loading status # Preset language values src_langs = [] dest_langs = [] current_history = 0 # for history management # Translation-related variables no_retranslate = False # used to prevent unnecessary re-translations trans_queue = [] # for pending translations active_thread = None # for ongoing translation trans_failed = False # for monitoring connectivity issues trans_mistakes = None # "mistakes" suggestions # Pronunciations trans_src_pron = None trans_dest_pron = None mobile_mode = False # UI mode # Propeties backend_loading = GObject.Property(type=bool, default=False) def __init__(self, text, langs, **kwargs): super().__init__(**kwargs) # Options passed to command line self.launch_text = text self.launch_langs = langs # Application object self.app = kwargs['application'] # GStreamer playbin object and related setup self.player = Gst.ElementFactory.make('playbin', 'player') bus = self.player.get_bus() bus.add_signal_watch() bus.connect('message', self.on_gst_message) self.player_event = threading.Event() # An event for letting us know when Gst is done playing # Clipboard self.clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD) # This is only for the Clipboard button # Setup window self.setup() def setup(self): self.set_default_icon_name(APP_ID) # Load saved dark mode gtk_settings = Gtk.Settings.get_default() gtk_settings.set_property('gtk-application-prefer-dark-theme', Settings.get().dark_mode) # Connect responsive design function self.connect('check-resize', self.responsive_listener) # Save settings on close self.connect('delete-event', self.save_settings) self.setup_headerbar() self.setup_actionbar() self.setup_translation() self.toggle_mobile_mode() # Load translator self.retry_backend_btn.connect('clicked', self.retry_load_translator) threading.Thread( target=self.load_translator, args=[Settings.get().backend, True], daemon=True ).start() # Get languages available for speech if Settings.get().tts != '': threading.Thread(target=self.load_lang_speech, daemon=True).start() def load_translator(self, backend, launch=False): def update_ui(): # Supported features if not self.translator.supported_features['mistakes']: self.mistakes.set_revealed(False) if not self.translator.supported_features['pronunciation']: self.src_pron_revealer.set_reveal_child(False) self.dest_pron_revealer.set_reveal_child(False) self.app.pronunciation_action.set_enabled(False) else: self.app.pronunciation_action.set_enabled(True) self.no_retranslate = True # Update langs list self.src_lang_selector.set_languages(self.translator.languages) self.dest_lang_selector.set_languages(self.translator.languages) # Update selected langs self.src_lang_selector.set_property( 'selected', 'auto' if Settings.get().src_auto else self._fix_cases(self.src_langs[0]) ) self.dest_lang_selector.set_property( 'selected', self._fix_cases(self.dest_langs[0]) ) self.no_retranslate = False self.main_stack.set_visible_child_name('translate') self.set_property('backend-loading', False) # Show loading view GLib.idle_add(self.main_stack.set_visible_child_name, 'loading') try: # Translator object if TRANSLATORS[backend].supported_features['change-instance']: self.translator = TRANSLATORS[backend]( base_url=Settings.get().get_instance_url(TRANSLATORS[backend].name) ) else: self.translator = TRANSLATORS[backend]() # Get saved languages self.src_langs = Settings.get().get_src_langs(self.translator.name) self.dest_langs = Settings.get().get_dest_langs(self.translator.name) # Update UI GLib.idle_add(update_ui) if launch: self.no_retranslate = True if self.launch_langs['src'] is not None: self.src_lang_selector.set_property('selected', self.launch_langs['src']) if self.launch_langs['dest'] is not None and self.launch_langs['dest'] in self.translator.languages: self.dest_lang_selector.set_property('selected', self.launch_langs['dest']) self.no_retranslate = False if self.launch_text != '': GLib.idle_add(self.translate, self.launch_text, self.launch_langs['src'], self.launch_langs['dest']) except Exception as exc: # Show error view GLib.idle_add(self.main_stack.set_visible_child_name, 'error') GLib.idle_add(self.set_property, 'backend-loading', False) self.error_message.set_label(str(exc)) print('Error: ' + str(exc)) def retry_load_translator(self, _button): threading.Thread( target=self.load_translator, args=[Settings.get().backend], daemon=True ).start() def on_listen_failed(self): self.src_voice_btn.set_image(self.src_voice_warning) self.src_voice_spinner.stop() self.dest_voice_btn.set_image(self.dest_voice_warning) self.dest_voice_spinner.stop() tooltip_text = _('A network issue has occured. Retry?') self.src_voice_btn.set_tooltip_text(tooltip_text) self.dest_voice_btn.set_tooltip_text(tooltip_text) self.send_notification(_('A network issue has occured.\nPlease try again.')) src_text = self.src_buffer.get_text( self.src_buffer.get_start_iter(), self.src_buffer.get_end_iter(), True ) dest_text = self.dest_buffer.get_text( self.dest_buffer.get_start_iter(), self.dest_buffer.get_end_iter(), True ) if self.tts_langs: self.app.listen_src_action.set_enabled( self.src_lang_selector.get_property('selected') in self.tts_langs and src_text != '' ) self.app.listen_dest_action.set_enabled( self.dest_lang_selector.get_property('selected') in self.tts_langs and dest_text != '' ) else: self.app.listen_src_action.set_enabled(src_text != '') self.app.listen_dest_action.set_enabled(dest_text != '') def load_lang_speech(self, listen=False, text=None, language=None): """ Load the language list for TTS. text and language parameters are only needed with listen parameter. """ try: self.voice_loading = True self.tts = TTS[Settings.get().tts]() self.tts_langs = self.tts.languages if not listen: GLib.idle_add(self.toggle_voice_spinner, False) elif language in self.tts_langs and text != '': self.voice_download(text, language) except RuntimeError as exc: GLib.idle_add(self.on_listen_failed) print('Error: ' + str(exc)) finally: if not listen: self.voice_loading = False def setup_headerbar(self): # Left lang selector self.src_lang_selector = DialectLangSelector() self.src_lang_selector.connect('notify::selected', self.on_src_lang_changed) # Set popover selector to button self.src_lang_btn.set_popover(self.src_lang_selector) self.src_lang_selector.set_relative_to(self.src_lang_btn) # Right lang selector self.dest_lang_selector = DialectLangSelector() self.dest_lang_selector.connect('notify::selected', self.on_dest_lang_changed) # Set popover selector to button self.dest_lang_btn.set_popover(self.dest_lang_selector) self.dest_lang_selector.set_relative_to(self.dest_lang_btn) self.langs_button_box.set_homogeneous(False) # Add menu to menu button builder = Gtk.Builder.new_from_resource(f'{RES_PATH}/menu.ui') menu = builder.get_object('app-menu') menu_popover = Gtk.Popover.new_from_model(self.menu_btn, menu) self.menu_btn.set_popover(menu_popover) def setup_actionbar(self): # Set popovers to lang buttons self.src_lang_btn2.set_popover(self.src_lang_selector) self.dest_lang_btn2.set_popover(self.dest_lang_selector) def setup_translation(self): # Left buffer self.src_buffer = self.src_text.get_buffer() self.src_buffer.set_text(self.launch_text) self.src_buffer.connect('changed', self.on_src_text_changed) self.src_buffer.connect('end-user-action', self.user_action_ended) self.connect('key-press-event', self.update_trans_button) # Translate button self.translate_btn.connect('clicked', self.translation) # "Did you mean" links self.mistakes_label.connect('activate-link', self.on_mistakes_clicked) # Right buffer self.dest_buffer = self.dest_text.get_buffer() self.dest_buffer.set_text('') self.dest_buffer.connect('changed', self.on_dest_text_changed) # Translation progress spinner self.trans_spinner.hide() self.trans_warning.hide() # Voice buttons prep-work self.src_voice_warning = Gtk.Image.new_from_icon_name( 'dialog-warning-symbolic', Gtk.IconSize.BUTTON) self.src_voice_image = Gtk.Image.new_from_icon_name( 'audio-speakers-symbolic', Gtk.IconSize.BUTTON) self.src_voice_spinner = Gtk.Spinner() # For use while audio is running or still loading. self.dest_voice_warning = Gtk.Image.new_from_icon_name( 'dialog-warning-symbolic', Gtk.IconSize.BUTTON) self.dest_voice_image = Gtk.Image.new_from_icon_name( 'audio-speakers-symbolic', Gtk.IconSize.BUTTON) self.dest_voice_spinner = Gtk.Spinner() self.toggle_voice_spinner(True) self.src_voice_btn.set_visible(Settings.get().tts != '') self.dest_voice_btn.set_visible(Settings.get().tts != '') def responsive_listener(self, _window): size = self.get_size() if size.width < 680: if self.mobile_mode is False: self.mobile_mode = True self.toggle_mobile_mode() else: if self.mobile_mode is True: self.mobile_mode = False self.toggle_mobile_mode() def toggle_mobile_mode(self): if self.mobile_mode: # Show actionbar self.actionbar.set_reveal_child(True) # Change headerbar title self.title_stack.set_visible_child_name('label') # Change translation box orientation self.translator_box.set_orientation(Gtk.Orientation.VERTICAL) # Change lang selectors position self.src_lang_selector.set_relative_to(self.src_lang_btn2) self.dest_lang_selector.set_relative_to(self.dest_lang_btn2) else: # Hide actionbar self.actionbar.set_reveal_child(False) # Reset headerbar title self.title_stack.set_visible_child_name('selector') # Reset translation box orientation self.translator_box.set_orientation(Gtk.Orientation.HORIZONTAL) # Reset lang selectors position self.src_lang_selector.set_relative_to(self.src_lang_btn) self.dest_lang_selector.set_relative_to(self.dest_lang_btn) def translate(self, text, src_lang, dest_lang): """ Translates the given text from auto detected language to last used language """ # Set src lang to Auto if src_lang is None: self.src_lang_selector.set_property('selected', 'auto') else: self.src_lang_selector.set_property('selected', src_lang) if dest_lang is not None and dest_lang in self.translator.languages: self.dest_lang_selector.set_property('selected', dest_lang) # Set text to src buffer self.src_buffer.set_text(text) # Run translation self.translation(None) def save_settings(self, *args, **kwargs): if not self.is_maximized(): size = self.get_size() Settings.get().window_size = (size.width, size.height) if self.translator is not None: Settings.get().set_src_langs(self.translator.name, self.src_langs) Settings.get().set_dest_langs(self.translator.name, self.dest_langs) def send_notification(self, text, timeout=5): """ Display an in-app notification. Args: text (str): The text or message of the notification. timeout (int, optional): The time before the notification disappears. Defaults to 5. """ self.notification_label.set_text(text) self.notification_revealer.set_reveal_child(True) timer = threading.Timer( timeout, GLib.idle_add, args=[self.notification_revealer.set_reveal_child, False] ) timer.start() def toggle_voice_spinner(self, active=True): if active: self.app.listen_src_action.set_enabled(False) self.src_voice_btn.set_image(self.src_voice_spinner) self.src_voice_spinner.start() self.app.listen_dest_action.set_enabled(False) self.dest_voice_btn.set_image(self.dest_voice_spinner) self.dest_voice_spinner.start() else: src_text = self.src_buffer.get_text( self.src_buffer.get_start_iter(), self.src_buffer.get_end_iter(), True ) self.app.listen_src_action.set_enabled( self.src_lang_selector.get_property('selected') in self.tts_langs and src_text != '' ) self.src_voice_btn.set_image(self.src_voice_image) self.src_voice_spinner.stop() dest_text = self.dest_buffer.get_text( self.dest_buffer.get_start_iter(), self.dest_buffer.get_end_iter(), True ) self.app.listen_dest_action.set_enabled( self.dest_lang_selector.get_property('selected') in self.tts_langs and dest_text != '' ) self.dest_voice_btn.set_image(self.dest_voice_image) self.dest_voice_spinner.stop() def on_src_lang_changed(self, _obj, _param): code = self._fix_cases(self.src_lang_selector.get_property('selected')) dest_code = self._fix_cases(self.dest_lang_selector.get_property('selected')) src_text = self.src_buffer.get_text( self.src_buffer.get_start_iter(), self.src_buffer.get_end_iter(), True ) if code == dest_code: code = self._fix_cases( self.dest_langs[1] if code == self.src_langs[0] else dest_code ) self.dest_lang_selector.set_property('selected', self._fix_cases(self.src_langs[0])) # Disable or enable listen function. if self.tts_langs and Settings.get().tts != '': self.app.listen_src_action.set_enabled(code in self.tts_langs and src_text != '') if code in self.translator.languages: self.src_lang_label.set_label(get_lang_name(code)) # Update saved src langs list if code in self.src_langs: # Bring lang to the top self.src_langs.remove(code) elif code.lower() in self.src_langs: # Bring lang to the top self.src_langs.remove(code.lower()) elif len(self.src_langs) == 4: self.src_langs.pop() self.src_langs.insert(0, code) else: self.src_lang_label.set_label(_('Auto')) # Rewrite recent langs self.src_lang_selector.clear_recent() self.src_lang_selector.insert_recent('auto', _('Auto')) for code in self.src_langs: code = self._fix_cases(code) self.src_lang_selector.insert_recent(code, get_lang_name(code)) # Refresh list self.src_lang_selector.refresh_selected() # Translate again if not self.no_retranslate: self.translation(None) def on_dest_lang_changed(self, _obj, _param): code = self._fix_cases(self.dest_lang_selector.get_property('selected')) src_code = self._fix_cases(self.src_lang_selector.get_property('selected')) dest_text = self.dest_buffer.get_text( self.dest_buffer.get_start_iter(), self.dest_buffer.get_end_iter(), True ) if code == src_code: code = self._fix_cases(src_code) self.src_lang_selector.set_property('selected', self._fix_cases(self.dest_langs[0])) # Disable or enable listen function. if self.tts_langs and Settings.get().tts != '': self.app.listen_dest_action.set_enabled(code in self.tts_langs and dest_text != '') self.dest_lang_label.set_label(get_lang_name(code)) # Update saved dest langs list if code in self.dest_langs: # Bring lang to the top self.dest_langs.remove(code) elif code.lower() in self.dest_langs: # Bring lang to the top self.dest_langs.remove(code.lower()) elif len(self.src_langs) == 4: self.dest_langs.pop() self.dest_langs.insert(0, code) # Rewrite recent langs self.dest_lang_selector.clear_recent() for code in self.dest_langs: code = self._fix_cases(code) self.dest_lang_selector.insert_recent(code, get_lang_name(code)) # Refresh list self.dest_lang_selector.refresh_selected() # Translate again if not self.no_retranslate: self.translation(None) """ User interface functions """ def ui_return(self, _action, _param): """Go back one step in history.""" if self.current_history != TRANS_NUMBER: self.current_history += 1 self.history_update() def ui_forward(self, _action, _param): """Go forward one step in history.""" if self.current_history != 0: self.current_history -= 1 self.history_update() def add_history_entry(self, src_language, dest_language, src_text, dest_text): """Add a history entry to the history list.""" new_history_trans = { 'Languages': [src_language, dest_language], 'Text': [src_text, dest_text] } if self.current_history > 0: del self.translator.history[: self.current_history] self.current_history = 0 if len(self.translator.history) == TRANS_NUMBER: self.translator.history.pop() self.translator.history.insert(0, new_history_trans) GLib.idle_add(self.reset_return_forward_btns) def switch_all(self, src_language, dest_language, src_text, dest_text): self.src_lang_selector.set_property('selected', dest_language) self.dest_lang_selector.set_property('selected', src_language) self.src_buffer.set_text(dest_text) self.dest_buffer.set_text(src_text) self.add_history_entry(src_language, dest_language, src_text, dest_text) # Re-enable widgets self.langs_button_box.set_sensitive(True) self.translate_btn.set_sensitive(self.src_buffer.get_char_count() != 0) def switch_auto_lang(self, dest_language, src_text, dest_text): src_language = self.translator.detect(src_text).lang if isinstance(src_language, list): src_language = src_language[0] # Switch all GLib.idle_add(self.switch_all, src_language, dest_language, src_text, dest_text) def ui_switch(self, _action, _param): # Get variables self.langs_button_box.set_sensitive(False) self.translate_btn.set_sensitive(False) src_language = self.src_lang_selector.get_property('selected') dest_language = self.dest_lang_selector.get_property('selected') src_text = self.src_buffer.get_text( self.src_buffer.get_start_iter(), self.src_buffer.get_end_iter(), True ) dest_text = self.dest_buffer.get_text( self.dest_buffer.get_start_iter(), self.dest_buffer.get_end_iter(), True ) if src_language == 'auto': if src_text == '': src_language = self.src_langs[0] else: threading.Thread( target=self.switch_auto_lang, args=(dest_language, src_text, dest_text), daemon=True ).start() return # Switch all self.switch_all(src_language, dest_language, src_text, dest_text) def ui_clear(self, _action, _param): self.src_buffer.set_text('') self.src_buffer.emit('end-user-action') def ui_copy(self, _action, _param): dest_text = self.dest_buffer.get_text( self.dest_buffer.get_start_iter(), self.dest_buffer.get_end_iter(), True ) self.clipboard.set_text(dest_text, -1) self.clipboard.store() def ui_paste(self, _action, _param): text = self.clipboard.wait_for_text() if text is not None: end_iter = self.src_buffer.get_end_iter() self.src_buffer.insert(end_iter, text) def ui_src_voice(self, _action, _param): src_text = self.src_buffer.get_text( self.src_buffer.get_start_iter(), self.src_buffer.get_end_iter(), True ) src_language = self.src_lang_selector.get_property('selected') self._voice(src_text, src_language) def ui_dest_voice(self, _action, _param): dest_text = self.dest_buffer.get_text( self.dest_buffer.get_start_iter(), self.dest_buffer.get_end_iter(), True ) dest_language = self.dest_lang_selector.get_property('selected') self._voice(dest_text, dest_language) def _voice(self, text, lang): if text != '': self.toggle_voice_spinner(True) if self.tts_langs: threading.Thread( target=self.voice_download, args=(text, lang), daemon=True ).start() else: threading.Thread( target=self.load_lang_speech, args=(True, text, lang), daemon=True ).start() def on_gst_message(self, _bus, message): if message.type == Gst.MessageType.EOS: self.player.set_state(Gst.State.NULL) self.player_event.set() elif message.type == Gst.MessageType.ERROR: self.player.set_state(Gst.State.NULL) self.player_event.set() print('Some error occured while trying to play.') def voice_download(self, text, language): try: self.voice_loading = True with NamedTemporaryFile() as file_to_play: self.tts.download_voice(text, language, file_to_play) self.player.set_property('uri', 'file://' + file_to_play.name) self.player.set_state(Gst.State.PLAYING) self.player_event.wait() except Exception as exc: print(exc) print('Audio download failed.') GLib.idle_add(self.on_listen_failed) else: GLib.idle_add(self.toggle_voice_spinner, False) finally: self.voice_loading = False # This starts the translation if Ctrl+Enter button is pressed def update_trans_button(self, button, keyboard): modifiers = keyboard.get_state() & Gtk.accelerator_get_default_mod_mask() control_mask = Gdk.ModifierType.CONTROL_MASK shift_mask = Gdk.ModifierType.SHIFT_MASK unicode_key_val = Gdk.keyval_to_unicode(keyboard.keyval) enter_keys = (Gdk.KEY_Return, Gdk.KEY_KP_Enter) if (GLib.unichar_isgraph(chr(unicode_key_val)) and modifiers in (shift_mask, 0) and not self.src_text.is_focus()): self.src_text.grab_focus() if not Settings.get().live_translation: if control_mask == modifiers: if keyboard.keyval in enter_keys: if not Settings.get().translate_accel_value: self.translation(button) return Gdk.EVENT_STOP return Gdk.EVENT_PROPAGATE elif keyboard.keyval in enter_keys: if Settings.get().translate_accel_value: self.translation(button) return Gdk.EVENT_STOP return Gdk.EVENT_PROPAGATE return Gdk.EVENT_PROPAGATE def on_mistakes_clicked(self, _button, _data): self.mistakes.set_revealed(False) self.src_buffer.set_text(self.trans_mistakes[1]) # Run translation again self.translation(None) def on_src_text_changed(self, buffer): sensitive = buffer.get_char_count() != 0 self.translate_btn.set_sensitive(sensitive) self.app.clear_action.set_enabled(sensitive) if not self.voice_loading and self.tts_langs: self.app.listen_src_action.set_enabled( self.src_lang_selector.get_property('selected') in self.tts_langs and sensitive ) elif not self.voice_loading and not self.tts_langs: self.app.listen_src_action.set_enabled(sensitive) def on_dest_text_changed(self, buffer): sensitive = buffer.get_char_count() != 0 self.app.copy_action.set_enabled(sensitive) if not self.voice_loading and self.tts_langs: self.app.listen_dest_action.set_enabled( self.dest_lang_selector.get_property('selected') in self.tts_langs and sensitive ) elif not self.voice_loading and not self.tts_langs: self.app.listen_dest_action.set_enabled(sensitive) def user_action_ended(self, buffer): # If the text is over the highest number of characters allowed, it is truncated. # This is done for avoiding exceeding the limit imposed by Google. if buffer.get_char_count() >= MAX_LENGTH: self.send_notification(_('5000 characters limit reached!')) src_text = buffer.get_text( buffer.get_start_iter(), buffer.get_end_iter(), True ) self.src_buffer.set_text(src_text[:MAX_LENGTH]) self.char_counter.set_text(f'{str(buffer.get_char_count())}/{MAX_LENGTH}') if Settings.get().live_translation: self.translation(None) # The history part def reset_return_forward_btns(self): self.app.back_action.set_enabled(self.current_history < len(self.translator.history) - 1) self.app.forward_action.set_enabled(self.current_history > 0) # Retrieve translation history def history_update(self): self.reset_return_forward_btns() lang_hist = self.translator.history[self.current_history] self.no_retranslate = True self.src_lang_selector.set_property('selected', lang_hist['Languages'][0]) self.dest_lang_selector.set_property('selected', lang_hist['Languages'][1]) self.no_retranslate = False self.src_buffer.set_text(lang_hist['Text'][0]) self.dest_buffer.set_text(lang_hist['Text'][1]) def set_no_retranslate(self, state): self.no_retranslate = state # THE TRANSLATION AND SAVING TO HISTORY PART def appeared_before(self): src_language = self.src_lang_selector.get_property('selected') dest_language = self.dest_lang_selector.get_property('selected') src_text = self.src_buffer.get_text( self.src_buffer.get_start_iter(), self.src_buffer.get_end_iter(), True ) if ( len(self.translator.history) >= self.current_history + 1 and (self.translator.history[self.current_history]['Languages'][0] == src_language or 'auto') and self.translator.history[self.current_history]['Languages'][1] == dest_language and self.translator.history[self.current_history]['Text'][0] == src_text and not self.trans_failed ) or ( len(self.trans_queue) == 1 and (self.trans_queue[0].get('src_language') == src_language or 'auto') and self.trans_queue[0].get('dest_language') == dest_language and self.trans_queue[0].get('src_text') == src_text ): return True return False def translation(self, _button): # If it's like the last translation then it's useless to continue if not self.appeared_before(): src_text = self.src_buffer.get_text( self.src_buffer.get_start_iter(), self.src_buffer.get_end_iter(), True ) src_language = self.src_lang_selector.get_property('selected') dest_language = self.dest_lang_selector.get_property('selected') if self.trans_queue: self.trans_queue.pop(0) self.trans_queue.append({ 'src_text': src_text, 'src_language': src_language, 'dest_language': dest_language }) # Check if there are any active threads. if self.active_thread is None: # Show feedback for start of translation. self.trans_spinner.show() self.trans_spinner.start() self.dest_box.set_sensitive(False) self.langs_button_box.set_sensitive(False) # If there is no active thread, create one and start it. self.active_thread = threading.Thread(target=self.run_translation, daemon=True) self.active_thread.start() def change_backends(self, backend): self.set_property('backend-loading', True) # Save previous backend settings self.save_settings() # Load translator threading.Thread( target=self.load_translator, args=[backend], daemon=True ).start() def run_translation(self): def on_trans_failed(): self.trans_warning.show() self.send_notification(_('Translation failed.\nPlease check for network issues.')) self.app.copy_action.set_enabled(False) self.app.listen_src_action.set_enabled(False) self.app.listen_dest_action.set_enabled(False) def on_trans_success(): self.trans_warning.hide() def on_trans_done(): self.trans_spinner.stop() self.trans_spinner.hide() self.dest_box.set_sensitive(True) self.langs_button_box.set_sensitive(True) def on_mistakes(): if self.trans_mistakes is not None and self.translator.supported_features['mistakes']: self.mistakes_label.set_markup(_('Did you mean: ') + f'{self.trans_mistakes[0]}') self.mistakes.set_revealed(True) elif self.mistakes.get_revealed(): self.mistakes.set_revealed(False) def on_pronunciation(): reveal = Settings.get().show_pronunciation if self.translator.supported_features['pronunciation']: if self.trans_src_pron is not None: self.src_pron_label.set_text(self.trans_src_pron) self.src_pron_revealer.set_reveal_child(reveal) elif self.src_pron_revealer.get_reveal_child(): self.src_pron_revealer.set_reveal_child(False) if self.trans_dest_pron is not None: self.dest_pron_label.set_text(self.trans_dest_pron) self.dest_pron_revealer.set_reveal_child(reveal) elif self.dest_pron_revealer.get_reveal_child(): self.dest_pron_revealer.set_reveal_child(False) while self.trans_queue: # If the first language is revealed automatically, let's set it trans_dict = self.trans_queue.pop(0) src_text = trans_dict['src_text'] src_language = trans_dict['src_language'] dest_language = trans_dict['dest_language'] if src_language == 'auto' and src_text != '': try: src_language = self.translator.detect(src_text).lang if isinstance(src_language, list): src_language = src_language[0] if src_language in self.translator.languages: GLib.idle_add(self.set_no_retranslate, True) GLib.idle_add(self.src_lang_selector.set_property, 'selected', src_language) GLib.idle_add(self.set_no_retranslate, False) if src_language not in self.src_langs: self.src_langs[0] = src_language else: src_language = 'auto' except Exception: self.trans_failed = True # If the two languages are the same, nothing is done if src_language != dest_language: dest_text = '' # THIS IS WHERE THE TRANSLATION HAPPENS. The try is necessary to circumvent a bug of the used API if src_text != '': try: translation = self.translator.translate( src_text, src=src_language, dest=dest_language ) dest_text = translation.text self.trans_mistakes = translation.extra_data['possible-mistakes'] self.trans_src_pron = translation.extra_data['src-pronunciation'] self.trans_dest_pron = translation.extra_data['dest-pronunciation'] self.trans_failed = False except Exception as exc: print(exc) self.trans_mistakes = None self.trans_pronunciation = None self.trans_failed = True # Finally, everything is saved in history self.add_history_entry( src_language, dest_language, src_text, dest_text ) else: self.trans_failed = False self.trans_mistakes = None self.trans_src_pron = None self.trans_dest_pron = None GLib.idle_add(self.dest_buffer.set_text, dest_text) GLib.idle_add(on_mistakes) GLib.idle_add(on_pronunciation) if self.trans_failed: GLib.idle_add(on_trans_failed) else: GLib.idle_add(on_trans_success) GLib.idle_add(on_trans_done) self.active_thread = None @staticmethod def _fix_cases(code): return code.replace('cn', 'CN').replace('tw', 'TW') dialect-1.4.1/meson.build000066400000000000000000000023541413401356600152730ustar00rootroot00000000000000project('dialect', version: '1.4.1', meson_version: '>= 0.50.0', default_options: [ 'warning_level=2', ], ) python = import('python') i18n = import('i18n') pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name()) moduledir = join_paths(pkgdatadir, 'dialect') conf = configuration_data() conf.set('PYTHON', python.find_installation('python3').path()) conf.set('VERSION', meson.project_version()) conf.set('BIN', join_paths(get_option('prefix'), get_option('bindir'), meson.project_name())) conf.set('pkgdatadir', pkgdatadir) conf.set('datadir', get_option('datadir')) conf.set('prefix', get_option('prefix')) conf.set('localedir', join_paths(get_option('prefix'), get_option('localedir'))) message('Looking for dependencies') py_installation = python.find_installation('python3') if not py_installation.found() error('No valid python3 binary found') else message('Found python3 binary') endif dependency('gobject-introspection-1.0', version: '>= 1.35.0') dependency('gtk+-3.0', version: '>= 3.22') dependency('glib-2.0') dependency('pygobject-3.0', version: '>= 3.29.1') subdir('data') subdir('dialect') subdir('po') meson.add_install_script('build-aux/meson/postinstall.py') dialect-1.4.1/po/000077500000000000000000000000001413401356600135435ustar00rootroot00000000000000dialect-1.4.1/preview-2.png000066400000000000000000000637251413401356600154700ustar00rootroot00000000000000PNG  IHDRT`8sBIT|dtEXtSoftwaregnome-screenshot> IDATxw|SwmhK)DQPE'*KETP8UW 뼂" !2K-Bw~ M6Iyӓ3> $| /u8.WAy=`y#ظsr'@k* SԱ {`8S0ӝuBP u+ːRN"Dp'9|u%VVdpqw r)i*hNj:v6xU ܹ?*op*n^rQ,Vi‰;aʠCSa ;NqP6L9X_q;w<٩ETA ?rQTlv+,, UEv4םU @i*l*h6OB;aXtlOP T ;[JPJ NyMA-VJ*A/E*o*(TN Pʝ0e,f^\UyeS9C1DzC!ʱMs^BMaa*|8~3otA[9LE .LZ07HeO\E,SvHzzR91*)).ͪ~}^>UE,֢P T3UX  j}Q uoީ|Ye쮳gisڵmovm귽{5zUV26M}DR5C:vԈ[*88ȵ_o5oDGܦuH8ګa9z\Nm.)򸯯N{$jiߟQ+.׈[J34zac[x-2=p.%9dueW[4k}S'f`0hs/ȱcjִiYPx6)qBVYw˩\[ aV. WXm6l6d2IFnG~zZr=WfzS;v镗+,4ToN`(3h1؉Izg4mK))=uJOX;wiowk=Ju'h꣏) hT =oW濠SCCl63D imZpg[]ğݣ }znkz'yߤ S:=n/ò޽qHu.Q5̓װA׻}Leˣg{^~DGS͓ =k JN{yܲIy*K S,r:#0BGJpY5܃s欬6zt\E6dqeؐjռNGs7oڴOH~cF-9HK.+?Nc%kFÓ/cGi' MzQ-YjՌ($%? NMKӏ?o֬GzX$֡7hʷrk HƍS̚-ѻtU%I7A{tw^)):yO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D=Tay9Ste6Qux<}?{[_U^FGaϿPqqTPPqۋvEK>L{$x gemsXg:~N# <NM?фAmjwa!i@CJſbZfOWC/646i|wLz^c:@.g[)^}zz fG]r1}N:ӌ5J{3gwޔ%h?!#MR]}*+@׮[û;zekX, uAiAX%rMϯ"pew_|}ntA]ԻooPϳ d+*GOo~q -6?zSpast3[./;t.%z?z.=n:\]iK[skw ۼ;J1L}>]6u6o"I3Fo3oSeEE+M Td**3O>.5r[m2tT"0ܔy ;hvjWS]Ovy6=IhxVwX,=6 Gl5|556]IDAT%Tx hg?Wĉ[,s8zYg^RÔwf N6uHٺ.y~K$>|]?ѻ3:Z- Ijhh0.[ڂ׾|'_ڸqZIuUVnWQw5PyoF_lAp{ORBP=\ q 7VC]YRFuhA*nF b /sVм97Y><",j$q]/BSpxeP-PEETpN^S,*Ԩ*qS050E_ Uʟ?dSw S q|@v (T c˨~ Tv b~n@/Xz'b TA*̃Ô:POkU0;EP{;R/U`ةHP XQc,~ulTs u TA*ZTp"X/\K*ӈ~BRm.HEُ@=:\c|Tb!"3RxT"3ExU,*\4(E܃S"ܮR`;EpoV=S( ]p*4vK&m4VPS@_iPc6 VS0w?3$T A.zk/UߑvLJa6oGz^b Uc P SRBJP彎BMn ohzBM:ܲ1T 7_"XzT@.OD Up)a*XoI"b u6w6Tt;2JT81"ݎeXN po%(D ULKF`5DrG,3D>iA+!%Ҽ9> Ygc"IJ xdP-)L 6RG]v-^@IENDB`dialect-1.4.1/setup.cfg000066400000000000000000000001641413401356600147470ustar00rootroot00000000000000[flake8] max-line-length = 120 exclude = build-aux/flatpak max-complexity = 15 [pycodestyle] max-line-length = 120