pax_global_header00006660000000000000000000000064141714732530014521gustar00rootroot0000000000000052 comment=beb0952d5d0b74d660d78bdc14270363d0f85ce1 ibus-m17n-1.4.9/000077500000000000000000000000001417147325300132565ustar00rootroot00000000000000ibus-m17n-1.4.9/.gitignore000066400000000000000000000005421417147325300152470ustar00rootroot00000000000000*.pyc *.la *.lo *.loT *.o *.so *~ tags Makefile.qmake Makefile Makefile.in .deps .libs ABOUT-NLS INSTALL aclocal.m4 autom4te.cache compile config.guess config.h config.h.in config.log config.rpath config.status config.sub configure depcomp gtk-doc.make install-sh libtool ltmain.sh missing stamp-h1 py-compile ibus-m17n*.tar.* ibus-m17n.spec test-driver ibus-m17n-1.4.9/AUTHORS000066400000000000000000000000451417147325300143250ustar00rootroot00000000000000Huang Peng ibus-m17n-1.4.9/COPYING000066400000000000000000000431031417147325300143120ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. ibus-m17n-1.4.9/ChangeLog000066400000000000000000000000001417147325300150160ustar00rootroot00000000000000ibus-m17n-1.4.9/Makefile.am000066400000000000000000000046651417147325300153250ustar00rootroot00000000000000# vim:set noet ts=4: # # ibus-m17n - The m17n engine for IBus # # Copyright (c) 2007-2008 Huang Peng # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. SUBDIRS = \ src \ icons \ m4 \ po \ $(NULL) ACLOCAL_AMFLAGS = -I m4 # To register as an AppStream component to be visible in the software center # (See http://www.freedesktop.org/software/appstream/docs/ for more details): appdata_DATA = \ m17n.appdata.xml \ $(NULL) appdatadir = $(datadir)/metainfo EXTRA_DIST = \ autogen.sh \ @PACKAGE_NAME@.spec.in \ $(appdata_DATA) \ $(NULL) noinst_DIST = \ $(NULL) DISTCLEANFILES = \ po/stamp-it \ $(NULL) rpm: dist @PACKAGE_NAME@.spec rpmbuild -bb \ --define "_sourcedir `pwd`" \ --define "_builddir `pwd`" \ --define "_srcrpmdir `pwd`" \ --define "_rpmdir `pwd`" \ --define "_specdir `pwd`" \ @PACKAGE_NAME@.spec srpm: dist @PACKAGE_NAME@.spec rpmbuild -bs \ --define "_sourcedir `pwd`" \ --define "_builddir `pwd`" \ --define "_srcrpmdir `pwd`" \ --define "_rpmdir `pwd`" \ --define "_specdir `pwd`" \ @PACKAGE_NAME@.spec clean-rpm: $(RM) -r "`uname -i`" .PHONY: debian/changelog debian/changelog: $(AM_V_GEN) \ ( \ date=`date -R`; \ version=@VERSION@; \ serie=$(serie); \ if test -z "$$serie"; then \ serie=maverick; \ fi; \ if test -z "$$release"; then \ release=1; \ fi; \ s=`cat debian/changelog.in`; \ eval "echo \"$${s}\""; \ ) > $@ ppa: dist debian/changelog $(AM_V_GEN) \ ( \ mkdir ppa; \ cd ppa; \ tar zxvf ../$(distdir).tar.gz ; \ cd $(distdir); \ cp -a ../../debian . ; \ cd debian; \ debuild -S -sa ; \ ) dpkg: dist debian/changelog $(AM_V_GEN) \ ( \ mkdir ppa; \ cd ppa; \ tar zxvf ../$(distdir).tar.gz ; \ cd $(distdir); \ cp -a ../../debian . ; \ cd debian; \ debuild -b ; \ ) clean-local: clean-rpm ibus-m17n-1.4.9/NEWS000066400000000000000000000000001417147325300137430ustar00rootroot00000000000000ibus-m17n-1.4.9/README000066400000000000000000000000261417147325300141340ustar00rootroot00000000000000M17N engine for IBus. ibus-m17n-1.4.9/autogen.sh000077500000000000000000000022041417147325300152550ustar00rootroot00000000000000#!/bin/sh # Run this to generate all the initial makefiles, etc. test -n "$srcdir" || srcdir=$(dirname "$0") test -n "$srcdir" || srcdir=. olddir=$(pwd) cd $srcdir (test -f configure.ac) || { echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***" exit 1 } # shellcheck disable=SC2016 PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac) if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then echo "*** WARNING: I am going to run 'configure' with no arguments." >&2 echo "*** If you wish to pass any to it, please specify them on the" >&2 echo "*** '$0' command line." >&2 echo "" >&2 fi autoreconf --verbose --force --install || exit 1 cd "$olddir" if [ "$NOCONFIGURE" = "" ]; then $srcdir/configure "$@" || exit 1 if [ "$1" = "--help" ]; then exit 0 else echo "Now type 'make' to compile $PKG_NAME" || exit 1 fi else echo "Skipping configure process." fi export CFLAGS=${CFLAGS-"-Wall"} export CXXFLAGS=${CXXFLAGS-"$CFLAGS"} ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4" REQUIRED_AUTOMAKE_VERSION=1.10 ibus-m17n-1.4.9/codereview.settings000066400000000000000000000001531417147325300171730ustar00rootroot00000000000000# This file is used by "git cl" to get code review information. CODE_REVIEW_SERVER: codereview.appspot.com ibus-m17n-1.4.9/configure.ac000066400000000000000000000061341417147325300155500ustar00rootroot00000000000000# vim:set et ts=4: # # ibus-m17n - The m17n engine for IBus # # Copyright (c) 2007-2008 Huang Peng # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # if not 1, append datestamp to the version number. m4_define([ibus_released], [1]) m4_define([ibus_major_version], [1]) m4_define([ibus_minor_version], [4]) m4_define([ibus_micro_version], [9]) m4_define(ibus_maybe_datestamp, m4_esyscmd([if test x]ibus_released[ != x1; then date +.%Y%m%d | tr -d '\n\r'; fi])) m4_define([ibus_version], ibus_major_version.ibus_minor_version.ibus_micro_version[]ibus_maybe_datestamp) AC_INIT([ibus-m17n], [ibus_version], [http://code.google.com/p/ibus/issues/entry],[ibus-m17n]) AM_INIT_AUTOMAKE([1.10]) AC_GNU_SOURCE AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) # define PACKAGE_VERSION_* variables AS_VERSION AS_NANO AM_SANITY_CHECK AM_MAINTAINER_MODE AM_DISABLE_STATIC AC_PROG_CC AM_PROG_CC_C_O AC_PROG_CXX AC_ISC_POSIX AC_HEADER_STDC AM_PROG_LIBTOOL # check ibus PKG_CHECK_MODULES(IBUS, [ ibus-1.0 >= 1.4 ]) # check m17n PKG_CHECK_MODULES(M17N, [ m17n-shell ]) # check gtk for setup AC_MSG_CHECKING([which gtk+ version to compile against]) AC_ARG_WITH([gtk], [AS_HELP_STRING([--with-gtk=2.0|3.0|no],[which gtk+ version to compile against (default: 2.0)])], [case "$with_gtk" in 2.0|3.0|no) ;; *) AC_MSG_ERROR([invalid gtk version specified]) ;; esac], [with_gtk=2.0]) AC_MSG_RESULT([$with_gtk]) case "$with_gtk" in 2.0) GTK_API_VERSION=2.0 GTK_REQUIRED=2.12.12 ;; 3.0) GTK_API_VERSION=3.0 GTK_REQUIRED=2.90.5 ;; esac if test x$with_gtk != xno; then PKG_CHECK_MODULES([GTK], [gtk+-$GTK_API_VERSION >= $GTK_REQUIRED], , with_gtk=no) AC_DEFINE([HAVE_SETUP], [1], [Define if setup dialog is installed]) fi AM_CONDITIONAL([HAVE_GTK],[test x$with_gtk != xno]) # check if minput_list, which is available in m17n-lib 1.6.2+ (CVS) save_CFLAGS="$CFLAGS" save_LIBS="$LIBS" CFLAGS="$CFLAGS $M17N_CFLAGS" LIBS="$LIBS $M17N_LIBS" AC_REPLACE_FUNCS([minput_list]) CFLAGS="$save_CFLAGS" LIBS="$save_LIBS" # define GETTEXT_* variables GETTEXT_PACKAGE=ibus-m17n AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define to the read-only architecture-independent data directory.]) AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION([0.19]) # OUTPUT files AC_CONFIG_FILES([ po/Makefile.in Makefile ibus-m17n.spec src/Makefile icons/Makefile m4/Makefile ]) AC_OUTPUT ibus-m17n-1.4.9/debian/000077500000000000000000000000001417147325300145005ustar00rootroot00000000000000ibus-m17n-1.4.9/debian/changelog.in000066400000000000000000000002261417147325300167570ustar00rootroot00000000000000ibus-m17n (${version}-1phuang${release}~${serie}1) ${serie}; urgency=low * Build for ubuntu ppa -- Peng Huang ${date} ibus-m17n-1.4.9/debian/compat000066400000000000000000000000021417147325300156760ustar00rootroot000000000000007 ibus-m17n-1.4.9/debian/control000066400000000000000000000012341417147325300161030ustar00rootroot00000000000000Source: ibus-m17n Section: utils Priority: optional Maintainer: LI Daobing Build-Depends: debhelper (>= 7), autotools-dev, libm17n-dev, pkg-config, libibus-dev (>= 1.2.99) Standards-Version: 3.8.4 Homepage: http://code.google.com/p/ibus Vcs-Bzr: lp:~lidaobing/ibus/ibus-m17n Vcs-Browser: https://code.launchpad.net/~lidaobing/ibus/ibus-m17n Package: ibus-m17n Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ibus (>= 1.2.99) Description: m17n engine for IBus IBus-m17n is a IM Engine for multiple languages, based on IBus. . IBus-m17n enables IBus to input many non-latin characters from the keyboard using libm17n library. ibus-m17n-1.4.9/debian/copyright000066400000000000000000000024221417147325300164330ustar00rootroot00000000000000This package was debianized by: LI Daobing on Wed, 31 Dec 2008 19:42:41 +0800 It was downloaded from: http://code.google.com/p/ibus/downloads/list Upstream Author: Huang Peng Copyright: Copyright (C) 2007-2008 Huang Peng License: This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. The Debian packaging is: Copyright (C) 2008, LI Daobing and is licensed under the GPL, see above. ibus-m17n-1.4.9/debian/ibus-engine-m17n.1000066400000000000000000000013261417147325300175510ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. .TH IBUS-ENGINE-M17N "1" "December 2008" "ibus-engine-m17n" "User Commands" .SH NAME ibus-engine-m17n \- multiple language input engine based on ibus .SH DESCRIPTION \&ibus\-engine\-m17n [options] [engines] .TP this command should run from ibus, don't run it directly. .TP \fB\-h\fR, \fB\-\-help\fR show this message. .TP \fB\-d\fR, \fB\-\-daemonize\fR daemonize ibus engine .TP \fB\-l\fR, \fB\-\-list\fR list all m17n input methods .TP \fB\-a\fR, \fB\-\-all\fR enable all m17n input methods .SS "example:" .IP \&./ibus\-engine\-m17n zh:py ja:trycode \&./ibus\-engine\-m17n zh:py,pinyin hi:inscript \&./ibus\-engine\-m17n \fB\-a\fR .SH "SEE ALSO" .BR ibus(1) ibus-m17n-1.4.9/debian/rules000077500000000000000000000036211417147325300155620ustar00rootroot00000000000000#!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) else CROSS= --build $(DEB_BUILD_GNU_TYPE) endif config.status: configure dh_testdir # Add here commands to configure the package. ifneq "$(wildcard /usr/share/misc/config.sub)" "" cp -f /usr/share/misc/config.sub config.sub endif ifneq "$(wildcard /usr/share/misc/config.guess)" "" cp -f /usr/share/misc/config.guess config.guess endif dh_auto_configure -- LDFLAGS="-Wl,--as-needed" build: build-stamp build-stamp: config.status dh_testdir $(MAKE) touch $@ clean: dh_testdir dh_testroot rm -f build-stamp [ ! -f Makefile ] || $(MAKE) distclean rm -f config.sub config.guess config.log dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs $(MAKE) DESTDIR=$(CURDIR)/debian/ibus-m17n install binary-indep: install binary-arch: install dh_testdir dh_testroot dh_installchangelogs dh_installdocs dh_installexamples dh_installman debian/ibus-engine-m17n.1 dh_link dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install ibus-m17n-1.4.9/debian/source/000077500000000000000000000000001417147325300160005ustar00rootroot00000000000000ibus-m17n-1.4.9/debian/source/format000066400000000000000000000000041417147325300172050ustar00rootroot000000000000001.0 ibus-m17n-1.4.9/debian/watch000066400000000000000000000001671417147325300155350ustar00rootroot00000000000000version=3 http://code.google.com/p/ibus/downloads/list \ http://ibus.googlecode.com/files/ibus-m17n-([0-9].*)\.tar\.gz ibus-m17n-1.4.9/ibus-m17n.spec.in000066400000000000000000000022051417147325300162600ustar00rootroot00000000000000Name: ibus-m17n Version: @PACKAGE_VERSION@ Release: 1%{?dist} Summary: The M17N engine for IBus platform License: GPLv2+ Group: System Environment/Libraries URL: http://code.google.com/p/ibus/ Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gettext-devel BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: ibus-devel BuildRequires: m17n-lib-devel Requires: ibus Requires: m17n-lib %description M17N engine for IBus input platform. It allows input of many languages using the input table maps from m17n-db. %prep %setup -q %build %configure --disable-static # make -C po update-gmo make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make DESTDIR=${RPM_BUILD_ROOT} install %find_lang %{name} %clean rm -rf $RPM_BUILD_ROOT %files -f %{name}.lang %defattr(-,root,root,-) %doc AUTHORS COPYING README %{_datadir}/ibus-m17n %{_libexecdir}/ibus-engine-m17n %{_datadir}/ibus/component/* %changelog * Thu Aug 07 2008 Huang Peng - @VERSION@-1 - The first version. ibus-m17n-1.4.9/icons/000077500000000000000000000000001417147325300143715ustar00rootroot00000000000000ibus-m17n-1.4.9/icons/Makefile.am000066400000000000000000000016701417147325300164310ustar00rootroot00000000000000# vim:set noet ts=4: # # ibus - The Input Bus # # Copyright (c) 2007-2008 Huang Peng # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this program; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA icons_DATA = \ ibus-m17n.svg \ $(NULL) iconsdir = $(pkgdatadir)/icons EXTRA_DIST = \ ibus-m17n.svg \ $(NULL) ibus-m17n-1.4.9/icons/ibus-m17n.svg000066400000000000000000000205141417147325300166360ustar00rootroot00000000000000 image/svg+xml ibus-m17n-1.4.9/its/000077500000000000000000000000001417147325300140555ustar00rootroot00000000000000ibus-m17n-1.4.9/its/Makefile.am000066400000000000000000000002111417147325300161030ustar00rootroot00000000000000NULL = EXTRA_DIST = \ $(gettextits_DATA) \ $(NULL) gettextitsdir = $(datadir)/gettext/its gettextits_DATA = \ m17n.its \ m17n.loc ibus-m17n-1.4.9/its/m17n.its000066400000000000000000000011351417147325300153600ustar00rootroot00000000000000 ibus-m17n-1.4.9/its/m17n.loc000066400000000000000000000005061417147325300153370ustar00rootroot00000000000000 ibus-m17n-1.4.9/m17n.appdata.xml000066400000000000000000000147421417147325300162030ustar00rootroot00000000000000 m17n.xml CC0-1.0 Ibus M17N M17N input engine for IBus

This multilingualization input method allows entering many languages using the input methods from the m17n library.

GPL-2 Parag Nemade, Mike FABIAN pnemade@redhat.com, mfabian@redhat.com https://github.com/ibus/ibus-m17n https://github.com/ibus/ibus-m17n/issues https://github.com/ibus/ibus-m17n

This new stable release includes these changes:

github.com/ibus/ibus-m17n/releases/tag/1.4.9 Hide status from the panel if status == title (by Daiki Ueno, this patch has been applied to the Fedora packages for a long time, take it upstream) Free lang and name after engine_name is built Just return from ibus_m17n_engine_callback with nullable m17n Accept virtual engine names for CI

This new stable release includes these changes:

github.com/ibus/ibus-m17n/releases/tag/1.4.8 Remove gnome-common requirement in autogen.sh (by Parag Nemade) Translation update from Weblate for Sinhala

This new stable release includes these changes:

github.com/ibus/ibus-m17n/releases/tag/1.4.7 Assign symbols to all the new inscript2 engines (and add some other missing symbols) Allow to use kbd engines (#32) Add ibus-m17n-xkb-options.patch from Fedora Add ibus-m17n-enable-ar-kbd.patch from Fedora

This new stable release includes these changes:

github.com/ibus/ibus-m17n/releases/tag/1.4.6 Make inscript2 engines rank higher than inscript engines

This new stable release includes these changes:

  • Use ibus_engine_update_preedit_with_mode() *always* with IBUS_ENGINE_PREEDIT_COMMIT mode Even if the preedit *is* highlighted it is not natural to discard the preedit when the focus moves to a different window. Committing the preedit feels better.
  • Translation update from Weblate, bn new and 100% complete, pt_BR now 100% complete.
  • Remove redundant target for desktop.in file. It will be done in desktop file generation since switched to gettext-0.19.

This new stable release includes these changes:

  • Translation update from Weblate, zh_CN now 100% complete.

This new stable release includes these changes:

  • New translation: es (Spanish) 100%

This new stable release includes these changes:

  • New translations: tr (Turkish) 100%, uk (Ukrainian) 100%, id (Indonesian) 100%, ja_JP (Japanese) 100%.
  • Translation updates: zh_CN, pt_BR

This new stable release includes these changes:

  • Fix for google code issue 1781 in ibus-m17n for kk (Correct symbols for kk input methods)
  • Add German translations
  • Add m17n.appdata.xml

This new stable release includes these changes:

  • Migrate from IBusConfig to GSettings. Resolves: https://github.com/ibus/ibus-m17n/issues/3
  • Add an option to emulate US layout
  • Fix preedit background colour and underlining
  • Switch off preedit background and foreground correctly if disabled in the setup tool
  • Other minor bug fixes.
ibus-m17n
ibus-m17n-1.4.9/m4/000077500000000000000000000000001417147325300135765ustar00rootroot00000000000000ibus-m17n-1.4.9/m4/.gitignore000066400000000000000000000000051417147325300155610ustar00rootroot00000000000000*.m4 ibus-m17n-1.4.9/m4/Makefile.am000066400000000000000000000015161417147325300156350ustar00rootroot00000000000000# vim:set noet ts=4: # # ibus-m17n - The m17n engine for IBus # # Copyright (c) 2007-2008 Huang Peng # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. EXTRA_DIST = \ as-version.m4 \ $(NULL) ibus-m17n-1.4.9/m4/as-version.m4000066400000000000000000000037701417147325300161350ustar00rootroot00000000000000dnl as-version.m4 0.2.0 dnl autostars m4 macro for versioning dnl Thomas Vander Stichele dnl $Id: as-version.m4,v 1.4 2004/06/01 09:40:05 thomasvs Exp $ dnl AS_VERSION dnl example dnl AS_VERSION dnl this macro dnl - AC_SUBST's PACKAGE_VERSION_MAJOR, _MINOR, _MICRO dnl - AC_SUBST's PACKAGE_VERSION_RELEASE, dnl which can be used for rpm release fields dnl - doesn't call AM_INIT_AUTOMAKE anymore because it prevents dnl maintainer mode from running correctly dnl dnl don't forget to put #undef PACKAGE_VERSION_RELEASE in acconfig.h dnl if you use acconfig.h AC_DEFUN([AS_VERSION], [ PACKAGE_VERSION_MAJOR=$(echo AC_PACKAGE_VERSION | cut -d'.' -f1) PACKAGE_VERSION_MINOR=$(echo AC_PACKAGE_VERSION | cut -d'.' -f2) PACKAGE_VERSION_MICRO=$(echo AC_PACKAGE_VERSION | cut -d'.' -f3) AC_SUBST(PACKAGE_VERSION_MAJOR) AC_SUBST(PACKAGE_VERSION_MINOR) AC_SUBST(PACKAGE_VERSION_MICRO) ]) dnl AS_NANO(ACTION-IF-NO-NANO, [ACTION-IF-NANO]) dnl requires AC_INIT to be called before dnl For projects using a fourth or nano number in your versioning to indicate dnl development or prerelease snapshots, this macro allows the build to be dnl set up differently accordingly. dnl this macro: dnl - parses AC_PACKAGE_VERSION, set by AC_INIT, and extracts the nano number dnl - sets the variable PACKAGE_VERSION_NANO dnl - sets the variable PACKAGE_VERSION_RELEASE, which can be used dnl for rpm release fields dnl - executes ACTION-IF-NO-NANO or ACTION-IF-NANO dnl example: dnl AS_NANO(RELEASE="yes", RELEASE="no") AC_DEFUN([AS_NANO], [ AC_MSG_CHECKING(nano version) NANO=$(echo AC_PACKAGE_VERSION | cut -d'.' -f4) if test x"$NANO" = x || test "x$NANO" = "x0" ; then AC_MSG_RESULT([0 (release)]) NANO=0 PACKAGE_VERSION_RELEASE=1 ifelse([$1], , :, [$1]) else AC_MSG_RESULT($NANO) PACKAGE_VERSION_RELEASE=0.`date +%Y%m%d.%H%M%S` ifelse([$2], , :, [$2]) fi PACKAGE_VERSION_NANO=$NANO AC_SUBST(PACKAGE_VERSION_NANO) AC_SUBST(PACKAGE_VERSION_RELEASE) ]) ibus-m17n-1.4.9/po/000077500000000000000000000000001417147325300136745ustar00rootroot00000000000000ibus-m17n-1.4.9/po/.gitignore000066400000000000000000000003311417147325300156610ustar00rootroot00000000000000Makefile Makefile.in Makefile.in.in Makevars.template POTFILES Rules-quot boldquot.sed en@boldquot.header en@quot.header insert-header.sin quot.sed remove-potcdate.sed remove-potcdate.sin .zanata-cache stamp-po *.gmo ibus-m17n-1.4.9/po/LINGUAS000066400000000000000000000001411417147325300147150ustar00rootroot00000000000000# please keep this list sorted alphabetically # de zh_CN tr uk id zh_TW ja pt_BR fa fr es si bn ibus-m17n-1.4.9/po/Makevars000066400000000000000000000035461417147325300154000ustar00rootroot00000000000000# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = $(PACKAGE) # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = Huang Peng # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = $(PACKAGE_BUGREPORT) # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = $(DOMAIN).pot-update: export GETTEXTDATADIR = $(top_srcdir) ibus-m17n-1.4.9/po/POTFILES.in000066400000000000000000000001671417147325300154550ustar00rootroot00000000000000src/engine.c src/m17nutil.c src/main.c src/ibus-m17n-preferences.ui src/ibus-setup-m17n.desktop.in.in m17n.appdata.xml ibus-m17n-1.4.9/po/POTFILES.skip000066400000000000000000000000371417147325300160110ustar00rootroot00000000000000src/ibus-setup-m17n.desktop.in ibus-m17n-1.4.9/po/bn.po000066400000000000000000000070341417147325300146370ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Huang Peng # This file is distributed under the same license as the ibus-m17n package. # Abu Huraira , 2021. msgid "" msgstr "" "Project-Id-Version: ibus-m17n 1.4.3\n" "Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n" "POT-Creation-Date: 2021-08-13 19:52+0200\n" "PO-Revision-Date: 2021-04-04 09:01+0000\n" "Last-Translator: Abu Huraira \n" "Language-Team: Bengali \n" "Language: bn\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Generator: Weblate 4.5.3\n" #: src/m17nutil.c:351 msgid "M17N" msgstr "এম১৭এন" #: src/ibus-m17n-preferences.ui:14 msgid "System" msgstr "সিস্টেম" #: src/ibus-m17n-preferences.ui:18 msgid "Vertical" msgstr "উল্লম্ব" #: src/ibus-m17n-preferences.ui:22 msgid "Horizontal" msgstr "অনুভূমিক" #: src/ibus-m17n-preferences.ui:36 msgid "Single" msgstr "একা" #: src/ibus-m17n-preferences.ui:40 msgid "Double" msgstr "দ্বিগুণ" #: src/ibus-m17n-preferences.ui:44 msgid "Low" msgstr "কম" #: src/ibus-m17n-preferences.ui:48 msgid "None" msgstr "কিছুই না" #: src/ibus-m17n-preferences.ui:57 msgid "Preferences" msgstr "পছন্দসমূহ" #: src/ibus-m17n-preferences.ui:172 msgid "Foreground:" msgstr "পুরোভূমি:" #: src/ibus-m17n-preferences.ui:181 msgid "Background:" msgstr "পটভূমি:" #: src/ibus-m17n-preferences.ui:196 msgid "Underline:" msgstr "আন্ডারলাইন:" #: src/ibus-m17n-preferences.ui:211 msgid "Pre-edit Appearance" msgstr "প্রাক সম্পাদনা উপস্থিতি রুপ" #: src/ibus-m17n-preferences.ui:244 msgid "Lookup Table Orientation:" msgstr "সন্ধান সারণীর ওরিয়েন্টেশন:" #: src/ibus-m17n-preferences.ui:260 msgid "Use US keyboard layout" msgstr "মার্কিন কীবোর্ড লেআউট ব্যবহার করুন" #: src/ibus-m17n-preferences.ui:280 msgid "Other" msgstr "অন্যান্য" #: src/ibus-m17n-preferences.ui:299 msgid "General" msgstr "সাধারণ" #: src/ibus-m17n-preferences.ui:347 msgid "m17n-lib Configuration" msgstr "m17n-lib কনফিগারেশন" #: src/ibus-m17n-preferences.ui:362 msgid "Advanced" msgstr "উন্নত" #: src/ibus-setup-m17n.desktop.in.in:3 msgid "IBus M17N Setup" msgstr "আইবাস এম17এন সেটআপ" #: src/ibus-setup-m17n.desktop.in.in:4 msgid "Set up IBus M17N engine" msgstr "আইবাস এম17এন ইঞ্জিন সেট আপ করুন" #: m17n.appdata.xml:5 msgid "Ibus M17N" msgstr "আইবাস এম১৭এন" #: m17n.appdata.xml:6 msgid "M17N input engine for IBus" msgstr "আইবাসের জন্য এম১৭এন ইনপুট ইঞ্জিন" #: m17n.appdata.xml:8 msgid "" "This multilingualization input method allows entering many languages using " "the input methods from the m17n library." msgstr "" "এই বহুভাষিককরণ ইনপুট পদ্ধতিটি m17n লাইব্রেরি থেকে ইনপুট পদ্ধতি ব্যবহার করে অনেক " "ভাষায় ইনপুটের অনুমতি দেয়।" ibus-m17n-1.4.9/po/de.po000066400000000000000000000060051417147325300146250ustar00rootroot00000000000000# translation of ibus-m17n.pot to German # German translation of ibus-m17n # Copyright (C) YEAR Huang Peng # This file is distributed under the same license as the ibus-m17n package. # Translators: # Mike FABIAN , 2018, 2019. # Mike FABIAN , 2018. #zanata, 2019. msgid "" msgstr "" "Project-Id-Version: ibus-m17n 1.4.0\n" "Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n" "POT-Creation-Date: 2021-08-13 19:52+0200\n" "PO-Revision-Date: 2019-12-19 09:38+0000\n" "Last-Translator: Mike FABIAN \n" "Language-Team: German \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 3.9.1\n" #: src/m17nutil.c:351 msgid "M17N" msgstr "M17N" #: src/ibus-m17n-preferences.ui:14 msgid "System" msgstr "Systemdefault" #: src/ibus-m17n-preferences.ui:18 msgid "Vertical" msgstr "Vertikal" #: src/ibus-m17n-preferences.ui:22 msgid "Horizontal" msgstr "Horizontal" #: src/ibus-m17n-preferences.ui:36 msgid "Single" msgstr "Einfach" #: src/ibus-m17n-preferences.ui:40 msgid "Double" msgstr "Doppelt" #: src/ibus-m17n-preferences.ui:44 msgid "Low" msgstr "Niedrig" #: src/ibus-m17n-preferences.ui:48 msgid "None" msgstr "Keine" #: src/ibus-m17n-preferences.ui:57 msgid "Preferences" msgstr "Einstellungen" #: src/ibus-m17n-preferences.ui:172 msgid "Foreground:" msgstr "Vordergrund:" #: src/ibus-m17n-preferences.ui:181 msgid "Background:" msgstr "Hintergrund:" #: src/ibus-m17n-preferences.ui:196 msgid "Underline:" msgstr "Unterstreichen:" #: src/ibus-m17n-preferences.ui:211 msgid "Pre-edit Appearance" msgstr "Aussehen des Preedits" #: src/ibus-m17n-preferences.ui:244 msgid "Lookup Table Orientation:" msgstr "Orientierung der Kandidatenliste:" #: src/ibus-m17n-preferences.ui:260 msgid "Use US keyboard layout" msgstr "US (amerikanische) Tastaturbelegung benutzen" #: src/ibus-m17n-preferences.ui:280 msgid "Other" msgstr "Sonstiges" #: src/ibus-m17n-preferences.ui:299 msgid "General" msgstr "Allgemein" #: src/ibus-m17n-preferences.ui:347 msgid "m17n-lib Configuration" msgstr "m17n-lib Konfiguration" #: src/ibus-m17n-preferences.ui:362 msgid "Advanced" msgstr "Fortgeschritten" #: src/ibus-setup-m17n.desktop.in.in:3 msgid "IBus M17N Setup" msgstr "IBus M17n Einstellungen" #: src/ibus-setup-m17n.desktop.in.in:4 msgid "Set up IBus M17N engine" msgstr "IBus M17N Einstellungen" #: m17n.appdata.xml:5 msgid "Ibus M17N" msgstr "IBus M17N" #: m17n.appdata.xml:6 msgid "M17N input engine for IBus" msgstr "M17N Eingabemethode für IBus" #: m17n.appdata.xml:8 msgid "" "This multilingualization input method allows entering many languages using " "the input methods from the m17n library." msgstr "" "Diese inputmethode erlaubt es viele Sprachen einzugeben mit Hilfe der " "Inputmethoden aus der m17n Bibliothek." ibus-m17n-1.4.9/po/es.po000066400000000000000000000055771417147325300146610ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Huang Peng # This file is distributed under the same license as the ibus-m17n package. # Emilio Herrera , 2020. msgid "" msgstr "" "Project-Id-Version: ibus-m17n 1.4.1\n" "Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n" "POT-Creation-Date: 2021-08-13 19:52+0200\n" "PO-Revision-Date: 2020-06-19 12:40+0000\n" "Last-Translator: Emilio Herrera \n" "Language-Team: Spanish \n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 4.0.4\n" #: src/m17nutil.c:351 msgid "M17N" msgstr "M17N" #: src/ibus-m17n-preferences.ui:14 msgid "System" msgstr "Sistema" #: src/ibus-m17n-preferences.ui:18 msgid "Vertical" msgstr "Vertical" #: src/ibus-m17n-preferences.ui:22 msgid "Horizontal" msgstr "Horizontal" #: src/ibus-m17n-preferences.ui:36 msgid "Single" msgstr "Sencillo" #: src/ibus-m17n-preferences.ui:40 msgid "Double" msgstr "Doble" #: src/ibus-m17n-preferences.ui:44 msgid "Low" msgstr "Bajo" #: src/ibus-m17n-preferences.ui:48 msgid "None" msgstr "Ninguno" #: src/ibus-m17n-preferences.ui:57 msgid "Preferences" msgstr "Preferencias" #: src/ibus-m17n-preferences.ui:172 msgid "Foreground:" msgstr "Primer plano:" #: src/ibus-m17n-preferences.ui:181 msgid "Background:" msgstr "Segundo plano:" #: src/ibus-m17n-preferences.ui:196 msgid "Underline:" msgstr "Subrayar:" #: src/ibus-m17n-preferences.ui:211 msgid "Pre-edit Appearance" msgstr "Apariencia Pre Edición" #: src/ibus-m17n-preferences.ui:244 msgid "Lookup Table Orientation:" msgstr "Orientación de la Tabla de Búsqueda:" #: src/ibus-m17n-preferences.ui:260 msgid "Use US keyboard layout" msgstr "Usar el diseño de teclado US" #: src/ibus-m17n-preferences.ui:280 msgid "Other" msgstr "Otro" #: src/ibus-m17n-preferences.ui:299 msgid "General" msgstr "General" #: src/ibus-m17n-preferences.ui:347 msgid "m17n-lib Configuration" msgstr "Configuración m17n-lib" #: src/ibus-m17n-preferences.ui:362 msgid "Advanced" msgstr "Avanzado" #: src/ibus-setup-m17n.desktop.in.in:3 msgid "IBus M17N Setup" msgstr "Ajuste IBus M17N" #: src/ibus-setup-m17n.desktop.in.in:4 msgid "Set up IBus M17N engine" msgstr "Ajuste motor IBus M17N" #: m17n.appdata.xml:5 msgid "Ibus M17N" msgstr "Ibus M17N" #: m17n.appdata.xml:6 msgid "M17N input engine for IBus" msgstr "Entrada de motor M17N para IBus" #: m17n.appdata.xml:8 msgid "" "This multilingualization input method allows entering many languages using " "the input methods from the m17n library." msgstr "" "Este método de multilingüismo permite la introducción de muchos lenguajes " "usando los métodos de entrada de la librería m17n." ibus-m17n-1.4.9/po/fa.po000066400000000000000000000044131417147325300146240ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Huang Peng # This file is distributed under the same license as the ibus-m17n package. # Ahmad Haghighi , 2020. msgid "" msgstr "" "Project-Id-Version: ibus-m17n 1.4.1\n" "Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n" "POT-Creation-Date: 2021-08-13 19:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" "Language: fa\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/m17nutil.c:351 msgid "M17N" msgstr "" #: src/ibus-m17n-preferences.ui:14 msgid "System" msgstr "" #: src/ibus-m17n-preferences.ui:18 msgid "Vertical" msgstr "" #: src/ibus-m17n-preferences.ui:22 msgid "Horizontal" msgstr "" #: src/ibus-m17n-preferences.ui:36 msgid "Single" msgstr "" #: src/ibus-m17n-preferences.ui:40 msgid "Double" msgstr "" #: src/ibus-m17n-preferences.ui:44 msgid "Low" msgstr "" #: src/ibus-m17n-preferences.ui:48 msgid "None" msgstr "" #: src/ibus-m17n-preferences.ui:57 msgid "Preferences" msgstr "" #: src/ibus-m17n-preferences.ui:172 msgid "Foreground:" msgstr "" #: src/ibus-m17n-preferences.ui:181 msgid "Background:" msgstr "" #: src/ibus-m17n-preferences.ui:196 msgid "Underline:" msgstr "" #: src/ibus-m17n-preferences.ui:211 msgid "Pre-edit Appearance" msgstr "" #: src/ibus-m17n-preferences.ui:244 msgid "Lookup Table Orientation:" msgstr "" #: src/ibus-m17n-preferences.ui:260 msgid "Use US keyboard layout" msgstr "" #: src/ibus-m17n-preferences.ui:280 msgid "Other" msgstr "" #: src/ibus-m17n-preferences.ui:299 msgid "General" msgstr "" #: src/ibus-m17n-preferences.ui:347 msgid "m17n-lib Configuration" msgstr "" #: src/ibus-m17n-preferences.ui:362 msgid "Advanced" msgstr "" #: src/ibus-setup-m17n.desktop.in.in:3 msgid "IBus M17N Setup" msgstr "" #: src/ibus-setup-m17n.desktop.in.in:4 msgid "Set up IBus M17N engine" msgstr "" #: m17n.appdata.xml:5 msgid "Ibus M17N" msgstr "" #: m17n.appdata.xml:6 msgid "M17N input engine for IBus" msgstr "" #: m17n.appdata.xml:8 msgid "" "This multilingualization input method allows entering many languages using " "the input methods from the m17n library." msgstr "" ibus-m17n-1.4.9/po/fr.po000066400000000000000000000056521417147325300146530ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Huang Peng # This file is distributed under the same license as the ibus-m17n package. # Julien Humbert , 2020. msgid "" msgstr "" "Project-Id-Version: ibus-m17n 1.4.1\n" "Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n" "POT-Creation-Date: 2021-08-13 19:52+0200\n" "PO-Revision-Date: 2020-01-18 16:32+0000\n" "Last-Translator: Julien Humbert \n" "Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Generator: Weblate 3.10.2\n" #: src/m17nutil.c:351 msgid "M17N" msgstr "M17N" #: src/ibus-m17n-preferences.ui:14 msgid "System" msgstr "Système" #: src/ibus-m17n-preferences.ui:18 msgid "Vertical" msgstr "Verticale" #: src/ibus-m17n-preferences.ui:22 msgid "Horizontal" msgstr "Horizontale" #: src/ibus-m17n-preferences.ui:36 msgid "Single" msgstr "Simple" #: src/ibus-m17n-preferences.ui:40 msgid "Double" msgstr "Double" #: src/ibus-m17n-preferences.ui:44 msgid "Low" msgstr "Bas" #: src/ibus-m17n-preferences.ui:48 msgid "None" msgstr "Aucun" #: src/ibus-m17n-preferences.ui:57 msgid "Preferences" msgstr "Préférences" #: src/ibus-m17n-preferences.ui:172 msgid "Foreground:" msgstr "Premier plan :" #: src/ibus-m17n-preferences.ui:181 msgid "Background:" msgstr "Arrière-plan :" #: src/ibus-m17n-preferences.ui:196 msgid "Underline:" msgstr "Soulignage :" #: src/ibus-m17n-preferences.ui:211 msgid "Pre-edit Appearance" msgstr "Apparence du pré-édit" #: src/ibus-m17n-preferences.ui:244 msgid "Lookup Table Orientation:" msgstr "Orientation de la table de consultation :" #: src/ibus-m17n-preferences.ui:260 msgid "Use US keyboard layout" msgstr "Utiliser la disposition clavier US" #: src/ibus-m17n-preferences.ui:280 msgid "Other" msgstr "Autres" #: src/ibus-m17n-preferences.ui:299 msgid "General" msgstr "Général" #: src/ibus-m17n-preferences.ui:347 msgid "m17n-lib Configuration" msgstr "Configuration de m17n-lib" #: src/ibus-m17n-preferences.ui:362 msgid "Advanced" msgstr "Avancé" #: src/ibus-setup-m17n.desktop.in.in:3 msgid "IBus M17N Setup" msgstr "Configuration d’IBus M17N" #: src/ibus-setup-m17n.desktop.in.in:4 msgid "Set up IBus M17N engine" msgstr "Configurer le moteur IBus M17N" #: m17n.appdata.xml:5 msgid "Ibus M17N" msgstr "Ibus M17N" #: m17n.appdata.xml:6 msgid "M17N input engine for IBus" msgstr "Moteur d’entrée M17N pour IBus" #: m17n.appdata.xml:8 msgid "" "This multilingualization input method allows entering many languages using " "the input methods from the m17n library." msgstr "" "Cette méthode de saisie multilingue permet de saisir plusieurs langues en " "utilisant les méthodes de saisie de la bibliothèque m17n." ibus-m17n-1.4.9/po/ibus-m17n.pot000066400000000000000000000044331417147325300161460ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Huang Peng # This file is distributed under the same license as the ibus-m17n package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: ibus-m17n 1.4.9\n" "Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n" "POT-Creation-Date: 2022-01-18 09:12+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: src/m17nutil.c:351 msgid "M17N" msgstr "" #: src/ibus-m17n-preferences.ui:14 msgid "System" msgstr "" #: src/ibus-m17n-preferences.ui:18 msgid "Vertical" msgstr "" #: src/ibus-m17n-preferences.ui:22 msgid "Horizontal" msgstr "" #: src/ibus-m17n-preferences.ui:36 msgid "Single" msgstr "" #: src/ibus-m17n-preferences.ui:40 msgid "Double" msgstr "" #: src/ibus-m17n-preferences.ui:44 msgid "Low" msgstr "" #: src/ibus-m17n-preferences.ui:48 msgid "None" msgstr "" #: src/ibus-m17n-preferences.ui:57 msgid "Preferences" msgstr "" #: src/ibus-m17n-preferences.ui:172 msgid "Foreground:" msgstr "" #: src/ibus-m17n-preferences.ui:181 msgid "Background:" msgstr "" #: src/ibus-m17n-preferences.ui:196 msgid "Underline:" msgstr "" #: src/ibus-m17n-preferences.ui:211 msgid "Pre-edit Appearance" msgstr "" #: src/ibus-m17n-preferences.ui:244 msgid "Lookup Table Orientation:" msgstr "" #: src/ibus-m17n-preferences.ui:260 msgid "Use US keyboard layout" msgstr "" #: src/ibus-m17n-preferences.ui:280 msgid "Other" msgstr "" #: src/ibus-m17n-preferences.ui:299 msgid "General" msgstr "" #: src/ibus-m17n-preferences.ui:347 msgid "m17n-lib Configuration" msgstr "" #: src/ibus-m17n-preferences.ui:362 msgid "Advanced" msgstr "" #: src/ibus-setup-m17n.desktop.in.in:3 msgid "IBus M17N Setup" msgstr "" #: src/ibus-setup-m17n.desktop.in.in:4 msgid "Set up IBus M17N engine" msgstr "" #: m17n.appdata.xml:5 msgid "Ibus M17N" msgstr "" #: m17n.appdata.xml:6 msgid "M17N input engine for IBus" msgstr "" #: m17n.appdata.xml:8 msgid "" "This multilingualization input method allows entering many languages using " "the input methods from the m17n library." msgstr "" ibus-m17n-1.4.9/po/id.po000066400000000000000000000055571417147325300146440ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Huang Peng # This file is distributed under the same license as the ibus-m17n package. # Mike FABIAN , 2019. # Rahman Yusri Aftian , 2019. msgid "" msgstr "" "Project-Id-Version: ibus-m17n 1.4.1\n" "Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n" "POT-Creation-Date: 2021-08-13 19:52+0200\n" "PO-Revision-Date: 2019-12-20 00:06+0000\n" "Last-Translator: Mike FABIAN \n" "Language-Team: Indonesian \n" "Language: id\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Weblate 3.9.1\n" #: src/m17nutil.c:351 msgid "M17N" msgstr "M17N" #: src/ibus-m17n-preferences.ui:14 msgid "System" msgstr "Sistem" #: src/ibus-m17n-preferences.ui:18 msgid "Vertical" msgstr "Vertikal" #: src/ibus-m17n-preferences.ui:22 msgid "Horizontal" msgstr "Horisontal" #: src/ibus-m17n-preferences.ui:36 msgid "Single" msgstr "Tunggal" #: src/ibus-m17n-preferences.ui:40 msgid "Double" msgstr "Dobel" #: src/ibus-m17n-preferences.ui:44 msgid "Low" msgstr "Lemah" #: src/ibus-m17n-preferences.ui:48 msgid "None" msgstr "Tidak ada" #: src/ibus-m17n-preferences.ui:57 msgid "Preferences" msgstr "Prefensi" #: src/ibus-m17n-preferences.ui:172 msgid "Foreground:" msgstr "Latar depan:" #: src/ibus-m17n-preferences.ui:181 msgid "Background:" msgstr "Latar Belakang:" #: src/ibus-m17n-preferences.ui:196 msgid "Underline:" msgstr "Garis bawah:" #: src/ibus-m17n-preferences.ui:211 msgid "Pre-edit Appearance" msgstr "Pre-edit Appearance" #: src/ibus-m17n-preferences.ui:244 msgid "Lookup Table Orientation:" msgstr "Orientasi Tabel Pencarian:" #: src/ibus-m17n-preferences.ui:260 msgid "Use US keyboard layout" msgstr "Gunakan tata letak keyboard US" #: src/ibus-m17n-preferences.ui:280 msgid "Other" msgstr "Lain" #: src/ibus-m17n-preferences.ui:299 msgid "General" msgstr "Umum" #: src/ibus-m17n-preferences.ui:347 msgid "m17n-lib Configuration" msgstr "m17n-lib Konfigurasi" #: src/ibus-m17n-preferences.ui:362 msgid "Advanced" msgstr "lanjutan" #: src/ibus-setup-m17n.desktop.in.in:3 msgid "IBus M17N Setup" msgstr "IBus M17N Setup" #: src/ibus-setup-m17n.desktop.in.in:4 msgid "Set up IBus M17N engine" msgstr "Set up IBus M17N mesin" #: m17n.appdata.xml:5 msgid "Ibus M17N" msgstr "Ibus M17N" #: m17n.appdata.xml:6 msgid "M17N input engine for IBus" msgstr "Mesin input M17N untuk IBus" #: m17n.appdata.xml:8 msgid "" "This multilingualization input method allows entering many languages using " "the input methods from the m17n library." msgstr "" "Metode input multibahasa memungkinkan masuk banyak bahasa menggunakan tabel " "dari perpustakaan m17n." ibus-m17n-1.4.9/po/ja.po000066400000000000000000000056461417147325300146410ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Huang Peng # This file is distributed under the same license as the ibus-m17n package. # Mike FABIAN , 2019. msgid "" msgstr "" "Project-Id-Version: ibus-m17n 1.4.1\n" "Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n" "POT-Creation-Date: 2021-08-13 19:52+0200\n" "PO-Revision-Date: 2019-12-19 09:38+0000\n" "Last-Translator: Mike FABIAN \n" "Language-Team: Japanese \n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Weblate 3.9.1\n" #: src/m17nutil.c:351 msgid "M17N" msgstr "M17N" #: src/ibus-m17n-preferences.ui:14 msgid "System" msgstr "システム" #: src/ibus-m17n-preferences.ui:18 msgid "Vertical" msgstr "縦" #: src/ibus-m17n-preferences.ui:22 msgid "Horizontal" msgstr "横" #: src/ibus-m17n-preferences.ui:36 msgid "Single" msgstr "一重下線" #: src/ibus-m17n-preferences.ui:40 msgid "Double" msgstr "二重下線" #: src/ibus-m17n-preferences.ui:44 msgid "Low" msgstr "低い下線" #: src/ibus-m17n-preferences.ui:48 msgid "None" msgstr "下線なし" #: src/ibus-m17n-preferences.ui:57 msgid "Preferences" msgstr "設定" #: src/ibus-m17n-preferences.ui:172 msgid "Foreground:" msgstr "文字色:" #: src/ibus-m17n-preferences.ui:181 msgid "Background:" msgstr "背景色:" #: src/ibus-m17n-preferences.ui:196 msgid "Underline:" msgstr "下線:" #: src/ibus-m17n-preferences.ui:211 msgid "Pre-edit Appearance" msgstr "前編集テキストの外観" #: src/ibus-m17n-preferences.ui:244 msgid "Lookup Table Orientation:" msgstr "候補ウィンドウの向き:" #: src/ibus-m17n-preferences.ui:260 msgid "Use US keyboard layout" msgstr "米国のキーボードレイアウトを使用する" #: src/ibus-m17n-preferences.ui:280 msgid "Other" msgstr "その他" #: src/ibus-m17n-preferences.ui:299 msgid "General" msgstr "一般" #: src/ibus-m17n-preferences.ui:347 msgid "m17n-lib Configuration" msgstr "m17n-lib の設定" #: src/ibus-m17n-preferences.ui:362 msgid "Advanced" msgstr "詳細" #: src/ibus-setup-m17n.desktop.in.in:3 msgid "IBus M17N Setup" msgstr "IBus M17N の設定" #: src/ibus-setup-m17n.desktop.in.in:4 msgid "Set up IBus M17N engine" msgstr "IBus M17n エンジンを設定する" #: m17n.appdata.xml:5 msgid "Ibus M17N" msgstr "Ibus M17N" #: m17n.appdata.xml:6 msgid "M17N input engine for IBus" msgstr "IBus の M17N 入力エンジン" #: m17n.appdata.xml:8 msgid "" "This multilingualization input method allows entering many languages using " "the input methods from the m17n library." msgstr "" "この多言語入力メソッドにより、m17nライブラリの入力メソッドを使用して多くの言" "語を入力できます。" ibus-m17n-1.4.9/po/pt_BR.po000066400000000000000000000057261417147325300152540ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Huang Peng # This file is distributed under the same license as the ibus-m17n package. # Rafael Fontenelle , 2020, 2021. # Mike FABIAN , 2020. msgid "" msgstr "" "Project-Id-Version: ibus-m17n 1.4.1\n" "Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n" "POT-Creation-Date: 2021-08-13 19:52+0200\n" "PO-Revision-Date: 2021-03-08 02:01+0000\n" "Last-Translator: Rafael Fontenelle \n" "Language-Team: Portuguese (Brazil) \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Generator: Weblate 4.5.1\n" #: src/m17nutil.c:351 msgid "M17N" msgstr "M17N" #: src/ibus-m17n-preferences.ui:14 msgid "System" msgstr "Sistema" #: src/ibus-m17n-preferences.ui:18 msgid "Vertical" msgstr "Vertical" #: src/ibus-m17n-preferences.ui:22 msgid "Horizontal" msgstr "Horizontal" #: src/ibus-m17n-preferences.ui:36 msgid "Single" msgstr "Único" #: src/ibus-m17n-preferences.ui:40 msgid "Double" msgstr "Duplo" #: src/ibus-m17n-preferences.ui:44 msgid "Low" msgstr "Baixo" #: src/ibus-m17n-preferences.ui:48 msgid "None" msgstr "Nenhum" #: src/ibus-m17n-preferences.ui:57 msgid "Preferences" msgstr "Preferências" #: src/ibus-m17n-preferences.ui:172 msgid "Foreground:" msgstr "Cor de seleção:" #: src/ibus-m17n-preferences.ui:181 msgid "Background:" msgstr "Cor de fundo:" #: src/ibus-m17n-preferences.ui:196 msgid "Underline:" msgstr "Sublinhado:" #: src/ibus-m17n-preferences.ui:211 msgid "Pre-edit Appearance" msgstr "Aparência da pré-edição" #: src/ibus-m17n-preferences.ui:244 msgid "Lookup Table Orientation:" msgstr "Orientação da tabela de pesquisa:" #: src/ibus-m17n-preferences.ui:260 msgid "Use US keyboard layout" msgstr "Usar disposição de teclado EUA" #: src/ibus-m17n-preferences.ui:280 msgid "Other" msgstr "Outro" #: src/ibus-m17n-preferences.ui:299 msgid "General" msgstr "Geral" #: src/ibus-m17n-preferences.ui:347 msgid "m17n-lib Configuration" msgstr "Configuração de m17n-lib" #: src/ibus-m17n-preferences.ui:362 msgid "Advanced" msgstr "Avançado" #: src/ibus-setup-m17n.desktop.in.in:3 msgid "IBus M17N Setup" msgstr "Configuração do IBus M17N" #: src/ibus-setup-m17n.desktop.in.in:4 msgid "Set up IBus M17N engine" msgstr "Configure o motor IBus M17N" #: m17n.appdata.xml:5 msgid "Ibus M17N" msgstr "Ibus M17N" #: m17n.appdata.xml:6 msgid "M17N input engine for IBus" msgstr "Motor de entrada M17N para IBus" #: m17n.appdata.xml:8 msgid "" "This multilingualization input method allows entering many languages using " "the input methods from the m17n library." msgstr "" "O método de entrada de multilingualização permite inserir vários idiomas " "usando os métodos de entrada da biblioteca m17n." ibus-m17n-1.4.9/po/si.po000066400000000000000000000046711417147325300146570ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Huang Peng # This file is distributed under the same license as the ibus-m17n package. # Hela Basa , 2021. msgid "" msgstr "" "Project-Id-Version: ibus-m17n 1.4.3\n" "Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n" "POT-Creation-Date: 2021-08-13 19:52+0200\n" "PO-Revision-Date: 2021-08-18 09:19+0000\n" "Last-Translator: Hela Basa \n" "Language-Team: Sinhala \n" "Language: si\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Generator: Weblate 4.7.2\n" #: src/m17nutil.c:351 msgid "M17N" msgstr "" #: src/ibus-m17n-preferences.ui:14 msgid "System" msgstr "පද්ධතිය" #: src/ibus-m17n-preferences.ui:18 msgid "Vertical" msgstr "" #: src/ibus-m17n-preferences.ui:22 msgid "Horizontal" msgstr "" #: src/ibus-m17n-preferences.ui:36 msgid "Single" msgstr "" #: src/ibus-m17n-preferences.ui:40 msgid "Double" msgstr "" #: src/ibus-m17n-preferences.ui:44 msgid "Low" msgstr "" #: src/ibus-m17n-preferences.ui:48 msgid "None" msgstr "" #: src/ibus-m17n-preferences.ui:57 msgid "Preferences" msgstr "" #: src/ibus-m17n-preferences.ui:172 msgid "Foreground:" msgstr "" #: src/ibus-m17n-preferences.ui:181 msgid "Background:" msgstr "පසුබිම:" #: src/ibus-m17n-preferences.ui:196 msgid "Underline:" msgstr "" #: src/ibus-m17n-preferences.ui:211 msgid "Pre-edit Appearance" msgstr "" #: src/ibus-m17n-preferences.ui:244 msgid "Lookup Table Orientation:" msgstr "" #: src/ibus-m17n-preferences.ui:260 msgid "Use US keyboard layout" msgstr "" #: src/ibus-m17n-preferences.ui:280 msgid "Other" msgstr "" #: src/ibus-m17n-preferences.ui:299 msgid "General" msgstr "" #: src/ibus-m17n-preferences.ui:347 msgid "m17n-lib Configuration" msgstr "" #: src/ibus-m17n-preferences.ui:362 msgid "Advanced" msgstr "" #: src/ibus-setup-m17n.desktop.in.in:3 msgid "IBus M17N Setup" msgstr "" #: src/ibus-setup-m17n.desktop.in.in:4 msgid "Set up IBus M17N engine" msgstr "" #: m17n.appdata.xml:5 msgid "Ibus M17N" msgstr "" #: m17n.appdata.xml:6 msgid "M17N input engine for IBus" msgstr "" #: m17n.appdata.xml:8 msgid "" "This multilingualization input method allows entering many languages using " "the input methods from the m17n library." msgstr "" ibus-m17n-1.4.9/po/tr.po000066400000000000000000000056101417147325300146630ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Huang Peng # This file is distributed under the same license as the ibus-m17n package. # Oğuz Ersen , 2019. # Mike FABIAN , 2019. msgid "" msgstr "" "Project-Id-Version: ibus-m17n 1.4.0\n" "Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n" "POT-Creation-Date: 2021-08-13 19:52+0200\n" "PO-Revision-Date: 2019-12-19 11:20+0000\n" "Last-Translator: Oğuz Ersen \n" "Language-Team: Turkish \n" "Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 3.9.1\n" #: src/m17nutil.c:351 msgid "M17N" msgstr "M17N" #: src/ibus-m17n-preferences.ui:14 msgid "System" msgstr "Sistem" #: src/ibus-m17n-preferences.ui:18 msgid "Vertical" msgstr "Dikey" #: src/ibus-m17n-preferences.ui:22 msgid "Horizontal" msgstr "Yatay" #: src/ibus-m17n-preferences.ui:36 msgid "Single" msgstr "Tek" #: src/ibus-m17n-preferences.ui:40 msgid "Double" msgstr "Çift" #: src/ibus-m17n-preferences.ui:44 msgid "Low" msgstr "Düşük" #: src/ibus-m17n-preferences.ui:48 msgid "None" msgstr "Hiç" #: src/ibus-m17n-preferences.ui:57 msgid "Preferences" msgstr "Tercihler" #: src/ibus-m17n-preferences.ui:172 msgid "Foreground:" msgstr "Ön plan:" #: src/ibus-m17n-preferences.ui:181 msgid "Background:" msgstr "Arka plan:" #: src/ibus-m17n-preferences.ui:196 msgid "Underline:" msgstr "Altını çiz:" #: src/ibus-m17n-preferences.ui:211 msgid "Pre-edit Appearance" msgstr "Ön-düzenleme Görünümü" #: src/ibus-m17n-preferences.ui:244 msgid "Lookup Table Orientation:" msgstr "Arama Tablosu Yönü:" #: src/ibus-m17n-preferences.ui:260 msgid "Use US keyboard layout" msgstr "US klavye düzenini kullan" #: src/ibus-m17n-preferences.ui:280 msgid "Other" msgstr "Diğer" #: src/ibus-m17n-preferences.ui:299 msgid "General" msgstr "Genel" #: src/ibus-m17n-preferences.ui:347 msgid "m17n-lib Configuration" msgstr "m17n-lib Yapılandırması" #: src/ibus-m17n-preferences.ui:362 msgid "Advanced" msgstr "Gelişmiş" #: src/ibus-setup-m17n.desktop.in.in:3 msgid "IBus M17N Setup" msgstr "IBus M17N Kurulumu" #: src/ibus-setup-m17n.desktop.in.in:4 msgid "Set up IBus M17N engine" msgstr "IBus M17N motorunu kur" #: m17n.appdata.xml:5 msgid "Ibus M17N" msgstr "Ibus M17N" #: m17n.appdata.xml:6 msgid "M17N input engine for IBus" msgstr "IBus için M17N giriş motoru" #: m17n.appdata.xml:8 msgid "" "This multilingualization input method allows entering many languages using " "the input methods from the m17n library." msgstr "" "Bu çok dilli giriş yöntemi, m17n kütüphanesindeki giriş yöntemlerini " "kullanarak birçok dilin girilmesine izin verir." ibus-m17n-1.4.9/po/uk.po000066400000000000000000000066531417147325300146650ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Huang Peng # This file is distributed under the same license as the ibus-m17n package. # Yuri Chornoivan , 2019, 2020. # Anonymous , 2019. # Jean-Baptiste Holcroft , 2019. msgid "" msgstr "" "Project-Id-Version: ibus-m17n 1.4.1\n" "Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n" "POT-Creation-Date: 2021-08-13 19:52+0200\n" "PO-Revision-Date: 2020-01-17 17:15+0000\n" "Last-Translator: Yuri Chornoivan \n" "Language-Team: Ukrainian \n" "Language: uk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 3.10.1\n" #: src/m17nutil.c:351 msgid "M17N" msgstr "M17N" #: src/ibus-m17n-preferences.ui:14 msgid "System" msgstr "Система" #: src/ibus-m17n-preferences.ui:18 msgid "Vertical" msgstr "Вертикальна" #: src/ibus-m17n-preferences.ui:22 msgid "Horizontal" msgstr "Горизонтальна" #: src/ibus-m17n-preferences.ui:36 msgid "Single" msgstr "Одинарні" #: src/ibus-m17n-preferences.ui:40 msgid "Double" msgstr "Подвійні" #: src/ibus-m17n-preferences.ui:44 msgid "Low" msgstr "Низькі" #: src/ibus-m17n-preferences.ui:48 msgid "None" msgstr "Немає" #: src/ibus-m17n-preferences.ui:57 msgid "Preferences" msgstr "Налаштування" #: src/ibus-m17n-preferences.ui:172 msgid "Foreground:" msgstr "Передній план:" #: src/ibus-m17n-preferences.ui:181 msgid "Background:" msgstr "Тло:" #: src/ibus-m17n-preferences.ui:196 msgid "Underline:" msgstr "Підкреслювання:" #: src/ibus-m17n-preferences.ui:211 msgid "Pre-edit Appearance" msgstr "Вигляд до редагування" #: src/ibus-m17n-preferences.ui:244 msgid "Lookup Table Orientation:" msgstr "Орієнтація таблиці пошуку:" #: src/ibus-m17n-preferences.ui:260 msgid "Use US keyboard layout" msgstr "Американська розкладка" #: src/ibus-m17n-preferences.ui:280 msgid "Other" msgstr "Інше" #: src/ibus-m17n-preferences.ui:299 msgid "General" msgstr "Загальне" #: src/ibus-m17n-preferences.ui:347 msgid "m17n-lib Configuration" msgstr "Налаштування m17n-lib" #: src/ibus-m17n-preferences.ui:362 msgid "Advanced" msgstr "Додатково" #: src/ibus-setup-m17n.desktop.in.in:3 msgid "IBus M17N Setup" msgstr "Налаштування M17N IBus" #: src/ibus-setup-m17n.desktop.in.in:4 msgid "Set up IBus M17N engine" msgstr "Налаштувати рушій M17N IBus" #: m17n.appdata.xml:5 msgid "Ibus M17N" msgstr "M17N Ibus" #: m17n.appdata.xml:6 msgid "M17N input engine for IBus" msgstr "Рушій обробки вхідних даних M17N для IBus" #: m17n.appdata.xml:8 msgid "" "This multilingualization input method allows entering many languages using " "the input methods from the m17n library." msgstr "" "За допомогою багатомовного способу введення ви зможете вводити текст " "багатьма мовами, використовуючи способи введення з бібліотеки m17n." ibus-m17n-1.4.9/po/zanata.xml000066400000000000000000000004211417147325300156710ustar00rootroot00000000000000 https://fedora.zanata.org/ ibus-m17n master gettext ibus-m17n-1.4.9/po/zh_CN.po000066400000000000000000000055571417147325300152510ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Huang Peng # This file is distributed under the same license as the PACKAGE package. # Mike FABIAN , 2019, 2020. # chiachen , 2020. # Dingzhong Chen , 2021. msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n" "POT-Creation-Date: 2021-08-13 19:52+0200\n" "PO-Revision-Date: 2021-01-28 17:40+0000\n" "Last-Translator: Dingzhong Chen \n" "Language-Team: Chinese (Simplified) \n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Weblate 4.4.2\n" #: src/m17nutil.c:351 msgid "M17N" msgstr "M17N" #: src/ibus-m17n-preferences.ui:14 msgid "System" msgstr "系统" #: src/ibus-m17n-preferences.ui:18 msgid "Vertical" msgstr "竖排" #: src/ibus-m17n-preferences.ui:22 msgid "Horizontal" msgstr "横排" #: src/ibus-m17n-preferences.ui:36 msgid "Single" msgstr "单" #: src/ibus-m17n-preferences.ui:40 msgid "Double" msgstr "双" #: src/ibus-m17n-preferences.ui:44 msgid "Low" msgstr "低" #: src/ibus-m17n-preferences.ui:48 msgid "None" msgstr "无" #: src/ibus-m17n-preferences.ui:57 msgid "Preferences" msgstr "首选项" #: src/ibus-m17n-preferences.ui:172 msgid "Foreground:" msgstr "前景色:" #: src/ibus-m17n-preferences.ui:181 msgid "Background:" msgstr "背景色:" #: src/ibus-m17n-preferences.ui:196 msgid "Underline:" msgstr "下划线:" #: src/ibus-m17n-preferences.ui:211 msgid "Pre-edit Appearance" msgstr "预编辑框外观" #: src/ibus-m17n-preferences.ui:244 msgid "Lookup Table Orientation:" msgstr "候选词表方向:" #: src/ibus-m17n-preferences.ui:260 msgid "Use US keyboard layout" msgstr "使用美国键盘布局" #: src/ibus-m17n-preferences.ui:280 msgid "Other" msgstr "其他" #: src/ibus-m17n-preferences.ui:299 msgid "General" msgstr "常规" #: src/ibus-m17n-preferences.ui:347 msgid "m17n-lib Configuration" msgstr "m17n-lib 配置" #: src/ibus-m17n-preferences.ui:362 msgid "Advanced" msgstr "高级" #: src/ibus-setup-m17n.desktop.in.in:3 msgid "IBus M17N Setup" msgstr "IBus M17N 设置" #: src/ibus-setup-m17n.desktop.in.in:4 msgid "Set up IBus M17N engine" msgstr "设置 IBus M17N 引擎" #: m17n.appdata.xml:5 msgid "Ibus M17N" msgstr "IBus M17N" #: m17n.appdata.xml:6 msgid "M17N input engine for IBus" msgstr "IBus 的 M17N 输入引擎" #: m17n.appdata.xml:8 msgid "" "This multilingualization input method allows entering many languages using " "the input methods from the m17n library." msgstr "此多语言输入法使用来自 m17n 库的输入法,允许用户输入多种语言。" ibus-m17n-1.4.9/po/zh_TW.po000066400000000000000000000047221417147325300152740ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Huang Peng # This file is distributed under the same license as the ibus-m17n package. # Mike FABIAN , 2019, 2020. msgid "" msgstr "" "Project-Id-Version: ibus-m17n 1.4.1\n" "Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n" "POT-Creation-Date: 2021-08-13 19:52+0200\n" "PO-Revision-Date: 2020-09-11 08:29+0000\n" "Last-Translator: Mike FABIAN \n" "Language-Team: Chinese (Traditional) \n" "Language: zh_TW\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Weblate 4.2.2\n" #: src/m17nutil.c:351 msgid "M17N" msgstr "M17N" #: src/ibus-m17n-preferences.ui:14 msgid "System" msgstr "" #: src/ibus-m17n-preferences.ui:18 msgid "Vertical" msgstr "垂直" #: src/ibus-m17n-preferences.ui:22 msgid "Horizontal" msgstr "水平" #: src/ibus-m17n-preferences.ui:36 msgid "Single" msgstr "" #: src/ibus-m17n-preferences.ui:40 msgid "Double" msgstr "" #: src/ibus-m17n-preferences.ui:44 msgid "Low" msgstr "" #: src/ibus-m17n-preferences.ui:48 msgid "None" msgstr "無" #: src/ibus-m17n-preferences.ui:57 msgid "Preferences" msgstr "偏好設定" #: src/ibus-m17n-preferences.ui:172 msgid "Foreground:" msgstr "" #: src/ibus-m17n-preferences.ui:181 msgid "Background:" msgstr "" #: src/ibus-m17n-preferences.ui:196 msgid "Underline:" msgstr "" #: src/ibus-m17n-preferences.ui:211 msgid "Pre-edit Appearance" msgstr "" #: src/ibus-m17n-preferences.ui:244 msgid "Lookup Table Orientation:" msgstr "" #: src/ibus-m17n-preferences.ui:260 msgid "Use US keyboard layout" msgstr "" #: src/ibus-m17n-preferences.ui:280 msgid "Other" msgstr "" #: src/ibus-m17n-preferences.ui:299 msgid "General" msgstr "" #: src/ibus-m17n-preferences.ui:347 msgid "m17n-lib Configuration" msgstr "" #: src/ibus-m17n-preferences.ui:362 msgid "Advanced" msgstr "" #: src/ibus-setup-m17n.desktop.in.in:3 msgid "IBus M17N Setup" msgstr "" #: src/ibus-setup-m17n.desktop.in.in:4 msgid "Set up IBus M17N engine" msgstr "" #: m17n.appdata.xml:5 msgid "Ibus M17N" msgstr "" #: m17n.appdata.xml:6 msgid "M17N input engine for IBus" msgstr "" #: m17n.appdata.xml:8 msgid "" "This multilingualization input method allows entering many languages using " "the input methods from the m17n library." msgstr "" ibus-m17n-1.4.9/src/000077500000000000000000000000001417147325300140455ustar00rootroot00000000000000ibus-m17n-1.4.9/src/.gitignore000066400000000000000000000002221417147325300160310ustar00rootroot00000000000000m17n.xml ibus-engine-m17n ibus-setup-m17n ibus-setup-m17n.desktop ibus-setup-m17n.desktop.in test-m17n test-m17n.log test-m17n.trs test-suite.log ibus-m17n-1.4.9/src/Makefile.am000066400000000000000000000071541417147325300161100ustar00rootroot00000000000000# vim:set noet ts=4: # # ibus-m17n - The m17n engine for IBus # # Copyright (c) 2007-2008 Huang Peng # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. AM_CFLAGS = \ $(IBUS_CFLAGS) \ $(M17N_CFLAGS) \ -DPKGDATADIR=\"$(pkgdatadir)\" \ -DLIBEXECDIR=\"$(libexecdir)\" \ $(NULL) AM_LDADD = \ $(IBUS_LIBS) \ $(M17N_LIBS) \ $(NULL) check_PROGRAMS = \ test-m17n \ $(NULL) TESTS = \ $(check_PROGRAMS) \ $(NULL) TESTS_ENVIRONMENT = IBUS_M17N_PKGDATADIR=$(builddir) test_m17n_SOURCES = \ test.c \ $(NULL) test_m17n_CFLAGS = \ $(AM_CFLAGS) \ $(NULL) test_m17n_LDADD = \ libm17ncommon.la \ $(AM_LDADD) \ $(NULL) test: ibus-engine-m17n $(builddir)/ibus-engine-m17n libexec_PROGRAMS = ibus-engine-m17n noinst_LTLIBRARIES = libm17ncommon.la libm17ncommon_la_SOURCES = \ m17nutil.c \ m17nutil.h \ $(NULL) libm17ncommon_la_LIBADD = $(LTLIBOBJS) ibus_engine_m17n_SOURCES = \ main.c \ engine.c \ engine.h \ $(NULL) ibus_engine_m17n_LDADD = \ libm17ncommon.la \ $(IBUS_LIBS) \ $(M17N_LIBS) \ $(NULL) if HAVE_GTK libexec_PROGRAMS += ibus-setup-m17n ibus_setup_m17n_SOURCES = \ setup.c \ $(NULL) ibus_setup_m17n_CFLAGS = \ $(GTK_CFLAGS) \ $(AM_CFLAGS) \ $(NULL) ibus_setup_m17n_LDADD = \ libm17ncommon.la \ $(IBUS_LIBS) \ $(M17N_LIBS) \ $(GTK_LIBS) \ $(NULL) setupdir = $(pkgdatadir)/setup dist_setup_DATA = \ ibus-m17n-preferences.ui \ $(NULL) endif pkgdata_DATA = \ default.xml \ $(NULL) component_DATA = \ m17n.xml \ $(NULL) componentdir = $(datadir)/ibus/component EXTRA_DIST = \ m17n.xml.in \ default.xml \ $(desktop_in_in_files) \ $(schemas_DATA) \ $(NULL) DISTCLEANFILES = \ m17n.xml.in \ $(NULL) CLEANFILES = \ m17n.xml \ $(desktop_DATA) \ $(desktop_in_files) \ $(NULL) edit = sed \ -e 's|@VERSION[@]|$(VERSION)|g' \ -e 's|@libexecdir[@]|$(libexecdir)|g' \ -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' m17n.xml: m17n.xml.in $(AM_V_GEN) $(edit) $< > $@.tmp && mv $@.tmp $@ desktop_in_in_files = ibus-setup-m17n.desktop.in.in desktop_in_files = $(desktop_in_in_files:.in.in=.in) desktop_files = $(desktop_in_files:.desktop.in=.desktop) $(desktop_in_files): $(AM_V_GEN) $(MSGFMT) --desktop --template $@.in -o $@-t \ -d $(top_srcdir)/po && mv $@-t $@ $(desktop_files): @rm -f $@ $(AM_V_GEN) srcdir=''; \ test -f ./$@.in || srcdir=$(srcdir)/; \ $(edit) $${srcdir}$@.in >$@-t && mv $@-t $@ ibus-setup-m17n.desktop.in: ibus-setup-m17n.desktop.in.in ibus-setup-m17n.desktop: ibus-setup-m17n.desktop.in desktopdir=$(datadir)/applications desktop_DATA = $(desktop_files) schemas_DATA = \ org.freedesktop.ibus.engine.m17n.gschema.xml \ $(NULL) schemasdir = $(datadir)/glib-2.0/schemas/ install-data-hook: if test -z "$(DESTDIR)"; then \ glib-compile-schemas $(schemasdir); \ fi uninstall-hook: SCHEMAS_FILES=`ls $(schemasdir)/*.gschema.xml` || true; \ if test -z "$$SCHEMAS_FILES" && \ test -f $(schemasdir)/gschemas.compiled; then \ rm $(schemasdir)/gschemas.compiled; \ fi ibus-m17n-1.4.9/src/default.xml000066400000000000000000000231541417147325300162200ustar00rootroot00000000000000 m17n:* 0 FALSE m17n:ar:kbd 1 m17n:zh:py -1 m17n:ja:anthy -1 m17n:ko:han2 -1 m17n:ko:romaja -1 m17n:as:* 1 m17n:bn:* 1 m17n:gu:* 1 m17n:hi:* 1 m17n:kn:* 1 m17n:ks:* 1 m17n:mai:* 1 m17n:ml:* 1 m17n:mr:* 1 m17n:ne:* 1 m17n:or:* 1 m17n:pa:* 1 m17n:sa:* 1 m17n:sd:* 1 m17n:si:* 1 m17n:ta:* 1 m17n:te:* 1 m17n:as:phonetic 2 m17n:bn:inscript 2 m17n:gu:inscript 2 m17n:hi:inscript 2 m17n:kn:kgp 2 m17n:ks:kbd 2 m17n:mai:inscript 2 m17n:ml:inscript 2 m17n:mr:inscript 2 m17n:ne:rom 2 m17n:or:inscript 2 m17n:pa:inscript 2 m17n:sa:harvard-kyoto 2 m17n:sd:inscript 2 m17n:si:wijesekera 2 m17n:ta:tamil99 2 m17n:te:inscript 2 m17n:*:inscript2 3 m17n:si:samanala 0 m17n:*:inscript* default[lv3:ralt_switch] m17n:si:* default[lv3:ralt_switch] m17n:zh:cangjie TRUE m17n:zh:py-b5 TRUE m17n:zh:py-gb TRUE m17n:zh:py TRUE m17n:zh:quick TRUE m17n:zh:tonepy-b5 TRUE m17n:zh:tonepy-gb TRUE m17n:zh:tonepy TRUE m17n:ja:anthy TRUE m17n:*:kbd m17n:as:* m17n:bn:* m17n:brx:* m17n:doi:* m17n:gu:* m17n:hi:* m17n:kn:* m17n:kok:* m17n:ks:* m17n:ks:kbd خ m17n:mai:* m17n:ml:* m17n:mni:*beng m17n:mni:*mtei m17n:mr:* m17n:ne:* m17n:or:* m17n:pa:* m17n:sa:* m17n:sat:inscript2-deva m17n:sat:inscript2-olck m17n:sd:* m17n:si:* සි m17n:ta:* m17n:te:* m17n:*:pre m17n:*:post m17n:am:sera m17n:bo:* m17n:cr:* m17n:dv:* m17n:eo:* m17n:fa:* ف m17n:fr:* m17n:ii:* m17n:iu:* m17n:ja:anthy m17n:kk:* kk m17n:kk:arabic قا m17n:kk:kbd ҚА m17n:km:* m17n:lo:kbd m17n:lo:lrt m17n:nsk:* m17n:oj:* m17n:ps:* خ m17n:ru:* Я m17n:sv:* m17n:syrc:* m17n:tai:* m17n:th:* m17n:ur:* خ m17n:vi:* m17n:vi:han m17n:vi:nom* m17n:yi:* ש m17n:zh:bopomofo m17n:zh:cangjie m17n:zh:pinyin PY hanyu pinyin (m17n) m17n:zh:py* m17n:zh:quick m17n:zh:tonepy* ibus-m17n-1.4.9/src/engine.c000066400000000000000000001060561417147325300154660ustar00rootroot00000000000000/* vim:set et sts=4: */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include "m17nutil.h" #include "engine.h" typedef struct _IBusM17NEngine IBusM17NEngine; typedef struct _IBusM17NEngineClass IBusM17NEngineClass; struct _IBusM17NEngine { IBusEngine parent; /* members */ MInputContext *context; IBusLookupTable *table; IBusProperty *status_prop; #ifdef HAVE_SETUP IBusProperty *setup_prop; #endif /* HAVE_SETUP */ IBusPropList *prop_list; IBusKeymap *us_keymap; IBusInputPurpose purpose; IBusInputHints hints; }; struct _IBusM17NEngineClass { IBusEngineClass parent; /* configurations are per class */ GSettings *gsettings; guint preedit_foreground; guint preedit_background; gint preedit_underline; IBusPreeditFocusMode preedit_focus_mode; gint lookup_table_orientation; gboolean use_us_layout; gchar *title; MInputMethod *im; }; /* functions prototype */ static void ibus_m17n_engine_class_init (IBusM17NEngineClass *klass); static void ibus_m17n_config_value_changed (GSettings *gsettings, const gchar *key, IBusM17NEngineClass *klass); static GObject* ibus_m17n_engine_constructor (GType type, guint n_construct_params, GObjectConstructParam *construct_params); static void ibus_m17n_engine_init (IBusM17NEngine *m17n); static void ibus_m17n_engine_destroy (IBusM17NEngine *m17n); static gboolean ibus_m17n_engine_process_key_event (IBusEngine *engine, guint keyval, guint keycode, guint modifiers); static void ibus_m17n_engine_focus_in (IBusEngine *engine); static void ibus_m17n_engine_focus_out (IBusEngine *engine); static void ibus_m17n_engine_reset (IBusEngine *engine); static void ibus_m17n_engine_enable (IBusEngine *engine); static void ibus_m17n_engine_disable (IBusEngine *engine); static void ibus_m17n_engine_page_up (IBusEngine *engine); static void ibus_m17n_engine_page_down (IBusEngine *engine); static void ibus_m17n_engine_cursor_up (IBusEngine *engine); static void ibus_m17n_engine_cursor_down (IBusEngine *engine); static void ibus_m17n_engine_property_activate (IBusEngine *engine, const gchar *prop_name, guint prop_state); static void ibus_m17n_engine_set_content_type (IBusEngine *engine, IBusInputPurpose purpose, IBusInputHints hints); static void ibus_m17n_engine_commit_string (IBusM17NEngine *m17n, const gchar *string); static void ibus_m17n_engine_callback (MInputContext *context, MSymbol command); static void ibus_m17n_engine_update_preedit (IBusM17NEngine *m17n); static void ibus_m17n_engine_update_lookup_table (IBusM17NEngine *m17n); static IBusEngineClass *parent_class = NULL; void ibus_m17n_init (IBusBus *bus) { ibus_m17n_init_common (); } static gboolean ibus_m17n_scan_engine_name (const gchar *engine_name, gchar **lang, gchar **name) { gchar **strv; g_return_val_if_fail (g_str_has_prefix (engine_name, "m17n:"), FALSE); /* Test engine name 'm17n:lang:layout:ci' works */ strv = g_strsplit (engine_name, ":", -1); if (g_strv_length (strv) < 3) { g_strfreev (strv); g_return_val_if_reached (FALSE); } *lang = strv[1]; *name = strv[2]; g_free (strv[0]); g_free (strv); return TRUE; } static gboolean ibus_m17n_scan_class_name (const gchar *class_name, gchar **lang, gchar **name) { gchar *p; g_return_val_if_fail (g_str_has_prefix (class_name, "IBusM17N"), FALSE); g_return_val_if_fail (g_str_has_suffix (class_name, "Engine"), FALSE); /* Strip prefix and suffix */ p = *lang = g_strdup (class_name + 8); p = g_strrstr (p, "Engine"); *p = '\0'; /* Find the start position of */ while (!g_ascii_isupper (*--p) && p > *lang) ; g_return_val_if_fail (p > *lang, FALSE); *name = g_strdup (p); *p = '\0'; *lang[0] = g_ascii_tolower (*lang[0]); *name[0] = g_ascii_tolower (*name[0]); return TRUE; } GType ibus_m17n_engine_get_type_for_name (const gchar *engine_name) { GType type; gchar *type_name, *lang = NULL, *name = NULL; GTypeInfo type_info = { sizeof (IBusM17NEngineClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ibus_m17n_engine_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (IBusM17NEngine), 0, (GInstanceInitFunc) ibus_m17n_engine_init, }; if (!ibus_m17n_scan_engine_name (engine_name, &lang, &name)) { g_free (lang); g_free (name); return G_TYPE_INVALID; } lang[0] = g_ascii_toupper (lang[0]); name[0] = g_ascii_toupper (name[0]); type_name = g_strdup_printf ("IBusM17N%s%sEngine", lang, name); g_free (lang); g_free (name); type = g_type_from_name (type_name); g_assert (type == 0 || g_type_is_a (type, IBUS_TYPE_ENGINE)); if (type == 0) { type = g_type_register_static (IBUS_TYPE_ENGINE, type_name, &type_info, (GTypeFlags) 0); } g_free (type_name); return type; } static void ibus_m17n_engine_class_init (IBusM17NEngineClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass); IBusEngineClass *engine_class = IBUS_ENGINE_CLASS (klass); gchar *engine_name, *lang = NULL, *name = NULL; IBusM17NEngineConfig *engine_config; if (parent_class == NULL) parent_class = (IBusEngineClass *) g_type_class_peek_parent (klass); object_class->constructor = ibus_m17n_engine_constructor; ibus_object_class->destroy = (IBusObjectDestroyFunc) ibus_m17n_engine_destroy; engine_class->process_key_event = ibus_m17n_engine_process_key_event; engine_class->reset = ibus_m17n_engine_reset; engine_class->enable = ibus_m17n_engine_enable; engine_class->disable = ibus_m17n_engine_disable; engine_class->focus_in = ibus_m17n_engine_focus_in; engine_class->focus_out = ibus_m17n_engine_focus_out; engine_class->page_up = ibus_m17n_engine_page_up; engine_class->page_down = ibus_m17n_engine_page_down; engine_class->cursor_up = ibus_m17n_engine_cursor_up; engine_class->cursor_down = ibus_m17n_engine_cursor_down; engine_class->property_activate = ibus_m17n_engine_property_activate; engine_class->set_content_type = ibus_m17n_engine_set_content_type; if (!ibus_m17n_scan_class_name (G_OBJECT_CLASS_NAME (klass), &lang, &name)) { g_free (lang); g_free (name); return; } klass->gsettings = g_settings_new_with_path ( "org.freedesktop.ibus.engine.m17n", g_strdup_printf ("/org/freedesktop/ibus/engine/m17n/%s/%s/", lang, name)); MPlist *l = minput_get_title_icon (msymbol (lang), msymbol (name)); if (l && mplist_key (l) == Mtext) { klass->title = ibus_m17n_mtext_to_utf8 (mplist_value (l)); } engine_name = g_strdup_printf ("m17n:%s:%s", lang, name); g_free (lang); g_free (name); engine_config = ibus_m17n_get_engine_config (engine_name); g_free (engine_name); /* configurations are per class */ klass->preedit_foreground = engine_config->preedit_highlight ? PREEDIT_FOREGROUND : INVALID_COLOR; klass->preedit_background = engine_config->preedit_highlight ? PREEDIT_BACKGROUND : INVALID_COLOR; klass->preedit_underline = IBUS_ATTR_UNDERLINE_NONE; klass->preedit_focus_mode = IBUS_ENGINE_PREEDIT_COMMIT; klass->lookup_table_orientation = IBUS_ORIENTATION_SYSTEM; klass->use_us_layout = FALSE; ibus_m17n_engine_config_free (engine_config); if (klass->gsettings != NULL) { GVariant *value; value = g_settings_get_value (klass->gsettings, "preedit-foreground"); if (value != NULL) { const gchar *hex = g_variant_get_string (value, NULL); klass->preedit_foreground = ibus_m17n_parse_color (hex); g_variant_unref (value); } value = g_settings_get_value (klass->gsettings, "preedit-background"); if (value != NULL) { const gchar *hex = g_variant_get_string (value, NULL); klass->preedit_background = ibus_m17n_parse_color (hex); g_variant_unref (value); } value = g_settings_get_value (klass->gsettings, "preedit-underline"); if (value != NULL) { klass->preedit_underline = g_variant_get_int32 (value); g_variant_unref (value); } value = g_settings_get_value (klass->gsettings, "lookup-table-orientation"); if (value != NULL) { klass->lookup_table_orientation = g_variant_get_int32 (value); g_variant_unref (value); } value = g_settings_get_value (klass->gsettings, "use-us-layout"); if (value != NULL) { klass->use_us_layout = g_variant_get_boolean (value); g_variant_unref (value); } } g_signal_connect (klass->gsettings, "changed", G_CALLBACK(ibus_m17n_config_value_changed), klass); klass->im = NULL; } static void ibus_m17n_config_value_changed (GSettings *gsettings, const gchar *key, IBusM17NEngineClass *klass) { GVariant *value; value = g_settings_get_value (gsettings, key); if (g_strcmp0 (key, "preedit-foreground") == 0) { const gchar *hex = g_variant_get_string (value, NULL); guint color; color = ibus_m17n_parse_color (hex); if (color != INVALID_COLOR) { klass->preedit_foreground = color; } else { klass->preedit_foreground = INVALID_COLOR; } } else if (g_strcmp0 (key, "preedit-background") == 0) { const gchar *hex = g_variant_get_string (value, NULL); guint color; color = ibus_m17n_parse_color (hex); if (color != INVALID_COLOR) { klass->preedit_background = color; } else { klass->preedit_background = INVALID_COLOR; } } else if (g_strcmp0 (key, "preedit-underline") == 0) { klass->preedit_underline = g_variant_get_int32 (value); } else if (g_strcmp0 (key, "lookup-table-orientation") == 0) { klass->lookup_table_orientation = g_variant_get_int32 (value); } else if (g_strcmp0 (key, "use-us-layout") == 0) { klass->use_us_layout = g_variant_get_boolean (value); } g_variant_unref (value); } static void ibus_m17n_engine_init (IBusM17NEngine *m17n) { IBusText* label; IBusText* tooltip; m17n->prop_list = ibus_prop_list_new (); g_object_ref_sink (m17n->prop_list); m17n->status_prop = ibus_property_new ("status", PROP_TYPE_NORMAL, NULL, NULL, NULL, TRUE, FALSE, 0, NULL); g_object_ref_sink (m17n->status_prop); ibus_prop_list_append (m17n->prop_list, m17n->status_prop); #ifdef HAVE_SETUP label = ibus_text_new_from_string ("Setup"); tooltip = ibus_text_new_from_string ("Configure M17N engine"); m17n->setup_prop = ibus_property_new ("setup", PROP_TYPE_NORMAL, label, "gtk-preferences", tooltip, TRUE, TRUE, PROP_STATE_UNCHECKED, NULL); g_object_ref_sink (m17n->setup_prop); ibus_prop_list_append (m17n->prop_list, m17n->setup_prop); #endif /* HAVE_SETUP */ m17n->table = ibus_lookup_table_new (9, 0, TRUE, TRUE); g_object_ref_sink (m17n->table); m17n->context = NULL; m17n->us_keymap = ibus_keymap_get ("us"); } static GObject* ibus_m17n_engine_constructor (GType type, guint n_construct_params, GObjectConstructParam *construct_params) { IBusM17NEngine *m17n; GObjectClass *object_class; IBusM17NEngineClass *klass; m17n = (IBusM17NEngine *) G_OBJECT_CLASS (parent_class)->constructor (type, n_construct_params, construct_params); object_class = G_OBJECT_GET_CLASS (m17n); klass = (IBusM17NEngineClass *) object_class; if (klass->im == NULL) { const gchar *engine_name; gchar *lang = NULL, *name = NULL; engine_name = ibus_engine_get_name ((IBusEngine *) m17n); if (!ibus_m17n_scan_engine_name (engine_name, &lang, &name)) { g_free (lang); g_free (name); return NULL; } klass->im = minput_open_im (msymbol (lang), msymbol (name), NULL); g_free (lang); g_free (name); if (klass->im == NULL) { g_warning ("Can not find m17n keymap %s", engine_name); g_object_unref (m17n); return NULL; } mplist_put (klass->im->driver.callback_list, Minput_preedit_start, ibus_m17n_engine_callback); mplist_put (klass->im->driver.callback_list, Minput_preedit_draw, ibus_m17n_engine_callback); mplist_put (klass->im->driver.callback_list, Minput_preedit_done, ibus_m17n_engine_callback); mplist_put (klass->im->driver.callback_list, Minput_status_start, ibus_m17n_engine_callback); mplist_put (klass->im->driver.callback_list, Minput_status_draw, ibus_m17n_engine_callback); mplist_put (klass->im->driver.callback_list, Minput_status_done, ibus_m17n_engine_callback); mplist_put (klass->im->driver.callback_list, Minput_candidates_start, ibus_m17n_engine_callback); mplist_put (klass->im->driver.callback_list, Minput_candidates_draw, ibus_m17n_engine_callback); mplist_put (klass->im->driver.callback_list, Minput_candidates_done, ibus_m17n_engine_callback); mplist_put (klass->im->driver.callback_list, Minput_set_spot, ibus_m17n_engine_callback); mplist_put (klass->im->driver.callback_list, Minput_toggle, ibus_m17n_engine_callback); /* Does not set reset callback, uses the default callback in m17n. mplist_put (klass->im->driver.callback_list, Minput_reset, ibus_m17n_engine_callback); */ mplist_put (klass->im->driver.callback_list, Minput_get_surrounding_text, ibus_m17n_engine_callback); mplist_put (klass->im->driver.callback_list, Minput_delete_surrounding_text, ibus_m17n_engine_callback); } m17n->context = minput_create_ic (klass->im, m17n); return (GObject *) m17n; } static void ibus_m17n_engine_destroy (IBusM17NEngine *m17n) { if (m17n->prop_list) { g_object_unref (m17n->prop_list); m17n->prop_list = NULL; } if (m17n->status_prop) { g_object_unref (m17n->status_prop); m17n->status_prop = NULL; } #if HAVE_SETUP if (m17n->setup_prop) { g_object_unref (m17n->setup_prop); m17n->setup_prop = NULL; } #endif /* HAVE_SETUP */ if (m17n->table) { g_object_unref (m17n->table); m17n->table = NULL; } if (m17n->context) { minput_destroy_ic (m17n->context); m17n->context = NULL; } if (m17n->us_keymap) { g_object_unref (m17n->us_keymap); m17n->us_keymap = NULL; } IBUS_OBJECT_CLASS (parent_class)->destroy ((IBusObject *)m17n); } static void ibus_m17n_engine_update_preedit (IBusM17NEngine *m17n) { IBusText *text; gchar *buf; IBusM17NEngineClass *klass = (IBusM17NEngineClass *) G_OBJECT_GET_CLASS (m17n); buf = ibus_m17n_mtext_to_utf8 (m17n->context->preedit); if (buf) { text = ibus_text_new_from_static_string (buf); if (klass->preedit_foreground != INVALID_COLOR) ibus_text_append_attribute (text, IBUS_ATTR_TYPE_FOREGROUND, klass->preedit_foreground, 0, -1); if (klass->preedit_background != INVALID_COLOR) ibus_text_append_attribute (text, IBUS_ATTR_TYPE_BACKGROUND, klass->preedit_background, 0, -1); ibus_text_append_attribute (text, IBUS_ATTR_TYPE_UNDERLINE, klass->preedit_underline, 0, -1); ibus_engine_update_preedit_text_with_mode ((IBusEngine *) m17n, text, m17n->context->cursor_pos, mtext_len (m17n->context->preedit) > 0, klass->preedit_focus_mode); } } static void ibus_m17n_engine_commit_string (IBusM17NEngine *m17n, const gchar *string) { IBusText *text; text = ibus_text_new_from_static_string (string); ibus_engine_commit_text ((IBusEngine *)m17n, text); ibus_m17n_engine_update_preedit (m17n); } /* Note on AltGr (Level3 Shift) handling: While currently we expect AltGr == mod5, it would be better to not expect the modifier always be assigned to particular modX. However, it needs some code like: KeyCode altgr = XKeysymToKeycode (display, XK_ISO_Level3_Shift); XModifierKeymap *mods = XGetModifierMapping (display); for (i = 3; i < 8; i++) for (j = 0; j < mods->max_keypermod; j++) { KeyCode code = mods->modifiermap[i * mods->max_keypermod + j]; if (code == altgr) ... } Since IBus engines are supposed to be cross-platform, the code should go into IBus core, instead of ibus-m17n. */ static MSymbol ibus_m17n_key_event_to_symbol (IBusM17NEngine *m17n, guint keycode, guint keyval, guint modifiers) { GString *keysym; MSymbol mkeysym = Mnil; guint mask = 0; if (keyval >= IBUS_Shift_L && keyval <= IBUS_Hyper_R) { return Mnil; } /* If keyval is already translated by IBUS_MOD5_MASK. Try to obtain the untranslated keyval from the US keymap. */ if (modifiers & IBUS_MOD5_MASK) { keyval = ibus_keymap_lookup_keysym (m17n->us_keymap, keycode, modifiers & ~IBUS_MOD5_MASK); } keysym = g_string_new (""); if (keyval >= IBUS_space && keyval <= IBUS_asciitilde) { gint c = keyval; if (keyval == IBUS_space && modifiers & IBUS_SHIFT_MASK) mask |= IBUS_SHIFT_MASK; if (modifiers & IBUS_CONTROL_MASK) { if (c >= IBUS_a && c <= IBUS_z) c += IBUS_A - IBUS_a; mask |= IBUS_CONTROL_MASK; } g_string_append_c (keysym, c); } else { const gchar *name = ibus_keyval_name (keyval); if (name == NULL) { g_string_free (keysym, TRUE); return Mnil; } mask |= modifiers & (IBUS_CONTROL_MASK | IBUS_SHIFT_MASK); g_string_append (keysym, name); } mask |= modifiers & (IBUS_MOD1_MASK | IBUS_MOD5_MASK | IBUS_META_MASK | IBUS_SUPER_MASK | IBUS_HYPER_MASK); if (mask & IBUS_HYPER_MASK) { g_string_prepend (keysym, "H-"); } if (mask & IBUS_SUPER_MASK) { g_string_prepend (keysym, "s-"); } if (mask & IBUS_MOD5_MASK) { g_string_prepend (keysym, "G-"); } if (mask & IBUS_MOD1_MASK) { g_string_prepend (keysym, "A-"); } if (mask & IBUS_META_MASK) { g_string_prepend (keysym, "M-"); } if (mask & IBUS_CONTROL_MASK) { g_string_prepend (keysym, "C-"); } if (mask & IBUS_SHIFT_MASK) { g_string_prepend (keysym, "S-"); } mkeysym = msymbol (keysym->str); g_string_free (keysym, TRUE); return mkeysym; } static gboolean ibus_m17n_engine_process_key (IBusM17NEngine *m17n, MSymbol key) { gchar *buf; MText *produced; gint retval; retval = minput_filter (m17n->context, key, NULL); if (retval) { return TRUE; } produced = mtext (); retval = minput_lookup (m17n->context, key, NULL, produced); if (retval) { // g_debug ("minput_lookup returns %d", retval); } buf = ibus_m17n_mtext_to_utf8 (produced); m17n_object_unref (produced); if (buf && strlen (buf)) { ibus_m17n_engine_commit_string (m17n, buf); } g_free (buf); return retval == 0; } static gboolean ibus_m17n_engine_process_key_event (IBusEngine *engine, guint keyval, guint keycode, guint modifiers) { IBusM17NEngine *m17n = (IBusM17NEngine *) engine; IBusM17NEngineClass *klass = (IBusM17NEngineClass *) G_OBJECT_GET_CLASS (m17n); guint original_keyval = keyval; switch (m17n->purpose) { case IBUS_INPUT_PURPOSE_PASSWORD: case IBUS_INPUT_PURPOSE_PIN: /* For password and PIN input, skip any further step processing a key event. */ return FALSE; default: break; } if (modifiers & IBUS_RELEASE_MASK) return FALSE; if (klass->use_us_layout) { keyval = ibus_keymap_lookup_keysym (m17n->us_keymap, keycode, modifiers); } MSymbol m17n_key = ibus_m17n_key_event_to_symbol (m17n, keycode, keyval, modifiers); if (m17n_key != Mnil && ibus_m17n_engine_process_key (m17n, m17n_key)) { return TRUE; } /* If keyval is translated in US layout, send the new keyval and notify that the event is handled. */ if (keyval != original_keyval && 0x20 <= keyval && keyval < 0x7F) { gchar buf[2]; buf[0] = keyval; buf[1] = '\0'; ibus_m17n_engine_commit_string (m17n, buf); return TRUE; } return FALSE; } static void ibus_m17n_engine_focus_in (IBusEngine *engine) { IBusM17NEngine *m17n = (IBusM17NEngine *) engine; ibus_engine_register_properties (engine, m17n->prop_list); ibus_m17n_engine_process_key (m17n, Minput_focus_in); parent_class->focus_in (engine); } static void ibus_m17n_engine_focus_out (IBusEngine *engine) { IBusM17NEngine *m17n = (IBusM17NEngine *) engine; /* To make ibus_engine_update_preedit_text_with_mode work properly, we just reset the IC instead of passing Mfocus_out to m17n-lib. */ minput_reset_ic (m17n->context); parent_class->focus_out (engine); } static void ibus_m17n_engine_reset (IBusEngine *engine) { IBusM17NEngine *m17n = (IBusM17NEngine *) engine; parent_class->reset (engine); minput_reset_ic (m17n->context); } static void ibus_m17n_engine_enable (IBusEngine *engine) { parent_class->enable (engine); /* Issue a dummy ibus_engine_get_surrounding_text() call to tell input context that we will use surrounding-text. */ ibus_engine_get_surrounding_text (engine, NULL, NULL, NULL); } static void ibus_m17n_engine_disable (IBusEngine *engine) { ibus_m17n_engine_focus_out (engine); parent_class->disable (engine); } static void ibus_m17n_engine_page_up (IBusEngine *engine) { IBusM17NEngine *m17n = (IBusM17NEngine *) engine; ibus_m17n_engine_process_key (m17n, msymbol ("Up")); parent_class->page_up (engine); } static void ibus_m17n_engine_page_down (IBusEngine *engine) { IBusM17NEngine *m17n = (IBusM17NEngine *) engine; ibus_m17n_engine_process_key (m17n, msymbol ("Down")); parent_class->page_down (engine); } static void ibus_m17n_engine_cursor_up (IBusEngine *engine) { IBusM17NEngine *m17n = (IBusM17NEngine *) engine; ibus_m17n_engine_process_key (m17n, msymbol ("Left")); parent_class->cursor_up (engine); } static void ibus_m17n_engine_cursor_down (IBusEngine *engine) { IBusM17NEngine *m17n = (IBusM17NEngine *) engine; ibus_m17n_engine_process_key (m17n, msymbol ("Right")); parent_class->cursor_down (engine); } static void ibus_m17n_engine_property_activate (IBusEngine *engine, const gchar *prop_name, guint prop_state) { IBusM17NEngine *m17n = (IBusM17NEngine *) engine; #ifdef HAVE_SETUP if (g_strcmp0 (prop_name, "setup") == 0) { const gchar *engine_name; gchar *setup; engine_name = ibus_engine_get_name ((IBusEngine *) m17n); g_assert (engine_name); setup = g_strdup_printf ("%s/ibus-setup-m17n --name %s", LIBEXECDIR, engine_name); g_spawn_command_line_async (setup, NULL); g_free (setup); } #endif /* HAVE_SETUP */ parent_class->property_activate (engine, prop_name, prop_state); } static void ibus_m17n_engine_set_content_type (IBusEngine *engine, IBusInputPurpose purpose, IBusInputHints hints) { IBusM17NEngine *m17n = (IBusM17NEngine *) engine; m17n->purpose = purpose; m17n->hints = hints; switch (purpose) { case IBUS_INPUT_PURPOSE_PASSWORD: case IBUS_INPUT_PURPOSE_PIN: /* For password and PIN input, emulate 'focus-out' to discard any pending input status (e.g. preedit or candidate list). */ ibus_m17n_engine_focus_out (engine); break; default: ibus_m17n_engine_focus_in (engine); break; } } static void ibus_m17n_engine_update_lookup_table (IBusM17NEngine *m17n) { ibus_lookup_table_clear (m17n->table); if (m17n->context->candidate_list && m17n->context->candidate_show) { IBusText *text; MPlist *group; group = m17n->context->candidate_list; gint i = 0; gint page = 1; IBusM17NEngineClass *klass = (IBusM17NEngineClass *) G_OBJECT_GET_CLASS (m17n); while (1) { gint len; if (mplist_key (group) == Mtext) len = mtext_len ((MText *) mplist_value (group)); else len = mplist_length ((MPlist *) mplist_value (group)); if (i + len > m17n->context->candidate_index) break; i += len; group = mplist_next (group); page ++; } if (mplist_key (group) == Mtext) { MText *mt; gunichar *buf; glong nchars, i; mt = (MText *) mplist_value (group); ibus_lookup_table_set_page_size (m17n->table, mtext_len (mt)); buf = ibus_m17n_mtext_to_ucs4 (mt, &nchars); g_warn_if_fail (buf != NULL); for (i = 0; buf != NULL && i < nchars; i++) { IBusText *text = ibus_text_new_from_unichar (buf[i]); if (text == NULL) { text = ibus_text_new_from_printf ("INVCODE=U+%04"G_GINT32_FORMAT"X", buf[i]); g_warn_if_reached (); } ibus_lookup_table_append_candidate (m17n->table, text); } g_free (buf); } else { MPlist *p; p = (MPlist *) mplist_value (group); ibus_lookup_table_set_page_size (m17n->table, mplist_length (p)); for (; mplist_key (p) != Mnil; p = mplist_next (p)) { MText *mtext; gchar *buf; mtext = (MText *) mplist_value (p); buf = ibus_m17n_mtext_to_utf8 (mtext); if (buf) { ibus_lookup_table_append_candidate (m17n->table, ibus_text_new_from_string (buf)); g_free (buf); } else { ibus_lookup_table_append_candidate (m17n->table, ibus_text_new_from_static_string ("NULL")); g_warn_if_reached(); } } } ibus_lookup_table_set_cursor_pos (m17n->table, m17n->context->candidate_index - i); ibus_lookup_table_set_orientation (m17n->table, klass->lookup_table_orientation); text = ibus_text_new_from_printf ("( %d / %d )", page, mplist_length (m17n->context->candidate_list)); ibus_engine_update_lookup_table ((IBusEngine *)m17n, m17n->table, TRUE); ibus_engine_update_auxiliary_text ((IBusEngine *)m17n, text, TRUE); } else { ibus_engine_hide_lookup_table ((IBusEngine *)m17n); ibus_engine_hide_auxiliary_text ((IBusEngine *)m17n); } } static void ibus_m17n_engine_callback (MInputContext *context, MSymbol command) { IBusM17NEngine *m17n = NULL; m17n = context->arg; /* m17n always can be NULL when create_ic_for_im() calls minput_create_ic() * in m17n-lib-1.8.0/src/input.c and g_return_if_fail() should not be * called with CI since warnings are treated as errors. */ if (!m17n) return; /* the callback may be called in minput_create_ic, in the time * m17n->context has not be assigned, so need assign it. */ if (m17n->context == NULL) { m17n->context = context; } if (command == Minput_preedit_start) { ibus_engine_hide_preedit_text ((IBusEngine *)m17n); } else if (command == Minput_preedit_draw) { ibus_m17n_engine_update_preedit (m17n); } else if (command == Minput_preedit_done) { ibus_engine_hide_preedit_text ((IBusEngine *)m17n); } else if (command == Minput_status_start) { ibus_engine_hide_preedit_text ((IBusEngine *)m17n); } else if (command == Minput_status_draw) { gchar *status; status = ibus_m17n_mtext_to_utf8 (m17n->context->status); IBusM17NEngineClass *klass = (IBusM17NEngineClass *) G_OBJECT_GET_CLASS (m17n); if (status && strlen (status) && g_strcmp0 (status, klass->title)) { IBusText *text; text = ibus_text_new_from_string (status); ibus_property_set_label (m17n->status_prop, text); ibus_property_set_visible (m17n->status_prop, TRUE); } else { ibus_property_set_label (m17n->status_prop, NULL); ibus_property_set_visible (m17n->status_prop, FALSE); } ibus_engine_update_property ((IBusEngine *)m17n, m17n->status_prop); g_free (status); } else if (command == Minput_status_done) { } else if (command == Minput_candidates_start) { ibus_engine_hide_lookup_table ((IBusEngine *) m17n); ibus_engine_hide_auxiliary_text ((IBusEngine *) m17n); } else if (command == Minput_candidates_draw) { ibus_m17n_engine_update_lookup_table (m17n); } else if (command == Minput_candidates_done) { ibus_engine_hide_lookup_table ((IBusEngine *) m17n); ibus_engine_hide_auxiliary_text ((IBusEngine *) m17n); } else if (command == Minput_set_spot) { } else if (command == Minput_toggle) { } else if (command == Minput_reset) { } else if (command == Minput_get_surrounding_text && (((IBusEngine *) m17n)->client_capabilities & IBUS_CAP_SURROUNDING_TEXT) != 0) { IBusText *text; guint cursor_pos, anchor_pos, nchars, nbytes; MText *mt, *surround; int len, pos; ibus_engine_get_surrounding_text ((IBusEngine *) m17n, &text, &cursor_pos, &anchor_pos); nchars = ibus_text_get_length (text); nbytes = g_utf8_offset_to_pointer (text->text, nchars) - text->text; mt = mconv_decode_buffer (Mcoding_utf_8, (const unsigned char *) text->text, nbytes); g_object_unref (text); len = (long) mplist_value (m17n->context->plist); if (len < 0) { pos = cursor_pos + len; if (pos < 0) pos = 0; surround = mtext_duplicate (mt, pos, cursor_pos); } else if (len > 0) { pos = cursor_pos + len; if (pos > nchars) pos = nchars; surround = mtext_duplicate (mt, cursor_pos, pos); } else { surround = mtext (); } m17n_object_unref (mt); mplist_set (m17n->context->plist, Mtext, surround); m17n_object_unref (surround); } else if (command == Minput_delete_surrounding_text && (((IBusEngine *) m17n)->client_capabilities & IBUS_CAP_SURROUNDING_TEXT) != 0) { int len; len = (long) mplist_value (m17n->context->plist); if (len < 0) ibus_engine_delete_surrounding_text ((IBusEngine *) m17n, len, -len); else if (len > 0) ibus_engine_delete_surrounding_text ((IBusEngine *) m17n, 0, len); } } ibus-m17n-1.4.9/src/engine.h000066400000000000000000000002361417147325300154640ustar00rootroot00000000000000/* vim:set et sts=4: */ #ifndef __ENGINE_H__ #define __ENGINE_H__ #include GType ibus_m17n_engine_get_type_for_name (const gchar *name); #endif ibus-m17n-1.4.9/src/ibus-m17n-preferences.ui000066400000000000000000000465261417147325300204420ustar00rootroot00000000000000 System 2 Vertical 1 Horizontal 0 Single 1 Double 2 Low 3 None 0 400 False 5 Preferences center-always gtk-preferences normal True False 2 True False end gtk-close True True True True True True True True False False 0 False True end 0 True True True False 12 12 12 12 True False True False 0 none True False 6 12 True False 3 2 True True True #000000000000 1 2 True True True #000000000000 1 2 1 2 True False liststore_underline 1 2 2 3 Foreground: True True False True Background: True True False True 1 2 True False Underline: 2 3 True False <b>Pre-edit Appearance</b> True True True 0 True False 0 none True False 12 True False 2 2 True False 0.46000000834465027 Lookup Table Orientation: True False liststore_orientation 1 2 Use US keyboard layout True True False True 2 1 2 True False <b>Other</b> True True True 1 True False General False True False 12 12 12 12 True False 0 none True False 6 12 True True automatic automatic True True True both True False <b>m17n-lib Configuration</b> True 1 True False Advanced 1 False True True 1 buttonClose ibus-m17n-1.4.9/src/ibus-setup-m17n.desktop.in.in000066400000000000000000000002321417147325300213270ustar00rootroot00000000000000[Desktop Entry] Name=IBus M17N Setup Comment=Set up IBus M17N engine Exec=@libexecdir@/ibus-setup-m17n NoDisplay=true Type=Application StartupNotify=true ibus-m17n-1.4.9/src/m17n.xml.in000066400000000000000000000011541417147325300157570ustar00rootroot00000000000000 org.freedesktop.IBus.M17N M17N Component @libexecdir@/ibus-engine-m17n --ibus @VERSION@ Peng Huang <shawn.p.huang@gmail.com> GPL http://code.google.com/p/ibus ibus-m17n /usr/share/m17n/ @pkgdatadir@/default.xml ~/.m17n.d/ ibus-m17n-1.4.9/src/m17nutil.c000066400000000000000000000301771417147325300157010ustar00rootroot00000000000000/* vim:set et sts=4: */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "m17nutil.h" #define N_(text) text static MConverter *utf8_converter = NULL; #define DEFAULT_XML (PKGDATADIR "/default.xml") typedef enum { ENGINE_CONFIG_RANK_MASK = 1 << 0, ENGINE_CONFIG_SYMBOL_MASK = 1 << 1, ENGINE_CONFIG_LONGNAME_MASK = 1 << 2, ENGINE_CONFIG_LAYOUT_MASK = 1 << 3, ENGINE_CONFIG_PREEDIT_HIGHLIGHT_MASK = 1 << 4 } EngineConfigMask; struct _EngineConfigNode { gchar *name; EngineConfigMask mask; IBusM17NEngineConfig config; }; typedef struct _EngineConfigNode EngineConfigNode; static GSList *config_list = NULL; void ibus_m17n_init_common (void) { M17N_INIT (); if (utf8_converter == NULL) { utf8_converter = mconv_buffer_converter (Mcoding_utf_8, NULL, 0); } } gchar * ibus_m17n_mtext_to_utf8 (MText *text) { gint bufsize; gchar *buf; if (text == NULL) return NULL; mconv_reset_converter (utf8_converter); bufsize = (mtext_len (text) + 1) * 6; buf = (gchar *) g_malloc (bufsize); mconv_rebind_buffer (utf8_converter, (const unsigned char *) buf, bufsize); mconv_encode (utf8_converter, text); buf [utf8_converter->nbytes] = 0; return buf; } gunichar * ibus_m17n_mtext_to_ucs4 (MText *text, glong *nchars) { glong bufsize; gchar *buf; gunichar *ucs; if (text == NULL) return NULL; mconv_reset_converter (utf8_converter); bufsize = (mtext_len (text) + 1) * 6; buf = (gchar *) g_malloc (bufsize); mconv_rebind_buffer (utf8_converter, (const unsigned char *) buf, bufsize); if (mconv_encode (utf8_converter, text) < 0) { g_free (buf); return NULL; } ucs = g_utf8_to_ucs4_fast (buf, bufsize, nchars); g_free (buf); return ucs; } guint ibus_m17n_parse_color (const gchar *hex) { guint color; if (!hex || *hex != '#') return (guint)-1; errno = 0; color = strtoul (&hex[1], NULL, 16); if ((errno == ERANGE && color == ULONG_MAX) || (errno != 0 && color == 0)) return (guint)-1; return color; } static IBusEngineDesc * ibus_m17n_engine_new (MSymbol lang, MSymbol name, MText *title, MText *icon, MText *desc, IBusM17NEngineConfig *config) { IBusEngineDesc *engine; gchar *engine_name; gchar *engine_longname; gchar *engine_title; gchar *engine_icon; gchar *engine_desc; gchar *engine_setup; engine_name = g_strdup_printf ("m17n:%s:%s", msymbol_name (lang), msymbol_name (name)); engine_longname = g_strdup_printf ("%s (m17n)", msymbol_name (name)); engine_title = ibus_m17n_mtext_to_utf8 (title); engine_icon = ibus_m17n_mtext_to_utf8 (icon); engine_desc = ibus_m17n_mtext_to_utf8 (desc); engine_setup = g_strdup_printf ("%s/ibus-setup-m17n --name %s", LIBEXECDIR, engine_name); engine = ibus_engine_desc_new_varargs ("name", engine_name, "longname", config->longname ? config->longname : engine_longname, "description", engine_desc ? engine_desc : "", "language", msymbol_name (lang), "license", "GPL", "icon", engine_icon ? engine_icon : "", "layout", config->layout ? config->layout : "default", "rank", config->rank, "symbol", config->symbol ? config->symbol : "", "setup", engine_setup, NULL); g_free (engine_name); g_free (engine_longname); g_free (engine_title); g_free (engine_icon); g_free (engine_desc); g_free (engine_setup); return engine; } #ifndef HAVE_MINPUT_LIST MPlist *minput_list (MSymbol language); #endif /* !HAVE_MINPUT_LIST */ GList * ibus_m17n_list_engines (void) { GList *engines = NULL; MPlist *imlist; MPlist *elm; imlist = minput_list (Mnil); for (elm = imlist; elm && mplist_key(elm) != Mnil; elm = mplist_next(elm)) { MSymbol lang; MSymbol name; MSymbol sane; MText *title = NULL; MText *icon = NULL; MText *desc = NULL; MPlist *l; gchar *engine_name; IBusM17NEngineConfig *config; l = mplist_value (elm); lang = mplist_value (l); l = mplist_next (l); name = mplist_value (l); l = mplist_next (l); sane = mplist_value (l); if (sane == Mt) { /* ignore input-method explicitly blacklisted in default.xml */ engine_name = g_strdup_printf ("m17n:%s:%s", msymbol_name (lang), msymbol_name (name)); config = ibus_m17n_get_engine_config (engine_name); if (config == NULL) { g_warning ("can't load config for %s", engine_name); g_free (engine_name); continue; } if (config->rank < 0) { g_log ("ibus-m17n", G_LOG_LEVEL_MESSAGE, "skipped %s since its rank is lower than 0", engine_name); g_free (engine_name); continue; } g_free (engine_name); l = minput_get_variable (lang, name, msymbol ("candidates-charset")); if (l) { /* check candidates encoding */ MPlist *sl; MSymbol varcharset; sl = mplist_value (l); /* L = (VAR-NAME DESCRIPTION 'nil' VALUE) */ sl = mplist_next (sl); sl = mplist_next (sl); sl = mplist_next (sl); varcharset = mplist_value (sl); if (varcharset != Mcoding_utf_8 || varcharset != Mcoding_utf_8_full) { /* g_debug ("%s != %s or %s", msymbol_name (varcharset), msymbol_name (Mcoding_utf_8), msymbol_name (Mcoding_utf_8_full)); */ continue; } } if (l) m17n_object_unref (l); desc = minput_get_description (lang, name); l = minput_get_title_icon (lang, name); if (l && mplist_key (l) == Mtext) { title = mplist_value (l); } MPlist *n = mplist_next (l); if (n && mplist_key (n) == Mtext) { icon = mplist_value (n); } engines = g_list_append (engines, ibus_m17n_engine_new (lang, name, title, icon, desc, config)); if (desc) m17n_object_unref (desc); m17n_object_unref (l); } } if (imlist) { m17n_object_unref (imlist); } return engines; } IBusM17NEngineConfig * ibus_m17n_get_engine_config (const gchar *engine_name) { IBusM17NEngineConfig *config = g_slice_new0 (IBusM17NEngineConfig); GSList *p; for (p = config_list; p != NULL; p = p->next) { EngineConfigNode *cnode = p->data; if (g_pattern_match_simple (cnode->name, engine_name)) { if (cnode->mask & ENGINE_CONFIG_RANK_MASK) config->rank = cnode->config.rank; if (cnode->mask & ENGINE_CONFIG_SYMBOL_MASK) config->symbol = cnode->config.symbol; if (cnode->mask & ENGINE_CONFIG_LONGNAME_MASK) config->longname = cnode->config.longname; if (cnode->mask & ENGINE_CONFIG_LAYOUT_MASK) config->layout = cnode->config.layout; if (cnode->mask & ENGINE_CONFIG_PREEDIT_HIGHLIGHT_MASK) config->preedit_highlight = cnode->config.preedit_highlight; } } return config; } void ibus_m17n_engine_config_free (IBusM17NEngineConfig *config) { g_slice_free (IBusM17NEngineConfig, config); } static gboolean ibus_m17n_engine_config_parse_xml_node (EngineConfigNode *cnode, XMLNode *node) { GList *p; for (p = node->sub_nodes; p != NULL; p = p->next) { XMLNode *sub_node = (XMLNode *) p->data; if (g_strcmp0 (sub_node->name, "name") == 0) { g_free (cnode->name); cnode->name = g_strdup (sub_node->text); continue; } if (g_strcmp0 (sub_node->name , "rank") == 0) { cnode->config.rank = atoi (sub_node->text); cnode->mask |= ENGINE_CONFIG_RANK_MASK; continue; } if (g_strcmp0 (sub_node->name , "symbol") == 0) { cnode->config.symbol = g_strdup (sub_node->text); cnode->mask |= ENGINE_CONFIG_SYMBOL_MASK; continue; } if (g_strcmp0 (sub_node->name , "longname") == 0) { cnode->config.longname = g_strdup (sub_node->text); cnode->mask |= ENGINE_CONFIG_LONGNAME_MASK; continue; } if (g_strcmp0 (sub_node->name , "layout") == 0) { g_free (cnode->config.layout); cnode->config.layout = g_strdup (sub_node->text); cnode->mask |= ENGINE_CONFIG_LAYOUT_MASK; continue; } if (g_strcmp0 (sub_node->name , "preedit-highlight") == 0) { if (g_ascii_strcasecmp ("TRUE", sub_node->text) == 0) cnode->config.preedit_highlight = TRUE; else if (g_ascii_strcasecmp ("FALSE", sub_node->text) != 0) g_warning ("<%s> element contains invalid boolean value %s", sub_node->name, sub_node->text); cnode->mask |= ENGINE_CONFIG_PREEDIT_HIGHLIGHT_MASK; continue; } g_warning (" element contains invalid element <%s>", sub_node->name); } return TRUE; } IBusComponent * ibus_m17n_get_component (void) { GList *engines, *p; IBusComponent *component; XMLNode *node; const gchar *pkgdatadir; gchar *default_xml; component = ibus_component_new ("org.freedesktop.IBus.M17n", N_("M17N"), PACKAGE_VERSION, "GPL", "Peng Huang ", "http://code.google.com/p/ibus/", "", PACKAGE_NAME); pkgdatadir = g_getenv ("IBUS_M17N_PKGDATADIR"); if (pkgdatadir == NULL) pkgdatadir = PKGDATADIR; default_xml = g_build_filename (pkgdatadir, "default.xml", NULL); node = ibus_xml_parse_file (default_xml); if (node && g_strcmp0 (node->name, "engines") == 0) { for (p = node->sub_nodes; p != NULL; p = p->next) { XMLNode *sub_node = p->data; EngineConfigNode *cnode; if (g_strcmp0 (sub_node->name, "engine") != 0) { g_warning (" element contains invalid element <%s>", sub_node->name); continue; } cnode = g_slice_new0 (EngineConfigNode); if (!ibus_m17n_engine_config_parse_xml_node (cnode, sub_node)) { g_slice_free (EngineConfigNode, cnode); continue; } config_list = g_slist_prepend (config_list, cnode); } config_list = g_slist_reverse (config_list); } else g_warning ("failed to parse %s", default_xml); if (node) ibus_xml_free (node); g_free (default_xml); engines = ibus_m17n_list_engines (); for (p = engines; p != NULL; p = p->next) ibus_component_add_engine (component, p->data); g_list_free (engines); return component; } ibus-m17n-1.4.9/src/m17nutil.h000066400000000000000000000023411417147325300156760ustar00rootroot00000000000000/* vim:set et sts=4: */ #ifndef __M17NUTIL_H__ #define __M17NUTIL_H__ #include #include #define INVALID_COLOR ((guint)-1) /* default configuration */ #define PREEDIT_FOREGROUND 0x00000000 #define PREEDIT_BACKGROUND 0x00c8c8f0 struct _IBusM17NEngineConfig { /* engine rank */ gint rank; /* symbol */ gchar *symbol; /* overridding longname shown on panel */ gchar *longname; /* keyboard layout */ gchar *layout; /* whether to highlight preedit */ gboolean preedit_highlight; }; typedef struct _IBusM17NEngineConfig IBusM17NEngineConfig; void ibus_m17n_init_common (void); void ibus_m17n_init (IBusBus *bus); GList *ibus_m17n_list_engines (void); IBusComponent *ibus_m17n_get_component (void); gchar *ibus_m17n_mtext_to_utf8 (MText *text); gunichar *ibus_m17n_mtext_to_ucs4 (MText *text, glong *nchars); guint ibus_m17n_parse_color (const gchar *hex); IBusM17NEngineConfig *ibus_m17n_get_engine_config (const gchar *engine_name); void ibus_m17n_engine_config_free (IBusM17NEngineConfig *config); #endif ibus-m17n-1.4.9/src/main.c000066400000000000000000000056161417147325300151450ustar00rootroot00000000000000/* vim:set et sts=4: */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "engine.h" #include "m17nutil.h" static IBusBus *bus = NULL; static IBusFactory *factory = NULL; /* options */ static gboolean xml = FALSE; static gboolean ibus = FALSE; static gboolean verbose = FALSE; static const GOptionEntry entries[] = { { "xml", 'x', 0, G_OPTION_ARG_NONE, &xml, "generate xml for engines", NULL }, { "ibus", 'i', 0, G_OPTION_ARG_NONE, &ibus, "component is executed by ibus", NULL }, { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "verbose", NULL }, { NULL }, }; static void ibus_disconnected_cb (IBusBus *bus, gpointer user_data) { g_debug ("bus disconnected"); ibus_quit (); } static void start_component (void) { GList *engines, *p; IBusComponent *component; ibus_init (); bus = ibus_bus_new (); g_signal_connect (bus, "disconnected", G_CALLBACK (ibus_disconnected_cb), NULL); ibus_m17n_init (bus); component = ibus_m17n_get_component (); factory = ibus_factory_new (ibus_bus_get_connection (bus)); engines = ibus_component_get_engines (component); for (p = engines; p != NULL; p = p->next) { IBusEngineDesc *engine = (IBusEngineDesc *)p->data; #if IBUS_CHECK_VERSION(1,3,99) const gchar *engine_name = ibus_engine_desc_get_name (engine); #else const gchar *engine_name = engine->name; #endif /* !IBUS_CHECK_VERSION(1,3,99) */ GType type = ibus_m17n_engine_get_type_for_name (engine_name); if (type == G_TYPE_INVALID) { g_debug ("Can not create engine type for %s", engine_name); continue; } ibus_factory_add_engine (factory, engine_name, type); } if (ibus) { ibus_bus_request_name (bus, "org.freedesktop.IBus.M17N", 0); } else { ibus_bus_register_component (bus, component); } g_object_unref (component); ibus_main (); } static void print_engines_xml (void) { IBusComponent *component; GString *output; ibus_init (); ibus_m17n_init_common (); component = ibus_m17n_get_component (); output = g_string_new (""); ibus_component_output_engines (component, output, 0); fprintf (stdout, "%s", output->str); g_string_free (output, TRUE); } int main (gint argc, gchar **argv) { GError *error = NULL; GOptionContext *context; setlocale (LC_ALL, ""); context = g_option_context_new ("- ibus M17N engine component"); g_option_context_add_main_entries (context, entries, "ibus-m17n"); if (!g_option_context_parse (context, &argc, &argv, &error)) { g_print ("Option parsing failed: %s\n", error->message); g_error_free (error); exit (EXIT_FAILURE); } if (xml) { print_engines_xml (); exit (EXIT_SUCCESS); } start_component (); return 0; } ibus-m17n-1.4.9/src/minput_list.c000066400000000000000000000017701417147325300165650ustar00rootroot00000000000000/* replacement of minput_list, which is available in m17n-lib 1.6.2+ (CVS) */ #ifdef HAVE_CONFIG_H #include #endif #include MPlist * minput_list (MSymbol language) { MPlist *imlist; MPlist *elm; MPlist *plist; plist = mplist (); imlist = mdatabase_list(msymbol("input-method"), language, Mnil, Mnil); for (elm = imlist; elm && mplist_key(elm) != Mnil; elm = mplist_next(elm)) { MDatabase *mdb = (MDatabase *) mplist_value(elm); MSymbol *tag = mdatabase_tag(mdb); MSymbol lang = tag[1]; MSymbol name = tag[2]; MPlist *l; l = mplist (); mplist_add (l, Msymbol, lang); mplist_add (l, Msymbol, name); if (tag[1] != Mnil && tag[2] != Mnil) { mplist_add (l, Msymbol, Mt); } else { mplist_add (l, Msymbol, Mnil); } mplist_add (plist, Mplist, l); m17n_object_unref (l); } if (imlist) m17n_object_unref (imlist); return plist; } ibus-m17n-1.4.9/src/org.freedesktop.ibus.engine.m17n.gschema.xml000066400000000000000000000010541417147325300242640ustar00rootroot00000000000000 2 'none' 'none' 0 false ibus-m17n-1.4.9/src/setup.c000066400000000000000000000507271417147325300153640ustar00rootroot00000000000000/* vim:set et sts=4: */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include "m17nutil.h" enum { COLUMN_KEY, COLUMN_VALUE, COLUMN_DESCRIPTION, NUM_COLS }; struct _SetupDialog { GtkWidget *dialog; GtkWidget *combobox_underline; GtkWidget *combobox_orientation; GtkWidget *checkbutton_foreground; GtkWidget *colorbutton_foreground; GtkWidget *checkbutton_background; GtkWidget *colorbutton_background; GtkWidget *checkbutton_use_us_layout; GtkWidget *treeview; GtkListStore *store; MSymbol lang; MSymbol name; GSettings *gsettings; }; typedef struct _SetupDialog SetupDialog; static gchar *opt_name = NULL; static const GOptionEntry options[] = { {"name", '\0', 0, G_OPTION_ARG_STRING, &opt_name, "IBus engine name like \"m17n:si:wijesekera\"."}, {NULL} }; static gchar * format_m17n_value (MPlist *plist) { if (mplist_key (plist) == Msymbol) return g_strdup (msymbol_name ((MSymbol) mplist_value (plist))); if (mplist_key (plist) == Mtext) return g_strdup (mtext_data ((MText *) mplist_value (plist), NULL, NULL, NULL, NULL)); if (mplist_key (plist) == Minteger) return g_strdup_printf ("%d", (gint) (long) mplist_value (plist)); return NULL; } static MPlist * parse_m17n_value (MPlist *plist, gchar *text) { MPlist *value; if (mplist_key (plist) == Msymbol) { value = mplist (); mplist_add (value, Msymbol, msymbol (text)); return value; } if (mplist_key (plist) == Mtext) { MText *mtext; mtext = mconv_decode_buffer (Mcoding_utf_8, (const unsigned char *) text, strlen (text)); value = mplist (); mplist_add (value, Mtext, mtext); return value; } if (mplist_key (plist) == Minteger) { long val; errno = 0; val = strtol (text, NULL, 10); if ((errno == ERANGE && (val == LONG_MAX || val == LONG_MIN)) || (errno != 0 && val == 0)) return NULL; value = mplist (); mplist_add (value, Minteger, (void *)val); return value; } return NULL; } static void insert_m17n_items (GtkListStore *store, MSymbol language, MSymbol name) { MPlist *plist; plist = minput_get_variable (language, name, Mnil); for (; plist && mplist_key (plist) == Mplist; plist = mplist_next (plist)) { GtkTreeIter iter; MSymbol key; MPlist *p, *mvalue; gchar *description, *value; p = mplist_value (plist); key = mplist_value (p); /* name */ p = mplist_next (p); /* description */ description = ibus_m17n_mtext_to_utf8 ((MText *) mplist_value (p)); p = mplist_next (p); /* status */ mvalue = mplist_next (p); value = format_m17n_value (mvalue); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, COLUMN_KEY, msymbol_name (key), COLUMN_DESCRIPTION, description, COLUMN_VALUE, value, -1); g_free (description); g_free (value); } } static gboolean on_query_tooltip (GtkWidget *widget, gint x, gint y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer user_data) { GtkTreeView *treeview = GTK_TREE_VIEW (widget); GtkTreeModel *model = gtk_tree_view_get_model (treeview); GtkTreePath *path = NULL; GtkTreeIter iter; gchar *description; if (!gtk_tree_view_get_tooltip_context (treeview, &x, &y, keyboard_tip, &model, &path, &iter)) return FALSE; gtk_tree_model_get (model, &iter, COLUMN_DESCRIPTION, &description, -1); gtk_tooltip_set_text (tooltip, description); gtk_tree_view_set_tooltip_row (treeview, tooltip, path); gtk_tree_path_free (path); g_free (description); return TRUE; } static void on_edited (GtkCellRendererText *cell, gchar *path_string, gchar *new_text, gpointer data) { SetupDialog *dialog = data; GtkTreeModel *model = GTK_TREE_MODEL (dialog->store); GtkTreeIter iter; GtkTreePath *path = gtk_tree_path_new_from_string (path_string); gtk_tree_model_get_iter (model, &iter, path); gtk_list_store_set (dialog->store, &iter, COLUMN_VALUE, new_text, -1); gtk_tree_path_free (path); } static void toggle_colorbutton_sensitive (GtkToggleButton *togglebutton, GtkWidget *colorbutton) { if (gtk_toggle_button_get_active (togglebutton)) gtk_widget_set_sensitive (colorbutton, TRUE); else gtk_widget_set_sensitive (colorbutton, FALSE); } static void on_foreground_toggled (GtkToggleButton *togglebutton, gpointer user_data) { SetupDialog *dialog = user_data; toggle_colorbutton_sensitive (togglebutton, dialog->colorbutton_foreground); } static void on_background_toggled (GtkToggleButton *togglebutton, gpointer user_data) { SetupDialog *dialog = user_data; toggle_colorbutton_sensitive (togglebutton, dialog->colorbutton_background); } static gint get_combo_box_index_by_value (GtkComboBox *combobox, gint value) { GtkTreeModel *model; GtkTreeIter iter; gint index; index = 0; model = gtk_combo_box_get_model (combobox); if (!gtk_tree_model_get_iter_first (model, &iter)) return -1; do { gint _value; gtk_tree_model_get (model, &iter, COLUMN_VALUE, &_value, -1); if (_value == value) return index; index++; } while (gtk_tree_model_iter_next (model, &iter)); return -1; } #if GTK_CHECK_VERSION(3,0,0) static void _gdk_rgba_from_uint (GdkRGBA *rgba, guint color) { rgba->red = ((color >> 8) & 0xFF00) / 65535.; rgba->green = (color & 0xFF00) / 65535.; rgba->blue = ((color & 0xFF) << 8) / 65535.; rgba->alpha = 1.0; } static gchar * _gdk_rgba_to_string (GdkRGBA *rgba) { return g_strdup_printf ("#%02X%02X%02X", (gint) (rgba->red * 255), (gint) (rgba->green * 255), (gint) (rgba->blue * 255)); } static void set_color_string (GtkColorButton *colorbutton, const gchar *color) { GdkRGBA rgba; gdk_rgba_parse (&rgba, color); gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (colorbutton), &rgba); } static void set_color_uint (GtkColorButton *colorbutton, guint color) { GdkRGBA rgba; _gdk_rgba_from_uint (&rgba, color); gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (colorbutton), &rgba); } static gchar * get_color_string (GtkColorButton *colorbutton) { GdkRGBA rgba; gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (colorbutton), &rgba); return _gdk_rgba_to_string (&rgba); } #else static void _gdk_color_from_uint (GdkColor *color_gdk, guint color) { color_gdk->pixel = 0; color_gdk->red = (color >> 8) & 0xFF00; color_gdk->green = color & 0xFF00; color_gdk->blue = (color & 0xFF) << 8; } static gchar * _gdk_color_to_string (GdkColor *color) { return g_strdup_printf ("#%02X%02X%02X", (color->red & 0xFF00) >> 8, (color->green & 0xFF00) >> 8, (color->blue & 0xFF00) >> 8); } static void set_color_string (GtkColorButton *colorbutton, const gchar *color) { GdkColor cvalue; gdk_color_parse (color, &cvalue); gtk_color_button_set_color (GTK_COLOR_BUTTON (colorbutton), &cvalue); } static void set_color_uint (GtkColorButton *colorbutton, guint color) { GdkColor cvalue; _gdk_color_from_uint (&cvalue, color); gtk_color_button_set_color (GTK_COLOR_BUTTON (colorbutton), &cvalue); } static gchar * get_color_string (GtkColorButton *colorbutton) { GdkColor color; gtk_color_button_get_color (colorbutton, &color); return _gdk_color_to_string (&color); } #endif static void load_color (GSettings *gsettings, GtkToggleButton *togglebutton, GtkColorButton *colorbutton, const gchar *key, guint defcol) { GVariant *value; gboolean bvalue; bvalue = FALSE; value = g_settings_get_value (gsettings, key); if (value != NULL) { const gchar *svalue = g_variant_get_string (value, NULL); if (g_strcmp0 (svalue, "none") != 0) { set_color_string (colorbutton, svalue); bvalue = TRUE; } g_variant_unref (value); } if (!bvalue) { set_color_uint (colorbutton, defcol); } gtk_toggle_button_set_active (togglebutton, bvalue); gtk_widget_set_sensitive (GTK_WIDGET (colorbutton), bvalue); } static void load_choice (GSettings *gsettings, GtkComboBox *combo, const gchar *key, gint defval) { GVariant *value; gint ivalue, index; GtkCellRenderer *renderer; renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), renderer, "text", 0, NULL); ivalue = defval; value = g_settings_get_value (gsettings, key); if (value != NULL) { ivalue = g_variant_get_int32 (value); g_variant_unref (value); } index = get_combo_box_index_by_value (GTK_COMBO_BOX (combo), ivalue); gtk_combo_box_set_active (GTK_COMBO_BOX (combo), index); } static void load_toggle (GSettings *gsettings, GtkToggleButton *togglebutton, const gchar *key, gboolean defval) { GVariant *value; gboolean bvalue; bvalue = defval; value = g_settings_get_value (gsettings, key); if (value != NULL) { bvalue = g_variant_get_boolean (value); g_variant_unref (value); } gtk_toggle_button_set_active (togglebutton, bvalue); } static void setup_dialog_load_config (SetupDialog *dialog) { GtkCellRenderer *renderer; /* General -> Pre-edit Appearance */ /* foreground color of pre-edit buffer */ load_color (dialog->gsettings, GTK_TOGGLE_BUTTON (dialog->checkbutton_foreground), GTK_COLOR_BUTTON (dialog->colorbutton_foreground), "preedit-foreground", PREEDIT_FOREGROUND); g_signal_connect (dialog->checkbutton_foreground, "toggled", G_CALLBACK (on_foreground_toggled), dialog); /* background color of pre-edit buffer */ load_color (dialog->gsettings, GTK_TOGGLE_BUTTON (dialog->checkbutton_background), GTK_COLOR_BUTTON (dialog->colorbutton_background), "preedit-background", PREEDIT_BACKGROUND); g_signal_connect (dialog->checkbutton_background, "toggled", G_CALLBACK (on_background_toggled), dialog); /* underline of pre-edit buffer */ load_choice (dialog->gsettings, GTK_COMBO_BOX (dialog->combobox_underline), "preedit-underline", IBUS_ATTR_UNDERLINE_NONE); /* General -> Other */ /* lookup table orientation */ load_choice (dialog->gsettings, GTK_COMBO_BOX (dialog->combobox_orientation), "lookup-table-orientation", IBUS_ORIENTATION_SYSTEM); /* Use US keyboard layout */ load_toggle (dialog->gsettings, GTK_TOGGLE_BUTTON (dialog->checkbutton_use_us_layout), "use-us-layout", FALSE); /* Advanced -> m17n-lib configuration */ dialog->store = gtk_list_store_new (NUM_COLS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); insert_m17n_items (dialog->store, dialog->lang, dialog->name); gtk_tree_view_set_model (GTK_TREE_VIEW (dialog->treeview), GTK_TREE_MODEL (dialog->store)); renderer = gtk_cell_renderer_text_new (); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (dialog->treeview), -1, "Key", renderer, "text", COLUMN_KEY, NULL); renderer = gtk_cell_renderer_text_new (); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (dialog->treeview), -1, "Value", renderer, "text", COLUMN_VALUE, NULL); g_object_set (renderer, "editable", TRUE, NULL); g_signal_connect (renderer, "edited", G_CALLBACK (on_edited), dialog); g_signal_connect (dialog->treeview, "query-tooltip", G_CALLBACK (on_query_tooltip), NULL); } static void save_color (SetupDialog *dialog, GtkToggleButton *togglebutton, GtkColorButton *colorbutton, const gchar *key) { GVariant *value; if (gtk_toggle_button_get_active (togglebutton)) { gchar *color = get_color_string (colorbutton); value = g_variant_new_string (color); g_free (color); } else { value = g_variant_new_string ("none"); } g_settings_set_value (dialog->gsettings, key, value); } static void save_choice (SetupDialog *dialog, GtkComboBox *combo, const gchar *key) { GtkTreeModel *model; GtkTreeIter iter; gint active; GVariant *value; model = gtk_combo_box_get_model (combo); gtk_combo_box_get_active_iter (combo, &iter); gtk_tree_model_get (model, &iter, COLUMN_VALUE, &active, -1); value = g_variant_new_int32 (active); g_settings_set_value (dialog->gsettings, key, value); } static void save_toggle (SetupDialog *dialog, GtkToggleButton *togglebutton, const gchar *key) { GVariant *value; value = g_variant_new_boolean (gtk_toggle_button_get_active (togglebutton)); g_settings_set_value (dialog->gsettings, key, value); } static gboolean save_m17n_options (SetupDialog *dialog) { GtkTreeModel *model = GTK_TREE_MODEL (dialog->store); GtkTreeIter iter; MPlist *plist, *p, *mvalue = NULL; gchar *key = NULL, *value = NULL; gboolean retval = TRUE; if (!gtk_tree_model_get_iter_first (model, &iter)) return FALSE; do { gtk_tree_model_get (model, &iter, COLUMN_KEY, &key, COLUMN_VALUE, &value, -1); plist = minput_get_variable (dialog->lang, dialog->name, msymbol (key)); if (!plist) { retval = FALSE; break; } p = mplist_next (mplist_next (mplist_next (mplist_value (plist)))); if (!p) { retval = FALSE; break; } mvalue = parse_m17n_value (p, value); if (!mvalue) { retval = FALSE; break; } if (minput_config_variable (dialog->lang, dialog->name, msymbol (key), mvalue) != 0) { retval = FALSE; break; } if (mvalue) m17n_object_unref (mvalue); g_free (key); g_free (value); mvalue = NULL; key = NULL; value = NULL; } while (gtk_tree_model_iter_next (model, &iter)); if (retval && minput_save_config () != 1) retval = FALSE; if (mvalue) m17n_object_unref (mvalue); g_free (key); g_free (value); return retval; } static void setup_dialog_save_config (SetupDialog *dialog) { save_color (dialog, GTK_TOGGLE_BUTTON (dialog->checkbutton_foreground), GTK_COLOR_BUTTON (dialog->colorbutton_foreground), "preedit-foreground"); save_color (dialog, GTK_TOGGLE_BUTTON (dialog->checkbutton_background), GTK_COLOR_BUTTON (dialog->colorbutton_background), "preedit-background"); save_choice (dialog, GTK_COMBO_BOX (dialog->combobox_underline), "preedit-underline"); save_choice (dialog, GTK_COMBO_BOX (dialog->combobox_orientation), "lookup-table-orientation"); save_toggle (dialog, GTK_TOGGLE_BUTTON (dialog->checkbutton_use_us_layout), "use-us-layout"); save_m17n_options (dialog); g_settings_sync(); } static SetupDialog * setup_dialog_new (MSymbol lang, MSymbol name) { GtkBuilder *builder; SetupDialog *dialog; GObject *object; GError *error; dialog = g_slice_new0 (SetupDialog); dialog->lang = lang; dialog->name = name; dialog->gsettings = g_settings_new_with_path( "org.freedesktop.ibus.engine.m17n", g_strdup_printf ("/org/freedesktop/ibus/engine/m17n/%s/%s/", msymbol_name (lang), msymbol_name (name))); builder = gtk_builder_new (); gtk_builder_set_translation_domain (builder, "ibus-m17n"); error = NULL; if (gtk_builder_add_from_file (builder, PKGDATADIR "/setup/ibus-m17n-preferences.ui", &error) == 0) { g_warning ("can't read ibus-m17n-preferences.ui: %s", error->message); g_error_free (error); g_return_val_if_reached (NULL); } object = gtk_builder_get_object (builder, "dialog"); dialog->dialog = GTK_WIDGET (object); object = gtk_builder_get_object (builder, "checkbutton_foreground"); dialog->checkbutton_foreground = GTK_WIDGET (object); object = gtk_builder_get_object (builder, "colorbutton_foreground"); dialog->colorbutton_foreground = GTK_WIDGET (object); object = gtk_builder_get_object (builder, "checkbutton_background"); dialog->checkbutton_background = GTK_WIDGET (object); object = gtk_builder_get_object (builder, "colorbutton_background"); dialog->colorbutton_background = GTK_WIDGET (object); object = gtk_builder_get_object (builder, "combobox_underline"); dialog->combobox_underline = GTK_WIDGET (object); object = gtk_builder_get_object (builder, "combobox_orientation"); dialog->combobox_orientation = GTK_WIDGET (object); object = gtk_builder_get_object (builder, "checkbutton_use_us_layout"); dialog->checkbutton_use_us_layout = GTK_WIDGET (object); object = gtk_builder_get_object (builder, "treeview_mim_config"); dialog->treeview = GTK_WIDGET (object); return dialog; } static void setup_dialog_free (SetupDialog *dialog) { gtk_widget_destroy (dialog->dialog); g_object_unref (dialog->gsettings); g_object_unref (dialog->store); g_slice_free (SetupDialog, dialog); } static void start (const gchar *engine_name) { gchar **strv; SetupDialog *dialog; ibus_init (); ibus_m17n_init_common (); strv = g_strsplit (engine_name, ":", 3); g_assert (g_strv_length (strv) == 3); g_assert (g_strcmp0 (strv[0], "m17n") == 0); /* strv == {"m17n", lang, name, NULL} */ dialog = setup_dialog_new (msymbol (strv[1]), msymbol (strv[2])); g_strfreev (strv); setup_dialog_load_config (dialog); gtk_window_present (GTK_WINDOW (dialog->dialog)); gtk_dialog_run (GTK_DIALOG (dialog->dialog)); setup_dialog_save_config (dialog); setup_dialog_free (dialog); M17N_FINI (); } int main (gint argc, gchar **argv) { GOptionContext *context; context = g_option_context_new ("ibus-setup-m17n"); g_option_context_add_main_entries (context, options, NULL); g_option_context_parse (context, &argc, &argv, NULL); g_option_context_free (context); gtk_init (&argc, &argv); if (!opt_name) { opt_name = (gchar *) g_getenv ("IBUS_ENGINE_NAME"); } if (!opt_name) { fprintf (stderr, "can't determine IBus engine name; use --name\n"); exit (1); } if (strncmp (opt_name, "m17n:", 5) != 0 || strchr (&opt_name[5], ':') == NULL) { fprintf (stderr, "wrong format of IBus engine name\n"); exit (1); } start (opt_name); return 0; } ibus-m17n-1.4.9/src/test.c000066400000000000000000000032461417147325300151750ustar00rootroot00000000000000/* vim:set et sts=4: */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "m17nutil.h" static void test_output_component (void) { IBusComponent *component; GString *output; component = ibus_m17n_get_component (); output = g_string_new (""); ibus_component_output (component, output, 1); g_debug ("\n%s", output->str); g_string_free (output, TRUE); g_object_unref (component); } static void test_engine_config (void) { IBusM17NEngineConfig *config; config = ibus_m17n_get_engine_config ("m17n:non:exsistent"); g_assert_cmpint (config->rank, ==, 0); g_assert_cmpint (config->preedit_highlight, ==, 0); ibus_m17n_engine_config_free (config); config = ibus_m17n_get_engine_config ("m17n:si:wijesekera"); g_assert_cmpint (config->rank, ==, 2); g_assert_cmpint (config->preedit_highlight, ==, 0); ibus_m17n_engine_config_free (config); config = ibus_m17n_get_engine_config ("m17n:si:phonetic-dynamic"); g_assert_cmpint (config->rank, ==, 1); g_assert_cmpint (config->preedit_highlight, ==, 0); ibus_m17n_engine_config_free (config); config = ibus_m17n_get_engine_config ("m17n:si:samanala"); g_assert_cmpint (config->rank, ==, 0); g_assert_cmpint (config->preedit_highlight, ==, 0); ibus_m17n_engine_config_free (config); } int main (int argc, char **argv) { setlocale (LC_ALL, ""); ibus_init (); ibus_m17n_init_common (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/test-m17n/output-component", test_output_component); g_test_add_func ("/test-m17n/engine-config", test_engine_config); return g_test_run (); }