├── .clang-format ├── .github └── workflows │ └── check.yml ├── .gitignore ├── AUTHORS ├── CMakeLists.txt ├── INSTALL ├── LICENSES └── LGPL-2.1-or-later.txt ├── Messages.sh ├── README.md ├── data ├── 16x16 │ └── apps │ │ ├── fcitx-chewing.png │ │ └── org.fcitx.Fcitx5.fcitx-chewing.png ├── 22x22 │ └── apps │ │ ├── fcitx-chewing.png │ │ └── org.fcitx.Fcitx5.fcitx-chewing.png ├── 24x24 │ └── apps │ │ ├── fcitx-chewing.png │ │ └── org.fcitx.Fcitx5.fcitx-chewing.png ├── 48x48 │ └── apps │ │ ├── fcitx-chewing.png │ │ └── org.fcitx.Fcitx5.fcitx-chewing.png └── CMakeLists.txt ├── org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in ├── po ├── CMakeLists.txt ├── LINGUAS ├── ca.po ├── da.po ├── de.po ├── fcitx5-chewing.pot ├── he.po ├── ja.po ├── ko.po ├── ru.po ├── tr.po ├── vi.po ├── zh_CN.po └── zh_TW.po ├── src ├── CMakeLists.txt ├── chewing-addon.conf.in.in ├── chewing.conf.in ├── eim.cpp └── eim.h └── test ├── CMakeLists.txt ├── addon └── CMakeLists.txt ├── inputmethod └── CMakeLists.txt ├── testchewing.cpp └── testdir.h.in /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | Language: Cpp 3 | # BasedOnStyle: LLVM 4 | AccessModifierOffset: -4 5 | ConstructorInitializerIndentWidth: 4 6 | AlignEscapedNewlinesLeft: false 7 | AlignTrailingComments: true 8 | AllowAllParametersOfDeclarationOnNextLine: true 9 | AllowShortBlocksOnASingleLine: false 10 | AllowShortIfStatementsOnASingleLine: false 11 | AllowShortLoopsOnASingleLine: false 12 | AllowShortFunctionsOnASingleLine: All 13 | AlwaysBreakTemplateDeclarations: true 14 | AlwaysBreakBeforeMultilineStrings: false 15 | BreakBeforeBinaryOperators: false 16 | BreakBeforeTernaryOperators: true 17 | BreakConstructorInitializersBeforeComma: false 18 | BinPackParameters: true 19 | ColumnLimit: 80 20 | ConstructorInitializerAllOnOneLineOrOnePerLine: false 21 | DerivePointerAlignment: false 22 | ExperimentalAutoDetectBinPacking: false 23 | IndentCaseLabels: false 24 | IndentWrappedFunctionNames: false 25 | IndentFunctionDeclarationAfterType: false 26 | MaxEmptyLinesToKeep: 1 27 | KeepEmptyLinesAtTheStartOfBlocks: true 28 | NamespaceIndentation: None 29 | ObjCSpaceAfterProperty: false 30 | ObjCSpaceBeforeProtocolList: true 31 | PenaltyBreakBeforeFirstCallParameter: 19 32 | PenaltyBreakComment: 300 33 | PenaltyBreakString: 1000 34 | PenaltyBreakFirstLessLess: 120 35 | PenaltyExcessCharacter: 1000000 36 | PenaltyReturnTypeOnItsOwnLine: 60 37 | PointerAlignment: Right 38 | SpacesBeforeTrailingComments: 1 39 | Cpp11BracedListStyle: true 40 | Standard: Cpp11 41 | IndentWidth: 4 42 | TabWidth: 4 43 | UseTab: Never 44 | BreakBeforeBraces: Attach 45 | SpacesInParentheses: false 46 | SpacesInAngles: false 47 | SpaceInEmptyParentheses: false 48 | SpacesInCStyleCastParentheses: false 49 | SpacesInContainerLiterals: true 50 | SpaceBeforeAssignmentOperators: true 51 | ContinuationIndentWidth: 4 52 | CommentPragmas: '^ IWYU pragma:' 53 | ForEachMacros: [ Q_FOREACH, BOOST_FOREACH ] 54 | SpaceBeforeParens: ControlStatements 55 | DisableFormat: false 56 | SortIncludes: true 57 | ... 58 | 59 | -------------------------------------------------------------------------------- /.github/workflows/check.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: 3 | push: 4 | branches: 5 | - master 6 | pull_request: 7 | branches: 8 | - master 9 | jobs: 10 | clang-format: 11 | name: Check clang-format 12 | runs-on: ubuntu-latest 13 | container: archlinux:latest 14 | steps: 15 | - name: Install dependencies 16 | run: | 17 | pacman -Syu --noconfirm git clang diffutils 18 | git config --global --add safe.directory $GITHUB_WORKSPACE 19 | - uses: actions/checkout@v4 20 | - uses: fcitx/github-actions@clang-format 21 | check: 22 | name: Build and test 23 | needs: clang-format 24 | runs-on: ubuntu-latest 25 | container: archlinux:latest 26 | strategy: 27 | fail-fast: false 28 | matrix: 29 | compiler: [gcc, clang] 30 | include: 31 | - compiler: gcc 32 | cxx_compiler: g++ 33 | - compiler: clang 34 | cxx_compiler: clang++ 35 | env: 36 | CC: ${{ matrix.compiler }} 37 | CXX: ${{ matrix.cxx_compiler }} 38 | steps: 39 | - name: Install dependencies 40 | run: | 41 | pacman -Syu --noconfirm base-devel clang cmake ninja extra-cmake-modules fmt libuv boost git libchewing 42 | - uses: actions/checkout@v4 43 | with: 44 | repository: fcitx/fcitx5 45 | path: fcitx5 46 | - name: Cache fcitx5 data files 47 | uses: actions/cache@v4 48 | with: 49 | path: 'fcitx5/**/*.tar.*' 50 | key: ${{ runner.os }}-${{ hashFiles('fcitx5/src/modules/spell/CMakeLists.txt') 51 | }} 52 | - name: Build and Install fcitx5 53 | uses: fcitx/github-actions@cmake 54 | with: 55 | path: fcitx5 56 | cmake-option: >- 57 | -DENABLE_KEYBOARD=Off -DENABLE_X11=Off -DENABLE_WAYLAND=Off -DENABLE_ENCHANT=Off 58 | -DENABLE_DBUS=Off -DENABLE_SERVER=Off -DENABLE_EMOJI=Off -DUSE_SYSTEMD=Off 59 | - uses: actions/checkout@v4 60 | with: 61 | path: fcitx5-chewing 62 | submodules: true 63 | - name: Init CodeQL 64 | uses: github/codeql-action/init@v3 65 | with: 66 | languages: cpp 67 | source-root: fcitx5-chewing 68 | - name: Build and Install fcitx5-chewing 69 | uses: fcitx/github-actions@cmake 70 | with: 71 | path: fcitx5-chewing 72 | - name: Test 73 | run: | 74 | ctest --test-dir fcitx5-chewing/build 75 | - name: CodeQL Analysis 76 | uses: github/codeql-action/analyze@v2 77 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | build*/ 3 | .* 4 | !.git* 5 | .git/ 6 | *.tar.* 7 | *.kdev4 8 | *.kate-swp 9 | *.orig 10 | tags 11 | astyle.sh 12 | cscope.* 13 | *.part 14 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Weng Xuetian 2 | Tai-Lin Chu 3 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.6) 2 | project(fcitx5-chewing VERSION 5.1.7) 3 | 4 | set(REQUIRED_FCITX_VERSION 5.1.13) 5 | find_package(ECM REQUIRED 1.0.0) 6 | set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) 7 | 8 | find_package(PkgConfig REQUIRED) 9 | find_package(Fcitx5Core ${REQUIRED_FCITX_VERSION} REQUIRED) 10 | find_package(Fcitx5Module REQUIRED COMPONENTS TestFrontend) 11 | find_package(Gettext REQUIRED) 12 | include(FeatureSummary) 13 | include(GNUInstallDirs) 14 | include(ECMSetupVersion) 15 | include(ECMUninstallTarget) 16 | 17 | option(ENABLE_TEST "Build Test" On) 18 | option(ENABLE_COVERAGE "Build the project with gcov support (Need ENABLE_TEST=On)" Off) 19 | 20 | if (NOT DEFINED CHEWING_TARGET) 21 | pkg_check_modules(Chewing "chewing>=0.5.0" IMPORTED_TARGET REQUIRED) 22 | set(CHEWING_TARGET PkgConfig::Chewing) 23 | endif() 24 | 25 | include("${FCITX_INSTALL_CMAKECONFIG_DIR}/Fcitx5Utils/Fcitx5CompilerSettings.cmake") 26 | 27 | add_subdirectory(src) 28 | add_subdirectory(data) 29 | add_subdirectory(po) 30 | 31 | if (ENABLE_TEST) 32 | enable_testing() 33 | add_subdirectory(test) 34 | 35 | if (ENABLE_COVERAGE) 36 | add_custom_target(coverage 37 | COMMAND "${CMAKE_CTEST_COMMAND}" 38 | COMMAND lcov --gcov-tool "${GCOV_TOOL}" --no-external --capture --directory ./ -b "${CMAKE_CURRENT_SOURCE_DIR}" --output-file coverage.info 39 | COMMAND genhtml coverage.info --output-directory "coverage_pages" 40 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) 41 | endif() 42 | endif () 43 | 44 | fcitx5_translate_desktop_file(org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in 45 | org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml XML) 46 | install(FILES "${CMAKE_CURRENT_BINARY_DIR}/org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml" DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo) 47 | feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) 48 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | fcitx-chewing install instructions 2 | ================================================= 3 | 4 | To compile and install, go in the source directory and type: 5 | mkdir build; cd build 6 | cmake .. 7 | (If you want to install in a different path, use instead: 8 | cmake .. -DCMAKE_INSTALL_PREFIX=/install/path) 9 | make 10 | 11 | To install, become root if required: 12 | 13 | make install 14 | 15 | Once installed, you can restart fcitx and it will be enabled by default. 16 | -------------------------------------------------------------------------------- /LICENSES/LGPL-2.1-or-later.txt: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | 3 | Version 2.1, February 1999 4 | 5 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. 6 | 7 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 8 | 9 | Everyone is permitted to copy and distribute verbatim copies of this license 10 | document, but changing it is not allowed. 11 | 12 | [This is the first released version of the Lesser GPL. It also counts as the 13 | successor of the GNU Library Public License, version 2, hence the version 14 | number 2.1.] 15 | 16 | Preamble 17 | 18 | The licenses for most software are designed to take away your freedom to share 19 | and change it. By contrast, the GNU General Public Licenses are intended to 20 | guarantee your freedom to share and change free software--to make sure the 21 | software is free for all its users. 22 | 23 | This license, the Lesser General Public License, applies to some specially 24 | designated software packages--typically libraries--of the Free Software Foundation 25 | and other authors who decide to use it. You can use it too, but we suggest 26 | you first think carefully about whether this license or the ordinary General 27 | Public License is the better strategy to use in any particular case, based 28 | on the explanations below. 29 | 30 | When we speak of free software, we are referring to freedom of use, not price. 31 | Our General Public Licenses are designed to make sure that you have the freedom 32 | to distribute copies of free software (and charge for this service if you 33 | wish); that you receive source code or can get it if you want it; that you 34 | can change the software and use pieces of it in new free programs; and that 35 | you are informed that you can do these things. 36 | 37 | To protect your rights, we need to make restrictions that forbid distributors 38 | to deny you these rights or to ask you to surrender these rights. These restrictions 39 | translate to certain responsibilities for you if you distribute copies of 40 | the library or if you modify it. 41 | 42 | For example, if you distribute copies of the library, whether gratis or for 43 | a fee, you must give the recipients all the rights that we gave you. You must 44 | make sure that they, too, receive or can get the source code. If you link 45 | other code with the library, you must provide complete object files to the 46 | recipients, so that they can relink them with the library after making changes 47 | to the library and recompiling it. And you must show them these terms so they 48 | know their rights. 49 | 50 | We protect your rights with a two-step method: (1) we copyright the library, 51 | and (2) we offer you this license, which gives you legal permission to copy, 52 | distribute and/or modify the library. 53 | 54 | To protect each distributor, we want to make it very clear that there is no 55 | warranty for the free library. Also, if the library is modified by someone 56 | else and passed on, the recipients should know that what they have is not 57 | the original version, so that the original author's reputation will not be 58 | affected by problems that might be introduced by others. 59 | 60 | Finally, software patents pose a constant threat to the existence of any free 61 | program. We wish to make sure that a company cannot effectively restrict the 62 | users of a free program by obtaining a restrictive license from a patent holder. 63 | Therefore, we insist that any patent license obtained for a version of the 64 | library must be consistent with the full freedom of use specified in this 65 | license. 66 | 67 | Most GNU software, including some libraries, is covered by the ordinary GNU 68 | General Public License. This license, the GNU Lesser General Public License, 69 | applies to certain designated libraries, and is quite different from the ordinary 70 | General Public License. We use this license for certain libraries in order 71 | to permit linking those libraries into non-free programs. 72 | 73 | When a program is linked with a library, whether statically or using a shared 74 | library, the combination of the two is legally speaking a combined work, a 75 | derivative of the original library. The ordinary General Public License therefore 76 | permits such linking only if the entire combination fits its criteria of freedom. 77 | The Lesser General Public License permits more lax criteria for linking other 78 | code with the library. 79 | 80 | We call this license the "Lesser" General Public License because it does Less 81 | to protect the user's freedom than the ordinary General Public License. It 82 | also provides other free software developers Less of an advantage over competing 83 | non-free programs. These disadvantages are the reason we use the ordinary 84 | General Public License for many libraries. However, the Lesser license provides 85 | advantages in certain special circumstances. 86 | 87 | For example, on rare occasions, there may be a special need to encourage the 88 | widest possible use of a certain library, so that it becomes a de-facto standard. 89 | To achieve this, non-free programs must be allowed to use the library. A more 90 | frequent case is that a free library does the same job as widely used non-free 91 | libraries. In this case, there is little to gain by limiting the free library 92 | to free software only, so we use the Lesser General Public License. 93 | 94 | In other cases, permission to use a particular library in non-free programs 95 | enables a greater number of people to use a large body of free software. For 96 | example, permission to use the GNU C Library in non-free programs enables 97 | many more people to use the whole GNU operating system, as well as its variant, 98 | the GNU/Linux operating system. 99 | 100 | Although the Lesser General Public License is Less protective of the users' 101 | freedom, it does ensure that the user of a program that is linked with the 102 | Library has the freedom and the wherewithal to run that program using a modified 103 | version of the Library. 104 | 105 | The precise terms and conditions for copying, distribution and modification 106 | follow. Pay close attention to the difference between a "work based on the 107 | library" and a "work that uses the library". The former contains code derived 108 | from the library, whereas the latter must be combined with the library in 109 | order to run. 110 | 111 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 112 | 113 | 0. This License Agreement applies to any software library or other program 114 | which contains a notice placed by the copyright holder or other authorized 115 | party saying it may be distributed under the terms of this Lesser General 116 | Public License (also called "this License"). Each licensee is addressed as 117 | "you". 118 | 119 | A "library" means a collection of software functions and/or data prepared 120 | so as to be conveniently linked with application programs (which use some 121 | of those functions and data) to form executables. 122 | 123 | The "Library", below, refers to any such software library or work which has 124 | been distributed under these terms. A "work based on the Library" means either 125 | the Library or any derivative work under copyright law: that is to say, a 126 | work containing the Library or a portion of it, either verbatim or with modifications 127 | and/or translated straightforwardly into another language. (Hereinafter, translation 128 | is included without limitation in the term "modification".) 129 | 130 | "Source code" for a work means the preferred form of the work for making modifications 131 | to it. For a library, complete source code means all the source code for all 132 | modules it contains, plus any associated interface definition files, plus 133 | the scripts used to control compilation and installation of the library. 134 | 135 | Activities other than copying, distribution and modification are not covered 136 | by this License; they are outside its scope. The act of running a program 137 | using the Library is not restricted, and output from such a program is covered 138 | only if its contents constitute a work based on the Library (independent of 139 | the use of the Library in a tool for writing it). Whether that is true depends 140 | on what the Library does and what the program that uses the Library does. 141 | 142 | 1. You may copy and distribute verbatim copies of the Library's complete source 143 | code as you receive it, in any medium, provided that you conspicuously and 144 | appropriately publish on each copy an appropriate copyright notice and disclaimer 145 | of warranty; keep intact all the notices that refer to this License and to 146 | the absence of any warranty; and distribute a copy of this License along with 147 | the Library. 148 | 149 | You may charge a fee for the physical act of transferring a copy, and you 150 | may at your option offer warranty protection in exchange for a fee. 151 | 152 | 2. You may modify your copy or copies of the Library or any portion of it, 153 | thus forming a work based on the Library, and copy and distribute such modifications 154 | or work under the terms of Section 1 above, provided that you also meet all 155 | of these conditions: 156 | 157 | a) The modified work must itself be a software library. 158 | 159 | b) You must cause the files modified to carry prominent notices stating that 160 | you changed the files and the date of any change. 161 | 162 | c) You must cause the whole of the work to be licensed at no charge to all 163 | third parties under the terms of this License. 164 | 165 | d) If a facility in the modified Library refers to a function or a table of 166 | data to be supplied by an application program that uses the facility, other 167 | than as an argument passed when the facility is invoked, then you must make 168 | a good faith effort to ensure that, in the event an application does not supply 169 | such function or table, the facility still operates, and performs whatever 170 | part of its purpose remains meaningful. 171 | 172 | (For example, a function in a library to compute square roots has a purpose 173 | that is entirely well-defined independent of the application. Therefore, Subsection 174 | 2d requires that any application-supplied function or table used by this function 175 | must be optional: if the application does not supply it, the square root function 176 | must still compute square roots.) 177 | 178 | These requirements apply to the modified work as a whole. If identifiable 179 | sections of that work are not derived from the Library, and can be reasonably 180 | considered independent and separate works in themselves, then this License, 181 | and its terms, do not apply to those sections when you distribute them as 182 | separate works. But when you distribute the same sections as part of a whole 183 | which is a work based on the Library, the distribution of the whole must be 184 | on the terms of this License, whose permissions for other licensees extend 185 | to the entire whole, and thus to each and every part regardless of who wrote 186 | it. 187 | 188 | Thus, it is not the intent of this section to claim rights or contest your 189 | rights to work written entirely by you; rather, the intent is to exercise 190 | the right to control the distribution of derivative or collective works based 191 | on the Library. 192 | 193 | In addition, mere aggregation of another work not based on the Library with 194 | the Library (or with a work based on the Library) on a volume of a storage 195 | or distribution medium does not bring the other work under the scope of this 196 | License. 197 | 198 | 3. You may opt to apply the terms of the ordinary GNU General Public License 199 | instead of this License to a given copy of the Library. To do this, you must 200 | alter all the notices that refer to this License, so that they refer to the 201 | ordinary GNU General Public License, version 2, instead of to this License. 202 | (If a newer version than version 2 of the ordinary GNU General Public License 203 | has appeared, then you can specify that version instead if you wish.) Do not 204 | make any other change in these notices. 205 | 206 | Once this change is made in a given copy, it is irreversible for that copy, 207 | so the ordinary GNU General Public License applies to all subsequent copies 208 | and derivative works made from that copy. 209 | 210 | This option is useful when you wish to copy part of the code of the Library 211 | into a program that is not a library. 212 | 213 | 4. You may copy and distribute the Library (or a portion or derivative of 214 | it, under Section 2) in object code or executable form under the terms of 215 | Sections 1 and 2 above provided that you accompany it with the complete corresponding 216 | machine-readable source code, which must be distributed under the terms of 217 | Sections 1 and 2 above on a medium customarily used for software interchange. 218 | 219 | If distribution of object code is made by offering access to copy from a designated 220 | place, then offering equivalent access to copy the source code from the same 221 | place satisfies the requirement to distribute the source code, even though 222 | third parties are not compelled to copy the source along with the object code. 223 | 224 | 5. A program that contains no derivative of any portion of the Library, but 225 | is designed to work with the Library by being compiled or linked with it, 226 | is called a "work that uses the Library". Such a work, in isolation, is not 227 | a derivative work of the Library, and therefore falls outside the scope of 228 | this License. 229 | 230 | However, linking a "work that uses the Library" with the Library creates an 231 | executable that is a derivative of the Library (because it contains portions 232 | of the Library), rather than a "work that uses the library". The executable 233 | is therefore covered by this License. Section 6 states terms for distribution 234 | of such executables. 235 | 236 | When a "work that uses the Library" uses material from a header file that 237 | is part of the Library, the object code for the work may be a derivative work 238 | of the Library even though the source code is not. Whether this is true is 239 | especially significant if the work can be linked without the Library, or if 240 | the work is itself a library. The threshold for this to be true is not precisely 241 | defined by law. 242 | 243 | If such an object file uses only numerical parameters, data structure layouts 244 | and accessors, and small macros and small inline functions (ten lines or less 245 | in length), then the use of the object file is unrestricted, regardless of 246 | whether it is legally a derivative work. (Executables containing this object 247 | code plus portions of the Library will still fall under Section 6.) 248 | 249 | Otherwise, if the work is a derivative of the Library, you may distribute 250 | the object code for the work under the terms of Section 6. Any executables 251 | containing that work also fall under Section 6, whether or not they are linked 252 | directly with the Library itself. 253 | 254 | 6. As an exception to the Sections above, you may also combine or link a "work 255 | that uses the Library" with the Library to produce a work containing portions 256 | of the Library, and distribute that work under terms of your choice, provided 257 | that the terms permit modification of the work for the customer's own use 258 | and reverse engineering for debugging such modifications. 259 | 260 | You must give prominent notice with each copy of the work that the Library 261 | is used in it and that the Library and its use are covered by this License. 262 | You must supply a copy of this License. If the work during execution displays 263 | copyright notices, you must include the copyright notice for the Library among 264 | them, as well as a reference directing the user to the copy of this License. 265 | Also, you must do one of these things: 266 | 267 | a) Accompany the work with the complete corresponding machine-readable source 268 | code for the Library including whatever changes were used in the work (which 269 | must be distributed under Sections 1 and 2 above); and, if the work is an 270 | executable linked with the Library, with the complete machine-readable "work 271 | that uses the Library", as object code and/or source code, so that the user 272 | can modify the Library and then relink to produce a modified executable containing 273 | the modified Library. (It is understood that the user who changes the contents 274 | of definitions files in the Library will not necessarily be able to recompile 275 | the application to use the modified definitions.) 276 | 277 | b) Use a suitable shared library mechanism for linking with the Library. A 278 | suitable mechanism is one that (1) uses at run time a copy of the library 279 | already present on the user's computer system, rather than copying library 280 | functions into the executable, and (2) will operate properly with a modified 281 | version of the library, if the user installs one, as long as the modified 282 | version is interface-compatible with the version that the work was made with. 283 | 284 | c) Accompany the work with a written offer, valid for at least three years, 285 | to give the same user the materials specified in Subsection 6a, above, for 286 | a charge no more than the cost of performing this distribution. 287 | 288 | d) If distribution of the work is made by offering access to copy from a designated 289 | place, offer equivalent access to copy the above specified materials from 290 | the same place. 291 | 292 | e) Verify that the user has already received a copy of these materials or 293 | that you have already sent this user a copy. 294 | 295 | For an executable, the required form of the "work that uses the Library" must 296 | include any data and utility programs needed for reproducing the executable 297 | from it. However, as a special exception, the materials to be distributed 298 | need not include anything that is normally distributed (in either source or 299 | binary form) with the major components (compiler, kernel, and so on) of the 300 | operating system on which the executable runs, unless that component itself 301 | accompanies the executable. 302 | 303 | It may happen that this requirement contradicts the license restrictions of 304 | other proprietary libraries that do not normally accompany the operating system. 305 | Such a contradiction means you cannot use both them and the Library together 306 | in an executable that you distribute. 307 | 308 | 7. You may place library facilities that are a work based on the Library side-by-side 309 | in a single library together with other library facilities not covered by 310 | this License, and distribute such a combined library, provided that the separate 311 | distribution of the work based on the Library and of the other library facilities 312 | is otherwise permitted, and provided that you do these two things: 313 | 314 | a) Accompany the combined library with a copy of the same work based on the 315 | Library, uncombined with any other library facilities. This must be distributed 316 | under the terms of the Sections above. 317 | 318 | b) Give prominent notice with the combined library of the fact that part of 319 | it is a work based on the Library, and explaining where to find the accompanying 320 | uncombined form of the same work. 321 | 322 | 8. You may not copy, modify, sublicense, link with, or distribute the Library 323 | except as expressly provided under this License. Any attempt otherwise to 324 | copy, modify, sublicense, link with, or distribute the Library is void, and 325 | will automatically terminate your rights under this License. However, parties 326 | who have received copies, or rights, from you under this License will not 327 | have their licenses terminated so long as such parties remain in full compliance. 328 | 329 | 9. You are not required to accept this License, since you have not signed 330 | it. However, nothing else grants you permission to modify or distribute the 331 | Library or its derivative works. These actions are prohibited by law if you 332 | do not accept this License. Therefore, by modifying or distributing the Library 333 | (or any work based on the Library), you indicate your acceptance of this License 334 | to do so, and all its terms and conditions for copying, distributing or modifying 335 | the Library or works based on it. 336 | 337 | 10. Each time you redistribute the Library (or any work based on the Library), 338 | the recipient automatically receives a license from the original licensor 339 | to copy, distribute, link with or modify the Library subject to these terms 340 | and conditions. You may not impose any further restrictions on the recipients' 341 | exercise of the rights granted herein. You are not responsible for enforcing 342 | compliance by third parties with this License. 343 | 344 | 11. If, as a consequence of a court judgment or allegation of patent infringement 345 | or for any other reason (not limited to patent issues), conditions are imposed 346 | on you (whether by court order, agreement or otherwise) that contradict the 347 | conditions of this License, they do not excuse you from the conditions of 348 | this License. If you cannot distribute so as to satisfy simultaneously your 349 | obligations under this License and any other pertinent obligations, then as 350 | a consequence you may not distribute the Library at all. For example, if a 351 | patent license would not permit royalty-free redistribution of the Library 352 | by all those who receive copies directly or indirectly through you, then the 353 | only way you could satisfy both it and this License would be to refrain entirely 354 | from distribution of the Library. 355 | 356 | If any portion of this section is held invalid or unenforceable under any 357 | particular circumstance, the balance of the section is intended to apply, 358 | and the section as a whole is intended to apply in other circumstances. 359 | 360 | It is not the purpose of this section to induce you to infringe any patents 361 | or other property right claims or to contest validity of any such claims; 362 | this section has the sole purpose of protecting the integrity of the free 363 | software distribution system which is implemented by public license practices. 364 | Many people have made generous contributions to the wide range of software 365 | distributed through that system in reliance on consistent application of that 366 | system; it is up to the author/donor to decide if he or she is willing to 367 | distribute software through any other system and a licensee cannot impose 368 | that choice. 369 | 370 | This section is intended to make thoroughly clear what is believed to be a 371 | consequence of the rest of this License. 372 | 373 | 12. If the distribution and/or use of the Library is restricted in certain 374 | countries either by patents or by copyrighted interfaces, the original copyright 375 | holder who places the Library under this License may add an explicit geographical 376 | distribution limitation excluding those countries, so that distribution is 377 | permitted only in or among countries not thus excluded. In such case, this 378 | License incorporates the limitation as if written in the body of this License. 379 | 380 | 13. The Free Software Foundation may publish revised and/or new versions of 381 | the Lesser General Public License from time to time. Such new versions will 382 | be similar in spirit to the present version, but may differ in detail to address 383 | new problems or concerns. 384 | 385 | Each version is given a distinguishing version number. If the Library specifies 386 | a version number of this License which applies to it and "any later version", 387 | you have the option of following the terms and conditions either of that version 388 | or of any later version published by the Free Software Foundation. If the 389 | Library does not specify a license version number, you may choose any version 390 | ever published by the Free Software Foundation. 391 | 392 | 14. If you wish to incorporate parts of the Library into other free programs 393 | whose distribution conditions are incompatible with these, write to the author 394 | to ask for permission. For software which is copyrighted by the Free Software 395 | Foundation, write to the Free Software Foundation; we sometimes make exceptions 396 | for this. Our decision will be guided by the two goals of preserving the free 397 | status of all derivatives of our free software and of promoting the sharing 398 | and reuse of software generally. 399 | 400 | NO WARRANTY 401 | 402 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR 403 | THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE 404 | STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY 405 | "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, 406 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 407 | FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE 408 | OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME 409 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 410 | 411 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 412 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE 413 | THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 414 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE 415 | OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA 416 | OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES 417 | OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH 418 | HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 419 | END OF TERMS AND CONDITIONS 420 | 421 | How to Apply These Terms to Your New Libraries 422 | 423 | If you develop a new library, and you want it to be of the greatest possible 424 | use to the public, we recommend making it free software that everyone can 425 | redistribute and change. You can do so by permitting redistribution under 426 | these terms (or, alternatively, under the terms of the ordinary General Public 427 | License). 428 | 429 | To apply these terms, attach the following notices to the library. It is safest 430 | to attach them to the start of each source file to most effectively convey 431 | the exclusion of warranty; and each file should have at least the "copyright" 432 | line and a pointer to where the full notice is found. 433 | 434 | 435 | 436 | Copyright (C) 437 | 438 | This library is free software; you can redistribute it and/or modify it under 439 | the terms of the GNU Lesser General Public License as published by the Free 440 | Software Foundation; either version 2.1 of the License, or (at your option) 441 | any later version. 442 | 443 | This library is distributed in the hope that it will be useful, but WITHOUT 444 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 445 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 446 | details. 447 | 448 | You should have received a copy of the GNU Lesser General Public License along 449 | with this library; if not, write to the Free Software Foundation, Inc., 51 450 | Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 451 | 452 | Also add information on how to contact you by electronic and paper mail. 453 | 454 | You should also get your employer (if you work as a programmer) or your school, 455 | if any, to sign a "copyright disclaimer" for the library, if necessary. Here 456 | is a sample; alter the names: 457 | 458 | Yoyodyne, Inc., hereby disclaims all copyright interest in 459 | 460 | the library `Frob' (a library for tweaking knobs) written 461 | 462 | by James Random Hacker. 463 | 464 | < signature of Ty Coon > , 1 April 1990 465 | 466 | Ty Coon, President of Vice 467 | 468 | That's all there is to it! 469 | -------------------------------------------------------------------------------- /Messages.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | gen_pot cxx:desktop:appdata fcitx5-chewing po . 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # fcitx5-chewing 2 | 3 | Chewing Wrapper for Fcitx. 4 | 5 | This provides libchewing input method support for fcitx5. Released 6 | under GPL2+. 7 | 8 | [![Jenkins Build Status](https://img.shields.io/jenkins/s/https/jenkins.fcitx-im.org/job/fcitx5-chewing.svg)](https://jenkins.fcitx-im.org/job/fcitx5-chewing/) 9 | 10 | [![Coverity Scan Status](https://img.shields.io/coverity/scan/14558.svg)](https://scan.coverity.com/projects/fcitx-fcitx5-chewing) 11 | 12 | -------------------------------------------------------------------------------- /data/16x16/apps/fcitx-chewing.png: -------------------------------------------------------------------------------- 1 | org.fcitx.Fcitx5.fcitx-chewing.png -------------------------------------------------------------------------------- /data/16x16/apps/org.fcitx.Fcitx5.fcitx-chewing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fcitx/fcitx5-chewing/2d18825546ef7cd406c075a2a9261a8c1fd04d3a/data/16x16/apps/org.fcitx.Fcitx5.fcitx-chewing.png -------------------------------------------------------------------------------- /data/22x22/apps/fcitx-chewing.png: -------------------------------------------------------------------------------- 1 | org.fcitx.Fcitx5.fcitx-chewing.png -------------------------------------------------------------------------------- /data/22x22/apps/org.fcitx.Fcitx5.fcitx-chewing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fcitx/fcitx5-chewing/2d18825546ef7cd406c075a2a9261a8c1fd04d3a/data/22x22/apps/org.fcitx.Fcitx5.fcitx-chewing.png -------------------------------------------------------------------------------- /data/24x24/apps/fcitx-chewing.png: -------------------------------------------------------------------------------- 1 | org.fcitx.Fcitx5.fcitx-chewing.png -------------------------------------------------------------------------------- /data/24x24/apps/org.fcitx.Fcitx5.fcitx-chewing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fcitx/fcitx5-chewing/2d18825546ef7cd406c075a2a9261a8c1fd04d3a/data/24x24/apps/org.fcitx.Fcitx5.fcitx-chewing.png -------------------------------------------------------------------------------- /data/48x48/apps/fcitx-chewing.png: -------------------------------------------------------------------------------- 1 | org.fcitx.Fcitx5.fcitx-chewing.png -------------------------------------------------------------------------------- /data/48x48/apps/org.fcitx.Fcitx5.fcitx-chewing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fcitx/fcitx5-chewing/2d18825546ef7cd406c075a2a9261a8c1fd04d3a/data/48x48/apps/org.fcitx.Fcitx5.fcitx-chewing.png -------------------------------------------------------------------------------- /data/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | install(DIRECTORY 16x16 22x22 24x24 48x48 DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor" 2 | PATTERN ".*" EXCLUDE 3 | PATTERN "*~" EXCLUDE) 4 | 5 | -------------------------------------------------------------------------------- /org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.fcitx.Fcitx5.Addon.Chewing 4 | org.fcitx.Fcitx5 5 | CC0-1.0 6 | LGPL-2.1+ 7 | Chewing for Fcitx 5 8 | Chewing input method 9 | 10 | The Fcitx Team 11 | 12 | https://fcitx-im.org 13 | https://github.com/fcitx/fcitx5-chewing/issues 14 | https://github.com/fcitx/fcitx5-chewing 15 | Fcitx 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /po/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | fcitx5_install_translation(fcitx5-chewing) 2 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | 2 | ca 3 | da 4 | de 5 | he 6 | ja 7 | ko 8 | ru 9 | tr 10 | vi 11 | zh_CN 12 | zh_TW 13 | -------------------------------------------------------------------------------- /po/ca.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the fcitx5-chewing package. 4 | # 5 | # Translators: 6 | # csslayer , 2017 7 | # Robert Antoni Buj i Gelonch , 2017 8 | # 9 | msgid "" 10 | msgstr "" 11 | "Project-Id-Version: fcitx5-chewing\n" 12 | "Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" 13 | "POT-Creation-Date: 2024-05-03 20:24+0000\n" 14 | "PO-Revision-Date: 2017-12-08 17:30+0000\n" 15 | "Last-Translator: Robert Antoni Buj i Gelonch , 2017\n" 16 | "Language-Team: Catalan (https://app.transifex.com/fcitx/teams/12005/ca/)\n" 17 | "Language: ca\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 22 | 23 | #: src/eim.h:47 24 | msgid "1234567890" 25 | msgstr "1234567890" 26 | 27 | #: src/eim.h:50 28 | msgid "1234qweras" 29 | msgstr "1234qweras" 30 | 31 | #: src/eim.h:111 32 | msgid "Action when switching input method" 33 | msgstr "" 34 | 35 | #: src/eim.h:114 36 | msgid "Add Phrase Forward" 37 | msgstr "Afegeix una frase endavant" 38 | 39 | #: src/eim.h:118 40 | msgid "Automatically shift cursor" 41 | msgstr "Desplaça el cursor automàticament" 42 | 43 | #: src/eim.h:116 44 | msgid "Backward phrase choice" 45 | msgstr "Elecció de frase enrere" 46 | 47 | #: src/eim.h:104 48 | msgid "Candidate List Layout" 49 | msgstr "" 50 | 51 | #: src/eim.h:83 52 | msgid "Carpalx Keyboard" 53 | msgstr "Teclat Carpalx" 54 | 55 | #: src/chewing-addon.conf.in.in:3 src/chewing.conf.in:3 56 | msgid "Chewing" 57 | msgstr "Chewing" 58 | 59 | #: src/chewing-addon.conf.in.in:4 60 | msgid "Chewing Wrapper For Fcitx" 61 | msgstr "Contenir chewing per a fcitx" 62 | 63 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:7 64 | msgid "Chewing for Fcitx 5" 65 | msgstr "" 66 | 67 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:8 68 | msgid "Chewing input method" 69 | msgstr "" 70 | 71 | #: src/eim.h:88 72 | msgid "Clear" 73 | msgstr "" 74 | 75 | #: src/eim.h:84 76 | msgid "Colemak-DH ANSI Keyboard" 77 | msgstr "" 78 | 79 | #: src/eim.h:84 80 | msgid "Colemak-DH Orth Keyboard" 81 | msgstr "" 82 | 83 | #: src/eim.h:89 84 | msgid "Commit current preedit" 85 | msgstr "" 86 | 87 | #: src/eim.h:90 88 | msgid "Commit default selection" 89 | msgstr "" 90 | 91 | #: src/eim.h:81 92 | msgid "DACHEN_CP26 Keyboard" 93 | msgstr "Teclat DACHEN_CP26" 94 | 95 | #: src/eim.h:78 96 | msgid "Default Keyboard" 97 | msgstr "Teclat predeterminat" 98 | 99 | #: src/eim.h:80 100 | msgid "Dvorak Keyboard" 101 | msgstr "Teclat Dvorak" 102 | 103 | #: src/eim.h:81 104 | msgid "Dvorak Keyboard with Hsu's support" 105 | msgstr "Teclat Dvorak amb suport Hsu" 106 | 107 | #: src/eim.h:79 108 | msgid "ETen Keyboard" 109 | msgstr "Teclat ETen" 110 | 111 | #: src/eim.h:80 112 | msgid "ETen26 Keyboard" 113 | msgstr "Teclat ETen26" 114 | 115 | #: src/eim.h:120 116 | msgid "Enable easy symbol" 117 | msgstr "" 118 | 119 | #: src/eim.h:79 120 | msgid "Gin-Yieh Keyboard" 121 | msgstr "Teclat Gin-Yieh" 122 | 123 | #: src/eim.h:82 124 | msgid "Han-Yu PinYin Keyboard" 125 | msgstr "Teclat Han-Yu PinYin" 126 | 127 | #: src/eim.h:32 128 | msgid "Horizontal" 129 | msgstr "" 130 | 131 | #: src/eim.h:78 132 | msgid "Hsu's Keyboard" 133 | msgstr "Teclat Hsu" 134 | 135 | #: src/eim.h:79 136 | msgid "IBM Keyboard" 137 | msgstr "Teclat IBM" 138 | 139 | #: src/eim.h:124 140 | msgid "Keyboard Layout" 141 | msgstr "Disposició de teclat" 142 | 143 | #: src/eim.h:83 144 | msgid "MPS2 PinYin Keyboard" 145 | msgstr "" 146 | 147 | #: src/eim.h:100 148 | msgid "Page Size" 149 | msgstr "" 150 | 151 | #: src/eim.h:99 152 | msgid "Select candidate with arrow key" 153 | msgstr "" 154 | 155 | #: src/eim.h:95 156 | msgid "Selection Key" 157 | msgstr "Tecla de selecció" 158 | 159 | #: src/eim.h:122 160 | msgid "Space as selection key" 161 | msgstr "Espai com a tecla de selecció" 162 | 163 | #: src/eim.h:82 164 | msgid "THL PinYin Keyboard" 165 | msgstr "" 166 | 167 | #: src/eim.h:107 168 | msgid "Use Keypad as Selection key" 169 | msgstr "" 170 | 171 | #: src/eim.h:31 172 | msgid "Vertical" 173 | msgstr "" 174 | 175 | #: src/eim.h:49 176 | msgid "aoeuhtn789" 177 | msgstr "aoeuhtn789" 178 | 179 | #: src/eim.h:48 180 | msgid "asdfghjkl;" 181 | msgstr "asdfghjkl;" 182 | 183 | #: src/eim.h:49 184 | msgid "asdfjkl789" 185 | msgstr "asdfjkl789" 186 | 187 | #: src/eim.h:48 188 | msgid "asdfzxcv89" 189 | msgstr "asdfzxcv89" 190 | 191 | #: src/eim.h:50 192 | msgid "dstnaeo789" 193 | msgstr "dstnaeo789" 194 | -------------------------------------------------------------------------------- /po/da.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the fcitx5-chewing package. 4 | # 5 | # Translators: 6 | # scootergrisen, 2021 7 | # 8 | msgid "" 9 | msgstr "" 10 | "Project-Id-Version: fcitx5-chewing\n" 11 | "Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" 12 | "POT-Creation-Date: 2024-05-03 20:24+0000\n" 13 | "PO-Revision-Date: 2017-12-08 17:30+0000\n" 14 | "Last-Translator: scootergrisen, 2021\n" 15 | "Language-Team: Danish (https://app.transifex.com/fcitx/teams/12005/da/)\n" 16 | "Language: da\n" 17 | "MIME-Version: 1.0\n" 18 | "Content-Type: text/plain; charset=UTF-8\n" 19 | "Content-Transfer-Encoding: 8bit\n" 20 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 21 | 22 | #: src/eim.h:47 23 | msgid "1234567890" 24 | msgstr "1234567890" 25 | 26 | #: src/eim.h:50 27 | msgid "1234qweras" 28 | msgstr "1234qweras" 29 | 30 | #: src/eim.h:111 31 | msgid "Action when switching input method" 32 | msgstr "" 33 | 34 | #: src/eim.h:114 35 | msgid "Add Phrase Forward" 36 | msgstr "Tilføj frase fremad" 37 | 38 | #: src/eim.h:118 39 | msgid "Automatically shift cursor" 40 | msgstr "Skift automatisk markør" 41 | 42 | #: src/eim.h:116 43 | msgid "Backward phrase choice" 44 | msgstr "Valg af baglæns frase" 45 | 46 | #: src/eim.h:104 47 | msgid "Candidate List Layout" 48 | msgstr "" 49 | 50 | #: src/eim.h:83 51 | msgid "Carpalx Keyboard" 52 | msgstr "Carpalx-tastatur" 53 | 54 | #: src/chewing-addon.conf.in.in:3 src/chewing.conf.in:3 55 | msgid "Chewing" 56 | msgstr "Chewing" 57 | 58 | #: src/chewing-addon.conf.in.in:4 59 | msgid "Chewing Wrapper For Fcitx" 60 | msgstr "Chewing-wrapper til Fcitx" 61 | 62 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:7 63 | msgid "Chewing for Fcitx 5" 64 | msgstr "Chewing til Fcitx 5" 65 | 66 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:8 67 | msgid "Chewing input method" 68 | msgstr "Chewing-inputmetode" 69 | 70 | #: src/eim.h:88 71 | msgid "Clear" 72 | msgstr "" 73 | 74 | #: src/eim.h:84 75 | msgid "Colemak-DH ANSI Keyboard" 76 | msgstr "" 77 | 78 | #: src/eim.h:84 79 | msgid "Colemak-DH Orth Keyboard" 80 | msgstr "" 81 | 82 | #: src/eim.h:89 83 | msgid "Commit current preedit" 84 | msgstr "" 85 | 86 | #: src/eim.h:90 87 | msgid "Commit default selection" 88 | msgstr "" 89 | 90 | #: src/eim.h:81 91 | msgid "DACHEN_CP26 Keyboard" 92 | msgstr "DACHEN_CP26-tastatur" 93 | 94 | #: src/eim.h:78 95 | msgid "Default Keyboard" 96 | msgstr "Standardtastatur" 97 | 98 | #: src/eim.h:80 99 | msgid "Dvorak Keyboard" 100 | msgstr "Dvorak-tastatur" 101 | 102 | #: src/eim.h:81 103 | msgid "Dvorak Keyboard with Hsu's support" 104 | msgstr "Dvorak-tastatur med understøttelse af Hsu's" 105 | 106 | #: src/eim.h:79 107 | msgid "ETen Keyboard" 108 | msgstr "ETen-tastatur" 109 | 110 | #: src/eim.h:80 111 | msgid "ETen26 Keyboard" 112 | msgstr "ETen26-tastatur" 113 | 114 | #: src/eim.h:120 115 | msgid "Enable easy symbol" 116 | msgstr "" 117 | 118 | #: src/eim.h:79 119 | msgid "Gin-Yieh Keyboard" 120 | msgstr "Gin-Yieh-tastatur" 121 | 122 | #: src/eim.h:82 123 | msgid "Han-Yu PinYin Keyboard" 124 | msgstr "Han-Yu PinYin-tastatur" 125 | 126 | #: src/eim.h:32 127 | msgid "Horizontal" 128 | msgstr "" 129 | 130 | #: src/eim.h:78 131 | msgid "Hsu's Keyboard" 132 | msgstr "Hsu's tastatur" 133 | 134 | #: src/eim.h:79 135 | msgid "IBM Keyboard" 136 | msgstr "IBM-tastatur" 137 | 138 | #: src/eim.h:124 139 | msgid "Keyboard Layout" 140 | msgstr "Tastaturlayout" 141 | 142 | #: src/eim.h:83 143 | msgid "MPS2 PinYin Keyboard" 144 | msgstr "" 145 | 146 | #: src/eim.h:100 147 | msgid "Page Size" 148 | msgstr "" 149 | 150 | #: src/eim.h:99 151 | msgid "Select candidate with arrow key" 152 | msgstr "" 153 | 154 | #: src/eim.h:95 155 | msgid "Selection Key" 156 | msgstr "Valgtast" 157 | 158 | #: src/eim.h:122 159 | msgid "Space as selection key" 160 | msgstr "Mellemrum som valgtast" 161 | 162 | #: src/eim.h:82 163 | msgid "THL PinYin Keyboard" 164 | msgstr "" 165 | 166 | #: src/eim.h:107 167 | msgid "Use Keypad as Selection key" 168 | msgstr "Brug numerisk tastatur som valgtast" 169 | 170 | #: src/eim.h:31 171 | msgid "Vertical" 172 | msgstr "" 173 | 174 | #: src/eim.h:49 175 | msgid "aoeuhtn789" 176 | msgstr "aoeuhtn789" 177 | 178 | #: src/eim.h:48 179 | msgid "asdfghjkl;" 180 | msgstr "asdfghjkl;" 181 | 182 | #: src/eim.h:49 183 | msgid "asdfjkl789" 184 | msgstr "asdfjkl789" 185 | 186 | #: src/eim.h:48 187 | msgid "asdfzxcv89" 188 | msgstr "asdfzxcv89" 189 | 190 | #: src/eim.h:50 191 | msgid "dstnaeo789" 192 | msgstr "dstnaeo789" 193 | -------------------------------------------------------------------------------- /po/de.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the fcitx5-chewing package. 4 | # 5 | # Translators: 6 | # csslayer , 2017 7 | # mar well , 2018 8 | # Ettore Atalan , 2022 9 | # 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: fcitx5-chewing\n" 13 | "Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" 14 | "POT-Creation-Date: 2024-05-03 20:24+0000\n" 15 | "PO-Revision-Date: 2017-12-08 17:30+0000\n" 16 | "Last-Translator: Ettore Atalan , 2022\n" 17 | "Language-Team: German (https://app.transifex.com/fcitx/teams/12005/de/)\n" 18 | "Language: de\n" 19 | "MIME-Version: 1.0\n" 20 | "Content-Type: text/plain; charset=UTF-8\n" 21 | "Content-Transfer-Encoding: 8bit\n" 22 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 23 | 24 | #: src/eim.h:47 25 | msgid "1234567890" 26 | msgstr "1234567890" 27 | 28 | #: src/eim.h:50 29 | msgid "1234qweras" 30 | msgstr "1234qweras" 31 | 32 | #: src/eim.h:111 33 | msgid "Action when switching input method" 34 | msgstr "" 35 | 36 | #: src/eim.h:114 37 | msgid "Add Phrase Forward" 38 | msgstr "Phrase nach vorne hinzufügen" 39 | 40 | #: src/eim.h:118 41 | msgid "Automatically shift cursor" 42 | msgstr "Cursor automatisch anheben" 43 | 44 | #: src/eim.h:116 45 | msgid "Backward phrase choice" 46 | msgstr "Phrase rückwärts auswählen" 47 | 48 | #: src/eim.h:104 49 | msgid "Candidate List Layout" 50 | msgstr "" 51 | 52 | #: src/eim.h:83 53 | msgid "Carpalx Keyboard" 54 | msgstr "Carpalx Tastatur" 55 | 56 | #: src/chewing-addon.conf.in.in:3 src/chewing.conf.in:3 57 | msgid "Chewing" 58 | msgstr "Chewing" 59 | 60 | #: src/chewing-addon.conf.in.in:4 61 | msgid "Chewing Wrapper For Fcitx" 62 | msgstr "Chewing Wrapper für Fcitx" 63 | 64 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:7 65 | msgid "Chewing for Fcitx 5" 66 | msgstr "" 67 | 68 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:8 69 | msgid "Chewing input method" 70 | msgstr "" 71 | 72 | #: src/eim.h:88 73 | msgid "Clear" 74 | msgstr "" 75 | 76 | #: src/eim.h:84 77 | msgid "Colemak-DH ANSI Keyboard" 78 | msgstr "" 79 | 80 | #: src/eim.h:84 81 | msgid "Colemak-DH Orth Keyboard" 82 | msgstr "" 83 | 84 | #: src/eim.h:89 85 | msgid "Commit current preedit" 86 | msgstr "" 87 | 88 | #: src/eim.h:90 89 | msgid "Commit default selection" 90 | msgstr "" 91 | 92 | #: src/eim.h:81 93 | msgid "DACHEN_CP26 Keyboard" 94 | msgstr "DACHEN_CP26 Tastatur" 95 | 96 | #: src/eim.h:78 97 | msgid "Default Keyboard" 98 | msgstr "Standardtastatur" 99 | 100 | #: src/eim.h:80 101 | msgid "Dvorak Keyboard" 102 | msgstr "Dvorak Tastatur" 103 | 104 | #: src/eim.h:81 105 | msgid "Dvorak Keyboard with Hsu's support" 106 | msgstr "Dvorak Keyboard mit Hsu's Unterstützung" 107 | 108 | #: src/eim.h:79 109 | msgid "ETen Keyboard" 110 | msgstr "ETen Tastatur" 111 | 112 | #: src/eim.h:80 113 | msgid "ETen26 Keyboard" 114 | msgstr "ETen26 Tastatur" 115 | 116 | #: src/eim.h:120 117 | msgid "Enable easy symbol" 118 | msgstr "" 119 | 120 | #: src/eim.h:79 121 | msgid "Gin-Yieh Keyboard" 122 | msgstr "Gin-Yieh Tastatur" 123 | 124 | #: src/eim.h:82 125 | msgid "Han-Yu PinYin Keyboard" 126 | msgstr "Han-Yu PinYin Tastatur" 127 | 128 | #: src/eim.h:32 129 | msgid "Horizontal" 130 | msgstr "Horizontal" 131 | 132 | #: src/eim.h:78 133 | msgid "Hsu's Keyboard" 134 | msgstr "Hsu's Tastatur" 135 | 136 | #: src/eim.h:79 137 | msgid "IBM Keyboard" 138 | msgstr "IBM Tastatur" 139 | 140 | #: src/eim.h:124 141 | msgid "Keyboard Layout" 142 | msgstr "Tastaturlayout" 143 | 144 | #: src/eim.h:83 145 | msgid "MPS2 PinYin Keyboard" 146 | msgstr "" 147 | 148 | #: src/eim.h:100 149 | msgid "Page Size" 150 | msgstr "Seitengröße" 151 | 152 | #: src/eim.h:99 153 | msgid "Select candidate with arrow key" 154 | msgstr "" 155 | 156 | #: src/eim.h:95 157 | msgid "Selection Key" 158 | msgstr "Auswahltaste" 159 | 160 | #: src/eim.h:122 161 | msgid "Space as selection key" 162 | msgstr "SPACE als Auswahltaste" 163 | 164 | #: src/eim.h:82 165 | msgid "THL PinYin Keyboard" 166 | msgstr "" 167 | 168 | #: src/eim.h:107 169 | msgid "Use Keypad as Selection key" 170 | msgstr "" 171 | 172 | #: src/eim.h:31 173 | msgid "Vertical" 174 | msgstr "Vertikal" 175 | 176 | #: src/eim.h:49 177 | msgid "aoeuhtn789" 178 | msgstr "aoeuhtn789" 179 | 180 | #: src/eim.h:48 181 | msgid "asdfghjkl;" 182 | msgstr "asdfghjkl;" 183 | 184 | #: src/eim.h:49 185 | msgid "asdfjkl789" 186 | msgstr "asdfjkl789" 187 | 188 | #: src/eim.h:48 189 | msgid "asdfzxcv89" 190 | msgstr "asdfzxcv89" 191 | 192 | #: src/eim.h:50 193 | msgid "dstnaeo789" 194 | msgstr "dstnaeo789" 195 | -------------------------------------------------------------------------------- /po/fcitx5-chewing.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the fcitx5-chewing package. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: fcitx5-chewing\n" 8 | "Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" 9 | "POT-Creation-Date: 2024-05-03 20:24+0000\n" 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 | "Last-Translator: FULL NAME \n" 12 | "Language-Team: LANGUAGE \n" 13 | "Language: LANG\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | 18 | #: src/eim.h:47 19 | msgid "1234567890" 20 | msgstr "" 21 | 22 | #: src/eim.h:50 23 | msgid "1234qweras" 24 | msgstr "" 25 | 26 | #: src/eim.h:111 27 | msgid "Action when switching input method" 28 | msgstr "" 29 | 30 | #: src/eim.h:114 31 | msgid "Add Phrase Forward" 32 | msgstr "" 33 | 34 | #: src/eim.h:118 35 | msgid "Automatically shift cursor" 36 | msgstr "" 37 | 38 | #: src/eim.h:116 39 | msgid "Backward phrase choice" 40 | msgstr "" 41 | 42 | #: src/eim.h:104 43 | msgid "Candidate List Layout" 44 | msgstr "" 45 | 46 | #: src/eim.h:83 47 | msgid "Carpalx Keyboard" 48 | msgstr "" 49 | 50 | #: src/chewing-addon.conf.in.in:3 src/chewing.conf.in:3 51 | msgid "Chewing" 52 | msgstr "" 53 | 54 | #: src/chewing-addon.conf.in.in:4 55 | msgid "Chewing Wrapper For Fcitx" 56 | msgstr "" 57 | 58 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:7 59 | msgid "Chewing for Fcitx 5" 60 | msgstr "" 61 | 62 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:8 63 | msgid "Chewing input method" 64 | msgstr "" 65 | 66 | #: src/eim.h:88 67 | msgid "Clear" 68 | msgstr "" 69 | 70 | #: src/eim.h:84 71 | msgid "Colemak-DH ANSI Keyboard" 72 | msgstr "" 73 | 74 | #: src/eim.h:84 75 | msgid "Colemak-DH Orth Keyboard" 76 | msgstr "" 77 | 78 | #: src/eim.h:89 79 | msgid "Commit current preedit" 80 | msgstr "" 81 | 82 | #: src/eim.h:90 83 | msgid "Commit default selection" 84 | msgstr "" 85 | 86 | #: src/eim.h:81 87 | msgid "DACHEN_CP26 Keyboard" 88 | msgstr "" 89 | 90 | #: src/eim.h:78 91 | msgid "Default Keyboard" 92 | msgstr "" 93 | 94 | #: src/eim.h:80 95 | msgid "Dvorak Keyboard" 96 | msgstr "" 97 | 98 | #: src/eim.h:81 99 | msgid "Dvorak Keyboard with Hsu's support" 100 | msgstr "" 101 | 102 | #: src/eim.h:79 103 | msgid "ETen Keyboard" 104 | msgstr "" 105 | 106 | #: src/eim.h:80 107 | msgid "ETen26 Keyboard" 108 | msgstr "" 109 | 110 | #: src/eim.h:120 111 | msgid "Enable easy symbol" 112 | msgstr "" 113 | 114 | #: src/eim.h:79 115 | msgid "Gin-Yieh Keyboard" 116 | msgstr "" 117 | 118 | #: src/eim.h:82 119 | msgid "Han-Yu PinYin Keyboard" 120 | msgstr "" 121 | 122 | #: src/eim.h:32 123 | msgid "Horizontal" 124 | msgstr "" 125 | 126 | #: src/eim.h:78 127 | msgid "Hsu's Keyboard" 128 | msgstr "" 129 | 130 | #: src/eim.h:79 131 | msgid "IBM Keyboard" 132 | msgstr "" 133 | 134 | #: src/eim.h:124 135 | msgid "Keyboard Layout" 136 | msgstr "" 137 | 138 | #: src/eim.h:83 139 | msgid "MPS2 PinYin Keyboard" 140 | msgstr "" 141 | 142 | #: src/eim.h:100 143 | msgid "Page Size" 144 | msgstr "" 145 | 146 | #: src/eim.h:99 147 | msgid "Select candidate with arrow key" 148 | msgstr "" 149 | 150 | #: src/eim.h:95 151 | msgid "Selection Key" 152 | msgstr "" 153 | 154 | #: src/eim.h:122 155 | msgid "Space as selection key" 156 | msgstr "" 157 | 158 | #: src/eim.h:82 159 | msgid "THL PinYin Keyboard" 160 | msgstr "" 161 | 162 | #: src/eim.h:107 163 | msgid "Use Keypad as Selection key" 164 | msgstr "" 165 | 166 | #: src/eim.h:31 167 | msgid "Vertical" 168 | msgstr "" 169 | 170 | #: src/eim.h:49 171 | msgid "aoeuhtn789" 172 | msgstr "" 173 | 174 | #: src/eim.h:48 175 | msgid "asdfghjkl;" 176 | msgstr "" 177 | 178 | #: src/eim.h:49 179 | msgid "asdfjkl789" 180 | msgstr "" 181 | 182 | #: src/eim.h:48 183 | msgid "asdfzxcv89" 184 | msgstr "" 185 | 186 | #: src/eim.h:50 187 | msgid "dstnaeo789" 188 | msgstr "" 189 | -------------------------------------------------------------------------------- /po/he.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the fcitx5-chewing package. 4 | # 5 | # Translators: 6 | # 63f334ffc0709ba0fc2361b80bf3c0f0_00ffd1e , 2021 7 | # 8 | msgid "" 9 | msgstr "" 10 | "Project-Id-Version: fcitx5-chewing\n" 11 | "Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" 12 | "POT-Creation-Date: 2024-05-03 20:24+0000\n" 13 | "PO-Revision-Date: 2017-12-08 17:30+0000\n" 14 | "Last-Translator: 63f334ffc0709ba0fc2361b80bf3c0f0_00ffd1e " 15 | ", 2021\n" 16 | "Language-Team: Hebrew (https://app.transifex.com/fcitx/teams/12005/he/)\n" 17 | "Language: he\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Plural-Forms: nplurals=3; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % " 22 | "1 == 0) ? 1: 2;\n" 23 | 24 | #: src/eim.h:47 25 | msgid "1234567890" 26 | msgstr "" 27 | 28 | #: src/eim.h:50 29 | msgid "1234qweras" 30 | msgstr "1234qweras" 31 | 32 | #: src/eim.h:111 33 | msgid "Action when switching input method" 34 | msgstr "" 35 | 36 | #: src/eim.h:114 37 | msgid "Add Phrase Forward" 38 | msgstr "" 39 | 40 | #: src/eim.h:118 41 | msgid "Automatically shift cursor" 42 | msgstr "" 43 | 44 | #: src/eim.h:116 45 | msgid "Backward phrase choice" 46 | msgstr "" 47 | 48 | #: src/eim.h:104 49 | msgid "Candidate List Layout" 50 | msgstr "" 51 | 52 | #: src/eim.h:83 53 | msgid "Carpalx Keyboard" 54 | msgstr "" 55 | 56 | #: src/chewing-addon.conf.in.in:3 src/chewing.conf.in:3 57 | msgid "Chewing" 58 | msgstr "" 59 | 60 | #: src/chewing-addon.conf.in.in:4 61 | msgid "Chewing Wrapper For Fcitx" 62 | msgstr "" 63 | 64 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:7 65 | msgid "Chewing for Fcitx 5" 66 | msgstr "" 67 | 68 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:8 69 | msgid "Chewing input method" 70 | msgstr "" 71 | 72 | #: src/eim.h:88 73 | msgid "Clear" 74 | msgstr "" 75 | 76 | #: src/eim.h:84 77 | msgid "Colemak-DH ANSI Keyboard" 78 | msgstr "" 79 | 80 | #: src/eim.h:84 81 | msgid "Colemak-DH Orth Keyboard" 82 | msgstr "" 83 | 84 | #: src/eim.h:89 85 | msgid "Commit current preedit" 86 | msgstr "" 87 | 88 | #: src/eim.h:90 89 | msgid "Commit default selection" 90 | msgstr "" 91 | 92 | #: src/eim.h:81 93 | msgid "DACHEN_CP26 Keyboard" 94 | msgstr "" 95 | 96 | #: src/eim.h:78 97 | msgid "Default Keyboard" 98 | msgstr "" 99 | 100 | #: src/eim.h:80 101 | msgid "Dvorak Keyboard" 102 | msgstr "" 103 | 104 | #: src/eim.h:81 105 | msgid "Dvorak Keyboard with Hsu's support" 106 | msgstr "" 107 | 108 | #: src/eim.h:79 109 | msgid "ETen Keyboard" 110 | msgstr "" 111 | 112 | #: src/eim.h:80 113 | msgid "ETen26 Keyboard" 114 | msgstr "" 115 | 116 | #: src/eim.h:120 117 | msgid "Enable easy symbol" 118 | msgstr "" 119 | 120 | #: src/eim.h:79 121 | msgid "Gin-Yieh Keyboard" 122 | msgstr "" 123 | 124 | #: src/eim.h:82 125 | msgid "Han-Yu PinYin Keyboard" 126 | msgstr "" 127 | 128 | #: src/eim.h:32 129 | msgid "Horizontal" 130 | msgstr "" 131 | 132 | #: src/eim.h:78 133 | msgid "Hsu's Keyboard" 134 | msgstr "" 135 | 136 | #: src/eim.h:79 137 | msgid "IBM Keyboard" 138 | msgstr "" 139 | 140 | #: src/eim.h:124 141 | msgid "Keyboard Layout" 142 | msgstr "פריסת מקלדת" 143 | 144 | #: src/eim.h:83 145 | msgid "MPS2 PinYin Keyboard" 146 | msgstr "" 147 | 148 | #: src/eim.h:100 149 | msgid "Page Size" 150 | msgstr "" 151 | 152 | #: src/eim.h:99 153 | msgid "Select candidate with arrow key" 154 | msgstr "" 155 | 156 | #: src/eim.h:95 157 | msgid "Selection Key" 158 | msgstr "" 159 | 160 | #: src/eim.h:122 161 | msgid "Space as selection key" 162 | msgstr "" 163 | 164 | #: src/eim.h:82 165 | msgid "THL PinYin Keyboard" 166 | msgstr "" 167 | 168 | #: src/eim.h:107 169 | msgid "Use Keypad as Selection key" 170 | msgstr "" 171 | 172 | #: src/eim.h:31 173 | msgid "Vertical" 174 | msgstr "" 175 | 176 | #: src/eim.h:49 177 | msgid "aoeuhtn789" 178 | msgstr "" 179 | 180 | #: src/eim.h:48 181 | msgid "asdfghjkl;" 182 | msgstr "asdfghjkl;" 183 | 184 | #: src/eim.h:49 185 | msgid "asdfjkl789" 186 | msgstr "" 187 | 188 | #: src/eim.h:48 189 | msgid "asdfzxcv89" 190 | msgstr "asdfzxcv89" 191 | 192 | #: src/eim.h:50 193 | msgid "dstnaeo789" 194 | msgstr "dstnaeo789" 195 | -------------------------------------------------------------------------------- /po/ja.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the fcitx5-chewing package. 4 | # 5 | # Translators: 6 | # csslayer , 2017 7 | # UTUMI Hirosi , 2020 8 | # Takuro Onoue , 2022 9 | # 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: fcitx5-chewing\n" 13 | "Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" 14 | "POT-Creation-Date: 2024-05-03 20:24+0000\n" 15 | "PO-Revision-Date: 2017-12-08 17:30+0000\n" 16 | "Last-Translator: Takuro Onoue , 2022\n" 17 | "Language-Team: Japanese (https://app.transifex.com/fcitx/teams/12005/ja/)\n" 18 | "Language: ja\n" 19 | "MIME-Version: 1.0\n" 20 | "Content-Type: text/plain; charset=UTF-8\n" 21 | "Content-Transfer-Encoding: 8bit\n" 22 | "Plural-Forms: nplurals=1; plural=0;\n" 23 | 24 | #: src/eim.h:47 25 | msgid "1234567890" 26 | msgstr "1234567890" 27 | 28 | #: src/eim.h:50 29 | msgid "1234qweras" 30 | msgstr "1234qweras" 31 | 32 | #: src/eim.h:111 33 | msgid "Action when switching input method" 34 | msgstr "" 35 | 36 | #: src/eim.h:114 37 | msgid "Add Phrase Forward" 38 | msgstr "前にフレーズを追加" 39 | 40 | #: src/eim.h:118 41 | msgid "Automatically shift cursor" 42 | msgstr "カーソルを自動的にシフト" 43 | 44 | #: src/eim.h:116 45 | msgid "Backward phrase choice" 46 | msgstr "後方フレーズを選択" 47 | 48 | #: src/eim.h:104 49 | msgid "Candidate List Layout" 50 | msgstr "候補リストのレイアウト" 51 | 52 | #: src/eim.h:83 53 | msgid "Carpalx Keyboard" 54 | msgstr "Carpalx キーボード" 55 | 56 | #: src/chewing-addon.conf.in.in:3 src/chewing.conf.in:3 57 | msgid "Chewing" 58 | msgstr "Chewing" 59 | 60 | #: src/chewing-addon.conf.in.in:4 61 | msgid "Chewing Wrapper For Fcitx" 62 | msgstr "Fcitx 用 Chewing ラッパー" 63 | 64 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:7 65 | msgid "Chewing for Fcitx 5" 66 | msgstr "Chewing for Fcitx 5" 67 | 68 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:8 69 | msgid "Chewing input method" 70 | msgstr "Chewing入力メソッド" 71 | 72 | #: src/eim.h:88 73 | msgid "Clear" 74 | msgstr "" 75 | 76 | #: src/eim.h:84 77 | msgid "Colemak-DH ANSI Keyboard" 78 | msgstr "" 79 | 80 | #: src/eim.h:84 81 | msgid "Colemak-DH Orth Keyboard" 82 | msgstr "" 83 | 84 | #: src/eim.h:89 85 | msgid "Commit current preedit" 86 | msgstr "" 87 | 88 | #: src/eim.h:90 89 | msgid "Commit default selection" 90 | msgstr "" 91 | 92 | #: src/eim.h:81 93 | msgid "DACHEN_CP26 Keyboard" 94 | msgstr "DACHEN_CP26 キーボード" 95 | 96 | #: src/eim.h:78 97 | msgid "Default Keyboard" 98 | msgstr "デフォルトのキーボード" 99 | 100 | #: src/eim.h:80 101 | msgid "Dvorak Keyboard" 102 | msgstr "Dvorak キーボード" 103 | 104 | #: src/eim.h:81 105 | msgid "Dvorak Keyboard with Hsu's support" 106 | msgstr "Hsu サポートの Dvorak キーボード" 107 | 108 | #: src/eim.h:79 109 | msgid "ETen Keyboard" 110 | msgstr "Eten キーボード" 111 | 112 | #: src/eim.h:80 113 | msgid "ETen26 Keyboard" 114 | msgstr "Eten26 キーボード" 115 | 116 | #: src/eim.h:120 117 | msgid "Enable easy symbol" 118 | msgstr "" 119 | 120 | #: src/eim.h:79 121 | msgid "Gin-Yieh Keyboard" 122 | msgstr "Gin-Yieh キーボード" 123 | 124 | #: src/eim.h:82 125 | msgid "Han-Yu PinYin Keyboard" 126 | msgstr "Han-Yu PinYin キーボード" 127 | 128 | #: src/eim.h:32 129 | msgid "Horizontal" 130 | msgstr "水平" 131 | 132 | #: src/eim.h:78 133 | msgid "Hsu's Keyboard" 134 | msgstr "Hsu キーボード" 135 | 136 | #: src/eim.h:79 137 | msgid "IBM Keyboard" 138 | msgstr "IBM キーボード" 139 | 140 | #: src/eim.h:124 141 | msgid "Keyboard Layout" 142 | msgstr "キーボードレイアウト" 143 | 144 | #: src/eim.h:83 145 | msgid "MPS2 PinYin Keyboard" 146 | msgstr "" 147 | 148 | #: src/eim.h:100 149 | msgid "Page Size" 150 | msgstr "ページサイズ" 151 | 152 | #: src/eim.h:99 153 | msgid "Select candidate with arrow key" 154 | msgstr "" 155 | 156 | #: src/eim.h:95 157 | msgid "Selection Key" 158 | msgstr "選択キー" 159 | 160 | #: src/eim.h:122 161 | msgid "Space as selection key" 162 | msgstr "スペースを選択キーとして使う" 163 | 164 | #: src/eim.h:82 165 | msgid "THL PinYin Keyboard" 166 | msgstr "" 167 | 168 | #: src/eim.h:107 169 | msgid "Use Keypad as Selection key" 170 | msgstr "選択キーとしてキーパッドを使用する" 171 | 172 | #: src/eim.h:31 173 | msgid "Vertical" 174 | msgstr "垂直" 175 | 176 | #: src/eim.h:49 177 | msgid "aoeuhtn789" 178 | msgstr "aoeuhtn789" 179 | 180 | #: src/eim.h:48 181 | msgid "asdfghjkl;" 182 | msgstr "asdfghjkl;" 183 | 184 | #: src/eim.h:49 185 | msgid "asdfjkl789" 186 | msgstr "asdfjkl789" 187 | 188 | #: src/eim.h:48 189 | msgid "asdfzxcv89" 190 | msgstr "asdfzxcv89" 191 | 192 | #: src/eim.h:50 193 | msgid "dstnaeo789" 194 | msgstr "dstnaeo789" 195 | -------------------------------------------------------------------------------- /po/ko.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the fcitx5-chewing package. 4 | # 5 | # Translators: 6 | # csslayer , 2017 7 | # Bon Keun Seo , 2021 8 | # Junghee Lee , 2022 9 | # 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: fcitx5-chewing\n" 13 | "Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" 14 | "POT-Creation-Date: 2024-05-03 20:24+0000\n" 15 | "PO-Revision-Date: 2017-12-08 17:30+0000\n" 16 | "Last-Translator: Junghee Lee , 2022\n" 17 | "Language-Team: Korean (https://app.transifex.com/fcitx/teams/12005/ko/)\n" 18 | "Language: ko\n" 19 | "MIME-Version: 1.0\n" 20 | "Content-Type: text/plain; charset=UTF-8\n" 21 | "Content-Transfer-Encoding: 8bit\n" 22 | "Plural-Forms: nplurals=1; plural=0;\n" 23 | 24 | #: src/eim.h:47 25 | msgid "1234567890" 26 | msgstr "1234567890" 27 | 28 | #: src/eim.h:50 29 | msgid "1234qweras" 30 | msgstr "1234qweras" 31 | 32 | #: src/eim.h:111 33 | msgid "Action when switching input method" 34 | msgstr "" 35 | 36 | #: src/eim.h:114 37 | msgid "Add Phrase Forward" 38 | msgstr "구문 앞에 추가" 39 | 40 | #: src/eim.h:118 41 | msgid "Automatically shift cursor" 42 | msgstr "자동으로 커서 이동" 43 | 44 | #: src/eim.h:116 45 | msgid "Backward phrase choice" 46 | msgstr "역방향 구문 선택" 47 | 48 | #: src/eim.h:104 49 | msgid "Candidate List Layout" 50 | msgstr "후보 목록 자판" 51 | 52 | #: src/eim.h:83 53 | msgid "Carpalx Keyboard" 54 | msgstr "Carpalx 키보드" 55 | 56 | #: src/chewing-addon.conf.in.in:3 src/chewing.conf.in:3 57 | msgid "Chewing" 58 | msgstr "Chewing" 59 | 60 | #: src/chewing-addon.conf.in.in:4 61 | msgid "Chewing Wrapper For Fcitx" 62 | msgstr "Fcitx용 Chewing 래퍼" 63 | 64 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:7 65 | msgid "Chewing for Fcitx 5" 66 | msgstr "Fcitx5용 Chewing" 67 | 68 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:8 69 | msgid "Chewing input method" 70 | msgstr "Chewing 입력기" 71 | 72 | #: src/eim.h:88 73 | msgid "Clear" 74 | msgstr "" 75 | 76 | #: src/eim.h:84 77 | msgid "Colemak-DH ANSI Keyboard" 78 | msgstr "" 79 | 80 | #: src/eim.h:84 81 | msgid "Colemak-DH Orth Keyboard" 82 | msgstr "" 83 | 84 | #: src/eim.h:89 85 | msgid "Commit current preedit" 86 | msgstr "" 87 | 88 | #: src/eim.h:90 89 | msgid "Commit default selection" 90 | msgstr "" 91 | 92 | #: src/eim.h:81 93 | msgid "DACHEN_CP26 Keyboard" 94 | msgstr "DACHEN_CP26 키보드" 95 | 96 | #: src/eim.h:78 97 | msgid "Default Keyboard" 98 | msgstr "기본 키보드" 99 | 100 | #: src/eim.h:80 101 | msgid "Dvorak Keyboard" 102 | msgstr "드보락 키보드" 103 | 104 | #: src/eim.h:81 105 | msgid "Dvorak Keyboard with Hsu's support" 106 | msgstr "Hsu를 지원하는 드보락 키보드" 107 | 108 | #: src/eim.h:79 109 | msgid "ETen Keyboard" 110 | msgstr "ETen 키보드" 111 | 112 | #: src/eim.h:80 113 | msgid "ETen26 Keyboard" 114 | msgstr "ETen26 키보드" 115 | 116 | #: src/eim.h:120 117 | msgid "Enable easy symbol" 118 | msgstr "" 119 | 120 | #: src/eim.h:79 121 | msgid "Gin-Yieh Keyboard" 122 | msgstr "Gin-Yieh 키보드" 123 | 124 | #: src/eim.h:82 125 | msgid "Han-Yu PinYin Keyboard" 126 | msgstr "Han-Yu Pinyin 키보드" 127 | 128 | #: src/eim.h:32 129 | msgid "Horizontal" 130 | msgstr "가로" 131 | 132 | #: src/eim.h:78 133 | msgid "Hsu's Keyboard" 134 | msgstr "Hsu의 키보드" 135 | 136 | #: src/eim.h:79 137 | msgid "IBM Keyboard" 138 | msgstr "IBM 키보드" 139 | 140 | #: src/eim.h:124 141 | msgid "Keyboard Layout" 142 | msgstr "키보드 자판" 143 | 144 | #: src/eim.h:83 145 | msgid "MPS2 PinYin Keyboard" 146 | msgstr "" 147 | 148 | #: src/eim.h:100 149 | msgid "Page Size" 150 | msgstr "페이지 크기" 151 | 152 | #: src/eim.h:99 153 | msgid "Select candidate with arrow key" 154 | msgstr "" 155 | 156 | #: src/eim.h:95 157 | msgid "Selection Key" 158 | msgstr "선택 키" 159 | 160 | #: src/eim.h:122 161 | msgid "Space as selection key" 162 | msgstr "스페이스바를 선택 키로" 163 | 164 | #: src/eim.h:82 165 | msgid "THL PinYin Keyboard" 166 | msgstr "" 167 | 168 | #: src/eim.h:107 169 | msgid "Use Keypad as Selection key" 170 | msgstr "키패드를 선택 키로 사용" 171 | 172 | #: src/eim.h:31 173 | msgid "Vertical" 174 | msgstr "세로" 175 | 176 | #: src/eim.h:49 177 | msgid "aoeuhtn789" 178 | msgstr "aoeuhtn789" 179 | 180 | #: src/eim.h:48 181 | msgid "asdfghjkl;" 182 | msgstr "asdfghjkl;" 183 | 184 | #: src/eim.h:49 185 | msgid "asdfjkl789" 186 | msgstr "asdfjkl789" 187 | 188 | #: src/eim.h:48 189 | msgid "asdfzxcv89" 190 | msgstr "asdfzxcv89" 191 | 192 | #: src/eim.h:50 193 | msgid "dstnaeo789" 194 | msgstr "dstnaeo789" 195 | -------------------------------------------------------------------------------- /po/ru.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the fcitx5-chewing package. 4 | # 5 | # Translators: 6 | # csslayer , 2017 7 | # Dmitry , 2024 8 | # 9 | msgid "" 10 | msgstr "" 11 | "Project-Id-Version: fcitx5-chewing\n" 12 | "Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" 13 | "POT-Creation-Date: 2024-05-04 20:24+0000\n" 14 | "PO-Revision-Date: 2017-12-08 17:30+0000\n" 15 | "Last-Translator: Dmitry , 2024\n" 16 | "Language-Team: Russian (https://app.transifex.com/fcitx/teams/12005/ru/)\n" 17 | "Language: ru\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " 22 | "n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || " 23 | "(n%100>=11 && n%100<=14)? 2 : 3);\n" 24 | 25 | #: src/eim.h:50 26 | msgid "1234567890" 27 | msgstr "1234567890" 28 | 29 | #: src/eim.h:53 30 | msgid "1234qweras" 31 | msgstr "1234qweras" 32 | 33 | #: src/eim.h:168 34 | msgid "Action when switching input method" 35 | msgstr "Действие при переключении метода ввода" 36 | 37 | #: src/eim.h:171 38 | msgid "Add Phrase Forward" 39 | msgstr "Добавить фразу впереди" 40 | 41 | #: src/eim.h:175 42 | msgid "Automatically shift cursor" 43 | msgstr "Автоматически сдвигать курсор" 44 | 45 | #: src/eim.h:173 46 | msgid "Backward phrase choice" 47 | msgstr "Выбор фразы сзади" 48 | 49 | #: src/eim.h:161 50 | msgid "Candidate List Layout" 51 | msgstr "Расположение списка слов-кандидатов" 52 | 53 | #: src/eim.h:103 54 | msgid "Carpalx Keyboard" 55 | msgstr "Клавиатура Carpalx" 56 | 57 | #: src/chewing-addon.conf.in.in:3 src/chewing.conf.in:3 58 | msgid "Chewing" 59 | msgstr "Чжуинь" 60 | 61 | #: src/chewing-addon.conf.in.in:4 62 | msgid "Chewing Wrapper For Fcitx" 63 | msgstr "Обертка чжуинь для Fcitx" 64 | 65 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:7 66 | msgid "Chewing for Fcitx 5" 67 | msgstr "Chewing для Fcitx 5" 68 | 69 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:8 70 | msgid "Chewing input method" 71 | msgstr "Метод ввода Chewing" 72 | 73 | #: src/eim.h:145 74 | msgid "Clear" 75 | msgstr "Очистить" 76 | 77 | #: src/eim.h:104 78 | msgid "Colemak-DH ANSI Keyboard" 79 | msgstr "Клавиатура Colemak-DH ANSI" 80 | 81 | #: src/eim.h:104 82 | msgid "Colemak-DH Orth Keyboard" 83 | msgstr "Клавиатура Colemak-DH Orth" 84 | 85 | #: src/eim.h:146 86 | msgid "Commit current preedit" 87 | msgstr "Подтвердить текущее предварительное редактирование" 88 | 89 | #: src/eim.h:147 90 | msgid "Commit default selection" 91 | msgstr "Подтвердить выбор по умолчанию" 92 | 93 | #: src/eim.h:101 94 | msgid "DACHEN_CP26 Keyboard" 95 | msgstr "Клавиатура DACHEN_CP26" 96 | 97 | #: src/eim.h:98 98 | msgid "Default Keyboard" 99 | msgstr "Клавиатура по умолчанию" 100 | 101 | #: src/eim.h:100 102 | msgid "Dvorak Keyboard" 103 | msgstr "Клавиатура Дворака" 104 | 105 | #: src/eim.h:101 106 | msgid "Dvorak Keyboard with Hsu's support" 107 | msgstr "Клавиатура Дворака с поддержкой " 108 | 109 | #: src/eim.h:99 110 | msgid "ETen Keyboard" 111 | msgstr "Клавиатура ETen" 112 | 113 | #: src/eim.h:100 114 | msgid "ETen26 Keyboard" 115 | msgstr "Клавиатура ETen26" 116 | 117 | #: src/eim.h:177 118 | msgid "Enable easy symbol" 119 | msgstr "Включить простой символ" 120 | 121 | #: src/eim.h:99 122 | msgid "Gin-Yieh Keyboard" 123 | msgstr "Клавиатура Gin-Yieh" 124 | 125 | #: src/eim.h:102 126 | msgid "Han-Yu PinYin Keyboard" 127 | msgstr "Клавиатура Ханьюй Пиньинь" 128 | 129 | #: src/eim.h:35 130 | msgid "Horizontal" 131 | msgstr "Горизонтальный" 132 | 133 | #: src/eim.h:98 134 | msgid "Hsu's Keyboard" 135 | msgstr "Клавиатура Hsu's" 136 | 137 | #: src/eim.h:99 138 | msgid "IBM Keyboard" 139 | msgstr "Клавиатура IBM" 140 | 141 | #: src/eim.h:180 142 | msgid "Keyboard Layout" 143 | msgstr "Раскладка клавиатуры" 144 | 145 | #: src/eim.h:103 146 | msgid "MPS2 PinYin Keyboard" 147 | msgstr "Клавиатура MPS2 Пиньинь" 148 | 149 | #: src/eim.h:157 150 | msgid "Page Size" 151 | msgstr "Размер Страницы" 152 | 153 | #: src/eim.h:156 154 | msgid "Select candidate with arrow key" 155 | msgstr "Выберите слово-кандидат с помощью клавиши со стрелкой" 156 | 157 | #: src/eim.h:152 158 | msgid "Selection Key" 159 | msgstr "Клавиша выбора" 160 | 161 | #: src/eim.h:179 162 | msgid "Space as selection key" 163 | msgstr "Пробел в качестве клавиши выбора" 164 | 165 | #: src/eim.h:102 166 | msgid "THL PinYin Keyboard" 167 | msgstr "Клавиатура THL Пиньинь" 168 | 169 | #: src/eim.h:164 170 | msgid "Use Keypad as Selection key" 171 | msgstr "Использовать Keypad в качестве клавиши выбора" 172 | 173 | #: src/eim.h:34 174 | msgid "Vertical" 175 | msgstr "Вертикальный" 176 | 177 | #: src/eim.h:52 178 | msgid "aoeuhtn789" 179 | msgstr "aoeuhtn789" 180 | 181 | #: src/eim.h:51 182 | msgid "asdfghjkl;" 183 | msgstr "asdfghjkl;" 184 | 185 | #: src/eim.h:52 186 | msgid "asdfjkl789" 187 | msgstr "asdfjkl789" 188 | 189 | #: src/eim.h:51 190 | msgid "asdfzxcv89" 191 | msgstr "asdfzxcv89" 192 | 193 | #: src/eim.h:53 194 | msgid "dstnaeo789" 195 | msgstr "dstnaeo789" 196 | -------------------------------------------------------------------------------- /po/tr.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the fcitx5-chewing package. 4 | # 5 | # Translators: 6 | # csslayer , 2017 7 | # abc Def , 2021 8 | # 9 | msgid "" 10 | msgstr "" 11 | "Project-Id-Version: fcitx5-chewing\n" 12 | "Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" 13 | "POT-Creation-Date: 2024-05-03 20:24+0000\n" 14 | "PO-Revision-Date: 2017-12-08 17:30+0000\n" 15 | "Last-Translator: abc Def , 2021\n" 16 | "Language-Team: Turkish (https://app.transifex.com/fcitx/teams/12005/tr/)\n" 17 | "Language: tr\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 22 | 23 | #: src/eim.h:47 24 | msgid "1234567890" 25 | msgstr "1234567890" 26 | 27 | #: src/eim.h:50 28 | msgid "1234qweras" 29 | msgstr "1234qweras" 30 | 31 | #: src/eim.h:111 32 | msgid "Action when switching input method" 33 | msgstr "" 34 | 35 | #: src/eim.h:114 36 | msgid "Add Phrase Forward" 37 | msgstr "İfazı İleriye Ekle" 38 | 39 | #: src/eim.h:118 40 | msgid "Automatically shift cursor" 41 | msgstr "İmleci otomatik olarak kaydır" 42 | 43 | #: src/eim.h:116 44 | msgid "Backward phrase choice" 45 | msgstr "Geriye doğru ifade seçimi" 46 | 47 | #: src/eim.h:104 48 | msgid "Candidate List Layout" 49 | msgstr "" 50 | 51 | #: src/eim.h:83 52 | msgid "Carpalx Keyboard" 53 | msgstr "Carpalx Klavyesi" 54 | 55 | #: src/chewing-addon.conf.in.in:3 src/chewing.conf.in:3 56 | msgid "Chewing" 57 | msgstr "Çiğneme" 58 | 59 | #: src/chewing-addon.conf.in.in:4 60 | msgid "Chewing Wrapper For Fcitx" 61 | msgstr "Fcitx için Çiğneme Wrapperı" 62 | 63 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:7 64 | msgid "Chewing for Fcitx 5" 65 | msgstr "Fcixtx 5 için çiğneme" 66 | 67 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:8 68 | msgid "Chewing input method" 69 | msgstr "Çiğneme giriş yöntemi" 70 | 71 | #: src/eim.h:88 72 | msgid "Clear" 73 | msgstr "" 74 | 75 | #: src/eim.h:84 76 | msgid "Colemak-DH ANSI Keyboard" 77 | msgstr "" 78 | 79 | #: src/eim.h:84 80 | msgid "Colemak-DH Orth Keyboard" 81 | msgstr "" 82 | 83 | #: src/eim.h:89 84 | msgid "Commit current preedit" 85 | msgstr "" 86 | 87 | #: src/eim.h:90 88 | msgid "Commit default selection" 89 | msgstr "" 90 | 91 | #: src/eim.h:81 92 | msgid "DACHEN_CP26 Keyboard" 93 | msgstr "DACHEN_CP26 Klavyesi" 94 | 95 | #: src/eim.h:78 96 | msgid "Default Keyboard" 97 | msgstr "Varsayılan Klavye" 98 | 99 | #: src/eim.h:80 100 | msgid "Dvorak Keyboard" 101 | msgstr "Dvorak Klavyesi" 102 | 103 | #: src/eim.h:81 104 | msgid "Dvorak Keyboard with Hsu's support" 105 | msgstr "Hsu destekli Dvorak Klavyesi" 106 | 107 | #: src/eim.h:79 108 | msgid "ETen Keyboard" 109 | msgstr "ETen Klavyesi" 110 | 111 | #: src/eim.h:80 112 | msgid "ETen26 Keyboard" 113 | msgstr "ETen26 Klavyesi" 114 | 115 | #: src/eim.h:120 116 | msgid "Enable easy symbol" 117 | msgstr "" 118 | 119 | #: src/eim.h:79 120 | msgid "Gin-Yieh Keyboard" 121 | msgstr "Gin-Yieh Klavyesi" 122 | 123 | #: src/eim.h:82 124 | msgid "Han-Yu PinYin Keyboard" 125 | msgstr "Han-Yu PinYin Klavyesi" 126 | 127 | #: src/eim.h:32 128 | msgid "Horizontal" 129 | msgstr "" 130 | 131 | #: src/eim.h:78 132 | msgid "Hsu's Keyboard" 133 | msgstr "Hsu Klavyesi" 134 | 135 | #: src/eim.h:79 136 | msgid "IBM Keyboard" 137 | msgstr "IBM Klavyesi" 138 | 139 | #: src/eim.h:124 140 | msgid "Keyboard Layout" 141 | msgstr "Klavye Düzeni " 142 | 143 | #: src/eim.h:83 144 | msgid "MPS2 PinYin Keyboard" 145 | msgstr "" 146 | 147 | #: src/eim.h:100 148 | msgid "Page Size" 149 | msgstr "" 150 | 151 | #: src/eim.h:99 152 | msgid "Select candidate with arrow key" 153 | msgstr "" 154 | 155 | #: src/eim.h:95 156 | msgid "Selection Key" 157 | msgstr "Seçim Tuşu" 158 | 159 | #: src/eim.h:122 160 | msgid "Space as selection key" 161 | msgstr "Seçim tuşu olarak boşluk tuşu" 162 | 163 | #: src/eim.h:82 164 | msgid "THL PinYin Keyboard" 165 | msgstr "" 166 | 167 | #: src/eim.h:107 168 | msgid "Use Keypad as Selection key" 169 | msgstr "Seçim tuşu olarak Tuş Takımını kullan" 170 | 171 | #: src/eim.h:31 172 | msgid "Vertical" 173 | msgstr "" 174 | 175 | #: src/eim.h:49 176 | msgid "aoeuhtn789" 177 | msgstr "aoeuhtn789" 178 | 179 | #: src/eim.h:48 180 | msgid "asdfghjkl;" 181 | msgstr "asdfghjkl;" 182 | 183 | #: src/eim.h:49 184 | msgid "asdfjkl789" 185 | msgstr "asdfjkl789" 186 | 187 | #: src/eim.h:48 188 | msgid "asdfzxcv89" 189 | msgstr "asdfzxcv89" 190 | 191 | #: src/eim.h:50 192 | msgid "dstnaeo789" 193 | msgstr "dstnaeo789" 194 | -------------------------------------------------------------------------------- /po/vi.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the fcitx5-chewing package. 4 | # 5 | # Translators: 6 | # hoanghuy309 , 2025 7 | # 8 | msgid "" 9 | msgstr "" 10 | "Project-Id-Version: fcitx5-chewing\n" 11 | "Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" 12 | "POT-Creation-Date: 2025-04-22 20:24+0000\n" 13 | "PO-Revision-Date: 2017-12-08 17:30+0000\n" 14 | "Last-Translator: hoanghuy309 , 2025\n" 15 | "Language-Team: Vietnamese (https://app.transifex.com/fcitx/teams/12005/vi/)\n" 16 | "Language: vi\n" 17 | "MIME-Version: 1.0\n" 18 | "Content-Type: text/plain; charset=UTF-8\n" 19 | "Content-Transfer-Encoding: 8bit\n" 20 | "Plural-Forms: nplurals=1; plural=0;\n" 21 | 22 | #: src/eim.h:55 23 | msgid "1234567890" 24 | msgstr "" 25 | 26 | #: src/eim.h:58 27 | msgid "1234qweras" 28 | msgstr "" 29 | 30 | #: src/eim.h:172 31 | msgid "Action when switching input method" 32 | msgstr "Hành động khi chuyển đổi kiểu gõ" 33 | 34 | #: src/eim.h:175 35 | msgid "Add Phrase Forward" 36 | msgstr "" 37 | 38 | #: src/eim.h:179 39 | msgid "Automatically shift cursor" 40 | msgstr "" 41 | 42 | #: src/eim.h:177 43 | msgid "Backward phrase choice" 44 | msgstr "" 45 | 46 | #: src/eim.h:165 47 | msgid "Candidate List Layout" 48 | msgstr "" 49 | 50 | #: src/eim.h:108 51 | msgid "Carpalx Keyboard" 52 | msgstr "" 53 | 54 | #: src/chewing-addon.conf.in.in:2 src/chewing.conf.in:2 55 | msgid "Chewing" 56 | msgstr "" 57 | 58 | #: src/chewing-addon.conf.in.in:3 59 | msgid "Chewing Wrapper For Fcitx" 60 | msgstr "" 61 | 62 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:7 63 | msgid "Chewing for Fcitx 5" 64 | msgstr "" 65 | 66 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:8 67 | msgid "Chewing input method" 68 | msgstr "" 69 | 70 | #: src/eim.h:149 71 | msgid "Clear" 72 | msgstr "" 73 | 74 | #: src/eim.h:109 75 | msgid "Colemak-DH ANSI Keyboard" 76 | msgstr "" 77 | 78 | #: src/eim.h:109 79 | msgid "Colemak-DH Orth Keyboard" 80 | msgstr "" 81 | 82 | #: src/eim.h:150 83 | msgid "Commit current preedit" 84 | msgstr "" 85 | 86 | #: src/eim.h:151 87 | msgid "Commit default selection" 88 | msgstr "" 89 | 90 | #: src/eim.h:106 91 | msgid "DACHEN_CP26 Keyboard" 92 | msgstr "" 93 | 94 | #: src/eim.h:103 95 | msgid "Default Keyboard" 96 | msgstr "Bàn Phím Mặc Định" 97 | 98 | #: src/eim.h:105 99 | msgid "Dvorak Keyboard" 100 | msgstr "" 101 | 102 | #: src/eim.h:106 103 | msgid "Dvorak Keyboard with Hsu's support" 104 | msgstr "" 105 | 106 | #: src/eim.h:104 107 | msgid "ETen Keyboard" 108 | msgstr "" 109 | 110 | #: src/eim.h:105 111 | msgid "ETen26 Keyboard" 112 | msgstr "" 113 | 114 | #: src/eim.h:181 115 | msgid "Enable easy symbol" 116 | msgstr "" 117 | 118 | #: src/eim.h:104 119 | msgid "Gin-Yieh Keyboard" 120 | msgstr "" 121 | 122 | #: src/eim.h:107 123 | msgid "Han-Yu PinYin Keyboard" 124 | msgstr "" 125 | 126 | #: src/eim.h:40 127 | msgid "Horizontal" 128 | msgstr "" 129 | 130 | #: src/eim.h:103 131 | msgid "Hsu's Keyboard" 132 | msgstr "" 133 | 134 | #: src/eim.h:104 135 | msgid "IBM Keyboard" 136 | msgstr "" 137 | 138 | #: src/eim.h:184 139 | msgid "Keyboard Layout" 140 | msgstr "Bố Cục Bàn Phím" 141 | 142 | #: src/eim.h:108 143 | msgid "MPS2 PinYin Keyboard" 144 | msgstr "" 145 | 146 | #: src/eim.h:161 147 | msgid "Page Size" 148 | msgstr "" 149 | 150 | #: src/eim.h:160 151 | msgid "Select candidate with arrow key" 152 | msgstr "Chọn ứng cử viên với phím mũi tên" 153 | 154 | #: src/eim.h:156 155 | msgid "Selection Key" 156 | msgstr "Phím Lựa Chọn" 157 | 158 | #: src/eim.h:183 159 | msgid "Space as selection key" 160 | msgstr "Khoảng trắng làm phím lựa chọn" 161 | 162 | #: src/eim.h:107 163 | msgid "THL PinYin Keyboard" 164 | msgstr "" 165 | 166 | #: src/eim.h:168 167 | msgid "Use Keypad as Selection key" 168 | msgstr "" 169 | 170 | #: src/eim.h:39 171 | msgid "Vertical" 172 | msgstr "" 173 | 174 | #: src/eim.h:57 175 | msgid "aoeuhtn789" 176 | msgstr "" 177 | 178 | #: src/eim.h:56 179 | msgid "asdfghjkl;" 180 | msgstr "" 181 | 182 | #: src/eim.h:57 183 | msgid "asdfjkl789" 184 | msgstr "" 185 | 186 | #: src/eim.h:56 187 | msgid "asdfzxcv89" 188 | msgstr "" 189 | 190 | #: src/eim.h:58 191 | msgid "dstnaeo789" 192 | msgstr "" 193 | -------------------------------------------------------------------------------- /po/zh_CN.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the fcitx5-chewing package. 4 | # 5 | # Translators: 6 | # csslayer , 2024 7 | # Lau YeeYu, 2024 8 | # 9 | msgid "" 10 | msgstr "" 11 | "Project-Id-Version: fcitx5-chewing\n" 12 | "Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" 13 | "POT-Creation-Date: 2024-05-10 20:24+0000\n" 14 | "PO-Revision-Date: 2017-12-08 17:30+0000\n" 15 | "Last-Translator: Lau YeeYu, 2024\n" 16 | "Language-Team: Chinese (China) (https://app.transifex.com/fcitx/teams/12005/" 17 | "zh_CN/)\n" 18 | "Language: zh_CN\n" 19 | "MIME-Version: 1.0\n" 20 | "Content-Type: text/plain; charset=UTF-8\n" 21 | "Content-Transfer-Encoding: 8bit\n" 22 | "Plural-Forms: nplurals=1; plural=0;\n" 23 | 24 | #: src/eim.h:50 25 | msgid "1234567890" 26 | msgstr "1234567890" 27 | 28 | #: src/eim.h:53 29 | msgid "1234qweras" 30 | msgstr "1234qweras" 31 | 32 | #: src/eim.h:168 33 | msgid "Action when switching input method" 34 | msgstr "切换输入法时的行为" 35 | 36 | #: src/eim.h:171 37 | msgid "Add Phrase Forward" 38 | msgstr "前方加词" 39 | 40 | #: src/eim.h:175 41 | msgid "Automatically shift cursor" 42 | msgstr "选词完毕自动移到下一个词" 43 | 44 | #: src/eim.h:173 45 | msgid "Backward phrase choice" 46 | msgstr "后方选择字词" 47 | 48 | #: src/eim.h:161 49 | msgid "Candidate List Layout" 50 | msgstr "候选词列表方向" 51 | 52 | #: src/eim.h:103 53 | msgid "Carpalx Keyboard" 54 | msgstr "Carpalx 键盘" 55 | 56 | #: src/chewing-addon.conf.in.in:3 src/chewing.conf.in:3 57 | msgid "Chewing" 58 | msgstr "新酷音" 59 | 60 | #: src/chewing-addon.conf.in.in:4 61 | msgid "Chewing Wrapper For Fcitx" 62 | msgstr "Fcitx 的 新酷音封装" 63 | 64 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:7 65 | msgid "Chewing for Fcitx 5" 66 | msgstr "Fcitx 5 的新酷音支持" 67 | 68 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:8 69 | msgid "Chewing input method" 70 | msgstr "新酷音输入法" 71 | 72 | #: src/eim.h:145 73 | msgid "Clear" 74 | msgstr "清空" 75 | 76 | #: src/eim.h:104 77 | msgid "Colemak-DH ANSI Keyboard" 78 | msgstr "Colemak-DH ANSI 键盘" 79 | 80 | #: src/eim.h:104 81 | msgid "Colemak-DH Orth Keyboard" 82 | msgstr "Colemak-DH Orth 键盘" 83 | 84 | #: src/eim.h:146 85 | msgid "Commit current preedit" 86 | msgstr "提交当前预编辑" 87 | 88 | #: src/eim.h:147 89 | msgid "Commit default selection" 90 | msgstr "提交默认选择" 91 | 92 | #: src/eim.h:101 93 | msgid "DACHEN_CP26 Keyboard" 94 | msgstr "大千26键键盘" 95 | 96 | #: src/eim.h:98 97 | msgid "Default Keyboard" 98 | msgstr "默认键盘" 99 | 100 | #: src/eim.h:100 101 | msgid "Dvorak Keyboard" 102 | msgstr "Dvorak键盘" 103 | 104 | #: src/eim.h:101 105 | msgid "Dvorak Keyboard with Hsu's support" 106 | msgstr "Dvorak键盘 + 许氏注音" 107 | 108 | #: src/eim.h:99 109 | msgid "ETen Keyboard" 110 | msgstr "倚天键盘" 111 | 112 | #: src/eim.h:100 113 | msgid "ETen26 Keyboard" 114 | msgstr "倚天26键键盘" 115 | 116 | #: src/eim.h:177 117 | msgid "Enable easy symbol" 118 | msgstr "启用快捷符号输入" 119 | 120 | #: src/eim.h:99 121 | msgid "Gin-Yieh Keyboard" 122 | msgstr "精业键盘" 123 | 124 | #: src/eim.h:102 125 | msgid "Han-Yu PinYin Keyboard" 126 | msgstr "汉语拼音键盘" 127 | 128 | #: src/eim.h:35 129 | msgid "Horizontal" 130 | msgstr "横排" 131 | 132 | #: src/eim.h:98 133 | msgid "Hsu's Keyboard" 134 | msgstr "许氏键盘" 135 | 136 | #: src/eim.h:99 137 | msgid "IBM Keyboard" 138 | msgstr "IBM键盘" 139 | 140 | #: src/eim.h:180 141 | msgid "Keyboard Layout" 142 | msgstr "键盘布局" 143 | 144 | #: src/eim.h:103 145 | msgid "MPS2 PinYin Keyboard" 146 | msgstr "MPS2 拼音键盘" 147 | 148 | #: src/eim.h:157 149 | msgid "Page Size" 150 | msgstr "页大小" 151 | 152 | #: src/eim.h:156 153 | msgid "Select candidate with arrow key" 154 | msgstr "用方向键选择候选词" 155 | 156 | #: src/eim.h:152 157 | msgid "Selection Key" 158 | msgstr "选词键" 159 | 160 | #: src/eim.h:179 161 | msgid "Space as selection key" 162 | msgstr "空格键选词" 163 | 164 | #: src/eim.h:102 165 | msgid "THL PinYin Keyboard" 166 | msgstr "THL 拼音键盘" 167 | 168 | #: src/eim.h:164 169 | msgid "Use Keypad as Selection key" 170 | msgstr "使用小键盘作为选择键" 171 | 172 | #: src/eim.h:34 173 | msgid "Vertical" 174 | msgstr "竖排" 175 | 176 | #: src/eim.h:52 177 | msgid "aoeuhtn789" 178 | msgstr "aoeuhtn789" 179 | 180 | #: src/eim.h:51 181 | msgid "asdfghjkl;" 182 | msgstr "asdfghjkl;" 183 | 184 | #: src/eim.h:52 185 | msgid "asdfjkl789" 186 | msgstr "asdfjkl789" 187 | 188 | #: src/eim.h:51 189 | msgid "asdfzxcv89" 190 | msgstr "asdfzxcv89" 191 | 192 | #: src/eim.h:53 193 | msgid "dstnaeo789" 194 | msgstr "dstnaeo789" 195 | -------------------------------------------------------------------------------- /po/zh_TW.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the fcitx5-chewing package. 4 | # 5 | # Translators: 6 | # Billy SU , 2020 7 | # PHLin , 2021 8 | # csslayer , 2021 9 | # Weizhong Yang , 2022 10 | # yan12125, 2022 11 | # Lau YeeYu, 2024 12 | # 13 | msgid "" 14 | msgstr "" 15 | "Project-Id-Version: fcitx5-chewing\n" 16 | "Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" 17 | "POT-Creation-Date: 2024-05-10 20:24+0000\n" 18 | "PO-Revision-Date: 2017-12-08 17:30+0000\n" 19 | "Last-Translator: Lau YeeYu, 2024\n" 20 | "Language-Team: Chinese (Taiwan) (https://app.transifex.com/fcitx/teams/12005/" 21 | "zh_TW/)\n" 22 | "Language: zh_TW\n" 23 | "MIME-Version: 1.0\n" 24 | "Content-Type: text/plain; charset=UTF-8\n" 25 | "Content-Transfer-Encoding: 8bit\n" 26 | "Plural-Forms: nplurals=1; plural=0;\n" 27 | 28 | #: src/eim.h:50 29 | msgid "1234567890" 30 | msgstr "1234567890" 31 | 32 | #: src/eim.h:53 33 | msgid "1234qweras" 34 | msgstr "1234qweras" 35 | 36 | #: src/eim.h:168 37 | msgid "Action when switching input method" 38 | msgstr "切換輸入法時的行為" 39 | 40 | #: src/eim.h:171 41 | msgid "Add Phrase Forward" 42 | msgstr "前方加詞" 43 | 44 | #: src/eim.h:175 45 | msgid "Automatically shift cursor" 46 | msgstr "選字完畢自動移到下一個字" 47 | 48 | #: src/eim.h:173 49 | msgid "Backward phrase choice" 50 | msgstr "後方選擇字詞" 51 | 52 | #: src/eim.h:161 53 | msgid "Candidate List Layout" 54 | msgstr "候選字詞排列方式" 55 | 56 | #: src/eim.h:103 57 | msgid "Carpalx Keyboard" 58 | msgstr "Carpalx 鍵盤" 59 | 60 | #: src/chewing-addon.conf.in.in:3 src/chewing.conf.in:3 61 | msgid "Chewing" 62 | msgstr "新酷音" 63 | 64 | #: src/chewing-addon.conf.in.in:4 65 | msgid "Chewing Wrapper For Fcitx" 66 | msgstr "Fcitx 的新酷音封装" 67 | 68 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:7 69 | msgid "Chewing for Fcitx 5" 70 | msgstr "Fcitx 5 的新酷音輸入法" 71 | 72 | #: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:8 73 | msgid "Chewing input method" 74 | msgstr "新酷音輸入法" 75 | 76 | #: src/eim.h:145 77 | msgid "Clear" 78 | msgstr "清除" 79 | 80 | #: src/eim.h:104 81 | msgid "Colemak-DH ANSI Keyboard" 82 | msgstr "Colemak-DH ANSI 鍵盤" 83 | 84 | #: src/eim.h:104 85 | msgid "Colemak-DH Orth Keyboard" 86 | msgstr "Colemak-DH Orth 鍵盤" 87 | 88 | #: src/eim.h:146 89 | msgid "Commit current preedit" 90 | msgstr "提交目前預編輯" 91 | 92 | #: src/eim.h:147 93 | msgid "Commit default selection" 94 | msgstr "提交預設選擇" 95 | 96 | #: src/eim.h:101 97 | msgid "DACHEN_CP26 Keyboard" 98 | msgstr "大千 26 鍵" 99 | 100 | #: src/eim.h:98 101 | msgid "Default Keyboard" 102 | msgstr "預設鍵盤" 103 | 104 | #: src/eim.h:100 105 | msgid "Dvorak Keyboard" 106 | msgstr "Dvorak 鍵盤" 107 | 108 | #: src/eim.h:101 109 | msgid "Dvorak Keyboard with Hsu's support" 110 | msgstr "Dvorak 鍵盤 + 許氏注音" 111 | 112 | #: src/eim.h:99 113 | msgid "ETen Keyboard" 114 | msgstr "倚天鍵盤" 115 | 116 | #: src/eim.h:100 117 | msgid "ETen26 Keyboard" 118 | msgstr "倚天 26 鍵鍵盤" 119 | 120 | #: src/eim.h:177 121 | msgid "Enable easy symbol" 122 | msgstr "啟用簡易符號輸入" 123 | 124 | #: src/eim.h:99 125 | msgid "Gin-Yieh Keyboard" 126 | msgstr "精業鍵盤" 127 | 128 | #: src/eim.h:102 129 | msgid "Han-Yu PinYin Keyboard" 130 | msgstr "漢語拼音鍵盤" 131 | 132 | #: src/eim.h:35 133 | msgid "Horizontal" 134 | msgstr "水平" 135 | 136 | #: src/eim.h:98 137 | msgid "Hsu's Keyboard" 138 | msgstr "許氏鍵盤" 139 | 140 | #: src/eim.h:99 141 | msgid "IBM Keyboard" 142 | msgstr "IBM 鍵盤" 143 | 144 | #: src/eim.h:180 145 | msgid "Keyboard Layout" 146 | msgstr "鍵盤配置" 147 | 148 | #: src/eim.h:103 149 | msgid "MPS2 PinYin Keyboard" 150 | msgstr "MPS2 拼音鍵盤" 151 | 152 | #: src/eim.h:157 153 | msgid "Page Size" 154 | msgstr "頁面大小" 155 | 156 | #: src/eim.h:156 157 | msgid "Select candidate with arrow key" 158 | msgstr "用方向鍵選擇候選詞" 159 | 160 | #: src/eim.h:152 161 | msgid "Selection Key" 162 | msgstr "選詞鍵" 163 | 164 | #: src/eim.h:179 165 | msgid "Space as selection key" 166 | msgstr "使用空白鍵選擇候選字詞" 167 | 168 | #: src/eim.h:102 169 | msgid "THL PinYin Keyboard" 170 | msgstr "THL 拼音鍵盤" 171 | 172 | #: src/eim.h:164 173 | msgid "Use Keypad as Selection key" 174 | msgstr "使用數字鍵盤選擇候選字詞" 175 | 176 | #: src/eim.h:34 177 | msgid "Vertical" 178 | msgstr "垂直" 179 | 180 | #: src/eim.h:52 181 | msgid "aoeuhtn789" 182 | msgstr "aoeuhtn789" 183 | 184 | #: src/eim.h:51 185 | msgid "asdfghjkl;" 186 | msgstr "asdfghjkl;" 187 | 188 | #: src/eim.h:52 189 | msgid "asdfjkl789" 190 | msgstr "asdfjkl789" 191 | 192 | #: src/eim.h:51 193 | msgid "asdfzxcv89" 194 | msgstr "asdfzxcv89" 195 | 196 | #: src/eim.h:53 197 | msgid "dstnaeo789" 198 | msgstr "dstnaeo789" 199 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(CHEWING_SOURCES 2 | eim.cpp 3 | ) 4 | add_fcitx5_addon(chewing ${CHEWING_SOURCES}) 5 | target_link_libraries(chewing Fcitx5::Core Fcitx5::Config ${CHEWING_TARGET}) 6 | target_compile_definitions(chewing PRIVATE FCITX_GETTEXT_DOMAIN=\"fcitx5-chewing\") 7 | fcitx5_add_i18n_definition(TARGETS chewing) 8 | install(TARGETS chewing DESTINATION "${CMAKE_INSTALL_LIBDIR}/fcitx5") 9 | fcitx5_translate_desktop_file(chewing.conf.in chewing.conf) 10 | install(FILES "${CMAKE_CURRENT_BINARY_DIR}/chewing.conf" DESTINATION "${CMAKE_INSTALL_DATADIR}/fcitx5/inputmethod" COMPONENT config) 11 | configure_file(chewing-addon.conf.in.in chewing-addon.conf.in) 12 | fcitx5_translate_desktop_file("${CMAKE_CURRENT_BINARY_DIR}/chewing-addon.conf.in" chewing-addon.conf) 13 | install(FILES "${CMAKE_CURRENT_BINARY_DIR}/chewing-addon.conf" RENAME chewing.conf DESTINATION "${FCITX_INSTALL_PKGDATADIR}/addon" COMPONENT config) 14 | -------------------------------------------------------------------------------- /src/chewing-addon.conf.in.in: -------------------------------------------------------------------------------- 1 | [Addon] 2 | Name=Chewing 3 | Comment=Chewing Wrapper For Fcitx 4 | Category=InputMethod 5 | Version=@PROJECT_VERSION@ 6 | Type=SharedLibrary 7 | OnDemand=True 8 | Configurable=True 9 | Library=libchewing 10 | 11 | [Addon/Dependencies] 12 | 0=core:@REQUIRED_FCITX_VERSION@ 13 | 14 | [Addon/OptionalDependencies] 15 | 0=chttrans 16 | 17 | -------------------------------------------------------------------------------- /src/chewing.conf.in: -------------------------------------------------------------------------------- 1 | [InputMethod] 2 | Name=Chewing 3 | Icon=fcitx-chewing 4 | Label=酷 5 | LangCode=zh_TW 6 | Addon=chewing 7 | Configurable=True 8 | -------------------------------------------------------------------------------- /src/eim.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2012~2012 Tai-Lin Chu 3 | * SPDX-FileCopyrightText: 2012~2017 CSSlayer 4 | * 5 | * SPDX-License-Identifier: LGPL-2.1-or-later 6 | * 7 | */ 8 | #include "eim.h" 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | 39 | FCITX_DEFINE_LOG_CATEGORY(chewing_log, "chewing"); 40 | #define CHEWING_DEBUG() FCITX_LOGC(chewing_log, Debug) 41 | 42 | namespace fcitx { 43 | 44 | namespace { 45 | 46 | constexpr int CHEWING_MAX_LEN = 18; 47 | 48 | constexpr auto builtin_selectkeys = std::to_array({ 49 | "1234567890", 50 | "asdfghjkl;", 51 | "asdfzxcv89", 52 | "asdfjkl789", 53 | "aoeuhtn789", 54 | "1234qweras", 55 | "dstnaeo789", 56 | }); 57 | 58 | static_assert(builtin_selectkeys.size() == 59 | ChewingSelectionKeyI18NAnnotation::enumLength, 60 | "Enum mismatch"); 61 | 62 | #define DEFINE_SAFE_CHEWING_STRING_GETTER(NAME) \ 63 | static inline std::string safeChewing_##NAME##_String( \ 64 | ChewingContext *ctx) { \ 65 | if (chewing_##NAME##_Check(ctx)) { \ 66 | return chewing_##NAME##_String_static(ctx); \ 67 | } \ 68 | return ""; \ 69 | } 70 | 71 | DEFINE_SAFE_CHEWING_STRING_GETTER(aux); 72 | DEFINE_SAFE_CHEWING_STRING_GETTER(buffer); 73 | DEFINE_SAFE_CHEWING_STRING_GETTER(bopomofo); 74 | DEFINE_SAFE_CHEWING_STRING_GETTER(commit); 75 | 76 | class ChewingCandidateWord : public CandidateWord { 77 | public: 78 | ChewingCandidateWord(ChewingEngine *engine, std::string str, int index) 79 | : CandidateWord(Text(std::move(str))), engine_(engine), index_(index) {} 80 | 81 | void select(InputContext *inputContext) const override { 82 | auto *ctx = engine_->context(); 83 | auto pageSize = chewing_get_candPerPage(ctx); 84 | int page = (index_ / pageSize) + chewing_cand_CurrentPage(ctx); 85 | int off = index_ % pageSize; 86 | if (page < 0 || page >= chewing_cand_TotalPage(ctx)) { 87 | return; 88 | } 89 | int lastPage = chewing_cand_CurrentPage(ctx); 90 | while (page != chewing_cand_CurrentPage(ctx)) { 91 | if (page < chewing_cand_CurrentPage(ctx)) { 92 | chewing_handle_Left(ctx); 93 | } 94 | if (page > chewing_cand_CurrentPage(ctx)) { 95 | chewing_handle_Right(ctx); 96 | } 97 | /* though useless, but take care if there is a bug cause freeze */ 98 | if (lastPage == chewing_cand_CurrentPage(ctx)) { 99 | break; 100 | } 101 | lastPage = chewing_cand_CurrentPage(ctx); 102 | } 103 | chewing_handle_Default(ctx, builtin_selectkeys[static_cast( 104 | *engine_->config().SelectionKey)][off]); 105 | 106 | if (chewing_keystroke_CheckIgnore(ctx)) { 107 | return; 108 | } 109 | 110 | if (chewing_commit_Check(ctx)) { 111 | inputContext->commitString(safeChewing_commit_String(ctx)); 112 | } 113 | engine_->updateUI(inputContext); 114 | } 115 | 116 | private: 117 | ChewingEngine *engine_; 118 | int index_; 119 | }; 120 | 121 | class ChewingCandidateList : public CandidateList, 122 | public PageableCandidateList, 123 | public CursorMovableCandidateList, 124 | public CursorModifiableCandidateList { 125 | public: 126 | ChewingCandidateList(ChewingEngine *engine, InputContext *ic) 127 | : engine_(engine), ic_(ic) { 128 | setPageable(this); 129 | setCursorMovable(this); 130 | setCursorModifiable(this); 131 | 132 | fillCandidate(); 133 | } 134 | 135 | const Text &label(int idx) const override { 136 | if (idx < 0 || idx >= size()) { 137 | throw std::invalid_argument("Invalid index"); 138 | } 139 | return labels_[idx]; 140 | } 141 | const CandidateWord &candidate(int idx) const override { 142 | if (idx < 0 || idx >= size()) { 143 | throw std::invalid_argument("Invalid index"); 144 | } 145 | return *candidateWords_[idx]; 146 | } 147 | 148 | void fillCandidate() { 149 | auto *ctx = engine_->context(); 150 | candidateWords_.clear(); 151 | labels_.clear(); 152 | cursor_ = 0; 153 | 154 | int index = 0; 155 | // get candidate word 156 | int pageSize = chewing_cand_ChoicePerPage(ctx); 157 | if (pageSize <= 0) { 158 | return; 159 | } 160 | chewing_cand_Enumerate(ctx); 161 | while (chewing_cand_hasNext(ctx) && index < pageSize) { 162 | candidateWords_.emplace_back(std::make_unique( 163 | engine_, chewing_cand_String_static(ctx), index)); 164 | if (index < 10) { 165 | const char label[] = { 166 | builtin_selectkeys[static_cast( 167 | *engine_->config().SelectionKey)][index], 168 | '.', '\0'}; 169 | labels_.emplace_back(label); 170 | } else { 171 | labels_.emplace_back(); 172 | } 173 | index++; 174 | } 175 | } 176 | 177 | int size() const override { return candidateWords_.size(); } 178 | int cursorIndex() const override { 179 | if (empty() || !*engine_->config().selectCandidateWithArrowKey) { 180 | return -1; 181 | } 182 | return cursor_; 183 | } 184 | CandidateLayoutHint layoutHint() const override { 185 | switch (*engine_->config().CandidateLayout) { 186 | case ChewingCandidateLayout::Horizontal: 187 | return CandidateLayoutHint::Horizontal; 188 | case ChewingCandidateLayout::Vertical: 189 | return CandidateLayoutHint::Vertical; 190 | } 191 | return CandidateLayoutHint::Horizontal; 192 | } 193 | 194 | // Need for paging, allow rotating pages. 195 | bool hasPrev() const override { return true; } 196 | bool hasNext() const override { return true; } 197 | void prev() override { paging(true); } 198 | void next() override { paging(false); } 199 | 200 | bool usedNextBefore() const override { return true; } 201 | 202 | void prevCandidate() override { 203 | if (cursor_ == 0) { 204 | prev(); 205 | // We do not reset cursor to the last on purpose. 206 | // This way it could be easily to change the range of current word. 207 | } else { 208 | cursor_ -= 1; 209 | ic_->updateUserInterface(UserInterfaceComponent::InputPanel); 210 | } 211 | } 212 | 213 | void nextCandidate() override { 214 | if (cursor_ + 1 == size()) { 215 | next(); 216 | cursor_ = 0; 217 | } else { 218 | cursor_ += 1; 219 | ic_->updateUserInterface(UserInterfaceComponent::InputPanel); 220 | } 221 | } 222 | 223 | void setCursorIndex(int cursor) override { 224 | if (cursor < 0 || cursor >= size()) { 225 | return; 226 | } 227 | cursor_ = cursor; 228 | } 229 | 230 | private: 231 | void paging(bool prev) { 232 | if (candidateWords_.empty()) { 233 | return; 234 | } 235 | 236 | auto *ctx = engine_->context(); 237 | const int currentPage = chewing_cand_CurrentPage(ctx); 238 | if (prev) { 239 | const int hasNext = chewing_cand_list_has_next(ctx); 240 | const int hasPrev = chewing_cand_list_has_prev(ctx); 241 | if ((currentPage == 0) && (hasNext == 1 || hasPrev == 1)) { 242 | chewing_handle_Down(ctx); 243 | } else { 244 | chewing_handle_PageUp(ctx); 245 | } 246 | } else { 247 | const int totalPage = chewing_cand_TotalPage(ctx); 248 | if (currentPage == totalPage - 1) { 249 | chewing_handle_Down(ctx); 250 | } else { 251 | chewing_handle_PageDown(ctx); 252 | } 253 | } 254 | 255 | if (chewing_keystroke_CheckAbsorb(ctx)) { 256 | fillCandidate(); 257 | engine_->updatePreedit(ic_); 258 | ic_->updatePreedit(); 259 | ic_->updateUserInterface(UserInterfaceComponent::InputPanel); 260 | } 261 | } 262 | 263 | ChewingEngine *engine_; 264 | InputContext *ic_; 265 | std::vector> candidateWords_; 266 | std::vector labels_; 267 | int cursor_ = 0; 268 | }; 269 | 270 | void logger(void * /*context*/, int /*level*/, const char *fmt, ...) { 271 | if (!chewing_log().checkLogLevel(Debug)) { 272 | return; 273 | } 274 | std::va_list argp; 275 | va_start(argp, fmt); 276 | char onechar[1]; 277 | int len = std::vsnprintf(onechar, 1, fmt, argp); 278 | va_end(argp); 279 | if (len < 1) { 280 | return; 281 | } 282 | std::vector buf; 283 | buf.resize(len + 1); 284 | buf.back() = 0; 285 | va_start(argp, fmt); 286 | std::vsnprintf(buf.data(), len, fmt, argp); 287 | va_end(argp); 288 | CHEWING_DEBUG() << buf.data(); 289 | } 290 | 291 | } // namespace 292 | 293 | ChewingContext *getChewingContext() { 294 | const auto &sp = StandardPaths::global(); 295 | std::filesystem::path dictData = 296 | sp.locate(StandardPathsType::Data, "libchewing/dictionary.dat"); 297 | if (!dictData.empty()) { 298 | std::string sysPath = dictData.parent_path().string(); 299 | return chewing_new2(sysPath.c_str(), nullptr, nullptr, nullptr); 300 | } 301 | return chewing_new(); 302 | } 303 | 304 | ChewingEngine::ChewingEngine(Instance *instance) 305 | : instance_(instance), context_(getChewingContext()) { 306 | chewing_set_maxChiSymbolLen(context_.get(), CHEWING_MAX_LEN); 307 | chewing_set_logger(context_.get(), logger, nullptr); 308 | reloadConfig(); 309 | } 310 | 311 | ChewingEngine::~ChewingEngine() = default; 312 | 313 | void ChewingEngine::reloadConfig() { 314 | readAsIni(config_, "conf/chewing.conf"); 315 | populateConfig(); 316 | } 317 | 318 | void ChewingEngine::populateConfig() { 319 | ChewingContext *ctx = context_.get(); 320 | 321 | CHEWING_DEBUG() << "Set layout to: " 322 | << builtin_keymaps[static_cast(*config_.Layout)]; 323 | chewing_set_KBType( 324 | ctx, 325 | chewing_KBStr2Num(builtin_keymaps[static_cast(*config_.Layout)])); 326 | 327 | chewing_set_ChiEngMode(ctx, CHINESE_MODE); 328 | 329 | int selkey[10]; 330 | for (size_t i = 0; i < 10; i++) { 331 | selkey[i] = static_cast( 332 | builtin_selectkeys[static_cast(*config_.SelectionKey)][i]); 333 | } 334 | 335 | chewing_set_selKey(ctx, selkey, 10); 336 | chewing_set_candPerPage(ctx, *config_.PageSize); 337 | chewing_set_addPhraseDirection(ctx, *config_.AddPhraseForward ? 0 : 1); 338 | chewing_set_phraseChoiceRearward(ctx, *config_.ChoiceBackward ? 1 : 0); 339 | chewing_set_autoShiftCur(ctx, *config_.AutoShiftCursor ? 1 : 0); 340 | chewing_set_spaceAsSelection(ctx, *config_.SpaceAsSelection ? 1 : 0); 341 | chewing_set_escCleanAllBuf(ctx, 1); 342 | } 343 | 344 | void ChewingEngine::reset(const InputMethodEntry & /*entry*/, 345 | InputContextEvent &event) { 346 | doReset(event); 347 | } 348 | 349 | void ChewingEngine::doReset(InputContextEvent &event) { 350 | ChewingContext *ctx = context_.get(); 351 | chewing_cand_close(ctx); 352 | chewing_clean_preedit_buf(ctx); 353 | chewing_clean_bopomofo_buf(ctx); 354 | updateUI(event.inputContext()); 355 | } 356 | 357 | void ChewingEngine::save() {} 358 | 359 | void ChewingEngine::activate(const InputMethodEntry & /*entry*/, 360 | InputContextEvent &event) { 361 | // Request chttrans. 362 | // Fullwidth is not required for chewing. 363 | chttrans(); 364 | auto *inputContext = event.inputContext(); 365 | if (auto *action = 366 | instance_->userInterfaceManager().lookupAction("chttrans")) { 367 | inputContext->statusArea().addAction(StatusGroup::InputMethod, action); 368 | } 369 | auto *ic = event.inputContext(); 370 | if (!ic_.isNull() && ic_.get() != ic) { 371 | doReset(event); 372 | } 373 | ic_ = ic->watch(); 374 | } 375 | 376 | void ChewingEngine::deactivate(const InputMethodEntry &entry, 377 | InputContextEvent &event) { 378 | if (event.type() == EventType::InputContextSwitchInputMethod) { 379 | flushBuffer(event); 380 | } else { 381 | reset(entry, event); 382 | } 383 | } 384 | 385 | bool ChewingEngine::handleCandidateKeyEvent(const KeyEvent &keyEvent) const { 386 | auto *ic = keyEvent.inputContext(); 387 | auto candidateList = std::dynamic_pointer_cast( 388 | ic->inputPanel().candidateList()); 389 | if (!candidateList) { 390 | return false; 391 | } 392 | 393 | const KeyList keypadKeys{Key{FcitxKey_KP_1}, Key{FcitxKey_KP_2}, 394 | Key{FcitxKey_KP_3}, Key{FcitxKey_KP_4}, 395 | Key{FcitxKey_KP_5}, Key{FcitxKey_KP_6}, 396 | Key{FcitxKey_KP_7}, Key{FcitxKey_KP_8}, 397 | Key{FcitxKey_KP_9}, Key{FcitxKey_KP_0}}; 398 | if (*config_.UseKeypadAsSelectionKey) { 399 | if (int index = keyEvent.key().keyListIndex(keypadKeys); 400 | index >= 0 && index < candidateList->size()) { 401 | candidateList->candidate(index).select(ic); 402 | return true; 403 | } 404 | } 405 | 406 | if (!*config_.selectCandidateWithArrowKey) { 407 | return false; 408 | } 409 | 410 | if (keyEvent.key().check(FcitxKey_Right)) { 411 | if (*config_.CandidateLayout == ChewingCandidateLayout::Horizontal) { 412 | candidateList->nextCandidate(); 413 | } else { 414 | candidateList->next(); 415 | } 416 | return true; 417 | } 418 | if (keyEvent.key().check(FcitxKey_Left)) { 419 | if (*config_.CandidateLayout == ChewingCandidateLayout::Horizontal) { 420 | candidateList->prevCandidate(); 421 | } else { 422 | candidateList->prev(); 423 | } 424 | return true; 425 | } 426 | if (keyEvent.key().check(FcitxKey_Up)) { 427 | if (*config_.CandidateLayout == ChewingCandidateLayout::Horizontal) { 428 | candidateList->prev(); 429 | } else { 430 | candidateList->prevCandidate(); 431 | } 432 | return true; 433 | } 434 | if (keyEvent.key().check(FcitxKey_Down)) { 435 | if (*config_.CandidateLayout == ChewingCandidateLayout::Horizontal) { 436 | candidateList->next(); 437 | } else { 438 | candidateList->nextCandidate(); 439 | } 440 | return true; 441 | } 442 | if (keyEvent.key().check(FcitxKey_Return)) { 443 | if (int index = candidateList->cursorIndex(); 444 | index >= 0 && index < candidateList->size()) { 445 | candidateList->candidate(index).select(ic); 446 | } 447 | return true; 448 | } 449 | if (keyEvent.key().check(FcitxKey_space)) { 450 | candidateList->next(); 451 | return true; 452 | } 453 | return false; 454 | } 455 | 456 | void ChewingEngine::keyEvent(const InputMethodEntry &entry, 457 | KeyEvent &keyEvent) { 458 | if (keyEvent.isRelease()) { 459 | return; 460 | } 461 | auto *ctx = context_.get(); 462 | auto *ic = keyEvent.inputContext(); 463 | 464 | chewing_set_easySymbolInput(ctx, 0); 465 | CHEWING_DEBUG() << "KeyEvent: " << keyEvent.key().toString(); 466 | 467 | if (handleCandidateKeyEvent(keyEvent)) { 468 | keyEvent.filterAndAccept(); 469 | return; 470 | } 471 | 472 | if (keyEvent.key().check(FcitxKey_space)) { 473 | chewing_handle_Space(ctx); 474 | } else if (keyEvent.key().check(FcitxKey_Tab)) { 475 | chewing_handle_Tab(ctx); 476 | } else if (keyEvent.key().isSimple()) { 477 | if (keyEvent.rawKey().states().test(KeyState::Shift)) { 478 | chewing_set_easySymbolInput(ctx, *config_.EasySymbolInput ? 1 : 0); 479 | } 480 | int scan_code = keyEvent.key().sym() & 0xff; 481 | if (*config_.Layout == ChewingLayout::HanYuPinYin) { 482 | auto zuin = safeChewing_bopomofo_String(ctx); 483 | // Workaround a bug in libchewing fixed in 2017 but never has 484 | // stable release. 485 | if (zuin.size() >= 9) { 486 | keyEvent.filterAndAccept(); 487 | return; 488 | } 489 | } 490 | chewing_handle_Default(ctx, scan_code); 491 | chewing_set_easySymbolInput(ctx, 0); 492 | } else if (keyEvent.key().check(FcitxKey_BackSpace)) { 493 | if ((chewing_buffer_Check(ctx)) == 0 && 494 | (chewing_bopomofo_Check(ctx) == 0)) { 495 | return; 496 | } 497 | chewing_handle_Backspace(ctx); 498 | if ((chewing_buffer_Check(ctx)) == 0 && 499 | (chewing_bopomofo_Check(ctx) == 0)) { 500 | keyEvent.filterAndAccept(); 501 | reset(entry, keyEvent); 502 | return; 503 | } 504 | } else if (keyEvent.key().check(FcitxKey_Escape)) { 505 | chewing_handle_Esc(ctx); 506 | } else if (keyEvent.key().check(FcitxKey_Delete)) { 507 | if ((chewing_buffer_Check(ctx)) == 0 && 508 | (chewing_bopomofo_Check(ctx) == 0)) { 509 | return; 510 | } 511 | chewing_handle_Del(ctx); 512 | if ((chewing_buffer_Check(ctx)) == 0 && 513 | (chewing_bopomofo_Check(ctx) == 0)) { 514 | keyEvent.filterAndAccept(); 515 | reset(entry, keyEvent); 516 | return; 517 | } 518 | } else if (keyEvent.key().check(FcitxKey_Up)) { 519 | chewing_handle_Up(ctx); 520 | } else if (keyEvent.key().check(FcitxKey_Down)) { 521 | chewing_handle_Down(ctx); 522 | } else if (keyEvent.key().check(FcitxKey_Page_Down)) { 523 | chewing_handle_PageDown(ctx); 524 | } else if (keyEvent.key().check(FcitxKey_Page_Up)) { 525 | chewing_handle_PageUp(ctx); 526 | } else if (keyEvent.key().check(FcitxKey_Right)) { 527 | chewing_handle_Right(ctx); 528 | } else if (keyEvent.key().check(FcitxKey_Left)) { 529 | chewing_handle_Left(ctx); 530 | } else if (keyEvent.key().check(FcitxKey_Home)) { 531 | chewing_handle_Home(ctx); 532 | } else if (keyEvent.key().check(FcitxKey_End)) { 533 | chewing_handle_End(ctx); 534 | } else if (keyEvent.key().check(FcitxKey_space, KeyState::Shift)) { 535 | chewing_handle_ShiftSpace(ctx); 536 | } else if (keyEvent.key().check(FcitxKey_Left, KeyState::Shift)) { 537 | chewing_handle_ShiftLeft(ctx); 538 | } else if (keyEvent.key().check(FcitxKey_Right, KeyState::Shift)) { 539 | chewing_handle_ShiftRight(ctx); 540 | } else if (keyEvent.key().check(FcitxKey_Return)) { 541 | chewing_handle_Enter(ctx); 542 | } else if (keyEvent.key().states() == KeyState::Ctrl && 543 | Key(keyEvent.key().sym()).isDigit()) { 544 | chewing_handle_CtrlNum(ctx, keyEvent.key().sym()); 545 | } else { 546 | // to do: more chewing_handle 547 | return; 548 | } 549 | 550 | if (chewing_keystroke_CheckIgnore(ctx)) { 551 | return; 552 | } 553 | if (chewing_keystroke_CheckAbsorb(ctx)) { 554 | keyEvent.filterAndAccept(); 555 | } 556 | if (chewing_commit_Check(ctx)) { 557 | keyEvent.filterAndAccept(); 558 | ic->commitString(safeChewing_commit_String(ctx)); 559 | } 560 | updateUI(ic); 561 | } 562 | 563 | void ChewingEngine::filterKey(const InputMethodEntry & /*entry*/, 564 | KeyEvent &keyEvent) { 565 | if (keyEvent.isRelease()) { 566 | return; 567 | } 568 | auto *ic = keyEvent.inputContext(); 569 | if (ic->inputPanel().candidateList() && 570 | (keyEvent.key().isSimple() || keyEvent.key().isCursorMove() || 571 | keyEvent.key().check(FcitxKey_space, KeyState::Shift) || 572 | keyEvent.key().check(FcitxKey_Tab) || 573 | keyEvent.key().check(FcitxKey_Return, KeyState::Shift))) { 574 | keyEvent.filterAndAccept(); 575 | return; 576 | } 577 | 578 | if (!ic->inputPanel().candidateList()) { 579 | // Check if this key will produce something, if so, flush 580 | if (!keyEvent.key().hasModifier() && 581 | Key::keySymToUnicode(keyEvent.key().sym())) { 582 | flushBuffer(keyEvent); 583 | } 584 | } 585 | } 586 | 587 | void ChewingEngine::updatePreeditImpl(InputContext *ic) { 588 | ic->inputPanel().setClientPreedit(Text()); 589 | ic->inputPanel().setPreedit(Text()); 590 | ic->inputPanel().setAuxDown(Text()); 591 | 592 | ChewingContext *ctx = context_.get(); 593 | std::string buffer = safeChewing_buffer_String(ctx); 594 | std::string_view text = buffer; 595 | std::string zuin = safeChewing_bopomofo_String(ctx); 596 | 597 | CHEWING_DEBUG() << "Text: " << text << " Zuin: " << zuin; 598 | 599 | /* there is nothing */ 600 | if (zuin.empty() && text.empty()) { 601 | return; 602 | } 603 | 604 | auto len = utf8::lengthValidated(text); 605 | if (len == utf8::INVALID_LENGTH) { 606 | return; 607 | } 608 | const auto useClientPreedit = 609 | ic->capabilityFlags().test(CapabilityFlag::Preedit); 610 | const auto format = 611 | useClientPreedit ? TextFormatFlag::Underline : TextFormatFlag::NoFlag; 612 | Text preedit; 613 | 614 | int cur = chewing_cursor_Current(ctx); 615 | int rcur = text.size(); 616 | if (cur >= 0 && static_cast(cur) < len) { 617 | rcur = utf8::ncharByteLength(text.begin(), cur); 618 | } 619 | preedit.setCursor(rcur); 620 | 621 | // insert zuin in the middle 622 | preedit.append(std::string(text.substr(0, rcur)), format); 623 | preedit.append(std::move(zuin), {TextFormatFlag::HighLight, format}); 624 | preedit.append(std::string(text.substr(rcur)), format); 625 | 626 | if (auto aux = safeChewing_aux_String(ctx); !aux.empty()) { 627 | ic->inputPanel().setAuxDown(Text(std::move(aux))); 628 | } 629 | 630 | if (useClientPreedit) { 631 | ic->inputPanel().setClientPreedit(preedit); 632 | } else { 633 | ic->inputPanel().setPreedit(preedit); 634 | } 635 | } 636 | 637 | void ChewingEngine::updatePreedit(InputContext *ic) { 638 | updatePreeditImpl(ic); 639 | ic->updatePreedit(); 640 | } 641 | 642 | void ChewingEngine::updateUI(InputContext *ic) { 643 | CHEWING_DEBUG() << "updateUI"; 644 | // clean up window asap 645 | ic->inputPanel().reset(); 646 | ic->inputPanel().setCandidateList( 647 | std::make_unique(this, ic)); 648 | if (ic->inputPanel().candidateList()->empty()) { 649 | ic->inputPanel().setCandidateList(nullptr); 650 | } 651 | 652 | updatePreedit(ic); 653 | ic->updateUserInterface(UserInterfaceComponent::InputPanel); 654 | } 655 | 656 | void ChewingEngine::flushBuffer(InputContextEvent &event) { 657 | auto *ctx = context_.get(); 658 | std::string text; 659 | if (*config_.switchInputMethodBehavior == 660 | SwitchInputMethodBehavior::CommitPreedit || 661 | *config_.switchInputMethodBehavior == 662 | SwitchInputMethodBehavior::CommitDefault) { 663 | chewing_cand_close(ctx); 664 | if (chewing_buffer_Check(ctx)) { 665 | // When not success, chewing_commit_preedit_buf will not change the 666 | // output value. while chewing_handle_* will always update button 667 | // result. 668 | if (chewing_commit_preedit_buf(ctx) == 0) { 669 | text.append(safeChewing_commit_String(ctx)); 670 | } 671 | } 672 | } 673 | 674 | if (*config_.switchInputMethodBehavior == 675 | SwitchInputMethodBehavior::CommitPreedit) { 676 | text.append(safeChewing_buffer_String(ctx)); 677 | text.append(safeChewing_bopomofo_String(ctx)); 678 | } 679 | if (!text.empty()) { 680 | event.inputContext()->commitString(text); 681 | } 682 | doReset(event); 683 | } 684 | 685 | } // namespace fcitx 686 | 687 | FCITX_ADDON_FACTORY_V2(chewing, fcitx::ChewingEngineFactory); 688 | -------------------------------------------------------------------------------- /src/eim.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2010~2017 CSSlayer 3 | * 4 | * SPDX-License-Identifier: LGPL-2.1-or-later 5 | * 6 | */ 7 | #ifndef _FCITX5_CHEWING_EIM_H_ 8 | #define _FCITX5_CHEWING_EIM_H_ 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | namespace fcitx { 33 | 34 | enum class ChewingCandidateLayout { 35 | Vertical, 36 | Horizontal, 37 | }; 38 | 39 | FCITX_CONFIG_ENUM_NAME_WITH_I18N(ChewingCandidateLayout, N_("Vertical"), 40 | N_("Horizontal")); 41 | 42 | enum class ChewingSelectionKey { 43 | CSK_Digit, 44 | CSK_asdfghjkl, 45 | CSK_asdfzxcv89, 46 | CSK_asdfjkl789, 47 | CSK_aoeuhtn789, 48 | CSK_1234qweras, 49 | CSK_dstnaeo789 50 | }; 51 | 52 | FCITX_CONFIG_ENUM_NAME(ChewingSelectionKey, "1234567890", "asdfghjkl;", 53 | "asdfzxcv89", "asdfjkl789", "aoeuhtn789", "1234qweras", 54 | "dstnaeo789"); 55 | FCITX_CONFIG_ENUM_I18N_ANNOTATION(ChewingSelectionKey, N_("1234567890"), 56 | N_("asdfghjkl;"), N_("asdfzxcv89"), 57 | N_("asdfjkl789"), N_("aoeuhtn789"), 58 | N_("1234qweras"), N_("dstnaeo789")); 59 | 60 | enum class ChewingLayout { 61 | Default, 62 | Hsu, 63 | IBM, 64 | GinYieh, 65 | ETen, 66 | ETen26, 67 | Dvorak, 68 | DvorakHsu, 69 | DACHEN_CP26, 70 | HanYuPinYin, 71 | ThlPinYin, 72 | Mps2PinYin, 73 | Carpalx, 74 | ColemakDH_ANSI, 75 | ColemakDH_ORTH 76 | }; 77 | 78 | static constexpr const char *builtin_keymaps[] = {"KB_DEFAULT", 79 | "KB_HSU", 80 | "KB_IBM", 81 | "KB_GIN_YIEH", 82 | "KB_ET", 83 | "KB_ET26", 84 | "KB_DVORAK", 85 | "KB_DVORAK_HSU", 86 | "KB_DACHEN_CP26", 87 | "KB_HANYU_PINYIN", 88 | "KB_THL_PINYIN", 89 | "KB_MPS2_PINYIN", 90 | "KB_CARPALX", 91 | "KB_COLEMAK_DH_ANSI", 92 | "KB_COLEMAK_DH_ORTH"}; 93 | 94 | FCITX_CONFIG_ENUM_NAME(ChewingLayout, "Default Keyboard", "Hsu's Keyboard", 95 | "IBM Keyboard", "Gin-Yieh Keyboard", "ETen Keyboard", 96 | "ETen26 Keyboard", "Dvorak Keyboard", 97 | "Dvorak Keyboard with Hsu's support", 98 | "DACHEN_CP26 Keyboard", "Han-Yu PinYin Keyboard", 99 | "THL PinYin Keyboard", "MPS2 PinYin Keyboard", 100 | "Carpalx Keyboard", "Colemak-DH ANSI Keyboard", 101 | "Colemak-DH Orth Keyboard"); 102 | FCITX_CONFIG_ENUM_I18N_ANNOTATION( 103 | ChewingLayout, N_("Default Keyboard"), N_("Hsu's Keyboard"), 104 | N_("IBM Keyboard"), N_("Gin-Yieh Keyboard"), N_("ETen Keyboard"), 105 | N_("ETen26 Keyboard"), N_("Dvorak Keyboard"), 106 | N_("Dvorak Keyboard with Hsu's support"), N_("DACHEN_CP26 Keyboard"), 107 | N_("Han-Yu PinYin Keyboard"), N_("THL PinYin Keyboard"), 108 | N_("MPS2 PinYin Keyboard"), N_("Carpalx Keyboard"), 109 | N_("Colemak-DH ANSI Keyboard"), N_("Colemak-DH Orth Keyboard")); 110 | 111 | class ChewingLayoutOption : public Option { 112 | using Base = Option; 113 | 114 | public: 115 | using Base::Base; 116 | 117 | void dumpDescription(RawConfig &config) const override { 118 | Base::dumpDescription(config); 119 | config.remove("Enum"); 120 | for (size_t i = 0; i < supportedLayouts_.size(); i++) { 121 | config.setValueByPath("Enum/" + std::to_string(i), 122 | _ChewingLayout_Names[static_cast( 123 | supportedLayouts_[i])]); 124 | config.setValueByPath( 125 | "EnumI18n/" + std::to_string(i), 126 | ChewingLayoutI18NAnnotation::toString(supportedLayouts_[i])); 127 | } 128 | } 129 | 130 | private: 131 | static std::vector supportedLayouts() { 132 | std::vector supported = {ChewingLayout::Default}; 133 | auto defaultNum = chewing_KBStr2Num(builtin_keymaps[0]); 134 | for (size_t i = 1; i < ChewingLayoutI18NAnnotation::enumLength; i++) { 135 | auto num = chewing_KBStr2Num(builtin_keymaps[i]); 136 | if (num == defaultNum) { 137 | continue; 138 | } 139 | supported.push_back(static_cast(i)); 140 | } 141 | 142 | return supported; 143 | } 144 | std::vector supportedLayouts_ = supportedLayouts(); 145 | }; 146 | 147 | enum class SwitchInputMethodBehavior { Clear, CommitPreedit, CommitDefault }; 148 | 149 | FCITX_CONFIG_ENUM_NAME_WITH_I18N(SwitchInputMethodBehavior, N_("Clear"), 150 | N_("Commit current preedit"), 151 | N_("Commit default selection")) 152 | 153 | FCITX_CONFIGURATION( 154 | ChewingConfig, 155 | OptionWithAnnotation 156 | SelectionKey{this, "SelectionKey", _("Selection Key"), 157 | ChewingSelectionKey::CSK_Digit}; 158 | Option selectCandidateWithArrowKey{ 159 | this, "SelectCandidateWithArrowKey", 160 | _("Select candidate with arrow key"), true}; 161 | Option PageSize{this, "PageSize", _("Page Size"), 10, 162 | IntConstrain(3, 10)}; 163 | OptionWithAnnotation 165 | CandidateLayout{this, "CandidateLayout", _("Candidate List Layout"), 166 | ChewingCandidateLayout::Horizontal}; 167 | Option UseKeypadAsSelectionKey{ 168 | this, "UseKeypadAsSelection", _("Use Keypad as Selection key"), false}; 169 | OptionWithAnnotation 171 | switchInputMethodBehavior{this, "SwitchInputMethodBehavior", 172 | _("Action when switching input method"), 173 | SwitchInputMethodBehavior::CommitDefault}; 174 | Option AddPhraseForward{this, "AddPhraseForward", 175 | _("Add Phrase Forward"), true}; 176 | Option ChoiceBackward{this, "ChoiceBackward", 177 | _("Backward phrase choice"), true}; 178 | Option AutoShiftCursor{this, "AutoShiftCursor", 179 | _("Automatically shift cursor"), false}; 180 | Option EasySymbolInput{this, "EasySymbolInput", 181 | _("Enable easy symbol"), false}; 182 | Option SpaceAsSelection{this, "SpaceAsSelection", 183 | _("Space as selection key"), true}; 184 | ChewingLayoutOption Layout{this, "Layout", _("Keyboard Layout"), 185 | ChewingLayout::Default};); 186 | 187 | class ChewingEngine final : public InputMethodEngine { 188 | public: 189 | ChewingEngine(Instance *instance); 190 | ~ChewingEngine(); 191 | Instance *instance() { return instance_; } 192 | const ChewingConfig &config() { return config_; } 193 | void activate(const InputMethodEntry &entry, 194 | InputContextEvent &event) override; 195 | void deactivate(const InputMethodEntry &entry, 196 | InputContextEvent &event) override; 197 | void keyEvent(const InputMethodEntry &entry, KeyEvent &keyEvent) override; 198 | void filterKey(const InputMethodEntry & /*entry*/, 199 | KeyEvent & /*event*/) override; 200 | void reloadConfig() override; 201 | void reset(const InputMethodEntry &entry, 202 | InputContextEvent &event) override; 203 | void save() override; 204 | 205 | const Configuration *getConfig() const override { return &config_; } 206 | void setConfig(const RawConfig &config) override { 207 | config_.load(config, true); 208 | populateConfig(); 209 | safeSaveAsIni(config_, "conf/chewing.conf"); 210 | } 211 | 212 | void updateUI(InputContext *ic); 213 | void updatePreedit(InputContext *ic); 214 | Text getPreedit(InputContext *ic); 215 | 216 | void flushBuffer(InputContextEvent &event); 217 | void doReset(InputContextEvent &event); 218 | 219 | ChewingContext *context() { return context_.get(); } 220 | 221 | private: 222 | bool handleCandidateKeyEvent(const KeyEvent &keyEvent) const; 223 | void updatePreeditImpl(InputContext *ic); 224 | 225 | FCITX_ADDON_DEPENDENCY_LOADER(chttrans, instance_->addonManager()); 226 | 227 | void populateConfig(); 228 | Instance *instance_; 229 | ChewingConfig config_; 230 | UniqueCPtr context_; 231 | TrackableObjectReference ic_; 232 | }; 233 | 234 | class ChewingEngineFactory : public AddonFactory { 235 | public: 236 | AddonInstance *create(AddonManager *manager) override { 237 | registerDomain("fcitx5-chewing", FCITX_INSTALL_LOCALEDIR); 238 | return new ChewingEngine(manager->instance()); 239 | } 240 | }; 241 | } // namespace fcitx 242 | 243 | #endif // _FCITX5_CHEWING_EIM_H_ 244 | -------------------------------------------------------------------------------- /test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | configure_file(testdir.h.in ${CMAKE_CURRENT_BINARY_DIR}/testdir.h @ONLY) 3 | include_directories(${CMAKE_CURRENT_BINARY_DIR}) 4 | 5 | add_subdirectory(addon) 6 | add_subdirectory(inputmethod) 7 | add_executable(testchewing testchewing.cpp) 8 | target_link_libraries(testchewing Fcitx5::Core Fcitx5::Module::TestFrontend) 9 | add_dependencies(testchewing copy-addon copy-im) 10 | add_test(testchewing testchewing) 11 | -------------------------------------------------------------------------------- /test/addon/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_custom_target(copy-addon DEPENDS chewing-addon.conf.in-fmt) 2 | add_custom_command(TARGET copy-addon COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/src/chewing-addon.conf ${CMAKE_CURRENT_BINARY_DIR}/chewing.conf) 3 | -------------------------------------------------------------------------------- /test/inputmethod/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_custom_target(copy-im DEPENDS chewing.conf.in-fmt) 2 | add_custom_command(TARGET copy-im COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/src/chewing.conf ${CMAKE_CURRENT_BINARY_DIR}/chewing.conf) 3 | -------------------------------------------------------------------------------- /test/testchewing.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021-2021 CSSlayer 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | * 6 | */ 7 | #include "testdir.h" 8 | #include "testfrontend_public.h" 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | using namespace fcitx; 25 | 26 | void testBasic(Instance *instance) { 27 | instance->eventDispatcher().schedule([instance]() { 28 | auto *chewing = instance->addonManager().addon("chewing", true); 29 | FCITX_ASSERT(chewing); 30 | auto defaultGroup = instance->inputMethodManager().currentGroup(); 31 | defaultGroup.inputMethodList().clear(); 32 | defaultGroup.inputMethodList().push_back( 33 | InputMethodGroupItem("keyboard-us")); 34 | defaultGroup.inputMethodList().push_back( 35 | InputMethodGroupItem("chewing")); 36 | defaultGroup.setDefaultInputMethod(""); 37 | instance->inputMethodManager().setGroup(defaultGroup); 38 | auto *testfrontend = instance->addonManager().addon("testfrontend"); 39 | auto uuid = 40 | testfrontend->call("testapp"); 41 | auto *ic = instance->inputContextManager().findByUUID(uuid); 42 | FCITX_ASSERT(testfrontend->call( 43 | uuid, Key("Control+space"), false)); 44 | FCITX_ASSERT(instance->inputMethod(ic) == "chewing"); 45 | 46 | FCITX_ASSERT(testfrontend->call( 47 | uuid, Key("z"), false)); 48 | FCITX_ASSERT(testfrontend->call( 49 | uuid, Key("p"), false)); 50 | FCITX_ASSERT(ic->inputPanel().preedit().toString() == "ㄈㄣ"); 51 | FCITX_ASSERT(testfrontend->call( 52 | uuid, Key("space"), false)); 53 | FCITX_ASSERT(testfrontend->call( 54 | uuid, Key("Down"), false)); 55 | FCITX_ASSERT(ic->inputPanel().candidateList()); 56 | FCITX_ASSERT(!ic->inputPanel().candidateList()->empty()); 57 | // This should be the case. 58 | FCITX_ASSERT(ic->inputPanel().candidateList()->size() >= 7); 59 | std::string text = 60 | ic->inputPanel().candidateList()->candidate(6).text().toString(); 61 | 62 | testfrontend->call(text); 63 | ic->inputPanel().candidateList()->toCursorModifiable()->setCursorIndex( 64 | 6); 65 | FCITX_ASSERT(ic->inputPanel().candidateList()->cursorIndex() == 6); 66 | FCITX_ASSERT(testfrontend->call( 67 | uuid, Key("Return"), false)); 68 | FCITX_ASSERT(testfrontend->call( 69 | uuid, Key("Return"), false)); 70 | 71 | RawConfig config; 72 | config.setValueByPath("Layout", "Han-Yu PinYin Keyboard"); 73 | chewing->setConfig(config); 74 | for (char c : std::string_view("hu2jia3hu3wei1")) { 75 | FCITX_ASSERT(testfrontend->call( 76 | uuid, Key(static_cast(c)), false)); 77 | } 78 | text = ic->inputPanel().preedit().toString(); 79 | FCITX_ASSERT(text == "狐假虎威"); 80 | testfrontend->call(text); 81 | bool found = false; 82 | for (int i = 0; i < 10; i++) { 83 | FCITX_ASSERT(testfrontend->call( 84 | uuid, Key("space"), false)); 85 | 86 | FCITX_ASSERT(ic->inputPanel().candidateList()); 87 | FCITX_ASSERT(!ic->inputPanel().candidateList()->empty()); 88 | for (int j = 0; j < ic->inputPanel().candidateList()->size(); j++) { 89 | if (ic->inputPanel() 90 | .candidateList() 91 | ->candidate(j) 92 | .text() 93 | .toString() == "威") { 94 | found = true; 95 | break; 96 | } 97 | } 98 | if (found) { 99 | break; 100 | } 101 | } 102 | FCITX_ASSERT(found); 103 | 104 | FCITX_ASSERT(testfrontend->call( 105 | uuid, Key("Return"), false)); 106 | FCITX_ASSERT(testfrontend->call( 107 | uuid, Key("Return"), false)); 108 | 109 | for (char c : std::string_view("fen1")) { 110 | FCITX_ASSERT(testfrontend->call( 111 | uuid, Key(static_cast(c)), false)); 112 | } 113 | text = ic->inputPanel().preedit().toString(); 114 | FCITX_ASSERT(testfrontend->call( 115 | uuid, Key("space"), false)); 116 | FCITX_ASSERT(ic->inputPanel().candidateList()); 117 | FCITX_ASSERT(!ic->inputPanel().candidateList()->empty()); 118 | testfrontend->call(text); 119 | 120 | instance->deactivate(); 121 | }); 122 | } 123 | 124 | void testBackspaceWithBuffer(Instance *instance) { 125 | instance->eventDispatcher().schedule([instance]() { 126 | auto *chewing = instance->addonManager().addon("chewing", true); 127 | FCITX_ASSERT(chewing); 128 | RawConfig config; 129 | config.setValueByPath("Layout", "Default"); 130 | chewing->setConfig(config); 131 | auto *testfrontend = instance->addonManager().addon("testfrontend"); 132 | auto uuid = 133 | testfrontend->call("testapp"); 134 | auto *ic = instance->inputContextManager().findByUUID(uuid); 135 | FCITX_ASSERT(testfrontend->call( 136 | uuid, Key("Control+space"), false)); 137 | FCITX_ASSERT(instance->inputMethod(ic) == "chewing"); 138 | 139 | FCITX_ASSERT(testfrontend->call( 140 | uuid, Key("z"), false)); 141 | FCITX_ASSERT(testfrontend->call( 142 | uuid, Key("p"), false)); 143 | FCITX_ASSERT(testfrontend->call( 144 | uuid, Key("space"), false)); 145 | FCITX_ASSERT(testfrontend->call( 146 | uuid, Key(FcitxKey_BackSpace), false)); 147 | auto text = ic->inputPanel().preedit().toString(); 148 | FCITX_ASSERT(text.empty()); 149 | 150 | instance->deactivate(); 151 | }); 152 | } 153 | 154 | void testBackspaceWhenBufferEmpty(Instance *instance) { 155 | instance->eventDispatcher().schedule([instance]() { 156 | auto *chewing = instance->addonManager().addon("chewing", true); 157 | FCITX_ASSERT(chewing); 158 | RawConfig config; 159 | config.setValueByPath("Layout", "Default"); 160 | chewing->setConfig(config); 161 | auto *testfrontend = instance->addonManager().addon("testfrontend"); 162 | auto uuid = 163 | testfrontend->call("testapp"); 164 | auto *ic = instance->inputContextManager().findByUUID(uuid); 165 | FCITX_ASSERT(testfrontend->call( 166 | uuid, Key("Control+space"), false)); 167 | FCITX_ASSERT(instance->inputMethod(ic) == "chewing"); 168 | 169 | FCITX_ASSERT(testfrontend->call( 170 | uuid, Key("z"), false)); 171 | FCITX_ASSERT(testfrontend->call( 172 | uuid, Key("p"), false)); 173 | FCITX_ASSERT(testfrontend->call( 174 | uuid, Key("space"), false)); 175 | FCITX_ASSERT(testfrontend->call( 176 | uuid, Key("z"), false)); 177 | FCITX_ASSERT(testfrontend->call( 178 | uuid, Key("p"), false)); 179 | FCITX_ASSERT(testfrontend->call( 180 | uuid, Key("space"), false)); 181 | auto text = ic->inputPanel().preedit().toString(); 182 | testfrontend->call(text); 183 | FCITX_ASSERT(testfrontend->call( 184 | uuid, Key("Return"), false)); 185 | FCITX_ASSERT(!testfrontend->call( 186 | uuid, Key(FcitxKey_BackSpace), false)); 187 | 188 | instance->deactivate(); 189 | }); 190 | } 191 | 192 | void testBackspaceWithBopomofo(Instance *instance) { 193 | instance->eventDispatcher().schedule([instance]() { 194 | auto *chewing = instance->addonManager().addon("chewing", true); 195 | FCITX_ASSERT(chewing); 196 | RawConfig config; 197 | config.setValueByPath("Layout", "Default"); 198 | chewing->setConfig(config); 199 | auto *testfrontend = instance->addonManager().addon("testfrontend"); 200 | auto uuid = 201 | testfrontend->call("testapp"); 202 | auto *ic = instance->inputContextManager().findByUUID(uuid); 203 | FCITX_ASSERT(testfrontend->call( 204 | uuid, Key("Control+space"), false)); 205 | FCITX_ASSERT(instance->inputMethod(ic) == "chewing"); 206 | 207 | FCITX_ASSERT(testfrontend->call( 208 | uuid, Key("z"), false)); 209 | FCITX_ASSERT(testfrontend->call( 210 | uuid, Key("p"), false)); 211 | FCITX_ASSERT(testfrontend->call( 212 | uuid, Key("space"), false)); 213 | FCITX_ASSERT(testfrontend->call( 214 | uuid, Key("z"), false)); 215 | FCITX_ASSERT(testfrontend->call( 216 | uuid, Key("p"), false)); 217 | FCITX_ASSERT(testfrontend->call( 218 | uuid, Key("space"), false)); 219 | FCITX_ASSERT(testfrontend->call( 220 | uuid, Key(FcitxKey_BackSpace), false)); 221 | FCITX_ASSERT(testfrontend->call( 222 | uuid, Key(FcitxKey_BackSpace), false)); 223 | auto text = ic->inputPanel().preedit().toString(); 224 | FCITX_ASSERT(text.empty()); 225 | FCITX_ASSERT(!testfrontend->call( 226 | uuid, Key(FcitxKey_BackSpace), false)); 227 | 228 | instance->deactivate(); 229 | }); 230 | } 231 | 232 | void testCommitPreedit(Instance *instance) { 233 | instance->eventDispatcher().schedule([instance]() { 234 | auto *chewing = instance->addonManager().addon("chewing", true); 235 | FCITX_ASSERT(chewing); 236 | RawConfig config; 237 | config.setValueByPath("Layout", "Default Keyboard"); 238 | config.setValueByPath("SwitchInputMethodBehavior", 239 | "Commit current preedit"); 240 | chewing->setConfig(config); 241 | auto *testfrontend = instance->addonManager().addon("testfrontend"); 242 | auto uuid = 243 | testfrontend->call("testapp"); 244 | auto *ic = instance->inputContextManager().findByUUID(uuid); 245 | FCITX_ASSERT(testfrontend->call( 246 | uuid, Key("Control+space"), false)); 247 | FCITX_ASSERT(instance->inputMethod(ic) == "chewing"); 248 | 249 | FCITX_ASSERT(testfrontend->call( 250 | uuid, Key("z"), false)); 251 | FCITX_ASSERT(testfrontend->call( 252 | uuid, Key("p"), false)); 253 | FCITX_ASSERT(testfrontend->call( 254 | uuid, Key("space"), false)); 255 | FCITX_ASSERT(testfrontend->call( 256 | uuid, Key("z"), false)); 257 | FCITX_ASSERT(testfrontend->call( 258 | uuid, Key("p"), false)); 259 | FCITX_ASSERT(testfrontend->call( 260 | uuid, Key("space"), false)); 261 | FCITX_ASSERT(testfrontend->call( 262 | uuid, Key("z"), false)); 263 | FCITX_ASSERT(testfrontend->call( 264 | uuid, Key("p"), false)); 265 | auto text = ic->inputPanel().preedit().toString(); 266 | testfrontend->call(text); 267 | 268 | instance->deactivate(); 269 | }); 270 | } 271 | 272 | int main() { 273 | setupTestingEnvironment(TESTING_BINARY_DIR, {TESTING_BINARY_DIR "/src"}, 274 | {TESTING_BINARY_DIR "/test"}); 275 | // fcitx::Log::setLogRule("default=5,table=5,libime-table=5"); 276 | char arg0[] = "testchewing"; 277 | char arg1[] = "--disable=all"; 278 | char arg2[] = "--enable=testim,testfrontend,chewing"; 279 | char *argv[] = {arg0, arg1, arg2}; 280 | fcitx::Log::setLogRule("default=5,chewing=5"); 281 | Instance instance(FCITX_ARRAY_SIZE(argv), argv); 282 | instance.addonManager().registerDefaultLoader(nullptr); 283 | 284 | testBasic(&instance); 285 | testBackspaceWhenBufferEmpty(&instance); 286 | testBackspaceWithBuffer(&instance); 287 | testBackspaceWithBopomofo(&instance); 288 | testCommitPreedit(&instance); 289 | 290 | instance.eventDispatcher().schedule([&instance]() { instance.exit(); }); 291 | instance.exec(); 292 | 293 | return 0; 294 | } 295 | -------------------------------------------------------------------------------- /test/testdir.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021~2021 CSSlayer 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | #ifndef _TEST_TESTDIR_H_ 7 | #define _TEST_TESTDIR_H_ 8 | 9 | #define TESTING_SOURCE_DIR "@CMAKE_SOURCE_DIR@" 10 | #define TESTING_BINARY_DIR "@CMAKE_BINARY_DIR@" 11 | 12 | #endif // _TEST_TESTDIR_H_ 13 | --------------------------------------------------------------------------------