pax_global_header00006660000000000000000000000064131566013530014515gustar00rootroot0000000000000052 comment=8856156f53b65d5c05f3e67f37dd37ca8291f7e2 fcitx-libpinyin-0.5.3/000077500000000000000000000000001315660135300146325ustar00rootroot00000000000000fcitx-libpinyin-0.5.3/.gitignore000066400000000000000000000001341315660135300166200ustar00rootroot00000000000000*~ build*/ .* !.git* .git/ *.tar.* *.kdev4 *.kate-swp *.orig tags astyle.sh cscope.* *.part fcitx-libpinyin-0.5.3/AUTHORS000066400000000000000000000000401315660135300156740ustar00rootroot00000000000000Weng Xuetian fcitx-libpinyin-0.5.3/CMakeLists.txt000066400000000000000000000030751315660135300173770ustar00rootroot00000000000000cmake_minimum_required(VERSION 2.8.6) project(fcitx-libpinyin) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) option(ENABLE_QT "Enable Qt for dictmanager" On) find_package(Libintl REQUIRED) find_package(Fcitx 4.2.8 REQUIRED) find_package(GLIB2 REQUIRED) find_package(Libpinyin REQUIRED) find_package(DBus REQUIRED) _fcitx_add_uninstall_target() set(CMAKE_C_FLAGS "-Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -fvisibility=hidden ${CMAKE_C_FLAGS}") set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -fvisibility=hidden ${CMAKE_CXX_FLAGS}") set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed ${CMAKE_SHARED_LINKER_FLAGS}") set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--as-needed ${CMAKE_MODULE_LINKER_FLAGS}") string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" FCITX4_MAJOR_VERSION "${FCITX4_VERSION}") string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" FCITX4_MINOR_VERSION "${FCITX4_VERSION}") string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" FCITX4_PATCH_VERSION "${FCITX4_VERSION}") if(NOT DEFINED LIB_INSTALL_DIR) set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib) endif() if (LIBPINYIN_GEN_UNIGRAM AND LIBPINYIN_GEN_BINARY_FILES AND LIBPINYIN_IMPORT_INTERPOLATION) set(LIBPINYIN_TOOLS_FOUND 1) else() set(LIBPINYIN_TOOLS_FOUND 0) endif () set(FCITX_LIBPINYIN_ZHUYIN_DATADIR "${FCITX4_PREFIX}/share/fcitx/libpinyin/zhuyin_data") set(libdir ${LIB_INSTALL_DIR}) configure_file(config.h.in config.h) add_subdirectory(po) add_subdirectory(src) add_subdirectory(data) add_subdirectory(dictmanager) fcitx-libpinyin-0.5.3/COPYING000066400000000000000000000431621315660135300156730ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) 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 this service 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 make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. 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. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), 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 distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the 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 a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE 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. 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 convey 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 2 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, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision 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, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This 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 Library General Public License instead of this License. fcitx-libpinyin-0.5.3/ChangeLog000066400000000000000000000002301315660135300163770ustar00rootroot000000000000002013-07-15: CSSlayer * 0.3.1 - add new icon - fix import if import directory doesn't exists - a possible fix for Issue 699 fcitx-libpinyin-0.5.3/INSTALL000066400000000000000000000006411315660135300156640ustar00rootroot00000000000000fcitx-libpinyin install instructions ================================================= To compile and install, go in the source directory and type: mkdir build; cd build cmake .. (If you want to install in a different path, use instead: cmake .. -DCMAKE_INSTALL_PREFIX=/install/path) make To install, become root if required: make install Once installed, you can restart fcitx and it will be enabled by default. fcitx-libpinyin-0.5.3/README000066400000000000000000000000551315660135300155120ustar00rootroot00000000000000fcitx-libpinyin Libpinyin Wrapper for Fcitx. fcitx-libpinyin-0.5.3/cmake/000077500000000000000000000000001315660135300157125ustar00rootroot00000000000000fcitx-libpinyin-0.5.3/cmake/FindDBus.cmake000066400000000000000000000042031315660135300203510ustar00rootroot00000000000000# - Try to find the low-level D-Bus library # Once done this will define # # DBUS_FOUND - system has D-Bus # DBUS_INCLUDE_DIR - the D-Bus include directory # DBUS_ARCH_INCLUDE_DIR - the D-Bus architecture-specific include directory # DBUS_LIBRARIES - the libraries needed to use D-Bus # Copyright (c) 2008, Kevin Kofler, # modeled after FindLibArt.cmake: # Copyright (c) 2006, Alexander Neundorf, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. if (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES) # in cache already SET(DBUS_FOUND TRUE) else (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES) IF (NOT WIN32) FIND_PACKAGE(PkgConfig) IF (PKG_CONFIG_FOUND) # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls pkg_check_modules(_DBUS_PC QUIET dbus-1) ENDIF (PKG_CONFIG_FOUND) ENDIF (NOT WIN32) FIND_PATH(DBUS_INCLUDE_DIR dbus/dbus.h ${_DBUS_PC_INCLUDE_DIRS} /usr/include /usr/include/dbus-1.0 /usr/local/include ) FIND_PATH(DBUS_ARCH_INCLUDE_DIR dbus/dbus-arch-deps.h ${_DBUS_PC_INCLUDE_DIRS} /usr/lib${LIB_SUFFIX}/include /usr/lib${LIB_SUFFIX}/dbus-1.0/include /usr/lib64/include /usr/lib64/dbus-1.0/include /usr/lib/include /usr/lib/dbus-1.0/include ) FIND_LIBRARY(DBUS_LIBRARIES NAMES dbus-1 dbus PATHS ${_DBUS_PC_LIBDIR} ) if (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES) set(DBUS_FOUND TRUE) endif (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES) if (DBUS_FOUND) if (NOT DBus_FIND_QUIETLY) message(STATUS "Found D-Bus: ${DBUS_LIBRARIES}") endif (NOT DBus_FIND_QUIETLY) else (DBUS_FOUND) if (DBus_FIND_REQUIRED) message(FATAL_ERROR "Could NOT find D-Bus") endif (DBus_FIND_REQUIRED) endif (DBUS_FOUND) MARK_AS_ADVANCED(DBUS_INCLUDE_DIR DBUS_ARCH_INCLUDE_DIR DBUS_LIBRARIES) endif (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES) fcitx-libpinyin-0.5.3/cmake/FindGLIB2.cmake000066400000000000000000000032161315660135300203160ustar00rootroot00000000000000# - Try to find the GLIB2 libraries # Once done this will define # # GLIB2_FOUND - system has glib2 # GLIB2_INCLUDE_DIR - the glib2 include directory # GLIB2_LIBRARIES - glib2 library # Copyright (c) 2008 Laurent Montel, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. if(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES) # Already in cache, be silent set(GLIB2_FIND_QUIETLY TRUE) endif(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES) find_package(PkgConfig) pkg_check_modules(PC_LibGLIB2 QUIET glib-2.0) find_path(GLIB2_MAIN_INCLUDE_DIR NAMES glib.h HINTS ${PC_LibGLIB2_INCLUDEDIR} PATH_SUFFIXES glib-2.0) find_library(GLIB2_LIBRARY NAMES glib-2.0 HINTS ${PC_LibGLIB2_LIBDIR} ) set(GLIB2_LIBRARIES ${GLIB2_LIBRARY}) # search the glibconfig.h include dir under the same root where the library is found get_filename_component(glib2LibDir "${GLIB2_LIBRARIES}" PATH) find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h PATH_SUFFIXES glib-2.0/include HINTS ${PC_LibGLIB2_INCLUDEDIR} "${glib2LibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH}) set(GLIB2_INCLUDE_DIR "${GLIB2_MAIN_INCLUDE_DIR}") # not sure if this include dir is optional or required # for now it is optional if(GLIB2_INTERNAL_INCLUDE_DIR) set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR} "${GLIB2_INTERNAL_INCLUDE_DIR}") endif(GLIB2_INTERNAL_INCLUDE_DIR) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(GLIB2 DEFAULT_MSG GLIB2_LIBRARIES GLIB2_MAIN_INCLUDE_DIR) mark_as_advanced(GLIB2_INCLUDE_DIR GLIB2_LIBRARIES) fcitx-libpinyin-0.5.3/cmake/FindLibintl.cmake000066400000000000000000000032031315660135300211100ustar00rootroot00000000000000# Try to find Libintl functionality # Once done this will define # # LIBINTL_FOUND - system has Libintl # LIBINTL_INCLUDE_DIR - Libintl include directory # LIBINTL_LIBRARIES - Libraries needed to use Libintl # # TODO: This will enable translations only if Gettext functionality is # present in libc. Must have more robust system for release, where Gettext # functionality can also reside in standalone Gettext library, or the one # embedded within kdelibs (cf. gettext.m4 from Gettext source). # Copyright (c) 2006, Chusslove Illich, # Copyright (c) 2007, Alexander Neundorf, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. if(LIBINTL_INCLUDE_DIR AND LIBINTL_LIB_FOUND) set(Libintl_FIND_QUIETLY TRUE) endif(LIBINTL_INCLUDE_DIR AND LIBINTL_LIB_FOUND) find_path(LIBINTL_INCLUDE_DIR libintl.h) set(LIBINTL_LIB_FOUND FALSE) if(LIBINTL_INCLUDE_DIR) include(CheckFunctionExists) check_function_exists(dgettext LIBINTL_LIBC_HAS_DGETTEXT) if (LIBINTL_LIBC_HAS_DGETTEXT) set(LIBINTL_LIBRARIES) set(LIBINTL_LIB_FOUND TRUE) else (LIBINTL_LIBC_HAS_DGETTEXT) find_library(LIBINTL_LIBRARIES NAMES intl libintl ) if(LIBINTL_LIBRARIES) set(LIBINTL_LIB_FOUND TRUE) endif(LIBINTL_LIBRARIES) endif (LIBINTL_LIBC_HAS_DGETTEXT) endif(LIBINTL_INCLUDE_DIR) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Libintl DEFAULT_MSG LIBINTL_INCLUDE_DIR LIBINTL_LIB_FOUND) mark_as_advanced(LIBINTL_INCLUDE_DIR LIBINTL_LIBRARIES LIBINTL_LIBC_HAS_DGETTEXT LIBINTL_LIB_FOUND)fcitx-libpinyin-0.5.3/cmake/FindLibpinyin.cmake000066400000000000000000000033771315660135300214640ustar00rootroot00000000000000# - Try to find the Libpinyin libraries # Once done this will define # # LIBPINYIN_FOUND - system has LIBPINYIN # LIBPINYIN_INCLUDE_DIR - the LIBPINYIN include directory # LIBPINYIN_LIBRARIES - LIBPINYIN library # # Copyright (c) 2012 CSSlayer # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. if(LIBPINYIN_INCLUDE_DIR AND LIBPINYIN_LIBRARIES) # Already in cache, be silent set(LIBPINYIN_FIND_QUIETLY TRUE) endif(LIBPINYIN_INCLUDE_DIR AND LIBPINYIN_LIBRARIES) find_package(PkgConfig REQUIRED) pkg_check_modules(PC_LIBPINYIN "libpinyin>=2.1.0") pkg_get_variable(PC_LIBPINYIN_LIBPINYININCLUDEDIR "libpinyin" "libpinyinincludedir") pkg_get_variable(LIBPINYIN_PKGDATADIR "libpinyin" "pkgdatadir") pkg_get_variable(LIBPINYIN_EXECPREFIX "libpinyin" "exec_prefix") find_path(LIBPINYIN_INCLUDE_DIR NAMES pinyin.h PATHS ${PC_LIBPINYIN_LIBPINYININCLUDEDIR}) find_library(LIBPINYIN_LIBRARIES NAMES pinyin HINTS ${PC_LIBPINYIN_LIBDIR}) find_program(LIBPINYIN_GEN_BINARY_FILES gen_binary_files HINTS "${LIBPINYIN_EXECPREFIX}/bin") find_program(LIBPINYIN_GEN_UNIGRAM gen_unigram HINTS "${LIBPINYIN_EXECPREFIX}/bin") find_program(LIBPINYIN_IMPORT_INTERPOLATION import_interpolation HINTS "${LIBPINYIN_EXECPREFIX}/bin") include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Libpinyin DEFAULT_MSG LIBPINYIN_LIBRARIES LIBPINYIN_INCLUDE_DIR LIBPINYIN_PKGDATADIR PC_LIBPINYIN_FOUND ) mark_as_advanced(LIBPINYIN_INCLUDE_DIR LIBPINYIN_LIBRARIES) fcitx-libpinyin-0.5.3/config.h.in000066400000000000000000000011421315660135300166530ustar00rootroot00000000000000#define LIBPINYIN_PKGDATADIR "@LIBPINYIN_PKGDATADIR@" #define FCITX_LIBPINYIN_ZHUYIN_DATADIR "@FCITX_LIBPINYIN_ZHUYIN_DATADIR@" #define FCITX4_MAJOR_VERSION @FCITX4_MAJOR_VERSION@ #define FCITX4_MINOR_VERSION @FCITX4_MINOR_VERSION@ #define FCITX4_PATCH_VERSION @FCITX4_PATCH_VERSION@ #cmakedefine LIBPINYIN_TOOLS_FOUND #define FCITX_CHECK_VERSION(major,minor,micro) \ (FCITX4_MAJOR_VERSION > (major) || \ (FCITX4_MAJOR_VERSION == (major) && FCITX4_MINOR_VERSION > (minor)) || \ (FCITX4_MAJOR_VERSION == (major) && FCITX4_MINOR_VERSION == (minor) && \ FCITX4_PATCH_VERSION >= (micro))) fcitx-libpinyin-0.5.3/data/000077500000000000000000000000001315660135300155435ustar00rootroot00000000000000fcitx-libpinyin-0.5.3/data/CMakeLists.txt000066400000000000000000000043361315660135300203110ustar00rootroot00000000000000foreach(icon pinyin-libpinyin shuangpin-libpinyin bopomofo) install(FILES ${icon}.png RENAME fcitx-${icon}.png DESTINATION share/icons/hicolor/48x48/status/) install(FILES ${icon}.png DESTINATION share/fcitx/imicon) endforeach() if (LIBPINYIN_TOOLS_FOUND) set(_LIBPINYIN_TABLE art gb_char history nature scitech culture gbk_char life society economy geology merged sport) foreach(f ${_LIBPINYIN_TABLE}) set(_LIBPINYIN_TABLE_FILES ${_LIBPINYIN_TABLE_FILES} "${f}.table") set(_LIBPINYIN_BIN_FILES ${_LIBPINYIN_BIN_FILES} "${f}.bin") set(_LIBPINYIN_GEN_BIN_FILES ${_LIBPINYIN_GEN_BIN_FILES} "${CMAKE_CURRENT_BINARY_DIR}/${f}.bin") endforeach() set(ZHUYIN_DATA_FILE_NAME model.text.20161206.tar.gz) set(ZHUYIN_URL "http://download.fcitx-im.org/data/${ZHUYIN_DATA_FILE_NAME}") set(ZHUYIN_ORGDATA ${_LIBPINYIN_TABLE_FILES} interpolation2.text) set(ZHUYIN_DATA bigram.db ${_LIBPINYIN_BIN_FILES} phrase_index.bin pinyin_index.bin addon_phrase_index.bin addon_pinyin_index.bin) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/table.conf ${CMAKE_CURRENT_BINARY_DIR}/table.conf COPYONLY) fcitx_download(zhuyin_data_tar "${ZHUYIN_URL}" "${ZHUYIN_DATA_FILE_NAME}" MD5SUM f657ea2e9091e35021037ef4ce796e1d) fcitx_extract(zhuyin-data-extract "${ZHUYIN_DATA_FILE_NAME}" DEPENDS zhuyin_data_tar OUTPUT ${ZHUYIN_ORGDATA}) add_custom_command(OUTPUT ${ZHUYIN_DATA} DEPENDS ${ZHUYIN_ORGDATA} zhuyin-data-extract COMMAND "${CMAKE_COMMAND}" -E remove ${ZHUYIN_DATA} COMMAND "${LIBPINYIN_GEN_BINARY_FILES}" --table-dir "${CMAKE_CURRENT_BINARY_DIR}" COMMAND "${LIBPINYIN_IMPORT_INTERPOLATION}" < "${CMAKE_CURRENT_BINARY_DIR}/interpolation2.text" COMMAND "${LIBPINYIN_GEN_UNIGRAM}") add_custom_target(zhuyin_data ALL DEPENDS ${ZHUYIN_DATA}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bigram.db ${_LIBPINYIN_GEN_BIN_FILES} ${CMAKE_CURRENT_BINARY_DIR}/phrase_index.bin ${CMAKE_CURRENT_BINARY_DIR}/pinyin_index.bin ${CMAKE_CURRENT_BINARY_DIR}/addon_phrase_index.bin ${CMAKE_CURRENT_BINARY_DIR}/addon_pinyin_index.bin table.conf DESTINATION ${FCITX_LIBPINYIN_ZHUYIN_DATADIR}) endif() fcitx-libpinyin-0.5.3/data/bopomofo.png000066400000000000000000000046331315660135300200770ustar00rootroot00000000000000PNG  IHDR00WsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org< IDAThZ{T{ܙ} XPOM!5%ַIR Um6$EXm&M >b۴G(b>eO+0}hj>kc5U-iݥaKn7in0#+hv?G 81g$5s3 8o,Pށkas eOKXpÒ='0c񄇁Jڛ8؛(#`9%Vz u5PUjS -x#O&LՔ& MIR*?4(ysCH D1}&\4d\we0|_V?ړ%1NIENDB`fcitx-libpinyin-0.5.3/data/pinyin-libpinyin.png000066400000000000000000000054561315660135300215640ustar00rootroot00000000000000PNG  IHDR00WsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org< IDAThZil̼yl΂8 !{Ҕ(ET4lR*A)E֊%QRJZAҔJ5, Yl֙{lK*'Y3s߽gιsNJ$0l& \yjO[qEQ“W=t.d j"K}W v|IJѯZ~Q{ݢsse=5DDEpPGIyu??>\q8hB C»-HRZRUι6`\g1EKDZфHZJro c"p,Kh,4LER\(<WZ!?) |}`*M^q+OT١0!4!#=川#]D;N0'ҺT@HL;P",}3%atuycI 0~l2cyHb) c pz#%׏$C~P~$֡|w\ւM#  ҚYԆ@P)e #O @0j4ux,g چ0}r ŽXHXqmbIu9 U3Q  i$el3!L*͚Tš%SW/P(tEeU}cIuU?N+En,$&!רm{VL \lC0  3JAmqؖcmH5V/ x;B~ Ү3 ;=? Tdgj]m1̯*vq5{Mެc\A4ϑi'l6"Iv$P™ebyU v}+DE":zRP B'#t:\GUE4C0} Ac;"Âc, T (IG>s"䷐LcR"Y5Ya%r1htZB\eáob7fbwgf"'(Nn\[6}2SPlZ [37e0 % ̬ aѬ28މm"3M8Z`[&>4=vٶ̌ P{y55%ErSYl@^:+ x"a(TTuK~x?ɇb6l\t VT%ҝĎ'0wj1nX=kT3++a(/N/EPR#ԭܻIy62!磥/oI/Z~sA%Lv]AWAoEkwGWKxhEֱZ>݆od?j ,E Q1z:BS3qB_sު&h`-c>|ym^,+O{N#W V$ڢI|.]4[zl2ML⽆|Xp@򨒢 DW<\IW/+@R>De'>gycIVc՞W>k+F=m)r{۷lţKC>,UHwdA3Z#Jox!LCșa ضS=$|xGuwIj^A V^a ᵫfgxH5CLJ)ysg)(˕kݟM)a+YR#'3dr,; l@g_ RXz&UpSzֆBs b6[=1 ՂY <;~ϡ 7c@_3JF)o|O5^sZk}ԭ $CG ;^xdq93ĢZ(25 kH0@v>[>AiЇDڅ0&@j]px$H@y)>t|+Sꞈú{A{]]:.()@-)+#ֵΜz(MTrVXG*< N!IA)R**hi; -;~U{#ɧїNCQu)Z@&Z.H8Nun?S`ۅy,3& Qb5k=;[ 8"o(wlS.P`+.,gRrsE'%; P_nÉ+} WZO,Bm-R0e( JxJxg[ ~PJCzV5R Sp`8  Oo^;n|mfXCșԧ:&v Gl;vB a E!/RX76sh NJ$RЮ(r*s67E}BU$j_ztU ӹ)whK 5VS'{HgyG+Hb\i7͛wPk&UcZm}o\#(:T*R2NUttvAZszHJ*]@DnB)Ӈj̛VS OѤo +'{9O￿$ZP]Ə&O8ߵF"I48ZБ0ў<#+_޼M}31a\jm9Gw-ǰyo^=Z')tRq$1| :# Ǘ~+'V}BĵPhA֓` 4kpk/ǒ.V`nx_ZJP>6qy_{$l=L,4ratXIV2լdիYSZ7'RBr$Bd/8IhO)ځ .,B^S'8XS}9v)HtE^I)K3!F;rO}Ƴ#C|>Cn騁ГT] }]jC=N$w4| @HVn'ߔoγ]|=K[kJ ^BxǍC7e!߯J/ŝ_=mtHrH)?[@LRgKWAȋK**QTRr^#鉳}Zâ/[5j vTT IE P0IeP(i CW^?>E Eݠ{s@P@HBv(UrL|g+3 =3&}ҿMv;HDП MI KB!IB I!m>ԔsqKW0IWEBҺ?|]Ĵʪ^bX>L+7ݹ[nYgΌ A_AQ*҆IENDB`fcitx-libpinyin-0.5.3/data/table.conf000066400000000000000000000017731315660135300175110ustar00rootroot00000000000000binary format version:5 model data version:10 lambda parameter:0.347121 source table format:pinyin default RESERVED NULL NULL NULL NOT_USED default GB_DICTIONARY gb_char.table gb_char.bin gb_char.dbin SYSTEM_FILE default GBK_DICTIONARY gbk_char.table gbk_char.bin gbk_char.dbin SYSTEM_FILE default MERGED_DICTIONARY merged.table merged.bin merged.dbin SYSTEM_FILE default ADDON_DICTIONARY NULL NULL addon.bin USER_FILE default NETWORK_DICTIONARY NULL NULL network.bin USER_FILE default USER_DICTIONARY NULL NULL user.bin USER_FILE addon 4 art.table art.bin NULL DICTIONARY addon 5 culture.table culture.bin NULL DICTIONARY addon 6 economy.table economy.bin NULL DICTIONARY addon 7 geology.table geology.bin NULL DICTIONARY addon 8 history.table history.bin NULL DICTIONARY addon 9 life.table life.bin NULL DICTIONARY addon 10 nature.table nature.bin NULL DICTIONARY addon 11 scitech.table scitech.bin NULL DICTIONARY addon 12 society.table society.bin NULL DICTIONARY addon 13 sport.table sport.bin NULL DICTIONARY fcitx-libpinyin-0.5.3/dictmanager/000077500000000000000000000000001315660135300171105ustar00rootroot00000000000000fcitx-libpinyin-0.5.3/dictmanager/CMakeLists.txt000066400000000000000000000027671315660135300216640ustar00rootroot00000000000000set(DICT_MANAGER_SRCS importer.cpp dictmanager.cpp main.cpp filelistmodel.cpp browserdialog.cpp filedownloader.cpp scelconverter.cpp erroroverlay.cpp ) fcitx_translate_add_sources( ${DICT_MANAGER_SRCS}) if (NOT ENABLE_QT) return() endif () find_package(Qt5 5.7 REQUIRED COMPONENTS Core Gui WebEngineWidgets Network DBus) find_package(FcitxQt5WidgetsAddons 1.1 REQUIRED) find_package(FcitxQt5DBusAddons 1.1 REQUIRED) include_directories( ${CMAKE_CURRENT_BINARY_DIR} ../src/ ) include_directories ( ${PROJECT_BINARY_DIR} ${LIBPINYIN_INCLUDE_DIR} ${FCITX4_FCITX_UTILS_INCLUDE_DIRS} ${FCITX4_FCITX_CONFIG_INCLUDE_DIRS} ${FCITX4_FCITX_INCLUDE_DIRS} ${LIBINTL_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} ${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR} ) link_directories( ${FCITX4_FCITX_UTILS_LIBRARY_DIRS} ${FCITX4_FCITX_CONFIG_LIBRARY_DIRS} ) qt5_wrap_ui(DICT_MANAGER_SRCS dictmanager.ui browserdialog.ui) add_library(fcitx-libpinyin-dictmanager MODULE ${DICT_MANAGER_SRCS}) set_target_properties(fcitx-libpinyin-dictmanager PROPERTIES LINK_FLAGS "-Wl,--no-undefined" AUTOMOC TRUE) target_link_libraries(fcitx-libpinyin-dictmanager Qt5::Core Qt5::Gui Qt5::DBus Qt5::Network Qt5::WebEngineWidgets FcitxQt5::WidgetsAddons FcitxQt5::DBusAddons ${FCITX4_FCITX_UTILS_LIBRARIES} ${FCITX4_FCITX_CONFIG_LIBRARIES} ${LIBINTL_LIBRARIES} ) install(TARGETS fcitx-libpinyin-dictmanager DESTINATION ${FCITX4_ADDON_INSTALL_DIR}/qt) fcitx-libpinyin-0.5.3/dictmanager/browserdialog.cpp000066400000000000000000000136061315660135300224650ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2013~2013 by CSSlayer * * wengxt@gmail.com * * * * 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 2 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include #include #include #include #include #include #include #include #include "guicommon.h" #include "filedownloader.h" #include "scelconverter.h" #include "browserdialog.h" #include "ui_browserdialog.h" /* * a typical link looks like this. * http://download.pinyin.sogou.com/dict/download_cell.php?id=15207&name=%D6%B2%CE%EF%B4%CA%BB%E3%B4%F3%C8%AB%A1%BE%B9%D9%B7%BD%CD%C6%BC%F6%A1%BF */ class WebPage : public QWebEnginePage { public: WebPage(BrowserDialog *dialog) : QWebEnginePage(dialog), m_dialog(dialog) { } protected: bool acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame) override { return m_dialog->linkClicked(url); } private: BrowserDialog *m_dialog; }; BrowserDialog::BrowserDialog(QWidget* parent): QDialog(parent) ,m_ui(new Ui::BrowserDialog), m_page(new WebPage(this)) { m_ui->setupUi(this); m_ui->webView->setPage(m_page); m_ui->listWidget->hide(); setWindowIcon(QIcon::fromTheme("internet-web-browser")); setWindowTitle(_("Browse Sogou Cell Dict repository")); connect(m_ui->webView, &QWebEngineView::loadProgress, m_ui->progressBar, &QProgressBar::setValue); connect(m_ui->webView, &QWebEngineView::loadStarted, m_ui->progressBar, &QProgressBar::show); connect(m_ui->webView, &QWebEngineView::loadFinished, m_ui->progressBar, &QProgressBar::hide); m_ui->webView->load(QUrl(URL_BASE)); } BrowserDialog::~BrowserDialog() { delete m_ui; } QString BrowserDialog::decodeName(const QByteArray& in) { QTextCodec* codec = QTextCodec::codecForName("UTF-8"); if (!codec) { return QString(); } QByteArray out = QByteArray::fromPercentEncoding(in); return codec->toUnicode(out); } bool BrowserDialog::linkClicked(const QUrl& url) { do { if (url.host() != DOWNLOAD_HOST_BASE) { break; } if (url.path() != "/dict/download_cell.php") { break; } QUrlQuery query(url); QString id = query.queryItemValue("id"); QByteArray name = query.queryItemValue("name", QUrl::FullyEncoded).toLatin1(); QString sname = decodeName(name); m_name = sname; if (!id.isEmpty() && !sname.isEmpty()) { download(url); return false; } } while(0); if (url.host() != HOST_BASE) { QMessageBox::information(this, _("Wrong Link"), _("No browsing outside pinyin.sogou.com, now redirect to home page.")); m_ui->webView->load(QUrl(URL_BASE)); return false; } else { return true; } } void BrowserDialog::download(const QUrl& url) { m_ui->webView->stop(); m_ui->webView->hide(); m_ui->progressBar->hide(); m_ui->listWidget->show(); FileDownloader* downloader = new FileDownloader(this); connect(downloader, SIGNAL(message(QMessageBox::Icon,QString)), SLOT(showMessage(QMessageBox::Icon,QString))); connect(downloader, SIGNAL(finished(bool)), SLOT(downloadFinished(bool))); connect(downloader, SIGNAL(finished(bool)), downloader, SLOT(deleteLater())); downloader->download(url); } void BrowserDialog::showMessage(QMessageBox::Icon msgLevel, const QString& message) { QString iconName; switch(msgLevel) { case QMessageBox::Warning: iconName = "dialog-warning"; break; case QMessageBox::Critical: iconName = "dialog-error"; break; case QMessageBox::Information: iconName = "dialog-information"; break; default: break; } QListWidgetItem* item = new QListWidgetItem(QIcon::fromTheme(iconName), message, m_ui->listWidget); m_ui->listWidget->addItem(item); } void BrowserDialog::downloadFinished(bool succ) { FileDownloader* downloader = qobject_cast< FileDownloader* >(sender()); if (!succ) { return; } QString fileName = downloader->fileName(); ScelConverter* converter = new ScelConverter(this); connect(converter, SIGNAL(message(QMessageBox::Icon,QString)), SLOT(showMessage(QMessageBox::Icon,QString))); connect(converter, SIGNAL(finished(bool)), SLOT(convertFinished(bool))); connect(converter, SIGNAL(finished(bool)), converter, SLOT(deleteLater())); converter->convert(fileName, m_name.append(".txt")); } void BrowserDialog::convertFinished(bool succ) { if (succ) { accept(); } } fcitx-libpinyin-0.5.3/dictmanager/browserdialog.h000066400000000000000000000042441315660135300221300ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2013~2013 by CSSlayer * * wengxt@gmail.com * * * * 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 2 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef FCITX_BROWSERDIALOG_H #define FCITX_BROWSERDIALOG_H #include #include #include namespace Ui { class BrowserDialog; } class WebPage; class BrowserDialog : public QDialog { friend class WebPage; Q_OBJECT public: explicit BrowserDialog(QWidget* parent = 0); virtual ~BrowserDialog(); protected: bool linkClicked(const QUrl& url); private: QString decodeName(const QByteArray& in); void download(const QUrl& url); Ui::BrowserDialog* m_ui; QString m_name; WebPage *m_page; public slots: void showMessage(QMessageBox::Icon msgLevel, const QString& message); void downloadFinished(bool succ); void convertFinished(bool); }; #endif // FCITX_BROWSERDIALOG_H fcitx-libpinyin-0.5.3/dictmanager/browserdialog.ui000066400000000000000000000020561315660135300223150ustar00rootroot00000000000000 BrowserDialog 0 0 1200 600 Dialog about:blank 24 QWebEngineView QWidget
QtWebEngineWidgets/QWebEngineView
fcitx-libpinyin-0.5.3/dictmanager/dictmanager.cpp000066400000000000000000000222541315660135300220770ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2013~2013 by CSSlayer * * wengxt@gmail.com * * * * 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 2 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include #include #include #include #include #include #include #include #include #include "guicommon.h" #include "dictmanager.h" #include "filelistmodel.h" #include "importer.h" #include "browserdialog.h" #include "scelconverter.h" #include "erroroverlay.h" DictManager::DictManager(QWidget* parent): FcitxQtConfigUIWidget(parent) ,m_ui(new Ui::DictManager) ,m_importer(new Importer(this)) ,m_errorOverlay(0) { m_ui->setupUi(this); m_errorOverlay = new ErrorOverlay(this); QMenu* menu = new QMenu(this); m_importFromFileAction = new QAction(_("From &File"), this); m_importFromSogou = new QAction(_("From &Sogou Cell Dictionary File"), this); m_importFromSogouOnline = new QAction(_("&Browse Sogou Cell Dictionary Online"), this); menu->addAction(m_importFromFileAction); menu->addAction(m_importFromSogou); menu->addAction(m_importFromSogouOnline); m_ui->importButton->setMenu(menu); menu = new QMenu(this); m_clearUserDictAction = new QAction(_("&Clear User Data"), this); m_clearAllDataAction = new QAction(_("Clear &All Data"), this); menu->addAction(m_clearUserDictAction); menu->addAction(m_clearAllDataAction); m_ui->clearDictButton->setMenu(menu); m_model = new FileListModel(this); m_ui->importButton->setText(_("&Import")); m_ui->removeButton->setText(_("&Remove")); m_ui->removeAllButton->setText(_("Remove &All")); m_ui->clearDictButton->setText(_("&Clear Dict")); m_ui->listView->setModel(m_model); connect(m_importFromFileAction, SIGNAL(triggered(bool)), SLOT(importFromFile())); connect(m_importFromSogou, SIGNAL(triggered(bool)), SLOT(importFromSogou())); connect(m_importFromSogouOnline, SIGNAL(triggered(bool)), SLOT(importFromSogouOnline())); connect(m_clearUserDictAction, SIGNAL(triggered(bool)), SLOT(clearUserDict())); connect(m_clearAllDataAction, SIGNAL(triggered(bool)), SLOT(clearAllDict())); connect(m_ui->removeButton, SIGNAL(clicked(bool)), SLOT(removeDict())); connect(m_ui->removeAllButton, SIGNAL(clicked(bool)), SLOT(removeAllDict())); connect(m_importer, SIGNAL(started()), SLOT(importerStarted())); connect(m_importer, SIGNAL(finished()), SLOT(importerFinished())); connect(m_importer->connection(), SIGNAL(connected()), m_errorOverlay, SLOT(connected())); connect(m_importer->connection(), SIGNAL(disconnected()), m_errorOverlay, SLOT(disconnected())); if (!m_importer->connection()->isConnected()) { m_errorOverlay->disconnected(); } } DictManager::~DictManager() { delete m_ui; } void DictManager::load() { } void DictManager::save() { } QString DictManager::addon() { return "fcitx-libpinyin"; } QString DictManager::title() { return _("Manage Pinyin Dictionary"); } QString DictManager::icon() { return "accessories-dictionary"; } void DictManager::importerStarted() { setEnabled(false); } void DictManager::importerFinished() { setEnabled(true); } void DictManager::importFromFile() { QString name = QFileDialog::getOpenFileName(this, _("Select Dictionary File")); if (name.isEmpty()) { return; } QFileInfo info(name); QString importName = info.fileName(); if (importName.endsWith(".txt")) { importName = importName.left(importName.size() - 4); } bool ok; importName = QInputDialog::getText(this, _("Input Dictionary Name"), _("New Dictionary Name:"), QLineEdit::Normal, importName, &ok); if (!ok || importName.isEmpty()) { return; } char* fullname; FcitxXDGMakeDirUser(m_model->dictDir().toLocal8Bit().constData()); FcitxXDGGetFileUserWithPrefix(m_model->dictDir().toLocal8Bit().constData(), importName.append(".txt").toLocal8Bit(), NULL, &fullname); if (!QFile::copy(name, QString::fromLocal8Bit(fullname))) { QMessageBox::warning(this, _("Copy file failed"), _("Copy file failed. Please check you have permission or disk is not full.")); } else { m_importer->import(); m_model->loadFileList(); } free(fullname); } void DictManager::importFromSogou() { QString name = QFileDialog::getOpenFileName(this, _("Select scel file"), QString(), _("Scel file (*.scel)") ); if (name.isEmpty()) { return; } QFileInfo info(name); QString importName = info.fileName(); if (importName.endsWith(".scel")) { importName = importName.left(importName.size() - 5); } bool ok; importName = QInputDialog::getText(this, _("Input Dictionary Name"), _("New Dictionary Name:"), QLineEdit::Normal, importName, &ok); if (!ok || importName.isEmpty()) { return; } char* fullname; FcitxXDGGetFileUserWithPrefix(m_model->dictDir().toLocal8Bit(), importName.append(".txt").toLocal8Bit(), NULL, &fullname); ScelConverter *converter = new ScelConverter; connect(converter, SIGNAL(finished(bool)), SLOT(convertFinished(bool))); setEnabled(false); converter->convert(name, QString::fromLocal8Bit(fullname), false); } void DictManager::convertFinished(bool succ) { setEnabled(true); if (!succ) { QMessageBox::warning(this, "Convertion failed", "Convert failed, please check this file is valid scel file or not."); } else { m_importer->import(); m_model->loadFileList(); } } void DictManager::importFromSogouOnline() { BrowserDialog dialog(this); int result = dialog.exec(); if (result == QDialog::Accepted) { m_importer->import(); m_model->loadFileList(); } } void DictManager::removeDict() { QModelIndex index = m_ui->listView->currentIndex(); if (!index.isValid()) { return; } QString curName = index.data(Qt::DisplayRole).toString(); QString fileName = index.data(Qt::UserRole).toString(); char* fullname = NULL; FcitxXDGGetFileUserWithPrefix(NULL, fileName.toLocal8Bit(), NULL, &fullname); int ret = QMessageBox::question(this, _("Confirm deletion"), _("Are you sure to delete %1?").arg(curName), QMessageBox::Ok | QMessageBox::Cancel); if (ret == QMessageBox::Ok) { bool ok = QFile::remove(QString::fromLocal8Bit(fullname)); if (!ok) { QMessageBox::warning(this, _("File Operation Failed"), _("Error while deleting %1.").arg(curName) ); } else { m_importer->import(); m_model->loadFileList(); } } free(fullname); } void DictManager::removeAllDict() { for (int i = 0; i < m_model->rowCount(); i ++) { QModelIndex index = m_model->index(i, 0); QString fileName = index.data(Qt::UserRole).toString(); char* fullname = NULL; FcitxXDGGetFileUserWithPrefix(NULL, fileName.toLocal8Bit(), NULL, &fullname); QFile::remove(QString::fromLocal8Bit(fullname)); free(fullname); } m_importer->clearDict(1); m_model->loadFileList(); } void DictManager::clearUserDict() { m_importer->clearDict(0); } void DictManager::clearAllDict() { m_importer->clearDict(2); } QString getTempdir() { // do some modern temp dir check QByteArray tempDir = qgetenv("XDG_RUNTIME_DIR"); if (!tempDir.isEmpty()) { QFileInfo dir(tempDir); if (dir.isDir() && dir.isReadable() && dir.isWritable() && dir.isExecutable()) { return tempDir; } } return QDir::tempPath(); } fcitx-libpinyin-0.5.3/dictmanager/dictmanager.h000066400000000000000000000050241315660135300215400ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2013~2013 by CSSlayer * * wengxt@gmail.com * * * * 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 2 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef FCITX_DICTMANAGER_H #define FCITX_DICTMANAGER_H #include #include #include "ui_dictmanager.h" class ErrorOverlay; class Importer; class FileListModel; class DictManager : public FcitxQtConfigUIWidget { Q_OBJECT public: explicit DictManager(QWidget* parent = 0); virtual ~DictManager(); virtual QString title(); virtual void load(); virtual void save(); virtual QString addon(); virtual QString icon(); public slots: void importFromFile(); void importFromSogou(); void importFromSogouOnline(); void removeDict(); void removeAllDict(); void clearUserDict(); void clearAllDict(); void convertFinished(bool); void importerStarted(); void importerFinished(); private: Ui::DictManager *m_ui; QAction* m_importFromFileAction; QAction* m_importFromSogou; QAction* m_importFromSogouOnline; FileListModel* m_model; Importer* m_importer; QAction* m_clearUserDictAction; QAction* m_clearAllDataAction; ErrorOverlay* m_errorOverlay; }; #endif // FCITX_DICTMANAGER_H fcitx-libpinyin-0.5.3/dictmanager/dictmanager.ui000066400000000000000000000037601315660135300217330ustar00rootroot00000000000000 DictManager 0 0 631 412 Qt::Vertical 20 40 fcitx-libpinyin-0.5.3/dictmanager/erroroverlay.cpp000066400000000000000000000077531315660135300223630ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2011 by Dario Freddi * * * * 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 2 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * ***************************************************************************/ #include #include #include #include #include "erroroverlay.h" #include "guicommon.h" ErrorOverlay::ErrorOverlay(QWidget *baseWidget, QWidget *parent) : QWidget(parent ? parent : baseWidget->window()), m_BaseWidget(baseWidget), m_enable(false) { setVisible(false); // Build the UI QVBoxLayout *layout = new QVBoxLayout; layout->setSpacing(10); QLabel *pixmap = new QLabel(); pixmap->setPixmap(QIcon::fromTheme("dialog-error").pixmap(64)); QLabel *message = new QLabel(_("Cannot connect to Fcitx by DBus, is Fcitx running?")); pixmap->setAlignment(Qt::AlignHCenter); message->setAlignment(Qt::AlignHCenter); layout->addStretch(); layout->addWidget(pixmap); layout->addWidget(message); layout->addStretch(); setLayout(layout); // Draw the transparent overlay background QPalette p = palette(); p.setColor(backgroundRole(), QColor(0, 0, 0, 128)); p.setColor(foregroundRole(), Qt::white); setPalette(p); setAutoFillBackground(true); m_BaseWidget->installEventFilter(this); } ErrorOverlay::~ErrorOverlay() { } void ErrorOverlay::connected() { onConnectStatusChanged(true); } void ErrorOverlay::disconnected() { onConnectStatusChanged(false); } void ErrorOverlay::onConnectStatusChanged(bool connected) { if (m_enable != !connected) { m_enable = !connected; setVisible(!connected); if (!connected) reposition(); } } void ErrorOverlay::reposition() { if (!m_BaseWidget) { return; } // reparent to the current top level widget of the base widget if needed // needed eg. in dock widgets if (parentWidget() != m_BaseWidget->window()) { setParent(m_BaseWidget->window()); } // follow base widget visibility // needed eg. in tab widgets if (!m_BaseWidget->isVisible()) { hide(); return; } show(); // follow position changes const QPoint topLevelPos = m_BaseWidget->mapTo(window(), QPoint(0, 0)); const QPoint parentPos = parentWidget()->mapFrom(window(), topLevelPos); move(parentPos); // follow size changes // TODO: hide/scale icon if we don't have enough space resize(m_BaseWidget->size()); } bool ErrorOverlay::eventFilter(QObject * object, QEvent * event) { if (m_enable && object == m_BaseWidget && (event->type() == QEvent::Move || event->type() == QEvent::Resize || event->type() == QEvent::Show || event->type() == QEvent::Hide || event->type() == QEvent::ParentChange)) { reposition(); } return QWidget::eventFilter(object, event); } fcitx-libpinyin-0.5.3/dictmanager/erroroverlay.h000066400000000000000000000035671315660135300220270ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2011 by Dario Freddi * * * * 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 2 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * ***************************************************************************/ #ifndef ERROROVERLAY_H #define ERROROVERLAY_H #include class ErrorOverlay : public QWidget { Q_OBJECT public: explicit ErrorOverlay(QWidget *baseWidget, QWidget *parent = 0); virtual ~ErrorOverlay(); public slots: void connected(); void disconnected(); protected: bool eventFilter(QObject *object, QEvent *event); private: void reposition(); void onConnectStatusChanged(bool arg1); private: QWidget *m_BaseWidget; bool m_enable; }; #endif // ERROROVERLAY_H fcitx-libpinyin-0.5.3/dictmanager/filedownloader.cpp000066400000000000000000000064401315660135300226160ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2013~2013 by CSSlayer * * wengxt@gmail.com * * * * 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 2 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include #include "filedownloader.h" #include "guicommon.h" FileDownloader::FileDownloader(QObject *parent) : QObject(parent) ,m_file(getTempdir().append("/fcitx_dictmanager_XXXXXX")) ,m_progress(0) { } FileDownloader::~FileDownloader() { } void FileDownloader::download(const QUrl& url) { if (!m_file.open()) { emit message(QMessageBox::Warning, _("Create temporary file failed.")); emit finished(false); return; } else { emit message(QMessageBox::Information, _("Temporary file created.")); } QNetworkRequest request(url); request.setRawHeader("Referer", QString("http://%1").arg(url.host()).toLatin1()); m_reply = m_WebCtrl.get(request); if (!m_reply) { emit message(QMessageBox::Warning, _("Failed to create request.")); emit finished(false); return; } emit message(QMessageBox::Information, _("Download started.")); connect(m_reply, SIGNAL(readyRead()), SLOT(readyToRead())); connect(m_reply, SIGNAL(finished()), SLOT(finished())); connect(m_reply, SIGNAL(downloadProgress(qint64,qint64)), SLOT(updateProgress(qint64,qint64))); } QString FileDownloader::fileName() { return m_file.fileName(); } void FileDownloader::readyToRead() { m_file.write(m_reply->readAll()); } void FileDownloader::updateProgress(qint64 downloaded, qint64 total) { if (total <= 0) { return; } int percent = (int) (((qreal) downloaded / total) * 100); if (percent > 100) { percent = 100; } if (percent >= m_progress + 10) { emit message(QMessageBox::Information, _("%1% Downloaded.").arg(percent)); m_progress = percent; } } void FileDownloader::finished() { m_file.close(); m_file.setAutoRemove(false); emit message(QMessageBox::Information, _("Download Finished")); emit finished(true); } fcitx-libpinyin-0.5.3/dictmanager/filedownloader.h000066400000000000000000000043071315660135300222630ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2013~2013 by CSSlayer * * wengxt@gmail.com * * * * 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 2 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef FCITX_FILEDOWNLOADER_H #define FCITX_FILEDOWNLOADER_H #include #include #include #include #include #include #include class FileDownloader : public QObject { Q_OBJECT public: explicit FileDownloader(QObject *parent = 0); virtual ~FileDownloader(); void download(const QUrl& url); QString fileName(); signals: void message(QMessageBox::Icon msgLevel, const QString& msg); void finished(bool succ); public slots: void readyToRead(); void finished(); void updateProgress(qint64,qint64); private: QTemporaryFile m_file; QNetworkAccessManager m_WebCtrl; QNetworkReply* m_reply; int m_progress; }; #endif fcitx-libpinyin-0.5.3/dictmanager/filelistmodel.cpp000066400000000000000000000057161315660135300224610ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2013~2013 by CSSlayer * * wengxt@gmail.com * * * * 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 . * * * ***************************************************************************/ #include #include "common.h" #include "filelistmodel.h" FileListModel::FileListModel(QObject* parent): QAbstractListModel(parent) ,m_langType(LPLT_Simplified) { loadFileList(); } FileListModel::~FileListModel() { } QString FileListModel::dictDir() const { return m_langType == LPLT_Simplified ? "libpinyin/importdict" : "libpinyin/importdict_zhuyin"; } int FileListModel::rowCount(const QModelIndex& parent) const { return m_fileList.size(); } QVariant FileListModel::data(const QModelIndex& index, int role) const { if (!index.isValid() || index.row() >= m_fileList.size()) return QVariant(); switch (role) { case Qt::DisplayRole: { const int length = dictDir().size(); return m_fileList[index.row()].mid(length + 1, m_fileList[index.row()].size() - length - strlen(".txt") - 1); } case Qt::UserRole: return m_fileList[index.row()]; default: break; } return QVariant(); } void FileListModel::loadFileList() { beginResetModel(); m_fileList.clear(); FcitxStringHashSet* files = FcitxXDGGetFiles(dictDir().toLocal8Bit().constData(), NULL, ".txt"); HASH_SORT(files, fcitx_utils_string_hash_set_compare); HASH_FOREACH(f, files, FcitxStringHashSet) { m_fileList.append(QString::fromLocal8Bit(f->name).prepend(dictDir() + "/")); } fcitx_utils_free_string_hash_set(files); endResetModel(); } int FileListModel::findFile(const QString& lastFileName) { int idx = m_fileList.indexOf(lastFileName); if (idx < 0) { return 0; } return idx; } fcitx-libpinyin-0.5.3/dictmanager/filelistmodel.h000066400000000000000000000040161315660135300221160ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2013~2013 by CSSlayer * * wengxt@gmail.com * * * * 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 . * * * ***************************************************************************/ #ifndef FCITX_FILE_LIST_MODEL_H_ #define FCITX_FILE_LIST_MODEL_H_ #include #include #include "common.h" class FileListModel : public QAbstractListModel { Q_OBJECT public: explicit FileListModel(QObject* parent = 0); virtual ~FileListModel(); virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const; virtual int rowCount(const QModelIndex& parent = QModelIndex()) const; void loadFileList(); int findFile(const QString& lastFileName); QString dictDir() const; private: QStringList m_fileList; LIBPINYIN_LANGUAGE_TYPE m_langType; }; #endif // FCITX_FILE_LIST_MODEL_H_ fcitx-libpinyin-0.5.3/dictmanager/guicommon.h000066400000000000000000000033621315660135300212620ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2013~2013 by CSSlayer * * wengxt@gmail.com * * * * 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 2 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef GUICOMMON_H #define GUICOMMON_H #include #define _(x) QString::fromUtf8(dgettext("fcitx-libpinyin", (x))) #define DOWNLOAD_HOST_BASE "download.pinyin.sogou.com" #define HOST_BASE "pinyin.sogou.com" #define URL_BASE "http://" HOST_BASE "/dict/" QString getTempdir(); #endif // GUICOMMON_H fcitx-libpinyin-0.5.3/dictmanager/importer.cpp000066400000000000000000000067761315660135300214750ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2013~2013 by CSSlayer * * wengxt@gmail.com * * * * 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 2 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include #include #include #include #include #include #include "importer.h" #include "common.h" Importer::Importer(QObject* parent): QObject(parent) ,m_connection(new FcitxQtConnection(this)) ,m_running(false) ,m_iface(0) { m_connection->setAutoReconnect(true); connect(m_connection, SIGNAL(connected()), this, SLOT(onConnected())); connect(m_connection, SIGNAL(disconnected()), this, SLOT(onDisconnected())); m_connection->startConnection(); } Importer::~Importer() { } void Importer::onConnected() { m_iface = new QDBusInterface(m_connection->serviceName(), FCITX_LIBPINYIN_PATH, FCITX_LIBPINYIN_INTERFACE, *m_connection->connection()); } void Importer::onDisconnected() { delete m_iface; m_iface = 0; setIsRunning(false); } void Importer::callFinished(QDBusPendingCallWatcher* watcher) { watcher->deleteLater(); setIsRunning(false); } void Importer::import() { if (!m_iface || !m_iface->isValid() || m_running) { return; } setIsRunning(true); QDBusPendingCall call = m_iface->asyncCall("ImportDict"); QDBusPendingCallWatcher* watcher = new QDBusPendingCallWatcher(call, m_iface); connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), SLOT(callFinished(QDBusPendingCallWatcher*))); } void Importer::clearDict(int type) { if (!m_iface || !m_iface->isValid() || m_running) { return; } setIsRunning(true); QDBusPendingCall call = m_iface->asyncCall("ClearDict", type); QDBusPendingCallWatcher* watcher = new QDBusPendingCallWatcher(call, m_iface); connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), SLOT(callFinished(QDBusPendingCallWatcher*))); } void Importer::setIsRunning(bool running) { if (running != m_running) { m_running = running; if (m_running) { emit started(); } else { emit finished(); } } } fcitx-libpinyin-0.5.3/dictmanager/importer.h000066400000000000000000000042561315660135300211310ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2013~2013 by CSSlayer * * wengxt@gmail.com * * * * 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 2 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef FCITX_IMPORTER_H #define FCITX_IMPORTER_H #include #include class QDBusInterface; class QDBusPendingCallWatcher; class Importer : public QObject { Q_OBJECT void realRun(); public: explicit Importer(QObject* parent = 0); virtual ~Importer(); void import(); void clearDict(int type); FcitxQtConnection* connection() { return m_connection; } signals: void started(); void finished(); public slots: void callFinished(QDBusPendingCallWatcher*); private slots: void onConnected(); void onDisconnected(); void setIsRunning(bool running); private: FcitxQtConnection* m_connection; bool m_running; QDBusInterface* m_iface; }; #endif // FCITX_IMPORTER_H fcitx-libpinyin-0.5.3/dictmanager/libpinyin.json000066400000000000000000000000041315660135300217720ustar00rootroot00000000000000{ } fcitx-libpinyin-0.5.3/dictmanager/main.cpp000066400000000000000000000040501315660135300205370ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2013~2013 by CSSlayer * * wengxt@gmail.com * * * * 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 2 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "main.h" #include "dictmanager.h" LibPinyinDictManagerPlugin::LibPinyinDictManagerPlugin(QObject* parent) : FcitxQtConfigUIPlugin(parent) { } QString LibPinyinDictManagerPlugin::name() { return "libpinyin-dictmanager"; } QStringList LibPinyinDictManagerPlugin::files() { QStringList list; list << "libpinyin-dictmanager"; return list; } QString LibPinyinDictManagerPlugin::domain() { return "fcitx-libpinyin"; } FcitxQtConfigUIWidget* LibPinyinDictManagerPlugin::create(const QString& key) { if (key == "libpinyin-dictmanager") { return new DictManager; } return 0; } fcitx-libpinyin-0.5.3/dictmanager/main.h000066400000000000000000000065741315660135300202210ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2017~2017 by CSSlayer * * wengxt@gmail.com * * * * 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 2 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef _DICTMANAGER_MAIN_H_ #define _DICTMANAGER_MAIN_H_ /*************************************************************************** * Copyright (C) 2013~2013 by CSSlayer * * wengxt@gmail.com * * * * 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 2 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include class LibPinyinDictManagerPlugin : public FcitxQtConfigUIPlugin { Q_OBJECT public: Q_PLUGIN_METADATA(IID FcitxQtConfigUIFactoryInterface_iid FILE "libpinyin.json") explicit LibPinyinDictManagerPlugin(QObject* parent = 0); QString name() override; QStringList files() override; QString domain() override; FcitxQtConfigUIWidget* create(const QString& key) override; }; #endif // _DICTMANAGER_MAIN_H_ fcitx-libpinyin-0.5.3/dictmanager/scelconverter.cpp000066400000000000000000000071001315660135300224700ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2013~2013 by CSSlayer * * wengxt@gmail.com * * * * 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 2 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include #include #include #include #include "scelconverter.h" #include "guicommon.h" ScelConverter::ScelConverter(QObject* parent): QObject(parent) ,m_file(getTempdir().append("/fcitx_dictmanager_XXXXXX")) { } void ScelConverter::removeTempFile() { QFile::remove(m_fromFile); } void ScelConverter::convert(const QString& from, const QString& to, bool removeOriginFile) { if (!m_file.open()) { emit message(QMessageBox::Warning, _("Create temporary file failed.")); emit finished(false); return; } else { emit message(QMessageBox::Information, _("Temporary file created.")); } m_file.close(); m_file.setAutoRemove(false); m_fromFile = from; if (removeOriginFile) { connect(this, SIGNAL(finished(bool)), this, SLOT(removeTempFile())); } char* path = fcitx_utils_get_fcitx_path_with_filename("bindir", "scel2org"); QStringList arguments; arguments << "-a" << "-o" << m_file.fileName() << from; m_process.start(path, arguments); m_process.closeReadChannel(QProcess::StandardError); m_process.closeReadChannel(QProcess::StandardOutput); connect(&m_process, SIGNAL(finished(int, QProcess::ExitStatus)), SLOT(finished(int,QProcess::ExitStatus))); m_name = to; } void ScelConverter::finished(int exitCode, QProcess::ExitStatus status) { if (status == QProcess::CrashExit) { emit message(QMessageBox::Critical, _("Converter crashed.")); emit finished(false); return; } if (exitCode != 0) { emit message(QMessageBox::Warning, _("Convert failed.")); emit finished(false); } char* fullName; FcitxXDGMakeDirUser("libpinyin/importdict"); FcitxXDGGetFileUserWithPrefix("libpinyin/importdict", m_name.toLocal8Bit().constData(), NULL, &fullName); if (QFile::rename(m_file.fileName(), QString::fromLocal8Bit(fullName))) { emit finished(true); } else { QFile::remove(m_file.fileName()); emit message(QMessageBox::Warning, _("Rename failed.")); emit finished(false); } free(fullName); } fcitx-libpinyin-0.5.3/dictmanager/scelconverter.h000066400000000000000000000041221315660135300221360ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2013~2013 by CSSlayer * * wengxt@gmail.com * * * * 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 2 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef SCELCONVERTER_H #define SCELCONVERTER_H #include #include #include #include class ScelConverter : public QObject { Q_OBJECT public: explicit ScelConverter(QObject* parent = 0); void convert(const QString& from, const QString& to, bool removeOriginFile = true); signals: void message(QMessageBox::Icon msgLevel, const QString& msg); void finished(bool succ); public slots: void finished(int,QProcess::ExitStatus); void removeTempFile(); private: QProcess m_process; QTemporaryFile m_file; QString m_name; QString m_fromFile; }; #endif // SCELCONVERTER_H fcitx-libpinyin-0.5.3/po/000077500000000000000000000000001315660135300152505ustar00rootroot00000000000000fcitx-libpinyin-0.5.3/po/CMakeLists.txt000066400000000000000000000004341315660135300200110ustar00rootroot00000000000000file(GLOB PO_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" *.po) foreach(po_file ${PO_FILES}) string(REPLACE ".po" "" po_lang "${po_file}") fcitx_translate_add_po_file("${po_lang}" "${po_file}") endforeach() fcitx_translate_set_pot_target(pot fcitx-libpinyin fcitx-libpinyin.pot) fcitx-libpinyin-0.5.3/po/ca.po000066400000000000000000000266261315660135300162070ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Walter Garcia-Fontes , 2016-2017 msgid "" msgstr "" "Project-Id-Version: fcitx\n" "Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" "POT-Creation-Date: 2017-09-01 16:03-0700\n" "PO-Revision-Date: 2017-09-07 17:53+0000\n" "Last-Translator: Walter Garcia-Fontes \n" "Language-Team: Catalan (http://www.transifex.com/fcitx/fcitx/language/ca/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: ca\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: dictmanager/browserdialog.cpp:61 msgid "Browse Sogou Cell Dict repository" msgstr "Explora el repositori Sogou Cell Dict" #: dictmanager/browserdialog.cpp:107 msgid "Wrong Link" msgstr "Enllaç incorrecte" #: dictmanager/browserdialog.cpp:108 msgid "No browsing outside pinyin.sogou.com, now redirect to home page." msgstr "No es pot explorar fora de pinyin.sogou.com, ara redirigeix a la pàgina d'inici." #: dictmanager/dictmanager.cpp:48 msgid "From &File" msgstr "Des de &fitxer" #: dictmanager/dictmanager.cpp:49 msgid "From &Sogou Cell Dictionary File" msgstr "Des del fitxer &Sogou Cell Dictionary" #: dictmanager/dictmanager.cpp:50 msgid "&Browse Sogou Cell Dictionary Online" msgstr "&Explora el Sogou Cell Dictionary en línia" #: dictmanager/dictmanager.cpp:57 msgid "&Clear User Data" msgstr "&Neteja les dades d'usuari" #: dictmanager/dictmanager.cpp:58 msgid "Clear &All Data" msgstr "Neteja &totes les dades" #: dictmanager/dictmanager.cpp:65 msgid "&Import" msgstr "&Importa" #: dictmanager/dictmanager.cpp:66 msgid "&Remove" msgstr "&Elimina" #: dictmanager/dictmanager.cpp:67 msgid "Remove &All" msgstr "Elimina &tot" #: dictmanager/dictmanager.cpp:68 msgid "&Clear Dict" msgstr "&Neteja el diccionari" #: dictmanager/dictmanager.cpp:113 msgid "Manage Pinyin Dictionary" msgstr "Gestiona el diccionari pinyin" #: dictmanager/dictmanager.cpp:133 msgid "Select Dictionary File" msgstr "Seleccioneu el fitxer de diccionari" #: dictmanager/dictmanager.cpp:146 dictmanager/dictmanager.cpp:183 msgid "Input Dictionary Name" msgstr "Entreu el nom del diccionari" #: dictmanager/dictmanager.cpp:146 dictmanager/dictmanager.cpp:183 msgid "New Dictionary Name:" msgstr "Nou nom de diccionari:" #: dictmanager/dictmanager.cpp:155 msgid "Copy file failed" msgstr "Ha fallat la còpia del fitxer" #: dictmanager/dictmanager.cpp:155 msgid "" "Copy file failed. Please check you have permission or disk is not full." msgstr "Ha fallat la còpia del fitxer. Si us plau verifiqueu que teniu permís o que el disc no està ple." #: dictmanager/dictmanager.cpp:167 msgid "Select scel file" msgstr "Seleccioneu el fitxer scel" #: dictmanager/dictmanager.cpp:169 msgid "Scel file (*.scel)" msgstr "Fitxer scel (*.scel)" #: dictmanager/dictmanager.cpp:230 msgid "Confirm deletion" msgstr "Confirmeu l'eliminació" #: dictmanager/dictmanager.cpp:231 #, kde-format msgid "Are you sure to delete %1?" msgstr "Teniu seguretat d'eliminar %1?" #: dictmanager/dictmanager.cpp:238 msgid "File Operation Failed" msgstr "Ha fallat una operació sobre un fitxer" #: dictmanager/dictmanager.cpp:239 #, kde-format msgid "Error while deleting %1." msgstr "S'ha produït un error quan s'eliminava %1." #: dictmanager/erroroverlay.cpp:41 msgid "Cannot connect to Fcitx by DBus, is Fcitx running?" msgstr "No es pot connectar al fcitx pel DBus, s'està executant el fcitx?" #: dictmanager/filedownloader.cpp:40 dictmanager/scelconverter.cpp:43 msgid "Create temporary file failed." msgstr "Ha fallat la creació del fitxer temporari." #: dictmanager/filedownloader.cpp:44 dictmanager/scelconverter.cpp:47 msgid "Temporary file created." msgstr "S'ha creat el fitxer temporari" #: dictmanager/filedownloader.cpp:52 msgid "Failed to create request." msgstr "Ha fallat la creació de la demanda" #: dictmanager/filedownloader.cpp:56 msgid "Download started." msgstr "Ha començat la descàrrega" #: dictmanager/filedownloader.cpp:84 #, kde-format msgid "%1% Downloaded." msgstr "%1% descarregat." #: dictmanager/filedownloader.cpp:93 msgid "Download Finished" msgstr "Ha finalitzat la descàrrega" #: dictmanager/scelconverter.cpp:72 msgid "Converter crashed." msgstr "El convertidor ha fallat." #: dictmanager/scelconverter.cpp:78 msgid "Convert failed." msgstr "El convertidor ha fallat." #: dictmanager/scelconverter.cpp:90 msgid "Rename failed." msgstr "Ha fallat el canvi de nom." #: src/eim.cpp:837 src/pinyin-libpinyin.conf.in:3 msgid "Pinyin (LibPinyin)" msgstr "Pinyin (LibPinyin)" #: src/eim.cpp:854 src/shuangpin-libpinyin.conf.in:3 msgid "Shuangpin (LibPinyin)" msgstr "Shuangpin (LibPinyin)" #: src/eim.cpp:871 src/zhuyin-libpinyin.conf.in:3 msgid "Bopomofo (LibPinyin)" msgstr "Bopomofo (LibPinyin)" #: src/fcitx-libpinyin.conf.in:3 msgid "LibPinyin" msgstr "LibPinyin" #: src/fcitx-libpinyin.conf.in:4 msgid "LibPinyin Wrapper For Fcitx" msgstr "Contenidor LibPinyin per al fcitx" #: src/fcitx-libpinyin.conf.in:10 src/fcitx-libpinyin.desc:165 #: src/fcitx-libpinyin.desc:170 src/fcitx-libpinyin.desc:175 #: src/fcitx-libpinyin.desc:180 src/fcitx-libpinyin.desc:185 #: src/fcitx-libpinyin.desc:190 src/fcitx-libpinyin.desc:195 #: src/fcitx-libpinyin.desc:200 src/fcitx-libpinyin.desc:205 #: src/fcitx-libpinyin.desc:210 src/fcitx-libpinyin.desc:215 #: src/fcitx-libpinyin.desc:220 msgid "Dictionary" msgstr "Diccionari" #: src/fcitx-libpinyin.desc:1 src/fcitx-libpinyin.desc:6 msgid "Pinyin" msgstr "Pinyin" #: src/fcitx-libpinyin.desc:2 msgid "Use Incomplete pinyin" msgstr "Usa el pinyin incomplet" #: src/fcitx-libpinyin.desc:7 msgid "Use Traditional Chinese Data for Pinyin and Shuangpin (Need Restart)" msgstr "Usa les dades de xinès tradicional per a pinyin i shuangpin (cal reiniciar)" #: src/fcitx-libpinyin.desc:11 src/fcitx-libpinyin.desc:16 #: src/fcitx-libpinyin.desc:21 src/fcitx-libpinyin.desc:31 #: src/fcitx-libpinyin.desc:40 src/fcitx-libpinyin.desc:45 #: src/fcitx-libpinyin.desc:50 msgid "Zhuyin" msgstr "Zhuyin" #: src/fcitx-libpinyin.desc:12 msgid "Use Tone" msgstr "Usa to" #: src/fcitx-libpinyin.desc:17 msgid "Use Incomplete Zhuyin" msgstr "Usa zhuyin incomplet" #: src/fcitx-libpinyin.desc:22 msgid "Zhuyin Layout" msgstr "Disposició zhuyin" #: src/fcitx-libpinyin.desc:24 msgid "Standard" msgstr "Estàndard" #: src/fcitx-libpinyin.desc:25 msgid "IBM" msgstr "IBM" #: src/fcitx-libpinyin.desc:26 msgid "GinYieh" msgstr "GinYieh" #: src/fcitx-libpinyin.desc:27 msgid "ET" msgstr "ET" #: src/fcitx-libpinyin.desc:32 msgid "Zhuyin candidate choosing modifiers" msgstr "Modificadors d'elecció de candidates del zhuyin" #: src/fcitx-libpinyin.desc:34 msgid "Ctrl" msgstr "Ctrl" #: src/fcitx-libpinyin.desc:35 msgid "Alt" msgstr "Alt" #: src/fcitx-libpinyin.desc:36 msgid "Shift" msgstr "Màjuscules" #: src/fcitx-libpinyin.desc:41 msgid "Zhuyin Prev Page" msgstr "Zhuyin pàgina prèvia" #: src/fcitx-libpinyin.desc:46 msgid "Zhuyin Next Page" msgstr "Zhuyin pàgina següent" #: src/fcitx-libpinyin.desc:51 msgid "Use Simplified Chinese Data for Zhuyin (Need Restart)" msgstr "Usa dades de xinès simplificat per a zhuyin (cal reiniciar)" #: src/fcitx-libpinyin.desc:55 msgid "Shuangpin" msgstr "Shuangpin" #: src/fcitx-libpinyin.desc:56 msgid "Shuangpin Scheme" msgstr "Esquema shuangpin" #: src/fcitx-libpinyin.desc:58 msgid "Ziranma" msgstr "Ziranma" #: src/fcitx-libpinyin.desc:59 msgid "Microsoft" msgstr "Microsoft" #: src/fcitx-libpinyin.desc:60 msgid "ZiGuang" msgstr "ZiGuang" #: src/fcitx-libpinyin.desc:61 msgid "ABC" msgstr "ABC" #: src/fcitx-libpinyin.desc:62 msgid "PinyinJiaJia" msgstr "PinyinJiaJia" #: src/fcitx-libpinyin.desc:63 msgid "XiaoHe" msgstr "XiaoHe" #: src/fcitx-libpinyin.desc:67 src/fcitx-libpinyin.desc:72 #: src/fcitx-libpinyin.desc:77 src/fcitx-libpinyin.desc:82 #: src/fcitx-libpinyin.desc:87 src/fcitx-libpinyin.desc:92 #: src/fcitx-libpinyin.desc:97 src/fcitx-libpinyin.desc:102 msgid "Correction" msgstr "Correcció" #: src/fcitx-libpinyin.desc:68 msgid "V -> U" msgstr "V -> U" #: src/fcitx-libpinyin.desc:73 msgid "GN -> NG" msgstr "GN -> NG" #: src/fcitx-libpinyin.desc:78 msgid "MG -> NG" msgstr "MG -> NG" #: src/fcitx-libpinyin.desc:83 msgid "IOU -> IU" msgstr "IOU -> IU" #: src/fcitx-libpinyin.desc:88 msgid "UEI -> UI" msgstr "UEI -> UI" #: src/fcitx-libpinyin.desc:93 msgid "UEN -> UN" msgstr "UEN -> UN" #: src/fcitx-libpinyin.desc:98 msgid "UE -> VE" msgstr "UE -> VE" #: src/fcitx-libpinyin.desc:103 msgid "ON -> ONG" msgstr "ON -> ONG" #: src/fcitx-libpinyin.desc:107 src/fcitx-libpinyin.desc:115 #: src/fcitx-libpinyin.desc:120 src/fcitx-libpinyin.desc:125 #: src/fcitx-libpinyin.desc:130 src/fcitx-libpinyin.desc:135 #: src/fcitx-libpinyin.desc:140 src/fcitx-libpinyin.desc:145 #: src/fcitx-libpinyin.desc:150 src/fcitx-libpinyin.desc:155 #: src/fcitx-libpinyin.desc:160 msgid "Ambiguity" msgstr "Ambigüitat" #: src/fcitx-libpinyin.desc:108 msgid "Sort method" msgstr "Mètode d'ordenació" #: src/fcitx-libpinyin.desc:111 msgid "By Phrase Length and Frequency" msgstr "Per longitud i freqüència de la frase" #: src/fcitx-libpinyin.desc:112 msgid "By Phrase Length and Pinyin Length and Frequency" msgstr "Per la longitud de la frase i la longitud i freqüència del pinyin" #: src/fcitx-libpinyin.desc:116 msgid "Ci <-> Chi" msgstr "Ci <-> Chi" #: src/fcitx-libpinyin.desc:121 msgid "Zi <-> Zhi" msgstr "Zi <-> Zhi" #: src/fcitx-libpinyin.desc:126 msgid "Si <-> Shi" msgstr "Si <-> Shi" #: src/fcitx-libpinyin.desc:131 msgid "Ne <-> Le" msgstr "Ne <-> Le" #: src/fcitx-libpinyin.desc:136 msgid "Fo <-> He" msgstr "Fo <-> He" #: src/fcitx-libpinyin.desc:141 msgid "Le <-> Ri" msgstr "Le <-> Ri" #: src/fcitx-libpinyin.desc:146 msgid "Ge <-> Ke" msgstr "Ge <-> Ke" #: src/fcitx-libpinyin.desc:151 msgid "An <-> Ang" msgstr "An <-> Ang" #: src/fcitx-libpinyin.desc:156 msgid "En <-> Eng" msgstr "En <-> Eng" #: src/fcitx-libpinyin.desc:161 msgid "In <-> Ing" msgstr "In <-> Ing" #: src/fcitx-libpinyin.desc:166 src/fcitx-libpinyin.desc:226 msgid "Art" msgstr "Art" #: src/fcitx-libpinyin.desc:171 src/fcitx-libpinyin.desc:231 msgid "Culture" msgstr "Cultura" #: src/fcitx-libpinyin.desc:176 src/fcitx-libpinyin.desc:236 msgid "Economy" msgstr "Economia" #: src/fcitx-libpinyin.desc:181 src/fcitx-libpinyin.desc:241 msgid "Geology" msgstr "Geologia" #: src/fcitx-libpinyin.desc:186 src/fcitx-libpinyin.desc:246 msgid "History" msgstr "Història" #: src/fcitx-libpinyin.desc:191 src/fcitx-libpinyin.desc:251 msgid "Life" msgstr "Vida" #: src/fcitx-libpinyin.desc:196 src/fcitx-libpinyin.desc:256 msgid "Nature" msgstr "Naturalesa" #: src/fcitx-libpinyin.desc:201 msgid "People" msgstr "Gent" #: src/fcitx-libpinyin.desc:206 msgid "Science" msgstr "Ciència" #: src/fcitx-libpinyin.desc:211 src/fcitx-libpinyin.desc:266 msgid "Society" msgstr "Societat" #: src/fcitx-libpinyin.desc:216 src/fcitx-libpinyin.desc:271 msgid "Sport" msgstr "Esports" #: src/fcitx-libpinyin.desc:221 msgid "Technology" msgstr "Tecnologia" #: src/fcitx-libpinyin.desc:225 src/fcitx-libpinyin.desc:230 #: src/fcitx-libpinyin.desc:235 src/fcitx-libpinyin.desc:240 #: src/fcitx-libpinyin.desc:245 src/fcitx-libpinyin.desc:250 #: src/fcitx-libpinyin.desc:255 src/fcitx-libpinyin.desc:260 #: src/fcitx-libpinyin.desc:265 src/fcitx-libpinyin.desc:270 msgid "Dictionary Zhuyin" msgstr "Diccionari zhuyin" #: src/fcitx-libpinyin.desc:261 msgid "Science & Technology" msgstr "Ciència i tecnologia" fcitx-libpinyin-0.5.3/po/da.po000066400000000000000000000225271315660135300162040ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: msgid "" msgstr "" "Project-Id-Version: fcitx\n" "Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" "POT-Creation-Date: 2017-09-01 16:03-0700\n" "PO-Revision-Date: 2017-09-01 23:05+0000\n" "Last-Translator: csslayer \n" "Language-Team: Danish (http://www.transifex.com/fcitx/fcitx/language/da/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: da\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: dictmanager/browserdialog.cpp:61 msgid "Browse Sogou Cell Dict repository" msgstr "" #: dictmanager/browserdialog.cpp:107 msgid "Wrong Link" msgstr "" #: dictmanager/browserdialog.cpp:108 msgid "No browsing outside pinyin.sogou.com, now redirect to home page." msgstr "" #: dictmanager/dictmanager.cpp:48 msgid "From &File" msgstr "" #: dictmanager/dictmanager.cpp:49 msgid "From &Sogou Cell Dictionary File" msgstr "" #: dictmanager/dictmanager.cpp:50 msgid "&Browse Sogou Cell Dictionary Online" msgstr "" #: dictmanager/dictmanager.cpp:57 msgid "&Clear User Data" msgstr "" #: dictmanager/dictmanager.cpp:58 msgid "Clear &All Data" msgstr "" #: dictmanager/dictmanager.cpp:65 msgid "&Import" msgstr "" #: dictmanager/dictmanager.cpp:66 msgid "&Remove" msgstr "" #: dictmanager/dictmanager.cpp:67 msgid "Remove &All" msgstr "" #: dictmanager/dictmanager.cpp:68 msgid "&Clear Dict" msgstr "" #: dictmanager/dictmanager.cpp:113 msgid "Manage Pinyin Dictionary" msgstr "" #: dictmanager/dictmanager.cpp:133 msgid "Select Dictionary File" msgstr "" #: dictmanager/dictmanager.cpp:146 dictmanager/dictmanager.cpp:183 msgid "Input Dictionary Name" msgstr "" #: dictmanager/dictmanager.cpp:146 dictmanager/dictmanager.cpp:183 msgid "New Dictionary Name:" msgstr "" #: dictmanager/dictmanager.cpp:155 msgid "Copy file failed" msgstr "" #: dictmanager/dictmanager.cpp:155 msgid "" "Copy file failed. Please check you have permission or disk is not full." msgstr "" #: dictmanager/dictmanager.cpp:167 msgid "Select scel file" msgstr "" #: dictmanager/dictmanager.cpp:169 msgid "Scel file (*.scel)" msgstr "" #: dictmanager/dictmanager.cpp:230 msgid "Confirm deletion" msgstr "" #: dictmanager/dictmanager.cpp:231 #, kde-format msgid "Are you sure to delete %1?" msgstr "" #: dictmanager/dictmanager.cpp:238 msgid "File Operation Failed" msgstr "" #: dictmanager/dictmanager.cpp:239 #, kde-format msgid "Error while deleting %1." msgstr "" #: dictmanager/erroroverlay.cpp:41 msgid "Cannot connect to Fcitx by DBus, is Fcitx running?" msgstr "" #: dictmanager/filedownloader.cpp:40 dictmanager/scelconverter.cpp:43 msgid "Create temporary file failed." msgstr "" #: dictmanager/filedownloader.cpp:44 dictmanager/scelconverter.cpp:47 msgid "Temporary file created." msgstr "" #: dictmanager/filedownloader.cpp:52 msgid "Failed to create request." msgstr "" #: dictmanager/filedownloader.cpp:56 msgid "Download started." msgstr "" #: dictmanager/filedownloader.cpp:84 #, kde-format msgid "%1% Downloaded." msgstr "" #: dictmanager/filedownloader.cpp:93 msgid "Download Finished" msgstr "" #: dictmanager/scelconverter.cpp:72 msgid "Converter crashed." msgstr "" #: dictmanager/scelconverter.cpp:78 msgid "Convert failed." msgstr "" #: dictmanager/scelconverter.cpp:90 msgid "Rename failed." msgstr "" #: src/eim.cpp:837 src/pinyin-libpinyin.conf.in:3 msgid "Pinyin (LibPinyin)" msgstr "" #: src/eim.cpp:854 src/shuangpin-libpinyin.conf.in:3 msgid "Shuangpin (LibPinyin)" msgstr "" #: src/eim.cpp:871 src/zhuyin-libpinyin.conf.in:3 msgid "Bopomofo (LibPinyin)" msgstr "" #: src/fcitx-libpinyin.conf.in:3 msgid "LibPinyin" msgstr "" #: src/fcitx-libpinyin.conf.in:4 msgid "LibPinyin Wrapper For Fcitx" msgstr "" #: src/fcitx-libpinyin.conf.in:10 src/fcitx-libpinyin.desc:165 #: src/fcitx-libpinyin.desc:170 src/fcitx-libpinyin.desc:175 #: src/fcitx-libpinyin.desc:180 src/fcitx-libpinyin.desc:185 #: src/fcitx-libpinyin.desc:190 src/fcitx-libpinyin.desc:195 #: src/fcitx-libpinyin.desc:200 src/fcitx-libpinyin.desc:205 #: src/fcitx-libpinyin.desc:210 src/fcitx-libpinyin.desc:215 #: src/fcitx-libpinyin.desc:220 msgid "Dictionary" msgstr "" #: src/fcitx-libpinyin.desc:1 src/fcitx-libpinyin.desc:6 msgid "Pinyin" msgstr "" #: src/fcitx-libpinyin.desc:2 msgid "Use Incomplete pinyin" msgstr "" #: src/fcitx-libpinyin.desc:7 msgid "Use Traditional Chinese Data for Pinyin and Shuangpin (Need Restart)" msgstr "" #: src/fcitx-libpinyin.desc:11 src/fcitx-libpinyin.desc:16 #: src/fcitx-libpinyin.desc:21 src/fcitx-libpinyin.desc:31 #: src/fcitx-libpinyin.desc:40 src/fcitx-libpinyin.desc:45 #: src/fcitx-libpinyin.desc:50 msgid "Zhuyin" msgstr "" #: src/fcitx-libpinyin.desc:12 msgid "Use Tone" msgstr "" #: src/fcitx-libpinyin.desc:17 msgid "Use Incomplete Zhuyin" msgstr "" #: src/fcitx-libpinyin.desc:22 msgid "Zhuyin Layout" msgstr "" #: src/fcitx-libpinyin.desc:24 msgid "Standard" msgstr "" #: src/fcitx-libpinyin.desc:25 msgid "IBM" msgstr "" #: src/fcitx-libpinyin.desc:26 msgid "GinYieh" msgstr "" #: src/fcitx-libpinyin.desc:27 msgid "ET" msgstr "" #: src/fcitx-libpinyin.desc:32 msgid "Zhuyin candidate choosing modifiers" msgstr "" #: src/fcitx-libpinyin.desc:34 msgid "Ctrl" msgstr "" #: src/fcitx-libpinyin.desc:35 msgid "Alt" msgstr "" #: src/fcitx-libpinyin.desc:36 msgid "Shift" msgstr "" #: src/fcitx-libpinyin.desc:41 msgid "Zhuyin Prev Page" msgstr "" #: src/fcitx-libpinyin.desc:46 msgid "Zhuyin Next Page" msgstr "" #: src/fcitx-libpinyin.desc:51 msgid "Use Simplified Chinese Data for Zhuyin (Need Restart)" msgstr "" #: src/fcitx-libpinyin.desc:55 msgid "Shuangpin" msgstr "" #: src/fcitx-libpinyin.desc:56 msgid "Shuangpin Scheme" msgstr "" #: src/fcitx-libpinyin.desc:58 msgid "Ziranma" msgstr "" #: src/fcitx-libpinyin.desc:59 msgid "Microsoft" msgstr "" #: src/fcitx-libpinyin.desc:60 msgid "ZiGuang" msgstr "" #: src/fcitx-libpinyin.desc:61 msgid "ABC" msgstr "" #: src/fcitx-libpinyin.desc:62 msgid "PinyinJiaJia" msgstr "" #: src/fcitx-libpinyin.desc:63 msgid "XiaoHe" msgstr "" #: src/fcitx-libpinyin.desc:67 src/fcitx-libpinyin.desc:72 #: src/fcitx-libpinyin.desc:77 src/fcitx-libpinyin.desc:82 #: src/fcitx-libpinyin.desc:87 src/fcitx-libpinyin.desc:92 #: src/fcitx-libpinyin.desc:97 src/fcitx-libpinyin.desc:102 msgid "Correction" msgstr "" #: src/fcitx-libpinyin.desc:68 msgid "V -> U" msgstr "" #: src/fcitx-libpinyin.desc:73 msgid "GN -> NG" msgstr "" #: src/fcitx-libpinyin.desc:78 msgid "MG -> NG" msgstr "" #: src/fcitx-libpinyin.desc:83 msgid "IOU -> IU" msgstr "" #: src/fcitx-libpinyin.desc:88 msgid "UEI -> UI" msgstr "" #: src/fcitx-libpinyin.desc:93 msgid "UEN -> UN" msgstr "" #: src/fcitx-libpinyin.desc:98 msgid "UE -> VE" msgstr "" #: src/fcitx-libpinyin.desc:103 msgid "ON -> ONG" msgstr "" #: src/fcitx-libpinyin.desc:107 src/fcitx-libpinyin.desc:115 #: src/fcitx-libpinyin.desc:120 src/fcitx-libpinyin.desc:125 #: src/fcitx-libpinyin.desc:130 src/fcitx-libpinyin.desc:135 #: src/fcitx-libpinyin.desc:140 src/fcitx-libpinyin.desc:145 #: src/fcitx-libpinyin.desc:150 src/fcitx-libpinyin.desc:155 #: src/fcitx-libpinyin.desc:160 msgid "Ambiguity" msgstr "" #: src/fcitx-libpinyin.desc:108 msgid "Sort method" msgstr "" #: src/fcitx-libpinyin.desc:111 msgid "By Phrase Length and Frequency" msgstr "" #: src/fcitx-libpinyin.desc:112 msgid "By Phrase Length and Pinyin Length and Frequency" msgstr "" #: src/fcitx-libpinyin.desc:116 msgid "Ci <-> Chi" msgstr "" #: src/fcitx-libpinyin.desc:121 msgid "Zi <-> Zhi" msgstr "" #: src/fcitx-libpinyin.desc:126 msgid "Si <-> Shi" msgstr "" #: src/fcitx-libpinyin.desc:131 msgid "Ne <-> Le" msgstr "" #: src/fcitx-libpinyin.desc:136 msgid "Fo <-> He" msgstr "" #: src/fcitx-libpinyin.desc:141 msgid "Le <-> Ri" msgstr "" #: src/fcitx-libpinyin.desc:146 msgid "Ge <-> Ke" msgstr "" #: src/fcitx-libpinyin.desc:151 msgid "An <-> Ang" msgstr "" #: src/fcitx-libpinyin.desc:156 msgid "En <-> Eng" msgstr "" #: src/fcitx-libpinyin.desc:161 msgid "In <-> Ing" msgstr "" #: src/fcitx-libpinyin.desc:166 src/fcitx-libpinyin.desc:226 msgid "Art" msgstr "" #: src/fcitx-libpinyin.desc:171 src/fcitx-libpinyin.desc:231 msgid "Culture" msgstr "" #: src/fcitx-libpinyin.desc:176 src/fcitx-libpinyin.desc:236 msgid "Economy" msgstr "" #: src/fcitx-libpinyin.desc:181 src/fcitx-libpinyin.desc:241 msgid "Geology" msgstr "" #: src/fcitx-libpinyin.desc:186 src/fcitx-libpinyin.desc:246 msgid "History" msgstr "" #: src/fcitx-libpinyin.desc:191 src/fcitx-libpinyin.desc:251 msgid "Life" msgstr "" #: src/fcitx-libpinyin.desc:196 src/fcitx-libpinyin.desc:256 msgid "Nature" msgstr "" #: src/fcitx-libpinyin.desc:201 msgid "People" msgstr "" #: src/fcitx-libpinyin.desc:206 msgid "Science" msgstr "" #: src/fcitx-libpinyin.desc:211 src/fcitx-libpinyin.desc:266 msgid "Society" msgstr "" #: src/fcitx-libpinyin.desc:216 src/fcitx-libpinyin.desc:271 msgid "Sport" msgstr "" #: src/fcitx-libpinyin.desc:221 msgid "Technology" msgstr "" #: src/fcitx-libpinyin.desc:225 src/fcitx-libpinyin.desc:230 #: src/fcitx-libpinyin.desc:235 src/fcitx-libpinyin.desc:240 #: src/fcitx-libpinyin.desc:245 src/fcitx-libpinyin.desc:250 #: src/fcitx-libpinyin.desc:255 src/fcitx-libpinyin.desc:260 #: src/fcitx-libpinyin.desc:265 src/fcitx-libpinyin.desc:270 msgid "Dictionary Zhuyin" msgstr "" #: src/fcitx-libpinyin.desc:261 msgid "Science & Technology" msgstr "" fcitx-libpinyin-0.5.3/po/de.po000066400000000000000000000266121315660135300162070ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # mar well , 2013 # mar well , 2017 msgid "" msgstr "" "Project-Id-Version: fcitx\n" "Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" "POT-Creation-Date: 2017-09-01 16:03-0700\n" "PO-Revision-Date: 2017-08-03 16:58+0000\n" "Last-Translator: mar well \n" "Language-Team: German (http://www.transifex.com/fcitx/fcitx/language/de/)\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" #: dictmanager/filedownloader.cpp:84 #, kde-format msgid "%1% Downloaded." msgstr "%1% heruntergeladen." #: dictmanager/dictmanager.cpp:50 msgid "&Browse Sogou Cell Dictionary Online" msgstr "&Sogou Wörterbuchverzeichnis für Mobiles online durchsuchen" #: dictmanager/dictmanager.cpp:68 msgid "&Clear Dict" msgstr "&Wörterbuch leeren" #: dictmanager/dictmanager.cpp:57 msgid "&Clear User Data" msgstr "&Benutzerdaten löschen" #: dictmanager/dictmanager.cpp:65 msgid "&Import" msgstr "&Importieren" #: dictmanager/dictmanager.cpp:66 msgid "&Remove" msgstr "&Entfernen" #: src/fcitx-libpinyin.desc:61 msgid "ABC" msgstr "ABC" #: src/fcitx-libpinyin.desc:35 msgid "Alt" msgstr "Alt" #: src/fcitx-libpinyin.desc:107 src/fcitx-libpinyin.desc:115 #: src/fcitx-libpinyin.desc:120 src/fcitx-libpinyin.desc:125 #: src/fcitx-libpinyin.desc:130 src/fcitx-libpinyin.desc:135 #: src/fcitx-libpinyin.desc:140 src/fcitx-libpinyin.desc:145 #: src/fcitx-libpinyin.desc:150 src/fcitx-libpinyin.desc:155 #: src/fcitx-libpinyin.desc:160 msgid "Ambiguity" msgstr "Mehrdeutigkeit" #: src/fcitx-libpinyin.desc:151 msgid "An <-> Ang" msgstr "An <-> Ang" #: dictmanager/dictmanager.cpp:231 #, kde-format msgid "Are you sure to delete %1?" msgstr "Wollen Sie wirklich %1 löschen?" #: src/fcitx-libpinyin.desc:166 src/fcitx-libpinyin.desc:226 msgid "Art" msgstr "Kunst" #: src/eim.cpp:871 src/zhuyin-libpinyin.conf.in:3 msgid "Bopomofo (LibPinyin)" msgstr "Bopomofo (LibPinyin)" #: dictmanager/browserdialog.cpp:61 msgid "Browse Sogou Cell Dict repository" msgstr "Sogou Wörterbuchverzeichnis für Mobiles durchsuchen" #: src/fcitx-libpinyin.desc:111 msgid "By Phrase Length and Frequency" msgstr "" #: src/fcitx-libpinyin.desc:112 msgid "By Phrase Length and Pinyin Length and Frequency" msgstr "" #: dictmanager/erroroverlay.cpp:41 msgid "Cannot connect to Fcitx by DBus, is Fcitx running?" msgstr "" "Die Verbindung zu fcitx kann von DBus nicht hergestellt werden, läuft fcitx?" #: src/fcitx-libpinyin.desc:116 msgid "Ci <-> Chi" msgstr "Ci <-> Chi" #: dictmanager/dictmanager.cpp:58 msgid "Clear &All Data" msgstr "löschen &Alle Daten" #: dictmanager/dictmanager.cpp:230 msgid "Confirm deletion" msgstr "Löschen bestätigen" #: dictmanager/scelconverter.cpp:78 msgid "Convert failed." msgstr "Konvertierung fehlgeschlagen." #: dictmanager/scelconverter.cpp:72 msgid "Converter crashed." msgstr "Konverter abgestürzt." #: dictmanager/dictmanager.cpp:155 msgid "Copy file failed" msgstr "Kopieren der Datei fehlgeschlagen" #: dictmanager/dictmanager.cpp:155 msgid "Copy file failed. Please check you have permission or disk is not full." msgstr "" "Kopieren der Datei fehlgeschlagen. Bitte überprüfen Sie die " "Dateiberechtigungen oder ob die Festplatte voll ist." #: src/fcitx-libpinyin.desc:67 src/fcitx-libpinyin.desc:72 #: src/fcitx-libpinyin.desc:77 src/fcitx-libpinyin.desc:82 #: src/fcitx-libpinyin.desc:87 src/fcitx-libpinyin.desc:92 #: src/fcitx-libpinyin.desc:97 src/fcitx-libpinyin.desc:102 msgid "Correction" msgstr "Korrektur" #: dictmanager/filedownloader.cpp:40 dictmanager/scelconverter.cpp:43 msgid "Create temporary file failed." msgstr "Erstellen des temporären Verzeichnisses fehlgeschlagen" #: src/fcitx-libpinyin.desc:34 msgid "Ctrl" msgstr "Ctrl" #: src/fcitx-libpinyin.desc:171 src/fcitx-libpinyin.desc:231 msgid "Culture" msgstr "Kultur" #: src/fcitx-libpinyin.conf.in:10 src/fcitx-libpinyin.desc:165 #: src/fcitx-libpinyin.desc:170 src/fcitx-libpinyin.desc:175 #: src/fcitx-libpinyin.desc:180 src/fcitx-libpinyin.desc:185 #: src/fcitx-libpinyin.desc:190 src/fcitx-libpinyin.desc:195 #: src/fcitx-libpinyin.desc:200 src/fcitx-libpinyin.desc:205 #: src/fcitx-libpinyin.desc:210 src/fcitx-libpinyin.desc:215 #: src/fcitx-libpinyin.desc:220 msgid "Dictionary" msgstr "Wörterbuch" #: src/fcitx-libpinyin.desc:225 src/fcitx-libpinyin.desc:230 #: src/fcitx-libpinyin.desc:235 src/fcitx-libpinyin.desc:240 #: src/fcitx-libpinyin.desc:245 src/fcitx-libpinyin.desc:250 #: src/fcitx-libpinyin.desc:255 src/fcitx-libpinyin.desc:260 #: src/fcitx-libpinyin.desc:265 src/fcitx-libpinyin.desc:270 msgid "Dictionary Zhuyin" msgstr "Zhuyin Wörterbuch" #: dictmanager/filedownloader.cpp:93 msgid "Download Finished" msgstr "Herunterladen abgeschlossen" #: dictmanager/filedownloader.cpp:56 msgid "Download started." msgstr "Herunterladen gestarted." #: src/fcitx-libpinyin.desc:27 msgid "ET" msgstr "ET" #: src/fcitx-libpinyin.desc:176 src/fcitx-libpinyin.desc:236 msgid "Economy" msgstr "Ökonomie" #: src/fcitx-libpinyin.desc:156 msgid "En <-> Eng" msgstr "En <-> Eng" #: dictmanager/dictmanager.cpp:239 #, kde-format msgid "Error while deleting %1." msgstr "Fehler beim Löschen von %1" #: dictmanager/filedownloader.cpp:52 msgid "Failed to create request." msgstr "Anforderung fehlgeschlagen." #: dictmanager/dictmanager.cpp:238 msgid "File Operation Failed" msgstr "Dateioperation fehlgeschlagen" #: src/fcitx-libpinyin.desc:136 msgid "Fo <-> He" msgstr "Fo <-> He" #: dictmanager/dictmanager.cpp:48 msgid "From &File" msgstr "Von &Datei" #: dictmanager/dictmanager.cpp:49 msgid "From &Sogou Cell Dictionary File" msgstr "Von der &Sogou Wörterbuchdatei für Mobiles" #: src/fcitx-libpinyin.desc:73 msgid "GN -> NG" msgstr "GN -> NG" #: src/fcitx-libpinyin.desc:146 msgid "Ge <-> Ke" msgstr "Ge <-> Ke" #: src/fcitx-libpinyin.desc:181 src/fcitx-libpinyin.desc:241 msgid "Geology" msgstr "Geologie" #: src/fcitx-libpinyin.desc:26 msgid "GinYieh" msgstr "GinYieh" #: src/fcitx-libpinyin.desc:186 src/fcitx-libpinyin.desc:246 msgid "History" msgstr "Geschichte" #: src/fcitx-libpinyin.desc:25 msgid "IBM" msgstr "IBM" #: src/fcitx-libpinyin.desc:83 msgid "IOU -> IU" msgstr "IOU -> IU" #: src/fcitx-libpinyin.desc:161 msgid "In <-> Ing" msgstr "In <-> Ing" #: dictmanager/dictmanager.cpp:146 dictmanager/dictmanager.cpp:183 msgid "Input Dictionary Name" msgstr "Wörterbuchnamen eingeben" #: src/fcitx-libpinyin.desc:141 msgid "Le <-> Ri" msgstr "Le <-> Ri" #: src/fcitx-libpinyin.conf.in:3 msgid "LibPinyin" msgstr "LibPinyin" #: src/fcitx-libpinyin.conf.in:4 msgid "LibPinyin Wrapper For Fcitx" msgstr "LibPinyin Wrapper für Fcitx" #: src/fcitx-libpinyin.desc:191 src/fcitx-libpinyin.desc:251 msgid "Life" msgstr "Life" #: src/fcitx-libpinyin.desc:78 msgid "MG -> NG" msgstr "MG -> NG" #: dictmanager/dictmanager.cpp:113 msgid "Manage Pinyin Dictionary" msgstr "Pinyin Wörterbuch verwalten" #: src/fcitx-libpinyin.desc:59 msgid "Microsoft" msgstr "Microsoft" #: src/fcitx-libpinyin.desc:196 src/fcitx-libpinyin.desc:256 msgid "Nature" msgstr "Natur" #: src/fcitx-libpinyin.desc:131 msgid "Ne <-> Le" msgstr "Ne <-> Le" #: dictmanager/dictmanager.cpp:146 dictmanager/dictmanager.cpp:183 msgid "New Dictionary Name:" msgstr "Neuer Wörterbuchname:" #: dictmanager/browserdialog.cpp:108 msgid "No browsing outside pinyin.sogou.com, now redirect to home page." msgstr "" "Browsen außerhalb von pinyin.sogou.com nicht möglich. Sie werden zur " "Homepage umgeleitet." #: src/fcitx-libpinyin.desc:103 msgid "ON -> ONG" msgstr "ON -> ONG" #: src/fcitx-libpinyin.desc:201 msgid "People" msgstr "Leute" #: src/fcitx-libpinyin.desc:1 src/fcitx-libpinyin.desc:6 msgid "Pinyin" msgstr "Pinyin" #: src/eim.cpp:837 src/pinyin-libpinyin.conf.in:3 msgid "Pinyin (LibPinyin)" msgstr "Pinyin (LibPinyin)" #: src/fcitx-libpinyin.desc:62 msgid "PinyinJiaJia" msgstr "PinyinJiaJia" #: dictmanager/dictmanager.cpp:67 msgid "Remove &All" msgstr "Entferne &Alle" #: dictmanager/scelconverter.cpp:90 msgid "Rename failed." msgstr "Umbennen fehlgeschlagen." #: dictmanager/dictmanager.cpp:169 msgid "Scel file (*.scel)" msgstr "scel-Datei (*.scel)" #: src/fcitx-libpinyin.desc:206 msgid "Science" msgstr "Wissenschaft" #: src/fcitx-libpinyin.desc:261 msgid "Science & Technology" msgstr "Wissenschaft und Technik" #: dictmanager/dictmanager.cpp:133 msgid "Select Dictionary File" msgstr "Wörterbuchdatei auswählen" #: dictmanager/dictmanager.cpp:167 msgid "Select scel file" msgstr "scel-Datei auswählen" #: src/fcitx-libpinyin.desc:36 msgid "Shift" msgstr "Shift" #: src/fcitx-libpinyin.desc:55 msgid "Shuangpin" msgstr "Shuangpin" #: src/eim.cpp:854 src/shuangpin-libpinyin.conf.in:3 msgid "Shuangpin (LibPinyin)" msgstr "Shuangpin (LibPinyin)" #: src/fcitx-libpinyin.desc:56 msgid "Shuangpin Scheme" msgstr "Shuangpin Schema" #: src/fcitx-libpinyin.desc:126 msgid "Si <-> Shi" msgstr "Si <-> Shi" #: src/fcitx-libpinyin.desc:211 src/fcitx-libpinyin.desc:266 msgid "Society" msgstr "Gesellschaft" #: src/fcitx-libpinyin.desc:108 msgid "Sort method" msgstr "" #: src/fcitx-libpinyin.desc:216 src/fcitx-libpinyin.desc:271 msgid "Sport" msgstr "Sport" #: src/fcitx-libpinyin.desc:24 msgid "Standard" msgstr "Standard" #: src/fcitx-libpinyin.desc:221 msgid "Technology" msgstr "Technologie" #: dictmanager/filedownloader.cpp:44 dictmanager/scelconverter.cpp:47 msgid "Temporary file created." msgstr "Temporäre Datei erstellt." #: src/fcitx-libpinyin.desc:98 msgid "UE -> VE" msgstr "UE -> VE" #: src/fcitx-libpinyin.desc:88 msgid "UEI -> UI" msgstr "UEI -> UI" #: src/fcitx-libpinyin.desc:93 msgid "UEN -> UN" msgstr "UEN -> UN" #: src/fcitx-libpinyin.desc:17 msgid "Use Incomplete Zhuyin" msgstr "Unvollständiges Zhuyin zulassen" #: src/fcitx-libpinyin.desc:2 msgid "Use Incomplete pinyin" msgstr "Unvollständiges Pinyin eingeben erlauben" #: src/fcitx-libpinyin.desc:51 msgid "Use Simplified Chinese Data for Zhuyin (Need Restart)" msgstr "" "Vereinfachtes Chinesisch für Zhuyin benutzen (Erfordert Neustart von Fcitx)" #: src/fcitx-libpinyin.desc:12 msgid "Use Tone" msgstr "Töne benutzen" #: src/fcitx-libpinyin.desc:7 msgid "Use Traditional Chinese Data for Pinyin and Shuangpin (Need Restart)" msgstr "" "Traditionelles Chinesisch für Pinyin und Shuangpin benutzen (Erfordert " "Neustart von Fcitx)" #: src/fcitx-libpinyin.desc:68 msgid "V -> U" msgstr "V -> U" #: dictmanager/browserdialog.cpp:107 msgid "Wrong Link" msgstr "Falscher Link" #: src/fcitx-libpinyin.desc:63 msgid "XiaoHe" msgstr "XiaoHe" #: src/fcitx-libpinyin.desc:11 src/fcitx-libpinyin.desc:16 #: src/fcitx-libpinyin.desc:21 src/fcitx-libpinyin.desc:31 #: src/fcitx-libpinyin.desc:40 src/fcitx-libpinyin.desc:45 #: src/fcitx-libpinyin.desc:50 msgid "Zhuyin" msgstr "Zhuyin" #: src/fcitx-libpinyin.desc:22 msgid "Zhuyin Layout" msgstr "Zhuyin Layout" #: src/fcitx-libpinyin.desc:46 msgid "Zhuyin Next Page" msgstr "Zhuyin nächste Seite" #: src/fcitx-libpinyin.desc:41 msgid "Zhuyin Prev Page" msgstr "Zhuyin vorherige Seite" #: src/fcitx-libpinyin.desc:32 msgid "Zhuyin candidate choosing modifiers" msgstr "Modifikanten für die Auswahl der Zhuyin-Kandidaten" #: src/fcitx-libpinyin.desc:121 msgid "Zi <-> Zhi" msgstr "Zi <-> Zhi" #: src/fcitx-libpinyin.desc:60 msgid "ZiGuang" msgstr "ZiGuang" #: src/fcitx-libpinyin.desc:58 msgid "Ziranma" msgstr "Ziranma" fcitx-libpinyin-0.5.3/po/fcitx-libpinyin.pot000066400000000000000000000224501315660135300211070ustar00rootroot00000000000000# 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: fcitx-dev@googlegroups.com\n" "POT-Creation-Date: 2017-09-01 16:03-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: LANG\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" #: dictmanager/browserdialog.cpp:61 msgid "Browse Sogou Cell Dict repository" msgstr "" #: dictmanager/browserdialog.cpp:107 msgid "Wrong Link" msgstr "" #: dictmanager/browserdialog.cpp:108 msgid "No browsing outside pinyin.sogou.com, now redirect to home page." msgstr "" #: dictmanager/dictmanager.cpp:48 msgid "From &File" msgstr "" #: dictmanager/dictmanager.cpp:49 msgid "From &Sogou Cell Dictionary File" msgstr "" #: dictmanager/dictmanager.cpp:50 msgid "&Browse Sogou Cell Dictionary Online" msgstr "" #: dictmanager/dictmanager.cpp:57 msgid "&Clear User Data" msgstr "" #: dictmanager/dictmanager.cpp:58 msgid "Clear &All Data" msgstr "" #: dictmanager/dictmanager.cpp:65 msgid "&Import" msgstr "" #: dictmanager/dictmanager.cpp:66 msgid "&Remove" msgstr "" #: dictmanager/dictmanager.cpp:67 msgid "Remove &All" msgstr "" #: dictmanager/dictmanager.cpp:68 msgid "&Clear Dict" msgstr "" #: dictmanager/dictmanager.cpp:113 msgid "Manage Pinyin Dictionary" msgstr "" #: dictmanager/dictmanager.cpp:133 msgid "Select Dictionary File" msgstr "" #: dictmanager/dictmanager.cpp:146 dictmanager/dictmanager.cpp:183 msgid "Input Dictionary Name" msgstr "" #: dictmanager/dictmanager.cpp:146 dictmanager/dictmanager.cpp:183 msgid "New Dictionary Name:" msgstr "" #: dictmanager/dictmanager.cpp:155 msgid "Copy file failed" msgstr "" #: dictmanager/dictmanager.cpp:155 msgid "Copy file failed. Please check you have permission or disk is not full." msgstr "" #: dictmanager/dictmanager.cpp:167 msgid "Select scel file" msgstr "" #: dictmanager/dictmanager.cpp:169 msgid "Scel file (*.scel)" msgstr "" #: dictmanager/dictmanager.cpp:230 msgid "Confirm deletion" msgstr "" #: dictmanager/dictmanager.cpp:231 #, kde-format msgid "Are you sure to delete %1?" msgstr "" #: dictmanager/dictmanager.cpp:238 msgid "File Operation Failed" msgstr "" #: dictmanager/dictmanager.cpp:239 #, kde-format msgid "Error while deleting %1." msgstr "" #: dictmanager/erroroverlay.cpp:41 msgid "Cannot connect to Fcitx by DBus, is Fcitx running?" msgstr "" #: dictmanager/filedownloader.cpp:40 dictmanager/scelconverter.cpp:43 msgid "Create temporary file failed." msgstr "" #: dictmanager/filedownloader.cpp:44 dictmanager/scelconverter.cpp:47 msgid "Temporary file created." msgstr "" #: dictmanager/filedownloader.cpp:52 msgid "Failed to create request." msgstr "" #: dictmanager/filedownloader.cpp:56 msgid "Download started." msgstr "" #: dictmanager/filedownloader.cpp:84 #, kde-format msgid "%1% Downloaded." msgstr "" #: dictmanager/filedownloader.cpp:93 msgid "Download Finished" msgstr "" #: dictmanager/scelconverter.cpp:72 msgid "Converter crashed." msgstr "" #: dictmanager/scelconverter.cpp:78 msgid "Convert failed." msgstr "" #: dictmanager/scelconverter.cpp:90 msgid "Rename failed." msgstr "" #: src/eim.cpp:837 src/pinyin-libpinyin.conf.in:3 msgid "Pinyin (LibPinyin)" msgstr "" #: src/eim.cpp:854 src/shuangpin-libpinyin.conf.in:3 msgid "Shuangpin (LibPinyin)" msgstr "" #: src/eim.cpp:871 src/zhuyin-libpinyin.conf.in:3 msgid "Bopomofo (LibPinyin)" msgstr "" #: src/fcitx-libpinyin.conf.in:3 msgid "LibPinyin" msgstr "" #: src/fcitx-libpinyin.conf.in:4 msgid "LibPinyin Wrapper For Fcitx" msgstr "" #: src/fcitx-libpinyin.conf.in:10 src/fcitx-libpinyin.desc:165 #: src/fcitx-libpinyin.desc:170 src/fcitx-libpinyin.desc:175 #: src/fcitx-libpinyin.desc:180 src/fcitx-libpinyin.desc:185 #: src/fcitx-libpinyin.desc:190 src/fcitx-libpinyin.desc:195 #: src/fcitx-libpinyin.desc:200 src/fcitx-libpinyin.desc:205 #: src/fcitx-libpinyin.desc:210 src/fcitx-libpinyin.desc:215 #: src/fcitx-libpinyin.desc:220 msgid "Dictionary" msgstr "" #: src/fcitx-libpinyin.desc:1 src/fcitx-libpinyin.desc:6 msgid "Pinyin" msgstr "" #: src/fcitx-libpinyin.desc:2 msgid "Use Incomplete pinyin" msgstr "" #: src/fcitx-libpinyin.desc:7 msgid "Use Traditional Chinese Data for Pinyin and Shuangpin (Need Restart)" msgstr "" #: src/fcitx-libpinyin.desc:11 src/fcitx-libpinyin.desc:16 #: src/fcitx-libpinyin.desc:21 src/fcitx-libpinyin.desc:31 #: src/fcitx-libpinyin.desc:40 src/fcitx-libpinyin.desc:45 #: src/fcitx-libpinyin.desc:50 msgid "Zhuyin" msgstr "" #: src/fcitx-libpinyin.desc:12 msgid "Use Tone" msgstr "" #: src/fcitx-libpinyin.desc:17 msgid "Use Incomplete Zhuyin" msgstr "" #: src/fcitx-libpinyin.desc:22 msgid "Zhuyin Layout" msgstr "" #: src/fcitx-libpinyin.desc:24 msgid "Standard" msgstr "" #: src/fcitx-libpinyin.desc:25 msgid "IBM" msgstr "" #: src/fcitx-libpinyin.desc:26 msgid "GinYieh" msgstr "" #: src/fcitx-libpinyin.desc:27 msgid "ET" msgstr "" #: src/fcitx-libpinyin.desc:32 msgid "Zhuyin candidate choosing modifiers" msgstr "" #: src/fcitx-libpinyin.desc:34 msgid "Ctrl" msgstr "" #: src/fcitx-libpinyin.desc:35 msgid "Alt" msgstr "" #: src/fcitx-libpinyin.desc:36 msgid "Shift" msgstr "" #: src/fcitx-libpinyin.desc:41 msgid "Zhuyin Prev Page" msgstr "" #: src/fcitx-libpinyin.desc:46 msgid "Zhuyin Next Page" msgstr "" #: src/fcitx-libpinyin.desc:51 msgid "Use Simplified Chinese Data for Zhuyin (Need Restart)" msgstr "" #: src/fcitx-libpinyin.desc:55 msgid "Shuangpin" msgstr "" #: src/fcitx-libpinyin.desc:56 msgid "Shuangpin Scheme" msgstr "" #: src/fcitx-libpinyin.desc:58 msgid "Ziranma" msgstr "" #: src/fcitx-libpinyin.desc:59 msgid "Microsoft" msgstr "" #: src/fcitx-libpinyin.desc:60 msgid "ZiGuang" msgstr "" #: src/fcitx-libpinyin.desc:61 msgid "ABC" msgstr "" #: src/fcitx-libpinyin.desc:62 msgid "PinyinJiaJia" msgstr "" #: src/fcitx-libpinyin.desc:63 msgid "XiaoHe" msgstr "" #: src/fcitx-libpinyin.desc:67 src/fcitx-libpinyin.desc:72 #: src/fcitx-libpinyin.desc:77 src/fcitx-libpinyin.desc:82 #: src/fcitx-libpinyin.desc:87 src/fcitx-libpinyin.desc:92 #: src/fcitx-libpinyin.desc:97 src/fcitx-libpinyin.desc:102 msgid "Correction" msgstr "" #: src/fcitx-libpinyin.desc:68 msgid "V -> U" msgstr "" #: src/fcitx-libpinyin.desc:73 msgid "GN -> NG" msgstr "" #: src/fcitx-libpinyin.desc:78 msgid "MG -> NG" msgstr "" #: src/fcitx-libpinyin.desc:83 msgid "IOU -> IU" msgstr "" #: src/fcitx-libpinyin.desc:88 msgid "UEI -> UI" msgstr "" #: src/fcitx-libpinyin.desc:93 msgid "UEN -> UN" msgstr "" #: src/fcitx-libpinyin.desc:98 msgid "UE -> VE" msgstr "" #: src/fcitx-libpinyin.desc:103 msgid "ON -> ONG" msgstr "" #: src/fcitx-libpinyin.desc:107 src/fcitx-libpinyin.desc:115 #: src/fcitx-libpinyin.desc:120 src/fcitx-libpinyin.desc:125 #: src/fcitx-libpinyin.desc:130 src/fcitx-libpinyin.desc:135 #: src/fcitx-libpinyin.desc:140 src/fcitx-libpinyin.desc:145 #: src/fcitx-libpinyin.desc:150 src/fcitx-libpinyin.desc:155 #: src/fcitx-libpinyin.desc:160 msgid "Ambiguity" msgstr "" #: src/fcitx-libpinyin.desc:108 msgid "Sort method" msgstr "" #: src/fcitx-libpinyin.desc:111 msgid "By Phrase Length and Frequency" msgstr "" #: src/fcitx-libpinyin.desc:112 msgid "By Phrase Length and Pinyin Length and Frequency" msgstr "" #: src/fcitx-libpinyin.desc:116 msgid "Ci <-> Chi" msgstr "" #: src/fcitx-libpinyin.desc:121 msgid "Zi <-> Zhi" msgstr "" #: src/fcitx-libpinyin.desc:126 msgid "Si <-> Shi" msgstr "" #: src/fcitx-libpinyin.desc:131 msgid "Ne <-> Le" msgstr "" #: src/fcitx-libpinyin.desc:136 msgid "Fo <-> He" msgstr "" #: src/fcitx-libpinyin.desc:141 msgid "Le <-> Ri" msgstr "" #: src/fcitx-libpinyin.desc:146 msgid "Ge <-> Ke" msgstr "" #: src/fcitx-libpinyin.desc:151 msgid "An <-> Ang" msgstr "" #: src/fcitx-libpinyin.desc:156 msgid "En <-> Eng" msgstr "" #: src/fcitx-libpinyin.desc:161 msgid "In <-> Ing" msgstr "" #: src/fcitx-libpinyin.desc:166 src/fcitx-libpinyin.desc:226 msgid "Art" msgstr "" #: src/fcitx-libpinyin.desc:171 src/fcitx-libpinyin.desc:231 msgid "Culture" msgstr "" #: src/fcitx-libpinyin.desc:176 src/fcitx-libpinyin.desc:236 msgid "Economy" msgstr "" #: src/fcitx-libpinyin.desc:181 src/fcitx-libpinyin.desc:241 msgid "Geology" msgstr "" #: src/fcitx-libpinyin.desc:186 src/fcitx-libpinyin.desc:246 msgid "History" msgstr "" #: src/fcitx-libpinyin.desc:191 src/fcitx-libpinyin.desc:251 msgid "Life" msgstr "" #: src/fcitx-libpinyin.desc:196 src/fcitx-libpinyin.desc:256 msgid "Nature" msgstr "" #: src/fcitx-libpinyin.desc:201 msgid "People" msgstr "" #: src/fcitx-libpinyin.desc:206 msgid "Science" msgstr "" #: src/fcitx-libpinyin.desc:211 src/fcitx-libpinyin.desc:266 msgid "Society" msgstr "" #: src/fcitx-libpinyin.desc:216 src/fcitx-libpinyin.desc:271 msgid "Sport" msgstr "" #: src/fcitx-libpinyin.desc:221 msgid "Technology" msgstr "" #: src/fcitx-libpinyin.desc:225 src/fcitx-libpinyin.desc:230 #: src/fcitx-libpinyin.desc:235 src/fcitx-libpinyin.desc:240 #: src/fcitx-libpinyin.desc:245 src/fcitx-libpinyin.desc:250 #: src/fcitx-libpinyin.desc:255 src/fcitx-libpinyin.desc:260 #: src/fcitx-libpinyin.desc:265 src/fcitx-libpinyin.desc:270 msgid "Dictionary Zhuyin" msgstr "" #: src/fcitx-libpinyin.desc:261 msgid "Science & Technology" msgstr "" fcitx-libpinyin-0.5.3/po/ja.po000066400000000000000000000263401315660135300162070ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # shirou - しろう , 2013 # shirou - しろう , 2013 msgid "" msgstr "" "Project-Id-Version: fcitx\n" "Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" "POT-Creation-Date: 2017-09-01 16:03-0700\n" "PO-Revision-Date: 2017-08-03 16:58+0000\n" "Last-Translator: csslayer \n" "Language-Team: Japanese (http://www.transifex.com/fcitx/fcitx/language/ja/)\n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #: dictmanager/filedownloader.cpp:84 #, kde-format msgid "%1% Downloaded." msgstr "%1%ダウンロード済み。" #: dictmanager/dictmanager.cpp:50 msgid "&Browse Sogou Cell Dictionary Online" msgstr "" #: dictmanager/dictmanager.cpp:68 msgid "&Clear Dict" msgstr "" #: dictmanager/dictmanager.cpp:57 msgid "&Clear User Data" msgstr "ユーザーデータを消去 (&C)" #: dictmanager/dictmanager.cpp:65 msgid "&Import" msgstr "インポート (&I)" #: dictmanager/dictmanager.cpp:66 msgid "&Remove" msgstr "" #: src/fcitx-libpinyin.desc:61 msgid "ABC" msgstr "ABC" #: src/fcitx-libpinyin.desc:35 msgid "Alt" msgstr "Alt" #: src/fcitx-libpinyin.desc:107 src/fcitx-libpinyin.desc:115 #: src/fcitx-libpinyin.desc:120 src/fcitx-libpinyin.desc:125 #: src/fcitx-libpinyin.desc:130 src/fcitx-libpinyin.desc:135 #: src/fcitx-libpinyin.desc:140 src/fcitx-libpinyin.desc:145 #: src/fcitx-libpinyin.desc:150 src/fcitx-libpinyin.desc:155 #: src/fcitx-libpinyin.desc:160 msgid "Ambiguity" msgstr "曖昧さ" #: src/fcitx-libpinyin.desc:151 msgid "An <-> Ang" msgstr "An <-> Ang" #: dictmanager/dictmanager.cpp:231 #, kde-format msgid "Are you sure to delete %1?" msgstr "本当に %1 を削除しますか?" #: src/fcitx-libpinyin.desc:166 src/fcitx-libpinyin.desc:226 msgid "Art" msgstr "芸術" #: src/eim.cpp:871 src/zhuyin-libpinyin.conf.in:3 msgid "Bopomofo (LibPinyin)" msgstr "Bopomofo (LibPinyin)" #: dictmanager/browserdialog.cpp:61 msgid "Browse Sogou Cell Dict repository" msgstr "" #: src/fcitx-libpinyin.desc:111 msgid "By Phrase Length and Frequency" msgstr "" #: src/fcitx-libpinyin.desc:112 msgid "By Phrase Length and Pinyin Length and Frequency" msgstr "" #: dictmanager/erroroverlay.cpp:41 msgid "Cannot connect to Fcitx by DBus, is Fcitx running?" msgstr "FcitxにDBusでつなげません。Fcitxは動作していますか?" #: src/fcitx-libpinyin.desc:116 msgid "Ci <-> Chi" msgstr "Ci <-> Chi" #: dictmanager/dictmanager.cpp:58 msgid "Clear &All Data" msgstr "" #: dictmanager/dictmanager.cpp:230 msgid "Confirm deletion" msgstr "削除の確認" #: dictmanager/scelconverter.cpp:78 msgid "Convert failed." msgstr "コンバートに失敗しました。" #: dictmanager/scelconverter.cpp:72 msgid "Converter crashed." msgstr "コンバーターがクラッシュしました。" #: dictmanager/dictmanager.cpp:155 msgid "Copy file failed" msgstr "ファイルコピー失敗" #: dictmanager/dictmanager.cpp:155 msgid "Copy file failed. Please check you have permission or disk is not full." msgstr "" "ファイルのコピーに失敗しました。権限やディスクがいっぱいでないかなどを確認し" "てください。" #: src/fcitx-libpinyin.desc:67 src/fcitx-libpinyin.desc:72 #: src/fcitx-libpinyin.desc:77 src/fcitx-libpinyin.desc:82 #: src/fcitx-libpinyin.desc:87 src/fcitx-libpinyin.desc:92 #: src/fcitx-libpinyin.desc:97 src/fcitx-libpinyin.desc:102 msgid "Correction" msgstr "修正" #: dictmanager/filedownloader.cpp:40 dictmanager/scelconverter.cpp:43 msgid "Create temporary file failed." msgstr "一時ファイルの作成に失敗しました。" #: src/fcitx-libpinyin.desc:34 msgid "Ctrl" msgstr "Ctrl" #: src/fcitx-libpinyin.desc:171 src/fcitx-libpinyin.desc:231 msgid "Culture" msgstr "文化" #: src/fcitx-libpinyin.conf.in:10 src/fcitx-libpinyin.desc:165 #: src/fcitx-libpinyin.desc:170 src/fcitx-libpinyin.desc:175 #: src/fcitx-libpinyin.desc:180 src/fcitx-libpinyin.desc:185 #: src/fcitx-libpinyin.desc:190 src/fcitx-libpinyin.desc:195 #: src/fcitx-libpinyin.desc:200 src/fcitx-libpinyin.desc:205 #: src/fcitx-libpinyin.desc:210 src/fcitx-libpinyin.desc:215 #: src/fcitx-libpinyin.desc:220 msgid "Dictionary" msgstr "辞書" #: src/fcitx-libpinyin.desc:225 src/fcitx-libpinyin.desc:230 #: src/fcitx-libpinyin.desc:235 src/fcitx-libpinyin.desc:240 #: src/fcitx-libpinyin.desc:245 src/fcitx-libpinyin.desc:250 #: src/fcitx-libpinyin.desc:255 src/fcitx-libpinyin.desc:260 #: src/fcitx-libpinyin.desc:265 src/fcitx-libpinyin.desc:270 msgid "Dictionary Zhuyin" msgstr "" #: dictmanager/filedownloader.cpp:93 msgid "Download Finished" msgstr "ダウンロード完了" #: dictmanager/filedownloader.cpp:56 msgid "Download started." msgstr "ダウンロードを開始しました。" #: src/fcitx-libpinyin.desc:27 msgid "ET" msgstr "ET" #: src/fcitx-libpinyin.desc:176 src/fcitx-libpinyin.desc:236 msgid "Economy" msgstr "経済" #: src/fcitx-libpinyin.desc:156 msgid "En <-> Eng" msgstr "En <-> Eng" #: dictmanager/dictmanager.cpp:239 #, kde-format msgid "Error while deleting %1." msgstr "%1 を削除中にエラーが起きました。" #: dictmanager/filedownloader.cpp:52 msgid "Failed to create request." msgstr "リクエストの作成に失敗しました。" #: dictmanager/dictmanager.cpp:238 msgid "File Operation Failed" msgstr "ファイル処理に失敗しました" #: src/fcitx-libpinyin.desc:136 msgid "Fo <-> He" msgstr "Fo <-> He" #: dictmanager/dictmanager.cpp:48 msgid "From &File" msgstr "" #: dictmanager/dictmanager.cpp:49 msgid "From &Sogou Cell Dictionary File" msgstr "" #: src/fcitx-libpinyin.desc:73 msgid "GN -> NG" msgstr "GN -> NG" #: src/fcitx-libpinyin.desc:146 msgid "Ge <-> Ke" msgstr "Ge <-> Ke" #: src/fcitx-libpinyin.desc:181 src/fcitx-libpinyin.desc:241 msgid "Geology" msgstr "地理" #: src/fcitx-libpinyin.desc:26 msgid "GinYieh" msgstr "GinYieh" #: src/fcitx-libpinyin.desc:186 src/fcitx-libpinyin.desc:246 msgid "History" msgstr "歴史" #: src/fcitx-libpinyin.desc:25 msgid "IBM" msgstr "IBM" #: src/fcitx-libpinyin.desc:83 msgid "IOU -> IU" msgstr "IOU -> IU" #: src/fcitx-libpinyin.desc:161 msgid "In <-> Ing" msgstr "In <-> Ing" #: dictmanager/dictmanager.cpp:146 dictmanager/dictmanager.cpp:183 msgid "Input Dictionary Name" msgstr "辞書名を入力してください" #: src/fcitx-libpinyin.desc:141 msgid "Le <-> Ri" msgstr "Le <-> Ri" #: src/fcitx-libpinyin.conf.in:3 msgid "LibPinyin" msgstr "LibPinyin" #: src/fcitx-libpinyin.conf.in:4 msgid "LibPinyin Wrapper For Fcitx" msgstr "Fcitx 用 LibPinyin ラッパー" #: src/fcitx-libpinyin.desc:191 src/fcitx-libpinyin.desc:251 msgid "Life" msgstr "生活" #: src/fcitx-libpinyin.desc:78 msgid "MG -> NG" msgstr "MG -> NG" #: dictmanager/dictmanager.cpp:113 msgid "Manage Pinyin Dictionary" msgstr "Pinyinディレクトリの管理" #: src/fcitx-libpinyin.desc:59 msgid "Microsoft" msgstr "Microsoft" #: src/fcitx-libpinyin.desc:196 src/fcitx-libpinyin.desc:256 msgid "Nature" msgstr "自然" #: src/fcitx-libpinyin.desc:131 msgid "Ne <-> Le" msgstr "Ne <-> Le" #: dictmanager/dictmanager.cpp:146 dictmanager/dictmanager.cpp:183 msgid "New Dictionary Name:" msgstr "新しい辞書名:" #: dictmanager/browserdialog.cpp:108 msgid "No browsing outside pinyin.sogou.com, now redirect to home page." msgstr "" "pinyin.sogou.com 以外は表示できません。ホームページにリダイレクトします。" #: src/fcitx-libpinyin.desc:103 msgid "ON -> ONG" msgstr "ON -> ONG" #: src/fcitx-libpinyin.desc:201 msgid "People" msgstr "" #: src/fcitx-libpinyin.desc:1 src/fcitx-libpinyin.desc:6 msgid "Pinyin" msgstr "Pinyin" #: src/eim.cpp:837 src/pinyin-libpinyin.conf.in:3 msgid "Pinyin (LibPinyin)" msgstr "Pinyin (LibPinyin)" #: src/fcitx-libpinyin.desc:62 msgid "PinyinJiaJia" msgstr "PinyinJiaJia" #: dictmanager/dictmanager.cpp:67 msgid "Remove &All" msgstr "" #: dictmanager/scelconverter.cpp:90 msgid "Rename failed." msgstr "名前の変更に失敗しました。" #: dictmanager/dictmanager.cpp:169 msgid "Scel file (*.scel)" msgstr "Scel ファイル (*.scel)" #: src/fcitx-libpinyin.desc:206 msgid "Science" msgstr "" #: src/fcitx-libpinyin.desc:261 msgid "Science & Technology" msgstr "科学技術" #: dictmanager/dictmanager.cpp:133 msgid "Select Dictionary File" msgstr "辞書ファイルの選択" #: dictmanager/dictmanager.cpp:167 msgid "Select scel file" msgstr "" #: src/fcitx-libpinyin.desc:36 msgid "Shift" msgstr "Shift" #: src/fcitx-libpinyin.desc:55 msgid "Shuangpin" msgstr "Shuangpin" #: src/eim.cpp:854 src/shuangpin-libpinyin.conf.in:3 msgid "Shuangpin (LibPinyin)" msgstr "Shuangpin (LibPinyin)" #: src/fcitx-libpinyin.desc:56 msgid "Shuangpin Scheme" msgstr "Shuangpin スキーマー" #: src/fcitx-libpinyin.desc:126 msgid "Si <-> Shi" msgstr "Si <-> Shi" #: src/fcitx-libpinyin.desc:211 src/fcitx-libpinyin.desc:266 msgid "Society" msgstr "社会" #: src/fcitx-libpinyin.desc:108 msgid "Sort method" msgstr "" #: src/fcitx-libpinyin.desc:216 src/fcitx-libpinyin.desc:271 msgid "Sport" msgstr "スポーツ" #: src/fcitx-libpinyin.desc:24 msgid "Standard" msgstr "スタンダード" #: src/fcitx-libpinyin.desc:221 msgid "Technology" msgstr "" #: dictmanager/filedownloader.cpp:44 dictmanager/scelconverter.cpp:47 msgid "Temporary file created." msgstr "一時ファイルを作成しました。" #: src/fcitx-libpinyin.desc:98 msgid "UE -> VE" msgstr "UE -> VE" #: src/fcitx-libpinyin.desc:88 msgid "UEI -> UI" msgstr "UEI -> UI" #: src/fcitx-libpinyin.desc:93 msgid "UEN -> UN" msgstr "UEN -> UN" #: src/fcitx-libpinyin.desc:17 msgid "Use Incomplete Zhuyin" msgstr "不完全な Zhuyin を使用" #: src/fcitx-libpinyin.desc:2 msgid "Use Incomplete pinyin" msgstr "不完全なPinyinを使用" #: src/fcitx-libpinyin.desc:51 msgid "Use Simplified Chinese Data for Zhuyin (Need Restart)" msgstr "Zhuyin で中国語簡体字のデータを使う (再起動が必要)" #: src/fcitx-libpinyin.desc:12 msgid "Use Tone" msgstr "トーンを使う" #: src/fcitx-libpinyin.desc:7 msgid "Use Traditional Chinese Data for Pinyin and Shuangpin (Need Restart)" msgstr "Pinyin に中国語繁体字のデータを使う (再起動が必要)" #: src/fcitx-libpinyin.desc:68 msgid "V -> U" msgstr "V -> U" #: dictmanager/browserdialog.cpp:107 msgid "Wrong Link" msgstr "" #: src/fcitx-libpinyin.desc:63 msgid "XiaoHe" msgstr "XiaoHe" #: src/fcitx-libpinyin.desc:11 src/fcitx-libpinyin.desc:16 #: src/fcitx-libpinyin.desc:21 src/fcitx-libpinyin.desc:31 #: src/fcitx-libpinyin.desc:40 src/fcitx-libpinyin.desc:45 #: src/fcitx-libpinyin.desc:50 msgid "Zhuyin" msgstr "Zhuyin" #: src/fcitx-libpinyin.desc:22 msgid "Zhuyin Layout" msgstr "Zhuyin レイアウト" #: src/fcitx-libpinyin.desc:46 msgid "Zhuyin Next Page" msgstr "Zhuyin 次のページ" #: src/fcitx-libpinyin.desc:41 msgid "Zhuyin Prev Page" msgstr "Zhuyin 前のページ" #: src/fcitx-libpinyin.desc:32 msgid "Zhuyin candidate choosing modifiers" msgstr "Zhuyin 候補選択の修飾キー" #: src/fcitx-libpinyin.desc:121 msgid "Zi <-> Zhi" msgstr "Zi <-> Zhi" #: src/fcitx-libpinyin.desc:60 msgid "ZiGuang" msgstr "ZiGuang" #: src/fcitx-libpinyin.desc:58 msgid "Ziranma" msgstr "Ziranma" fcitx-libpinyin-0.5.3/po/ko.po000066400000000000000000000263541315660135300162330ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Bon Keun Seo , 2017 msgid "" msgstr "" "Project-Id-Version: fcitx\n" "Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" "POT-Creation-Date: 2017-09-01 16:03-0700\n" "PO-Revision-Date: 2017-09-01 23:05+0000\n" "Last-Translator: csslayer \n" "Language-Team: Korean (http://www.transifex.com/fcitx/fcitx/language/ko/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: ko\n" "Plural-Forms: nplurals=1; plural=0;\n" #: dictmanager/browserdialog.cpp:61 msgid "Browse Sogou Cell Dict repository" msgstr "Sogou 셀 사전 저장소 탐색" #: dictmanager/browserdialog.cpp:107 msgid "Wrong Link" msgstr "잘못된 링크" #: dictmanager/browserdialog.cpp:108 msgid "No browsing outside pinyin.sogou.com, now redirect to home page." msgstr "pinyin.sogou.com 밖으로 나가는 것을 허용하지 않습니다. 홈페이지로 돌아갑니다." #: dictmanager/dictmanager.cpp:48 msgid "From &File" msgstr "파일에서 불러오기(&F)" #: dictmanager/dictmanager.cpp:49 msgid "From &Sogou Cell Dictionary File" msgstr "&Sogou 셀 사전 파일에서 불러오기" #: dictmanager/dictmanager.cpp:50 msgid "&Browse Sogou Cell Dictionary Online" msgstr "온라인 Sogou 셀 사전을 검색(&B)" #: dictmanager/dictmanager.cpp:57 msgid "&Clear User Data" msgstr "사용자 데이터 비우기(&C)" #: dictmanager/dictmanager.cpp:58 msgid "Clear &All Data" msgstr "모든 데이터 비우기(&A)" #: dictmanager/dictmanager.cpp:65 msgid "&Import" msgstr "가져오기(&I)" #: dictmanager/dictmanager.cpp:66 msgid "&Remove" msgstr "제거(&R)" #: dictmanager/dictmanager.cpp:67 msgid "Remove &All" msgstr "모두 제거(&A)" #: dictmanager/dictmanager.cpp:68 msgid "&Clear Dict" msgstr "사전 비우기(&C)" #: dictmanager/dictmanager.cpp:113 msgid "Manage Pinyin Dictionary" msgstr "병음 사전 관리" #: dictmanager/dictmanager.cpp:133 msgid "Select Dictionary File" msgstr "사전 파일 선택" #: dictmanager/dictmanager.cpp:146 dictmanager/dictmanager.cpp:183 msgid "Input Dictionary Name" msgstr "입력 사전명" #: dictmanager/dictmanager.cpp:146 dictmanager/dictmanager.cpp:183 msgid "New Dictionary Name:" msgstr "새 사전명:" #: dictmanager/dictmanager.cpp:155 msgid "Copy file failed" msgstr "파일 복사 실패" #: dictmanager/dictmanager.cpp:155 msgid "" "Copy file failed. Please check you have permission or disk is not full." msgstr "파일 복사 실패. 권한이 있는지, 또는 디스크가 가득 찬 것은 아닌지 확인하세요." #: dictmanager/dictmanager.cpp:167 msgid "Select scel file" msgstr "scel 파일 선택" #: dictmanager/dictmanager.cpp:169 msgid "Scel file (*.scel)" msgstr "Scel 파일 (*.scel)" #: dictmanager/dictmanager.cpp:230 msgid "Confirm deletion" msgstr "삭제 확인" #: dictmanager/dictmanager.cpp:231 #, kde-format msgid "Are you sure to delete %1?" msgstr "정말로 %1을 삭제하시겠습니까?" #: dictmanager/dictmanager.cpp:238 msgid "File Operation Failed" msgstr "파일 작업 실패" #: dictmanager/dictmanager.cpp:239 #, kde-format msgid "Error while deleting %1." msgstr "%1 삭제 오류" #: dictmanager/erroroverlay.cpp:41 msgid "Cannot connect to Fcitx by DBus, is Fcitx running?" msgstr "Fcitx를 DBus에 연결할 수 없습니다. Fcitx가 동작 중입니까?" #: dictmanager/filedownloader.cpp:40 dictmanager/scelconverter.cpp:43 msgid "Create temporary file failed." msgstr "임시 파일 생성 실패." #: dictmanager/filedownloader.cpp:44 dictmanager/scelconverter.cpp:47 msgid "Temporary file created." msgstr "임시 파일이 생성되었습니다." #: dictmanager/filedownloader.cpp:52 msgid "Failed to create request." msgstr "요청을 생성하지 못했습니다." #: dictmanager/filedownloader.cpp:56 msgid "Download started." msgstr "다운로드가 시작되었습니다." #: dictmanager/filedownloader.cpp:84 #, kde-format msgid "%1% Downloaded." msgstr "%1%이 다운로드 되었습니다." #: dictmanager/filedownloader.cpp:93 msgid "Download Finished" msgstr "다운로드 완료" #: dictmanager/scelconverter.cpp:72 msgid "Converter crashed." msgstr "변환기가 죽었습니다." #: dictmanager/scelconverter.cpp:78 msgid "Convert failed." msgstr "변환이 실패했습니다." #: dictmanager/scelconverter.cpp:90 msgid "Rename failed." msgstr "이름변경이 실패했습니다." #: src/eim.cpp:837 src/pinyin-libpinyin.conf.in:3 msgid "Pinyin (LibPinyin)" msgstr "병음 (LibPinyin)" #: src/eim.cpp:854 src/shuangpin-libpinyin.conf.in:3 msgid "Shuangpin (LibPinyin)" msgstr "Shuangpin (LibPinyin)" #: src/eim.cpp:871 src/zhuyin-libpinyin.conf.in:3 msgid "Bopomofo (LibPinyin)" msgstr "주음 (LibPinyin)" #: src/fcitx-libpinyin.conf.in:3 msgid "LibPinyin" msgstr "LibPinyin" #: src/fcitx-libpinyin.conf.in:4 msgid "LibPinyin Wrapper For Fcitx" msgstr "Fcitx LibPinyin 입력기" #: src/fcitx-libpinyin.conf.in:10 src/fcitx-libpinyin.desc:165 #: src/fcitx-libpinyin.desc:170 src/fcitx-libpinyin.desc:175 #: src/fcitx-libpinyin.desc:180 src/fcitx-libpinyin.desc:185 #: src/fcitx-libpinyin.desc:190 src/fcitx-libpinyin.desc:195 #: src/fcitx-libpinyin.desc:200 src/fcitx-libpinyin.desc:205 #: src/fcitx-libpinyin.desc:210 src/fcitx-libpinyin.desc:215 #: src/fcitx-libpinyin.desc:220 msgid "Dictionary" msgstr "사전" #: src/fcitx-libpinyin.desc:1 src/fcitx-libpinyin.desc:6 msgid "Pinyin" msgstr "병음(Pinyin)" #: src/fcitx-libpinyin.desc:2 msgid "Use Incomplete pinyin" msgstr "불완전한 Pinyin 사용" #: src/fcitx-libpinyin.desc:7 msgid "Use Traditional Chinese Data for Pinyin and Shuangpin (Need Restart)" msgstr "병음과 Shuangpin을 위한 번체 데이터 사용 (재시작 필요)" #: src/fcitx-libpinyin.desc:11 src/fcitx-libpinyin.desc:16 #: src/fcitx-libpinyin.desc:21 src/fcitx-libpinyin.desc:31 #: src/fcitx-libpinyin.desc:40 src/fcitx-libpinyin.desc:45 #: src/fcitx-libpinyin.desc:50 msgid "Zhuyin" msgstr "주음" #: src/fcitx-libpinyin.desc:12 msgid "Use Tone" msgstr "톤 사용" #: src/fcitx-libpinyin.desc:17 msgid "Use Incomplete Zhuyin" msgstr "불완전한 주음 사용" #: src/fcitx-libpinyin.desc:22 msgid "Zhuyin Layout" msgstr "주음 배열" #: src/fcitx-libpinyin.desc:24 msgid "Standard" msgstr "표준" #: src/fcitx-libpinyin.desc:25 msgid "IBM" msgstr "IBM" #: src/fcitx-libpinyin.desc:26 msgid "GinYieh" msgstr "GinYieh" #: src/fcitx-libpinyin.desc:27 msgid "ET" msgstr "ET" #: src/fcitx-libpinyin.desc:32 msgid "Zhuyin candidate choosing modifiers" msgstr "주음 후보 선택 키" #: src/fcitx-libpinyin.desc:34 msgid "Ctrl" msgstr "Ctrl" #: src/fcitx-libpinyin.desc:35 msgid "Alt" msgstr "Alt" #: src/fcitx-libpinyin.desc:36 msgid "Shift" msgstr "Shift" #: src/fcitx-libpinyin.desc:41 msgid "Zhuyin Prev Page" msgstr "주음 이전 페이지" #: src/fcitx-libpinyin.desc:46 msgid "Zhuyin Next Page" msgstr "주음 다음 페이지" #: src/fcitx-libpinyin.desc:51 msgid "Use Simplified Chinese Data for Zhuyin (Need Restart)" msgstr "입력기에 간체 데이터 사용 (재시작 필요)" #: src/fcitx-libpinyin.desc:55 msgid "Shuangpin" msgstr "Shuangpin" #: src/fcitx-libpinyin.desc:56 msgid "Shuangpin Scheme" msgstr "Shuangpin 스키마" #: src/fcitx-libpinyin.desc:58 msgid "Ziranma" msgstr "지란마" #: src/fcitx-libpinyin.desc:59 msgid "Microsoft" msgstr "마이크로소프트" #: src/fcitx-libpinyin.desc:60 msgid "ZiGuang" msgstr "자광(Ziguang)" #: src/fcitx-libpinyin.desc:61 msgid "ABC" msgstr "지능 ABC" #: src/fcitx-libpinyin.desc:62 msgid "PinyinJiaJia" msgstr "병음가가(PinyinJiaJia)" #: src/fcitx-libpinyin.desc:63 msgid "XiaoHe" msgstr "작은학(XiaoHe)" #: src/fcitx-libpinyin.desc:67 src/fcitx-libpinyin.desc:72 #: src/fcitx-libpinyin.desc:77 src/fcitx-libpinyin.desc:82 #: src/fcitx-libpinyin.desc:87 src/fcitx-libpinyin.desc:92 #: src/fcitx-libpinyin.desc:97 src/fcitx-libpinyin.desc:102 msgid "Correction" msgstr "자동수정" #: src/fcitx-libpinyin.desc:68 msgid "V -> U" msgstr "V -> U" #: src/fcitx-libpinyin.desc:73 msgid "GN -> NG" msgstr "GN -> NG" #: src/fcitx-libpinyin.desc:78 msgid "MG -> NG" msgstr "MG -> NG" #: src/fcitx-libpinyin.desc:83 msgid "IOU -> IU" msgstr "IOU -> IU" #: src/fcitx-libpinyin.desc:88 msgid "UEI -> UI" msgstr "UEI -> UI" #: src/fcitx-libpinyin.desc:93 msgid "UEN -> UN" msgstr "UEN -> UN" #: src/fcitx-libpinyin.desc:98 msgid "UE -> VE" msgstr "UE -> VE" #: src/fcitx-libpinyin.desc:103 msgid "ON -> ONG" msgstr "ON -> ONG" #: src/fcitx-libpinyin.desc:107 src/fcitx-libpinyin.desc:115 #: src/fcitx-libpinyin.desc:120 src/fcitx-libpinyin.desc:125 #: src/fcitx-libpinyin.desc:130 src/fcitx-libpinyin.desc:135 #: src/fcitx-libpinyin.desc:140 src/fcitx-libpinyin.desc:145 #: src/fcitx-libpinyin.desc:150 src/fcitx-libpinyin.desc:155 #: src/fcitx-libpinyin.desc:160 msgid "Ambiguity" msgstr "모호함" #: src/fcitx-libpinyin.desc:108 msgid "Sort method" msgstr "" #: src/fcitx-libpinyin.desc:111 msgid "By Phrase Length and Frequency" msgstr "" #: src/fcitx-libpinyin.desc:112 msgid "By Phrase Length and Pinyin Length and Frequency" msgstr "" #: src/fcitx-libpinyin.desc:116 msgid "Ci <-> Chi" msgstr "Ci <-> Chi" #: src/fcitx-libpinyin.desc:121 msgid "Zi <-> Zhi" msgstr "Zi <-> Zhi" #: src/fcitx-libpinyin.desc:126 msgid "Si <-> Shi" msgstr "Si <-> Shi" #: src/fcitx-libpinyin.desc:131 msgid "Ne <-> Le" msgstr "Ne <-> Le" #: src/fcitx-libpinyin.desc:136 msgid "Fo <-> He" msgstr "Fo <-> He" #: src/fcitx-libpinyin.desc:141 msgid "Le <-> Ri" msgstr "Le <-> Ri" #: src/fcitx-libpinyin.desc:146 msgid "Ge <-> Ke" msgstr "Ge <-> Ke" #: src/fcitx-libpinyin.desc:151 msgid "An <-> Ang" msgstr "An <-> Ang" #: src/fcitx-libpinyin.desc:156 msgid "En <-> Eng" msgstr "En <-> Eng" #: src/fcitx-libpinyin.desc:161 msgid "In <-> Ing" msgstr "In <-> Ing" #: src/fcitx-libpinyin.desc:166 src/fcitx-libpinyin.desc:226 msgid "Art" msgstr "예술" #: src/fcitx-libpinyin.desc:171 src/fcitx-libpinyin.desc:231 msgid "Culture" msgstr "문화" #: src/fcitx-libpinyin.desc:176 src/fcitx-libpinyin.desc:236 msgid "Economy" msgstr "경제" #: src/fcitx-libpinyin.desc:181 src/fcitx-libpinyin.desc:241 msgid "Geology" msgstr "지질" #: src/fcitx-libpinyin.desc:186 src/fcitx-libpinyin.desc:246 msgid "History" msgstr "역사" #: src/fcitx-libpinyin.desc:191 src/fcitx-libpinyin.desc:251 msgid "Life" msgstr "생활" #: src/fcitx-libpinyin.desc:196 src/fcitx-libpinyin.desc:256 msgid "Nature" msgstr "자연" #: src/fcitx-libpinyin.desc:201 msgid "People" msgstr "사람" #: src/fcitx-libpinyin.desc:206 msgid "Science" msgstr "과학" #: src/fcitx-libpinyin.desc:211 src/fcitx-libpinyin.desc:266 msgid "Society" msgstr "사회" #: src/fcitx-libpinyin.desc:216 src/fcitx-libpinyin.desc:271 msgid "Sport" msgstr "운동" #: src/fcitx-libpinyin.desc:221 msgid "Technology" msgstr "기술" #: src/fcitx-libpinyin.desc:225 src/fcitx-libpinyin.desc:230 #: src/fcitx-libpinyin.desc:235 src/fcitx-libpinyin.desc:240 #: src/fcitx-libpinyin.desc:245 src/fcitx-libpinyin.desc:250 #: src/fcitx-libpinyin.desc:255 src/fcitx-libpinyin.desc:260 #: src/fcitx-libpinyin.desc:265 src/fcitx-libpinyin.desc:270 msgid "Dictionary Zhuyin" msgstr "주음 사전" #: src/fcitx-libpinyin.desc:261 msgid "Science & Technology" msgstr "과학기술" fcitx-libpinyin-0.5.3/po/ru.po000066400000000000000000000306561315660135300162500ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # TotalCaesar659 , 2016 msgid "" msgstr "" "Project-Id-Version: fcitx\n" "Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" "POT-Creation-Date: 2017-09-01 16:03-0700\n" "PO-Revision-Date: 2017-09-01 23:05+0000\n" "Last-Translator: csslayer \n" "Language-Team: Russian (http://www.transifex.com/fcitx/fcitx/language/ru/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: ru\n" "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" #: dictmanager/browserdialog.cpp:61 msgid "Browse Sogou Cell Dict repository" msgstr "Исследовать репозиторий словаря Sogou Cell" #: dictmanager/browserdialog.cpp:107 msgid "Wrong Link" msgstr "Неверная ссылка" #: dictmanager/browserdialog.cpp:108 msgid "No browsing outside pinyin.sogou.com, now redirect to home page." msgstr "Невозможно перейти вне pinyin.sogou.com, перенаправление на домашнюю страницу." #: dictmanager/dictmanager.cpp:48 msgid "From &File" msgstr "&Из файла" #: dictmanager/dictmanager.cpp:49 msgid "From &Sogou Cell Dictionary File" msgstr "Из &файла словаря Sogou Cell" #: dictmanager/dictmanager.cpp:50 msgid "&Browse Sogou Cell Dictionary Online" msgstr "&Просмотреть словарь Sogou Cell в интернете" #: dictmanager/dictmanager.cpp:57 msgid "&Clear User Data" msgstr "&Очистить данные пользователя" #: dictmanager/dictmanager.cpp:58 msgid "Clear &All Data" msgstr "Очистить все данные" #: dictmanager/dictmanager.cpp:65 msgid "&Import" msgstr "&Импорт" #: dictmanager/dictmanager.cpp:66 msgid "&Remove" msgstr "Удалить" #: dictmanager/dictmanager.cpp:67 msgid "Remove &All" msgstr "Удалить все" #: dictmanager/dictmanager.cpp:68 msgid "&Clear Dict" msgstr "Очистить словарь" #: dictmanager/dictmanager.cpp:113 msgid "Manage Pinyin Dictionary" msgstr "Управление словарем пиньинь" #: dictmanager/dictmanager.cpp:133 msgid "Select Dictionary File" msgstr "Выбрать файл словаря" #: dictmanager/dictmanager.cpp:146 dictmanager/dictmanager.cpp:183 msgid "Input Dictionary Name" msgstr "Ввести имя словаря" #: dictmanager/dictmanager.cpp:146 dictmanager/dictmanager.cpp:183 msgid "New Dictionary Name:" msgstr "Новое имя словаря:" #: dictmanager/dictmanager.cpp:155 msgid "Copy file failed" msgstr "Не удалось копировать файл" #: dictmanager/dictmanager.cpp:155 msgid "" "Copy file failed. Please check you have permission or disk is not full." msgstr "Не удалось копировать файл. Проверьте ваши полномочия и место на диске." #: dictmanager/dictmanager.cpp:167 msgid "Select scel file" msgstr "Выбрать файл scel" #: dictmanager/dictmanager.cpp:169 msgid "Scel file (*.scel)" msgstr "Файл SCEL (*.scel)" #: dictmanager/dictmanager.cpp:230 msgid "Confirm deletion" msgstr "Подтвердите удаление" #: dictmanager/dictmanager.cpp:231 #, kde-format msgid "Are you sure to delete %1?" msgstr "Действительно удалить %1?" #: dictmanager/dictmanager.cpp:238 msgid "File Operation Failed" msgstr "Сбой операции с файлом" #: dictmanager/dictmanager.cpp:239 #, kde-format msgid "Error while deleting %1." msgstr "Ошибка при удалении %1." #: dictmanager/erroroverlay.cpp:41 msgid "Cannot connect to Fcitx by DBus, is Fcitx running?" msgstr "Не удалось соединиться с Fcitx через DBus, запущен ли Fcitx?" #: dictmanager/filedownloader.cpp:40 dictmanager/scelconverter.cpp:43 msgid "Create temporary file failed." msgstr "Не удалось копировать временный файл" #: dictmanager/filedownloader.cpp:44 dictmanager/scelconverter.cpp:47 msgid "Temporary file created." msgstr "Создан временный файл" #: dictmanager/filedownloader.cpp:52 msgid "Failed to create request." msgstr "Не удалось создать запрос." #: dictmanager/filedownloader.cpp:56 msgid "Download started." msgstr "Загрузка началась." #: dictmanager/filedownloader.cpp:84 #, kde-format msgid "%1% Downloaded." msgstr "%1% загружен." #: dictmanager/filedownloader.cpp:93 msgid "Download Finished" msgstr "Загрузка завершена" #: dictmanager/scelconverter.cpp:72 msgid "Converter crashed." msgstr "Сбой конвертера." #: dictmanager/scelconverter.cpp:78 msgid "Convert failed." msgstr "Не удалось конвертировать." #: dictmanager/scelconverter.cpp:90 msgid "Rename failed." msgstr "Не удалось переименовать." #: src/eim.cpp:837 src/pinyin-libpinyin.conf.in:3 msgid "Pinyin (LibPinyin)" msgstr "Пиньинь (LibPinyin)" #: src/eim.cpp:854 src/shuangpin-libpinyin.conf.in:3 msgid "Shuangpin (LibPinyin)" msgstr "Шуаньпинь (LibPinyin)" #: src/eim.cpp:871 src/zhuyin-libpinyin.conf.in:3 msgid "Bopomofo (LibPinyin)" msgstr "Бопомофо (LibPinyin)" #: src/fcitx-libpinyin.conf.in:3 msgid "LibPinyin" msgstr "LibPinyin" #: src/fcitx-libpinyin.conf.in:4 msgid "LibPinyin Wrapper For Fcitx" msgstr "Обертка LibPinyin для Fcitx" #: src/fcitx-libpinyin.conf.in:10 src/fcitx-libpinyin.desc:165 #: src/fcitx-libpinyin.desc:170 src/fcitx-libpinyin.desc:175 #: src/fcitx-libpinyin.desc:180 src/fcitx-libpinyin.desc:185 #: src/fcitx-libpinyin.desc:190 src/fcitx-libpinyin.desc:195 #: src/fcitx-libpinyin.desc:200 src/fcitx-libpinyin.desc:205 #: src/fcitx-libpinyin.desc:210 src/fcitx-libpinyin.desc:215 #: src/fcitx-libpinyin.desc:220 msgid "Dictionary" msgstr "Словарь" #: src/fcitx-libpinyin.desc:1 src/fcitx-libpinyin.desc:6 msgid "Pinyin" msgstr "Пиньинь" #: src/fcitx-libpinyin.desc:2 msgid "Use Incomplete pinyin" msgstr "Использовать неполный пиньинь" #: src/fcitx-libpinyin.desc:7 msgid "Use Traditional Chinese Data for Pinyin and Shuangpin (Need Restart)" msgstr "Использовать данные традиционного китайского для пиньинь и шуаньпинь (требуется перезапуск)" #: src/fcitx-libpinyin.desc:11 src/fcitx-libpinyin.desc:16 #: src/fcitx-libpinyin.desc:21 src/fcitx-libpinyin.desc:31 #: src/fcitx-libpinyin.desc:40 src/fcitx-libpinyin.desc:45 #: src/fcitx-libpinyin.desc:50 msgid "Zhuyin" msgstr "Чжуинь" #: src/fcitx-libpinyin.desc:12 msgid "Use Tone" msgstr "Использовать тон" #: src/fcitx-libpinyin.desc:17 msgid "Use Incomplete Zhuyin" msgstr "Использовать неполный чжуинь" #: src/fcitx-libpinyin.desc:22 msgid "Zhuyin Layout" msgstr "Раскладка чжуинь" #: src/fcitx-libpinyin.desc:24 msgid "Standard" msgstr "Стандартный" #: src/fcitx-libpinyin.desc:25 msgid "IBM" msgstr "IBM" #: src/fcitx-libpinyin.desc:26 msgid "GinYieh" msgstr "GinYieh" #: src/fcitx-libpinyin.desc:27 msgid "ET" msgstr "ET" #: src/fcitx-libpinyin.desc:32 msgid "Zhuyin candidate choosing modifiers" msgstr "Выбор модификаторов для кандидата чжуинь" #: src/fcitx-libpinyin.desc:34 msgid "Ctrl" msgstr "Ctrl" #: src/fcitx-libpinyin.desc:35 msgid "Alt" msgstr "Alt" #: src/fcitx-libpinyin.desc:36 msgid "Shift" msgstr "Shift" #: src/fcitx-libpinyin.desc:41 msgid "Zhuyin Prev Page" msgstr "Предыдущая страница чжуинь" #: src/fcitx-libpinyin.desc:46 msgid "Zhuyin Next Page" msgstr "Следующая страница чжуинь" #: src/fcitx-libpinyin.desc:51 msgid "Use Simplified Chinese Data for Zhuyin (Need Restart)" msgstr "Использовать данные упрощенного китайского для чжуинь (требуется перезапуск)" #: src/fcitx-libpinyin.desc:55 msgid "Shuangpin" msgstr "Шуанпинь" #: src/fcitx-libpinyin.desc:56 msgid "Shuangpin Scheme" msgstr "Схема шуаньпинь" #: src/fcitx-libpinyin.desc:58 msgid "Ziranma" msgstr "Цзыжаньма" #: src/fcitx-libpinyin.desc:59 msgid "Microsoft" msgstr "Microsoft" #: src/fcitx-libpinyin.desc:60 msgid "ZiGuang" msgstr "ZiGuang" #: src/fcitx-libpinyin.desc:61 msgid "ABC" msgstr "ABC" #: src/fcitx-libpinyin.desc:62 msgid "PinyinJiaJia" msgstr "PinyinJiaJia" #: src/fcitx-libpinyin.desc:63 msgid "XiaoHe" msgstr "XiaoHe" #: src/fcitx-libpinyin.desc:67 src/fcitx-libpinyin.desc:72 #: src/fcitx-libpinyin.desc:77 src/fcitx-libpinyin.desc:82 #: src/fcitx-libpinyin.desc:87 src/fcitx-libpinyin.desc:92 #: src/fcitx-libpinyin.desc:97 src/fcitx-libpinyin.desc:102 msgid "Correction" msgstr "Исправление" #: src/fcitx-libpinyin.desc:68 msgid "V -> U" msgstr "V -> U" #: src/fcitx-libpinyin.desc:73 msgid "GN -> NG" msgstr "GN -> NG" #: src/fcitx-libpinyin.desc:78 msgid "MG -> NG" msgstr "MG -> NG" #: src/fcitx-libpinyin.desc:83 msgid "IOU -> IU" msgstr "IOU -> IU" #: src/fcitx-libpinyin.desc:88 msgid "UEI -> UI" msgstr "UEI -> UI" #: src/fcitx-libpinyin.desc:93 msgid "UEN -> UN" msgstr "UEN -> UN" #: src/fcitx-libpinyin.desc:98 msgid "UE -> VE" msgstr "UE -> VE" #: src/fcitx-libpinyin.desc:103 msgid "ON -> ONG" msgstr "ON -> ONG" #: src/fcitx-libpinyin.desc:107 src/fcitx-libpinyin.desc:115 #: src/fcitx-libpinyin.desc:120 src/fcitx-libpinyin.desc:125 #: src/fcitx-libpinyin.desc:130 src/fcitx-libpinyin.desc:135 #: src/fcitx-libpinyin.desc:140 src/fcitx-libpinyin.desc:145 #: src/fcitx-libpinyin.desc:150 src/fcitx-libpinyin.desc:155 #: src/fcitx-libpinyin.desc:160 msgid "Ambiguity" msgstr "Неопределенность" #: src/fcitx-libpinyin.desc:108 msgid "Sort method" msgstr "" #: src/fcitx-libpinyin.desc:111 msgid "By Phrase Length and Frequency" msgstr "" #: src/fcitx-libpinyin.desc:112 msgid "By Phrase Length and Pinyin Length and Frequency" msgstr "" #: src/fcitx-libpinyin.desc:116 msgid "Ci <-> Chi" msgstr "Ci <-> Chi" #: src/fcitx-libpinyin.desc:121 msgid "Zi <-> Zhi" msgstr "Zi <-> Zhi" #: src/fcitx-libpinyin.desc:126 msgid "Si <-> Shi" msgstr "Si <-> Shi" #: src/fcitx-libpinyin.desc:131 msgid "Ne <-> Le" msgstr "Ne <-> Le" #: src/fcitx-libpinyin.desc:136 msgid "Fo <-> He" msgstr "Fo <-> He" #: src/fcitx-libpinyin.desc:141 msgid "Le <-> Ri" msgstr "Le <-> Ri" #: src/fcitx-libpinyin.desc:146 msgid "Ge <-> Ke" msgstr "Ge <-> Ke" #: src/fcitx-libpinyin.desc:151 msgid "An <-> Ang" msgstr "An <-> Ang" #: src/fcitx-libpinyin.desc:156 msgid "En <-> Eng" msgstr "En <-> Eng" #: src/fcitx-libpinyin.desc:161 msgid "In <-> Ing" msgstr "In <-> Ing" #: src/fcitx-libpinyin.desc:166 src/fcitx-libpinyin.desc:226 msgid "Art" msgstr "Искусство" #: src/fcitx-libpinyin.desc:171 src/fcitx-libpinyin.desc:231 msgid "Culture" msgstr "Культура" #: src/fcitx-libpinyin.desc:176 src/fcitx-libpinyin.desc:236 msgid "Economy" msgstr "Экономика" #: src/fcitx-libpinyin.desc:181 src/fcitx-libpinyin.desc:241 msgid "Geology" msgstr "Геология" #: src/fcitx-libpinyin.desc:186 src/fcitx-libpinyin.desc:246 msgid "History" msgstr "История" #: src/fcitx-libpinyin.desc:191 src/fcitx-libpinyin.desc:251 msgid "Life" msgstr "Быт" #: src/fcitx-libpinyin.desc:196 src/fcitx-libpinyin.desc:256 msgid "Nature" msgstr "Природа" #: src/fcitx-libpinyin.desc:201 msgid "People" msgstr "Люди" #: src/fcitx-libpinyin.desc:206 msgid "Science" msgstr "Наука" #: src/fcitx-libpinyin.desc:211 src/fcitx-libpinyin.desc:266 msgid "Society" msgstr "Общество" #: src/fcitx-libpinyin.desc:216 src/fcitx-libpinyin.desc:271 msgid "Sport" msgstr "Спорт" #: src/fcitx-libpinyin.desc:221 msgid "Technology" msgstr "Технологии" #: src/fcitx-libpinyin.desc:225 src/fcitx-libpinyin.desc:230 #: src/fcitx-libpinyin.desc:235 src/fcitx-libpinyin.desc:240 #: src/fcitx-libpinyin.desc:245 src/fcitx-libpinyin.desc:250 #: src/fcitx-libpinyin.desc:255 src/fcitx-libpinyin.desc:260 #: src/fcitx-libpinyin.desc:265 src/fcitx-libpinyin.desc:270 msgid "Dictionary Zhuyin" msgstr "Словарь чжуинь" #: src/fcitx-libpinyin.desc:261 msgid "Science & Technology" msgstr "Наука и технологии" fcitx-libpinyin-0.5.3/po/zh_CN.po000066400000000000000000000256541315660135300166250ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # csslayer , 2013,2015 # csslayer , 2010-2013 # wwj402 , 2013 msgid "" msgstr "" "Project-Id-Version: fcitx\n" "Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" "POT-Creation-Date: 2017-09-01 16:03-0700\n" "PO-Revision-Date: 2017-08-03 16:58+0000\n" "Last-Translator: csslayer \n" "Language-Team: Chinese (China) (http://www.transifex.com/fcitx/fcitx/" "language/zh_CN/)\n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #: dictmanager/filedownloader.cpp:84 #, kde-format msgid "%1% Downloaded." msgstr "已下载 %1%。" #: dictmanager/dictmanager.cpp:50 msgid "&Browse Sogou Cell Dictionary Online" msgstr "在线浏览搜狗细胞词典(&B)" #: dictmanager/dictmanager.cpp:68 msgid "&Clear Dict" msgstr "清理词库(&C)" #: dictmanager/dictmanager.cpp:57 msgid "&Clear User Data" msgstr "清理用户数据(&C)" #: dictmanager/dictmanager.cpp:65 msgid "&Import" msgstr "导入(&I)" #: dictmanager/dictmanager.cpp:66 msgid "&Remove" msgstr "移除(&R)" #: src/fcitx-libpinyin.desc:61 msgid "ABC" msgstr "智能 ABC" #: src/fcitx-libpinyin.desc:35 msgid "Alt" msgstr "Alt" #: src/fcitx-libpinyin.desc:107 src/fcitx-libpinyin.desc:115 #: src/fcitx-libpinyin.desc:120 src/fcitx-libpinyin.desc:125 #: src/fcitx-libpinyin.desc:130 src/fcitx-libpinyin.desc:135 #: src/fcitx-libpinyin.desc:140 src/fcitx-libpinyin.desc:145 #: src/fcitx-libpinyin.desc:150 src/fcitx-libpinyin.desc:155 #: src/fcitx-libpinyin.desc:160 msgid "Ambiguity" msgstr "模糊音" #: src/fcitx-libpinyin.desc:151 msgid "An <-> Ang" msgstr "An <-> Ang" #: dictmanager/dictmanager.cpp:231 #, kde-format msgid "Are you sure to delete %1?" msgstr "您确定要删除 %1?" #: src/fcitx-libpinyin.desc:166 src/fcitx-libpinyin.desc:226 msgid "Art" msgstr "艺术" #: src/eim.cpp:871 src/zhuyin-libpinyin.conf.in:3 msgid "Bopomofo (LibPinyin)" msgstr "注音 (LibPinyin)" #: dictmanager/browserdialog.cpp:61 msgid "Browse Sogou Cell Dict repository" msgstr "浏览搜狗细胞词库" #: src/fcitx-libpinyin.desc:111 msgid "By Phrase Length and Frequency" msgstr "" #: src/fcitx-libpinyin.desc:112 msgid "By Phrase Length and Pinyin Length and Frequency" msgstr "" #: dictmanager/erroroverlay.cpp:41 msgid "Cannot connect to Fcitx by DBus, is Fcitx running?" msgstr "无法通过 DBus 连接到 Fcitx,Fcitx 是否正在运行?" #: src/fcitx-libpinyin.desc:116 msgid "Ci <-> Chi" msgstr "Ci <-> Chi" #: dictmanager/dictmanager.cpp:58 msgid "Clear &All Data" msgstr "清理所有数据(&A)" #: dictmanager/dictmanager.cpp:230 msgid "Confirm deletion" msgstr "确认删除" #: dictmanager/scelconverter.cpp:78 msgid "Convert failed." msgstr "转换失败。" #: dictmanager/scelconverter.cpp:72 msgid "Converter crashed." msgstr "转换器崩溃。" #: dictmanager/dictmanager.cpp:155 msgid "Copy file failed" msgstr "复制文件失败" #: dictmanager/dictmanager.cpp:155 msgid "Copy file failed. Please check you have permission or disk is not full." msgstr "复制文件失败。请检查是否有权限或者磁盘是否已满。" #: src/fcitx-libpinyin.desc:67 src/fcitx-libpinyin.desc:72 #: src/fcitx-libpinyin.desc:77 src/fcitx-libpinyin.desc:82 #: src/fcitx-libpinyin.desc:87 src/fcitx-libpinyin.desc:92 #: src/fcitx-libpinyin.desc:97 src/fcitx-libpinyin.desc:102 msgid "Correction" msgstr "纠正" #: dictmanager/filedownloader.cpp:40 dictmanager/scelconverter.cpp:43 msgid "Create temporary file failed." msgstr "创建临时文件失败。" #: src/fcitx-libpinyin.desc:34 msgid "Ctrl" msgstr "Ctrl" #: src/fcitx-libpinyin.desc:171 src/fcitx-libpinyin.desc:231 msgid "Culture" msgstr "文化" #: src/fcitx-libpinyin.conf.in:10 src/fcitx-libpinyin.desc:165 #: src/fcitx-libpinyin.desc:170 src/fcitx-libpinyin.desc:175 #: src/fcitx-libpinyin.desc:180 src/fcitx-libpinyin.desc:185 #: src/fcitx-libpinyin.desc:190 src/fcitx-libpinyin.desc:195 #: src/fcitx-libpinyin.desc:200 src/fcitx-libpinyin.desc:205 #: src/fcitx-libpinyin.desc:210 src/fcitx-libpinyin.desc:215 #: src/fcitx-libpinyin.desc:220 msgid "Dictionary" msgstr "词典" #: src/fcitx-libpinyin.desc:225 src/fcitx-libpinyin.desc:230 #: src/fcitx-libpinyin.desc:235 src/fcitx-libpinyin.desc:240 #: src/fcitx-libpinyin.desc:245 src/fcitx-libpinyin.desc:250 #: src/fcitx-libpinyin.desc:255 src/fcitx-libpinyin.desc:260 #: src/fcitx-libpinyin.desc:265 src/fcitx-libpinyin.desc:270 msgid "Dictionary Zhuyin" msgstr "注音词典" #: dictmanager/filedownloader.cpp:93 msgid "Download Finished" msgstr "下载已完成" #: dictmanager/filedownloader.cpp:56 msgid "Download started." msgstr "下载已开始。" #: src/fcitx-libpinyin.desc:27 msgid "ET" msgstr "倚天" #: src/fcitx-libpinyin.desc:176 src/fcitx-libpinyin.desc:236 msgid "Economy" msgstr "经济" #: src/fcitx-libpinyin.desc:156 msgid "En <-> Eng" msgstr "En <-> Eng" #: dictmanager/dictmanager.cpp:239 #, kde-format msgid "Error while deleting %1." msgstr "删除 %1 时出错。" #: dictmanager/filedownloader.cpp:52 msgid "Failed to create request." msgstr "创建请求失败。" #: dictmanager/dictmanager.cpp:238 msgid "File Operation Failed" msgstr "文件操作失败" #: src/fcitx-libpinyin.desc:136 msgid "Fo <-> He" msgstr "Fo <-> He" #: dictmanager/dictmanager.cpp:48 msgid "From &File" msgstr "从文件(&F)" #: dictmanager/dictmanager.cpp:49 msgid "From &Sogou Cell Dictionary File" msgstr "来自搜狗细胞词典文件(&S)" #: src/fcitx-libpinyin.desc:73 msgid "GN -> NG" msgstr "GN -> NG" #: src/fcitx-libpinyin.desc:146 msgid "Ge <-> Ke" msgstr "Ge <-> Ke" #: src/fcitx-libpinyin.desc:181 src/fcitx-libpinyin.desc:241 msgid "Geology" msgstr "地理" #: src/fcitx-libpinyin.desc:26 msgid "GinYieh" msgstr "精业" #: src/fcitx-libpinyin.desc:186 src/fcitx-libpinyin.desc:246 msgid "History" msgstr "历史" #: src/fcitx-libpinyin.desc:25 msgid "IBM" msgstr "IBM" #: src/fcitx-libpinyin.desc:83 msgid "IOU -> IU" msgstr "IOU -> IU" #: src/fcitx-libpinyin.desc:161 msgid "In <-> Ing" msgstr "In <-> Ing" #: dictmanager/dictmanager.cpp:146 dictmanager/dictmanager.cpp:183 msgid "Input Dictionary Name" msgstr "输入词典名称" #: src/fcitx-libpinyin.desc:141 msgid "Le <-> Ri" msgstr "Le <-> Ri" #: src/fcitx-libpinyin.conf.in:3 msgid "LibPinyin" msgstr "LibPinyin" #: src/fcitx-libpinyin.conf.in:4 msgid "LibPinyin Wrapper For Fcitx" msgstr "Fcitx 的 LibPinyin 封装" #: src/fcitx-libpinyin.desc:191 src/fcitx-libpinyin.desc:251 msgid "Life" msgstr "生活" #: src/fcitx-libpinyin.desc:78 msgid "MG -> NG" msgstr "MG -> NG" #: dictmanager/dictmanager.cpp:113 msgid "Manage Pinyin Dictionary" msgstr "管理拼音词典" #: src/fcitx-libpinyin.desc:59 msgid "Microsoft" msgstr "微软" #: src/fcitx-libpinyin.desc:196 src/fcitx-libpinyin.desc:256 msgid "Nature" msgstr "自然" #: src/fcitx-libpinyin.desc:131 msgid "Ne <-> Le" msgstr "Ne <-> Le" #: dictmanager/dictmanager.cpp:146 dictmanager/dictmanager.cpp:183 msgid "New Dictionary Name:" msgstr "新词典名称:" #: dictmanager/browserdialog.cpp:108 msgid "No browsing outside pinyin.sogou.com, now redirect to home page." msgstr "不允许访问 pinyin.sogou.com 之外的网页,将重定向到主页。" #: src/fcitx-libpinyin.desc:103 msgid "ON -> ONG" msgstr "ON -> ONG" #: src/fcitx-libpinyin.desc:201 msgid "People" msgstr "人文" #: src/fcitx-libpinyin.desc:1 src/fcitx-libpinyin.desc:6 msgid "Pinyin" msgstr "拼音" #: src/eim.cpp:837 src/pinyin-libpinyin.conf.in:3 msgid "Pinyin (LibPinyin)" msgstr "拼音 (LibPinyin)" #: src/fcitx-libpinyin.desc:62 msgid "PinyinJiaJia" msgstr "拼音加加" #: dictmanager/dictmanager.cpp:67 msgid "Remove &All" msgstr "移除全部(&A)" #: dictmanager/scelconverter.cpp:90 msgid "Rename failed." msgstr "重命名失败。" #: dictmanager/dictmanager.cpp:169 msgid "Scel file (*.scel)" msgstr "Scel 文件 (*.scel)" #: src/fcitx-libpinyin.desc:206 msgid "Science" msgstr "科学" #: src/fcitx-libpinyin.desc:261 msgid "Science & Technology" msgstr "科学技术" #: dictmanager/dictmanager.cpp:133 msgid "Select Dictionary File" msgstr "选择词典文件" #: dictmanager/dictmanager.cpp:167 msgid "Select scel file" msgstr "选择 scel 文件" #: src/fcitx-libpinyin.desc:36 msgid "Shift" msgstr "Shift" #: src/fcitx-libpinyin.desc:55 msgid "Shuangpin" msgstr "双拼" #: src/eim.cpp:854 src/shuangpin-libpinyin.conf.in:3 msgid "Shuangpin (LibPinyin)" msgstr "双拼 (LibPinyin)" #: src/fcitx-libpinyin.desc:56 msgid "Shuangpin Scheme" msgstr "双拼方案" #: src/fcitx-libpinyin.desc:126 msgid "Si <-> Shi" msgstr "Si <-> Shi" #: src/fcitx-libpinyin.desc:211 src/fcitx-libpinyin.desc:266 msgid "Society" msgstr "社会" #: src/fcitx-libpinyin.desc:108 msgid "Sort method" msgstr "" #: src/fcitx-libpinyin.desc:216 src/fcitx-libpinyin.desc:271 msgid "Sport" msgstr "运动" #: src/fcitx-libpinyin.desc:24 msgid "Standard" msgstr "标准" #: src/fcitx-libpinyin.desc:221 msgid "Technology" msgstr "技术" #: dictmanager/filedownloader.cpp:44 dictmanager/scelconverter.cpp:47 msgid "Temporary file created." msgstr "已创建临时文件。" #: src/fcitx-libpinyin.desc:98 msgid "UE -> VE" msgstr "UE -> VE" #: src/fcitx-libpinyin.desc:88 msgid "UEI -> UI" msgstr "UEI -> UI" #: src/fcitx-libpinyin.desc:93 msgid "UEN -> UN" msgstr "UEN -> UN" #: src/fcitx-libpinyin.desc:17 msgid "Use Incomplete Zhuyin" msgstr "使用不完整注音" #: src/fcitx-libpinyin.desc:2 msgid "Use Incomplete pinyin" msgstr "使用不完整拼音" #: src/fcitx-libpinyin.desc:51 msgid "Use Simplified Chinese Data for Zhuyin (Need Restart)" msgstr "注音使用简体中文数据 (需要重启)" #: src/fcitx-libpinyin.desc:12 msgid "Use Tone" msgstr "使用声调" #: src/fcitx-libpinyin.desc:7 msgid "Use Traditional Chinese Data for Pinyin and Shuangpin (Need Restart)" msgstr "拼音和双拼使用繁体中文数据 (需要重启)" #: src/fcitx-libpinyin.desc:68 msgid "V -> U" msgstr "V -> U" #: dictmanager/browserdialog.cpp:107 msgid "Wrong Link" msgstr "链接错误" #: src/fcitx-libpinyin.desc:63 msgid "XiaoHe" msgstr "小鹤" #: src/fcitx-libpinyin.desc:11 src/fcitx-libpinyin.desc:16 #: src/fcitx-libpinyin.desc:21 src/fcitx-libpinyin.desc:31 #: src/fcitx-libpinyin.desc:40 src/fcitx-libpinyin.desc:45 #: src/fcitx-libpinyin.desc:50 msgid "Zhuyin" msgstr "注音" #: src/fcitx-libpinyin.desc:22 msgid "Zhuyin Layout" msgstr "注音布局" #: src/fcitx-libpinyin.desc:46 msgid "Zhuyin Next Page" msgstr "注音下一页" #: src/fcitx-libpinyin.desc:41 msgid "Zhuyin Prev Page" msgstr "注音前一页" #: src/fcitx-libpinyin.desc:32 msgid "Zhuyin candidate choosing modifiers" msgstr "注音候选词修饰键" #: src/fcitx-libpinyin.desc:121 msgid "Zi <-> Zhi" msgstr "Zi <-> Zhi" #: src/fcitx-libpinyin.desc:60 msgid "ZiGuang" msgstr "紫光" #: src/fcitx-libpinyin.desc:58 msgid "Ziranma" msgstr "自然码" fcitx-libpinyin-0.5.3/po/zh_TW.po000066400000000000000000000242141315660135300166460ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Alisha , 2012 # Hiunn-hué , 2012 # csslayer , 2012-2013 msgid "" msgstr "" "Project-Id-Version: fcitx\n" "Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" "POT-Creation-Date: 2017-09-01 16:03-0700\n" "PO-Revision-Date: 2017-08-03 16:58+0000\n" "Last-Translator: csslayer \n" "Language-Team: Chinese (Taiwan) (http://www.transifex.com/fcitx/fcitx/" "language/zh_TW/)\n" "Language: zh_TW\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #: dictmanager/filedownloader.cpp:84 #, kde-format msgid "%1% Downloaded." msgstr "" #: dictmanager/dictmanager.cpp:50 msgid "&Browse Sogou Cell Dictionary Online" msgstr "" #: dictmanager/dictmanager.cpp:68 msgid "&Clear Dict" msgstr "" #: dictmanager/dictmanager.cpp:57 msgid "&Clear User Data" msgstr "" #: dictmanager/dictmanager.cpp:65 msgid "&Import" msgstr "" #: dictmanager/dictmanager.cpp:66 msgid "&Remove" msgstr "" #: src/fcitx-libpinyin.desc:61 msgid "ABC" msgstr "智能ABC" #: src/fcitx-libpinyin.desc:35 msgid "Alt" msgstr "Alt" #: src/fcitx-libpinyin.desc:107 src/fcitx-libpinyin.desc:115 #: src/fcitx-libpinyin.desc:120 src/fcitx-libpinyin.desc:125 #: src/fcitx-libpinyin.desc:130 src/fcitx-libpinyin.desc:135 #: src/fcitx-libpinyin.desc:140 src/fcitx-libpinyin.desc:145 #: src/fcitx-libpinyin.desc:150 src/fcitx-libpinyin.desc:155 #: src/fcitx-libpinyin.desc:160 msgid "Ambiguity" msgstr "模糊音" #: src/fcitx-libpinyin.desc:151 msgid "An <-> Ang" msgstr "An <-> Ang" #: dictmanager/dictmanager.cpp:231 #, kde-format msgid "Are you sure to delete %1?" msgstr "" #: src/fcitx-libpinyin.desc:166 src/fcitx-libpinyin.desc:226 msgid "Art" msgstr "藝術" #: src/eim.cpp:871 src/zhuyin-libpinyin.conf.in:3 msgid "Bopomofo (LibPinyin)" msgstr "注音(LibPinyin)" #: dictmanager/browserdialog.cpp:61 msgid "Browse Sogou Cell Dict repository" msgstr "" #: src/fcitx-libpinyin.desc:111 msgid "By Phrase Length and Frequency" msgstr "" #: src/fcitx-libpinyin.desc:112 msgid "By Phrase Length and Pinyin Length and Frequency" msgstr "" #: dictmanager/erroroverlay.cpp:41 msgid "Cannot connect to Fcitx by DBus, is Fcitx running?" msgstr "" #: src/fcitx-libpinyin.desc:116 msgid "Ci <-> Chi" msgstr "Ci <-> Chi" #: dictmanager/dictmanager.cpp:58 msgid "Clear &All Data" msgstr "" #: dictmanager/dictmanager.cpp:230 msgid "Confirm deletion" msgstr "" #: dictmanager/scelconverter.cpp:78 msgid "Convert failed." msgstr "" #: dictmanager/scelconverter.cpp:72 msgid "Converter crashed." msgstr "" #: dictmanager/dictmanager.cpp:155 msgid "Copy file failed" msgstr "" #: dictmanager/dictmanager.cpp:155 msgid "Copy file failed. Please check you have permission or disk is not full." msgstr "" #: src/fcitx-libpinyin.desc:67 src/fcitx-libpinyin.desc:72 #: src/fcitx-libpinyin.desc:77 src/fcitx-libpinyin.desc:82 #: src/fcitx-libpinyin.desc:87 src/fcitx-libpinyin.desc:92 #: src/fcitx-libpinyin.desc:97 src/fcitx-libpinyin.desc:102 msgid "Correction" msgstr "糾正" #: dictmanager/filedownloader.cpp:40 dictmanager/scelconverter.cpp:43 msgid "Create temporary file failed." msgstr "" #: src/fcitx-libpinyin.desc:34 msgid "Ctrl" msgstr "Ctrl" #: src/fcitx-libpinyin.desc:171 src/fcitx-libpinyin.desc:231 msgid "Culture" msgstr "文化" #: src/fcitx-libpinyin.conf.in:10 src/fcitx-libpinyin.desc:165 #: src/fcitx-libpinyin.desc:170 src/fcitx-libpinyin.desc:175 #: src/fcitx-libpinyin.desc:180 src/fcitx-libpinyin.desc:185 #: src/fcitx-libpinyin.desc:190 src/fcitx-libpinyin.desc:195 #: src/fcitx-libpinyin.desc:200 src/fcitx-libpinyin.desc:205 #: src/fcitx-libpinyin.desc:210 src/fcitx-libpinyin.desc:215 #: src/fcitx-libpinyin.desc:220 msgid "Dictionary" msgstr "辭典" #: src/fcitx-libpinyin.desc:225 src/fcitx-libpinyin.desc:230 #: src/fcitx-libpinyin.desc:235 src/fcitx-libpinyin.desc:240 #: src/fcitx-libpinyin.desc:245 src/fcitx-libpinyin.desc:250 #: src/fcitx-libpinyin.desc:255 src/fcitx-libpinyin.desc:260 #: src/fcitx-libpinyin.desc:265 src/fcitx-libpinyin.desc:270 msgid "Dictionary Zhuyin" msgstr "" #: dictmanager/filedownloader.cpp:93 msgid "Download Finished" msgstr "" #: dictmanager/filedownloader.cpp:56 msgid "Download started." msgstr "" #: src/fcitx-libpinyin.desc:27 msgid "ET" msgstr "倚天" #: src/fcitx-libpinyin.desc:176 src/fcitx-libpinyin.desc:236 msgid "Economy" msgstr "經濟" #: src/fcitx-libpinyin.desc:156 msgid "En <-> Eng" msgstr "En <-> Eng" #: dictmanager/dictmanager.cpp:239 #, kde-format msgid "Error while deleting %1." msgstr "" #: dictmanager/filedownloader.cpp:52 msgid "Failed to create request." msgstr "" #: dictmanager/dictmanager.cpp:238 msgid "File Operation Failed" msgstr "" #: src/fcitx-libpinyin.desc:136 msgid "Fo <-> He" msgstr "Fo <-> He" #: dictmanager/dictmanager.cpp:48 msgid "From &File" msgstr "" #: dictmanager/dictmanager.cpp:49 msgid "From &Sogou Cell Dictionary File" msgstr "" #: src/fcitx-libpinyin.desc:73 msgid "GN -> NG" msgstr "GN -> NG" #: src/fcitx-libpinyin.desc:146 msgid "Ge <-> Ke" msgstr "Ge <-> Ke" #: src/fcitx-libpinyin.desc:181 src/fcitx-libpinyin.desc:241 msgid "Geology" msgstr "地質學" #: src/fcitx-libpinyin.desc:26 msgid "GinYieh" msgstr "精業" #: src/fcitx-libpinyin.desc:186 src/fcitx-libpinyin.desc:246 msgid "History" msgstr "歷史" #: src/fcitx-libpinyin.desc:25 msgid "IBM" msgstr "IBM" #: src/fcitx-libpinyin.desc:83 msgid "IOU -> IU" msgstr "IOU -> IU" #: src/fcitx-libpinyin.desc:161 msgid "In <-> Ing" msgstr "In <-> Ing" #: dictmanager/dictmanager.cpp:146 dictmanager/dictmanager.cpp:183 msgid "Input Dictionary Name" msgstr "" #: src/fcitx-libpinyin.desc:141 msgid "Le <-> Ri" msgstr "Le <-> Ri" #: src/fcitx-libpinyin.conf.in:3 msgid "LibPinyin" msgstr "LibPinyin" #: src/fcitx-libpinyin.conf.in:4 msgid "LibPinyin Wrapper For Fcitx" msgstr "Fcitx 的 LibPinyin 封装" #: src/fcitx-libpinyin.desc:191 src/fcitx-libpinyin.desc:251 msgid "Life" msgstr "生活" #: src/fcitx-libpinyin.desc:78 msgid "MG -> NG" msgstr "MG -> NG" #: dictmanager/dictmanager.cpp:113 msgid "Manage Pinyin Dictionary" msgstr "" #: src/fcitx-libpinyin.desc:59 msgid "Microsoft" msgstr "微軟" #: src/fcitx-libpinyin.desc:196 src/fcitx-libpinyin.desc:256 msgid "Nature" msgstr "自然" #: src/fcitx-libpinyin.desc:131 msgid "Ne <-> Le" msgstr "Ne <-> Le" #: dictmanager/dictmanager.cpp:146 dictmanager/dictmanager.cpp:183 msgid "New Dictionary Name:" msgstr "" #: dictmanager/browserdialog.cpp:108 msgid "No browsing outside pinyin.sogou.com, now redirect to home page." msgstr "" #: src/fcitx-libpinyin.desc:103 msgid "ON -> ONG" msgstr "ON -> ONG" #: src/fcitx-libpinyin.desc:201 msgid "People" msgstr "" #: src/fcitx-libpinyin.desc:1 src/fcitx-libpinyin.desc:6 msgid "Pinyin" msgstr "拼音" #: src/eim.cpp:837 src/pinyin-libpinyin.conf.in:3 msgid "Pinyin (LibPinyin)" msgstr "拼音(LibPinyin)" #: src/fcitx-libpinyin.desc:62 msgid "PinyinJiaJia" msgstr "拼音加加" #: dictmanager/dictmanager.cpp:67 msgid "Remove &All" msgstr "" #: dictmanager/scelconverter.cpp:90 msgid "Rename failed." msgstr "" #: dictmanager/dictmanager.cpp:169 msgid "Scel file (*.scel)" msgstr "" #: src/fcitx-libpinyin.desc:206 msgid "Science" msgstr "" #: src/fcitx-libpinyin.desc:261 msgid "Science & Technology" msgstr "科學技術" #: dictmanager/dictmanager.cpp:133 msgid "Select Dictionary File" msgstr "" #: dictmanager/dictmanager.cpp:167 msgid "Select scel file" msgstr "" #: src/fcitx-libpinyin.desc:36 msgid "Shift" msgstr "Shift" #: src/fcitx-libpinyin.desc:55 msgid "Shuangpin" msgstr "雙拼" #: src/eim.cpp:854 src/shuangpin-libpinyin.conf.in:3 msgid "Shuangpin (LibPinyin)" msgstr "雙拼(LibPinyin)" #: src/fcitx-libpinyin.desc:56 msgid "Shuangpin Scheme" msgstr "雙拼機制" #: src/fcitx-libpinyin.desc:126 msgid "Si <-> Shi" msgstr "Si <-> Shi" #: src/fcitx-libpinyin.desc:211 src/fcitx-libpinyin.desc:266 msgid "Society" msgstr "社會" #: src/fcitx-libpinyin.desc:108 msgid "Sort method" msgstr "" #: src/fcitx-libpinyin.desc:216 src/fcitx-libpinyin.desc:271 msgid "Sport" msgstr "運動" #: src/fcitx-libpinyin.desc:24 msgid "Standard" msgstr "標準" #: src/fcitx-libpinyin.desc:221 msgid "Technology" msgstr "" #: dictmanager/filedownloader.cpp:44 dictmanager/scelconverter.cpp:47 msgid "Temporary file created." msgstr "" #: src/fcitx-libpinyin.desc:98 msgid "UE -> VE" msgstr "UE -> VE" #: src/fcitx-libpinyin.desc:88 msgid "UEI -> UI" msgstr "UEI -> UI" #: src/fcitx-libpinyin.desc:93 msgid "UEN -> UN" msgstr "UEN -> UN" #: src/fcitx-libpinyin.desc:17 msgid "Use Incomplete Zhuyin" msgstr "使用不完整注音" #: src/fcitx-libpinyin.desc:2 msgid "Use Incomplete pinyin" msgstr "使用不完整拼音" #: src/fcitx-libpinyin.desc:51 msgid "Use Simplified Chinese Data for Zhuyin (Need Restart)" msgstr "注音使用簡體中文資料 (需要重新啟動)" #: src/fcitx-libpinyin.desc:12 msgid "Use Tone" msgstr "使用聲調" #: src/fcitx-libpinyin.desc:7 msgid "Use Traditional Chinese Data for Pinyin and Shuangpin (Need Restart)" msgstr "拼音和雙拼使用正體中文資料 (需要重新啟動)" #: src/fcitx-libpinyin.desc:68 msgid "V -> U" msgstr "V -> U" #: dictmanager/browserdialog.cpp:107 msgid "Wrong Link" msgstr "" #: src/fcitx-libpinyin.desc:63 msgid "XiaoHe" msgstr "小鶴" #: src/fcitx-libpinyin.desc:11 src/fcitx-libpinyin.desc:16 #: src/fcitx-libpinyin.desc:21 src/fcitx-libpinyin.desc:31 #: src/fcitx-libpinyin.desc:40 src/fcitx-libpinyin.desc:45 #: src/fcitx-libpinyin.desc:50 msgid "Zhuyin" msgstr "注音" #: src/fcitx-libpinyin.desc:22 msgid "Zhuyin Layout" msgstr "注音佈局" #: src/fcitx-libpinyin.desc:46 msgid "Zhuyin Next Page" msgstr "注音下一頁" #: src/fcitx-libpinyin.desc:41 msgid "Zhuyin Prev Page" msgstr "注音上一頁" #: src/fcitx-libpinyin.desc:32 msgid "Zhuyin candidate choosing modifiers" msgstr "注音候選詞修飾鍵" #: src/fcitx-libpinyin.desc:121 msgid "Zi <-> Zhi" msgstr "Zi <-> Zhi" #: src/fcitx-libpinyin.desc:60 msgid "ZiGuang" msgstr "紫光" #: src/fcitx-libpinyin.desc:58 msgid "Ziranma" msgstr "自然碼" fcitx-libpinyin-0.5.3/src/000077500000000000000000000000001315660135300154215ustar00rootroot00000000000000fcitx-libpinyin-0.5.3/src/CMakeLists.txt000066400000000000000000000014011315660135300201550ustar00rootroot00000000000000 include_directories ( ${PROJECT_BINARY_DIR} ${LIBPINYIN_INCLUDE_DIR} ${FCITX4_FCITX_UTILS_INCLUDE_DIRS} ${FCITX4_FCITX_CONFIG_INCLUDE_DIRS} ${FCITX4_FCITX_INCLUDE_DIRS} ${LIBINTL_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} ${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR} ) link_directories (${LIBPINYIN_LIBRARY_DIRS}) set( fcitx_libpinyin_sources eim.cpp enummap.cpp config.cpp bus.cpp utils.cpp ) add_definitions( -DLOCALEDIR=\"${CMAKE_INSTALL_PREFIX}/share/locale\" ) fcitx_add_addon_full(libpinyin DESC SOURCES ${fcitx_libpinyin_sources} IM_CONFIG pinyin-libpinyin.conf shuangpin-libpinyin.conf zhuyin-libpinyin.conf LINK_LIBS ${LIBPINYIN_LIBRARIES} ${LIBINTL_LIBRARIES} ${GLIB2_LIBRARIES} ${DBUS_LIBRARIES} ) fcitx-libpinyin-0.5.3/src/bus.cpp000066400000000000000000000071131315660135300167200ustar00rootroot00000000000000#include "bus.h" #include "eim.h" #include const char *introspection_xml = "\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " " " " " " " \n" " " " \n" "\n"; static DBusHandlerResult dbusEventHandler(DBusConnection* conn, DBusMessage* message, void* self) { FcitxLibPinyinBus* bus = (FcitxLibPinyinBus*) self; return bus->dbusEvent(conn, message); } FcitxLibPinyinBus::FcitxLibPinyinBus(struct _FcitxLibPinyinAddonInstance* libpinyin) { FcitxInstance* instance = libpinyin->owner; DBusConnection *conn = FcitxDBusGetConnection(instance); DBusConnection *privconn = FcitxDBusGetPrivConnection(instance); if (conn == NULL && privconn == NULL) { FcitxLog(ERROR, "DBus Not initialized"); } m_libpinyin = libpinyin; m_conn = conn; m_privconn = privconn; DBusObjectPathVTable fcitxIPCVTable = {NULL, &dbusEventHandler, NULL, NULL, NULL, NULL }; if (conn) { dbus_connection_register_object_path(conn, FCITX_LIBPINYIN_PATH, &fcitxIPCVTable, this); } if (privconn) { dbus_connection_register_object_path(privconn, FCITX_LIBPINYIN_PATH, &fcitxIPCVTable, this); } } FcitxLibPinyinBus::~FcitxLibPinyinBus() { if (m_conn) { dbus_connection_unregister_object_path(m_conn, FCITX_LIBPINYIN_PATH); } if (m_privconn) { dbus_connection_unregister_object_path(m_privconn, FCITX_LIBPINYIN_PATH); } } DBusHandlerResult FcitxLibPinyinBus::dbusEvent(DBusConnection* connection, DBusMessage* message) { DBusHandlerResult result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; DBusMessage *reply = NULL; boolean flush = false; if (dbus_message_is_method_call(message, DBUS_INTERFACE_INTROSPECTABLE, "Introspect")) { reply = dbus_message_new_method_return(message); dbus_message_append_args(reply, DBUS_TYPE_STRING, &introspection_xml, DBUS_TYPE_INVALID); } else if (dbus_message_is_method_call(message, FCITX_LIBPINYIN_INTERFACE, "ImportDict")) { m_libpinyin->pinyin->import(); reply = dbus_message_new_method_return(message); } else if (dbus_message_is_method_call(message, FCITX_LIBPINYIN_INTERFACE, "ClearDict")) { int32_t type; if (dbus_message_get_args(message, NULL, DBUS_TYPE_INT32, &type, DBUS_TYPE_INVALID)) { m_libpinyin->pinyin->clearData(type); reply = dbus_message_new_method_return(message); } else { reply = dbus_message_new_error_printf(message, DBUS_ERROR_UNKNOWN_METHOD, "No such method with signature (%s)", dbus_message_get_signature(message)); } } if (reply) { dbus_connection_send(connection, reply, NULL); dbus_message_unref(reply); if (flush) { dbus_connection_flush(connection); } result = DBUS_HANDLER_RESULT_HANDLED; } return result; } fcitx-libpinyin-0.5.3/src/bus.h000066400000000000000000000007501315660135300163650ustar00rootroot00000000000000#ifndef FCITX_LIBPINYIN_BUS_H #define FCITX_LIBPINYIN_BUS_H #include #include class FcitxLibPinyinBus { public: FcitxLibPinyinBus(struct _FcitxLibPinyinAddonInstance* libpinyin); virtual ~FcitxLibPinyinBus(); DBusHandlerResult dbusEvent(DBusConnection* connection, DBusMessage* message); private: DBusConnection* m_privconn; DBusConnection* m_conn; _FcitxLibPinyinAddonInstance* m_libpinyin; }; #endif // FCITX_LIBPINYIN_BUS_H fcitx-libpinyin-0.5.3/src/common.h000066400000000000000000000006661315660135300170720ustar00rootroot00000000000000#ifndef FCITX_LIBPINYIN_COMMON_H #define FCITX_LIBPINYIN_COMMON_H enum LIBPINYIN_TYPE { LPT_Pinyin, LPT_Zhuyin, LPT_Shuangpin }; enum LIBPINYIN_LANGUAGE_TYPE { LPLT_Simplified, LPLT_Traditional }; enum LIBPINYIN_DICT_TYPE { LPDT_USER, LPDT_IMPORT, LPDT_ALL, }; #define FCITX_LIBPINYIN_PATH "/libpinyin" #define FCITX_LIBPINYIN_INTERFACE "org.fcitx.Fcitx.LibPinyin" #endif // FCITX_LIBPINYIN_COMMON_H fcitx-libpinyin-0.5.3/src/config.cpp000066400000000000000000000123021315660135300173700ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2010~2011 by CSSlayer * * wengxt@gmail.com * * * * 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 2 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "eim.h" #include "config.h" CONFIG_BINDING_BEGIN(FcitxLibPinyinConfig) CONFIG_BINDING_REGISTER("Pinyin", "Incomplete", incomplete) #ifdef LIBPINYIN_TOOLS_FOUND CONFIG_BINDING_REGISTER("Pinyin", "UseTraditionalChineseData", bTraditionalDataForPinyin) #endif CONFIG_BINDING_REGISTER("Zhuyin", "Incomplete", zhuyinIncomplete) CONFIG_BINDING_REGISTER("Zhuyin", "UseTone", useTone) CONFIG_BINDING_REGISTER("Zhuyin", "Layout", zhuyinLayout) CONFIG_BINDING_REGISTER("Zhuyin", "PrevPage", hkPrevPage) CONFIG_BINDING_REGISTER("Zhuyin", "NextPage", hkNextPage) CONFIG_BINDING_REGISTER("Zhuyin", "CandidateModifiers", candidateModifiers) #ifdef LIBPINYIN_TOOLS_FOUND CONFIG_BINDING_REGISTER("Zhuyin", "UseSimplifiedChineseData", bSimplifiedDataForZhuyin) #endif CONFIG_BINDING_REGISTER("Shuangpin", "Scheme", spScheme) CONFIG_BINDING_REGISTER("Correction", "VU", cr[FCITX_CR_V_U]) CONFIG_BINDING_REGISTER("Correction", "GNNG", cr[FCITX_CR_GN_NG]) CONFIG_BINDING_REGISTER("Correction", "MGNG", cr[FCITX_CR_MG_NG]) CONFIG_BINDING_REGISTER("Correction", "IOUIU", cr[FCITX_CR_IOU_IU]) CONFIG_BINDING_REGISTER("Correction", "UEIUI", cr[FCITX_CR_UEI_UI]) CONFIG_BINDING_REGISTER("Correction", "UENUN", cr[FCITX_CR_UEN_UN]) CONFIG_BINDING_REGISTER("Correction", "UEVE", cr[FCITX_CR_UE_VE]) CONFIG_BINDING_REGISTER("Correction", "ONONG", cr[FCITX_CR_ON_ONG]) CONFIG_BINDING_REGISTER("Ambiguity", "Sort", sort); CONFIG_BINDING_REGISTER("Ambiguity", "CiChi", amb[FCITX_AMB_CiChi]) CONFIG_BINDING_REGISTER("Ambiguity", "ZiZhi", amb[FCITX_AMB_ZiZhi]) CONFIG_BINDING_REGISTER("Ambiguity", "SiShi", amb[FCITX_AMB_SiShi]) CONFIG_BINDING_REGISTER("Ambiguity", "LeNe", amb[FCITX_AMB_LeNe]) CONFIG_BINDING_REGISTER("Ambiguity", "FoHe", amb[FCITX_AMB_FoHe]) CONFIG_BINDING_REGISTER("Ambiguity", "LeRi", amb[FCITX_AMB_LeRi]) CONFIG_BINDING_REGISTER("Ambiguity", "GeKe", amb[FCITX_AMB_GeKe]) CONFIG_BINDING_REGISTER("Ambiguity", "AnAng", amb[FCITX_AMB_AnAng]) CONFIG_BINDING_REGISTER("Ambiguity", "EnEng", amb[FCITX_AMB_EnEng]) CONFIG_BINDING_REGISTER("Ambiguity", "InIng", amb[FCITX_AMB_InIng]) CONFIG_BINDING_REGISTER("Dictionary", "Art", dict[FCITX_DICT_ART]) CONFIG_BINDING_REGISTER("Dictionary", "Culture", dict[FCITX_DICT_CULTURE]) CONFIG_BINDING_REGISTER("Dictionary", "Economy", dict[FCITX_DICT_ECONOMY]) CONFIG_BINDING_REGISTER("Dictionary", "Geology", dict[FCITX_DICT_GEOLOGY]) CONFIG_BINDING_REGISTER("Dictionary", "History", dict[FCITX_DICT_HISTORY]) CONFIG_BINDING_REGISTER("Dictionary", "Life", dict[FCITX_DICT_LIFE]) CONFIG_BINDING_REGISTER("Dictionary", "Nature", dict[FCITX_DICT_NATURE]) CONFIG_BINDING_REGISTER("Dictionary", "People", dict[FCITX_DICT_PEOPLE]) CONFIG_BINDING_REGISTER("Dictionary", "Scitech", dict[FCITX_DICT_SCIENCE]) CONFIG_BINDING_REGISTER("Dictionary", "Society", dict[FCITX_DICT_SOCIETY]) CONFIG_BINDING_REGISTER("Dictionary", "Sport", dict[FCITX_DICT_SPORT]) CONFIG_BINDING_REGISTER("Dictionary", "Technology", dict[FCITX_DICT_TECHNOLOGY]) CONFIG_BINDING_REGISTER("Dictionary Zhuyin", "Art", dict[FCITX_ZHUYIN_DICT_ART]) CONFIG_BINDING_REGISTER("Dictionary Zhuyin", "Culture", dict[FCITX_ZHUYIN_DICT_CULTURE]) CONFIG_BINDING_REGISTER("Dictionary Zhuyin", "Economy", dict[FCITX_ZHUYIN_DICT_ECONOMY]) CONFIG_BINDING_REGISTER("Dictionary Zhuyin", "Geology", dict[FCITX_ZHUYIN_DICT_GEOLOGY]) CONFIG_BINDING_REGISTER("Dictionary Zhuyin", "History", dict[FCITX_ZHUYIN_DICT_HISTORY]) CONFIG_BINDING_REGISTER("Dictionary Zhuyin", "Life", dict[FCITX_ZHUYIN_DICT_LIFE]) CONFIG_BINDING_REGISTER("Dictionary Zhuyin", "Nature", dict[FCITX_ZHUYIN_DICT_NATURE]) CONFIG_BINDING_REGISTER("Dictionary Zhuyin", "Scitech", dict[FCITX_ZHUYIN_DICT_SCITECH]) CONFIG_BINDING_REGISTER("Dictionary Zhuyin", "Society", dict[FCITX_ZHUYIN_DICT_SOCIETY]) CONFIG_BINDING_REGISTER("Dictionary Zhuyin", "Sport", dict[FCITX_ZHUYIN_DICT_SPORT]) CONFIG_BINDING_END() fcitx-libpinyin-0.5.3/src/eim.cpp000066400000000000000000001143731315660135300167100ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2010~2011 by CSSlayer * * wengxt@gmail.com * * * * 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 2 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "config.h" #include "eim.h" #include "enummap.h" #include "bus.h" #include "common.h" #include "utils.h" #define FCITX_LIBPINYIN_MAX(x, y) ((x) > (y)? (x) : (y)) #define FCITX_LIBPINYIN_MIN(x, y) ((x) < (y)? (x) : (y)) extern "C" { FCITX_DEFINE_PLUGIN(fcitx_libpinyin, ime2, FcitxIMClass2) = { FcitxLibPinyinCreate, FcitxLibPinyinDestroy, FcitxLibPinyinReloadConfig, NULL, NULL, NULL, NULL, NULL, }; } typedef struct _FcitxLibPinyinCandWord { boolean ispunc; int idx; } FcitxLibPinyinCandWord; CONFIG_DEFINE_LOAD_AND_SAVE(FcitxLibPinyinConfig, FcitxLibPinyinConfig, "fcitx-libpinyin") static void FcitxLibPinyinReconfigure(FcitxLibPinyinAddonInstance* libpinyin); static void FcitxLibPinyinSave(void* arg); static bool LibPinyinCheckZhuyinKey(FcitxKeySym sym, FCITX_ZHUYIN_LAYOUT layout, boolean useTone) ; static const char* input_keys [] = { "1qaz2wsxedcrfv5tgbyhnujm8ik,9ol.0p;/-", /* standard kb */ "1234567890-qwertyuiopasdfghjkl;zxcvbn", /* IBM */ "2wsx3edcrfvtgb6yhnujm8ik,9ol.0p;/-['=", /* Gin-yieh */ "bpmfdtnlvkhg7c,./j;'sexuaorwiqzy890-=", /* ET */ 0 }; static const char* tone_keys [] = { "7634 ", /* standard kb */ "/m,. ", /* IBM */ "1qaz ", /* Gin-yieh */ "1234 ", /* ET */ 0 }; static const FcitxKeyState candidateModifierMap[] = { FcitxKeyState_Ctrl, FcitxKeyState_Alt, FcitxKeyState_Shift, }; static const FcitxHotkey FCITX_LIBPINYIN_SHIFT_ENTER[2] = { {NULL, FcitxKey_Return, FcitxKeyState_Shift}, {NULL, FcitxKey_None, FcitxKeyState_None} }; bool LibPinyinCheckZhuyinKey(FcitxKeySym sym, FCITX_ZHUYIN_LAYOUT layout, boolean useTone) { char key = sym & 0xff; const char* keys = input_keys[layout]; const char* tones = tone_keys[layout]; if (strchr(keys, key)) return true; if (useTone && strchr(tones, key)) return true; return false; } int FcitxLibPinyin::offset() const { if (!m_fixedString.empty()) { return m_fixedString.back().first; } return 0; } int FcitxLibPinyin::pinyinOffset() const { if (!m_fixedString.empty()) { return m_fixedString.back().second; } return 0; } /** * @brief Reset the status. * **/ void FcitxLibPinyinReset(void* arg) { FcitxLibPinyin* libpinyin = (FcitxLibPinyin*) arg; libpinyin->reset(); } void FcitxLibPinyin::reset() { m_buf.clear(); m_cursorPos = 0; m_parsedLen = 0; m_fixedString.clear(); if (m_inst) { pinyin_reset(m_inst); } } size_t FcitxLibPinyin::parse(const char* str) { switch (m_type) { case LPT_Pinyin: return pinyin_parse_more_full_pinyins(m_inst, str); case LPT_Shuangpin: return pinyin_parse_more_double_pinyins(m_inst, str); case LPT_Zhuyin: return pinyin_parse_more_chewings(m_inst, str); } return 0; } /** * @brief Process Key Input and return the status * * @param keycode keycode from XKeyEvent * @param state state from XKeyEvent * @param count count from XKeyEvent * @return INPUT_RETURN_VALUE **/ INPUT_RETURN_VALUE FcitxLibPinyinDoInput(void* arg, FcitxKeySym sym, unsigned int state) { FcitxLibPinyin* libpinyin = (FcitxLibPinyin*) arg; return libpinyin->doInput(sym, state); } INPUT_RETURN_VALUE FcitxLibPinyin::doInput(FcitxKeySym sym, unsigned int state) { FcitxLibPinyinConfig* config = &m_owner->config; FcitxInstance* instance = m_owner->owner; FcitxInputState* input = FcitxInstanceGetInputState(instance); if (FcitxHotkeyIsHotKeySimple(sym, state)) { /* there is some special case that ';' is used */ if (FcitxHotkeyIsHotKeyLAZ(sym, state) || sym == '\'' || (FcitxHotkeyIsHotKey(sym, state, FCITX_SEMICOLON) && m_type == LPT_Shuangpin && (config->spScheme == FCITX_SHUANG_PIN_MS || config->spScheme == FCITX_SHUANG_PIN_ZIGUANG)) || (m_type == LPT_Zhuyin && LibPinyinCheckZhuyinKey(sym, config->zhuyinLayout, config->useTone)) ) { if (m_buf.size() == 0 && (sym == '\'' || sym == ';')) return IRV_TO_PROCESS; if (m_buf.size() < MAX_PINYIN_INPUT) { m_buf.insert(m_cursorPos, 1, (char)(sym & 0xff)); m_cursorPos ++; m_parsedLen =parse(m_buf.c_str()); if (pinyin_get_parsed_input_length(m_inst) == 0 && m_buf.size() == 1 && m_type != LPT_Shuangpin && !(m_type == LPT_Pinyin && !m_owner->config.incomplete) && !(m_type == LPT_Zhuyin && !m_owner->config.zhuyinIncomplete)) { reset(); return IRV_TO_PROCESS; } return IRV_DISPLAY_CANDWORDS; } else return IRV_DO_NOTHING; } } if (FcitxHotkeyIsHotKey(sym, state, FCITX_SPACE) || (m_type == LPT_Zhuyin && FcitxHotkeyIsHotKey(sym, state, FCITX_ENTER))) { size_t len = m_buf.size(); if (len == 0) return IRV_TO_PROCESS; return FcitxCandidateWordChooseByIndex(FcitxInputStateGetCandidateList(input), 0); } if ((m_type != LPT_Zhuyin && FcitxHotkeyIsHotKey(sym, state, FCITX_ENTER)) || (m_type == LPT_Zhuyin && FcitxHotkeyIsHotKey(sym, state, FCITX_LIBPINYIN_SHIFT_ENTER))) { if (m_buf[0] == 0) return IRV_TO_PROCESS; const std::string sentence = this->sentence(0); if (!sentence.empty()) { int offset = this->offset(); int hzlen = 0; if (fcitx_utf8_strlen(sentence.c_str()) > offset) { hzlen = fcitx_utf8_get_nth_char(sentence.c_str(), offset) - sentence.c_str(); } else { hzlen = sentence.size(); } int start = pinyinOffset(); int pylen = m_buf.size() - start; if (pylen < 0) { pylen = 0; } char* buf = (char*) fcitx_utils_malloc0((hzlen + pylen + 1) * sizeof(char)); strncpy(buf, sentence.c_str(), hzlen); if (pylen) { strcpy(&buf[hzlen], &m_buf[start]); } buf[hzlen + pylen] = '\0'; FcitxInstanceCommitString(instance, FcitxInstanceGetCurrentIC(instance), buf); free(buf); } else { FcitxInstanceCommitString(instance, FcitxInstanceGetCurrentIC(instance), m_buf.c_str()); } return IRV_CLEAN; } if (FcitxHotkeyIsHotKey(sym, state, FCITX_BACKSPACE) || FcitxHotkeyIsHotKey(sym, state, FCITX_DELETE)) { if (m_buf.size() > 0) { if (offset() != 0 && FcitxHotkeyIsHotKey(sym, state, FCITX_BACKSPACE)) { m_fixedString.pop_back(); pinyin_clear_constraint(m_inst, pinyinOffset()); } else { if (FcitxHotkeyIsHotKey(sym, state, FCITX_BACKSPACE)) { if (m_cursorPos > 0) { m_cursorPos -- ; } else { return IRV_DO_NOTHING; } } size_t len = m_buf.size(); if (m_cursorPos == (int)len) return IRV_DO_NOTHING; m_buf.erase(m_cursorPos, 1); if (m_buf.empty()) return IRV_CLEAN; else m_parsedLen = parse(m_buf.c_str()); } return IRV_DISPLAY_CANDWORDS; } else return IRV_TO_PROCESS; } else { if (m_buf.size() > 0) { if (FcitxHotkeyIsHotKey(sym, state, FCITX_LEFT)) { if (m_cursorPos > 0) { if (m_cursorPos == pinyinOffset()) { m_fixedString.pop_back(); pinyin_clear_constraint(m_inst, offset()); return IRV_DISPLAY_CANDWORDS; } else { m_cursorPos--; return IRV_DISPLAY_CANDWORDS; } } return IRV_DO_NOTHING; } else if (FcitxHotkeyIsHotKey(sym, state, FCITX_RIGHT)) { size_t len = m_buf.size(); if (m_cursorPos < (int) len) { m_cursorPos ++ ; return IRV_DISPLAY_CANDWORDS; } return IRV_DO_NOTHING; } else if (FcitxHotkeyIsHotKey(sym, state, FCITX_HOME)) { int offset = pinyinOffset(); if (m_cursorPos != offset) { m_cursorPos = offset; return IRV_DISPLAY_CANDWORDS; } return IRV_DO_NOTHING; } else if (FcitxHotkeyIsHotKey(sym, state, FCITX_END)) { size_t len = m_buf.size(); if (m_cursorPos != (int) len) { m_cursorPos = len ; return IRV_DISPLAY_CANDWORDS; } return IRV_DO_NOTHING; } } else { return IRV_TO_PROCESS; } } return IRV_TO_PROCESS; } void FcitxLibPinyin::load() { if (m_inst != NULL) return; FcitxLibPinyinAddonInstance* libpinyinaddon = m_owner; if (m_type == LPT_Zhuyin && m_owner->zhuyin_context == NULL) { char* user_path = FcitxLibPinyinGetUserPath(libpinyinaddon->config.bSimplifiedDataForZhuyin ? LPLT_Simplified : LPLT_Traditional); char* syspath = FcitxLibPinyinGetSysPath(libpinyinaddon->config.bSimplifiedDataForZhuyin ? LPLT_Simplified : LPLT_Traditional); libpinyinaddon->zhuyin_context = pinyin_init(syspath, user_path); free(user_path); free(syspath); } if (m_type != LPT_Zhuyin && m_owner->pinyin_context == NULL) { char* user_path = FcitxLibPinyinGetUserPath(libpinyinaddon->config.bTraditionalDataForPinyin ? LPLT_Traditional : LPLT_Simplified); char* syspath = FcitxLibPinyinGetSysPath(libpinyinaddon->config.bTraditionalDataForPinyin ? LPLT_Traditional : LPLT_Simplified); libpinyinaddon->pinyin_context = pinyin_init(syspath, user_path); free(user_path); free(syspath); } if (m_type == LPT_Zhuyin) m_inst = pinyin_alloc_instance(libpinyinaddon->zhuyin_context); else m_inst = pinyin_alloc_instance(libpinyinaddon->pinyin_context); FcitxLibPinyinReconfigure(libpinyinaddon); } boolean FcitxLibPinyinInit(void* arg) { FcitxLibPinyin* libpinyin = (FcitxLibPinyin*) arg; libpinyin->init(); return true; } void FcitxLibPinyin::init() { FcitxInstanceSetContext(m_owner->owner, CONTEXT_IM_KEYBOARD_LAYOUT, "us"); if (m_type == LPT_Zhuyin) { FcitxInstanceSetContext(m_owner->owner, CONTEXT_ALTERNATIVE_PREVPAGE_KEY, m_owner->config.hkPrevPage); FcitxInstanceSetContext(m_owner->owner, CONTEXT_ALTERNATIVE_NEXTPAGE_KEY, m_owner->config.hkNextPage); } load(); } void FcitxLibPinyin::updatePreedit(const std::string &sentence) { FcitxInstance* instance = m_owner->owner; FcitxInputState* input = FcitxInstanceGetInputState(instance); int offset = this->offset(); #if 0 if (m_type == LPT_Pinyin) { const gchar* raw_full_pinyin; pinyin_get_raw_full_pinyin(m_inst, &raw_full_pinyin); int libpinyinLen = strlen(raw_full_pinyin); int fcitxLen = m_buf.size(); if (fcitxLen != libpinyinLen) { strcpy(m_buf, raw_full_pinyin); m_cursorPos += libpinyinLen - fcitxLen; } } #endif int pyoffset = pinyinOffset(); if (pyoffset > m_cursorPos) m_cursorPos = pyoffset; int hzlen = 0; if (fcitx_utf8_strlen(sentence.c_str()) > offset) { hzlen = fcitx_utf8_get_nth_char(sentence.c_str(), offset) - sentence.c_str(); } else { hzlen = sentence.size(); } if (hzlen > 0) { char* buf = (char*) fcitx_utils_malloc0((hzlen + 1) * sizeof(char)); strncpy(buf, sentence.c_str(), hzlen); buf[hzlen] = 0; FcitxMessagesAddMessageAtLast(FcitxInputStateGetPreedit(input), MSG_INPUT, "%s", buf); free(buf); } int charcurpos = hzlen; int lastpos = pyoffset; int curoffset = pyoffset; PinyinKey* pykey = NULL; PinyinKeyPos* pykeypos = NULL; FcitxMessagesAddMessageAtLast(FcitxInputStateGetPreedit(input), MSG_CODE, ""); for (int i = pinyinOffset(); i < m_parsedLen; ) { if (!pinyin_get_pinyin_key(m_inst, i, &pykey)) { break; } pinyin_get_pinyin_key_rest(m_inst, i, &pykeypos); guint16 rawBegin = 0, rawEnd = 0; pinyin_get_pinyin_key_rest_positions(m_inst, pykeypos, &rawBegin, &rawEnd); if (lastpos > 0) { FcitxMessagesMessageConcatLast(FcitxInputStateGetPreedit(input), " "); if (curoffset < m_cursorPos) charcurpos ++; for (int j = lastpos; j < rawBegin; j ++) { char temp[2] = {'\0', '\0'}; temp[0] = m_buf[j]; FcitxMessagesMessageConcatLast(FcitxInputStateGetPreedit(input), temp); if (curoffset < m_cursorPos) { curoffset ++; charcurpos ++; } } if (lastpos < rawBegin) { FcitxMessagesMessageConcatLast(FcitxInputStateGetPreedit(input), " "); if (curoffset < m_cursorPos) charcurpos ++; } } lastpos = rawEnd; bool breakAhead = false; switch (m_type) { case LPT_Pinyin: { gchar* pystring; pinyin_get_pinyin_string(m_inst, pykey, &pystring); if (!pystring) { breakAhead = true; break; } FcitxMessagesMessageConcatLast(FcitxInputStateGetPreedit(input), pystring); size_t pylen = strlen(pystring); if (curoffset + pylen < m_cursorPos) { curoffset += pylen; charcurpos += pylen; } else { charcurpos += m_cursorPos - curoffset; curoffset = m_cursorPos; } g_free(pystring); break; } case LPT_Shuangpin: { guint16 pykeyposLen = 0; pinyin_get_pinyin_key_rest_length(m_inst, pykeypos, &pykeyposLen); if (pykeyposLen == 2) { const gchar* initial = NULL; gchar* middle_final = NULL, *_initial = NULL; pinyin_get_pinyin_strings(m_inst, pykey, &_initial, &middle_final); if (!_initial[0]) initial = "'"; else initial = _initial; if (curoffset + 1 <= m_cursorPos) { curoffset += 1; charcurpos += strlen(initial); } FcitxMessagesMessageConcatLast(FcitxInputStateGetPreedit(input), initial); if (curoffset + 1 <= m_cursorPos) { curoffset += 1; charcurpos += strlen(middle_final); } FcitxMessagesMessageConcatLast(FcitxInputStateGetPreedit(input), middle_final); g_free(_initial); g_free(middle_final); } else if (pykeyposLen == 1) { gchar* pystring; pinyin_get_pinyin_string(m_inst, pykey, &pystring); if (curoffset + 1 <= m_cursorPos) { curoffset += 1; charcurpos += strlen(pystring); } FcitxMessagesMessageConcatLast(FcitxInputStateGetPreedit(input), pystring); g_free(pystring); } break; } case LPT_Zhuyin: { guint16 pykeyposLen = 0; pinyin_get_pinyin_key_rest_length(m_inst, pykeypos, &pykeyposLen); gchar* pystring; pinyin_get_zhuyin_string(m_inst, pykey, &pystring); // libpinyin would give us null when it is something like "xi'" if (!pystring) { breakAhead = true; break; } FcitxMessagesMessageConcatLast(FcitxInputStateGetPreedit(input), pystring); if (curoffset + pykeyposLen <= m_cursorPos) { curoffset += pykeyposLen; charcurpos += strlen(pystring); } else { int diff = m_cursorPos - curoffset; curoffset = m_cursorPos; size_t len = fcitx_utf8_strlen(pystring); if (diff > len) charcurpos += strlen(pystring); else { charcurpos += fcitx_utf8_get_nth_char(pystring, diff) - pystring; } } g_free(pystring); break; } } if (breakAhead) { break; } // assertion would happen if pinyin string is sth like "xi'" // so we use breakAhead to track such case. It's ugly but also works. size_t nexti; if (pinyin_get_right_pinyin_offset(m_inst, i, &nexti)) { i = nexti; } else { break; } } int buflen = m_buf.size(); if (lastpos < buflen) { if (FcitxMessagesGetMessageCount(FcitxInputStateGetPreedit(input))) { FcitxMessagesMessageConcatLast(FcitxInputStateGetPreedit(input), " "); if (lastpos < m_cursorPos) charcurpos ++; } for (int i = lastpos; i < buflen; i ++) { char temp[2] = {'\0', '\0'}; temp[0] = m_buf[i]; FcitxMessagesMessageConcatLast(FcitxInputStateGetPreedit(input), temp); if (lastpos < m_cursorPos) { charcurpos ++; lastpos++; } } } FcitxInputStateSetCursorPos(input, charcurpos); } std::string FcitxLibPinyin::sentence(guint8 index) { char* sentence = NULL; pinyin_get_sentence(m_inst, index, &sentence); std::string result = sentence ? sentence : ""; g_free(sentence); return result; } /** * @brief function DoInput has done everything for us. * * @param searchMode * @return INPUT_RETURN_VALUE **/ INPUT_RETURN_VALUE FcitxLibPinyinGetCandWords(void* arg) { FcitxLibPinyin* libpinyin = (FcitxLibPinyin*)arg; return libpinyin->getCandWords(); } INPUT_RETURN_VALUE FcitxLibPinyin::getCandWords() { FcitxInstance* instance = m_owner->owner; FcitxInputState* input = FcitxInstanceGetInputState(instance); FcitxGlobalConfig* config = FcitxInstanceGetGlobalConfig(m_owner->owner); FcitxLibPinyinConfig* pyConfig = &m_owner->config; struct _FcitxCandidateWordList* candList = FcitxInputStateGetCandidateList(input); FcitxCandidateWordSetPageSize(candList, config->iMaxCandWord); FcitxUICloseInputWindow(instance); strcpy(FcitxInputStateGetRawInputBuffer(input), m_buf.c_str()); FcitxInputStateSetRawInputBufferSize(input, m_buf.size()); FcitxInputStateSetShowCursor(input, true); FcitxInputStateSetClientCursorPos(input, 0); if (m_type == LPT_Zhuyin) { FcitxKeyState state = candidateModifierMap[pyConfig->candidateModifiers]; FcitxCandidateWordSetChooseAndModifier(candList, "1234567890", state); } else FcitxCandidateWordSetChoose(candList, "1234567890"); /* add punc */ if (m_type == LPT_Zhuyin && m_buf.size() == 1 && LibPinyinCheckZhuyinKey((FcitxKeySym) m_buf[0], pyConfig->zhuyinLayout, pyConfig->useTone) && (m_buf[0] >= ' ' && m_buf[0] <= '\x7e') /* simple */ && !(m_buf[0] >= 'a' && m_buf[0] <= 'z') /* not a-z */ && !(m_buf[0] >= 'A' && m_buf[0] <= 'Z') /* not A-Z /*/ && !(m_buf[0] >= '0' && m_buf[0] <= '9') /* not digit */ ) { int c = m_buf[0]; char* result = FcitxPuncGetPunc(instance, &c); if (result) { FcitxCandidateWord candWord; FcitxLibPinyinCandWord* pyCand = (FcitxLibPinyinCandWord*) fcitx_utils_malloc0(sizeof(FcitxLibPinyinCandWord)); pyCand->ispunc = true; candWord.callback = FcitxLibPinyinGetCandWord; candWord.extraType = MSG_OTHER; candWord.owner = this; candWord.priv = pyCand; candWord.strExtra = NULL; candWord.strWord = strdup(result); candWord.wordType = MSG_OTHER; FcitxCandidateWordAppend(FcitxInputStateGetCandidateList(input), &candWord); } } pinyin_guess_sentence(m_inst); const std::string sentence = this->sentence(0); if (!sentence.empty()) { updatePreedit(sentence.c_str()); FcitxMessagesAddMessageAtLast(FcitxInputStateGetClientPreedit(input), MSG_INPUT, "%s", sentence.c_str()); if (m_buf.size() >= m_parsedLen) { FcitxMessagesAddMessageAtLast(FcitxInputStateGetClientPreedit(input), MSG_INPUT, "%s", m_buf.substr(m_parsedLen).c_str()); } } else { FcitxInputStateSetCursorPos(input, m_cursorPos); FcitxMessagesAddMessageAtLast(FcitxInputStateGetClientPreedit(input), MSG_INPUT, "%s", m_buf.c_str()); FcitxMessagesAddMessageAtLast(FcitxInputStateGetPreedit(input), MSG_INPUT, "%s", m_buf.c_str()); } if (pinyinOffset() < m_parsedLen) { pinyin_guess_candidates(m_inst, pinyinOffset(), FcitxLibPinyinTransSortOption(pyConfig->sort)); guint candidateLen = 0; pinyin_get_n_candidate(m_inst, &candidateLen); int i = 0; for (i = 0 ; i < candidateLen; i ++) { lookup_candidate_t* token = NULL; pinyin_get_candidate(m_inst, i, &token); FcitxCandidateWord candWord; FcitxLibPinyinCandWord* pyCand = (FcitxLibPinyinCandWord*) fcitx_utils_malloc0(sizeof(FcitxLibPinyinCandWord)); pyCand->ispunc = false; pyCand->idx = i; candWord.callback = FcitxLibPinyinGetCandWord; candWord.extraType = MSG_OTHER; candWord.owner = this; candWord.priv = pyCand; candWord.strExtra = NULL; const gchar* phrase_string = NULL; pinyin_get_candidate_string(m_inst, token, &phrase_string); candWord.strWord = strdup(phrase_string); candWord.wordType = MSG_OTHER; FcitxCandidateWordAppend(FcitxInputStateGetCandidateList(input), &candWord); } } else { FcitxCandidateWord candWord; FcitxLibPinyinCandWord* pyCand = (FcitxLibPinyinCandWord*) fcitx_utils_malloc0(sizeof(FcitxLibPinyinCandWord)); pyCand->ispunc = false; pyCand->idx = -1; candWord.callback = FcitxLibPinyinGetCandWord; candWord.extraType = MSG_OTHER; candWord.owner = this; candWord.priv = pyCand; candWord.strExtra = NULL; std::string cand; if (m_buf.size() >= m_parsedLen) { cand += m_buf.substr(m_parsedLen); } candWord.strWord = strdup(cand.c_str()); candWord.wordType = MSG_OTHER; FcitxCandidateWordAppend(FcitxInputStateGetCandidateList(input), &candWord); } return IRV_DISPLAY_CANDWORDS; } /** * @brief get the candidate word by index * * @param iIndex index of candidate word * @return the string of canidate word **/ INPUT_RETURN_VALUE FcitxLibPinyinGetCandWord(void* arg, FcitxCandidateWord* candWord) { FcitxLibPinyin* libpinyin = (FcitxLibPinyin*)arg; return libpinyin->getCandWord(candWord); } INPUT_RETURN_VALUE FcitxLibPinyin::getCandWord(FcitxCandidateWord* candWord) { FcitxLibPinyinCandWord* pyCand = (FcitxLibPinyinCandWord*) candWord->priv; FcitxInstance* instance = m_owner->owner; FcitxInputState* input = FcitxInstanceGetInputState(instance); if (pyCand->ispunc) { strcpy(FcitxInputStateGetOutputString(input), candWord->strWord); return IRV_COMMIT_STRING; } else if (pyCand->idx < 0) { strcpy(FcitxInputStateGetOutputString(input), (sentence(0) + candWord->strWord).c_str()); return IRV_COMMIT_STRING; } else { guint candidateLen = 0; pinyin_get_n_candidate(m_inst, &candidateLen); if (candidateLen <= pyCand->idx) return IRV_TO_PROCESS; lookup_candidate_t* cand = NULL; pinyin_get_candidate(m_inst, pyCand->idx, &cand); int newOffset = pinyin_choose_candidate(m_inst, pinyinOffset(), cand); if (newOffset != pinyinOffset()) { const gchar* phrase_string = NULL; pinyin_get_candidate_string(m_inst, cand, &phrase_string); m_fixedString.push_back(std::make_pair(offset() + fcitx_utf8_strlen(phrase_string), newOffset)); } if (pinyinOffset() == m_parsedLen) { if (m_parsedLen == m_buf.size()) { pinyin_guess_sentence(m_inst); const std::string sentence = this->sentence(0); if (!sentence.empty()) { strcpy(FcitxInputStateGetOutputString(input), sentence.c_str()); pinyin_train(m_inst, 0); } else strcpy(FcitxInputStateGetOutputString(input), ""); return IRV_COMMIT_STRING; } } int pyoffset = pinyinOffset(); if (pyoffset > m_cursorPos) m_cursorPos = pyoffset; return IRV_DISPLAY_CANDWORDS; } return IRV_TO_PROCESS; } FcitxLibPinyin::FcitxLibPinyin(FcitxLibPinyinAddonInstance* libpinyinaddon, LIBPINYIN_TYPE type) : m_inst(NULL), m_type(type), m_owner(libpinyinaddon) { } FcitxLibPinyin::~FcitxLibPinyin() { if (m_inst) pinyin_free_instance(m_inst); } void* LibPinyinSavePinyinWord(void* arg, FcitxModuleFunctionArg args) { FcitxLibPinyinAddonInstance* libpinyinaddon = (FcitxLibPinyinAddonInstance*) arg; FcitxIM* im = FcitxInstanceGetCurrentIM(libpinyinaddon->owner); pinyin_context_t* context = NULL; if (strcmp(im->uniqueName, "pinyin-libpinyin") == 0 || strcmp(im->uniqueName, "shuangpin-libpinyin") == 0) { context = libpinyinaddon->pinyin_context; } if (!context) return NULL; FcitxLibPinyin* libpinyin = (FcitxLibPinyin*) im->klass; libpinyin->savePinyinWord(static_cast(args.args[0])); return NULL; } void FcitxLibPinyin::savePinyinWord(const char* str) { // valid non empty utf8 string if (fcitx_utf8_check_string(str) && *str) { const char *s = str; while (*s) { uint32_t chr; s = fcitx_utf8_get_char(s, &chr); // ok ok, let's filter out ascii if (chr < 256) { return; } } pinyin_remember_user_input(m_inst, str, -1); } } /** * @brief initialize the extra input method * * @param arg * @return successful or not **/ void* FcitxLibPinyinCreate(FcitxInstance* instance) { FcitxLibPinyinAddonInstance* libpinyinaddon = (FcitxLibPinyinAddonInstance*) fcitx_utils_malloc0(sizeof(FcitxLibPinyinAddonInstance)); bindtextdomain("fcitx-libpinyin", LOCALEDIR); bind_textdomain_codeset("fcitx-libpinyin", "UTF-8"); libpinyinaddon->owner = instance; FcitxAddon* addon = FcitxAddonsGetAddonByName(FcitxInstanceGetAddons(instance), "fcitx-libpinyin"); if (!FcitxLibPinyinConfigLoadConfig(&libpinyinaddon->config)) { free(libpinyinaddon); return NULL; } libpinyinaddon->pinyin = new FcitxLibPinyin(libpinyinaddon, LPT_Pinyin); libpinyinaddon->shuangpin = new FcitxLibPinyin(libpinyinaddon, LPT_Shuangpin); libpinyinaddon->zhuyin = new FcitxLibPinyin(libpinyinaddon, LPT_Zhuyin); FcitxLibPinyinReconfigure(libpinyinaddon); FcitxInstanceRegisterIM(instance, libpinyinaddon->pinyin, "pinyin-libpinyin", _("Pinyin (LibPinyin)"), "pinyin-libpinyin", FcitxLibPinyinInit, FcitxLibPinyinReset, FcitxLibPinyinDoInput, FcitxLibPinyinGetCandWords, NULL, FcitxLibPinyinSave, NULL, NULL, 5, libpinyinaddon->config.bTraditionalDataForPinyin ? "zh_TW" : "zh_CN" ); FcitxInstanceRegisterIM(instance, libpinyinaddon->shuangpin, "shuangpin-libpinyin", _("Shuangpin (LibPinyin)"), "shuangpin-libpinyin", FcitxLibPinyinInit, FcitxLibPinyinReset, FcitxLibPinyinDoInput, FcitxLibPinyinGetCandWords, NULL, FcitxLibPinyinSave, NULL, NULL, 5, libpinyinaddon->config.bTraditionalDataForPinyin ? "zh_TW" : "zh_CN" ); FcitxInstanceRegisterIM(instance, libpinyinaddon->zhuyin, "zhuyin-libpinyin", _("Bopomofo (LibPinyin)"), "bopomofo", FcitxLibPinyinInit, FcitxLibPinyinReset, FcitxLibPinyinDoInput, FcitxLibPinyinGetCandWords, NULL, FcitxLibPinyinSave, NULL, NULL, 5, libpinyinaddon->config.bSimplifiedDataForZhuyin ? "zh_CN" : "zh_TW" ); FcitxModuleAddFunction(addon, LibPinyinSavePinyinWord); libpinyinaddon->bus = new FcitxLibPinyinBus(libpinyinaddon); return libpinyinaddon; } /** * @brief Destroy the input method while unload it. * * @return int **/ void FcitxLibPinyinDestroy(void* arg) { FcitxLibPinyinAddonInstance* libpinyin = (FcitxLibPinyinAddonInstance*) arg; delete libpinyin->pinyin; delete libpinyin->zhuyin; delete libpinyin->shuangpin; if (libpinyin->pinyin_context) pinyin_fini(libpinyin->pinyin_context); if (libpinyin->zhuyin_context) pinyin_fini(libpinyin->zhuyin_context); delete libpinyin->bus; free(libpinyin); } void FcitxLibPinyinReconfigure(FcitxLibPinyinAddonInstance* libpinyinaddon) { FcitxLibPinyinConfig* config = &libpinyinaddon->config; if (libpinyinaddon->zhuyin_context) { pinyin_set_zhuyin_scheme(libpinyinaddon->zhuyin_context, FcitxLibPinyinTransZhuyinLayout(config->zhuyinLayout)); for (int i = 0; i <= FCITX_ZHUYIN_DICT_LAST; i++) { if (config->dict_zhuyin[i]) { pinyin_load_addon_phrase_library(libpinyinaddon->zhuyin_context, FcitxLibPinyinTransZhuyinDictionary(static_cast(i))); } else { pinyin_unload_addon_phrase_library(libpinyinaddon->zhuyin_context, FcitxLibPinyinTransZhuyinDictionary(static_cast(i))); } } } if (libpinyinaddon->pinyin_context) { pinyin_set_double_pinyin_scheme(libpinyinaddon->pinyin_context, FcitxLibPinyinTransShuangpinScheme(config->spScheme)); for (int i = 0; i <= FCITX_DICT_LAST; i++) { if (config->dict[i]) { pinyin_load_addon_phrase_library(libpinyinaddon->pinyin_context, FcitxLibPinyinTransDictionary(static_cast(i))); } else { pinyin_unload_addon_phrase_library(libpinyinaddon->pinyin_context, FcitxLibPinyinTransDictionary(static_cast(i))); } } } pinyin_option_t settings = 0; settings |= DYNAMIC_ADJUST; settings |= USE_DIVIDED_TABLE | USE_RESPLIT_TABLE; for (int i = 0; i <= FCITX_CR_LAST; i ++) { if (config->cr[i]) settings |= FcitxLibPinyinTransCorrection((FCITX_CORRECTION) i); } for (int i = 0; i <= FCITX_AMB_LAST; i ++) { if (config->amb[i]) settings |= FcitxLibPinyinTransAmbiguity((FCITX_AMBIGUITY) i); } if (config->incomplete) { settings |= PINYIN_INCOMPLETE; } if (config->zhuyinIncomplete) { settings |= ZHUYIN_INCOMPLETE; } if (config->useTone) { settings |= USE_TONE; } settings |= IS_PINYIN; settings |= IS_ZHUYIN; if (libpinyinaddon->pinyin_context) pinyin_set_options(libpinyinaddon->pinyin_context, settings); if (libpinyinaddon->zhuyin_context) pinyin_set_options(libpinyinaddon->zhuyin_context, settings); } void FcitxLibPinyinReloadConfig(void* arg) { FcitxLibPinyinAddonInstance* libpinyinaddon = (FcitxLibPinyinAddonInstance*) arg; FcitxLibPinyinConfigLoadConfig(&libpinyinaddon->config); FcitxLibPinyinReconfigure(libpinyinaddon); } void FcitxLibPinyinSave(void* arg) { FcitxLibPinyin* libpinyin = (FcitxLibPinyin*) arg; libpinyin->save(); } void FcitxLibPinyin::save() { if (m_owner->zhuyin_context) pinyin_save(m_owner->zhuyin_context); if (m_owner->pinyin_context) pinyin_save(m_owner->pinyin_context); } void FcitxLibPinyin::clearData(int type) { FcitxLibPinyinAddonInstance* libpinyinaddon = m_owner; reset(); pinyin_context_t* context = m_type != LPT_Zhuyin ? libpinyinaddon->pinyin_context : libpinyinaddon->zhuyin_context; if (!context) { return; } switch (type) { case 0: pinyin_mask_out(context, PHRASE_INDEX_LIBRARY_MASK, PHRASE_INDEX_MAKE_TOKEN(USER_DICTIONARY, null_token)); pinyin_mask_out(context, PHRASE_INDEX_LIBRARY_MASK, PHRASE_INDEX_MAKE_TOKEN(ADDON_DICTIONARY, null_token)); break; case 1: pinyin_mask_out(context, PHRASE_INDEX_LIBRARY_MASK, PHRASE_INDEX_MAKE_TOKEN(NETWORK_DICTIONARY, null_token)); break; case 2: pinyin_mask_out(context, 0, 0); break; } pinyin_train(m_inst, 0); pinyin_save(context); } void FcitxLibPinyin::import() { FcitxLibPinyinAddonInstance* libpinyinaddon = m_owner; reset(); load(); LIBPINYIN_LANGUAGE_TYPE langType = m_type == LPT_Zhuyin ? (libpinyinaddon->config.bSimplifiedDataForZhuyin ? LPLT_Simplified : LPLT_Traditional) : (libpinyinaddon->config.bTraditionalDataForPinyin ? LPLT_Traditional : LPLT_Simplified); pinyin_context_t* context = m_type != LPT_Zhuyin ? libpinyinaddon->pinyin_context : libpinyinaddon->zhuyin_context; if (!context) return; const char* path = langType == LPLT_Simplified ? "libpinyin/importdict" : "libpinyin/importdict_zhuyin"; pinyin_mask_out(context, PHRASE_INDEX_LIBRARY_MASK, PHRASE_INDEX_MAKE_TOKEN(NETWORK_DICTIONARY, null_token)); import_iterator_t* iter = pinyin_begin_add_phrases(context, NETWORK_DICTIONARY); if (iter == NULL) { return; } FcitxStringHashSet* sset = FcitxXDGGetFiles(path, NULL, ".txt"); HASH_FOREACH(str, sset, FcitxStringHashSet) { /* user phrase library should be already loaded here. */ FILE* dictfile = FcitxXDGGetFileWithPrefix(path, str->name, "r", NULL); if (NULL == dictfile) { continue; } char* linebuf = NULL; size_t size = 0; while (getline(&linebuf, &size, dictfile) != -1) { if (0 == strlen(linebuf)) continue; if ('\n' == linebuf[strlen(linebuf) - 1]) { linebuf[strlen(linebuf) - 1] = '\0'; } gchar** items = g_strsplit_set(linebuf, " \t", 3); guint len = g_strv_length(items); do { gchar* phrase = NULL, * pinyin = NULL; gint count = -1; if (2 == len || 3 == len) { phrase = items[0]; pinyin = items[1]; if (3 == len) count = atoi(items[2]); } else { break; } if (!fcitx_utf8_check_string(phrase)) { continue; } pinyin_iterator_add_phrase(iter, phrase, pinyin, count); } while (0); g_strfreev(items); } free(linebuf); fclose(dictfile); } pinyin_end_add_phrases(iter); if (m_inst) { pinyin_train(m_inst, 0); } pinyin_save(context); } // kate: indent-mode cstyle; indent-width 4; replace-tabs on; fcitx-libpinyin-0.5.3/src/eim.h000066400000000000000000000141061315660135300163460ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2010~2011 by CSSlayer * * wengxt@gmail.com * * * * 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 2 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef EIM_H #define EIM_H #include #include #include #include #include #include #include #include "bus.h" #include "common.h" #define MAX_PINYIN_INPUT 60 #define _(x) dgettext("fcitx-libpinyin", (x)) class FcitxWindowHandler; /* * the reason that not using libpinyin enum here * 1. libpinyin seems cannot make enum stable (from their header) * 2. the range is not continuous, so make a translate layer */ enum FCITX_ZHUYIN_LAYOUT { FCITX_ZHUYIN_STANDARD = 0, FCITX_ZHUYIN_IBM = 1, FCITX_ZHUYIN_GIN_YIEH = 2, FCITX_ZHUYIN_ET = 3 }; enum FCITX_SHUANGPIN_SCHEME { FCITX_SHUANG_PIN_ZRM = 0, FCITX_SHUANG_PIN_MS = 1, FCITX_SHUANG_PIN_ZIGUANG = 2, FCITX_SHUANG_PIN_ABC = 3, FCITX_SHUANG_PIN_PYJJ = 4, FCITX_SHUANG_PIN_XHE = 5 }; enum FCITX_CORRECTION { FCITX_CR_V_U, FCITX_CR_GN_NG, FCITX_CR_MG_NG, FCITX_CR_IOU_IU, FCITX_CR_UEI_UI, FCITX_CR_UEN_UN, FCITX_CR_UE_VE, FCITX_CR_ON_ONG, FCITX_CR_LAST = FCITX_CR_ON_ONG }; enum FCITX_DICTIONARY { FCITX_DICT_ART, FCITX_DICT_CULTURE, FCITX_DICT_ECONOMY, FCITX_DICT_GEOLOGY, FCITX_DICT_HISTORY, FCITX_DICT_LIFE, FCITX_DICT_NATURE, FCITX_DICT_PEOPLE, FCITX_DICT_SCIENCE, FCITX_DICT_SOCIETY, FCITX_DICT_SPORT, FCITX_DICT_TECHNOLOGY, FCITX_DICT_LAST = FCITX_DICT_TECHNOLOGY }; enum FCITX_ZHUYIN_DICTIONARY { FCITX_ZHUYIN_DICT_ART, FCITX_ZHUYIN_DICT_CULTURE, FCITX_ZHUYIN_DICT_ECONOMY, FCITX_ZHUYIN_DICT_GEOLOGY, FCITX_ZHUYIN_DICT_HISTORY, FCITX_ZHUYIN_DICT_LIFE, FCITX_ZHUYIN_DICT_NATURE, FCITX_ZHUYIN_DICT_SCITECH, FCITX_ZHUYIN_DICT_SOCIETY, FCITX_ZHUYIN_DICT_SPORT, FCITX_ZHUYIN_DICT_LAST = FCITX_ZHUYIN_DICT_SPORT }; enum FCITX_AMBIGUITY { FCITX_AMB_CiChi, FCITX_AMB_ZiZhi, FCITX_AMB_SiShi, FCITX_AMB_LeNe, FCITX_AMB_FoHe, FCITX_AMB_LeRi, FCITX_AMB_GeKe, FCITX_AMB_AnAng, FCITX_AMB_EnEng, FCITX_AMB_InIng, FCITX_AMB_LAST = FCITX_AMB_InIng }; enum FCITX_ZHUYIN_MODIFIERS { FZM_Ctrl = 0, FZM_Alt = 1, FZM_Shift = 2, }; enum FCITX_LIBPINYIN_SORT { FLS_PhraseLengthAndFreq, FLS_PhraseLengthAndPinyinLengthAndFreq, }; struct FcitxLibPinyinConfig { FcitxGenericConfig gconfig; FCITX_ZHUYIN_LAYOUT zhuyinLayout; FCITX_SHUANGPIN_SCHEME spScheme; FCITX_ZHUYIN_MODIFIERS candidateModifiers; FCITX_LIBPINYIN_SORT sort; boolean amb[FCITX_AMB_LAST + 1]; boolean cr[FCITX_CR_LAST + 1]; boolean dict[FCITX_DICT_LAST + 1]; boolean dict_zhuyin[FCITX_ZHUYIN_DICT_LAST + 1]; boolean incomplete; boolean zhuyinIncomplete; boolean bTraditionalDataForPinyin; boolean bSimplifiedDataForZhuyin; boolean useTone; FcitxHotkey hkPrevPage[2]; FcitxHotkey hkNextPage[2]; }; #define BUF_SIZE 4096 CONFIG_BINDING_DECLARE(FcitxLibPinyinConfig); void* FcitxLibPinyinCreate(FcitxInstance* instance); void FcitxLibPinyinDestroy(void* arg); INPUT_RETURN_VALUE FcitxLibPinyinDoInput(void* arg, FcitxKeySym sym, unsigned int state); INPUT_RETURN_VALUE FcitxLibPinyinGetCandWords (void *arg); INPUT_RETURN_VALUE FcitxLibPinyinGetCandWord (void *arg, FcitxCandidateWord* candWord); boolean FcitxLibPinyinInit(void*); void FcitxLibPinyinReloadConfig(void*); class FcitxLibPinyin; typedef struct _FcitxLibPinyinAddonInstance { FcitxLibPinyinConfig config; pinyin_context_t* pinyin_context; pinyin_context_t* zhuyin_context; FcitxLibPinyin* pinyin; FcitxLibPinyin* shuangpin; FcitxLibPinyin* zhuyin; FcitxInstance* owner; FcitxLibPinyinBus* bus; } FcitxLibPinyinAddonInstance; class FcitxLibPinyin { public: FcitxLibPinyin(FcitxLibPinyinAddonInstance* libpinyinaddon, LIBPINYIN_TYPE type); ~FcitxLibPinyin(); void import(); void clearData(int type); int offset() const; int pinyinOffset() const; void reset(); size_t parse(const char* str); INPUT_RETURN_VALUE doInput(FcitxKeySym sym, unsigned int state); void load(); INPUT_RETURN_VALUE getCandWords(); INPUT_RETURN_VALUE getCandWord(FcitxCandidateWord* candWord); std::string sentence(guint8 index); void init(); void updatePreedit(const std::string &sentence); void savePinyinWord(const char *str); void save(); private: pinyin_instance_t* m_inst; std::vector > m_fixedString; std::string m_buf; int m_cursorPos; int m_parsedLen; LIBPINYIN_TYPE m_type; FcitxLibPinyinAddonInstance* m_owner; }; #endif // kate: indent-mode cstyle; space-indent on; indent-width 0; fcitx-libpinyin-0.5.3/src/enummap.cpp000066400000000000000000000120121315660135300175630ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2011~2011 by CSSlayer * * wengxt@gmail.com * * * * 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 2 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include #include #include "enummap.h" PinyinAmbiguity2 FcitxLibPinyinTransAmbiguity(FCITX_AMBIGUITY ambiguity) { switch(ambiguity) { case FCITX_AMB_CiChi: return PINYIN_AMB_C_CH; case FCITX_AMB_ZiZhi: return PINYIN_AMB_Z_ZH; case FCITX_AMB_SiShi: return PINYIN_AMB_S_SH; case FCITX_AMB_LeNe: return PINYIN_AMB_L_N; case FCITX_AMB_FoHe: return PINYIN_AMB_F_H; case FCITX_AMB_LeRi: return PINYIN_AMB_L_R; case FCITX_AMB_GeKe: return PINYIN_AMB_G_K; case FCITX_AMB_AnAng: return PINYIN_AMB_AN_ANG; case FCITX_AMB_EnEng: return PINYIN_AMB_EN_ENG; case FCITX_AMB_InIng: return PINYIN_AMB_IN_ING; default: return PINYIN_AMB_ALL; } } PinyinCorrection2 FcitxLibPinyinTransCorrection(FCITX_CORRECTION correction) { switch(correction) { case FCITX_CR_V_U: return PINYIN_CORRECT_V_U; case FCITX_CR_GN_NG: return PINYIN_CORRECT_GN_NG; case FCITX_CR_MG_NG: return PINYIN_CORRECT_MG_NG; case FCITX_CR_IOU_IU: return PINYIN_CORRECT_IOU_IU; case FCITX_CR_UEI_UI: return PINYIN_CORRECT_UEI_UI; case FCITX_CR_UEN_UN: return PINYIN_CORRECT_UEN_UN; case FCITX_CR_UE_VE: return PINYIN_CORRECT_UE_VE; case FCITX_CR_ON_ONG: return PINYIN_CORRECT_ON_ONG; default: return PINYIN_CORRECT_ALL; } } DoublePinyinScheme FcitxLibPinyinTransShuangpinScheme(FCITX_SHUANGPIN_SCHEME scheme) { switch(scheme) { case FCITX_SHUANG_PIN_ZRM: return DOUBLE_PINYIN_ZRM; case FCITX_SHUANG_PIN_MS: return DOUBLE_PINYIN_MS; case FCITX_SHUANG_PIN_ZIGUANG: return DOUBLE_PINYIN_ZIGUANG; case FCITX_SHUANG_PIN_ABC: return DOUBLE_PINYIN_ABC; case FCITX_SHUANG_PIN_PYJJ: return DOUBLE_PINYIN_PYJJ; case FCITX_SHUANG_PIN_XHE: return DOUBLE_PINYIN_XHE; default: return DOUBLE_PINYIN_ZRM; } } ZhuyinScheme FcitxLibPinyinTransZhuyinLayout(FCITX_ZHUYIN_LAYOUT layout) { switch(layout) { case FCITX_ZHUYIN_STANDARD: return ZHUYIN_STANDARD; case FCITX_ZHUYIN_IBM: return ZHUYIN_IBM; case FCITX_ZHUYIN_GIN_YIEH: return ZHUYIN_GINYIEH; case FCITX_ZHUYIN_ET: return ZHUYIN_ETEN; default: return ZHUYIN_STANDARD; } } static const int dictMap[] = { 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, }; int FcitxLibPinyinTransDictionary(FCITX_DICTIONARY dict) { int sz = sizeof(dictMap) / sizeof(dictMap[0]); int sz2 = FCITX_DICT_LAST + 1; assert(sz == sz2); return dictMap[dict]; } static const int dictMapZhuyin[] = { 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; int FcitxLibPinyinTransZhuyinDictionary(FCITX_ZHUYIN_DICTIONARY dict) { int sz = sizeof(dictMapZhuyin) / sizeof(dictMapZhuyin[0]); int sz2 = FCITX_ZHUYIN_DICT_LAST + 1; assert(sz == sz2); return dictMapZhuyin[dict]; } sort_option_t FcitxLibPinyinTransSortOption(FCITX_LIBPINYIN_SORT sort) { switch(sort) { case FLS_PhraseLengthAndFreq: return SORT_BY_PHRASE_LENGTH_AND_FREQUENCY; case FLS_PhraseLengthAndPinyinLengthAndFreq: default: return SORT_BY_PHRASE_LENGTH_AND_PINYIN_LENGTH_AND_FREQUENCY; } } fcitx-libpinyin-0.5.3/src/enummap.h000066400000000000000000000040151315660135300172340ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2011~2011 by CSSlayer * * wengxt@gmail.com * * * * 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 2 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef ENUMMAP_H #define ENUMMAP_H #include #include "eim.h" ZhuyinScheme FcitxLibPinyinTransZhuyinLayout(FCITX_ZHUYIN_LAYOUT layout); DoublePinyinScheme FcitxLibPinyinTransShuangpinScheme(FCITX_SHUANGPIN_SCHEME scheme); PinyinAmbiguity2 FcitxLibPinyinTransAmbiguity(FCITX_AMBIGUITY ambiguity); PinyinCorrection2 FcitxLibPinyinTransCorrection(FCITX_CORRECTION correction); int FcitxLibPinyinTransDictionary(FCITX_DICTIONARY dict); int FcitxLibPinyinTransZhuyinDictionary(FCITX_ZHUYIN_DICTIONARY dict); sort_option_t FcitxLibPinyinTransSortOption(FCITX_LIBPINYIN_SORT sort); #endif fcitx-libpinyin-0.5.3/src/fcitx-libpinyin.conf.in000066400000000000000000000004161315660135300220060ustar00rootroot00000000000000[Addon] Name=fcitx-libpinyin _GeneralName=LibPinyin _Comment=LibPinyin Wrapper For Fcitx Category=InputMethod Enabled=True Library=fcitx-libpinyin.so Type=SharedLibrary IMRegisterMethod=ConfigFile SubConfig=Dictionary:plugin:libpinyin-dictmanager,fcitx-libpinyin:domain fcitx-libpinyin-0.5.3/src/fcitx-libpinyin.desc000066400000000000000000000104611315660135300213730ustar00rootroot00000000000000[Pinyin/Incomplete] Description=Use Incomplete pinyin Type=Boolean DefaultValue=True [Pinyin/UseTraditionalChineseData] Description=Use Traditional Chinese Data for Pinyin and Shuangpin (Need Restart) Type=Boolean DefaultValue=False [Zhuyin/UseTone] Description=Use Tone Type=Boolean DefaultValue=True [Zhuyin/Incomplete] Description=Use Incomplete Zhuyin Type=Boolean DefaultValue=True [Zhuyin/Layout] Description=Zhuyin Layout Type=Enum Enum0=Standard Enum1=IBM Enum2=GinYieh Enum3=ET EnumCount=4 DefaultValue=Standard [Zhuyin/CandidateModifiers] Description=Zhuyin candidate choosing modifiers Type=Enum Enum0=Ctrl Enum1=Alt Enum2=Shift EnumCount=3 DefaultValue=Alt [Zhuyin/PrevPage] Description=Zhuyin Prev Page Type=Hotkey DefaultValue=PGUP UP [Zhuyin/NextPage] Description=Zhuyin Next Page Type=Hotkey DefaultValue=PGDN DOWN [Zhuyin/UseSimplifiedChineseData] Description=Use Simplified Chinese Data for Zhuyin (Need Restart) Type=Boolean DefaultValue=False [Shuangpin/Scheme] Description=Shuangpin Scheme Type=Enum Enum0=Ziranma Enum1=Microsoft Enum2=ZiGuang Enum3=ABC Enum4=PinyinJiaJia Enum5=XiaoHe EnumCount=6 DefaultValue=Ziranma [Correction/VU] Description=V -> U Type=Boolean DefaultValue=False [Correction/GNNG] Description=GN -> NG Type=Boolean DefaultValue=True [Correction/MGNG] Description=MG -> NG Type=Boolean DefaultValue=False [Correction/IOUIU] Description=IOU -> IU Type=Boolean DefaultValue=False [Correction/UEIUI] Description=UEI -> UI Type=Boolean DefaultValue=False [Correction/UENUN] Description=UEN -> UN Type=Boolean DefaultValue=False [Correction/UEVE] Description=UE -> VE Type=Boolean DefaultValue=False [Correction/ONONG] Description=ON -> ONG Type=Boolean DefaultValue=False [Ambiguity/Sort] Description=Sort method Type=Enum DefaultValue=By Phrase Length and Pinyin Length and Frequency Enum0=By Phrase Length and Frequency Enum1=By Phrase Length and Pinyin Length and Frequency EnumCount=2 [Ambiguity/CiChi] Description=Ci <-> Chi Type=Boolean DefaultValue=False [Ambiguity/ZiZhi] Description=Zi <-> Zhi Type=Boolean DefaultValue=False [Ambiguity/SiShi] Description=Si <-> Shi Type=Boolean DefaultValue=False [Ambiguity/LeNe] Description=Ne <-> Le Type=Boolean DefaultValue=False [Ambiguity/FoHe] Description=Fo <-> He Type=Boolean DefaultValue=False [Ambiguity/LeRi] Description=Le <-> Ri Type=Boolean DefaultValue=False [Ambiguity/GeKe] Description=Ge <-> Ke Type=Boolean DefaultValue=False [Ambiguity/AnAng] Description=An <-> Ang Type=Boolean DefaultValue=False [Ambiguity/EnEng] Description=En <-> Eng Type=Boolean DefaultValue=False [Ambiguity/InIng] Description=In <-> Ing Type=Boolean DefaultValue=False [Dictionary/Art] Description=Art Type=Boolean DefaultValue=False [Dictionary/Culture] Description=Culture Type=Boolean DefaultValue=False [Dictionary/Economy] Description=Economy Type=Boolean DefaultValue=False [Dictionary/Geology] Description=Geology Type=Boolean DefaultValue=False [Dictionary/History] Description=History Type=Boolean DefaultValue=False [Dictionary/Life] Description=Life Type=Boolean DefaultValue=False [Dictionary/Nature] Description=Nature Type=Boolean DefaultValue=False [Dictionary/People] Description=People Type=Boolean DefaultValue=False [Dictionary/Science] Description=Science Type=Boolean DefaultValue=False [Dictionary/Society] Description=Society Type=Boolean DefaultValue=False [Dictionary/Sport] Description=Sport Type=Boolean DefaultValue=False [Dictionary/Technology] Description=Technology Type=Boolean DefaultValue=False [Dictionary Zhuyin/Art] Description=Art Type=Boolean DefaultValue=False [Dictionary Zhuyin/Culture] Description=Culture Type=Boolean DefaultValue=False [Dictionary Zhuyin/Economy] Description=Economy Type=Boolean DefaultValue=False [Dictionary Zhuyin/Geology] Description=Geology Type=Boolean DefaultValue=False [Dictionary Zhuyin/History] Description=History Type=Boolean DefaultValue=False [Dictionary Zhuyin/Life] Description=Life Type=Boolean DefaultValue=False [Dictionary Zhuyin/Nature] Description=Nature Type=Boolean DefaultValue=False [Dictionary Zhuyin/Scitech] Description=Science & Technology Type=Boolean DefaultValue=False [Dictionary Zhuyin/Society] Description=Society Type=Boolean DefaultValue=False [Dictionary Zhuyin/Sport] Description=Sport Type=Boolean DefaultValue=False [DescriptionFile] LocaleDomain=fcitx-libpinyin fcitx-libpinyin-0.5.3/src/pinyin-libpinyin.conf.in000066400000000000000000000002031315660135300221710ustar00rootroot00000000000000[InputMethod] UniqueName=pinyin-libpinyin _Name=Pinyin (LibPinyin) IconName=pinyin Priority=1 LangCode=zh_CN Parent=fcitx-libpinyinfcitx-libpinyin-0.5.3/src/shuangpin-libpinyin.conf.in000066400000000000000000000002141315660135300226610ustar00rootroot00000000000000[InputMethod] UniqueName=shuangpin-libpinyin _Name=Shuangpin (LibPinyin) IconName=shuangpin Priority=1 LangCode=zh_CN Parent=fcitx-libpinyinfcitx-libpinyin-0.5.3/src/utils.cpp000066400000000000000000000030071315660135300172650ustar00rootroot00000000000000#include "common.h" #include "config.h" #include #include char* FcitxLibPinyinGetSysPath(LIBPINYIN_LANGUAGE_TYPE type) { char* syspath = NULL; #ifdef LIBPINYIN_TOOLS_FOUND if (type == LPLT_Simplified) { #endif /* portable detect here */ if (getenv("FCITXDIR")) { syspath = fcitx_utils_get_fcitx_path_with_filename("datadir", "libpinyin/data"); } else { syspath = strdup(LIBPINYIN_PKGDATADIR "/data"); } #ifdef LIBPINYIN_TOOLS_FOUND } else { /* portable detect here */ if (getenv("FCITXDIR")) { syspath = fcitx_utils_get_fcitx_path_with_filename("pkgdatadir", "libpinyin/zhuyin_data"); } else { syspath = strdup(FCITX_LIBPINYIN_ZHUYIN_DATADIR); } } #endif return syspath; } char* FcitxLibPinyinGetUserPath(LIBPINYIN_LANGUAGE_TYPE type) { char* user_path = NULL; #ifdef LIBPINYIN_TOOLS_FOUND if (type == LPLT_Simplified) { #endif FILE* fp = FcitxXDGGetFileUserWithPrefix("libpinyin", "data/.place_holder", "w", NULL); if (fp) fclose(fp); FcitxXDGGetFileUserWithPrefix("libpinyin", "data", NULL, &user_path); #ifdef LIBPINYIN_TOOLS_FOUND } else { FILE* fp = FcitxXDGGetFileUserWithPrefix("libpinyin", "zhuyin_data/.place_holder", "w", NULL); if (fp) fclose(fp); FcitxXDGGetFileUserWithPrefix("libpinyin", "zhuyin_data", NULL, &user_path); } #endif return user_path; } fcitx-libpinyin-0.5.3/src/utils.h000066400000000000000000000003421315660135300167310ustar00rootroot00000000000000#ifndef FCITX_LIBPINYIN_UTILS_H #define FCITX_LIBPINYIN_UTILS_H char* FcitxLibPinyinGetSysPath(LIBPINYIN_LANGUAGE_TYPE type); char* FcitxLibPinyinGetUserPath(LIBPINYIN_LANGUAGE_TYPE type); #endif // FCITX_LIBPINYIN_UTILS_H fcitx-libpinyin-0.5.3/src/zhuyin-libpinyin.conf.in000066400000000000000000000002071315660135300222150ustar00rootroot00000000000000[InputMethod] UniqueName=zhuyin-libpinyin _Name=Bopomofo (LibPinyin) IconName=bopomofo Priority=1 LangCode=zh_TW Parent=fcitx-libpinyin