pax_global_header00006660000000000000000000000064126507243610014520gustar00rootroot0000000000000052 comment=b3ea45db683b68d3b41d6767499385972c0158a6 nfoview-1.18/000077500000000000000000000000001265072436100131265ustar00rootroot00000000000000nfoview-1.18/.gitignore000066400000000000000000000001521265072436100151140ustar00rootroot00000000000000*.py[co] *~ .cache .hidden __pycache__ build/ data/nfoview.appdata.xml data/nfoview.desktop dist/ locale/ nfoview-1.18/.travis.yml000066400000000000000000000005661265072436100152460ustar00rootroot00000000000000language: python python: - 3.2 before_install: - sudo apt-get update -qq - sudo apt-get install -y gettext gir1.2-gtk-3.0 intltool python3-gi xvfb virtualenv: system_site_packages: true script: # XXX: Travis CI has GTK+ 3.4, which is too old to run unit tests. # - xvfb-run py.test nfoview - python setup.py clean - python setup.py install --prefix=/tmp/usr nfoview-1.18/.tx/000077500000000000000000000000001265072436100136375ustar00rootroot00000000000000nfoview-1.18/.tx/config000066400000000000000000000002211265072436100150220ustar00rootroot00000000000000[main] host = https://www.transifex.com [nfoview.nfoviewpot] file_filter = po/.po source_file = po/nfoview.pot source_lang = en type = PO nfoview-1.18/AUTHORS.md000066400000000000000000000000371265072436100145750ustar00rootroot00000000000000Osmo Salomaa nfoview-1.18/COPYING000066400000000000000000001045131265072436100141650ustar00rootroot00000000000000 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 . nfoview-1.18/INSTALL.md000066400000000000000000000010551265072436100145570ustar00rootroot00000000000000Installation ============ To install, run command python3 setup.py install [--prefix=...] You'll need Python, gettext and intltool. Uninstallation ============== To uninstall, remove files and directories .../bin/nfoview .../lib/python3.*/dist-packages/nfoview* .../lib/python3.*/site-packages/nfoview* .../share/appdata/nfoview.appdata.xml .../share/applications/nfoview.desktop .../share/icons/hicolor/*/apps/nfoview.* .../share/locale/*/LC_MESSAGES/nfoview.mo .../share/man/man1/nfoview.1 .../share/nfoview/ nfoview-1.18/NEWS.md000066400000000000000000000203271265072436100142300ustar00rootroot00000000000000NFO Viewer 1.18 =============== * Work around a drag destination Gtk-WARNING ([#721708]) [#721708]: https://bugzilla.gnome.org/show_bug.cgi?id=721708 NFO Viewer 1.17 =============== * Improve URL detection ([#667102]) * Update translations [#667102]: http://bugzilla.gnome.org/show_bug.cgi?id=667102 NFO Viewer 1.16 =============== * Use a header bar and a menu button in application windows * Use a header bar for the preferences dialog * Migrate from deprecated `Gtk.UIManager`, `Gtk.Action` etc. to `Gtk.Application`, `Gio.Action` etc. * New application icon * Use markdown for documentation files (`README` etc.) * Bump GTK+ depedency to version 3.12 * Add European Portuguese translation (Pedro Albuquerque) * Update Polish translation (Piotr Drąg) * Move web pages from [gna.org][1.16a] to [github.io][1.16b] * Move releases from [gna.org][1.16c] to [github.com][1.16d] * Use [Transifex][1.16e] to manage translations * Close [nfoview-list][1.16f] mailing list, use [gitter.im][1.16g] instead to reach developers * Close [nfoview-announcements][1.16h] mailing list, use [RSS][1.16i] instead to be informed about new releases (see also e.g. [sibbell.com][1.16j]) [1.16a]: http://home.gna.org/nfoview/ [1.16b]: http://otsaloma.github.io/nfoview/ [1.16c]: http://download.gna.org/nfoview/ [1.16d]: http://github.com/otsaloma/nfoview/releases [1.16e]: http://www.transifex.com/projects/p/nfoview/ [1.16f]: http://mail.gna.org/listinfo/nfoview-list/ [1.16g]: http://gitter.im/otsaloma/nfoview [1.16h]: http://mail.gna.org/listinfo/nfoview-announcements/ [1.16i]: http://github.com/otsaloma/nfoview/releases.atom [1.16j]: http://sibbell.com/ NFO Viewer 1.15.1 ================= * Fix detection of theme colors of the default color scheme * Update French translation * Update Turkish translation NFO Viewer 1.15 =============== * Fix preferences dialog padding with GTK+ 3.14 * Fix selection background color with GTK+ 3.14 * Remove use of deprecated stock items, `GtkAlignment` and `gi.types.Boxed.__init__` * Update French translation * Update Turkish translation NFO Viewer 1.14 =============== * Fix default response buttons for dialogs * Make AppData file translatable * Add GTK+ to list of dependencies in the `README` file (GTK+ has always been a dependency, its explicit mention was just forgotten when migrating from PyGTK to PyGObject) * Bump GTK+ dependency to 3.2 or greater NFO Viewer 1.13.1 ================= * Possibly fix default colors with some GTK+ themes * Add an AppData XML file - * Update French translation * Update Turkish translation NFO Viewer 1.13 =============== * Add action to export document as an image file (#622078) * Apply GNOME Goal: Add keywords to application desktop files - * Update Turkish translation NFO Viewer 1.12.1 ================= * Fix error setting colors in the preferences dialog `TypeError: get_rgba() takes exactly 2 arguments (1 given)` NFO Viewer 1.12 =============== * Adapt to new GTK+ theme color names, thus fixing the default color scheme that follows the GTK+ theme * Fix window size calculations NFO Viewer 1.11 =============== * Fix immediate crash resulting from bad use of `Gtk.StyleContext` on newer versions of PyGObject and/or GTK+ (#687513) * Remove deprecated `get_data` and `set_data` calls * Use `Gtk.Grid` for preferences dialog instead of `Gtk.Table` * Release source tarballs only compressed as `tar.xz` (instead of the previous `tar.gz` and `tar.bz2`) NFO Viewer 1.10 =============== * Migrate to Python 3, GTK+ 3, GNOME 3 and PyGI * Bump Python dependency to 3.2 or greater * Replace PyGTK dependency with PyGobject 3.0.0 or greater * Add 48x48 and 256x256 pixel PNG icons and remove SVG icon * Speed up text parsing and display when opening files * Update Bulgarian translation (Svetoslav Stefanov) NFO Viewer 1.9.5 ================ * Fix opening files by drag and drop NFO Viewer 1.9.4 ================ * Fix broken inheritance of action classes, which caused NFO Viewer to fail to start with recent versions of (Py)GTK NFO Viewer 1.9.3 ================ * Update author email address * Move development repository from Gitorious to GitHub () * Abandon use of Transifex for translations * Add Turkish translation (Anonymous) * Add Serbian translation (Goran Velemirov) * Update French translation (Anonymous) NFO Viewer 1.9.2 ================ * Update Polish translation (Piotr Drąg) * Add Russian translation (Алекс) NFO Viewer 1.9.1 ================ * Fix opening blank files (fixes #619289) * Add Hebrew translation (Yaron Shahrabani) * Add Hungarian translation (L. Csordas) NFO Viewer 1.9 ============== * Make the 16x16 px icon paper two pixels wider * Use `gtk.show_uri` to open hyperlinks * Raise PyGTK Dependency to 2.16 * Update German translation (Christoph Wickert) * Update Polish translation (Piotr Drąg) NFO Viewer 1.8 ============== * Add application icon (based on logviewer icon from gnome-icon-theme) * Save menu item keybindings to a GtkAccelMap rc-file in the user's configuration directory * Add French translation (elgeneralmidi) * Add Polish translation (Piotr Drąg) NFO Viewer 1.7 ============== * Add menu item to toggle line-wrapping * Automatically switch to wrapping lines if a line longer than 160 characters is found in the file (the threshold is customizable in the configuration file) * Fall back to "monospace" if preferred font is not found * Fix URL-detection to be less strict * Add Italian translation (Alessio Treglia) NFO Viewer 1.6 ================ * Add configuration file option `text_view_max_lines` to set the maximum window height to an amount of lines and raise its default value from 40 to 45 lines * Fix URL-detection to be more strict * Update Simplified Chinese translation (Jonathan Ye) NFO Viewer 1.5 ============== * Add a quit menu item to close all windows (#581091) * Allow windows to be closed by pressing Escape (#581091) * Update German translation (Christoph Wickert) * Add Swiss German translation (Fabian Affolter) * Add Bulgarian translation (Svetoslav Stefanov) NFO Viewer 1.4 ============== * Handle files with UTF8, UTF16 and UTF32 BOMs * Abort installation if an `intltool-merge` or `msgfmt` call fails NFO Viewer 1.3.1 ================ * Fix gettext translation system for GtkBuilder files NFO Viewer 1.3 ============== * Add two grey low-contrast color schemes * Remove deprecated Encoding field from the desktop file * Use six-character hexadecimal color codes in the configuration file * Fix `GtkWarning: GtkSpinButton: setting an adjustment with non-zero page size is deprecated` * Fix open dialog file filter to list files with upper- and mixed case extensions as well (Simon Morgan, #572877) * Migrate from Libglade to GtkBuilder * Raise Python dependency to 2.5 or greater * Raise PyGTK dependency to 2.12 or greater NFO Viewer 1.2.1 ================ * Remove misuse of assertions that broke menu item sensitivity updates when used with Python's optimization (`-O` switch) * Fix `AssertionError` when installing multiple times (#12388) * Add Simplified Chinese translation (Jonathan Ye) * Switch version-control from svn to git NFO Viewer 1.2 ============== * Remove mimetype installation files and use the new "text/x-nfo" mimetype added with freedesktop.org's shared-mime-info 0.30 NFO Viewer 1.1.2 ================ * Fix `setup.py` to allow building and installing outside X * Fix `setup.py` to run `update-desktop-database` in addition to `update-mime-database` if installing and `--root` not given NFO Viewer 1.1.1 ================ * Fix unavailable stock icon usage on GTK+ < 2.10 (#11585) NFO Viewer 1.1 ============== * Add a menubar * Add open-, preferences- and about dialogs * Allow files to be opened by drag-and-drop * Use Terminus font, size 12, by default * Use text and background colors from GTK theme by default * Improve detection of the default web browser * Add an applications menu entry in the desktop file * Change configuration file style and save the configuration file to `$XDG_CONFIG_HOME/nfoview` (usually `$HOME/.config/nfoview`) as per freedesktop.org's XDG Base Directory Specification * Refactor code and reorganize source directory structure nfoview-1.18/README.md000066400000000000000000000027201265072436100144060ustar00rootroot00000000000000NFO Viewer ========== [![Build Status](https://travis-ci.org/otsaloma/nfoview.svg)](https://travis-ci.org/otsaloma/nfoview) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/otsaloma/nfoview) NFO Viewer is a simple viewer for NFO files, which are "ASCII" art in the CP437 codepage. The advantages of using NFO Viewer instead of a text editor are preset font and encoding settings, automatic window size and clickable hyperlinks. NFO Viewer is free software released under the GNU General Public License (GPL), see the file `COPYING` for details. Dependencies ============ NFO Viewer requires [Python][1] 3.2 or greater, [PyGObject][2] 3.0.0 or greater and [GTK+][3] 3.12 or greater. [Terminus font][4] is recommended and used by default. [1]: http://www.python.org/ [2]: http://wiki.gnome.org/Projects/PyGObject [3]: http://www.gtk.org/ [4]: http://terminus-font.sourceforge.net/ Terminus font is used by default because it renders drawing characters taller than text characters. You can use any other fixed width font that has support for the necessary CP437 drawing characters (e.g. DejaVu Sans Mono), but with them you need to decrease the line-spacing (to a negative value that depends on the font and font size) in order to remove blank space between adjacent lines of drawing characters. Running ======= To try NFO Viewer from the source directory without installation, use command `bin/nfoview`. For installing NFO Viewer, see the file `INSTALL.md`. nfoview-1.18/RELEASING.md000066400000000000000000000016401265072436100147620ustar00rootroot00000000000000Releasing a New Version ======================= * Update translations - `tx pull` - `tools/update-translations` - `virtaal po/fi.po` - `tools/check-translations` - `tx push -stf` - `git commit -a -m "Update translations for X.Y.Z"` * Do final quality checks - `python3 -Wd bin/nfoview` - `pyflakes bin/nfoview nfoview setup.py` - `py.test --tb=no nfoview` * Bump version number - `nfoview/__init__.py` * Update `NEWS.md` and `TODO.md` * Check that installation works - `sudo python3 setup.py install --prefix=/usr/local` - `sudo python3 setup.py clean` - `/usr/local/bin/nfoview` * Commit changes - `git commit -a -m "RELEASE X.Y.Z"` - `git tag -s X.Y.Z` - `git push` - `git push --tags` * Add release notes on GitHub * Update web sites - - nfoview-1.18/TODO.md000066400000000000000000000001661265072436100142200ustar00rootroot00000000000000NFO Viewer 2.0 ============== * Migrate away from things deprecated since Gtk 3.16 (see `python3 -Wd bin/nfoview`) nfoview-1.18/bin/000077500000000000000000000000001265072436100136765ustar00rootroot00000000000000nfoview-1.18/bin/nfoview000077500000000000000000000010421265072436100152760ustar00rootroot00000000000000#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys def prepare_paths(): # If running from source, add root directory to sys.path. # '__file__' attribute missing implies a frozen installation. if not "__file__" in globals(): return bindir = os.path.dirname(os.path.abspath(__file__)) if not os.path.isfile(os.path.join( bindir, "..", "data", "nfoview.desktop.in")): return sys.path.insert(0, os.path.abspath(os.path.join(bindir, ".."))) prepare_paths() import nfoview nfoview.main(sys.argv[1:]) nfoview-1.18/data/000077500000000000000000000000001265072436100140375ustar00rootroot00000000000000nfoview-1.18/data/icons/000077500000000000000000000000001265072436100151525ustar00rootroot00000000000000nfoview-1.18/data/icons/16x16/000077500000000000000000000000001265072436100157375ustar00rootroot00000000000000nfoview-1.18/data/icons/16x16/nfoview.png000066400000000000000000000012021265072436100201150ustar00rootroot00000000000000PNG  IHDRasBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8kQsmi#H[)J[?M 3:8AEA C:CQkҴIRSw\,,Lb!$ sL}-jn5ⲟ(/C.*" : Hx'x>7#JAl/UATP SY:y6*i+3L13xr opf83kc*jjy\zvw G*)c\<{8e+ r3xxrhBVL[~oݶx+VNG8,mAUQSd١)t:h M])RΔ%Q!J4Czre|bumMƸd};bclQ#9#N8;,Q6k|DIXѡ>&NUJ=Izɋe0"3W,!<IENDB`nfoview-1.18/data/icons/22x22/000077500000000000000000000000001265072436100157315ustar00rootroot00000000000000nfoview-1.18/data/icons/22x22/nfoview.png000066400000000000000000000014631265072436100201200ustar00rootroot00000000000000PNG  IHDRĴl;bKGD pHYs B(xtIME;IDAT8˵;hQs5Q!j b%`#ABFmD&6H*A-,,DQA"XB%hVİٸsN|˝;;E+imV9Il$*¹kʸ;]\Ͷ/~xL׮>wOch{{\DU:Jspwpwܝ[Vh{a^xήE =!2Ljݰ>O>Oǡ'#tu."2dhXMGf޺Oe?'#~ oXcGݻ wg]&Pu$ZKWlj231Qd5oU1fIMufdJŇɂ J2@=?Xa*%>D}笹|Ӊ cod}Nwŭzn>xKiL  <yKP'v^nB[YKμR ipZWX ){?-*gjYMmr<|Ak G+XKss&g*Q,IT0 +;Dٚ ɂl37_$8Tj5NʗԂbi M17tP,M*cٽ{NިKMbi{Nި7 0оvU=˒fױ+/oy@kf?}޳ IENDB`nfoview-1.18/data/icons/24x24/000077500000000000000000000000001265072436100157355ustar00rootroot00000000000000nfoview-1.18/data/icons/24x24/nfoview.png000066400000000000000000000015531265072436100201240ustar00rootroot00000000000000PNG  IHDRw=sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATH;hTQs#_ED@@BFmD&6H*A-,,$ )EDJѬaqs޻{3c!C4;7]hnY9n6dj)\u af9w{zh7F{Ҽt]rQD$Y^ޝ=0m7pj<0omm|>L([u0m˨8gq*h r6ụ!aPox1M̒cN܎q?g03ԒjuT3y/?|x(rNgapN2L*WMir3TU.DNuqЎY{?|TG=-zT#>$jy3lX;?P/!&>hdu!qg=EnSSC^39I , e3Q)[7=H[SUuPs.> (dIs'lEGl\xS3h\t<$KтdR1 d1*υǞjSvH4$[[@tlmXDUF[vwK)&@emgO?bf!" +6_yWaiQor> Tk荱7.WƆf6-i"#d ףq[IENDB`nfoview-1.18/data/icons/256x256/000077500000000000000000000000001265072436100161135ustar00rootroot00000000000000nfoview-1.18/data/icons/256x256/nfoview.png000066400000000000000000000366131265072436100203070ustar00rootroot00000000000000PNG  IHDR\rfsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org< IDATx}y]Gy=IOeYeI^+$dI&BH 嘙P" 680d% L0lmc8 6$Kւ-{osﻭ?;ݿusUZkXddddd,`dX #c# @FF, Y220dd,`dX #c# @FF, Y220dd,`dXoƱޥ ԩZJw2 ZJӽEc=yww@Rг.J oW&e,Lhnj싏4 E2pEhߺ}E+?`ջWͽkf@mz QCnOFQc?'a 6(Qxے߷?c"a$@)Pgk}iO:a)\pFXJXXzb)1J孁Ziᣰ{aؽs{p?t4}_z͊#˖||,ܰ ~U^r.\x0>1|4|GO޽ ya/#%~` /=s-7o|9CnYF߸ȧomO<+%z oCl##ŭ;d~ :xۛ^c٭a/|~+zdVc?5* GBN'mQiς_˗G22c3IVW+m[fck&&ƏGw"?2?#9\Ow"431~.yweK'u>7 d1>z\{Yt1*.8=Z/&edt_rxϯkwoC*̛ 8|_W*q64B_vᷨy aoZ9w)##i(gߴGRpa^0/pe7Ӡ߇?tfX:h>1p,\j3 נwe7ee71A 3K΅ ب߸ImރSpެ=%Qb<R}4*eYArESIXrù/:;cut9.\]۪0aEobpUal{*S?>;piqczw2(A'|;7ʆ35g! !^ ꗼh#\9S0g3}:mC_(={G滷ۯS+(ToGpfj/+)%GH3һM_PC)ULMF~]vۯn{{TO[ |P1=ȗ|~u/*o?azAsdաGz E3ecb.3iYZgWBЅL?m sƠ1TXٍ5Ͱ .cwG?woؤ߄fJ!Ʌb>a:$q0N}x1b \]W^G?w/l,\loi7P`rbv3La,\93ۃ>{Zl5![8.^Ƶ+_](RD] mpg@trɂ#CðyEoG=;N#\R;EOuT-$%}{XPi|480 (^N_Rpx|į/ f*D7Lvb"gȧIbe:`ow3B8;SS!82H 9|RؒsGR#.5{$(-;fhZEdkVxϞ/r *c}#cY8!1Z~"@ Έ-G+@E |Y2WĹ?^pe(7{Nk,Mɿ Y|:\8z&\;{D$,G~Te7N`9@%#ԧAY4/ \sՄ8{BZbֵxx}gaAvLч">:iEF} *VPJYkbU=(81 Z 0^o $%kHKj ;7JwjxEV/WD;|t< }xl.=D5}DSD9<+ Go $t G]?M ,(S%7.;6_)b"XtyJמ {Ng|+!#$ezh(RY {Y z Vw!lykO\ WΊ5+'_z?#O& qRLATСNo ۯ7AM5 +Ӡ7`ʅS/^gYNU#ܹ2^57i#8ur_W~3wa|oW2h+#3=/Lḟ%1T:$&ڶ4* Io,QLLG6~հ,w|X<1Bxnjܺs=Xa))؜g`zGЏyu̪ʴ <In3VvVUNK<\z>gN\1 ~gw䯚] 6nk=G7e z Q 7g@BHJ8 ݷ4 >.&>h6٢dǂQޱ|8yU Vc1xzKmb;BZEAr<\a sWH1B`[M͔L h-G7 7*> K J,Žgrgr /;{-\R[dq6/ӱէ$`-\!%)@2`ikp47XVx3sm{+`dp%g] MADH k,ѥFj(n7'R6ߚJ++ /b * <8?&s%05=+>-N,Lx9_T}gڬl9d3གBT@yy`qX}v^>.݇`vù@2\b.I˸o@!-h#ۀe'a\%vE[w0+f Sv4cp|dؽ(ly.0!0?A"])&C9`B%1q$#`pB''B&CH"{?-w _0͵pKb|77h"x*UBRcg QD:P&M:NOU *HJh e&3}v8J Sso=H>00V/ # נB&1;MHT'caM+)"KkX >ғ!` #9A{>* +(aFA D[3 q@]]!eio9Qy rp=OLa &_Ã*P|NT1B@X, RAZB~5& wl834eHϕoF#bU/m{|?}>{avݧg#d2 71°j=KTtHJ,zq R9 |,0HořyW LvGz= ̽pӷMpσ{?op Mp$. W k7,b0z^iQReaA I(#oU'9o}𛗝|Y'Gotq׬ʸ|Hxz^ \ 9qc_)e# Rzf 5'%>3Paew*;~ e›.< ^xI·xlO쀛 h>C ! K;f!:߷Ç[%vARg`4|{O7L.֭ZV,-fiwh >6WPs~Q|bD  X"/?Ehz):I @4-ho[?BsNN9w۞1[_j  K \^_ހH  ]V [1&^8=CA#!h 8}D ЀVmp!} |ɬOC4:%B`|ʟyaK/7S@Z^~7/AD+R(3 ~ P@В/P@BHG=[[@wKz^t1?a #oa7Py %@JHLFI%}(i5h+ tBތ BOiwYyvI`|"JfAv8jB|V +;2~W iojz6'*~1\[Uހq$-]06a"t@~'!+x [_K5wh u ~d1$|K *# :Y}[ ?% !^AFd10{)² %7tD~UjcfUz+ꔪ<`a%^ J1eVVNxx+UY0~B'xS=`LW$AUT3<g oU4%A H,5ϙEB.@1(mE 5vcoyGAvr(ڼ_f4YWgVpO-C᧽sc_5$(|ܖ)H~daPr[ePKx@aM2 cX=zavA\DRdD+>lbXiw?|Mi([XN,AB`Q5 3- )hK~|$?X@-B@aBau!>"tE~NZӍL|COj{ѵ%,½@.ޒD %%ڒ>/7nV &A|2+O&K labؾBC8^* ln@SP+aKQxgi1v H4  +g3'E ML~:s}Y1(: UYu#B"e_(+@YDKOx`\ WC2>B@#>|fDSH1`TmaM.B  D!`10J~ XD L@ B MARcSo~O|Rx1xC4-P`])0%_=˾C;Bk^E[zSyr.h(pF!o=6 ʎ@ŭvTp}˖'_3%IDATՄ4E4kZCm"6B+{?l [dĀQY^D(0'@mJ &=_gA~%`ws%ⳖփE6jS@^PMe "2FhY!LS@R@)0}6)XK AT#n=-(< 5\I`1F,ɄñDF&>>Jz)`!=L \B`%xalRSA#yKi =>6)Iݑ5V kIS|*l-#B`l*}bktlJP8YuR(ˀ0['8_#-$NՎf霛߃6اe.'9Fe3X!Ҫ+hpce$6лRQu QdRo&\~ƄN#k/r6i:O\BBu*!3H4nh#\g7tUH`N7XEz`?S213B`_YKֺ*OtƘo)TN䷸ZWE_"BA˨ EZqsCR2!!2)BoGlH!G'wR&}WN)$-C~S,b(#(Q ea|ʞv-A*Ќ7"ɌC VRIIfE Jt8/%HNXisXWkշ/%PP(Avo+Y3%(M%6F,'148 ͓i z6h >t@!lY%AqgA`88#)ٮhF,e:\ cZ +lP[fqc-0 AnifINarfFYiI@bG=];?O~K~3ʛWD$;D{"`F>灻Btt ")I H>skZ<-S !kO.IpPƔAܳԀ2@@CasqN0_g h>u$D qВ`O2v#h>4T5@$\߰".-ीK8AzncB+t^ޒxvINWH#0d#AF:h/ P$Xs];qz"D$a+>L~edQ8w7TF4,|K2Fku!:wlzHKY^$ܒU!>%$I1U fTWjy0Iq~s9aM z-< >NKj1Vs2{F}"-G~%qNT2 Jv[P2E擗|(ʹy Qb$HAO ipT+ ![p_) _qx!l"fD"\7#"@`XP춻t=䯚O>-,SN?9­"L <B-% N3N҉N:Rl Q ʶBN◤]~Q"'V/*H4 7r.i #؁q9Lvr D~T8$!%I?H10/ )I4Mh'Z4)1C2A ס]T+?KV\]!v$M$ )(W%ɇ^V^UC+ D!`k[vI~ is,/ 1[J`0Kđ*`ץ zK[>wu,v6E!Dz p,*<_x7ɘIрVr_iRB'="`a5ٻ0'o\3C:xDz08c~CppZV L6[cKı 4O @+tƲ Ta*jqK7"Ptq/'U1&P@邲l "9h &gkN-8DaWPfsv3j8ձO j]fJHKuXW\fU`-Pvý ".Gszv y2 FDRvK#5,6F֓4 \Q#t}KLlc 6tSduwmCU%9]/<^ ^DQB2c¨' W,L a^#{'(.xWcz d@A2BFCV lrh׆7;Їe@M#6ArVgo*3dυhTqP4'0%$7aM.4tُ˻f8>-Ug2˅oЗ;#::p`by_я: oDY51npA+UYy\H\z9gS_-"w#PXpE@Dynjz`^ Uڵv?` iMlM 6h39SU״̲s_~G[J-n;6cpld9]b UW^Wވ~'?x\Ȇѣv}(M"C%+y e*^).:KO|puPHFR5Ga,"aH X"\z`{$ :ƑP@)tovuE ۻ]g<+4z.$ ]%NDCh͎!;nT}uPW|4E:1~*NTznC^W-N|&:{Dk\& +.c0ۛgr.i5 3]FN_XJ F[bu)0Spi 6`XTQh h`O$ 3)}Ww'ݨTuWƌuhuUvJʂç% MLmR& 0I< Uvk=u-AfSzDhM=/qIKaY1ER]:/z`Džɶa9|D:&)'- >G9r)H}\@0ۍڽPPsF5h(ሉjE ֋6cDG07&gF$ D.c h\Vܱ~3̅ r4~ [ϊ8h"o_ɹv׏"'s7  G,i;lJ"o.,. ;d TȥS!+-w_>.IzsO.ccZO,Hk[ N>q)|ʗò%05|p+(Xb3PAimb,;r>hX8%-\r8İ?קǎi}(0\gЎorW|v9M)7DbPljݕOLj፯8¯ab| |s <~w8< ^Q ej$tc`ȒHZw4/jBP_}XL`5K<+ =lZͶOWXmψՌU+< xb#ONg;o`}QP1%o>EV-~illt95?~bz??ugP_ѕ ffM}c8ӵ&<5)#c~O|O}c33/Hth+;7{lv1k>k٬bnBs7{l|ExЏAhn^U#^O7۱wԡ}m[%nCX?CG} 0uledUHgf009vE!VFp<~;ݟrC{lؗ22F ;=[|MgɯAa\MwȘ?'| x~gn;@~B I8c*W=.{ys7A=ҐA13ۃm _A]fm~ז dPG|,3^qs/_&4tovzoNv?V\=7#hap7̂e^rٚ`+qAI1sd,%Zoi{kƠf 55P1򲛟8Rb/{>/st A"_lP4P ь9WC#-\{#(P6<7oa&M@r˿\pFy.\@'Lmx&nj s:X/:%:Xp?؝1s/nwĂ/K"q<@"-A~ @UA6am?H]~ ~Q'x1#caU_gPVP΁9H @V ACb*2^0IobjD}? x4@u|^1!g32F@v#+G~fFF, Y220dd,`dX #c# @FF, Y220dd,`dX #c# @FF, qV[/,8IENDB`nfoview-1.18/data/icons/32x32/000077500000000000000000000000001265072436100157335ustar00rootroot00000000000000nfoview-1.18/data/icons/32x32/nfoview.png000066400000000000000000000024661265072436100201260ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATXŗOlU{}}J дqcc 5Q#jԍq-$n (&ƅ1yd#+.ԀՅ mkmڹ;3p;{wgq/@)3ᲕO=ef[f i [g3G 3cб#']UۭXxCdžCܔOqֱ}ݯIp m'O%>~i\:rGgOC|ar<} DU%dTUHmYx78y/N>`!hʀ߱ K" HG${Q0'83.,څuMU|pIk.$Hxdl͵%܄@;lbW (Y_2}-|ՏINC<΃(B $,xvM+zߎ *F0].HB nfzS Kd0 "s0p{tx!3qlD{_)Y7vLOOedg52'&~77`8+ʿHBξEoE)H'=P(a?4Vx`` UMOAxF̫õ)?v.kej|8EyIFCZ/ s@Qh):txa!i!۾AHn:R\۪dEhꁠbg9UZLi-5!W%󋅳YFklѢ3-O<8@oW tʖr` TSAͰ2"bEzJL?=5%]߱1S! ԑBzr S’a/! rg?q؂Ur 6zdUh22[2rUiH@E Tmc3= T(rKJ):RJTD߅ %ͽSJ&kCPlyCGh.ŋ7W}{~ś+6Srb:<1 =~wt|r1gsygMqny~{~@] GN"s-&*dfIu쀦~WIENDB`nfoview-1.18/data/icons/48x48/000077500000000000000000000000001265072436100157515ustar00rootroot00000000000000nfoview-1.18/data/icons/48x48/nfoview.png000066400000000000000000000036731265072436100201450ustar00rootroot00000000000000PNG  IHDR00WsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<8IDATh[lW}cǎӆġIbBIUDI@*TZ \ 7oPA< >J*J( ڔ\Ymbisir|9{gs9'q[ϙ9'{kό*+y `c4 ݨNQꟍGO?ƿlP?xz;O}wȻ60e?o զf>ʑ-pG-,'gu`O&nF-Z*!#/)NtUD@wHȇ5ܾf-|^/< |@1w}v߀<Ϗ#h/1x+?/\"n-:ï bWEDa-d`tm\ӽvu'3^|MD$HQC%4?(JU ux}jD`z ^DDF$ =Ĕ#$JjBAZ"Ƙt:C;ۙ-D5ʄӼ-I5!*-% x&QBG)ز}z)86ʟ9Dvn⤤!D_ EgZ[1FmjJ]096#q$%&6L‘cѿ>3GowzrSɺd\mY%r6b gOe;_셩"вLAV2м ?CƉk\]]8=>ѓg(߸$)`ImS5Z]{y2PJ -TY 80 phQY[ᯅ@>$ &E ֙ڦ"ؤChF:MubW/[3ztD( i @(4Yj:cDeLXMhYB&/փ;w2_X{cLC w(ƝpmڑDj#AV=.J}TAMZ crяX$|?(K$=tv9O !שbIoc[uͯX~^:&%!^BFiZ%R*Xk C &$v)s$_'0靨i%zeK(,4/dԐU ]VHB4]CBR'.'48%j$X7J15TWimZLd\mRuK.b|zeeu#\~nҬ5-@J%\Xd͉Oe/pxt(s#^K5Z|R `jB94 Z'8w'k&{Oe$$"ّUwGJ\FҠ7c243DafjAd)D' >39:*غ䦱AzӒ%;Yў4]V$SP/̍<{E H*} rпCs wmFx{pg}V`Ю 8oF?_Ȱ^5 .NS'ǾڅWN}oj|u` ȒN.kOwͶ=nt[Z.mg=ęc@ fTu@ !QIwҚE`GbFU2DWԥ/n¨ :k֕2Vc6K!FdIENDB`nfoview-1.18/data/icons/README.md000066400000000000000000000007501265072436100164330ustar00rootroot00000000000000Individual sizes can be exported from the SVG by selecting an area around the icon that includes the transparent background rectangle and then using Inkscape's export tool to export that selection to a PNG file. nfoview application icon is based on emblem-system icon from [adwaita-icon-theme][1], version 3.14, available under the terms of either the GNU LGPL v3 or Creative Commons Attribution-Share Alike 3.0 United States License. [1]: http://git.gnome.org/cgit/adwaita-icon-theme/ nfoview-1.18/data/icons/nfoview.svg000066400000000000000000000724361265072436100173640ustar00rootroot00000000000000 image/svg+xml i i i i i nfoview-1.18/data/menu.ui000066400000000000000000000031271265072436100153450ustar00rootroot00000000000000
_Open… win.open _Export Image… win.export-image
C_opy win.copy _Select All win.select-all _Wrap Lines win.wrap-lines
_Preferences win.preferences _About win.about
_Close win.close _Quit win.quit
nfoview-1.18/data/nfoview.1000066400000000000000000000006511265072436100156000ustar00rootroot00000000000000.TH NFOVIEW 1 "January 4, 2008" .SH NAME nfoview \- viewer for NFO files .SH SYNOPSIS .B nfoview [\fIFILE...\fR] .SH DESCRIPTION .PP .B nfoview is a simple viewer for NFO files, which are "ASCII" art in the CP437 codepage. The advantages of using .B nfoview instead of a text editor are preset font and encoding settings, automatic window size and clickable hyperlinks. .SH AUTHOR Written by Osmo Salomaa . nfoview-1.18/data/nfoview.appdata.xml.in000066400000000000000000000014441265072436100202570ustar00rootroot00000000000000 nfoview.desktop CC0 GPL-3.0+ <_p>NFO Viewer is a simple viewer for NFO files, which are "ASCII" art in the CP437 codepage. The advantages of using NFO Viewer instead of a text editor are preset font and encoding settings, automatic window size and clickable hyperlinks. https://dl.dropboxusercontent.com/u/39625783/nfoview-appdata.png http://otsaloma.github.io/nfoview/ otsaloma@iki.fi nfoview-1.18/data/nfoview.desktop.in000066400000000000000000000005401265072436100175130ustar00rootroot00000000000000[Desktop Entry] _Name=NFO Viewer _Comment=View NFO files # TRANSLATORS: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! _Keywords=information; Exec=nfoview %F Terminal=false StartupNotify=true Icon=nfoview Type=Application MimeType=text/x-nfo; Categories=GTK;Utility;Viewer; nfoview-1.18/data/preferences-dialog.ui000066400000000000000000000402571265072436100201440ustar00rootroot00000000000000 -99 99 1 5 False 18 Preferences False center-on-parent True dialog 1 True False vertical 18 True False vertical 18 True False vertical 6 True False 0 Text True True 0 True False 12 6 12 True False 0 _Font: True font_button 0 0 True False 0 Li_ne-spacing: True line_spacing_spin 0 1 True True True True Sans 12 False True 1 0 True True start adjustment1 True 1 1 False True 1 False True 0 True False vertical 6 True False 0 Colors True True 0 True False 12 6 12 True False 0 _Schemes: True scheme_combo 0 0 True False 0 Fo_reground: True fg_color_button 0 1 True False 0 Bac_kground: True bg_color_button 0 2 True False 0 _Link: True link_color_button 0 3 True False 0 _Visited link: True vlink_color_button 0 4 True False True 1 0 True True True start 1 1 True True True start 1 2 True True True start 1 3 True True True start 1 4 False True 1 False True 1 False True 1 nfoview-1.18/nfoview/000077500000000000000000000000001265072436100146035ustar00rootroot00000000000000nfoview-1.18/nfoview/__init__.py000066400000000000000000000027251265072436100167220ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2008 Osmo Salomaa # # 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 . """Viewer for NFO files.""" __version__ = "1.18" import gi gi.require_version("Gdk", "3.0") gi.require_version("Gtk", "3.0") from nfoview.paths import * from nfoview import util from nfoview import i18n from nfoview.errors import * from nfoview.config import * conf = ConfigurationStore(read=True) from nfoview import schemes from nfoview.builder import * from nfoview.about import * from nfoview.open import * from nfoview.preferences import * from nfoview.export import * from nfoview.view import * from nfoview.action import * from nfoview import actions from nfoview.window import * from nfoview.application import * from nfoview.unittest import * def main(paths): """Initialize application.""" global app i18n.bind() app = Application(paths) raise SystemExit(app.run()) nfoview-1.18/nfoview/about.py000066400000000000000000000046561265072436100163020ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2008 Osmo Salomaa # # 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 . """Dialog for displaying credits and information.""" import nfoview from gi.repository import GObject from gi.repository import Gtk from nfoview.i18n import _ __all__ = ("AboutDialog",) class AboutDialog(Gtk.AboutDialog): """Dialog for displaying credits and information.""" def __init__(self, parent): """Initialize an :class:`AboutDialog` instance.""" GObject.GObject.__init__(self) self.set_title(_("About NFO Viewer")) self.set_transient_for(parent) self.set_authors(("Osmo Salomaa ",)) self.set_comments(_("Viewer for NFO files")) self.set_copyright("Copyright © 2005–2016 Osmo Salomaa") self.set_license_type(Gtk.License.GPL_3_0) self.set_logo_icon_name("nfoview") # TRANSLATORS: The application name "NFO Viewer" has been intentionally # marked as translatable. If you manage to translate the name in a # fluent manner, without changing the meaning, you may use that # translation at your discretion. self.set_program_name(_("NFO Viewer")) # TRANSLATORS: This is a special message that shouldn't be translated # literally. It is used in the about dialog to give credits to the # translators. Thus, you should translate it to your name and email # address. You can also include other translators who have contributed # to this translation; in that case, please write them on separate # lines seperated by newlines (\n). self.set_translator_credits(_("translator-credits")) self.set_version(nfoview.__version__) self.set_website("http://otsaloma.github.io/nfoview/") self.set_website_label(_("NFO Viewer Website")) self.set_wrap_license(True) nfoview-1.18/nfoview/action.py000066400000000000000000000044331265072436100164360ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2015 Osmo Salomaa # # 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 . """Baseclasses for user-activatable actions.""" import nfoview from gi.repository import Gio from gi.repository import GLib from gi.repository import GObject __all__ = ("Action", "ToggleAction") class Action(Gio.SimpleAction): """Baseclass for user-activatable actions.""" def __init__(self, name): """Initialize an :class:`Action` instance.""" GObject.GObject.__init__(self, name=name) self.accelerators = [] def _affirm_doable(self, window): """Raise :exc:`nfoview.AffirmationError` if action cannot be done.""" pass def update_enabled(self, window): """Update the "enabled" property to match `window`.""" try: self._affirm_doable(window) self.set_enabled(True) except nfoview.AffirmationError: self.set_enabled(False) class ToggleAction(Action): """Baseclass for user-activatable toggle actions.""" # Gio's abstraction makes toggle action instantiation and # management of boolean state values look really stupid # in Python. For proper instantiation, subclasses need to # define __new__, call new and assign to __class__. @staticmethod def new(name, parameter_type=None): """Return a new toggle action.""" return Gio.SimpleAction.new_stateful( name, parameter_type, GLib.Variant("b", False)) def get_state(self): """Return the current boolean state.""" return Action.get_state(self).get_boolean() def set_state(self, value): """Set a new boolean state.""" Action.set_state(self, GLib.Variant("b", value)) nfoview-1.18/nfoview/actions.py000066400000000000000000000062621265072436100166230ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2015 Osmo Salomaa # # 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 . """User-activatable actions.""" import nfoview __all__ = ( "AboutAction", "CloseAction", "CopyAction", "ExportImageAction", "OpenAction", "PreferencesAction", "QuitAction", "SelectAllAction", "WrapLinesAction", ) class AboutAction(nfoview.Action): def __init__(self): nfoview.Action.__init__(self, "about") class CloseAction(nfoview.Action): def __init__(self): nfoview.Action.__init__(self, "close") self.accelerators = ["W", "Escape"] class CopyAction(nfoview.Action): def __init__(self): nfoview.Action.__init__(self, "copy") self.accelerators = ["C"] def _affirm_doable(self, window): nfoview.util.affirm(window.view is not None) nfoview.util.affirm(window.view.get_sensitive()) text_buffer = window.view.get_buffer() nfoview.util.affirm(text_buffer.get_has_selection()) class ExportImageAction(nfoview.Action): def __init__(self): nfoview.Action.__init__(self, "export-image") self.accelerators = ["E"] def _affirm_doable(self, window): nfoview.util.affirm(window.path is not None) nfoview.util.affirm(window.view is not None) nfoview.util.affirm(window.view.get_sensitive()) class OpenAction(nfoview.Action): def __init__(self): nfoview.Action.__init__(self, "open") self.accelerators = ["O"] class PreferencesAction(nfoview.Action): def __init__(self): nfoview.Action.__init__(self, "preferences") class QuitAction(nfoview.Action): def __init__(self): nfoview.Action.__init__(self, "quit") self.accelerators = ["Q"] class SelectAllAction(nfoview.Action): def __init__(self): nfoview.Action.__init__(self, "select-all") self.accelerators = ["A"] def _affirm_doable(self, window): nfoview.util.affirm(window.view is not None) nfoview.util.affirm(window.view.get_sensitive()) nfoview.util.affirm(window.view.get_text()) class WrapLinesAction(nfoview.ToggleAction): def __new__(cls): action = nfoview.ToggleAction.new("wrap-lines") action.__class__ = cls return action def __init__(self): nfoview.Action.__init__(self, "wrap-lines") self.accelerators = ["R"] def _affirm_doable(self, window): nfoview.util.affirm(window.view is not None) nfoview.util.affirm(window.view.get_sensitive()) nfoview.util.affirm(window.view.get_text()) nfoview-1.18/nfoview/application.py000066400000000000000000000041641265072436100174650ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2015 Osmo Salomaa # # 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 . """Initializing and managing NFO Viewer windows.""" import nfoview import sys import traceback from gi.repository import Gio from gi.repository import GObject from gi.repository import Gtk __all__ = ("Application",) class Application(Gtk.Application): """Initializing and managing NFO Viewer windows.""" def __init__(self, paths): """Initialize an :class:`Application` instance.""" GObject.GObject.__init__(self) self.set_flags(Gio.ApplicationFlags.NON_UNIQUE) self.connect("activate", self._on_activate, paths) self.connect("shutdown", self._on_shutdown) def _on_activate(self, app, paths): """Open windows for files given as arguments.""" for path in sorted(paths): self.open_window(path) if not self.get_windows(): # If no arguments were given, or none of them exist, # open one blank window. self.open_window() def _on_shutdown(self, app): """Terminate application.""" nfoview.conf.write() def open_window(self, path=None): """Open `path` in a new window and present that window.""" try: window = nfoview.Window(path) self.add_window(window) window.present() except Exception as error: print("Failed to open {}: {}" .format(repr(path), str(error)), file=sys.stderr) traceback.print_exc() nfoview-1.18/nfoview/builder.py000066400000000000000000000044131265072436100166050ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2006 Osmo Salomaa # # 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 . """Baseclass and wrapper for :class:`Gtk.Builder` constructed dialogs.""" import nfoview import os from gi.repository import Gtk __all__ = ("BuilderDialog",) class BuilderDialog: """ Baseclass and wrapper for :class:`Gtk.Builder` constructed dialogs. :cvar _widgets: List of names of widgets to be assigned as attributes All widgets defined in :attr:`_widgets` are assigned as instance variables with names preceded by a single underscore. All signals defined in the UI definition file are connected to ``self``. All :func:`getattr` calls not found in ``self`` are delegated to :attr:`self._dialog` allowing ``self`` to look and act like a :class:`Gtk.Dialog`. """ _widgets = () def __init__(self, ui_file_path): """Initialize a :class:`BuilderDialog` instance from `ui_file_path`.""" if not os.path.isabs(ui_file_path): ui_file_path = os.path.join(nfoview.DATA_DIR, ui_file_path) self._builder = Gtk.Builder() self._builder.set_translation_domain("nfoview") self._builder.add_from_file(ui_file_path) self._dialog = self._builder.get_object("dialog") self._builder.connect_signals(self) for name in self._widgets: widget = self._builder.get_object(name) setattr(self, "_{}".format(name), widget) def __getattr__(self, name): """Return attribute from :attr:`_dialog`.""" return getattr(self._dialog, name) def run(self): """Show the dialog, run it and return response.""" self._dialog.show() return self._dialog.run() nfoview-1.18/nfoview/config.py000066400000000000000000000054261265072436100164310ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2008 Osmo Salomaa # # 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 . """Reading, writing and storing configurations.""" import nfoview import os import re __all__ = ("ConfigurationStore",) DEFAULTS = dict( background_color="#ffffff", color_scheme="default", font="Terminus 12", foreground_color="#2e3436", link_color="#2a76c6", pixels_above_lines=0, pixels_below_lines=0, text_view_max_chars=160, text_view_max_lines=45, version="", visited_link_color="#215d9c", ) class ConfigurationStore: """Reading, writing and storing configurations.""" path = os.path.join(nfoview.CONFIG_HOME_DIR, "nfoview.conf") def __init__(self, read=False): """Initialize a :class:`ConfigurationStore` instance.""" self.restore_defaults() if read: self.read() def read(self): """Read values of configuration options from file.""" if not os.path.isfile(self.path): return with open(self.path, "r") as f: entries = f.readlines() entries = dict(re.split(" *= *", x.strip(), 1) for x in entries if not x.startswith("#") and "=" in x) for name in set(DEFAULTS) & set(entries): decode = type(DEFAULTS[name]) setattr(self, name, decode(entries[name])) self.version = nfoview.__version__ def restore_defaults(self): """Set all configuration options to their default values.""" for name in DEFAULTS: setattr(self, name, DEFAULTS[name]) self.version = nfoview.__version__ def write(self): """Write values of configuration options to file.""" directory = os.path.dirname(self.path) with nfoview.util.silent(OSError): nfoview.util.makedirs(directory) if not os.path.isdir(directory): return f = open(self.path, "w") for name in sorted(DEFAULTS): text = "{} = {}".format(name, str(getattr(self, name))) if getattr(self, name) == DEFAULTS[name]: # Comment out options at default value. text = "# {}".format(text) f.write(text + "\n") f.close() nfoview-1.18/nfoview/errors.py000066400000000000000000000022071265072436100164720ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2008 Osmo Salomaa # # 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 . """All :mod:`nfoview` error classes.""" __all__ = ("AffirmationError",) class AffirmationError(Exception): """ Something expected to be ``True`` was ``False``. :exc:`AffirmationError` is like :exc:`AssertionError`, but without the special reliance on :const:`__debug__` and given optimization options. :exc:`AffirmationError` can be used to provide essential checks of boolean values instead of optional debug checks. """ pass nfoview-1.18/nfoview/export.py000066400000000000000000000027601265072436100165030ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2013 Osmo Salomaa # # 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 . """Dialog for selecting an image file to export to.""" from gi.repository import GObject from gi.repository import Gtk from nfoview.i18n import _ __all__ = ("ExportImageDialog",) class ExportImageDialog(Gtk.FileChooserDialog): """Dialog for selecting an image file to export to.""" def __init__(self, parent): """Initialize an :class:`ExportImageDialog` instance.""" GObject.GObject.__init__(self) self.set_title(_("Export Image")) self.set_transient_for(parent) self.set_action(Gtk.FileChooserAction.SAVE) self.add_button(_("_Cancel"), Gtk.ResponseType.CANCEL) self.add_button(_("_Save"), Gtk.ResponseType.OK) self.set_do_overwrite_confirmation(True) self.set_select_multiple(False) self.set_default_response(Gtk.ResponseType.OK) nfoview-1.18/nfoview/i18n.py000066400000000000000000000037321265072436100157410ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2008 Osmo Salomaa # # 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 . """Internationalization functions.""" import gettext import locale import nfoview _translation = gettext.NullTranslations() def bind(): """Bind translation domains and initialize gettext.""" global _translation d = nfoview.LOCALE_DIR with nfoview.util.silent(Exception): # Might fail with misconfigured locales. locale.setlocale(locale.LC_ALL, "") with nfoview.util.silent(Exception): # Not available on all platforms. Seems to be # needed by GTK+ applications and probably others # with C library dependencies that use gettext. locale.bindtextdomain("nfoview", d) locale.textdomain("nfoview") gettext.bindtextdomain("nfoview", d) gettext.textdomain("nfoview") _translation = gettext.translation("nfoview", localedir=d, fallback=True) def _(message): """Return the localized translation of `message`.""" return _translation.gettext(message) def d_(domain, message): """Return the localized translation of `message` from `domain`.""" return gettext.dgettext(domain, message) def n_(singular, plural, n): """Return the localized translation of `singular` or `plural`.""" return _translation.ngettext(singular, plural, n) nfoview-1.18/nfoview/open.py000066400000000000000000000034051265072436100161200ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2008 Osmo Salomaa # # 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 . """Dialog for selecting NFO files to open.""" from gi.repository import GObject from gi.repository import Gtk from nfoview.i18n import _ __all__ = ("OpenDialog",) class OpenDialog(Gtk.FileChooserDialog): """Dialog for selecting NFO files to open.""" def __init__(self, parent): """Initialize an :class:`OpenDialog` instance.""" GObject.GObject.__init__(self) self.set_title(_("Open")) self.set_transient_for(parent) self.set_action(Gtk.FileChooserAction.OPEN) self.add_button(_("_Cancel"), Gtk.ResponseType.CANCEL) self.add_button(_("_Open"), Gtk.ResponseType.OK) self.set_select_multiple(True) self.set_default_response(Gtk.ResponseType.OK) file_filter = Gtk.FileFilter() file_filter.set_name(_("All files")) file_filter.add_pattern("*") self.add_filter(file_filter) file_filter = Gtk.FileFilter() file_filter.set_name(_("NFO files (*.nfo)")) file_filter.add_pattern("*.[Nn][Ff][Oo]") self.add_filter(file_filter) self.set_filter(file_filter) nfoview-1.18/nfoview/paths.py000066400000000000000000000045621265072436100163030ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2008 Osmo Salomaa # # 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 . """Paths to files and directories used.""" import os import sys __all__ = ("CONFIG_HOME_DIR", "DATA_DIR", "LOCALE_DIR") def get_config_home_directory(): """Return path to the user's configuration directory.""" if sys.platform == "win32": return get_config_home_directory_windows() return get_config_home_directory_xdg() def get_config_home_directory_windows(): """Return path to the user's configuration directory on Windows.""" directory = os.path.expanduser("~") directory = os.environ.get("APPDATA", directory) directory = os.path.join(directory, "nfoview") return os.path.abspath(directory) def get_config_home_directory_xdg(): """Return path to the user's XDG configuration directory.""" directory = os.path.join(os.path.expanduser("~"), ".config") directory = os.environ.get("XDG_CONFIG_HOME", directory) directory = os.path.join(directory, "nfoview") return os.path.abspath(directory) def get_data_directory_source(): """Return path to the global data directory when running from source.""" directory = os.path.dirname(os.path.abspath(__file__)) directory = os.path.abspath(os.path.join(directory, "..")) directory = os.path.join(directory, "data") return os.path.abspath(directory) def get_locale_directory_source(): """Return path to the locale directory when running from source.""" directory = os.path.dirname(os.path.abspath(__file__)) directory = os.path.abspath(os.path.join(directory, "..")) directory = os.path.join(directory, "locale") return os.path.abspath(directory) CONFIG_HOME_DIR = get_config_home_directory() DATA_DIR = get_data_directory_source() LOCALE_DIR = get_locale_directory_source() nfoview-1.18/nfoview/preferences.py000066400000000000000000000145001265072436100174560ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2008 Osmo Salomaa # # 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 . """Dialog for editing preferences.""" import nfoview from gi.repository import Gtk __all__ = ("PreferencesDialog",) class PreferencesDialog(nfoview.BuilderDialog): """Dialog for editing preferences.""" _widgets = ( "bg_color_button", "bg_color_label", "fg_color_button", "fg_color_label", "font_button", "line_spacing_spin", "link_color_button", "link_color_label", "scheme_combo", "vlink_color_button", "vlink_color_label", ) def __init__(self, parent): """Initialize a :class:`PreferencesDialog` instance.""" nfoview.BuilderDialog.__init__(self, "preferences-dialog.ui") self._init_scheme_combo() self._init_values() self.set_transient_for(parent) self.set_default_response(Gtk.ResponseType.CLOSE) def _get_windows(self): """Return a list of open application windows.""" return nfoview.app.get_windows() if hasattr(nfoview, "app") else [] def _init_scheme_combo(self): """Initialize a model and populate the scheme combo box.""" self._scheme_combo.clear() store = Gtk.ListStore(object, str) self._scheme_combo.set_model(store) renderer = Gtk.CellRendererText() self._scheme_combo.pack_start(renderer, expand=True) self._scheme_combo.add_attribute(renderer, "text", 1) for scheme in nfoview.schemes.get_all(): store.append((scheme, scheme.label)) def _init_values(self): """Initialize default values for widgets.""" self._font_button.set_font_name(nfoview.conf.font) pixels = nfoview.conf.pixels_above_lines self._line_spacing_spin.set_value(pixels) store = self._scheme_combo.get_model() for i, (scheme, label) in enumerate(store): if scheme.name == nfoview.conf.color_scheme: self._scheme_combo.set_active(i) self._update_color_buttons(scheme) self._update_sensitivities() def _on_bg_color_button_color_set(self, color_button): """Save the new color and update window and its view.""" rgba = color_button.get_rgba() string = nfoview.util.rgba_to_hex(rgba) nfoview.conf.background_color = string scheme = nfoview.schemes.get("custom") scheme.background = rgba for window in self._get_windows(): window.view.update_colors() def _on_fg_color_button_color_set(self, color_button): """Save the new color and update window and its view.""" rgba = color_button.get_rgba() string = nfoview.util.rgba_to_hex(rgba) nfoview.conf.foreground_color = string scheme = nfoview.schemes.get("custom") scheme.foreground = rgba for window in self._get_windows(): window.view.update_colors() def _on_font_button_font_set(self, font_button): """Save the new font and update window and its view.""" nfoview.conf.font = font_button.get_font_name() font_desc = nfoview.util.get_font_description() for window in self._get_windows(): window.view.modify_font(font_desc) def _on_line_spacing_spin_value_changed(self, spin_button): """Save the new line-spacing and update window and its view.""" pixels = spin_button.get_value_as_int() nfoview.conf.pixels_above_lines = pixels for window in self._get_windows(): window.view.set_pixels_above_lines(pixels) def _on_link_color_button_color_set(self, color_button): """Save the new color and update window and its view.""" rgba = color_button.get_rgba() string = nfoview.util.rgba_to_hex(rgba) nfoview.conf.link_color = string scheme = nfoview.schemes.get("custom") scheme.link = rgba for window in self._get_windows(): window.view.update_colors() def _on_scheme_combo_changed(self, combo_box): """Save the new color scheme and update window and its view.""" store = combo_box.get_model() index = combo_box.get_active() scheme = store[index][0] nfoview.conf.color_scheme = scheme.name self._update_color_buttons(scheme) for window in self._get_windows(): window.view.update_colors() self._update_sensitivities() def _on_vlink_color_button_color_set(self, color_button): """Save the new color and update window and its view.""" rgba = color_button.get_rgba() string = nfoview.util.rgba_to_hex(rgba) nfoview.conf.visited_link_color = string scheme = nfoview.schemes.get("custom") scheme.vlink = rgba for window in self._get_windows(): window.view.update_colors() def _update_color_buttons(self, scheme): """Set color button colors to match those of scheme.""" self._bg_color_button.set_rgba(scheme.background) self._fg_color_button.set_rgba(scheme.foreground) self._link_color_button.set_rgba(scheme.link) self._vlink_color_button.set_rgba(scheme.visited_link) def _update_sensitivities(self): """Set the sensitivities of color buttons and labels.""" sensitive = (nfoview.conf.color_scheme == "custom") self._bg_color_button.set_sensitive(sensitive) self._bg_color_label.set_sensitive(sensitive) self._fg_color_button.set_sensitive(sensitive) self._fg_color_label.set_sensitive(sensitive) self._link_color_button.set_sensitive(sensitive) self._link_color_label.set_sensitive(sensitive) self._vlink_color_button.set_sensitive(sensitive) self._vlink_color_label.set_sensitive(sensitive) nfoview-1.18/nfoview/schemes.py000066400000000000000000000115171265072436100166110ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2008 Osmo Salomaa # # 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 . """Classes for color scheme definitions.""" import nfoview from nfoview.i18n import _ __all__ = ( "BlackOnWhite", "Custom", "DarkGreyOnLightGray", "Default", "GreyOnBlack", "LightGreyOnDarkGray", "WhiteOnBlack", ) class ColorScheme: """Baseclass for color scheme definitions.""" name = NotImplementedError label = NotImplementedError foreground = NotImplementedError background = NotImplementedError link = NotImplementedError visited_link = NotImplementedError class BlackOnWhite(ColorScheme): """Color scheme with black text on white background.""" name = "black-on-white" label = _("Black on white") foreground = nfoview.util.hex_to_rgba("#000000") background = nfoview.util.hex_to_rgba("#ffffff") link = nfoview.util.hex_to_rgba("#0000ff") visited_link = nfoview.util.hex_to_rgba("#ff00ff") class Custom(ColorScheme): """Color scheme with custom, user-chosen colors.""" name = "custom" label = _("Custom") foreground = nfoview.util.hex_to_rgba(nfoview.conf.foreground_color) background = nfoview.util.hex_to_rgba(nfoview.conf.background_color) link = nfoview.util.hex_to_rgba(nfoview.conf.link_color) visited_link = nfoview.util.hex_to_rgba(nfoview.conf.visited_link_color) class DarkGreyOnLightGray(ColorScheme): """Color scheme with dark grey text on light grey background.""" name = "dark-grey-on-light-grey" label = _("Dark grey on light grey") foreground = nfoview.util.hex_to_rgba("#666666") background = nfoview.util.hex_to_rgba("#f2f2f2") link = nfoview.util.hex_to_rgba("#5555ff") visited_link = nfoview.util.hex_to_rgba("#ff55ff") class Default(ColorScheme): """Color scheme with system default colors.""" # http://git.gnome.org/browse/gtk+/tree/gtk/theme/Adwaita/_colors-public.scss # http://git.gnome.org/browse/gtk+/tree/gtk/theme/Adwaita/gtk-contained.css name = "default" label = _("System theme") foreground = nfoview.util.lookup_color("theme_text_color", "#2e3436") background = nfoview.util.lookup_color("theme_base_color", "#ffffff") link = nfoview.util.hex_to_rgba("#2a76c6") visited_link = nfoview.util.hex_to_rgba("#215d9c") class GreyOnBlack(ColorScheme): """Color scheme with grey text on black background.""" name = "grey-on-black" label = _("Grey on black") foreground = nfoview.util.hex_to_rgba("#aaaaaa") background = nfoview.util.hex_to_rgba("#000000") link = nfoview.util.hex_to_rgba("#aaaaff") visited_link = nfoview.util.hex_to_rgba("#ffaaff") class LightGreyOnDarkGray(ColorScheme): """Color scheme with light grey text on dark grey background.""" name = "light-grey-on-dark-grey" label = _("Light grey on dark grey") foreground = nfoview.util.hex_to_rgba("#f2f2f2") background = nfoview.util.hex_to_rgba("#666666") link = nfoview.util.hex_to_rgba("#aaaaff") visited_link = nfoview.util.hex_to_rgba("#ffaaff") class WhiteOnBlack(ColorScheme): """Color scheme with white text on black background.""" name = "white-on-black" label = _("White on black") foreground = nfoview.util.hex_to_rgba("#ffffff") background = nfoview.util.hex_to_rgba("#000000") link = nfoview.util.hex_to_rgba("#aaaaff") visited_link = nfoview.util.hex_to_rgba("#ffaaff") def get(name, fallback=None): """Return the color scheme with given name.""" for class_name in __all__: scheme = globals()[class_name] if scheme.name == name: return scheme if fallback is not None: return get(fallback) raise ValueError("No color scheme named {}" .format(repr(name))) def get_all(): """Return a list of all color schemes in proper order.""" schemes = list(map(globals().get, __all__)) schemes.remove(Default) schemes.remove(Custom) schemes.sort(key=lambda x: x.label) schemes.insert(0, Default) schemes.append(Custom) return schemes nfoview-1.18/nfoview/test/000077500000000000000000000000001265072436100155625ustar00rootroot00000000000000nfoview-1.18/nfoview/test/__init__.py000066400000000000000000000000001265072436100176610ustar00rootroot00000000000000nfoview-1.18/nfoview/test/test_about.py000066400000000000000000000016411265072436100203070ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2008 Osmo Salomaa # # 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 . import nfoview from gi.repository import Gtk class TestAboutDialog(nfoview.TestCase): def run_dialog(self): self.dialog.run() def setup_method(self, method): self.dialog = nfoview.AboutDialog(Gtk.Window()) nfoview-1.18/nfoview/test/test_config.py000066400000000000000000000042471265072436100204470ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2008 Osmo Salomaa # # 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 . import nfoview import os import shutil import tempfile FIELDS = dict( background_color="#ff0000", color_scheme="default", font="monospace 12", foreground_color="#00ff00", link_color="#0000ff", pixels_above_lines=1, pixels_below_lines=0, text_view_max_chars=160, text_view_max_lines=45, visited_link_color="#ffff00", ) class TestConfigurationStore(nfoview.TestCase): def setup_method(self, method): self.temp_dir = tempfile.mkdtemp() nfoview.conf.path = os.path.join( self.temp_dir, "nfoview", "nfoview.conf") nfoview.conf.restore_defaults() for name, value in list(FIELDS.items()): setattr(nfoview.conf, name, value) def teardown_method(self, method): shutil.rmtree(self.temp_dir) def test_read(self): nfoview.conf.write() nfoview.conf.restore_defaults() nfoview.conf.read() for name, value in FIELDS.items(): assert getattr(nfoview.conf, name) == value def test_restore_defaults(self): nfoview.conf.restore_defaults() defaults = dict(nfoview.config.DEFAULTS) defaults["version"] = nfoview.__version__ for name, value in defaults.items(): assert getattr(nfoview.conf, name) == value def test_write(self): nfoview.conf.write() nfoview.conf.restore_defaults() nfoview.conf.read() for name, value in FIELDS.items(): assert getattr(nfoview.conf, name) == value nfoview-1.18/nfoview/test/test_export.py000066400000000000000000000016551265072436100205230ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2013 Osmo Salomaa # # 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 . import nfoview from gi.repository import Gtk class TestExportImageDialog(nfoview.TestCase): def run_dialog(self): self.dialog.run() def setup_method(self, method): self.dialog = nfoview.ExportImageDialog(Gtk.Window()) nfoview-1.18/nfoview/test/test_open.py000066400000000000000000000016371265072436100201430ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2008 Osmo Salomaa # # 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 . import nfoview from gi.repository import Gtk class TestOpenDialog(nfoview.TestCase): def run_dialog(self): self.dialog.run() def setup_method(self, method): self.dialog = nfoview.OpenDialog(Gtk.Window()) nfoview-1.18/nfoview/test/test_preferences.py000066400000000000000000000051341265072436100214770ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2008 Osmo Salomaa # # 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 . import nfoview from gi.repository import Gdk from gi.repository import Gtk class TestPreferencesDialog(nfoview.TestCase): def run_dialog(self): self.dialog.run() def setup_method(self, method): self.dialog = nfoview.PreferencesDialog(Gtk.Window()) self.rgba = Gdk.RGBA(red=1, green=0, blue=1) def test__on_bg_color_button_color_set(self): store = self.dialog._scheme_combo.get_model() self.dialog._scheme_combo.set_active(len(store)-1) self.dialog._bg_color_button.set_rgba(self.rgba) self.dialog._bg_color_button.emit("color-set") def test__on_fg_color_button_color_set(self): store = self.dialog._scheme_combo.get_model() self.dialog._scheme_combo.set_active(len(store)-1) self.dialog._fg_color_button.set_rgba(self.rgba) self.dialog._fg_color_button.emit("color-set") def test__on_font_button_font_set(self): self.dialog._font_button.set_font_name("monospace 8") self.dialog._font_button.emit("font-set") def test__on_line_spacing_spin_value_changed(self): self.dialog._line_spacing_spin.set_value(-3) self.dialog._line_spacing_spin.set_value(+3) def test__on_link_color_button_color_set(self): store = self.dialog._scheme_combo.get_model() self.dialog._scheme_combo.set_active(len(store)-1) self.dialog._link_color_button.set_rgba(self.rgba) self.dialog._link_color_button.emit("color-set") def test__on_scheme_combo_changed(self): store = self.dialog._scheme_combo.get_model() for i in range(len(store)): self.dialog._scheme_combo.set_active(i) def test__on_vlink_color_button_color_set(self): store = self.dialog._scheme_combo.get_model() self.dialog._scheme_combo.set_active(len(store)-1) self.dialog._vlink_color_button.set_rgba(self.rgba) self.dialog._vlink_color_button.emit("color-set") nfoview-1.18/nfoview/test/test_util.py000066400000000000000000000137301265072436100201540ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2005 Osmo Salomaa # # 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 . import codecs import nfoview import os import sys from gi.repository import Gdk class TestModule(nfoview.TestCase): def test_affirm__false(self): self.assert_raises(nfoview.AffirmationError, nfoview.util.affirm, False) def test_affirm__true(self): nfoview.util.affirm(True) def test_detect_encoding__cp437(self): path = self.new_nfo_file() encoding = nfoview.util.detect_encoding(path) assert encoding == "cp437" @nfoview.util.monkey_patch(nfoview.util, "is_valid_encoding") def test_detect_encoding__utf_16_be(self): nfoview.util.is_valid_encoding = lambda x: True path = self.new_nfo_file() blob = open(path, "rb").read() open(path, "wb").write(codecs.BOM_UTF16_BE + blob) encoding = nfoview.util.detect_encoding(path) assert encoding == "utf_16_be" @nfoview.util.monkey_patch(nfoview.util, "is_valid_encoding") def test_detect_encoding__utf_16_le(self): nfoview.util.is_valid_encoding = lambda x: True path = self.new_nfo_file() blob = open(path, "rb").read() open(path, "wb").write(codecs.BOM_UTF16_LE + blob) encoding = nfoview.util.detect_encoding(path) assert encoding == "utf_16_le" @nfoview.util.monkey_patch(nfoview.util, "is_valid_encoding") def test_detect_encoding__utf_32_be(self): nfoview.util.is_valid_encoding = lambda x: True path = self.new_nfo_file() blob = open(path, "rb").read() open(path, "wb").write(codecs.BOM_UTF32_BE + blob) encoding = nfoview.util.detect_encoding(path) assert encoding == "utf_32_be" @nfoview.util.monkey_patch(nfoview.util, "is_valid_encoding") def test_detect_encoding__utf_32_le(self): nfoview.util.is_valid_encoding = lambda x: True path = self.new_nfo_file() blob = open(path, "rb").read() open(path, "wb").write(codecs.BOM_UTF32_LE + blob) encoding = nfoview.util.detect_encoding(path) assert encoding == "utf_32_le" @nfoview.util.monkey_patch(nfoview.util, "is_valid_encoding") def test_detect_encoding__utf_8_sig(self): nfoview.util.is_valid_encoding = lambda x: True path = self.new_nfo_file() blob = open(path, "rb").read() open(path, "wb").write(codecs.BOM_UTF8 + blob) encoding = nfoview.util.detect_encoding(path) assert encoding == "utf_8_sig" @nfoview.util.monkey_patch(nfoview.conf, "font") def test_get_font_description(self): nfoview.conf.font = "Foo" font_desc = nfoview.util.get_font_description() assert font_desc.get_family() == "Foo,monospace," def test_get_max_text_view_size(self): width, height = nfoview.util.get_max_text_view_size() assert width > 100 and height > 100 def test_get_text_view_size(self): text = 25 * "qwertyuiop asdfghjkl zxcvbnm\n" width, height = nfoview.util.get_text_view_size(text) assert width > 100 and height > 100 def test_hex_to_rgba(self): color = nfoview.util.hex_to_rgba("#ff0000") assert color.equal(Gdk.RGBA(red=1, green=0, blue=0, alpha=1)) def test_lookup_color(self): color = nfoview.util.lookup_color("theme_fg_color", "#ff0000") assert not color.equal(Gdk.RGBA(red=1, green=0, blue=0, alpha=1)) def test_lookup_color_fallback(self): color = nfoview.util.lookup_color("xxx", "#ff0000") assert color.equal(Gdk.RGBA(red=1, green=0, blue=0, alpha=1)) def test_monkey_patch__no_attribute(self): @nfoview.util.monkey_patch(sys, "nfoview") def modify_nfoview(): sys.nfoview = True modify_nfoview() assert not hasattr(sys, "nfoview") def test_monkey_patch__os_environ(self): @nfoview.util.monkey_patch(os, "environ") def modify_environment(): os.environ["NFOVIEW_TEST"] = "1" modify_environment() assert not "NFOVIEW_TEST" in os.environ def test_monkey_patch__sys_platform(self): platform = sys.platform @nfoview.util.monkey_patch(sys, "platform") def modify_platform(): sys.platform = "commodore_64" modify_platform() assert sys.platform == platform def test_rgba_to_hex(self): rgba = Gdk.RGBA(red=1, green=0, blue=1) color = nfoview.util.rgba_to_hex(rgba) assert color == "#ff00ff" @nfoview.util.monkey_patch(sys, "platform") def test_show_uri__unix(self): sys.platform = "linux2" nfoview.util.show_uri("http://otsaloma.github.io/nfoview/") @nfoview.util.monkey_patch(sys, "platform") def test_show_uri__windows(self): sys.platform = "win32" nfoview.util.show_uri("http://otsaloma.github.io/nfoview/") @nfoview.util.monkey_patch(sys, "platform") def test_uri_to_path__unix(self): sys.platform = "linux2" uri = "file:///home/nfoview/a%20file.nfo" path = nfoview.util.uri_to_path(uri) assert path == "/home/nfoview/a file.nfo" @nfoview.util.monkey_patch(sys, "platform") def test_uri_to_path__windows(self): sys.platform = "win32" uri = "file:///c:/nfoview/a%20file.nfo" path = nfoview.util.uri_to_path(uri) assert path == "c:\\nfoview\\a file.nfo" nfoview-1.18/nfoview/test/test_view.py000066400000000000000000000034411265072436100201470ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2005 Osmo Salomaa # # 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 . import nfoview from gi.repository import Gtk class TestTextView(nfoview.TestCase): def run_window(self): window = Gtk.Window() window.connect("delete-event", Gtk.main_quit) window.set_position(Gtk.WindowPosition.CENTER) window.set_default_size(500, 500) window.add(self.view) window.show_all() Gtk.main() def setup_method(self, method): self.view = nfoview.TextView() text = "testing...\nhttp://otsaloma.github.io/nfoview/" self.view.set_text(text) def test_get_text(self): self.view.set_text("test\ntest") text = self.view.get_text() # set_text adds a final newline. assert text == "test\ntest\n" def test_set_text(self): self.view.set_text("test\ntest") text = self.view.get_text() # set_text adds a final newline. assert text == "test\ntest\n" def test_update_colors(self): self.view.update_colors() tags = self.view._link_tags self.view._link_tags = [] self.view._visited_link_tags = tags self.view.update_colors() nfoview-1.18/nfoview/test/test_window.py000066400000000000000000000036201265072436100205030ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2005 Osmo Salomaa # # 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 . import nfoview from gi.repository import Gtk class TestWindow(nfoview.TestCase): def run_window(self): self.window.show() self.window.connect("delete-event", Gtk.main_quit) Gtk.main() def setup_method(self, method): self.window = nfoview.Window(self.new_nfo_file()) def test_open_file__blank_lines(self): path = self.new_nfo_file() with open(path, "a") as f: f.write("\n\n\n") self.window.open_file(path) def test_open_file__odd_lines(self): path = self.new_nfo_file() with open(path, "w") as f: f.write("a\n\na\n\n") self.window.open_file(path) def test_resize_to_text__blank(self): self.window = nfoview.Window() self.window.resize_to_text() def test_resize_to_text__long_file(self): path = self.new_nfo_file() with open(path, "w") as f: f.write("aaa\n" * 100) self.window.open_file(path) self.window.resize_to_text() def test_resize_to_text__long_lines(self): path = self.new_nfo_file() with open(path, "w") as f: f.write("aaa " * 100) self.window.open_file(path) self.window.resize_to_text() nfoview-1.18/nfoview/unittest.py000066400000000000000000000041641265072436100170410ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2005 Osmo Salomaa # # 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 . """Base class for unit test cases.""" import atexit import os import tempfile __all__ = ("TestCase",) class TestCase: """Base class for unit test cases.""" def assert_raises(self, exception, function, *args, **kwargs): """Assert that calling `function` raises `exception`.""" try: function(*args, **kwargs) except exception: return raise AssertionError("{} failed to raise {}" .format(repr(function), repr(exception))) def new_nfo_file(self): """Return path to a new temporary NFO file.""" handle, path = tempfile.mkstemp() f = os.fdopen(handle, "w") f.write("qwertyuiop asdfghjkl zxcvbnm\n") f.write("http://otsaloma.github.io/nfoview/\n") f.close() atexit.register(os.remove, path) return path def setUp(self): """Compatibility alias for :meth:`setup_method`.""" self.setup_method(None) def setup_method(self, method): """Set state for executing tests in `method`.""" pass def tearDown(self): """Compatibility alias for :meth:`teardown_method`.""" self.teardown_method(None) def teardown_method(self, method): """Remove state set for executing tests in `method`.""" pass def test___init__(self): """Make sure that :meth:`setup_method` is always run.""" pass nfoview-1.18/nfoview/util.py000066400000000000000000000160251265072436100161360ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2005 Osmo Salomaa # # 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 . """Miscellaneous functions.""" import codecs import contextlib import copy import functools import nfoview import os import sys import urllib.parse import webbrowser from gi.repository import Gdk from gi.repository import Gtk from gi.repository import Pango def affirm(value): """Raise :exc:`AffirmationError` if value evaluates to ``False``.""" if not value: raise nfoview.AffirmationError def connect(observer, observable, signal, *args): """ Connect `observable`'s signal to `observer`'s callback method. If `observable` is a string, it should be an attribute of `observer`. If `observable` is not a string it should be the same as `observer`. """ method_name = signal.replace("-", "_").replace("::", "_") if observer is not observable: method_name = "_".join((observable, method_name)) method_name = "_on_{}".format(method_name).replace("__", "_") if not hasattr(observer, method_name): method_name = method_name[1:] method = getattr(observer, method_name) if observer is not observable: observable = getattr(observer, observable) return observable.connect(signal, method, *args) def detect_encoding(path): """Detect and return NFO file encoding.""" with open(path, "rb") as f: line = f.readline() if (line.startswith(codecs.BOM_UTF32_BE) and is_valid_encoding("utf_32_be")): return "utf_32_be" if (line.startswith(codecs.BOM_UTF32_LE) and is_valid_encoding("utf_32_le")): return "utf_32_le" if (line.startswith(codecs.BOM_UTF8) and is_valid_encoding("utf_8_sig")): return "utf_8_sig" if (line.startswith(codecs.BOM_UTF16_BE) and is_valid_encoding("utf_16_be")): return "utf_16_be" if (line.startswith(codecs.BOM_UTF16_LE) and is_valid_encoding("utf_16_le")): return "utf_16_le" # If no encoding was explicitly recognized, as a fallback, # return the de facto standard encoding for NFO files, CP437. return "cp437" def get_font_description(fallback="monospace"): """Return font description from conf with `fallback` added.""" font_desc = Pango.FontDescription(nfoview.conf.font) family = font_desc.get_family() font_desc.set_family(",".join((family, fallback, ""))) return font_desc def get_max_text_view_size(): """Return maximum allowed size for text view.""" max_chars = nfoview.conf.text_view_max_chars max_lines = nfoview.conf.text_view_max_lines max_text = "\n".join(("x" * max_chars,) * max_lines) return get_text_view_size(max_text) def get_text_view_size(text): """Return size for text view required to hold `text`.""" label = Gtk.Label() label.override_font(get_font_description()) label.set_text(text) label.show() return (label.get_preferred_width()[1], label.get_preferred_height()[1]) def _hasattr_def(obj, name): """Return ``True`` if `obj` has attribute `name` defined.""" if hasattr(obj, "__dict__"): return name in obj.__dict__ return hasattr(obj, name) def hex_to_rgba(string): """Return a :class:`Gdk.RGBA` for hexadecimal `string`.""" rgba = Gdk.RGBA() success = rgba.parse(string) if success: return rgba raise ValueError("Parsing string {} failed" .format(repr(string))) def is_valid_encoding(encoding): """Return ``True`` if `encoding` is supported.""" try: codecs.lookup(encoding) return True except LookupError: return False def lookup_color(name, fallback): """Return defined color `name` from GTK+ theme.""" entry = Gtk.Entry() entry.show() style = entry.get_style_context() found, color = style.lookup_color(name) if found: return color return hex_to_rgba(fallback) def makedirs(directory): """Create and return `directory` or raise :exc:`OSError`.""" directory = os.path.abspath(directory) if os.path.isdir(directory): return directory try: os.makedirs(directory) except OSError as error: print("Failed to create directory {}: {}" .format(repr(directory), str(error)), file=sys.stderr) raise # OSError return directory def monkey_patch(obj, name): """ Decorator for functions that change `obj`'s `name` attribute. Any changes done will be reverted after the function is run, i.e. `name` attribute is either restored to its original value or deleted, if it didn't originally exist. """ def outer_wrapper(function): @functools.wraps(function) def inner_wrapper(*args, **kwargs): exists = _hasattr_def(obj, name) value = getattr(obj, name) if exists else None setattr(obj, name, copy.deepcopy(value)) try: return function(*args, **kwargs) finally: setattr(obj, name, value) assert getattr(obj, name) == value assert getattr(obj, name) is value if not exists: delattr(obj, name) assert not _hasattr_def(obj, name) return inner_wrapper return outer_wrapper def rgba_to_hex(color): """Return hexadecimal string for :class:`Gdk.RGBA` `color`.""" return "#{:02x}{:02x}{:02x}".format(int(color.red * 255), int(color.green * 255), int(color.blue * 255)) def show_uri(uri): """Open `uri` in default application.""" try: return Gtk.show_uri(None, uri, Gdk.CURRENT_TIME) except Exception: # Gtk.show_uri fails on Windows and some misconfigured installations. # GError: No application is registered as handling this file # Gtk.show_uri: Operation not supported if uri.startswith(("http://", "https://")): return webbrowser.open(uri) raise # Exception @contextlib.contextmanager def silent(*exceptions): """Try to execute body, ignoring `exceptions`.""" try: yield except exceptions: pass def uri_to_path(uri): """Convert `uri` to local filepath.""" uri = urllib.parse.unquote(uri) if sys.platform == "win32": path = urllib.parse.urlsplit(uri)[2] while path.startswith("/"): path = path[1:] return path.replace("/", "\\") return urllib.parse.urlsplit(uri)[2] nfoview-1.18/nfoview/view.py000066400000000000000000000141241265072436100161310ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2005 Osmo Salomaa # # 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 . """Text view widget for NFO text with support for clickable hyperlinks.""" import nfoview import re from gi.repository import Gdk from gi.repository import GObject from gi.repository import Gtk from gi.repository import Pango __all__ = ("TextView",) class TextView(Gtk.TextView): """Text view widget for NFO text with support for clickable hyperlinks.""" def __init__(self): """Initialize a :class:`TextView` instance.""" GObject.GObject.__init__(self) self._link_tags = [] self._visited_link_tags = [] self._init_properties() self.update_colors() def get_text(self): """Return the text in the text view.""" text_buffer = self.get_buffer() start, end = text_buffer.get_bounds() return text_buffer.get_text(start, end, False) def _init_properties(self): """Initialize text view widget properties.""" pixels_above = nfoview.conf.pixels_above_lines pixels_below = nfoview.conf.pixels_below_lines font_desc = nfoview.util.get_font_description() self.set_cursor_visible(False) self.set_editable(False) self.set_wrap_mode(Gtk.WrapMode.NONE) self.set_pixels_above_lines(pixels_above) self.set_pixels_below_lines(pixels_below) self.set_left_margin(6) self.set_right_margin(6) self.override_font(font_desc) nfoview.util.connect(self, self, "motion-notify-event") def _insert_url(self, url): """Insert `url` into the text view as a hyperlink.""" text_buffer = self.get_buffer() tag = text_buffer.create_tag(None) tag.props.underline = Pango.Underline.SINGLE tag.connect("event", self._on_link_tag_event) tag.nfoview_url = url itr = text_buffer.get_end_iter() text_buffer.insert_with_tags(itr, url, tag) self._link_tags.append(tag) def _insert_word(self, word): """Insert `word` into the text view.""" text_buffer = self.get_buffer() itr = text_buffer.get_end_iter() text_buffer.insert(itr, word) def _on_link_tag_event(self, tag, text_view, event, itr): """Open clicked hyperlink in web browser.""" if event.type != Gdk.EventType.BUTTON_RELEASE: return text_buffer = self.get_buffer() if text_buffer.get_selection_bounds(): return nfoview.util.show_uri(tag.nfoview_url) if tag in self._link_tags: self._link_tags.remove(tag) self._visited_link_tags.append(tag) self.update_colors() def _on_motion_notify_event(self, text_view, event): """Change the mouse pointer when hovering over a hyperlink.""" window = Gtk.TextWindowType.WIDGET x, y = self.window_to_buffer_coords(window, int(event.x), int(event.y)) window = self.get_window(Gtk.TextWindowType.TEXT) for tag in self.get_iter_at_location(x, y).get_tags(): if hasattr(tag, "nfoview_url"): window.set_cursor(Gdk.Cursor(cursor_type=Gdk.CursorType.HAND2)) return True # to not call the default handler. window.set_cursor(Gdk.Cursor(cursor_type=Gdk.CursorType.XTERM)) def set_text(self, text): """Set the text displayed in the text view.""" re_url = re.compile(r"(\w+://(\S+\.)?\S+|www\.\S+)\.[\w\-.~:/?#\[\]@!$&'()*+,;=%]+") self._link_tags = [] self._visited_link_tags = [] text_buffer = self.get_buffer() bounds = text_buffer.get_bounds() text_buffer.delete(*bounds) lines = text.split("\n") # Scan text word-by-word for possible URLs, # but insert words in larger chunks to avoid # doing too many slow text view updates. word_queue = [] for i, line in enumerate(lines): words = line.split(" ") for j, word in enumerate(words): match = re_url.search(word) if match is not None: a, z = match.span() word_queue.append(word[:a]) self._insert_word("".join(word_queue)) word_queue = [] self._insert_url(word[a:z]) word_queue.append(word[z:]) else: # Normal text. word_queue.append(word) word_queue.append(" ") word_queue.pop(-1) word_queue.append("\n") if len(word_queue) > 1000: self._insert_word("".join(word_queue)) word_queue = [] self._insert_word("".join(word_queue)) self.update_colors() def update_colors(self): """Update colors to match the current color scheme.""" name = nfoview.conf.color_scheme scheme = nfoview.schemes.get(name, "default") state = Gtk.StateFlags.NORMAL self.override_color(state, scheme.foreground) self.override_background_color(state, scheme.background) entry = Gtk.Entry() entry.show() style = entry.get_style_context() state = Gtk.StateFlags.SELECTED foreground = style.get_color(state) background = style.get_background_color(state) self.override_color(state, foreground) self.override_background_color(state, background) for tag in self._link_tags: tag.props.foreground_rgba = scheme.link for tag in self._visited_link_tags: tag.props.foreground_rgba = scheme.visited_link nfoview-1.18/nfoview/window.py000066400000000000000000000262701265072436100164730ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Copyright (C) 2005 Osmo Salomaa # # 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 . """Viewer window and user interface controller for NFO files.""" import nfoview import os import textwrap from gi.repository import Gdk from gi.repository import GObject from gi.repository import Gtk from nfoview.i18n import _ __all__ = ("Window",) class Window(Gtk.ApplicationWindow): """Viewer window and user interface controller for NFO files.""" def __init__(self, path=None): """Initialize a :class:`Window` instance and open file at `path`.""" GObject.GObject.__init__(self) self._about_dialog = None self.path = path self._preferences_dialog = None self.view = nfoview.TextView() self._init_properties() self._init_titlebar() self._init_contents() self._init_view() self._init_actions() if self.path is not None: self.open_file(self.path) self.resize_to_text() self._update_actions_enabled() def _init_actions(self): """Initialize user-activatable actions.""" for name in nfoview.actions.__all__: action = getattr(nfoview.actions, name)() if hasattr(nfoview, "app"): name = "win.{}".format(action.props.name) nfoview.app.set_accels_for_action( name, action.accelerators) callback = "_on_{}_activate".format( action.props.name.replace("-", "_")) action.connect("activate", getattr(self, callback)) self.add_action(action) def _init_contents(self): """Initialize child containers and pack contents.""" scroller = Gtk.ScrolledWindow() scroller.set_policy(*((Gtk.PolicyType.AUTOMATIC,)*2)) scroller.set_shadow_type(Gtk.ShadowType.ETCHED_IN) scroller.add(self.view) main_vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0) main_vbox.pack_start(scroller, expand=True, fill=True, padding=0) main_vbox.show_all() self.add(main_vbox) def _init_properties(self): """Initialize window properties.""" self.set_position(Gtk.WindowPosition.CENTER) self.set_icon_name("nfoview") Gtk.Window.set_default_icon_name("nfoview") self.drag_dest_set(flags=Gtk.DestDefaults.ALL, targets=None, actions=Gdk.DragAction.COPY) self.drag_dest_add_uri_targets() self.connect("drag-data-received", self._on_drag_data_received) self.connect("delete-event", self._on_delete_event) def _init_titlebar(self): """Initialize window titlebar.""" header = Gtk.HeaderBar() header.set_title(_("NFO Viewer")) header.set_show_close_button(True) menu_button = Gtk.MenuButton() menu_button.set_direction(Gtk.ArrowType.NONE) # Popover doesn't show keyboard shortcuts. menu_button.set_use_popover(False) path = os.path.join(nfoview.DATA_DIR, "menu.ui") builder = Gtk.Builder.new_from_file(path) menu = builder.get_object("menu") menu_button.set_menu_model(menu) header.pack_start(menu_button) header.show_all() self.set_titlebar(header) def _init_view(self): """Initialize text view and associated buffer.""" self.view.drag_dest_unset() def update(text_buffer, spec, self): self._update_actions_enabled() text_buffer = self.view.get_buffer() text_buffer.connect("notify::has-selection", update, self) def _on_about_activate(self, *args): """Show the about dialog.""" if self._about_dialog is not None: return self._about_dialog.present() self._about_dialog = nfoview.AboutDialog(self) def destroy(dialog, response, self): self._about_dialog.destroy() self._about_dialog = None self._about_dialog.connect("response", destroy, self) self._about_dialog.show() def _on_close_activate(self, *args): """Remove window and possibly terminate application.""" if hasattr(nfoview, "app"): nfoview.app.remove_window(self) def _on_copy_activate(self, *args): """Copy the selected text to the clipboard.""" text_buffer = self.view.get_buffer() clipboard = Gtk.Clipboard.get(Gdk.atom_intern("CLIPBOARD", False)) text_buffer.copy_clipboard(clipboard) def _on_delete_event(self, *args): """Remove window and possibly terminate application.""" # Work around a harmless Gtk-WARNING about drag destination by calling # remove_window and preventing any default handlers of delete-event. # https://bugzilla.gnome.org/show_bug.cgi?id=721708 if hasattr(nfoview, "app"): nfoview.app.remove_window(self) return True def _on_drag_data_received(self, widget, context, x, y, data, info, time): """Open files dragged from a file browser.""" paths = list(map(nfoview.util.uri_to_path, data.get_uris())) if self.path is None: self.open_file(paths.pop(0)) if hasattr(nfoview, "app"): list(map(nfoview.app.open_window, paths)) def _on_export_image_activate(self, *args): """Export document as an image file.""" dialog = nfoview.ExportImageDialog(self) directory = os.path.dirname(self.path) dialog.set_current_folder(directory) basename = os.path.basename(self.path) dialog.set_current_name("{}.png".format(basename)) response = dialog.run() path = dialog.get_filename() dialog.destroy() if response != Gtk.ResponseType.OK: return if not path: return view = nfoview.TextView() view.set_text(self.view.get_text()) window = Gtk.OffscreenWindow() window.nfoview_path = path window.add(view) def on_damage_event(window, *args): pixbuf = window.get_pixbuf() pixbuf.savev(window.nfoview_path, "png", [], []) window.connect("damage-event", on_damage_event) window.show_all() while Gtk.events_pending(): Gtk.main_iteration() def _on_open_activate(self, *args): """Show the open file dialog and open the chosen file.""" dialog = nfoview.OpenDialog(self) if self.path is not None: directory = os.path.dirname(self.path) dialog.set_current_folder(directory) response = dialog.run() paths = dialog.get_filenames() dialog.destroy() if response != Gtk.ResponseType.OK: return if not paths: return if self.path is None: self.open_file(paths.pop(0)) if hasattr(nfoview, "app"): list(map(nfoview.app.open_window, paths)) def _on_preferences_activate(self, *args): """Show the preferences dialog.""" if self._preferences_dialog is not None: return self._preferences_dialog.present() self._preferences_dialog = nfoview.PreferencesDialog(self) def destroy(dialog, response, self): self._preferences_dialog.destroy() self._preferences_dialog = None self._preferences_dialog.connect("response", destroy, self) self._preferences_dialog.show() def _on_quit_activate(self, *args): """Terminate application immediately.""" if hasattr(nfoview, "app"): nfoview.app.quit() def _on_select_all_activate(self, *args): """Select all text in the document.""" text_buffer = self.view.get_buffer() bounds = text_buffer.get_bounds() text_buffer.select_range(*bounds) self._update_actions_enabled() def _on_wrap_lines_activate(self, action, *args): """Break long lines at word borders.""" action.set_state(not action.get_state()) if action.get_state(): return self.view.set_wrap_mode(Gtk.WrapMode.WORD) return self.view.set_wrap_mode(Gtk.WrapMode.NONE) def open_file(self, path): """Read file at `path` and show its text in the view.""" self.path = os.path.abspath(path) self.set_title(os.path.basename(path)) text = self._read_file(path) self.view.set_text(text) self.view.grab_focus() self._update_actions_enabled() def _read_file(self, path): """Read and return the text of NFO file at `path`.""" encoding = nfoview.util.detect_encoding(path) with open(path, "r", encoding=encoding) as f: lines = f.readlines() lines = [x.rstrip() for x in lines] while lines and not lines[-1]: lines.pop() # Handle erroneous (?) UTF-16 encoded files that use # NULL-character filled linebreaks '\x00\r\x00\n', which # readlines interprets as two separate linebreaks. if not any(lines[i] for i in range(1, len(lines), 2)): lines = [lines[i] for i in range(0, len(lines), 2)] return "\n".join(lines) def resize_to_text(self): """Resize window to fit the text in the view.""" # If the width of text exceeds 'text_view_max_chars', # switch to line wrapping and use 80 characters width. # Limit height to 'text_view_max_lines'. Finally limit # width and height to to 80 % of the screen. text = self.view.get_text() text = text or "\n".join(["x" * 80] * 40) size = list(nfoview.util.get_text_view_size(text)) max_size = nfoview.util.get_max_text_view_size() if size[0] > max_size[0]: self.activate_action("wrap-lines", None) text = "\n".join(map( lambda x: textwrap.fill(x, 80), text.split("\n"))) size = list(nfoview.util.get_text_view_size(text)) size[0] = min(size[0], max_size[0]) size[1] = min(size[1], max_size[1]) p1 = nfoview.conf.pixels_above_lines p2 = nfoview.conf.pixels_below_lines size[1] = size[1] + ((p1 + p2) * (text.count("\n")+1)) # Assume 12 pixels total for text view margins, # 14 pixels for scrollbars, 48 pixels for header bar. # XXX: Why is that not even close to enough? size[0] = max(400, size[0] + 12 + 14 + 100) size[1] = max(248, size[1] + 48 + 14 + 100) size[0] = min(size[0], int(0.8 * Gdk.Screen.width())) size[1] = min(size[1], int(0.8 * Gdk.Screen.height())) self.resize(*size) def _update_actions_enabled(self): """Update the enabled state of all actions.""" for name in self.list_actions(): action = self.lookup_action(name) action.update_enabled(self) nfoview-1.18/po/000077500000000000000000000000001265072436100135445ustar00rootroot00000000000000nfoview-1.18/po/POTFILES.in000066400000000000000000000003361265072436100153230ustar00rootroot00000000000000data/nfoview.appdata.xml.in data/nfoview.desktop.in [type: gettext/glade]data/menu.ui [type: gettext/glade]data/preferences-dialog.ui nfoview/about.py nfoview/export.py nfoview/open.py nfoview/schemes.py nfoview/window.py nfoview-1.18/po/README.md000066400000000000000000000011101265072436100150140ustar00rootroot00000000000000Translating NFO Viewer ====================== Translations are available at [Transifex][1]. Please use that to add and update translations. To try your translation, get the nfoview source code from [GitHub][2], download the translation from Transifex, place it in the `po` directory and compile that translation to the `locale` directory (which does not exist by default). ```bash mkdir -p locale/xx/LC_MESSAGES msgfmt -cv po/xx.po -o locale/xx/LC_MESSAGES/nfoview.mo LANG=xx bin/nfoview ``` [1]: http://www.transifex.com/otsaloma/nfoview/ [2]: http://github.com/otsaloma/nfoview nfoview-1.18/po/bg.po000066400000000000000000000145571265072436100145100ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: nfoview-1.4\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-01-23 18:17+0200\n" "PO-Revision-Date: 2011-07-06 14:00+0200\n" "Last-Translator: Svetoslav Stefanov \n" "Language-Team: Svetoslav Stefanov \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Bulgarian\n" "X-Poedit-Country: BULGARIA\n" "X-Poedit-SourceCharset: utf-8\n" #: ../data/nfoview.appdata.xml.in.h:1 msgid "" "NFO Viewer is a simple viewer for NFO files, which are \"ASCII\" art in the " "CP437 codepage. The advantages of using NFO Viewer instead of a text editor " "are preset font and encoding settings, automatic window size and clickable " "hyperlinks." msgstr "" #. TRANSLATORS: The application name "NFO Viewer" has been intentionally #. marked as translatable. If you manage to translate the name in a #. fluent manner, without changing the meaning, you may use that #. translation at your discretion. #: ../data/nfoview.desktop.in.h:1 ../nfoview/about.py:47 #: ../nfoview/window.py:93 msgid "NFO Viewer" msgstr "NFO Viewer" #: ../data/nfoview.desktop.in.h:2 msgid "View NFO files" msgstr "Преглеждане на NFO файлове" #. TRANSLATORS: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! #: ../data/nfoview.desktop.in.h:4 msgid "information;" msgstr "" #: ../data/menu.ui.h:1 msgid "_Open…" msgstr "_Отваряне…" #: ../data/menu.ui.h:2 msgid "_Export Image…" msgstr "" #: ../data/menu.ui.h:3 msgid "C_opy" msgstr "" #: ../data/menu.ui.h:4 msgid "_Select All" msgstr "_Избиране на всичко" #: ../data/menu.ui.h:5 msgid "_Wrap Lines" msgstr "_Пренасяне на редове" #: ../data/menu.ui.h:6 msgid "_Preferences" msgstr "_Предпочитания" #: ../data/menu.ui.h:7 msgid "_About" msgstr "_Относно" #: ../data/menu.ui.h:8 msgid "_Close" msgstr "_Затваряне" #: ../data/menu.ui.h:9 msgid "_Quit" msgstr "_Изход" #: ../data/preferences-dialog.ui.h:1 msgid "Preferences" msgstr "Предпочитания" #: ../data/preferences-dialog.ui.h:2 msgid "Text" msgstr "Текст" #: ../data/preferences-dialog.ui.h:3 msgid "_Font:" msgstr "_Шрифт:" #: ../data/preferences-dialog.ui.h:4 msgid "Li_ne-spacing:" msgstr "_Разстояние между редовете:" #: ../data/preferences-dialog.ui.h:5 msgid "Colors" msgstr "Цветове" #: ../data/preferences-dialog.ui.h:6 msgid "_Schemes:" msgstr "_Схеми:" #: ../data/preferences-dialog.ui.h:7 msgid "Fo_reground:" msgstr "Цвят на _текста:" #: ../data/preferences-dialog.ui.h:8 msgid "Bac_kground:" msgstr "Фонов цвят:" #: ../data/preferences-dialog.ui.h:9 msgid "_Link:" msgstr "_Връзка:" #: ../data/preferences-dialog.ui.h:10 msgid "_Visited link:" msgstr "_Посетена връзка:" #: ../nfoview/about.py:36 msgid "About NFO Viewer" msgstr "Относно NFO Viewer" #: ../nfoview/about.py:39 msgid "Viewer for NFO files" msgstr "Програма за преглед на NFO файлове" #. TRANSLATORS: This is a special message that shouldn't be translated #. literally. It is used in the about dialog to give credits to the #. translators. Thus, you should translate it to your name and email #. address. You can also include other translators who have contributed #. to this translation; in that case, please write them on separate #. lines seperated by newlines (\n). #: ../nfoview/about.py:54 msgid "translator-credits" msgstr "Светослав Стефанов lfu.project@gmail.com" #: ../nfoview/about.py:57 msgid "NFO Viewer Website" msgstr "Уеб сайт на NFO Viewer" #: ../nfoview/export.py:34 msgid "Export Image" msgstr "" #: ../nfoview/export.py:37 ../nfoview/open.py:37 msgid "_Cancel" msgstr "" #: ../nfoview/export.py:38 msgid "_Save" msgstr "" #: ../nfoview/open.py:34 msgid "Open" msgstr "Отваряне" #: ../nfoview/open.py:38 msgid "_Open" msgstr "" #: ../nfoview/open.py:42 msgid "All files" msgstr "Всички файлове" #: ../nfoview/open.py:46 msgid "NFO files (*.nfo)" msgstr "NFO файлове (*.nfo)" #: ../nfoview/schemes.py:52 msgid "Black on white" msgstr "Черно на бяло" #: ../nfoview/schemes.py:64 msgid "Custom" msgstr "Потребителска" #: ../nfoview/schemes.py:76 msgid "Dark grey on light grey" msgstr "Тъмно сиво на светло сиво" #: ../nfoview/schemes.py:91 msgid "System theme" msgstr "Системна тема" #: ../nfoview/schemes.py:103 msgid "Grey on black" msgstr "Сиво на черно" #: ../nfoview/schemes.py:115 msgid "Light grey on dark grey" msgstr "Светло сиво на тъмно сиво" #: ../nfoview/schemes.py:127 msgid "White on black" msgstr "Бяло на черно" #~ msgid "Close document" #~ msgstr "Затваряне на документ" #~ msgid "_Copy" #~ msgstr "_Копиране" #~ msgid "Copy the selected text to the clipboard" #~ msgstr "Копиране на избрания текст в буфера" #~ msgid "Edit NFO Viewer preferences" #~ msgstr "Редактиране настройките на NFO Viewer" #~ msgid "Open file" #~ msgstr "Отваряне на файл" #~ msgid "Quit NFO Viewer" #~ msgstr "Изход от NFO Viewer" #~ msgid "Select all text in the document" #~ msgstr "Избиране на всичкия текст в документа" #~ msgid "Show information about NFO Viewer" #~ msgstr "Показване на информация относно NFO Viewer" #~ msgid "_Edit" #~ msgstr "_Редактиране" #~ msgid "_File" #~ msgstr "_Файл" #~ msgid "_Help" #~ msgstr "_Помощ" #~ msgid "Break long lines at word borders" #~ msgstr "Прекъсване на дългите редове на границите на думите" #~ msgid "Select Font" #~ msgstr "Изберете шрифт" #~ msgid "Select Color" #~ msgstr "Изберете цвят" #~ msgid "Copy" #~ msgstr "Копиране" #~ msgid "Line-_spacing:" #~ msgstr "_Междуредие:" #~ msgid "_Built-in schemes:" #~ msgstr "_Включени схеми:" nfoview-1.18/po/de.po000066400000000000000000000134651265072436100145050ustar00rootroot00000000000000# German translations for nfoview package. # Copyright (C) 2007 THE NFOVIEW'S COPYRIGHT HOLDER # This file is distributed under the same license as the nfoview package. # Bernd Mueller , 2007. # Christoph Wickert , 2009. # msgid "" msgstr "" "Project-Id-Version: nfoview 1.4\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-01-23 18:17+0200\n" "PO-Revision-Date: 2010-03-08 02:36+0100\n" "Last-Translator: Christoph Wickert \n" "Language-Team: German\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-Language: German\n" "X-Poedit-Country: GERMANY\n" #: ../data/nfoview.appdata.xml.in.h:1 msgid "" "NFO Viewer is a simple viewer for NFO files, which are \"ASCII\" art in the " "CP437 codepage. The advantages of using NFO Viewer instead of a text editor " "are preset font and encoding settings, automatic window size and clickable " "hyperlinks." msgstr "" #. TRANSLATORS: The application name "NFO Viewer" has been intentionally #. marked as translatable. If you manage to translate the name in a #. fluent manner, without changing the meaning, you may use that #. translation at your discretion. #: ../data/nfoview.desktop.in.h:1 ../nfoview/about.py:47 #: ../nfoview/window.py:93 msgid "NFO Viewer" msgstr "NFO-Betrachter" #: ../data/nfoview.desktop.in.h:2 msgid "View NFO files" msgstr "NFO-Dokumente anzeigen" #. TRANSLATORS: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! #: ../data/nfoview.desktop.in.h:4 msgid "information;" msgstr "" #: ../data/menu.ui.h:1 msgid "_Open…" msgstr "Ö_ffnen…" #: ../data/menu.ui.h:2 msgid "_Export Image…" msgstr "" #: ../data/menu.ui.h:3 msgid "C_opy" msgstr "" #: ../data/menu.ui.h:4 msgid "_Select All" msgstr "Alles au_swählen" #: ../data/menu.ui.h:5 msgid "_Wrap Lines" msgstr "_Zeilenumbruch" #: ../data/menu.ui.h:6 msgid "_Preferences" msgstr "_Einstellungen" #: ../data/menu.ui.h:7 msgid "_About" msgstr "_Info" #: ../data/menu.ui.h:8 msgid "_Close" msgstr "S_chließen" #: ../data/menu.ui.h:9 msgid "_Quit" msgstr "_Beenden" #: ../data/preferences-dialog.ui.h:1 msgid "Preferences" msgstr "Einstellungen" #: ../data/preferences-dialog.ui.h:2 msgid "Text" msgstr "Text" #: ../data/preferences-dialog.ui.h:3 msgid "_Font:" msgstr "Schri_ftart:" #: ../data/preferences-dialog.ui.h:4 msgid "Li_ne-spacing:" msgstr "" #: ../data/preferences-dialog.ui.h:5 msgid "Colors" msgstr "Farben" #: ../data/preferences-dialog.ui.h:6 msgid "_Schemes:" msgstr "" #: ../data/preferences-dialog.ui.h:7 msgid "Fo_reground:" msgstr "Vo_rdergrund:" #: ../data/preferences-dialog.ui.h:8 msgid "Bac_kground:" msgstr "_Hintergrund:" #: ../data/preferences-dialog.ui.h:9 msgid "_Link:" msgstr "_Link:" #: ../data/preferences-dialog.ui.h:10 msgid "_Visited link:" msgstr "Bes_uchter Link:" #: ../nfoview/about.py:36 msgid "About NFO Viewer" msgstr "Über NFO-Betrachter" #: ../nfoview/about.py:39 msgid "Viewer for NFO files" msgstr "Betrachter für NFO-Dokumente" #. TRANSLATORS: This is a special message that shouldn't be translated #. literally. It is used in the about dialog to give credits to the #. translators. Thus, you should translate it to your name and email #. address. You can also include other translators who have contributed #. to this translation; in that case, please write them on separate #. lines seperated by newlines (\n). #: ../nfoview/about.py:54 msgid "translator-credits" msgstr "" "Bernd Mueller \n" "Christoph Wickert " #: ../nfoview/about.py:57 msgid "NFO Viewer Website" msgstr "NFO-Betrachter Webseite" #: ../nfoview/export.py:34 msgid "Export Image" msgstr "" #: ../nfoview/export.py:37 ../nfoview/open.py:37 msgid "_Cancel" msgstr "" #: ../nfoview/export.py:38 msgid "_Save" msgstr "" #: ../nfoview/open.py:34 msgid "Open" msgstr "Öffnen" #: ../nfoview/open.py:38 msgid "_Open" msgstr "" #: ../nfoview/open.py:42 msgid "All files" msgstr "Alle Dateien" #: ../nfoview/open.py:46 msgid "NFO files (*.nfo)" msgstr "NFO-Dokumente (*.nfo)" #: ../nfoview/schemes.py:52 msgid "Black on white" msgstr "Schwarz auf Weiß" #: ../nfoview/schemes.py:64 msgid "Custom" msgstr "Benutzerdefiniert" #: ../nfoview/schemes.py:76 msgid "Dark grey on light grey" msgstr "Dunkelgrau auf Hellgrau" #: ../nfoview/schemes.py:91 msgid "System theme" msgstr "Systemthema" #: ../nfoview/schemes.py:103 msgid "Grey on black" msgstr "Grau auf Schwarz" #: ../nfoview/schemes.py:115 msgid "Light grey on dark grey" msgstr "Hellgrau auf Dunkelgrau" #: ../nfoview/schemes.py:127 msgid "White on black" msgstr "Weiß auf Schwarz" #~ msgid "Close document" #~ msgstr "Dokument schließen" #~ msgid "_Copy" #~ msgstr "_Kopieren" #~ msgid "Copy the selected text to the clipboard" #~ msgstr "Gewählten Text in die Zwischenablage kopieren" #~ msgid "Edit NFO Viewer preferences" #~ msgstr "Einstellungen des NFO-Betrachters bearbeiten" #~ msgid "Open file" #~ msgstr "Datei öffnen" #~ msgid "Quit NFO Viewer" #~ msgstr "NFO-Betrachter beenden" #~ msgid "Select all text in the document" #~ msgstr "Gesamten Text im Dokument auswählen" #~ msgid "Show information about NFO Viewer" #~ msgstr "Informationen über NFO-Betracher anzeigen" #~ msgid "_Edit" #~ msgstr "_Bearbeiten" #~ msgid "_File" #~ msgstr "_Datei" #~ msgid "_Help" #~ msgstr "_Hilfe" #~ msgid "Break long lines at word borders" #~ msgstr "Lange Zeilen an Wortenden umbrechen" #~ msgid "Select Font" #~ msgstr "Schriftart auswählen" #~ msgid "Select Color" #~ msgstr "Farbe auswählen" #~ msgid "Copy" #~ msgstr "Kopieren" #~ msgid "Line-_spacing:" #~ msgstr "Zeilenab_stand:" #~ msgid "_Built-in schemes:" #~ msgstr "Einge_baute Schemata:" nfoview-1.18/po/de_CH.po000066400000000000000000000130411265072436100150450ustar00rootroot00000000000000# German translations for nfoview package. # Copyright (C) 2007 THE NFOVIEW'S COPYRIGHT HOLDER # This file is distributed under the same license as the nfoview package. # # Fabian Affolter , 2009. # msgid "" msgstr "" "Project-Id-Version: nfoview\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-01-23 18:17+0200\n" "PO-Revision-Date: \n" "Last-Translator: Fabian Affolter \n" "Language-Team: German \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-Language: German\n" "X-Poedit-Country: SWITZERLAND\n" #: ../data/nfoview.appdata.xml.in.h:1 msgid "" "NFO Viewer is a simple viewer for NFO files, which are \"ASCII\" art in the " "CP437 codepage. The advantages of using NFO Viewer instead of a text editor " "are preset font and encoding settings, automatic window size and clickable " "hyperlinks." msgstr "" #. TRANSLATORS: The application name "NFO Viewer" has been intentionally #. marked as translatable. If you manage to translate the name in a #. fluent manner, without changing the meaning, you may use that #. translation at your discretion. #: ../data/nfoview.desktop.in.h:1 ../nfoview/about.py:47 #: ../nfoview/window.py:93 msgid "NFO Viewer" msgstr "NFO-Betrachter" #: ../data/nfoview.desktop.in.h:2 msgid "View NFO files" msgstr "NFO-Dokumente anzeigen" #. TRANSLATORS: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! #: ../data/nfoview.desktop.in.h:4 msgid "information;" msgstr "" #: ../data/menu.ui.h:1 msgid "_Open…" msgstr "Ö_ffnen …" #: ../data/menu.ui.h:2 msgid "_Export Image…" msgstr "" #: ../data/menu.ui.h:3 msgid "C_opy" msgstr "" #: ../data/menu.ui.h:4 msgid "_Select All" msgstr "Alles au_swählen" #: ../data/menu.ui.h:5 msgid "_Wrap Lines" msgstr "" #: ../data/menu.ui.h:6 msgid "_Preferences" msgstr "_Einstellungen" #: ../data/menu.ui.h:7 msgid "_About" msgstr "_Info" #: ../data/menu.ui.h:8 msgid "_Close" msgstr "S_chliessen" #: ../data/menu.ui.h:9 msgid "_Quit" msgstr "" #: ../data/preferences-dialog.ui.h:1 msgid "Preferences" msgstr "Einstellungen" #: ../data/preferences-dialog.ui.h:2 msgid "Text" msgstr "Text" #: ../data/preferences-dialog.ui.h:3 msgid "_Font:" msgstr "Schri_ftart:" #: ../data/preferences-dialog.ui.h:4 msgid "Li_ne-spacing:" msgstr "" #: ../data/preferences-dialog.ui.h:5 msgid "Colors" msgstr "Farben" #: ../data/preferences-dialog.ui.h:6 msgid "_Schemes:" msgstr "" #: ../data/preferences-dialog.ui.h:7 msgid "Fo_reground:" msgstr "Vo_rdergrund:" #: ../data/preferences-dialog.ui.h:8 msgid "Bac_kground:" msgstr "_Hintergrund:" #: ../data/preferences-dialog.ui.h:9 msgid "_Link:" msgstr "_Link:" #: ../data/preferences-dialog.ui.h:10 msgid "_Visited link:" msgstr "Bes_uchter Link:" #: ../nfoview/about.py:36 msgid "About NFO Viewer" msgstr "Über NFO-Betrachter" #: ../nfoview/about.py:39 msgid "Viewer for NFO files" msgstr "Betrachter für NFO-Dokumente" #. TRANSLATORS: This is a special message that shouldn't be translated #. literally. It is used in the about dialog to give credits to the #. translators. Thus, you should translate it to your name and email #. address. You can also include other translators who have contributed #. to this translation; in that case, please write them on separate #. lines seperated by newlines (\n). #: ../nfoview/about.py:54 msgid "translator-credits" msgstr "Fabian Affolter , 2009" #: ../nfoview/about.py:57 msgid "NFO Viewer Website" msgstr "NFO-Betrachter Webseite" #: ../nfoview/export.py:34 msgid "Export Image" msgstr "" #: ../nfoview/export.py:37 ../nfoview/open.py:37 msgid "_Cancel" msgstr "" #: ../nfoview/export.py:38 msgid "_Save" msgstr "" #: ../nfoview/open.py:34 msgid "Open" msgstr "Öffnen" #: ../nfoview/open.py:38 msgid "_Open" msgstr "" #: ../nfoview/open.py:42 msgid "All files" msgstr "Alle Dateien" #: ../nfoview/open.py:46 msgid "NFO files (*.nfo)" msgstr "NFO-Dokumente (*.nfo)" #: ../nfoview/schemes.py:52 msgid "Black on white" msgstr "Schwarz auf Weiss" #: ../nfoview/schemes.py:64 msgid "Custom" msgstr "Benutzerdefiniert" #: ../nfoview/schemes.py:76 msgid "Dark grey on light grey" msgstr "Dunkelgrau auf Hellgrau" #: ../nfoview/schemes.py:91 msgid "System theme" msgstr "Systemthema" #: ../nfoview/schemes.py:103 msgid "Grey on black" msgstr "Grau auf Schwarz" #: ../nfoview/schemes.py:115 msgid "Light grey on dark grey" msgstr "Hellgrau auf Dunkelgrau" #: ../nfoview/schemes.py:127 msgid "White on black" msgstr "Weiss auf Schwarz" #~ msgid "Close document" #~ msgstr "Dokument schliessen" #~ msgid "_Copy" #~ msgstr "_Kopieren" #~ msgid "Copy the selected text to the clipboard" #~ msgstr "Gewählten Text in die Zwischenablage kopieren" #~ msgid "Edit NFO Viewer preferences" #~ msgstr "Einstellungen des NFO-Betrachters bearbeiten" #~ msgid "Open file" #~ msgstr "Datei öffnen" #~ msgid "Select all text in the document" #~ msgstr "Gesamten Text im Dokument auswählen" #~ msgid "Show information about NFO Viewer" #~ msgstr "Informationen über NFO-Betracher anzeigen" #~ msgid "_Edit" #~ msgstr "_Bearbeiten" #~ msgid "_File" #~ msgstr "_Datei" #~ msgid "_Help" #~ msgstr "_Hilfe" #~ msgid "Select Font" #~ msgstr "Schriftart auswählen" #~ msgid "Select Color" #~ msgstr "Farbe auswählen" #~ msgid "Copy" #~ msgstr "Kopieren" #~ msgid "Line-_spacing:" #~ msgstr "Zeilenab_stand:" #~ msgid "_Built-in schemes:" #~ msgstr "Einge_baute Schemata:" nfoview-1.18/po/fi.po000066400000000000000000000116711265072436100145100ustar00rootroot00000000000000# Finnish translations for nfoview package. # Copyright (C) 2008-2014 Osmo Salomaa # This file is distributed under the same license as the nfoview package. # Osmo Salomaa , 2008-2014, 2015. msgid "" msgstr "" "Project-Id-Version: nfoview 1.15.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-01-23 18:17+0200\n" "PO-Revision-Date: 2015-05-01 05:11+0300\n" "Last-Translator: Osmo Salomaa \n" "Language-Team: fi\n" "Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Virtaal 0.7.1\n" #: ../data/nfoview.appdata.xml.in.h:1 msgid "" "NFO Viewer is a simple viewer for NFO files, which are \"ASCII\" art in the " "CP437 codepage. The advantages of using NFO Viewer instead of a text editor " "are preset font and encoding settings, automatic window size and clickable " "hyperlinks." msgstr "" "NFO-katselin on yksinkertainen katselin NFO-tiedostoille, jotka ovat \"ASCII" "\"-taidetta CP437-merkistökoodauksella. NFO-katselimen käytön edut " "tekstieditoriin nähden ovat esiasetetut kirjasin- ja " "merkistökoodausasetukset, automaattinen ikkunan koko ja napsautettavat " "hyperlinkit." #. TRANSLATORS: The application name "NFO Viewer" has been intentionally #. marked as translatable. If you manage to translate the name in a #. fluent manner, without changing the meaning, you may use that #. translation at your discretion. #: ../data/nfoview.desktop.in.h:1 ../nfoview/about.py:47 #: ../nfoview/window.py:93 msgid "NFO Viewer" msgstr "NFO-katselin" #: ../data/nfoview.desktop.in.h:2 msgid "View NFO files" msgstr "Katsele NFO-tiedostoja" #. TRANSLATORS: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! #: ../data/nfoview.desktop.in.h:4 msgid "information;" msgstr "tietoja;informaatio;" #: ../data/menu.ui.h:1 msgid "_Open…" msgstr "_Avaa…" #: ../data/menu.ui.h:2 msgid "_Export Image…" msgstr "_Vie kuva…" #: ../data/menu.ui.h:3 msgid "C_opy" msgstr "_Kopioi" #: ../data/menu.ui.h:4 msgid "_Select All" msgstr "_Valitse kaikki" #: ../data/menu.ui.h:5 msgid "_Wrap Lines" msgstr "_Rivitä" #: ../data/menu.ui.h:6 msgid "_Preferences" msgstr "_Asetukset" #: ../data/menu.ui.h:7 msgid "_About" msgstr "_Tietoja" #: ../data/menu.ui.h:8 msgid "_Close" msgstr "_Sulje" #: ../data/menu.ui.h:9 msgid "_Quit" msgstr "_Lopeta" #: ../data/preferences-dialog.ui.h:1 msgid "Preferences" msgstr "Asetukset" #: ../data/preferences-dialog.ui.h:2 msgid "Text" msgstr "Teksti" #: ../data/preferences-dialog.ui.h:3 msgid "_Font:" msgstr "_Kirjasin:" #: ../data/preferences-dialog.ui.h:4 msgid "Li_ne-spacing:" msgstr "_Riviväli:" #: ../data/preferences-dialog.ui.h:5 msgid "Colors" msgstr "Värit" #: ../data/preferences-dialog.ui.h:6 msgid "_Schemes:" msgstr "_Teemat:" #: ../data/preferences-dialog.ui.h:7 msgid "Fo_reground:" msgstr "_Edusta:" #: ../data/preferences-dialog.ui.h:8 msgid "Bac_kground:" msgstr "T_austa:" #: ../data/preferences-dialog.ui.h:9 msgid "_Link:" msgstr "_Linkki:" #: ../data/preferences-dialog.ui.h:10 msgid "_Visited link:" msgstr "_Vierailtu linkki:" #: ../nfoview/about.py:36 msgid "About NFO Viewer" msgstr "Tietoja NFO-katselimesta" #: ../nfoview/about.py:39 msgid "Viewer for NFO files" msgstr "Katselin NFO-tiedostoille" #. TRANSLATORS: This is a special message that shouldn't be translated #. literally. It is used in the about dialog to give credits to the #. translators. Thus, you should translate it to your name and email #. address. You can also include other translators who have contributed #. to this translation; in that case, please write them on separate #. lines seperated by newlines (\n). #: ../nfoview/about.py:54 msgid "translator-credits" msgstr "Osmo Salomaa " #: ../nfoview/about.py:57 msgid "NFO Viewer Website" msgstr "NFO-katselimen www-sivut" #: ../nfoview/export.py:34 msgid "Export Image" msgstr "Vie kuva" #: ../nfoview/export.py:37 ../nfoview/open.py:37 msgid "_Cancel" msgstr "_Peru" #: ../nfoview/export.py:38 msgid "_Save" msgstr "_Tallenna" #: ../nfoview/open.py:34 msgid "Open" msgstr "Avaa" #: ../nfoview/open.py:38 msgid "_Open" msgstr "_Avaa" #: ../nfoview/open.py:42 msgid "All files" msgstr "Kaikki tiedostot" #: ../nfoview/open.py:46 msgid "NFO files (*.nfo)" msgstr "NFO-tiedostot (*.nfo)" #: ../nfoview/schemes.py:52 msgid "Black on white" msgstr "Musta valkoisella" #: ../nfoview/schemes.py:64 msgid "Custom" msgstr "Mukautettu" #: ../nfoview/schemes.py:76 msgid "Dark grey on light grey" msgstr "Tumman harmaa vaalean harmaalla" #: ../nfoview/schemes.py:91 msgid "System theme" msgstr "Järjestelmän teema" #: ../nfoview/schemes.py:103 msgid "Grey on black" msgstr "Harmaa mustalla" #: ../nfoview/schemes.py:115 msgid "Light grey on dark grey" msgstr "Vaalean harmaa tumman harmaalla" #: ../nfoview/schemes.py:127 msgid "White on black" msgstr "Valkoinen mustalla" nfoview-1.18/po/fr.po000066400000000000000000000122451265072436100145170ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # elgeneralmidi , 2009 # Okki , 2015 msgid "" msgstr "" "Project-Id-Version: nfoview\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-01-23 18:17+0200\n" "PO-Revision-Date: 2015-05-11 21:58+0000\n" "Last-Translator: Okki \n" "Language-Team: French (http://www.transifex.com/otsaloma/nfoview/language/" "fr/)\n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #: ../data/nfoview.appdata.xml.in.h:1 msgid "" "NFO Viewer is a simple viewer for NFO files, which are \"ASCII\" art in the " "CP437 codepage. The advantages of using NFO Viewer instead of a text editor " "are preset font and encoding settings, automatic window size and clickable " "hyperlinks." msgstr "" "NFO Viewer est une visionneuse simple pour les fichiers NFO qui sont de " "l'art « ASCII » réalisé en utilisant la page de code 437. Les avantages de " "l'utilisation de NFO Viewer au lieu d'un éditeur de texte sont l'encodage et " "la police prédéfinis, le dimensionnement automatique de la fenêtre ainsi que " "des hyperliens cliquables." #. TRANSLATORS: The application name "NFO Viewer" has been intentionally #. marked as translatable. If you manage to translate the name in a #. fluent manner, without changing the meaning, you may use that #. translation at your discretion. #: ../data/nfoview.desktop.in.h:1 ../nfoview/about.py:47 #: ../nfoview/window.py:93 msgid "NFO Viewer" msgstr "NFO Viewer" #: ../data/nfoview.desktop.in.h:2 msgid "View NFO files" msgstr "Visionner des fichiers NFO" #. TRANSLATORS: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! #: ../data/nfoview.desktop.in.h:4 msgid "information;" msgstr "information;visualiseur;" #: ../data/menu.ui.h:1 msgid "_Open…" msgstr "_Ouvrir…" #: ../data/menu.ui.h:2 msgid "_Export Image…" msgstr "_Exporter l'image…" #: ../data/menu.ui.h:3 msgid "C_opy" msgstr "Co_pier" #: ../data/menu.ui.h:4 msgid "_Select All" msgstr "Tout _Sélectionner" #: ../data/menu.ui.h:5 msgid "_Wrap Lines" msgstr "_Limiter la longueur des lignes" #: ../data/menu.ui.h:6 msgid "_Preferences" msgstr "Pré_férences" #: ../data/menu.ui.h:7 msgid "_About" msgstr "À _propos" #: ../data/menu.ui.h:8 msgid "_Close" msgstr "Fe_rmer" #: ../data/menu.ui.h:9 msgid "_Quit" msgstr "_Quitter" #: ../data/preferences-dialog.ui.h:1 msgid "Preferences" msgstr "Préférences" #: ../data/preferences-dialog.ui.h:2 msgid "Text" msgstr "Texte" #: ../data/preferences-dialog.ui.h:3 msgid "_Font:" msgstr "_Police :" #: ../data/preferences-dialog.ui.h:4 msgid "Li_ne-spacing:" msgstr "_Interligne :" #: ../data/preferences-dialog.ui.h:5 msgid "Colors" msgstr "Couleurs" #: ../data/preferences-dialog.ui.h:6 msgid "_Schemes:" msgstr "_Schémas :" #: ../data/preferences-dialog.ui.h:7 msgid "Fo_reground:" msgstr "Avan_t-plan :" #: ../data/preferences-dialog.ui.h:8 msgid "Bac_kground:" msgstr "Arrièr_e-plan :" #: ../data/preferences-dialog.ui.h:9 msgid "_Link:" msgstr "_Lien :" #: ../data/preferences-dialog.ui.h:10 msgid "_Visited link:" msgstr "Lien _visité :" #: ../nfoview/about.py:36 msgid "About NFO Viewer" msgstr "À propos de NFO Viewer" #: ../nfoview/about.py:39 msgid "Viewer for NFO files" msgstr "Visualiseur de fichiers NFO" #. TRANSLATORS: This is a special message that shouldn't be translated #. literally. It is used in the about dialog to give credits to the #. translators. Thus, you should translate it to your name and email #. address. You can also include other translators who have contributed #. to this translation; in that case, please write them on separate #. lines seperated by newlines (\n). #: ../nfoview/about.py:54 msgid "translator-credits" msgstr "" "elgeneralmidi \n" "Mise à jour mineure anonyme" #: ../nfoview/about.py:57 msgid "NFO Viewer Website" msgstr "Site web de NFO Viewer" #: ../nfoview/export.py:34 msgid "Export Image" msgstr "Exporter l'image" #: ../nfoview/export.py:37 ../nfoview/open.py:37 msgid "_Cancel" msgstr "_Annuler" #: ../nfoview/export.py:38 msgid "_Save" msgstr "_Enregistrer" #: ../nfoview/open.py:34 msgid "Open" msgstr "Ouvrir" #: ../nfoview/open.py:38 msgid "_Open" msgstr "_Ouvrir" #: ../nfoview/open.py:42 msgid "All files" msgstr "Tous les fichiers" #: ../nfoview/open.py:46 msgid "NFO files (*.nfo)" msgstr "Fichiers NFO (*.nfo)" #: ../nfoview/schemes.py:52 msgid "Black on white" msgstr "Noir sur blanc" #: ../nfoview/schemes.py:64 msgid "Custom" msgstr "Personnaliser" #: ../nfoview/schemes.py:76 msgid "Dark grey on light grey" msgstr "Gris foncé sur gris clair" #: ../nfoview/schemes.py:91 msgid "System theme" msgstr "Thème système" #: ../nfoview/schemes.py:103 msgid "Grey on black" msgstr "Gris sur noir" #: ../nfoview/schemes.py:115 msgid "Light grey on dark grey" msgstr "Gris clair sur gris foncé" #: ../nfoview/schemes.py:127 msgid "White on black" msgstr "Blanc sur noir" nfoview-1.18/po/he.po000066400000000000000000000135131265072436100145030ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: nfoview\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-01-23 18:17+0200\n" "PO-Revision-Date: 2010-04-26 10:40+0200\n" "Last-Translator: Yaron Shahrabani \n" "Language-Team: Hebrew (Yaron Shahrabani) \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural= (n != 1);\n" "X-Poedit-Language: Hebrew\n" "X-Poedit-Country: ISRAEL\n" "X-Poedit-SourceCharset: utf-8\n" #: ../data/nfoview.appdata.xml.in.h:1 msgid "" "NFO Viewer is a simple viewer for NFO files, which are \"ASCII\" art in the " "CP437 codepage. The advantages of using NFO Viewer instead of a text editor " "are preset font and encoding settings, automatic window size and clickable " "hyperlinks." msgstr "" #. TRANSLATORS: The application name "NFO Viewer" has been intentionally #. marked as translatable. If you manage to translate the name in a #. fluent manner, without changing the meaning, you may use that #. translation at your discretion. #: ../data/nfoview.desktop.in.h:1 ../nfoview/about.py:47 #: ../nfoview/window.py:93 msgid "NFO Viewer" msgstr "מציג NFO" #: ../data/nfoview.desktop.in.h:2 msgid "View NFO files" msgstr "צפייה בקובצי NFO" #. TRANSLATORS: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! #: ../data/nfoview.desktop.in.h:4 msgid "information;" msgstr "" #: ../data/menu.ui.h:1 msgid "_Open…" msgstr "_פתיחה…" #: ../data/menu.ui.h:2 msgid "_Export Image…" msgstr "" #: ../data/menu.ui.h:3 msgid "C_opy" msgstr "" #: ../data/menu.ui.h:4 msgid "_Select All" msgstr "בחירת ה_כול" #: ../data/menu.ui.h:5 msgid "_Wrap Lines" msgstr "_גלישת שורות" #: ../data/menu.ui.h:6 msgid "_Preferences" msgstr "הע_דפות" #: ../data/menu.ui.h:7 msgid "_About" msgstr "על _אודות" #: ../data/menu.ui.h:8 msgid "_Close" msgstr "_סגירה" #: ../data/menu.ui.h:9 msgid "_Quit" msgstr "י_ציאה" #: ../data/preferences-dialog.ui.h:1 msgid "Preferences" msgstr "העדפות" #: ../data/preferences-dialog.ui.h:2 msgid "Text" msgstr "טקסט" #: ../data/preferences-dialog.ui.h:3 msgid "_Font:" msgstr "_גופן:" #: ../data/preferences-dialog.ui.h:4 msgid "Li_ne-spacing:" msgstr "ריווח _שורות:" #: ../data/preferences-dialog.ui.h:5 msgid "Colors" msgstr "צבעים" #: ../data/preferences-dialog.ui.h:6 msgid "_Schemes:" msgstr "_ערכות:" #: ../data/preferences-dialog.ui.h:7 msgid "Fo_reground:" msgstr "_קידמה:" #: ../data/preferences-dialog.ui.h:8 msgid "Bac_kground:" msgstr "_רקע:" #: ../data/preferences-dialog.ui.h:9 msgid "_Link:" msgstr "_קישור:" #: ../data/preferences-dialog.ui.h:10 msgid "_Visited link:" msgstr "_קישור שנפתח:" #: ../nfoview/about.py:36 msgid "About NFO Viewer" msgstr "על אודות מציג ה־NFO" #: ../nfoview/about.py:39 msgid "Viewer for NFO files" msgstr "מציג לקובצי NFO" #. TRANSLATORS: This is a special message that shouldn't be translated #. literally. It is used in the about dialog to give credits to the #. translators. Thus, you should translate it to your name and email #. address. You can also include other translators who have contributed #. to this translation; in that case, please write them on separate #. lines seperated by newlines (\n). #: ../nfoview/about.py:54 msgid "translator-credits" msgstr "Yaron Shahrabani " #: ../nfoview/about.py:57 msgid "NFO Viewer Website" msgstr "האתר של מציג ה־NFO" #: ../nfoview/export.py:34 msgid "Export Image" msgstr "" #: ../nfoview/export.py:37 ../nfoview/open.py:37 msgid "_Cancel" msgstr "" #: ../nfoview/export.py:38 msgid "_Save" msgstr "" #: ../nfoview/open.py:34 msgid "Open" msgstr "פתיחה" #: ../nfoview/open.py:38 msgid "_Open" msgstr "" #: ../nfoview/open.py:42 msgid "All files" msgstr "כל הקבצים" #: ../nfoview/open.py:46 msgid "NFO files (*.nfo)" msgstr "קובצי NFO‏ (*.nfo)" #: ../nfoview/schemes.py:52 msgid "Black on white" msgstr "שחור על לבן" #: ../nfoview/schemes.py:64 msgid "Custom" msgstr "מותאם אישית" #: ../nfoview/schemes.py:76 msgid "Dark grey on light grey" msgstr "אפור כהה על אפור בהיר" #: ../nfoview/schemes.py:91 msgid "System theme" msgstr "ערכת המערכת" #: ../nfoview/schemes.py:103 msgid "Grey on black" msgstr "אפור על שחור" #: ../nfoview/schemes.py:115 msgid "Light grey on dark grey" msgstr "אפור בהיר על אפור כהה" #: ../nfoview/schemes.py:127 msgid "White on black" msgstr "לבן על שחור" #~ msgid "Close document" #~ msgstr "סגירת המסמך" #~ msgid "_Copy" #~ msgstr "ה_עתקה" #~ msgid "Copy the selected text to the clipboard" #~ msgstr "העתקת הטקסט הנבחר ללוח הגזירים" #~ msgid "Edit NFO Viewer preferences" #~ msgstr "עריכת העדפות מציג ה־NFO" #~ msgid "Open file" #~ msgstr "פתיחת קובץ" #~ msgid "Quit NFO Viewer" #~ msgstr "יציאה ממציג ה־NFO" #~ msgid "Select all text in the document" #~ msgstr "בחירת כל הטקסט במסמך" #~ msgid "Show information about NFO Viewer" #~ msgstr "הצגת מידע אודות מציג ה־NFO" #~ msgid "_Edit" #~ msgstr "ע_ריכה" #~ msgid "_File" #~ msgstr "_קובץ" #~ msgid "_Help" #~ msgstr "ע_זרה" #~ msgid "Break long lines at word borders" #~ msgstr "שבירת שורות ארוכות בגבולות המילים" #~ msgid "Select Font" #~ msgstr "בחירת גופן" #~ msgid "Select Color" #~ msgstr "בחירת צבע" #~ msgid "Copy" #~ msgstr "העתקה" nfoview-1.18/po/hu.po000066400000000000000000000130751265072436100145260ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: nfoview 1.4\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-01-23 18:17+0200\n" "PO-Revision-Date: 2010-05-14 12:30+0100\n" "Last-Translator: csola48 \n" "Language-Team: csola48 \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Hungarian\n" "X-Poedit-Country: HUNGARY\n" #: ../data/nfoview.appdata.xml.in.h:1 msgid "" "NFO Viewer is a simple viewer for NFO files, which are \"ASCII\" art in the " "CP437 codepage. The advantages of using NFO Viewer instead of a text editor " "are preset font and encoding settings, automatic window size and clickable " "hyperlinks." msgstr "" #. TRANSLATORS: The application name "NFO Viewer" has been intentionally #. marked as translatable. If you manage to translate the name in a #. fluent manner, without changing the meaning, you may use that #. translation at your discretion. #: ../data/nfoview.desktop.in.h:1 ../nfoview/about.py:47 #: ../nfoview/window.py:93 msgid "NFO Viewer" msgstr "NFO-fájlnéző" #: ../data/nfoview.desktop.in.h:2 msgid "View NFO files" msgstr "NFO fájl nézése" #. TRANSLATORS: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! #: ../data/nfoview.desktop.in.h:4 msgid "information;" msgstr "" #: ../data/menu.ui.h:1 msgid "_Open…" msgstr "_Megnyitás…" #: ../data/menu.ui.h:2 msgid "_Export Image…" msgstr "" #: ../data/menu.ui.h:3 msgid "C_opy" msgstr "" #: ../data/menu.ui.h:4 msgid "_Select All" msgstr "_Minden kijelölése" #: ../data/menu.ui.h:5 msgid "_Wrap Lines" msgstr "_Sortörés" #: ../data/menu.ui.h:6 msgid "_Preferences" msgstr "_Beállítások" #: ../data/menu.ui.h:7 msgid "_About" msgstr "_Névjegy" #: ../data/menu.ui.h:8 msgid "_Close" msgstr "_Bezárás" #: ../data/menu.ui.h:9 msgid "_Quit" msgstr "_Kilépés" #: ../data/preferences-dialog.ui.h:1 msgid "Preferences" msgstr "Beállítások" #: ../data/preferences-dialog.ui.h:2 msgid "Text" msgstr "Szöveg" #: ../data/preferences-dialog.ui.h:3 msgid "_Font:" msgstr "_Betűtípus:" #: ../data/preferences-dialog.ui.h:4 msgid "Li_ne-spacing:" msgstr "_Sortávolság:" #: ../data/preferences-dialog.ui.h:5 msgid "Colors" msgstr "Színek" #: ../data/preferences-dialog.ui.h:6 msgid "_Schemes:" msgstr "_Elrendezés:" #: ../data/preferences-dialog.ui.h:7 msgid "Fo_reground:" msgstr "_Előtér:" #: ../data/preferences-dialog.ui.h:8 msgid "Bac_kground:" msgstr "_Háttér:" #: ../data/preferences-dialog.ui.h:9 msgid "_Link:" msgstr "_Kapcsolat:" #: ../data/preferences-dialog.ui.h:10 msgid "_Visited link:" msgstr "_Látogatott link:" #: ../nfoview/about.py:36 msgid "About NFO Viewer" msgstr "Névjegy" #: ../nfoview/about.py:39 msgid "Viewer for NFO files" msgstr "Néző NFO fájlokhoz" #. TRANSLATORS: This is a special message that shouldn't be translated #. literally. It is used in the about dialog to give credits to the #. translators. Thus, you should translate it to your name and email #. address. You can also include other translators who have contributed #. to this translation; in that case, please write them on separate #. lines seperated by newlines (\n). #: ../nfoview/about.py:54 msgid "translator-credits" msgstr "L. Csordas " #: ../nfoview/about.py:57 msgid "NFO Viewer Website" msgstr "Az NFO néző weboldala" #: ../nfoview/export.py:34 msgid "Export Image" msgstr "" #: ../nfoview/export.py:37 ../nfoview/open.py:37 msgid "_Cancel" msgstr "" #: ../nfoview/export.py:38 msgid "_Save" msgstr "" #: ../nfoview/open.py:34 msgid "Open" msgstr "Megnyitás" #: ../nfoview/open.py:38 msgid "_Open" msgstr "" #: ../nfoview/open.py:42 msgid "All files" msgstr "Minden fájl" #: ../nfoview/open.py:46 msgid "NFO files (*.nfo)" msgstr "NFO fájl (*.nfo)" #: ../nfoview/schemes.py:52 msgid "Black on white" msgstr "Fekete a fehéren" #: ../nfoview/schemes.py:64 msgid "Custom" msgstr "Szokásos" #: ../nfoview/schemes.py:76 msgid "Dark grey on light grey" msgstr "Sötét szürke a világos szürkén" #: ../nfoview/schemes.py:91 msgid "System theme" msgstr "Rendszer téma" #: ../nfoview/schemes.py:103 msgid "Grey on black" msgstr "Szürke a feketén" #: ../nfoview/schemes.py:115 msgid "Light grey on dark grey" msgstr "Világos szürke a sötét szürkén" #: ../nfoview/schemes.py:127 msgid "White on black" msgstr "Fehér a feketén" #~ msgid "Close document" #~ msgstr "Dokumentum bezárása" #~ msgid "_Copy" #~ msgstr "_Másolás" #~ msgid "Copy the selected text to the clipboard" #~ msgstr "A kiválasztott szöveg vágólapra másolása" #~ msgid "Edit NFO Viewer preferences" #~ msgstr "A beállítások szerkesztése" #~ msgid "Open file" #~ msgstr "Fájl megnyitása" #~ msgid "Quit NFO Viewer" #~ msgstr "Kilépés az NFO-fájlnézőből" #~ msgid "Select all text in the document" #~ msgstr "Minden szöveg kijelölése a dokumentumban" #~ msgid "Show information about NFO Viewer" #~ msgstr "Információ az NFO-fájlnézőről" #~ msgid "_Edit" #~ msgstr "Sz_erkesztés" #~ msgid "_File" #~ msgstr "_Fájl" #~ msgid "_Help" #~ msgstr "_Súgó" #~ msgid "Break long lines at word borders" #~ msgstr "Hosszú sorok szóhatáron való törése" #~ msgid "Select Font" #~ msgstr "Betűtípus választása" #~ msgid "Select Color" #~ msgstr "Szín választása" #~ msgid "Copy" #~ msgstr "Másolás" nfoview-1.18/po/it.po000066400000000000000000000127461265072436100145320ustar00rootroot00000000000000# Italian translations for nfoview package. # Copyright (C) 2009 THE NFOVIEW'S COPYRIGHT HOLDER # This file is distributed under the same license as the nfoview package. # Alessio Treglia , 2009. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: nfoview 1.6\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-01-23 18:17+0200\n" "PO-Revision-Date: \n" "Last-Translator: Alessio Treglia \n" "Language-Team: Italian \n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../data/nfoview.appdata.xml.in.h:1 msgid "" "NFO Viewer is a simple viewer for NFO files, which are \"ASCII\" art in the " "CP437 codepage. The advantages of using NFO Viewer instead of a text editor " "are preset font and encoding settings, automatic window size and clickable " "hyperlinks." msgstr "" #. TRANSLATORS: The application name "NFO Viewer" has been intentionally #. marked as translatable. If you manage to translate the name in a #. fluent manner, without changing the meaning, you may use that #. translation at your discretion. #: ../data/nfoview.desktop.in.h:1 ../nfoview/about.py:47 #: ../nfoview/window.py:93 msgid "NFO Viewer" msgstr "Visualizzatore NFO" #: ../data/nfoview.desktop.in.h:2 msgid "View NFO files" msgstr "Visualizza file NFO" #. TRANSLATORS: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! #: ../data/nfoview.desktop.in.h:4 msgid "information;" msgstr "" #: ../data/menu.ui.h:1 msgid "_Open…" msgstr "_Apri…" #: ../data/menu.ui.h:2 msgid "_Export Image…" msgstr "" #: ../data/menu.ui.h:3 msgid "C_opy" msgstr "" #: ../data/menu.ui.h:4 msgid "_Select All" msgstr "_Seleziona tutto" #: ../data/menu.ui.h:5 msgid "_Wrap Lines" msgstr "" #: ../data/menu.ui.h:6 msgid "_Preferences" msgstr "_Preferenze" #: ../data/menu.ui.h:7 msgid "_About" msgstr "_Informazioni" #: ../data/menu.ui.h:8 msgid "_Close" msgstr "_Chiudi" #: ../data/menu.ui.h:9 msgid "_Quit" msgstr "_Esci" #: ../data/preferences-dialog.ui.h:1 msgid "Preferences" msgstr "Preferenze" #: ../data/preferences-dialog.ui.h:2 msgid "Text" msgstr "Testo" #: ../data/preferences-dialog.ui.h:3 msgid "_Font:" msgstr "_Tipo di carattere:" #: ../data/preferences-dialog.ui.h:4 msgid "Li_ne-spacing:" msgstr "" #: ../data/preferences-dialog.ui.h:5 msgid "Colors" msgstr "Colori" #: ../data/preferences-dialog.ui.h:6 msgid "_Schemes:" msgstr "" #: ../data/preferences-dialog.ui.h:7 msgid "Fo_reground:" msgstr "P_rimo piano:" #: ../data/preferences-dialog.ui.h:8 msgid "Bac_kground:" msgstr "S_fondo:" #: ../data/preferences-dialog.ui.h:9 msgid "_Link:" msgstr "Col_legamento:" #: ../data/preferences-dialog.ui.h:10 msgid "_Visited link:" msgstr "Collegamento _visitato:" #: ../nfoview/about.py:36 msgid "About NFO Viewer" msgstr "Informazioni su NFO Viewer" #: ../nfoview/about.py:39 msgid "Viewer for NFO files" msgstr "Visualizzatore per file NFO" #. TRANSLATORS: This is a special message that shouldn't be translated #. literally. It is used in the about dialog to give credits to the #. translators. Thus, you should translate it to your name and email #. address. You can also include other translators who have contributed #. to this translation; in that case, please write them on separate #. lines seperated by newlines (\n). #: ../nfoview/about.py:54 msgid "translator-credits" msgstr "Alessio Treglia " #: ../nfoview/about.py:57 msgid "NFO Viewer Website" msgstr "Sito web di NFO Viewer" #: ../nfoview/export.py:34 msgid "Export Image" msgstr "" #: ../nfoview/export.py:37 ../nfoview/open.py:37 msgid "_Cancel" msgstr "" #: ../nfoview/export.py:38 msgid "_Save" msgstr "" #: ../nfoview/open.py:34 msgid "Open" msgstr "Apri" #: ../nfoview/open.py:38 msgid "_Open" msgstr "" #: ../nfoview/open.py:42 msgid "All files" msgstr "Tutti i file" #: ../nfoview/open.py:46 msgid "NFO files (*.nfo)" msgstr "File NFO (*.nfo)" #: ../nfoview/schemes.py:52 msgid "Black on white" msgstr "Nero su bianco" #: ../nfoview/schemes.py:64 msgid "Custom" msgstr "Personalizzato" #: ../nfoview/schemes.py:76 msgid "Dark grey on light grey" msgstr "Grigio scuro su grigio chiaro" #: ../nfoview/schemes.py:91 msgid "System theme" msgstr "Tema di sistema" #: ../nfoview/schemes.py:103 msgid "Grey on black" msgstr "Grigio su nero" #: ../nfoview/schemes.py:115 msgid "Light grey on dark grey" msgstr "Grigio chiaro su grigio scuro" #: ../nfoview/schemes.py:127 msgid "White on black" msgstr "Bianco su nero" #~ msgid "Close document" #~ msgstr "Chiudi documento" #~ msgid "_Copy" #~ msgstr "_Copia" #~ msgid "Copy the selected text to the clipboard" #~ msgstr "Copia il testo selezionato negli appunti" #~ msgid "Edit NFO Viewer preferences" #~ msgstr "Modifica le preferenze di NFO Viewer" #~ msgid "Open file" #~ msgstr "Apri file" #~ msgid "Quit NFO Viewer" #~ msgstr "Esci da NFO Viewer" #~ msgid "Select all text in the document" #~ msgstr "Seleziona tutto il testo nel documento" #~ msgid "Show information about NFO Viewer" #~ msgstr "Mostra le informazioni su NFO Viewer" #~ msgid "_Edit" #~ msgstr "_Modifica" #~ msgid "_File" #~ msgstr "_File" #~ msgid "_Help" #~ msgstr "A_iuto" #~ msgid "Select Font" #~ msgstr "Selezionare il tipo di carattere" #~ msgid "Select Color" #~ msgstr "Selezionare il colore" #~ msgid "Copy" #~ msgstr "Copia" #~ msgid "Line-_spacing:" #~ msgstr "Inte_rlinea:" #~ msgid "_Built-in schemes:" #~ msgstr "Schemi _incorporati:" nfoview-1.18/po/nfoview.pot000066400000000000000000000100511265072436100157420ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-01-23 18:17+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../data/nfoview.appdata.xml.in.h:1 msgid "" "NFO Viewer is a simple viewer for NFO files, which are \"ASCII\" art in the " "CP437 codepage. The advantages of using NFO Viewer instead of a text editor " "are preset font and encoding settings, automatic window size and clickable " "hyperlinks." msgstr "" #. TRANSLATORS: The application name "NFO Viewer" has been intentionally #. marked as translatable. If you manage to translate the name in a #. fluent manner, without changing the meaning, you may use that #. translation at your discretion. #: ../data/nfoview.desktop.in.h:1 ../nfoview/about.py:47 #: ../nfoview/window.py:93 msgid "NFO Viewer" msgstr "" #: ../data/nfoview.desktop.in.h:2 msgid "View NFO files" msgstr "" #. TRANSLATORS: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! #: ../data/nfoview.desktop.in.h:4 msgid "information;" msgstr "" #: ../data/menu.ui.h:1 msgid "_Open…" msgstr "" #: ../data/menu.ui.h:2 msgid "_Export Image…" msgstr "" #: ../data/menu.ui.h:3 msgid "C_opy" msgstr "" #: ../data/menu.ui.h:4 msgid "_Select All" msgstr "" #: ../data/menu.ui.h:5 msgid "_Wrap Lines" msgstr "" #: ../data/menu.ui.h:6 msgid "_Preferences" msgstr "" #: ../data/menu.ui.h:7 msgid "_About" msgstr "" #: ../data/menu.ui.h:8 msgid "_Close" msgstr "" #: ../data/menu.ui.h:9 msgid "_Quit" msgstr "" #: ../data/preferences-dialog.ui.h:1 msgid "Preferences" msgstr "" #: ../data/preferences-dialog.ui.h:2 msgid "Text" msgstr "" #: ../data/preferences-dialog.ui.h:3 msgid "_Font:" msgstr "" #: ../data/preferences-dialog.ui.h:4 msgid "Li_ne-spacing:" msgstr "" #: ../data/preferences-dialog.ui.h:5 msgid "Colors" msgstr "" #: ../data/preferences-dialog.ui.h:6 msgid "_Schemes:" msgstr "" #: ../data/preferences-dialog.ui.h:7 msgid "Fo_reground:" msgstr "" #: ../data/preferences-dialog.ui.h:8 msgid "Bac_kground:" msgstr "" #: ../data/preferences-dialog.ui.h:9 msgid "_Link:" msgstr "" #: ../data/preferences-dialog.ui.h:10 msgid "_Visited link:" msgstr "" #: ../nfoview/about.py:36 msgid "About NFO Viewer" msgstr "" #: ../nfoview/about.py:39 msgid "Viewer for NFO files" msgstr "" #. TRANSLATORS: This is a special message that shouldn't be translated #. literally. It is used in the about dialog to give credits to the #. translators. Thus, you should translate it to your name and email #. address. You can also include other translators who have contributed #. to this translation; in that case, please write them on separate #. lines seperated by newlines (\n). #: ../nfoview/about.py:54 msgid "translator-credits" msgstr "" #: ../nfoview/about.py:57 msgid "NFO Viewer Website" msgstr "" #: ../nfoview/export.py:34 msgid "Export Image" msgstr "" #: ../nfoview/export.py:37 ../nfoview/open.py:37 msgid "_Cancel" msgstr "" #: ../nfoview/export.py:38 msgid "_Save" msgstr "" #: ../nfoview/open.py:34 msgid "Open" msgstr "" #: ../nfoview/open.py:38 msgid "_Open" msgstr "" #: ../nfoview/open.py:42 msgid "All files" msgstr "" #: ../nfoview/open.py:46 msgid "NFO files (*.nfo)" msgstr "" #: ../nfoview/schemes.py:52 msgid "Black on white" msgstr "" #: ../nfoview/schemes.py:64 msgid "Custom" msgstr "" #: ../nfoview/schemes.py:76 msgid "Dark grey on light grey" msgstr "" #: ../nfoview/schemes.py:91 msgid "System theme" msgstr "" #: ../nfoview/schemes.py:103 msgid "Grey on black" msgstr "" #: ../nfoview/schemes.py:115 msgid "Light grey on dark grey" msgstr "" #: ../nfoview/schemes.py:127 msgid "White on black" msgstr "" nfoview-1.18/po/pl.po000066400000000000000000000121771265072436100145270ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Piotr Drąg , 2009,2014-2015 msgid "" msgstr "" "Project-Id-Version: nfoview\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-01-23 18:17+0200\n" "PO-Revision-Date: 2015-05-02 19:03+0000\n" "Last-Translator: Piotr Drąg \n" "Language-Team: Polish (http://www.transifex.com/projects/p/nfoview/language/" "pl/)\n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" #: ../data/nfoview.appdata.xml.in.h:1 msgid "" "NFO Viewer is a simple viewer for NFO files, which are \"ASCII\" art in the " "CP437 codepage. The advantages of using NFO Viewer instead of a text editor " "are preset font and encoding settings, automatic window size and clickable " "hyperlinks." msgstr "" "Przeglądarka plików NFO jest prostą przeglądarką plików NFO, które zawierają " "obrazy \"ASCII\" w stronie kodowej CP437. Zaletami używania przeglądarki " "plików NFO zamiast edytora tekstu są ustawienia czcionki i kodowania, " "automatyczny rozmiar okna i klikalne odnośniki." #. TRANSLATORS: The application name "NFO Viewer" has been intentionally #. marked as translatable. If you manage to translate the name in a #. fluent manner, without changing the meaning, you may use that #. translation at your discretion. #: ../data/nfoview.desktop.in.h:1 ../nfoview/about.py:47 #: ../nfoview/window.py:93 msgid "NFO Viewer" msgstr "Przeglądarka NFO" #: ../data/nfoview.desktop.in.h:2 msgid "View NFO files" msgstr "Wyświetlanie plików NFO" #. TRANSLATORS: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! #: ../data/nfoview.desktop.in.h:4 msgid "information;" msgstr "informacje;" #: ../data/menu.ui.h:1 msgid "_Open…" msgstr "_Otwórz…" #: ../data/menu.ui.h:2 msgid "_Export Image…" msgstr "Wy_eksportuj obraz…" #: ../data/menu.ui.h:3 msgid "C_opy" msgstr "S_kopiuj" #: ../data/menu.ui.h:4 msgid "_Select All" msgstr "Z_aznacz wszystko" #: ../data/menu.ui.h:5 msgid "_Wrap Lines" msgstr "Za_wijanie wierszy" #: ../data/menu.ui.h:6 msgid "_Preferences" msgstr "_Preferencje" #: ../data/menu.ui.h:7 msgid "_About" msgstr "_O programie" #: ../data/menu.ui.h:8 msgid "_Close" msgstr "Za_mknij" #: ../data/menu.ui.h:9 msgid "_Quit" msgstr "Za_kończ" #: ../data/preferences-dialog.ui.h:1 msgid "Preferences" msgstr "Preferencje" #: ../data/preferences-dialog.ui.h:2 msgid "Text" msgstr "Tekst" #: ../data/preferences-dialog.ui.h:3 msgid "_Font:" msgstr "_Czcionka:" #: ../data/preferences-dialog.ui.h:4 msgid "Li_ne-spacing:" msgstr "_Odstęp między wierszami:" #: ../data/preferences-dialog.ui.h:5 msgid "Colors" msgstr "Kolory" #: ../data/preferences-dialog.ui.h:6 msgid "_Schemes:" msgstr "_Schematy:" #: ../data/preferences-dialog.ui.h:7 msgid "Fo_reground:" msgstr "Te_kst:" #: ../data/preferences-dialog.ui.h:8 msgid "Bac_kground:" msgstr "_Tło:" #: ../data/preferences-dialog.ui.h:9 msgid "_Link:" msgstr "_Odnośnik:" #: ../data/preferences-dialog.ui.h:10 msgid "_Visited link:" msgstr "O_dwiedzony odnośnik:" #: ../nfoview/about.py:36 msgid "About NFO Viewer" msgstr "O przeglądarce plików NFO" #: ../nfoview/about.py:39 msgid "Viewer for NFO files" msgstr "Przeglądarka plików NFO" #. TRANSLATORS: This is a special message that shouldn't be translated #. literally. It is used in the about dialog to give credits to the #. translators. Thus, you should translate it to your name and email #. address. You can also include other translators who have contributed #. to this translation; in that case, please write them on separate #. lines seperated by newlines (\n). #: ../nfoview/about.py:54 msgid "translator-credits" msgstr "Piotr Drąg , 2009, 2014-2015" #: ../nfoview/about.py:57 msgid "NFO Viewer Website" msgstr "Witryna przeglądarki plików NFO" #: ../nfoview/export.py:34 msgid "Export Image" msgstr "Eksport obrazu" #: ../nfoview/export.py:37 ../nfoview/open.py:37 msgid "_Cancel" msgstr "_Anuluj" #: ../nfoview/export.py:38 msgid "_Save" msgstr "_Zapisz" #: ../nfoview/open.py:34 msgid "Open" msgstr "Otwarcie" #: ../nfoview/open.py:38 msgid "_Open" msgstr "_Otwórz" #: ../nfoview/open.py:42 msgid "All files" msgstr "Wszystkie pliki" #: ../nfoview/open.py:46 msgid "NFO files (*.nfo)" msgstr "Pliki NFO (*.nfo)" #: ../nfoview/schemes.py:52 msgid "Black on white" msgstr "Czarne na białym" #: ../nfoview/schemes.py:64 msgid "Custom" msgstr "Własny" #: ../nfoview/schemes.py:76 msgid "Dark grey on light grey" msgstr "Ciemne szare na jaśniejszym szarym" #: ../nfoview/schemes.py:91 msgid "System theme" msgstr "Motyw systemu" #: ../nfoview/schemes.py:103 msgid "Grey on black" msgstr "Szare na czarnym" #: ../nfoview/schemes.py:115 msgid "Light grey on dark grey" msgstr "Jaśniejsze szare na ciemniejszym szarym" #: ../nfoview/schemes.py:127 msgid "White on black" msgstr "Białe na czarnym" nfoview-1.18/po/pt_PT.po000066400000000000000000000135441265072436100151410ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: NFOView\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-01-23 18:17+0200\n" "PO-Revision-Date: 2015-04-09 21:26+0100\n" "Last-Translator: Pedro Albuquerque \n" "Language-Team: pt_PT \n" "Language: Português Europeu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.5.4\n" #: ../data/nfoview.appdata.xml.in.h:1 msgid "" "NFO Viewer is a simple viewer for NFO files, which are \"ASCII\" art in the " "CP437 codepage. The advantages of using NFO Viewer instead of a text editor " "are preset font and encoding settings, automatic window size and clickable " "hyperlinks." msgstr "" "NFO Viewer é um visualizador simples de ficheiros NFO, que são arte \"ASCII" "\" na página CP437. As vantagens de usar o NFO Viewer em vez de um editor de " "texto são definições de letra e codificação, tamanho automático da janela e " "hiperligações clicáveis." #. TRANSLATORS: The application name "NFO Viewer" has been intentionally #. marked as translatable. If you manage to translate the name in a #. fluent manner, without changing the meaning, you may use that #. translation at your discretion. #: ../data/nfoview.desktop.in.h:1 ../nfoview/about.py:47 #: ../nfoview/window.py:93 msgid "NFO Viewer" msgstr "NFO Viewer" #: ../data/nfoview.desktop.in.h:2 msgid "View NFO files" msgstr "Ver ficheiro NFO" #. TRANSLATORS: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! #: ../data/nfoview.desktop.in.h:4 msgid "information;" msgstr "informação;nfo;" #: ../data/menu.ui.h:1 msgid "_Open…" msgstr "_Abrir..." #: ../data/menu.ui.h:2 msgid "_Export Image…" msgstr "_Exportar imagem…" #: ../data/menu.ui.h:3 msgid "C_opy" msgstr "" #: ../data/menu.ui.h:4 msgid "_Select All" msgstr "_Selecionar tudo" #: ../data/menu.ui.h:5 msgid "_Wrap Lines" msgstr "Aj_ustar linhas" #: ../data/menu.ui.h:6 msgid "_Preferences" msgstr "_Preferências" #: ../data/menu.ui.h:7 msgid "_About" msgstr "_Acerca" #: ../data/menu.ui.h:8 msgid "_Close" msgstr "Fe_char" #: ../data/menu.ui.h:9 msgid "_Quit" msgstr "_Sair" #: ../data/preferences-dialog.ui.h:1 msgid "Preferences" msgstr "Preferências" #: ../data/preferences-dialog.ui.h:2 msgid "Text" msgstr "Texto" #: ../data/preferences-dialog.ui.h:3 msgid "_Font:" msgstr "_Letra" #: ../data/preferences-dialog.ui.h:4 msgid "Li_ne-spacing:" msgstr "Espaço entre _linhas" #: ../data/preferences-dialog.ui.h:5 msgid "Colors" msgstr "Cores" #: ../data/preferences-dialog.ui.h:6 msgid "_Schemes:" msgstr "E_squemas" #: ../data/preferences-dialog.ui.h:7 msgid "Fo_reground:" msgstr "_Primeiro plano" #: ../data/preferences-dialog.ui.h:8 msgid "Bac_kground:" msgstr "_Fundo" #: ../data/preferences-dialog.ui.h:9 msgid "_Link:" msgstr "L_igação" #: ../data/preferences-dialog.ui.h:10 msgid "_Visited link:" msgstr "Ligação _visitada" #: ../nfoview/about.py:36 msgid "About NFO Viewer" msgstr "Acerca do NFO Viewer" #: ../nfoview/about.py:39 msgid "Viewer for NFO files" msgstr "Visualizador de ficheiros NFO" #. TRANSLATORS: This is a special message that shouldn't be translated #. literally. It is used in the about dialog to give credits to the #. translators. Thus, you should translate it to your name and email #. address. You can also include other translators who have contributed #. to this translation; in that case, please write them on separate #. lines seperated by newlines (\n). #: ../nfoview/about.py:54 msgid "translator-credits" msgstr "Pedro Albuquerque (palbuquerque73@gmail.com)" #: ../nfoview/about.py:57 msgid "NFO Viewer Website" msgstr "Página Web do NFO Viewer" #: ../nfoview/export.py:34 msgid "Export Image" msgstr "Exportar imagem" #: ../nfoview/export.py:37 ../nfoview/open.py:37 msgid "_Cancel" msgstr "_Cancelar" #: ../nfoview/export.py:38 msgid "_Save" msgstr "_Gravar" #: ../nfoview/open.py:34 msgid "Open" msgstr "Abrir" #: ../nfoview/open.py:38 msgid "_Open" msgstr "_Abrir" #: ../nfoview/open.py:42 msgid "All files" msgstr "Todos os ficheiros" #: ../nfoview/open.py:46 msgid "NFO files (*.nfo)" msgstr "Ficheiros NFO (*.nfo)" #: ../nfoview/schemes.py:52 msgid "Black on white" msgstr "Preto no branco" #: ../nfoview/schemes.py:64 msgid "Custom" msgstr "Personalizado" #: ../nfoview/schemes.py:76 msgid "Dark grey on light grey" msgstr "Cinzento escuro em cinzento claro" #: ../nfoview/schemes.py:91 msgid "System theme" msgstr "Tema do sistema" #: ../nfoview/schemes.py:103 msgid "Grey on black" msgstr "Cinzento em preto" #: ../nfoview/schemes.py:115 msgid "Light grey on dark grey" msgstr "Cinzento claro em cinzento escuro" #: ../nfoview/schemes.py:127 msgid "White on black" msgstr "Branco no preto" #~ msgid "Close document" #~ msgstr "Fechar documento" #~ msgid "_Copy" #~ msgstr "_Copiar" #~ msgid "Copy the selected text to the clipboard" #~ msgstr "Copiar o texto selecionado para a área de transferência" #~ msgid "Edit NFO Viewer preferences" #~ msgstr "Editar as preferências do NFO Viewer" #~ msgid "Export document as an image file" #~ msgstr "Exportar documento como ficheiro de imagem" #~ msgid "Open file" #~ msgstr "Abrir ficheiro" #~ msgid "Quit NFO Viewer" #~ msgstr "Sair do NFO Viewer" #~ msgid "Select all text in the document" #~ msgstr "Selecionar todo o texto no documento" #~ msgid "Show information about NFO Viewer" #~ msgstr "Mostrar informação acerca do NFO Viewer" #~ msgid "_Edit" #~ msgstr "_Editar" #~ msgid "_File" #~ msgstr "_Ficheiro" #~ msgid "_Help" #~ msgstr "A_juda" #~ msgid "Break long lines at word borders" #~ msgstr "Quebrar linhas compridas nos limites das palavras" nfoview-1.18/po/ru.po000066400000000000000000000132731265072436100145400ustar00rootroot00000000000000msgid "" msgstr "" "Project-Id-Version: nfoview\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-01-23 18:17+0200\n" "PO-Revision-Date: \n" "Last-Translator: Алекс \n" "Language-Team: none <->\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../data/nfoview.appdata.xml.in.h:1 msgid "" "NFO Viewer is a simple viewer for NFO files, which are \"ASCII\" art in the " "CP437 codepage. The advantages of using NFO Viewer instead of a text editor " "are preset font and encoding settings, automatic window size and clickable " "hyperlinks." msgstr "" #. TRANSLATORS: The application name "NFO Viewer" has been intentionally #. marked as translatable. If you manage to translate the name in a #. fluent manner, without changing the meaning, you may use that #. translation at your discretion. #: ../data/nfoview.desktop.in.h:1 ../nfoview/about.py:47 #: ../nfoview/window.py:93 msgid "NFO Viewer" msgstr "Просмотр NFO" #: ../data/nfoview.desktop.in.h:2 msgid "View NFO files" msgstr "Просмотр файлов NFO" #. TRANSLATORS: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! #: ../data/nfoview.desktop.in.h:4 msgid "information;" msgstr "" #: ../data/menu.ui.h:1 msgid "_Open…" msgstr "_Открыть…" #: ../data/menu.ui.h:2 msgid "_Export Image…" msgstr "" #: ../data/menu.ui.h:3 msgid "C_opy" msgstr "" #: ../data/menu.ui.h:4 msgid "_Select All" msgstr "Выделить _все" #: ../data/menu.ui.h:5 msgid "_Wrap Lines" msgstr "П_еренос строк" #: ../data/menu.ui.h:6 msgid "_Preferences" msgstr "_Настройки" #: ../data/menu.ui.h:7 msgid "_About" msgstr "_О программе" #: ../data/menu.ui.h:8 msgid "_Close" msgstr "_Закрыть" #: ../data/menu.ui.h:9 msgid "_Quit" msgstr "В_ыход" #: ../data/preferences-dialog.ui.h:1 msgid "Preferences" msgstr "Настройки" #: ../data/preferences-dialog.ui.h:2 msgid "Text" msgstr "Текст" #: ../data/preferences-dialog.ui.h:3 msgid "_Font:" msgstr "_Шрифт:" #: ../data/preferences-dialog.ui.h:4 msgid "Li_ne-spacing:" msgstr "Между ст_рок:" #: ../data/preferences-dialog.ui.h:5 msgid "Colors" msgstr "Цвета" #: ../data/preferences-dialog.ui.h:6 msgid "_Schemes:" msgstr "С_хема:" #: ../data/preferences-dialog.ui.h:7 msgid "Fo_reground:" msgstr "_Текст:" #: ../data/preferences-dialog.ui.h:8 msgid "Bac_kground:" msgstr "_Фон:" #: ../data/preferences-dialog.ui.h:9 msgid "_Link:" msgstr "_Ссылки:" #: ../data/preferences-dialog.ui.h:10 msgid "_Visited link:" msgstr "П_осещенные ссылки:" #: ../nfoview/about.py:36 msgid "About NFO Viewer" msgstr "О программе" #: ../nfoview/about.py:39 msgid "Viewer for NFO files" msgstr "Программа просмотра файлов NFO" #. TRANSLATORS: This is a special message that shouldn't be translated #. literally. It is used in the about dialog to give credits to the #. translators. Thus, you should translate it to your name and email #. address. You can also include other translators who have contributed #. to this translation; in that case, please write them on separate #. lines seperated by newlines (\n). #: ../nfoview/about.py:54 msgid "translator-credits" msgstr "Alex P. , 2010" #: ../nfoview/about.py:57 msgid "NFO Viewer Website" msgstr "Сайт NFO Viewer" #: ../nfoview/export.py:34 msgid "Export Image" msgstr "" #: ../nfoview/export.py:37 ../nfoview/open.py:37 msgid "_Cancel" msgstr "" #: ../nfoview/export.py:38 msgid "_Save" msgstr "" #: ../nfoview/open.py:34 msgid "Open" msgstr "Открыть" #: ../nfoview/open.py:38 msgid "_Open" msgstr "" #: ../nfoview/open.py:42 msgid "All files" msgstr "Все файлы" #: ../nfoview/open.py:46 msgid "NFO files (*.nfo)" msgstr "Файлы NFO (*.nfo)" #: ../nfoview/schemes.py:52 msgid "Black on white" msgstr "Черный на белом" #: ../nfoview/schemes.py:64 msgid "Custom" msgstr "Другая" #: ../nfoview/schemes.py:76 msgid "Dark grey on light grey" msgstr "Темно-серый на светло-сером" #: ../nfoview/schemes.py:91 msgid "System theme" msgstr "Системная" #: ../nfoview/schemes.py:103 msgid "Grey on black" msgstr "Серый на черном" #: ../nfoview/schemes.py:115 msgid "Light grey on dark grey" msgstr "Светло-серый на темно-сером" #: ../nfoview/schemes.py:127 msgid "White on black" msgstr "Белый на черном" #~ msgid "Close document" #~ msgstr "Закрыть документ" #~ msgid "_Copy" #~ msgstr "_Копировать" #~ msgid "Copy the selected text to the clipboard" #~ msgstr "Копирует выделенный текст в буфер обмена" #~ msgid "Edit NFO Viewer preferences" #~ msgstr "Изменение настроек программы" #~ msgid "Open file" #~ msgstr "Открыть файл" #~ msgid "Quit NFO Viewer" #~ msgstr "Выход из программы" #~ msgid "Select all text in the document" #~ msgstr "Выделить весь текст документа" #~ msgid "Show information about NFO Viewer" #~ msgstr "Сведения о программе просмотра NFO" #~ msgid "_Edit" #~ msgstr "_Правка" #~ msgid "_File" #~ msgstr "_Файл" #~ msgid "_Help" #~ msgstr "_Справка" #~ msgid "Break long lines at word borders" #~ msgstr "Переносить длинные строки по границам слов" #~ msgid "Select Font" #~ msgstr "Выберите шрифт" #~ msgid "Select Color" #~ msgstr "Выберите цвет" #~ msgid "Copy" #~ msgstr "Копировать" nfoview-1.18/po/sr.po000066400000000000000000000137711265072436100145410ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: nfoview\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-01-23 18:17+0200\n" "PO-Revision-Date: 2010-12-08 03:41+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Russian \n" "Language: sr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" #: ../data/nfoview.appdata.xml.in.h:1 msgid "" "NFO Viewer is a simple viewer for NFO files, which are \"ASCII\" art in the " "CP437 codepage. The advantages of using NFO Viewer instead of a text editor " "are preset font and encoding settings, automatic window size and clickable " "hyperlinks." msgstr "" #. TRANSLATORS: The application name "NFO Viewer" has been intentionally #. marked as translatable. If you manage to translate the name in a #. fluent manner, without changing the meaning, you may use that #. translation at your discretion. #: ../data/nfoview.desktop.in.h:1 ../nfoview/about.py:47 #: ../nfoview/window.py:93 msgid "NFO Viewer" msgstr "НФО Прегледач" #: ../data/nfoview.desktop.in.h:2 msgid "View NFO files" msgstr "Прегледај НФО датотеке" #. TRANSLATORS: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! #: ../data/nfoview.desktop.in.h:4 msgid "information;" msgstr "" #: ../data/menu.ui.h:1 msgid "_Open…" msgstr "_Отвори…" #: ../data/menu.ui.h:2 msgid "_Export Image…" msgstr "" #: ../data/menu.ui.h:3 msgid "C_opy" msgstr "" #: ../data/menu.ui.h:4 msgid "_Select All" msgstr "Одабери _све" #: ../data/menu.ui.h:5 msgid "_Wrap Lines" msgstr "О_бмотај линије" #: ../data/menu.ui.h:6 msgid "_Preferences" msgstr "_Подешавања" #: ../data/menu.ui.h:7 msgid "_About" msgstr "_О програму" #: ../data/menu.ui.h:8 msgid "_Close" msgstr "_Затвори" #: ../data/menu.ui.h:9 msgid "_Quit" msgstr "_Изађи" #: ../data/preferences-dialog.ui.h:1 msgid "Preferences" msgstr "Подешавања" #: ../data/preferences-dialog.ui.h:2 msgid "Text" msgstr "Текст" #: ../data/preferences-dialog.ui.h:3 msgid "_Font:" msgstr "_Фонт:" #: ../data/preferences-dialog.ui.h:4 msgid "Li_ne-spacing:" msgstr "_Међупростор:" #: ../data/preferences-dialog.ui.h:5 msgid "Colors" msgstr "Боје" #: ../data/preferences-dialog.ui.h:6 msgid "_Schemes:" msgstr "_Шеме:" #: ../data/preferences-dialog.ui.h:7 msgid "Fo_reground:" msgstr "_Текст:" #: ../data/preferences-dialog.ui.h:8 msgid "Bac_kground:" msgstr "_Позадина:" #: ../data/preferences-dialog.ui.h:9 msgid "_Link:" msgstr "_Веза:" #: ../data/preferences-dialog.ui.h:10 msgid "_Visited link:" msgstr "П_осећена веза:" #: ../nfoview/about.py:36 msgid "About NFO Viewer" msgstr "О програму" #: ../nfoview/about.py:39 msgid "Viewer for NFO files" msgstr "Прегледач НФО датотека" #. TRANSLATORS: This is a special message that shouldn't be translated #. literally. It is used in the about dialog to give credits to the #. translators. Thus, you should translate it to your name and email #. address. You can also include other translators who have contributed #. to this translation; in that case, please write them on separate #. lines seperated by newlines (\n). #: ../nfoview/about.py:54 msgid "translator-credits" msgstr "Goran Velemirov , 2010" #: ../nfoview/about.py:57 msgid "NFO Viewer Website" msgstr "Сајт НФО прегледача" #: ../nfoview/export.py:34 msgid "Export Image" msgstr "" #: ../nfoview/export.py:37 ../nfoview/open.py:37 msgid "_Cancel" msgstr "" #: ../nfoview/export.py:38 msgid "_Save" msgstr "" #: ../nfoview/open.py:34 msgid "Open" msgstr "Отвори" #: ../nfoview/open.py:38 msgid "_Open" msgstr "" #: ../nfoview/open.py:42 msgid "All files" msgstr "Све датотеке" #: ../nfoview/open.py:46 msgid "NFO files (*.nfo)" msgstr "НФО датотеке (*.nfo)" #: ../nfoview/schemes.py:52 msgid "Black on white" msgstr "Црно на белом" #: ../nfoview/schemes.py:64 msgid "Custom" msgstr "Прилагођено" #: ../nfoview/schemes.py:76 msgid "Dark grey on light grey" msgstr "Тамно-сиво на светло-сивом" #: ../nfoview/schemes.py:91 msgid "System theme" msgstr "Тема система" #: ../nfoview/schemes.py:103 msgid "Grey on black" msgstr "Сиво на црном" #: ../nfoview/schemes.py:115 msgid "Light grey on dark grey" msgstr "Светло-сиво на тамно-сивом" #: ../nfoview/schemes.py:127 msgid "White on black" msgstr "Бело на црном" #~ msgid "Close document" #~ msgstr "Затвори датотеку" #~ msgid "_Copy" #~ msgstr "_Умножи" #~ msgid "Copy the selected text to the clipboard" #~ msgstr "Умножи одабран текст у меморију" #~ msgid "Edit NFO Viewer preferences" #~ msgstr "Измени подешавања програма" #~ msgid "Open file" #~ msgstr "Отвори датотеку" #~ msgid "Quit NFO Viewer" #~ msgstr "Изађи из програма" #~ msgid "Select all text in the document" #~ msgstr "Одабери сав текст датотеке" #~ msgid "Show information about NFO Viewer" #~ msgstr "Прикажи информације о програму" #~ msgid "_Edit" #~ msgstr "_Уреди" #~ msgid "_File" #~ msgstr "_Датотека" #~ msgid "_Help" #~ msgstr "_Помоћ" #~ msgid "Break long lines at word borders" #~ msgstr "Преломи дугачке линије на границама слова" #~ msgid "Select Font" #~ msgstr "Одабери фонт" #~ msgid "Select Color" #~ msgstr "Одабери боју" #~ msgid "Copy" #~ msgstr "Умножи" nfoview-1.18/po/tr.po000066400000000000000000000117431265072436100145370ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # mauron, 2015 msgid "" msgstr "" "Project-Id-Version: nfoview\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-01-23 18:17+0200\n" "PO-Revision-Date: 2015-06-23 23:11+0000\n" "Last-Translator: mauron\n" "Language-Team: Turkish (http://www.transifex.com/otsaloma/nfoview/language/" "tr/)\n" "Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #: ../data/nfoview.appdata.xml.in.h:1 msgid "" "NFO Viewer is a simple viewer for NFO files, which are \"ASCII\" art in the " "CP437 codepage. The advantages of using NFO Viewer instead of a text editor " "are preset font and encoding settings, automatic window size and clickable " "hyperlinks." msgstr "" "NFO Viewer, kod sayfası 437 ile yapılmış \"ASCII\" sanatı olan NFO dosyaları " "için sade bir görüntüleyicidir. Bir metin düzenleyicisi yerine NFO Viewer'ı " "kullanmanın avantajları, önayarlı yazıtipi ile kodlama, otomatik pencere " "boyutlanması ve tıklanabilir bağlantılardır." #. TRANSLATORS: The application name "NFO Viewer" has been intentionally #. marked as translatable. If you manage to translate the name in a #. fluent manner, without changing the meaning, you may use that #. translation at your discretion. #: ../data/nfoview.desktop.in.h:1 ../nfoview/about.py:47 #: ../nfoview/window.py:93 msgid "NFO Viewer" msgstr "NFO Viewer" #: ../data/nfoview.desktop.in.h:2 msgid "View NFO files" msgstr "NFO dosyalarını görüntüle" #. TRANSLATORS: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! #: ../data/nfoview.desktop.in.h:4 msgid "information;" msgstr "belge;göster;" #: ../data/menu.ui.h:1 msgid "_Open…" msgstr "A_ç…" #: ../data/menu.ui.h:2 msgid "_Export Image…" msgstr "Resmi dı_şa aktar…" #: ../data/menu.ui.h:3 msgid "C_opy" msgstr "K_opyala" #: ../data/menu.ui.h:4 msgid "_Select All" msgstr "Tümü_nü seç" #: ../data/menu.ui.h:5 msgid "_Wrap Lines" msgstr "_Satırların uzunluğunu sınırla" #: ../data/menu.ui.h:6 msgid "_Preferences" msgstr "_Tercihler" #: ../data/menu.ui.h:7 msgid "_About" msgstr "NFO Viewer _hakkında" #: ../data/menu.ui.h:8 msgid "_Close" msgstr "K_apat" #: ../data/menu.ui.h:9 msgid "_Quit" msgstr "Çı_k" #: ../data/preferences-dialog.ui.h:1 msgid "Preferences" msgstr "Tercihler" #: ../data/preferences-dialog.ui.h:2 msgid "Text" msgstr "Metin" #: ../data/preferences-dialog.ui.h:3 msgid "_Font:" msgstr "_Yazıtipi:" #: ../data/preferences-dialog.ui.h:4 msgid "Li_ne-spacing:" msgstr "_Satır aralığı:" #: ../data/preferences-dialog.ui.h:5 msgid "Colors" msgstr "Renkler" #: ../data/preferences-dialog.ui.h:6 msgid "_Schemes:" msgstr "_Şema:" #: ../data/preferences-dialog.ui.h:7 msgid "Fo_reground:" msgstr "_Ön plan:" #: ../data/preferences-dialog.ui.h:8 msgid "Bac_kground:" msgstr "_Zemin:" #: ../data/preferences-dialog.ui.h:9 msgid "_Link:" msgstr "_Bağlantı:" #: ../data/preferences-dialog.ui.h:10 msgid "_Visited link:" msgstr "Ziyaret edilmiş ba_ğlantı:" #: ../nfoview/about.py:36 msgid "About NFO Viewer" msgstr "NFO Viewer hakkında" #: ../nfoview/about.py:39 msgid "Viewer for NFO files" msgstr "NFO dosyaları için görüntüleyici" #. TRANSLATORS: This is a special message that shouldn't be translated #. literally. It is used in the about dialog to give credits to the #. translators. Thus, you should translate it to your name and email #. address. You can also include other translators who have contributed #. to this translation; in that case, please write them on separate #. lines seperated by newlines (\n). #: ../nfoview/about.py:54 msgid "translator-credits" msgstr "Anonim" #: ../nfoview/about.py:57 msgid "NFO Viewer Website" msgstr "NFO Viewer ağ sitesi" #: ../nfoview/export.py:34 msgid "Export Image" msgstr "Resmi dışa aktar" #: ../nfoview/export.py:37 ../nfoview/open.py:37 msgid "_Cancel" msgstr "_İptal" #: ../nfoview/export.py:38 msgid "_Save" msgstr "_Kaydet" #: ../nfoview/open.py:34 msgid "Open" msgstr "Aç" #: ../nfoview/open.py:38 msgid "_Open" msgstr "_Aç" #: ../nfoview/open.py:42 msgid "All files" msgstr "Tüm dosyalar" #: ../nfoview/open.py:46 msgid "NFO files (*.nfo)" msgstr "NFO dosyaları (*.nfo)" #: ../nfoview/schemes.py:52 msgid "Black on white" msgstr "Beyaz üzerinde siyah" #: ../nfoview/schemes.py:64 msgid "Custom" msgstr "Kişisel" #: ../nfoview/schemes.py:76 msgid "Dark grey on light grey" msgstr "Açık gri üzerinde koyu gri" #: ../nfoview/schemes.py:91 msgid "System theme" msgstr "Sistem teması" #: ../nfoview/schemes.py:103 msgid "Grey on black" msgstr "Siyah üzerinde gri" #: ../nfoview/schemes.py:115 msgid "Light grey on dark grey" msgstr "Koyu gri üzerinde açık gri" #: ../nfoview/schemes.py:127 msgid "White on black" msgstr "Siyah üzerinde beyaz" nfoview-1.18/po/zh_CN.po000066400000000000000000000126441265072436100151140ustar00rootroot00000000000000# Simplified Chinese translations for nfoview package. # Copyright (C) 2008 THE NFOVIEW'S COPYRIGHT HOLDER # This file is distributed under the same license as the nfoview package. # Jonathan Ye , 2008. # msgid "" msgstr "" "Project-Id-Version: nfoview 1.5\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-01-23 18:17+0200\n" "PO-Revision-Date: 2009-06-10 16:50+0800\n" "Last-Translator: Jonathan Ye \n" "Language-Team: Simplified Chinese\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Chinese\n" "X-Poedit-Country: CHINA\n" #: ../data/nfoview.appdata.xml.in.h:1 msgid "" "NFO Viewer is a simple viewer for NFO files, which are \"ASCII\" art in the " "CP437 codepage. The advantages of using NFO Viewer instead of a text editor " "are preset font and encoding settings, automatic window size and clickable " "hyperlinks." msgstr "" #. TRANSLATORS: The application name "NFO Viewer" has been intentionally #. marked as translatable. If you manage to translate the name in a #. fluent manner, without changing the meaning, you may use that #. translation at your discretion. #: ../data/nfoview.desktop.in.h:1 ../nfoview/about.py:47 #: ../nfoview/window.py:93 msgid "NFO Viewer" msgstr "NFO Viewer" #: ../data/nfoview.desktop.in.h:2 msgid "View NFO files" msgstr "浏览 NFO 文件" #. TRANSLATORS: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! #: ../data/nfoview.desktop.in.h:4 msgid "information;" msgstr "" #: ../data/menu.ui.h:1 msgid "_Open…" msgstr "打开(_O)…" #: ../data/menu.ui.h:2 msgid "_Export Image…" msgstr "" #: ../data/menu.ui.h:3 msgid "C_opy" msgstr "" #: ../data/menu.ui.h:4 msgid "_Select All" msgstr "全部选中(_S)" #: ../data/menu.ui.h:5 msgid "_Wrap Lines" msgstr "" #: ../data/menu.ui.h:6 msgid "_Preferences" msgstr "设置(_P)" #: ../data/menu.ui.h:7 msgid "_About" msgstr "关于(_A)" #: ../data/menu.ui.h:8 msgid "_Close" msgstr "关闭(_C)" #: ../data/menu.ui.h:9 msgid "_Quit" msgstr "退出(_Q)" #: ../data/preferences-dialog.ui.h:1 msgid "Preferences" msgstr "设置" #: ../data/preferences-dialog.ui.h:2 msgid "Text" msgstr "文本" #: ../data/preferences-dialog.ui.h:3 msgid "_Font:" msgstr "字体(_F)" #: ../data/preferences-dialog.ui.h:4 msgid "Li_ne-spacing:" msgstr "" #: ../data/preferences-dialog.ui.h:5 msgid "Colors" msgstr "颜色" #: ../data/preferences-dialog.ui.h:6 msgid "_Schemes:" msgstr "" #: ../data/preferences-dialog.ui.h:7 msgid "Fo_reground:" msgstr "前景(_R)" #: ../data/preferences-dialog.ui.h:8 msgid "Bac_kground:" msgstr "背景(_K)" #: ../data/preferences-dialog.ui.h:9 msgid "_Link:" msgstr "链接(_L)" #: ../data/preferences-dialog.ui.h:10 msgid "_Visited link:" msgstr "已访问链接(_V)" #: ../nfoview/about.py:36 msgid "About NFO Viewer" msgstr "关于 NFO Viewer" #: ../nfoview/about.py:39 msgid "Viewer for NFO files" msgstr "NFO 浏览器" #. TRANSLATORS: This is a special message that shouldn't be translated #. literally. It is used in the about dialog to give credits to the #. translators. Thus, you should translate it to your name and email #. address. You can also include other translators who have contributed #. to this translation; in that case, please write them on separate #. lines seperated by newlines (\n). #: ../nfoview/about.py:54 msgid "translator-credits" msgstr "Jonathan Ye " #: ../nfoview/about.py:57 msgid "NFO Viewer Website" msgstr "NFO Viewer 网站" #: ../nfoview/export.py:34 msgid "Export Image" msgstr "" #: ../nfoview/export.py:37 ../nfoview/open.py:37 msgid "_Cancel" msgstr "" #: ../nfoview/export.py:38 msgid "_Save" msgstr "" #: ../nfoview/open.py:34 msgid "Open" msgstr "打开" #: ../nfoview/open.py:38 msgid "_Open" msgstr "" #: ../nfoview/open.py:42 msgid "All files" msgstr "所有文件" #: ../nfoview/open.py:46 msgid "NFO files (*.nfo)" msgstr "NFO 文件 (*.nfo)" #: ../nfoview/schemes.py:52 msgid "Black on white" msgstr "白底黑字" #: ../nfoview/schemes.py:64 msgid "Custom" msgstr "自定义" #: ../nfoview/schemes.py:76 msgid "Dark grey on light grey" msgstr "浅灰背景深灰字体颜色" #: ../nfoview/schemes.py:91 msgid "System theme" msgstr "系统主题" #: ../nfoview/schemes.py:103 msgid "Grey on black" msgstr "黑底灰字" #: ../nfoview/schemes.py:115 msgid "Light grey on dark grey" msgstr "深灰背景浅灰字体颜色" #: ../nfoview/schemes.py:127 msgid "White on black" msgstr "黑底白字" #~ msgid "Close document" #~ msgstr "关闭当前文件" #~ msgid "_Copy" #~ msgstr "复制(_C)" #~ msgid "Copy the selected text to the clipboard" #~ msgstr "将选中的文本复制到剪贴板" #~ msgid "Edit NFO Viewer preferences" #~ msgstr "更改本程序设置参数" #~ msgid "Open file" #~ msgstr "打开文件" #~ msgid "Quit NFO Viewer" #~ msgstr "退出 NFO Viewer" #~ msgid "Select all text in the document" #~ msgstr "选中文档中的所有文本" #~ msgid "Show information about NFO Viewer" #~ msgstr "关于本程序" #~ msgid "_Edit" #~ msgstr "编辑(_E)" #~ msgid "_File" #~ msgstr "文件(_F)" #~ msgid "_Help" #~ msgstr "帮助(_H)" #~ msgid "Select Font" #~ msgstr "选择字体" #~ msgid "Select Color" #~ msgstr "选择颜色" #~ msgid "Copy" #~ msgstr "复制" #~ msgid "Line-_spacing:" #~ msgstr "行距(_S)" #~ msgid "_Built-in schemes:" #~ msgstr "内置方案(_B)" nfoview-1.18/setup.py000077500000000000000000000166031265072436100146510ustar00rootroot00000000000000#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ There are two relevant customizations to the standard distutils installation process: (1) writing the nfoview.paths module and (2) handling translations. (1) NFO Viewer finds non-Python files based on the paths written in module nfoview.paths. In nfoview/paths.py the paths default to the ones in the source directory. During the 'install_lib' command the file gets rewritten to build/nfoview/paths.py with the installation paths and that file will be installed. The paths are based on variable 'install_data' with the 'root' variable stripped if it is given. If doing distro-packaging, make sure this file gets correctly written. (2) During installation, the .po files are compiled into .mo files and the appdata and desktop files are translated. This requires gettext and intltool, more specifically, commands 'msgfmt' and 'intltool-merge'. """ import distutils.command.clean import distutils.command.install import distutils.command.install_data import distutils.command.install_lib import glob import os import re import shutil clean = distutils.command.clean.clean install = distutils.command.install.install install_data = distutils.command.install_data.install_data install_lib = distutils.command.install_lib.install_lib log = distutils.log def get_version(): """Return version number from nfoview/__init__.py.""" path = os.path.join("nfoview", "__init__.py") text = open(path, "r", encoding="utf_8").read() return re.search(r"__version__ *= *['\"](.*?)['\"]", text).group(1) def run_or_exit(cmd): """Run command in shell and raise SystemExit if it fails.""" if os.system(cmd) != 0: log.error("command {} failed".format(repr(cmd))) raise SystemExit(1) def run_or_warn(cmd): """Run command in shell and warn if it fails.""" if os.system(cmd) != 0: log.warn("command {} failed".format(repr(cmd))) class Clean(clean): """Command to remove files and directories created.""" __glob_targets = ( "*/__pycache__", "*/*/__pycache__", "*/*/*/__pycache__", ".cache", "build", "data/nfoview.appdata.xml", "data/nfoview.desktop", "dist", "locale", "po/*~", ) def run(self): """Remove files and directories listed in self.__glob_targets.""" clean.run(self) for targets in map(glob.glob, self.__glob_targets): for target in filter(os.path.isdir, targets): log.info("removing '{}'".format(target)) if not self.dry_run: shutil.rmtree(target) for target in filter(os.path.isfile, targets): log.info("removing '{}'".format(target)) if not self.dry_run: os.remove(target) class Install(install): """Command to install everything.""" def run(self): """Install everything and update the desktop file database.""" install.run(self) get_command_obj = self.distribution.get_command_obj root = get_command_obj("install").root data_dir = get_command_obj("install_data").install_dir # Assume we're actually installing if --root was not given. if (root is not None) or (data_dir is None): return directory = os.path.join(data_dir, "share", "applications") log.info("updating desktop database in '{}'".format(directory)) run_or_warn('update-desktop-database "{}"'.format(directory)) class InstallData(install_data): """Command to install data files.""" def __get_appdata_file(self): """Return a tuple for the translated appdata file.""" path = os.path.join("data", "nfoview.appdata.xml") run_or_exit("intltool-merge -x po {}.in {}".format(path, path)) return ("share/appdata", (path,)) def __get_desktop_file(self): """Return a tuple for the translated desktop file.""" path = os.path.join("data", "nfoview.desktop") run_or_exit("intltool-merge -d po {}.in {}".format(path, path)) return ("share/applications", (path,)) def __get_mo_file(self, po_file): """Return a tuple for the compiled .mo file.""" locale = os.path.basename(po_file[:-3]) mo_dir = os.path.join("locale", locale, "LC_MESSAGES") if not os.path.isdir(mo_dir): log.info("creating {}".format(mo_dir)) os.makedirs(mo_dir) mo_file = os.path.join(mo_dir, "nfoview.mo") dest_dir = os.path.join("share", mo_dir) log.info("compiling '{}'".format(mo_file)) run_or_exit("msgfmt {} -o {}".format(po_file, mo_file)) return (dest_dir, (mo_file,)) def run(self): """Install data files after translating them.""" for po_file in glob.glob("po/*.po"): self.data_files.append(self.__get_mo_file(po_file)) self.data_files.append(self.__get_appdata_file()) self.data_files.append(self.__get_desktop_file()) install_data.run(self) class InstallLib(install_lib): """Command to install library files.""" def install(self): """Install library files after writing changes.""" get_command_obj = self.distribution.get_command_obj root = get_command_obj("install").root prefix = get_command_obj("install").install_data # Allow --root to be used like DESTDIR. if root is not None: prefix = os.path.abspath(prefix) prefix = prefix.replace(os.path.abspath(root), "") data_dir = os.path.join(prefix, "share", "nfoview") locale_dir = os.path.join(prefix, "share", "locale") # Write changes to the nfoview.paths module. path = os.path.join(self.build_dir, "nfoview", "paths.py") text = open(path, "r", encoding="utf_8").read() patt = r"^DATA_DIR = .*$" repl = "DATA_DIR = {}".format(repr(data_dir)) text = re.sub(patt, repl, text, flags=re.MULTILINE) assert text.count(repl) == 1 patt = r"^LOCALE_DIR = .*$" repl = "LOCALE_DIR = {}".format(repr(locale_dir)) text = re.sub(patt, repl, text, flags=re.MULTILINE) assert text.count(repl) == 1 open(path, "w", encoding="utf_8").write(text) return install_lib.install(self) setup_kwargs = dict( name="nfoview", version=get_version(), platforms=("Platform Independent",), author="Osmo Salomaa", author_email="otsaloma@iki.fi", url="http://otsaloma.github.io/nfoview/", description="Viewer for NFO files", license="GPL", packages=("nfoview",), scripts=("bin/nfoview",), data_files=[ ("share/icons/hicolor/16x16/apps", ("data/icons/16x16/nfoview.png",)), ("share/icons/hicolor/22x22/apps", ("data/icons/22x22/nfoview.png",)), ("share/icons/hicolor/24x24/apps", ("data/icons/24x24/nfoview.png",)), ("share/icons/hicolor/32x32/apps", ("data/icons/32x32/nfoview.png",)), ("share/icons/hicolor/48x48/apps", ("data/icons/48x48/nfoview.png",)), ("share/icons/hicolor/256x256/apps", ("data/icons/256x256/nfoview.png",)), ("share/man/man1", ("data/nfoview.1",)), ("share/nfoview", glob.glob("data/*.ui")), ], cmdclass=dict( clean=Clean, install=Install, install_data=InstallData, install_lib=InstallLib)) if __name__ == "__main__": os.chdir(os.path.dirname(__file__) or ".") distutils.core.setup(**setup_kwargs) nfoview-1.18/tools/000077500000000000000000000000001265072436100142665ustar00rootroot00000000000000nfoview-1.18/tools/check-translations000077500000000000000000000071141265072436100200130ustar00rootroot00000000000000#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Check translation files for common errors. Usage: check-translations [XX[_YY[@ZZ]]...] """ import glob, os, sys args = tuple(sys.argv[1:]) args = tuple("{}.po".format(x) for x in args) for arg in args: if not arg in os.listdir("po"): print("'po/{}' not found".format(arg), file=sys.stderr) os.chdir(os.path.join(os.path.dirname(__file__), "..", "po")) for name in sorted(glob.glob("*.po")): if args and not name in args: continue os.system("msgfmt -c {} --statistics -o /dev/null".format(name)) fobj = open(name, "r", encoding="utf_8") lineno = 0 nbad = 0 ntotal = 0 for line in fobj: lineno += 1 line = line.strip() if not line.startswith("msgid"): continue msgid = line[7:-1] while True: line = fobj.readline().strip() lineno += 1 if line.startswith("msgstr"): break msgid = "".join((msgid, line[1:-1])) if not msgid: continue if line.startswith("msgstr["): # Skip plural forms. continue lineno_msgstr = lineno msgstr = line[8:-1] while True: line = fobj.readline().strip() lineno += 1 if not line: break msgstr = "".join((msgstr, line[1:-1])) if not msgstr: continue pos = (name, lineno_msgstr) ntotal += 1 # Check that the translation of a label includes # a keyboard accelerator defined by an underscore. if "_" in msgid: if not "_" in msgstr: nbad += 1 print("{}:{:d}: missing accelerator in".format(*pos)) print('"{}"'.format(msgid)) print('"{}"'.format(msgstr)) print("") # Check that the translation of a label includes # a terminating colon. if msgid.endswith(":"): if not msgstr.endswith(":"): nbad += 1 print("{}:{:d}: missing colon in".format(*pos)) print('"{}"'.format(msgid)) print('"{}"'.format(msgstr)) print("") # Check that the translation of a menu item includes # an ellipsis defined by three dots. if "..." in msgid: if not "..." in msgstr: nbad += 1 print("{}:{:d}: missing ellipsis in".format(*pos)) print('"{}"'.format(msgid)) print('"{}"'.format(msgstr)) print("") # Check that the translation of a menu item includes # an ellipsis defined by the Unicode character. if "…" in msgid: if not "…" in msgstr: nbad += 1 print("{}:{:d}: missing ellipsis in".format(*pos)) print('"{}"'.format(msgid)) print('"{}"'.format(msgstr)) print("") # Check that string formatting fields exists as-is in # the translation (order may vary, but not the field). for i in range(len(msgid)): if msgid[i] == "{": j = msgid.index("}", i+1) field = msgid[i:(j+1)] if not field in msgstr: nbad += 1 print("{}:{:d}: formatting mismatch in".format(*pos)) print('"{}"'.format(msgid)) print('"{}"'.format(msgstr)) print("") print("{}: {:d} bad, {:d} good messages" .format(name, nbad, ntotal - nbad)) nfoview-1.18/tools/update-translations000077500000000000000000000007421265072436100202200ustar00rootroot00000000000000#!/bin/sh # Update all translations with new strings. # TODO: Once xgettext supports AppData files, we could use that # directly and drop the intltool dependency (also in setup.py). cd "$(dirname "$0")/../po" || exit 1 echo "Searching for missing files..." intltool-update -m sleep 3 && [ -f missing ] && echo "Files missing." && exit 1 echo "Updating nfoview.pot..." intltool-update -p -g nfoview for X in *.po; do echo "Updating $X..." msgmerge -UNq "$X" nfoview.pot done