ibus-chewing-1.4.10.1-Source/COPYING000664 001750 001750 00000043103 12266510632 017023 0ustar00dchendchen000000 000000 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-chewing-1.4.10.1-Source/src/generate-gconf-schemas.c000664 001750 001750 00000003513 12266510632 023231 0ustar00dchendchen000000 000000 #include "maker-dialog.h" #include "IBusChewingEngine-def.c" #include "ibus-chewing-util.h" static gint verbose=0; static gchar *schemasFilename=NULL; static gchar *localeStr=NULL; static const gchar localeDefault[]="C"; static const GOptionEntry entries[] = { { "verbose", 'v', 0, G_OPTION_ARG_INT, &verbose, "Verbose level. The higher the level, the more the debug messages.", "[integer]" }, { "locale", 'l', 0, G_OPTION_ARG_STRING, &localeStr, "Supported locale. Use ';' to separate locales.", "[str]" }, { NULL }, }; gboolean schemas_get_definition(){ MakerDialog *dialog=maker_dialog_new(); maker_dialog_set_verbose_level(dialog,verbose); int i; for (i=0; propSpecs[i].valueType!=G_TYPE_INVALID;i++){ maker_dialog_add_property_no_gui(dialog,&propSpecs[i],NULL); } gboolean ret=maker_dialog_write_gconf_schemas_file(dialog,schemasFilename, "ibus-chewing", "/desktop/ibus/engine/Chewing",localeStr); return ret; } int main (gint argc, gchar *argv[]) { GError *error = NULL; GOptionContext *context; g_type_init(); // gtk_init(&argc,&argv); /* Init i18n messages */ setlocale (LC_ALL, ""); bindtextdomain(quote_me(PROJECT_NAME), quote_me(DATA_DIR) "/locale"); textdomain(quote_me(PROJECT_NAME)); context = g_option_context_new("schemasFile"); g_option_context_add_main_entries (context, entries, "ibus-chewing"); if (!g_option_context_parse (context, &argc, &argv, &error)) { g_print ("Option parsing failed: %s\n", error->message); exit (-1); } g_option_context_free (context); if (!localeStr) localeStr=(gchar *)localeDefault; if (argc<2){ fprintf(stderr,"Specify filename of outputing schemas file!\n"); exit (-1); } schemasFilename=argv[1]; if (schemas_get_definition()){ exit(0); } exit(1); return 0; } ibus-chewing-1.4.10.1-Source/src/IBusChewingEngine-def.c000664 001750 001750 00000047060 12266510632 022762 0ustar00dchendchen000000 000000 const gchar *page_labels[]={ N_("Editing"), N_("Selecting"), N_("Keyboard"), NULL }; const gchar *button_labels[]={ GTK_STOCK_SAVE, NULL }; GtkResponseType button_responses[]={ GTK_RESPONSE_OK, }; const gchar *toneKeys[]={ "6347", //Default "jfds", //hsu "uiop", //ibm "zaq1", //gin-yieh "4321", //eten "kjfd", //eten26 "6347", //dvorak "thdn", //dvorak_hsu "yert", //dachen_26 "1234", //hanyu NULL }; const gchar *kbType_ids[]={ N_("default"), N_("hsu"), N_("ibm"), N_("gin_yieh"), N_("eten"), N_("eten26"), N_("dvorak"), N_("dvorak_hsu"), N_("dachen_26"), N_("hanyu"), NULL }; #define SELKEYS_ARRAY_SIZE 8 const gchar *selKeys_array[SELKEYS_ARRAY_SIZE+1]={ "1234567890", "asdfghjkl;", "asdfzxcv89", "asdfjkl789", "aoeu;qjkix", /* Dvorak */ "aoeuhtnsid", /* Dvorak */ "aoeuidhtns", /* Dvorak */ "1234qweras", NULL }; const gchar *syncCapsLock_strs[]={ NC_("Sync","disable"), NC_("Sync","keyboard"), NC_("Sync","input method"), NULL }; const gchar *outputCharsets[]={ N_("Auto"), N_("Big5"), N_("UTF8"), NULL }; const gchar *inputStyles[]={ N_("in application window"), N_("in candidate window"), NULL }; #ifdef IBUS_CHEWING_MAIN static ChewingKbType kbType_id_get_index(const gchar *kbType_id){ ChewingKbType i=0; for(i=0;kbType_ids[i]!=NULL;i++){ if (strcmp(kbType_id,kbType_ids[i])==0){ return i; } } return CHEWING_KBTYPE_INVALID; } #endif /*===== Callback functions =====*/ static void KBType_set_callback(PropertyContext *ctx, GValue *value){ #ifdef IBUS_CHEWING_MAIN ChewingKbType kbType=kbType_id_get_index(g_value_get_string(value)); IBusChewingEngine *engine=(IBusChewingEngine *) ctx->userData; chewing_set_KBType(engine->context,kbType); #endif } static void selKeys_set_callback(PropertyContext *ctx, GValue *value){ #ifdef IBUS_CHEWING_MAIN IBusChewingEngine *engine=(IBusChewingEngine *) ctx->userData; ibus_chewing_engine_set_selKeys_string(engine,g_value_get_string(value)); if (!engine->table){ engine->table=g_object_ref_sink(ibus_lookup_table_new(strlen(g_value_get_string(value)),0,FALSE,TRUE)); } ibus_chewing_engine_set_lookup_table_label(engine,g_value_get_string(value)); #endif } static void hsuSelKeyType_set_callback(PropertyContext *ctx, GValue *value){ #ifdef IBUS_CHEWING_MAIN IBusChewingEngine *engine=(IBusChewingEngine *) ctx->userData; chewing_set_hsuSelKeyType(engine->context,g_value_get_int(value)); #endif } static void autoShiftCur_set_callback(PropertyContext *ctx, GValue *value){ #ifdef IBUS_CHEWING_MAIN IBusChewingEngine *engine=(IBusChewingEngine *) ctx->userData; chewing_set_autoShiftCur(engine->context,(g_value_get_boolean(value)) ? 1: 0); #endif } static void addPhraseDirection_set_callback(PropertyContext *ctx, GValue *value){ #ifdef IBUS_CHEWING_MAIN IBusChewingEngine *engine=(IBusChewingEngine *) ctx->userData; chewing_set_addPhraseDirection(engine->context,(g_value_get_boolean(value)) ? 1: 0); #endif } static void easySymbolInput_set_callback(PropertyContext *ctx, GValue *value){ #ifdef IBUS_CHEWING_MAIN IBusChewingEngine *engine=(IBusChewingEngine *) ctx->userData; chewing_set_easySymbolInput(engine->context,(g_value_get_boolean(value)) ? 1: 0); if (g_value_get_boolean(value)){ engine->chewingFlags |= CHEWING_FLAG_EASY_SYMBOL_INPUT; }else{ engine->chewingFlags &= ~CHEWING_FLAG_EASY_SYMBOL_INPUT; } #endif } static void escCleanAllBuf_set_callback(PropertyContext *ctx, GValue *value){ #ifdef IBUS_CHEWING_MAIN IBusChewingEngine *engine=(IBusChewingEngine *) ctx->userData; chewing_set_escCleanAllBuf(engine->context,(g_value_get_boolean(value)) ? 1: 0); #endif } /* Additional symbol buffer length */ static void maxChiSymbolLen_set_callback(PropertyContext *ctx, GValue *value){ #ifdef IBUS_CHEWING_MAIN IBusChewingEngine *engine=(IBusChewingEngine *) ctx->userData; chewing_set_maxChiSymbolLen(engine->context,g_value_get_int(value)); #endif } static void forceLowercaseEnglish_set_callback(PropertyContext *ctx, GValue *value){ #ifdef IBUS_CHEWING_MAIN IBusChewingEngine *engine=(IBusChewingEngine *) ctx->userData; if (g_value_get_boolean(value)){ engine->chewingFlags |= CHEWING_FLAG_FORCE_LOWERCASE_ENGLISH; }else{ engine->chewingFlags &= ~CHEWING_FLAG_FORCE_LOWERCASE_ENGLISH; } #endif } static void syncCapsLock_set_callback(PropertyContext *ctx, GValue *value){ #ifdef IBUS_CHEWING_MAIN IBusChewingEngine *engine=(IBusChewingEngine *) ctx->userData; const gchar *str=g_value_get_string(value); if (strcmp(str,"keyboard")==0){ engine->syncCapsLock_local=CHEWING_MODIFIER_SYNC_FROM_KEYBOARD; }else if (strcmp(str,"input method")==0){ engine->syncCapsLock_local=CHEWING_MODIFIER_SYNC_FROM_IM; }else{ engine->syncCapsLock_local=CHEWING_MODIFIER_SYNC_DISABLE; } #endif } static void numpadAlwaysNumber_set_callback(PropertyContext *ctx, GValue *value){ #ifdef IBUS_CHEWING_MAIN IBusChewingEngine *engine=(IBusChewingEngine *) ctx->userData; if (g_value_get_boolean(value)){ engine->chewingFlags |= CHEWING_FLAG_NUMPAD_ALWAYS_NUMBER; }else{ engine->chewingFlags &= ~CHEWING_FLAG_NUMPAD_ALWAYS_NUMBER; } #endif } static void candPerPage_set_callback(PropertyContext *ctx, GValue *value){ #ifdef IBUS_CHEWING_MAIN IBusChewingEngine *engine=(IBusChewingEngine *) ctx->userData; chewing_set_candPerPage(engine->context,g_value_get_int(value)); if (engine->table){ ibus_lookup_table_clear(engine->table); engine->table->page_size=g_value_get_int(value); }else{ engine->table=g_object_ref_sink(ibus_lookup_table_new(g_value_get_int(value),0,FALSE,TRUE)); } #endif } static void phraseChoiceRearward_set_callback(PropertyContext *ctx, GValue *value){ #ifdef IBUS_CHEWING_MAIN IBusChewingEngine *engine=(IBusChewingEngine *) ctx->userData; chewing_set_phraseChoiceRearward(engine->context,(g_value_get_boolean(value)) ? 1: 0); #endif } static void spaceAsSelection_set_callback(PropertyContext *ctx, GValue *value){ #ifdef IBUS_CHEWING_MAIN IBusChewingEngine *engine=(IBusChewingEngine *) ctx->userData; chewing_set_spaceAsSelection(engine->context,(g_value_get_boolean(value)) ? 1: 0); #endif } static void plainZhuyin_set_callback(PropertyContext *ctx, GValue *value){ #ifdef IBUS_CHEWING_MAIN IBusChewingEngine *engine=(IBusChewingEngine *) ctx->userData; if (g_value_get_boolean(value)){ engine->chewingFlags |= CHEWING_FLAG_PLAIN_ZHUYIN; }else{ engine->chewingFlags &= ~CHEWING_FLAG_PLAIN_ZHUYIN; } #endif } /*===== End of Callback functions =====*/ PropertySpec propSpecs[]={ {G_TYPE_STRING, "KBType", "Keyboard", N_("Keyboard Type"), "default", kbType_ids, NULL, 0, 0, NULL, KBType_set_callback, MAKER_DIALOG_PROPERTY_FLAG_INEDITABLE | MAKER_DIALOG_PROPERTY_FLAG_HAS_TRANSLATION, 0, 0, N_("Select Zhuyin keyboard layout."), }, {G_TYPE_STRING, "selKeys", "Keyboard", N_("Selection keys"), "1234567890", selKeys_array, NULL, 0, 0, NULL, selKeys_set_callback, 0, 0, 0, N_("Keys used to select candidate. For example \"asdfghjkl;\", press 'a' to select the 1st candidate, 's' for 2nd, and so on."), }, {G_TYPE_INT, "hsuSelKeyType", "Keyboard", N_("Hsu's selection key"), "1", NULL, NULL, 1, 2, NULL, hsuSelKeyType_set_callback, 0, 0, 0, N_("Hsu's keyboard selection keys, 1 for asdfjkl789, 2 for asdfzxcv89 ."), }, {G_TYPE_BOOLEAN, "autoShiftCur", "Editing", N_("Auto move cursor"), "1", NULL, NULL, 0, 1, NULL, autoShiftCur_set_callback, 0, 0, 0, N_("Automatically move cursor to next character."), }, {G_TYPE_BOOLEAN, "addPhraseDirection", "Editing", N_("Add phrases in front"), "1", NULL, NULL, 0, 1, NULL, addPhraseDirection_set_callback, 0, 0, 0, N_("Add phrases in the front."), }, {G_TYPE_BOOLEAN, "easySymbolInput", "Editing", N_("Easy symbol input"), "1", NULL, NULL, 0, 1, NULL, easySymbolInput_set_callback, 0, 0, 0, N_("Easy symbol input."), }, {G_TYPE_BOOLEAN, "escCleanAllBuf", "Editing", N_("Esc clean all buffer"), "0", NULL, NULL, 0, 1, NULL, escCleanAllBuf_set_callback, 0, 0, 0, N_("Escape key cleans the text in pre-edit-buffer."), }, {G_TYPE_INT, "maxChiSymbolLen", "Editing", N_("Maximum Chinese characters"), "20", NULL, NULL, 8, 50, NULL, maxChiSymbolLen_set_callback, 0, 0, 0, N_("Maximum Chinese characters in pre-edit buffer, including inputing Zhuyin symbols"), }, {G_TYPE_BOOLEAN, "forceLowercaseEnglish", "Editing", N_("Force lowercase in En mode"), "0", NULL, NULL, 0, 1, NULL, forceLowercaseEnglish_set_callback, 0, 0, 0, N_("Ignore CapsLock status and input lowercase by default.\n\ It is handy if you wish to enter lowercase by default. Uppercase can still be inputted with Shift."), }, /* Sync between CapsLock and IM */ {G_TYPE_STRING, "syncCapsLock", "Editing", N_("Sync between CapsLock and IM"), "disable", syncCapsLock_strs, "Sync", 0, 1, NULL, syncCapsLock_set_callback, MAKER_DIALOG_PROPERTY_FLAG_INEDITABLE | MAKER_DIALOG_PROPERTY_FLAG_HAS_TRANSLATION | MAKER_DIALOG_PROPERTY_FLAG_TRANSLATION_WITH_CONTEXT, 0, 0, N_("Occasionally, the CapsLock status does not match the IM, \ this option determines how these status be synchronized. Valid values:\n\ \"disable\": Do nothing.\n\ \"keyboard\": IM status follows keyboard status.\n\ \"IM\": Keyboard status follows IM status."), }, {G_TYPE_BOOLEAN, "numpadAlwaysNumber", "Editing", N_("Number pad always input number"), "1", NULL, NULL, 0, 1, NULL, numpadAlwaysNumber_set_callback, 0, 0, 0, N_("Always input numbers when number keys from key pad is inputted."), }, {G_TYPE_BOOLEAN, "plainZhuyin", "Selecting", N_("Plain Zhuyin mode"), "0", NULL, NULL, 0, 1, NULL, plainZhuyin_set_callback, 0, 0, 0, N_("In plain Zhuyin mode, automatic candidate selection and related options are disabled or ignored."), }, {G_TYPE_INT, "candPerPage", "Selecting", N_("Candidate per page"), "10", NULL, NULL, 8, 10, NULL, candPerPage_set_callback, 0, 0, 0, N_("Number of candidate per page."), }, {G_TYPE_BOOLEAN, "phraseChoiceRearward", "Selecting", N_("Choose phrases from backward"), "1", NULL, NULL, 0, 1, NULL, phraseChoiceRearward_set_callback, 0, 0, 0, N_("Choose phrases from the back, without moving cursor."), }, {G_TYPE_BOOLEAN, "spaceAsSelection", "Selecting", N_("Space to select"), "0", NULL, NULL, 0, 1, NULL, spaceAsSelection_set_callback, 0, 0, 0, "Press Space to select the candidate.", }, {G_TYPE_INVALID, "", "", "", "", NULL, NULL, 0, 0, NULL, NULL, 0, 0, 0, NULL, }, }; /*============================================ * Supporting functions */ #ifdef IBUS_CHEWING_MAIN #if IBUS_CHECK_VERSION(1, 4, 0) void g_variant_to_g_value(GVariant *gVar, GValue *gValue){ const GVariantType *gVType=g_variant_get_type(gVar); if (g_variant_type_is_subtype_of(gVType, G_VARIANT_TYPE_BOOLEAN)){ g_value_init(gValue, G_TYPE_BOOLEAN); g_value_set_boolean(gValue, g_variant_get_boolean(gVar)); }else if (g_variant_type_is_subtype_of(gVType, G_VARIANT_TYPE_UINT16)){ g_value_init(gValue, G_TYPE_UINT); g_value_set_uint(gValue, g_variant_get_uint16(gVar)); }else if (g_variant_type_is_subtype_of(gVType, G_VARIANT_TYPE_UINT32)){ g_value_init(gValue, G_TYPE_UINT); g_value_set_uint(gValue, g_variant_get_uint32(gVar)); }else if (g_variant_type_is_subtype_of(gVType, G_VARIANT_TYPE_UINT64)){ g_value_init(gValue, G_TYPE_UINT64); g_value_set_uint64(gValue, g_variant_get_uint64(gVar)); }else if (g_variant_type_is_subtype_of(gVType, G_VARIANT_TYPE_INT16)){ g_value_init(gValue, G_TYPE_INT); g_value_set_int(gValue, g_variant_get_int16(gVar)); }else if (g_variant_type_is_subtype_of(gVType, G_VARIANT_TYPE_INT32)){ g_value_init(gValue, G_TYPE_INT); g_value_set_int(gValue, g_variant_get_int32(gVar)); }else if (g_variant_type_is_subtype_of(gVType, G_VARIANT_TYPE_INT64)){ g_value_init(gValue, G_TYPE_INT); g_value_set_int64(gValue, g_variant_get_int64(gVar)); }else if (g_variant_type_is_subtype_of(gVType, G_VARIANT_TYPE_STRING)){ g_value_init(gValue, G_TYPE_STRING); g_value_set_string(gValue, g_variant_get_string(gVar, NULL)); } } GVariant *g_value_to_g_variant(GValue *gValue){ GType gType=G_VALUE_TYPE(gValue); GVariant *gVar=NULL; switch(gType){ case G_TYPE_BOOLEAN: gVar=g_variant_new_boolean(g_value_get_boolean(gValue)); break; case G_TYPE_UINT: gVar=g_variant_new_uint32(g_value_get_uint(gValue)); break; case G_TYPE_UINT64: gVar=g_variant_new_uint64(g_value_get_uint(gValue)); break; case G_TYPE_INT: gVar=g_variant_new_int32(g_value_get_int(gValue)); break; case G_TYPE_INT64: gVar=g_variant_new_int64(g_value_get_int(gValue)); break; case G_TYPE_STRING: gVar=g_variant_new_string(g_value_get_string(gValue)); break; default: break; } return gVar; } #endif static void ibus_chewing_log_handler(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data){ GString *str=g_string_new(NULL); IBusChewingEngine *engine=(IBusChewingEngine *) user_data; if (log_level & G_LOG_LEVEL_ERROR){ g_string_printf(str, "%s [EE] %s\n", log_domain, message); }else if (log_level & G_LOG_LEVEL_CRITICAL){ g_string_printf(str, "%s [CC] %s\n", log_domain, message); }else if (log_level & G_LOG_LEVEL_WARNING){ g_string_printf(str, "%s [WW] %s\n", log_domain, message); }else if (log_level & G_LOG_LEVEL_MESSAGE){ g_string_printf(str, "%s [MM] %s\n", log_domain, message); }else if (log_level & G_LOG_LEVEL_INFO){ g_string_printf(str, "%s [II] %s\n", log_domain, message); }else if (log_level & G_LOG_LEVEL_DEBUG){ g_string_printf(str, "%s [DD] %s\n", log_domain, message); }else{ g_string_printf(str, "%s [%d] %s\n", log_domain, log_level,message); } if (str->len){ if (engine->logFile){ fputs(str->str, engine->logFile); }else{ fputs(str->str, stderr); } } g_string_free(str,TRUE); return; } static gboolean ibus_chewing_config_get_value(IBusConfig *config, const gchar *section, const gchar *key, GValue *gValue){ #if IBUS_CHECK_VERSION(1, 4, 0) GVariant *gVar=ibus_config_get_value(config, section, key); if (gVar==NULL){ return FALSE; } g_variant_ref_sink(gVar); g_variant_to_g_value(gVar, gValue); g_variant_unref(gVar); return TRUE; #else return ibus_config_get_value(config, section, key, gValue); #endif } static gboolean ibus_chewing_config_set_value(IBusConfig *config, const gchar *section, const gchar *key, GValue *gValue){ #if IBUS_CHECK_VERSION(1, 4, 0) GVariant *gVar=g_variant_ref_sink(g_value_to_g_variant(gValue)); if (gVar!=NULL){ return ibus_config_set_value(config, section, key, gVar); }else{ return FALSE; } #else return ibus_config_set_value(config, section, key, gValue); #endif } static gboolean ibus_chewing_property_get_state(IBusProperty *prop){ #if IBUS_CHECK_VERSION(1, 4, 0) return ibus_property_get_state(prop); #else return prop->state; #endif } static guint keysym_KP_to_normal(guint keysym){ if (keysym < IBUS_KP_0 || keysym > IBUS_KP_9){ switch(keysym){ case IBUS_KP_Decimal: return IBUS_period; case IBUS_KP_Add: return IBUS_plus; case IBUS_KP_Subtract: return IBUS_minus; case IBUS_KP_Multiply: return IBUS_asterisk; case IBUS_KP_Divide: return IBUS_slash; default: return 0; } } return keysym - IBUS_KP_0 + IBUS_0; } static int get_tone(ChewingKbType kbType, guint keysym){ int i=0; if (keysym==' ') return 1; for(i=0;i<4;i++){ if (toneKeys[kbType][i]==keysym){ return i+2; } } return -1; } static void add_tone(char *str, gint tone){ switch(tone){ case 2: g_strlcat(str,"ˊ",ZHUYIN_BUFFER_SIZE); break; case 3: g_strlcat(str,"ˇ",ZHUYIN_BUFFER_SIZE); break; case 4: g_strlcat(str,"ˋ",ZHUYIN_BUFFER_SIZE); break; case 5: g_strlcat(str,"˙",ZHUYIN_BUFFER_SIZE); break; default: break; } } /*-------------------------------------------- * Key modifier functions */ #if 0 static guint keyModifier_get(Display *pDisplay){ Window root_retrun, child_retrun; int root_x_return, root_y_return, win_x_return, win_y_return; guint mask_return; XQueryPointer(pDisplay, DefaultRootWindow(pDisplay), &root_retrun, &child_retrun, &root_x_return, &root_y_return, &win_x_return, &win_y_return, &mask_return ); return mask_return; } #endif const char numConst[]="0\0""1\0""2\0""3\0""4\0""5\0""6\0""7\0""8\0""9"; const char alphaConstL[]="a\0b\0c\0d\0e\0f\0g\0h\0i\0j\0k\0l\0m\0n\0o\0p\0q\0r\0s\0t\0u\0v\0w\0x\0y\0z"; const char alphaConstU[]="A\0B\0C\0D\0E\0F\0G\0H\0I\0J\0K\0L\0M\0N\0O\0P\0Q\0R\0S\0T\0U\0V\0W\0X\0Y\0Z"; const char *keyName_get(guint keyval){ switch (keyval){ case IBUS_Return: return "Return"; case IBUS_KP_Enter: return "KP_Enter"; case IBUS_Escape: return "Escape"; case IBUS_BackSpace: return "BackSpace"; case IBUS_Delete: return "Delete"; case IBUS_KP_Delete: return "KP_Delete"; case IBUS_space: return "space"; case IBUS_KP_Space: return "KP_space"; case IBUS_Page_Up: return "Page_Up"; case IBUS_KP_Page_Up: return "KP_Page_Up"; case IBUS_Page_Down: return "Page_Down"; case IBUS_KP_Page_Down: return "KP_Page_Down"; case IBUS_Up: return "Up"; case IBUS_KP_Up: return "KP_Up"; case IBUS_Down: return "Down"; case IBUS_KP_Down: return "KP_Down"; case IBUS_Left: return "Left"; case IBUS_KP_Left: return "KP_Left"; case IBUS_Right: return "Right"; case IBUS_KP_Right: return "KP_Right"; case IBUS_Home: return "Home"; case IBUS_KP_Home: return "KP_Home"; case IBUS_End: return "End"; case IBUS_KP_End: return "KP_End"; case IBUS_Tab: return "Tab"; case IBUS_Caps_Lock: return "Caps"; case IBUS_Shift_L: return "Shift_L"; case IBUS_Shift_R: return "Shift_R"; case IBUS_Alt_L: return "Alt_L"; case IBUS_Alt_R: return "Alt_R"; case IBUS_Control_L: return "Control_L"; case IBUS_Control_R: return "Control_R"; case IBUS_Super_L: return "Super_L"; case IBUS_Super_R: return "Super_R"; case IBUS_ISO_Lock: return "ISO_Lock"; case IBUS_ISO_Level3_Lock: return "ISO_Level3_Lock"; case IBUS_ISO_Level3_Shift: return "ISO_Level3_Shift"; default: if (keyval>='0' && keyval<='9'){ return &numConst[(keyval-'0')*2]; }else if (keyval>='a' && keyval<='z'){ return &alphaConstL[(keyval-'a')*2]; }else if (keyval>='A' && keyval<='Z'){ return &alphaConstU[(keyval-'A')*2]; } break; } return "Others"; } #define CAPS_LOCK_MASK 2 static gboolean is_caps_led_on(Display *pDisplay){ XKeyboardState retState; XGetKeyboardControl(pDisplay,&retState); return (retState.led_mask & 1) ? TRUE : FALSE; } static void set_caps_led(gboolean on,Display *pDisplay){ XKeyboardControl control; control.led_mode = (on)? LedModeOn: LedModeOff; control.led = CAPS_LOCK_MASK; guint flags=(on)? CAPS_LOCK_MASK: 0; XChangeKeyboardControl(pDisplay, KBLedMode, &control); XkbLockModifiers(pDisplay, XkbUseCoreKbd, control.led, flags); XFlush(pDisplay); } #if 0 /* * From send_fake_key_event() event.c gcin */ static void key_send_fake_event(KeySym key, Display *pDisplay) { KeyCode keyCode = XKeysymToKeycode(pDisplay, key); IBUS_CHEWING_LOG(2,"key_sent_fake_event(%lx,-), keyCode=%x",key,keyCode); XTestFakeKeyEvent(pDisplay, keyCode, True, CurrentTime); XTestFakeKeyEvent(pDisplay, keyCode, False, CurrentTime); } #endif #endif ibus-chewing-1.4.10.1-Source/src/ibus-chewing-util.h000664 001750 001750 00000001701 12266510632 022265 0ustar00dchendchen000000 000000 /* * Copyright © 2011 Red Hat, Inc. All rights reserved. * Copyright © 2011 Ding-Yi Chen * * This file is part of the ibus-chewing Project. * * Foobar is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Foobar 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 Foobar. If not, see . */ #ifndef _IBUS_CHEWING_UTIL_H_ #define _IBUS_CHEWING_UTIL_H_ #define quote_me_(s) #s #define quote_me(s) quote_me_(s) #endif /* _IBUS_CHEWING_UTIL_H_ */ ibus-chewing-1.4.10.1-Source/src/MakerDialog.gob000664 001750 001750 00000046436 12266510632 021443 0ustar00dchendchen000000 000000 requires 2.0.0 %alltop{ /* * Copyright © 2009 Red Hat, Inc. All rights reserved. * Copyright © 2009 Ding-Yi Chen * * This file is part of the ibus-chewing Project. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include #include #include #include %} %headertop{ #ifndef MAKER_DIALOG_H_ #define MAKER_DIALOG_H_ %} enum MAKER_DIALOG_PROPERTY_FLAG{ INVISIBLE =0x1, INSENSITIVE =0x2, INEDITABLE =0x4, HAS_TRANSLATION =0x8, TRANSLATION_WITH_CONTEXT =0x10, } Maker:Dialog:Property:Flag; %headertop{ typedef guint MakerDialogPropertyFlags; typedef struct _PropertyContext PropertyContext; typedef GValue *(* CallbackGetFunc)(PropertyContext *ctx); typedef void(* CallbackSetFunc)(PropertyContext *ctx, GValue *value); typedef struct{ GType valueType; gchar key[30]; gchar pageName[50]; gchar label[200]; gchar defaultValue[100]; const gchar **validValues; gchar *translationContext; gint min; gint max; CallbackGetFunc getFunc; CallbackSetFunc setFunc; MakerDialogPropertyFlags propertyFlags; gint width; gint height; const gchar *tooltip; gpointer userData; } PropertySpec; struct _PropertyContext{ PropertySpec *spec; gpointer userData; //vbox; gtk_widget_show(dialog_vbox); if (notebook_pages>0){ self->dialog_notebook = gtk_notebook_new(); gtk_box_pack_start (GTK_BOX(dialog_vbox), self->dialog_notebook, TRUE, TRUE, 0); for (i=0;ivbox_homogeneous,self->vbox_spacing); self_widget_register(self, vbox, notebook_page_labels[i], "vbox"); gtk_widget_show(vbox); gtk_notebook_append_page (GTK_NOTEBOOK(self->dialog_notebook), vbox,label); } } return self; } public void set_verbose_level(self,gint level){ verboseLevel=level; } /** * add_property_no_gui: * @self: A MakerDialog * @pSpec: A property spec to be added. * @user_data: user_data to be passed to callback functions. * @returns: A newly allocated PropertyContext. * * Add a property without GUI automation involved. */ public PropertyContext *add_property_no_gui(self, PropertySpec *pSpec, gpointer user_data){ IBUS_CHEWING_LOG(2,"::add_property_no_gui(%s,-)",pSpec->key); PropertyContext *ctx=propertyContext_new(pSpec,user_data); g_ptr_array_add(self->_priv->propList,ctx); g_hash_table_insert(self->_priv->notebookContentTable, pSpec->key, pSpec->pageName); return ctx; } /** * add_property: * @self: A MakerDialog * @pSpec: A property spec to be added. * @initValue: Initial value of the property. * @user_data: user_data to be passed to callback functions. * @returns: TRUE if the property adding succeed; FALSE otherwise. * * Add a property to the dialog and corresponding Gtk widget will also be * set. * If @initValue is not NULL, it will be the initial value of the widget. */ public gboolean add_property(self, PropertySpec *pSpec, const gchar *initValue, gpointer user_data){ IBUS_CHEWING_LOG(2,"::add_property(%s,%s,-)",pSpec->key,initValue); GtkWidget *vbox=self_get_base_vbox(self, pSpec->pageName); g_assert(vbox); GtkWidget *hbox=gtk_hbox_new(FALSE,self->hbox_spacing); self_widget_register(self, hbox, pSpec->key, "hbox"); GtkWidget *label=gtk_label_new(_(pSpec->label)); self_widget_register(self, label, pSpec->key, "label"); if (pSpec->tooltip){ gtk_widget_set_tooltip_text (label,_(pSpec->tooltip)); } gtk_widget_show(label); gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0); GtkWidget *widget=NULL; GtkAdjustment *gAdjust=NULL; PropertyContext *ctx=self_add_property_no_gui(self,pSpec,user_data); if (!ctx){ return FALSE; } switch(pSpec->valueType){ case G_TYPE_BOOLEAN: widget = gtk_check_button_new(); self_widget_register(self, widget, pSpec->key, NULL); gboolean bValue=FALSE; if(initValue){ bValue=atob(initValue); }else if (pSpec->defaultValue){ bValue=atob(pSpec->defaultValue); } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget),bValue); if (pSpec->setFunc){ g_signal_connect(widget, "toggled", G_CALLBACK(on_toggleButton_toggled_wrap),ctx); } break; case G_TYPE_UINT: case G_TYPE_INT: gAdjust = (GtkAdjustment *)gtk_adjustment_new (atoi(pSpec->defaultValue), pSpec->min, pSpec->max, 1.0, 0.0, 0.0); widget = gtk_spin_button_new (gAdjust, 1.0, 0); self_widget_register(self, widget, pSpec->key, NULL); if(initValue){ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget),atoi(initValue)); }else if (pSpec->defaultValue){ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget),atoi(pSpec->defaultValue)); } if (pSpec->setFunc){ g_signal_connect(widget, "value-changed", G_CALLBACK(on_spinButton_value_changed_wrap),ctx); } break; case G_TYPE_STRING: if (pSpec->validValues){ GtkListStore *listStore=NULL; if (pSpec->propertyFlags & MAKER_DIALOG_PROPERTY_FLAG_HAS_TRANSLATION){ listStore=gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); }else{ listStore=gtk_list_store_new (1, G_TYPE_STRING); } int i; for(i=0;pSpec->validValues[i]!=NULL;i++){ /* Add new item*/ listStore_append(listStore, pSpec->validValues[i], pSpec->translationContext,pSpec->propertyFlags); } int index=-1; if (initValue){ index=listStore_find_string(listStore,initValue, pSpec->translationContext,pSpec->propertyFlags); } if (index<0 && pSpec->defaultValue){ index=listStore_find_string(listStore,pSpec->defaultValue, pSpec->translationContext,pSpec->propertyFlags); } if (pSpec->propertyFlags & MAKER_DIALOG_PROPERTY_FLAG_INEDITABLE){ widget=gtk_combo_box_new_with_model (GTK_TREE_MODEL(listStore)); GtkCellRenderer *renderer = gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(widget), renderer, FALSE); if (pSpec->propertyFlags & MAKER_DIALOG_PROPERTY_FLAG_HAS_TRANSLATION){ gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(widget), renderer, "text", 1, NULL); }else{ gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(widget), renderer, "text", 0, NULL); } }else{ widget=gtk_combo_box_entry_new_with_model (GTK_TREE_MODEL(listStore), (pSpec->propertyFlags & MAKER_DIALOG_PROPERTY_FLAG_HAS_TRANSLATION)? 1:0); } self_widget_register(self, widget, pSpec->key, NULL); gtk_combo_box_set_active(GTK_COMBO_BOX(widget),index); if (pSpec->setFunc){ g_signal_connect(widget, "changed", G_CALLBACK(on_comboBox_changed_wrap),ctx); } }else{ widget=gtk_entry_new(); self_widget_register(self, widget, pSpec->key, NULL); if (pSpec->max>=0){ gtk_entry_set_max_length(GTK_ENTRY(widget),pSpec->max); } const char *sValue=NULL; if(initValue){ sValue=initValue; }else if (pSpec->defaultValue){ sValue=pSpec->defaultValue; }else{ sValue=""; } gtk_entry_set_text(GTK_ENTRY(widget),sValue); gtk_editable_set_editable (GTK_EDITABLE(widget), !(pSpec->propertyFlags & MAKER_DIALOG_PROPERTY_FLAG_INEDITABLE)); if (pSpec->setFunc){ g_signal_connect(widget, "activate", G_CALLBACK(on_entry_activate_wrap),ctx); } } break; default: break; } if (!widget){ return FALSE; } gtk_box_pack_start (GTK_BOX(hbox), widget, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX(vbox), hbox, FALSE, FALSE, 0); return TRUE; } /** * align_labels: * @self: A MakerDialog. * @pageName: Name of notebook page to be apply, can be NULL. * @xalign: x align of labels. 0.0f for LEFT, 0.5f for CENTER, 1.0f for RIGHT. * @yalign: y align of labels. 0.0f for TOP, 0.5f for CENTER, 1.0f for BOTTOM. * * Align labels for better dialog appearance. * * Labels that associate with value setting widget are stretched into same width. * If @pageName is not NULL, only the labels in the page are stretched, * otherwise, all labels will be stretched. * * Moreover, the horizontal and vertical alignment can set by @xalign and @yalign, respectively. */ public void align_labels(self, const gchar *pageName, gfloat xalign, gfloat yalign){ WidgetAlignment wAlignment; wAlignment.self=self; wAlignment.currentMaxWidth=0; wAlignment.pageName=pageName; wAlignment.xalign=xalign; wAlignment.yalign=yalign; g_hash_table_foreach(self->_priv->notebookContentTable, caculate_max_label_width_callback, (gpointer) &wAlignment); g_hash_table_foreach(self->_priv->notebookContentTable, set_label_width_callback, (gpointer) &wAlignment); } public void reload_property_value(self, const gchar *key){ gboolean boolValue; gint intValue; gint uintValue; const gchar *stringValue; PropertyContext *ctx=self_get_propertyContext_by_key(self,key); PropertySpec *pSpec=ctx->spec; GtkWidget *widget=self_get_widget_by_key(self,pSpec->key); GValue *gValue; if (pSpec->getFunc){ gValue=pSpec->getFunc(ctx); switch(pSpec->valueType){ case G_TYPE_BOOLEAN: boolValue=g_value_get_boolean(gValue); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget),boolValue); break; case G_TYPE_INT: intValue=g_value_get_int(gValue); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget),(gdouble) intValue); break; case G_TYPE_UINT: uintValue=g_value_get_uint(gValue); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget),(gdouble) uintValue); break; case G_TYPE_STRING: stringValue=g_value_get_string(gValue); if (pSpec->validValues){ int index=-1; if (stringValue){ index=combo_find_string_index(GTK_COMBO_BOX(widget),stringValue, pSpec->translationContext, ctx->spec->propertyFlags); } if (index<0 && pSpec->defaultValue){ index=combo_find_string_index(GTK_COMBO_BOX(widget),pSpec->defaultValue, pSpec->translationContext, ctx->spec->propertyFlags); } gtk_combo_box_set_active(GTK_COMBO_BOX(widget),index); }else{ gtk_entry_set_text(GTK_ENTRY(widget),stringValue); } break; default: break; } } } /** * write_gconf_schemas_file: * @self: A MakerDialog. * @filename: Filename for output. * @owner: Owner of the schemas. * @schemasHome: The "home direcory" of schemas. * @locales: Supported locales, use ';' as delimiter. * @returns: TRUE if succeed; FALSE otherwise. * * Output the parameters as GConf schemes file. */ public gboolean write_gconf_schemas_file(self, const gchar *filename, const gchar * owner, const gchar *schemasHome, const gchar *locales){ IBUS_CHEWING_LOG(2,"::output_gconf_schemes_file(%s)",filename); FILE *outF=fopen(filename,"w"); if (outF==NULL){ IBUS_CHEWING_LOG(1,"::output_gconf_schemes_file(%s) file %s cannot be written!", filename,filename); return FALSE; } xml_tags_write(outF,"gconfschemafile",XML_TAG_TYPE_BEGIN_ONLY,NULL,NULL); xml_tags_write(outF,"schemalist",XML_TAG_TYPE_BEGIN_ONLY,NULL,NULL); SchemasFileData sData; sData.schemasHome=schemasHome; sData.owner=owner; sData.locales=locales; sData.outF=outF; g_ptr_array_foreach(self->_priv->propList,ctx_write_callback,&sData); xml_tags_write(outF,"schemalist",XML_TAG_TYPE_END_ONLY,NULL,NULL); xml_tags_write(outF,"gconfschemafile",XML_TAG_TYPE_END_ONLY,NULL,NULL); if (fclose(outF)) return FALSE; IBUS_CHEWING_LOG(2,"::output_gconf_schemes_file(%s) ... done.",filename); return TRUE; } /** * apply_widget_value: * @self: A MakerDialog. * @key: The key of a property. * * Apply the value shown in widget to the property. * Note that a set callback function is needed in PropertySpec to apply the value to property. * * @see_also: set_widget_value() */ public void apply_widget_value(self, const gchar *key){ IBUS_CHEWING_LOG(2,"::apply_widget_value(%s)",key); PropertyContext *ctx=self_get_propertyContext_by_key(self,key); if (!ctx){ /* Not found */ g_warning("%s: no such PropertyContext",key); return; } GValue gValue={0}; self_get_widget_value(self,key,&gValue); if (ctx->spec->setFunc){ ctx->spec->setFunc(ctx,&gValue); } g_value_unset(&gValue); } public GValue *get_widget_value(self, const gchar *key, GValue *gValue){ IBUS_CHEWING_LOG(2,"::get_widget_value(%s)",key); PropertyContext *ctx=self_get_propertyContext_by_key(self,key); if (!ctx){ /* Not found */ return NULL; } GtkWidget *widget=self_get_widget_by_key(self,key); if (ctx->spec->valueType!=G_TYPE_STRING){ g_value_init(gValue,ctx->spec->valueType); } switch(ctx->spec->valueType){ case G_TYPE_BOOLEAN: g_value_set_boolean(gValue, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(widget))); break; case G_TYPE_INT: g_value_set_int(gValue, (gint) gtk_spin_button_get_value (GTK_SPIN_BUTTON(widget))); break; case G_TYPE_UINT: g_value_set_uint(gValue, (guint) gtk_spin_button_get_value (GTK_SPIN_BUTTON(widget))); break; case G_TYPE_STRING: if (ctx->spec->validValues){ const char *str=combo_get_active_text (GTK_COMBO_BOX(widget),gValue); IBUS_CHEWING_LOG(3,"::get_widget_value(%s) %s", key,str); }else{ g_value_set_string(gValue, gtk_entry_get_text (GTK_ENTRY(widget))); } break; default: break; } return gValue; } /** * set_widget_value: * @self: A MakerDialog. * @key: The key of a property. * @value: Value to be shown in widget. * * Set value for widget display. * However, the property value is not set. * Use apply_widget_value() to do it. * @see_also: apply_widget_value() */ public void set_widget_value(self, const gchar *key, GValue *value){ int index; PropertyContext *ctx=self_get_propertyContext_by_key(self,key); if (!ctx){ /* Not found */ return; } GtkWidget *widget=self_get_widget_by_key(self,key); switch(ctx->spec->valueType){ case G_TYPE_BOOLEAN: gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(widget),g_value_get_boolean(value)); break; case G_TYPE_INT: gtk_spin_button_set_value (GTK_SPIN_BUTTON(widget),(gdouble) g_value_get_int(value)); break; case G_TYPE_UINT: gtk_spin_button_set_value (GTK_SPIN_BUTTON(widget),(gdouble) g_value_get_uint(value)); break; case G_TYPE_STRING: if (ctx->spec->validValues){ const gchar *str=g_value_get_string(value); index=combo_find_string_index(GTK_COMBO_BOX(widget),str, ctx->spec->translationContext,ctx->spec->propertyFlags); gtk_combo_box_set_active (GTK_COMBO_BOX(widget),index); }else{ g_value_set_string(value, gtk_entry_get_text (GTK_ENTRY(widget))); } break; default: break; } } public GtkWidget *get_widget(self, const gchar *widget_key, const gchar *widget_type){ gchar buf[STRING_BUFFER_SIZE_DEFAULT]; widget_get_id(buf, STRING_BUFFER_SIZE_DEFAULT, widget_key, widget_type); return self_get_widget_by_id(self, buf); } public GtkWidget *get_widget_by_key(self, const gchar *key){ return self_get_widget(self,key,NULL); } public GtkWidget *get_widget_by_id(self, const gchar *id){ IBUS_CHEWING_LOG(3,"*** get_widget_by_id(%s)",id); return (GtkWidget *) g_hash_table_lookup (self->_priv->widgetTable, id); } public PropertyContext *get_propertyContext_by_key(self,const gchar *key){ int i=0; PropertyContext *ctx=NULL; for(i=0; i_priv->propList->len;i++){ ctx=g_ptr_array_index(self->_priv->propList,i); if (strcmp(ctx->spec->key,key)==0){ break; } } if (i>=self->_priv->propList->len){ /* Not found */ return NULL; } return ctx; } protected GtkWidget *get_base_vbox(self, const gchar *notebook_page_label){ gchar buf[STRING_BUFFER_SIZE_DEFAULT]; GtkWidget *ret; if (notebook_page_label){ widget_get_id(buf, STRING_BUFFER_SIZE_DEFAULT, notebook_page_label, "vbox"); ret=self_get_widget(self, notebook_page_label, "vbox"); }else{ ret=GTK_DIALOG(self)->vbox; } if (!ret){ ret=GTK_DIALOG(self)->vbox; } return ret; } private void widget_register(self, GtkWidget *widget, const gchar *widget_label, const gchar *widget_type){ gchar buf[STRING_BUFFER_SIZE_DEFAULT]; widget_get_id(buf, STRING_BUFFER_SIZE_DEFAULT, widget_label, widget_type); gchar *chunk_ret=g_string_chunk_insert(self->_priv->widgetIds,buf); g_hash_table_insert(self->_priv->widgetTable, chunk_ret,widget); IBUS_CHEWING_LOG(3,"*** widget_register(-,%s,%s) widget registered as %s", widget_label,(widget_type)? (widget_type) : "", chunk_ret); } } %headertop{ #endif /* MAKER_DIALOG_H_ */ %} ibus-chewing-1.4.10.1-Source/src/IBusChewingEngine-input-events.c000664 001750 001750 00000027074 12266510632 024670 0ustar00dchendchen000000 000000 /** * ibus_chewing_engine_keycode_to_keysym: * * Convert keycode to keysym. */ guint ibus_chewing_engine_keycode_to_keysym(IBusChewingEngine *self, guint keysym, guint keycode, guint modifiers){ /* Get system layout */ GValue gValue={0}; gboolean useSysKeyLayout=TRUE; if (ibus_chewing_config_get_value(self->config, "general", "use_system_keyboard_layout", &gValue)){ useSysKeyLayout=g_value_get_boolean(&gValue); } guint kSym; if (useSysKeyLayout && (!chewing_get_ChiEngMode(self->context))){ // English mode. kSym=keysym; }else{ /* ibus_keymap_lookup_keysym only handles keycode under 256 */ if ((kSym=ibus_keymap_lookup_keysym(self->keymap_us,keycode,modifiers))==IBUS_VoidSymbol){ kSym=keysym; } } return kSym; } gboolean ibus_chewing_engine_process_key_event(IBusEngine *engine, guint keysym, guint keycode, guint modifiers){ gboolean result=TRUE; IBusChewingEngine *self=IBUS_CHEWING_ENGINE(engine); if (ibus_chewing_engine_is_password(self)) return FALSE; guint kSym=ibus_chewing_engine_keycode_to_keysym(self,keysym, keycode, modifiers); if (modifiers & IBUS_RELEASE_MASK){ if (!keysym_KP_to_normal(kSym) && (kSym==IBUS_Shift_L || kSym==IBUS_Shift_R) && self->_priv->key_last==kSym){ /* When Chi->Eng with incomplete character */ if (chewing_get_ChiEngMode(self->context) && !chewing_zuin_Check(self->context)){ /* chewing_zuin_Check==0 means incomplete character */ /* Send a space to finish the character */ chewing_handle_Space(self->context); } chewing_set_ChiEngMode(self->context, ! chewing_get_ChiEngMode(self->context)); self_refresh_property(self,"chewing_chieng_prop"); return self_update(self); } /* Skip release event */ return TRUE; } IBUS_CHEWING_LOG(2,"***[I2] process_key_event(-, %x(%s), %x, %x) orig keysym=%x... proceed.",kSym, keyName_get(kSym), keycode, modifiers,keysym); guint state= modifiers & (IBUS_SHIFT_MASK | IBUS_CONTROL_MASK | IBUS_MOD1_MASK); self->_priv->key_last=kSym; if (state==0){ guint kSym_tmp=keysym_KP_to_normal(kSym); if (kSym_tmp){ IBUS_CHEWING_LOG(3,"***[I3] process_key_event(): %x is from keypad.", kSym_tmp); /* Is keypad key */ if ((self->chewingFlags & CHEWING_FLAG_NUMPAD_ALWAYS_NUMBER) && chewing_get_ChiEngMode(self->context)){ chewing_set_ChiEngMode(self->context, 0); self_handle_Default(self,kSym_tmp,FALSE); chewing_set_ChiEngMode(self->context,CHINESE_MODE); }else{ /* Convert kp numbers to normal */ self_handle_Default(self,kSym_tmp,FALSE); } }else{ switch (kSym){ case IBUS_Return: case IBUS_KP_Enter: ibus_chewing_engine_set_status_flag(self,ENGINE_STATUS_NEED_COMMIT); chewing_handle_Enter(self->context); break; case IBUS_Escape: if (self->inputMode==CHEWING_INPUT_MODE_BYPASS) return FALSE; chewing_handle_Esc(self->context); break; case IBUS_BackSpace: if (self->inputMode==CHEWING_INPUT_MODE_BYPASS) return FALSE; chewing_handle_Backspace(self->context); break; case IBUS_Delete: case IBUS_KP_Delete: if (self->inputMode==CHEWING_INPUT_MODE_BYPASS) return FALSE; chewing_handle_Del(self->context); break; case IBUS_space: case IBUS_KP_Space: if (self->chewingFlags & CHEWING_FLAG_PLAIN_ZHUYIN) { if (chewing_cand_TotalChoice(self->context) == 0) { chewing_handle_Space(self->context); } } else { /** * Fix for space in Temporary English mode. */ chewing_handle_Space(self->context); ibus_chewing_engine_set_status_flag(self,ENGINE_STATUS_NEED_COMMIT); } if (self->inputMode==CHEWING_INPUT_MODE_SELECTION_DONE || self->inputMode==CHEWING_INPUT_MODE_BYPASS || self->inputMode==CHEWING_INPUT_MODE_EDITING ) ibus_chewing_engine_set_status_flag(self,ENGINE_STATUS_NEED_COMMIT); break; case IBUS_Page_Up: case IBUS_KP_Page_Up: if (self->inputMode==CHEWING_INPUT_MODE_BYPASS) return FALSE; IBUS_ENGINE_GET_CLASS(engine)->page_up(engine); break; case IBUS_Page_Down: case IBUS_KP_Page_Down: if (self->inputMode==CHEWING_INPUT_MODE_BYPASS) return FALSE; IBUS_ENGINE_GET_CLASS(engine)->page_down(engine); break; case IBUS_Up: case IBUS_KP_Up: if (self->inputMode==CHEWING_INPUT_MODE_BYPASS) return FALSE; IBUS_ENGINE_GET_CLASS(engine)->cursor_up(engine); break; case IBUS_Down: case IBUS_KP_Down: if (self->inputMode==CHEWING_INPUT_MODE_BYPASS) return FALSE; IBUS_ENGINE_GET_CLASS(engine)->cursor_down(engine); break; case IBUS_Left: case IBUS_KP_Left: if (self->inputMode==CHEWING_INPUT_MODE_BYPASS) return FALSE; chewing_handle_Left(self->context); break; case IBUS_Right: case IBUS_KP_Right: if (self->inputMode==CHEWING_INPUT_MODE_BYPASS) return FALSE; chewing_handle_Right(self->context); break; case IBUS_Home: case IBUS_KP_Home: if (self->inputMode==CHEWING_INPUT_MODE_BYPASS) return FALSE; chewing_handle_Home(self->context); break; case IBUS_End: case IBUS_KP_End: if (self->inputMode==CHEWING_INPUT_MODE_BYPASS) return FALSE; chewing_handle_End(self->context); break; case IBUS_Tab: if (self->inputMode==CHEWING_INPUT_MODE_BYPASS) return FALSE; chewing_handle_Tab(self->context); break; case IBUS_Caps_Lock: /* When Chi->Eng with incomplete character */ if (chewing_get_ChiEngMode(self->context) && !chewing_zuin_Check(self->context)){ /* chewing_zuin_Check==0 means incomplete character */ /* Send a space to finish the character */ chewing_handle_Space(self->context); } chewing_handle_Capslock(self->context); self_refresh_property(self,"chewing_chieng_prop"); break; case IBUS_Shift_L: case IBUS_Shift_R: /* Some QT application will sneak these through */ return FALSE; case IBUS_Alt_L: case IBUS_Alt_R: /* Some QT application will sneak these through */ return FALSE; case IBUS_Control_L: case IBUS_Control_R: /* Some QT application will sneak these through */ return FALSE; default: self_handle_Default(self,kSym,FALSE); break; } } }else if (state==IBUS_SHIFT_MASK){ switch(kSym){ case IBUS_Return: case IBUS_KP_Enter: /* Same with Shift Enter and Shift KP_Enter */ ibus_chewing_engine_set_status_flag(self,ENGINE_STATUS_NEED_COMMIT); chewing_handle_Enter(self->context); break; case IBUS_Left: if (self->inputMode==CHEWING_INPUT_MODE_BYPASS) return FALSE; chewing_handle_ShiftLeft(self->context); break; case IBUS_Right: if (self->inputMode==CHEWING_INPUT_MODE_BYPASS) return FALSE; chewing_handle_ShiftRight(self->context); break; case IBUS_Up: case IBUS_KP_Up: case IBUS_Down: case IBUS_KP_Down: case IBUS_Page_Up: case IBUS_KP_Page_Up: case IBUS_Page_Down: case IBUS_KP_Page_Down: case IBUS_Home: case IBUS_End: if (self->_priv->statusFlags & ENGINE_STATUS_NEED_COMMIT) self_force_commit(self); return FALSE; case IBUS_space: case IBUS_KP_Space: chewing_handle_ShiftSpace(self->context); chewing_set_ShapeMode(self->context, !chewing_get_ShapeMode(self->context)); self_refresh_property(self,"chewing_alnumSize_prop"); break; default: if (kSym>127 || kSym<0){ /* Special keys, must let it through */ return FALSE; } self_handle_Default(self,kSym,TRUE); break; } }else if (state==IBUS_CONTROL_MASK){ if (kSym>=IBUS_0 && kSym<=IBUS_9){ chewing_handle_CtrlNum(self->context,kSym); // }else if (kSym==IBUS_v || kSym==IBUS_V){ // chewing_handle_Right(self->context); }else{ result=FALSE; } }else{ result=FALSE; } if (!result){ return FALSE; } return self_update(self); } void ibus_chewing_engine_handle_Default(IBusChewingEngine *self, guint keyval, gboolean shiftPressed){ IBUS_CHEWING_LOG(2,"[I2] handle_Default(-,%u) plainZhuyin=%s inputMode=%d", keyval,(self->chewingFlags & CHEWING_FLAG_PLAIN_ZHUYIN)? "TRUE": "FALSE",self->inputMode); ibus_chewing_engine_set_status_flag(self, ENGINE_STATUS_NEED_COMMIT); #ifdef EASY_SYMBOL_INPUT_WORK_AROUND if (self->chewingFlags & CHEWING_FLAG_EASY_SYMBOL_INPUT){ /* If shift is pressed, turn on the easySymbolInput, turn off * otherwise */ chewing_set_easySymbolInput(self->context,(shiftPressed)? 1:0); } #endif if (self->chewingFlags & CHEWING_FLAG_FORCE_LOWERCASE_ENGLISH){ if (isupper(keyval) && !shiftPressed){ keyval=tolower(keyval); }else if (islower(keyval) && shiftPressed){ keyval=toupper(keyval); } } chewing_handle_Default(self->context,keyval); if (self->chewingFlags & CHEWING_FLAG_PLAIN_ZHUYIN){ if (self_is_selectKey(self,self->_priv->key_last) && self->inputMode==CHEWING_INPUT_MODE_SELECTING){ chewing_handle_Enter(self->context); self->inputMode= CHEWING_INPUT_MODE_SELECTION_DONE; } } } /*=================================================== * Mouse events */ void ibus_chewing_engine_candidate_clicked(IBusEngine *engine, guint index, guint button, guint state){ IBUS_CHEWING_LOG(2,"***[I2] candidate_clicked(-, %u, %u, %u) ... proceed.", index, button, state); IBusChewingEngine *self=IBUS_CHEWING_ENGINE(engine); if (ibus_chewing_engine_is_password(self)) return; if (index >= chewing_get_candPerPage(self->context) || index <0) { IBUS_CHEWING_LOG(3,"[I3] candidate_clicked() index out of ranged"); return; } if (self->inputMode==CHEWING_INPUT_MODE_SELECTING){ self->_priv->key_last=(guint) self->selKeys[index]; ibus_chewing_engine_handle_Default(self, self->_priv->key_last, FALSE); self_update(self); } else { IBUS_CHEWING_LOG(3,"[I3] candidate_clicked() ... Wrong mode: %u", self->inputMode); } } void ibus_chewing_engine_property_activate(IBusEngine *engine, const gchar *prop_name, guint prop_state){ IBUS_CHEWING_LOG(3,"[I3] property_activate(-, %s, %u)", prop_name, prop_state); Self *self=SELF(engine); gboolean needRefresh=TRUE; if (strcmp(prop_name,"chewing_chieng_prop")==0){ /* Toggle Chinese <-> English */ chewing_set_ChiEngMode(self->context, !chewing_get_ChiEngMode(self->context)); }else if (strcmp(prop_name,"chewing_alnumSize_prop")==0){ /* Toggle Full <-> Half */ chewing_set_ShapeMode(self->context, !chewing_get_ShapeMode(self->context)); }else if (strcmp(prop_name,"chewing_settings_prop")==0){ #if IBUS_CHECK_VERSION(1, 4, 0) if (ibus_property_get_state(self->settings_prop)==PROP_STATE_UNCHECKED) #else if (self->settings_prop->state==PROP_STATE_UNCHECKED) #endif { if (gtk_dialog_run(GTK_DIALOG(self->setting_dialog))==GTK_RESPONSE_OK){ self_save_config_all(self); } gtk_widget_hide(self->setting_dialog); #if IBUS_CHECK_VERSION(1, 4, 0) ibus_property_set_state(self->settings_prop,PROP_STATE_UNCHECKED); #else self->settings_prop->state=PROP_STATE_UNCHECKED; #endif } }else{ IBUS_CHEWING_LOG(3,"[I3] property_activate(-, %s, %u) not recognized",prop_name, prop_state); needRefresh=FALSE; } if (needRefresh) self_refresh_property(self,prop_name); } #if IBUS_CHECK_VERSION(1, 5, 4) void ibus_chewing_engine_set_content_type(IBusEngine *engine, guint purpose, guint hints){ IBUS_CHEWING_LOG(5,"[I5] set_content_type(%d, %d)", purpose, hints); Self *self=SELF(engine); if (purpose == IBUS_INPUT_PURPOSE_PASSWORD || purpose == IBUS_INPUT_PURPOSE_PIN) { ibus_chewing_engine_set_status_flag(self, ENGINE_STATUS_IS_PASSWORD); } else { ibus_chewing_engine_clear_status_flag(self, ENGINE_STATUS_IS_PASSWORD); } } #endif ibus-chewing-1.4.10.1-Source/src/main.c000664 001750 001750 00000012110 12266510632 017641 0ustar00dchendchen000000 000000 /* vim:set et sts=4: */ /* * Copyright © 2009 Red Hat, Inc. All rights reserved. * Copyright © 2009 Ding-Yi Chen * * This file is part of the ibus-chewing Project. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include #include #include #include #include "ibus-chewing-engine.h" #include "ibus-chewing-util.h" #include "maker-dialog.h" MakerDialog *makerDialog=NULL; static IBusBus *bus = NULL; static IBusFactory *factory = NULL; /* options */ static gboolean showFlags=FALSE; static gboolean ibus = FALSE; static gboolean xml = FALSE; int ibus_chewing_verbose= 0; static const GOptionEntry entries[] = { { "show_flags", 's', 0, G_OPTION_ARG_NONE, &showFlags, "Show compile flag only", NULL }, { "ibus", 'i', 0, G_OPTION_ARG_NONE, &ibus, "component is executed by ibus", NULL }, { "verbose", 'v', 0, G_OPTION_ARG_INT, &ibus_chewing_verbose, "Verbose level. The higher the level, the more the debug messages.", "[integer]" }, { "xml", 'x', 0, G_OPTION_ARG_NONE, &xml, "read chewing engine desc from xml file", NULL }, { NULL }, }; static void ibus_disconnected_cb (IBusBus *bus, gpointer user_data) { g_debug ("bus disconnected"); ibus_quit (); } static void start_component (void) { ibus_init(); bus = ibus_bus_new (); g_signal_connect (bus, "disconnected", G_CALLBACK (ibus_disconnected_cb), NULL); factory = ibus_factory_new (ibus_bus_get_connection (bus)); ibus_factory_add_engine (factory, "chewing", IBUS_TYPE_CHEWING_ENGINE); if (ibus) { ibus_bus_request_name (bus, "org.freedesktop.IBus.Chewing", 0); }else { IBusComponent *component=NULL; if (xml){ component = ibus_component_new_from_file ( quote_me(DATA_DIR) "/ibus/component/chewing.xml"); }else{ component=ibus_component_new("org.freedesktop.IBus.Chewing", _("Chewing component"), quote_me(PRJ_VER), "GPLv2+", _("Peng Huang, Ding-Yi Chen"), "http://code.google.com/p/ibus", quote_me(LIBEXEC_DIR) "/ibus-engine-chewing --ibus", quote_me(PROJECT_NAME)); } ibus_component_add_engine(component, ibus_engine_desc_new("chewing", _("Chewing"), "Chinese chewing input method", "zh_TW", "GPLv2+", _("Peng Huang, Ding-Yi Chen"), quote_me(PRJ_DATA_DIR) "/icons/" quote_me(PROJECT_NAME) ".png", "us") ); ibus_bus_register_component (bus, component); } ibus_main (); } const char *locale_env_strings[]={ "LC_ALL", "LANG", "LANGUAGE", "GDM_LANG", NULL }; void determine_locale(){ #ifndef STRING_BUFFER_SIZE #define STRING_BUFFER_SIZE 100 #endif gchar *localePtr=NULL; gchar localeStr[STRING_BUFFER_SIZE]; int i; for(i=0;locale_env_strings[i]!=NULL;i++){ if (getenv(locale_env_strings[i])){ localePtr=getenv(locale_env_strings[i]); break; } } if (!localePtr){ localePtr="en_US.utf8"; } /* Use UTF8 as charset unconditionally */ for (i=0;localePtr[i]!='\0';i++){ if (localePtr[i]=='.') break; localeStr[i]=localePtr[i]; } localeStr[i]='\0'; g_strlcat(localeStr,".utf8",STRING_BUFFER_SIZE); #undef STRING_BUFFER_SIZE setlocale (LC_ALL, localeStr); IBUS_CHEWING_LOG(1,"[I1] determine_locale %s",localeStr); } int main (gint argc, gchar *argv[]) { GError *error = NULL; GOptionContext *context; gtk_init(&argc,&argv); /* Init i18n messages */ setlocale (LC_ALL, "zh_TW.utf8"); bindtextdomain(quote_me(PROJECT_NAME), quote_me(DATA_DIR) "/locale"); textdomain(quote_me(PROJECT_NAME)); context = g_option_context_new ("- ibus chewing engine component"); g_option_context_add_main_entries (context, entries, quote_me(PROJECT_NAME)); if (!g_option_context_parse (context, &argc, &argv, &error)) { g_print ("Option parsing failed: %s\n", error->message); exit (-1); } g_option_context_free (context); if (showFlags){ printf("PROJECT_NAME=" quote_me(PROJECT_NAME) "\n"); printf("DATA_DIR=" quote_me(DATA_DIR) "\n"); printf("CHEWING_DATADIR=" quote_me(CHEWING_DATADIR) "\n"); }else{ start_component (); } return 0; } ibus-chewing-1.4.10.1-Source/src/MakerDialog-def.c000664 001750 001750 00000030026 12266510632 021636 0ustar00dchendchen000000 000000 static gint verboseLevel=0; void IBUS_CHEWING_LOG(gint level, const char *format, ...){ va_list ap; if (levelspec=spec; ctx->userData=userData; return ctx; } static void propertyContext_free(gpointer ctx_ptr){ PropertyContext *ctx=(PropertyContext *) ctx_ptr; g_free(ctx); } static void listStore_append(GtkListStore *listStore,const gchar *str, const gchar *translationContext, MakerDialogPropertyFlags propertyFlags){ GtkTreeIter iter; gtk_list_store_append (listStore, &iter); if (propertyFlags & MAKER_DIALOG_PROPERTY_FLAG_HAS_TRANSLATION){ if (translationContext || propertyFlags & MAKER_DIALOG_PROPERTY_FLAG_TRANSLATION_WITH_CONTEXT){ IBUS_CHEWING_LOG(5,"*** str=%s, _(str)=%s",str,g_dpgettext2(NULL,translationContext,str)); gtk_list_store_set (listStore, &iter, 0, str, 1, g_dpgettext2(NULL,translationContext,str), -1); }else{ IBUS_CHEWING_LOG(5,"*** str=%s, _(str)=%s",str,_(str)); gtk_list_store_set (listStore, &iter, 0, str, 1, _(str), -1); } }else{ IBUS_CHEWING_LOG(5,"*** str=%s",str); gtk_list_store_set (listStore, &iter, 0, str, -1); } } static gint listStore_find_string(GtkListStore *listStore,const gchar *str, const gchar *translationContext, MakerDialogPropertyFlags propertyFlags){ g_assert(str); IBUS_CHEWING_LOG(4,"*** listStore_find_string(%s,%u)",str,propertyFlags); int i=0,index=-1; GtkTreeIter iter; GValue gValue={0}; if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(listStore), &iter)){ do{ gtk_tree_model_get_value (GTK_TREE_MODEL(listStore), &iter,0,&gValue); if (strcmp(str,g_value_get_string(&gValue))==0){ index= i; break; } i++; g_value_unset(&gValue); }while(gtk_tree_model_iter_next (GTK_TREE_MODEL(listStore), &iter)); } if (index<0 && !(propertyFlags & MAKER_DIALOG_PROPERTY_FLAG_INEDITABLE)){ /* Add new item*/ listStore_append(listStore, str,translationContext,propertyFlags); index=i; } IBUS_CHEWING_LOG(4,",listStore_find_string(%s,%u) index=%d",str,propertyFlags,index); return index; } static gint combo_find_string_index(GtkComboBox *combo,const gchar *str, const gchar *translationContext, MakerDialogPropertyFlags propertyFlags){ GtkListStore *listStore=GTK_LIST_STORE(gtk_combo_box_get_model(combo)); return listStore_find_string(listStore,str, translationContext,propertyFlags); } static const gchar *combo_get_active_text(GtkComboBox *combo,GValue *gValue){ GtkTreeIter iter; if (!gtk_combo_box_get_active_iter(combo,&iter)){ return NULL; } GtkListStore *listStore=GTK_LIST_STORE(gtk_combo_box_get_model(combo)); gtk_tree_model_get_value (GTK_TREE_MODEL(listStore), &iter,0,gValue); return g_value_get_string(gValue); } static void propList_free_deep_callback(gpointer data, gpointer user_data){ propertyContext_free(data); } static gchar *widget_get_id(gchar *buffer, gint buffer_size, const gchar *widget_label, const gchar *widget_type){ g_snprintf(buffer,buffer_size,"%s%s%s%s", WIDGET_ID_PREFIX, widget_label, (widget_type)? "_" : "", (widget_type)? widget_type : "" ); return buffer; } /*===== Widget Callback function wraps =====*/ static void on_comboBox_changed_wrap (GtkComboBox *comboBox, gpointer user_data) { PropertyContext *ctx=(PropertyContext *)user_data; GValue value={0}; combo_get_active_text(comboBox, &value); IBUS_CHEWING_LOG(2,"on_comboBox_changed_wrap(), key=%s value=%s",ctx->spec->key,g_value_get_string(&value)); ctx->spec->setFunc(ctx,&value); } static void on_entry_activate_wrap (GtkEntry *entry, gpointer user_data) { PropertyContext *ctx=(PropertyContext *)user_data; GValue value={0}; g_value_init(&value, ctx->spec->valueType); g_value_set_string(&value,gtk_entry_get_text(entry)); IBUS_CHEWING_LOG(2,"on_entry_activate_wrap(), key=%s value=%s",ctx->spec->key,g_value_get_string(&value)); ctx->spec->setFunc(ctx,&value); } static void on_spinButton_value_changed_wrap (GtkSpinButton *button, gpointer user_data) { PropertyContext *ctx=(PropertyContext *)user_data; GValue value={0}; g_value_init(&value, ctx->spec->valueType); switch(ctx->spec->valueType){ case G_TYPE_INT: g_value_set_int(&value,(gint) gtk_spin_button_get_value(button)); IBUS_CHEWING_LOG(2,"on_spinButton_value_changed_wrap(), key=%s value=%d", ctx->spec->key,g_value_get_int(&value)); break; case G_TYPE_UINT: g_value_set_uint(&value,(guint) gtk_spin_button_get_value(button)); IBUS_CHEWING_LOG(2,"on_spinButton_value_changed_wrap(), key=%s value=%u", ctx->spec->key,g_value_get_uint(&value)); break; case G_TYPE_DOUBLE: g_value_set_uint(&value, gtk_spin_button_get_value(button)); IBUS_CHEWING_LOG(2,"on_spinButton_value_changed_wrap(), key=%s value=%g", ctx->spec->key,g_value_get_double(&value)); break; default: break; } ctx->spec->setFunc(ctx,&value); } static void on_toggleButton_toggled_wrap (GtkToggleButton *button, gpointer user_data) { PropertyContext *ctx=(PropertyContext *)user_data; GValue value={0}; g_value_init(&value, ctx->spec->valueType); g_value_set_boolean(&value, gtk_toggle_button_get_active(button)); IBUS_CHEWING_LOG(2,"on_entry_activate_wrap(), key=%s value=%s",ctx->spec->key,g_value_get_string(&value)); ctx->spec->setFunc(ctx,&value); } /*===== End of Widget Callback function wraps =====*/ static gboolean isEmptyString(const gchar *str){ if (!str) return TRUE; if (str[0]=='\0') return TRUE; return FALSE; } typedef enum{ XML_TAG_TYPE_NO_TAG, XML_TAG_TYPE_EMPTY, XML_TAG_TYPE_SHORT, XML_TAG_TYPE_LONG, XML_TAG_TYPE_BEGIN_ONLY, XML_TAG_TYPE_END_ONLY, } XmlTagsType; #define INDENT_SPACES 4 static void append_indent_space(GString *strBuf, gint indentLevel){ int i,indentLen=indentLevel*INDENT_SPACES; for(i=0;i", (type==XML_TAG_TYPE_END_ONLY) ? "/": "", (!isEmptyString(tagName))? tagName : "", (!isEmptyString(attribute)) ? " ":"", (!isEmptyString(attribute))? attribute : "", (type==XML_TAG_TYPE_EMPTY) ? "/": "" ); } if (type==XML_TAG_TYPE_EMPTY) return strBuf; if (type==XML_TAG_TYPE_BEGIN_ONLY) return strBuf; if (type==XML_TAG_TYPE_END_ONLY) return strBuf; if (type==XML_TAG_TYPE_LONG){ g_string_append_c(strBuf,'\n'); } if (value){ if (type==XML_TAG_TYPE_LONG || type==XML_TAG_TYPE_NO_TAG){ append_indent_space(strBuf,indentLevel+1); int i, valueLen=strlen(value); for(i=0;i",tagName); } return strBuf; } static void xml_tags_write(FILE *outF, const gchar *tagName, XmlTagsType type, const gchar *attribute, const gchar *value){ static int indentLevel=0; if (type==XML_TAG_TYPE_END_ONLY) indentLevel--; GString *strBuf=xml_tags_to_string(tagName, type, attribute, value, indentLevel); IBUS_CHEWING_LOG(3,",xml_tags_write:%s",strBuf->str); fprintf(outF,"%s\n",strBuf->str); if (type==XML_TAG_TYPE_BEGIN_ONLY) indentLevel++; g_string_free(strBuf,TRUE); } typedef struct{ const gchar *schemasHome; const gchar *owner; const gchar *locales; FILE *outF; } SchemasFileData; static void ctx_write_locale(PropertyContext *ctx, SchemasFileData *sData, const gchar *localeStr){ gchar buf[50]; g_snprintf(buf,50,"name=\"%s\"",localeStr); setlocale(LC_MESSAGES,localeStr); xml_tags_write(sData->outF,"locale",XML_TAG_TYPE_BEGIN_ONLY,buf,NULL); xml_tags_write(sData->outF,"short",XML_TAG_TYPE_SHORT,NULL, gettext(ctx->spec->label)); xml_tags_write(sData->outF,"long",XML_TAG_TYPE_LONG,NULL, gettext(ctx->spec->tooltip)); xml_tags_write(sData->outF,"locale",XML_TAG_TYPE_END_ONLY,NULL,NULL); } static void ctx_write_callback(gpointer data, gpointer user_data){ PropertyContext *ctx=(PropertyContext *) data; SchemasFileData *sData=(SchemasFileData *) user_data; xml_tags_write(sData->outF,"schema",XML_TAG_TYPE_BEGIN_ONLY,NULL,NULL); gchar buf[STRING_BUFFER_SIZE_DEFAULT]; g_snprintf(buf,STRING_BUFFER_SIZE_DEFAULT,"/schemas%s/%s",sData->schemasHome,ctx->spec->key); xml_tags_write(sData->outF,"key",XML_TAG_TYPE_SHORT,NULL,buf); xml_tags_write(sData->outF,"applyto",XML_TAG_TYPE_SHORT,NULL,buf+strlen("/schemas")); xml_tags_write(sData->outF,"owner",XML_TAG_TYPE_SHORT,NULL,sData->owner); switch(ctx->spec->valueType){ case G_TYPE_BOOLEAN: xml_tags_write(sData->outF,"type",XML_TAG_TYPE_SHORT,NULL,"bool"); break; case G_TYPE_INT: case G_TYPE_UINT: xml_tags_write(sData->outF,"type",XML_TAG_TYPE_SHORT,NULL,"int"); break; case G_TYPE_STRING: xml_tags_write(sData->outF,"type",XML_TAG_TYPE_SHORT,NULL,"string"); break; default: break; } if (ctx->spec->defaultValue){ xml_tags_write(sData->outF,"default",XML_TAG_TYPE_SHORT,NULL,ctx->spec->defaultValue); } gchar **localeArray=g_strsplit_set(sData->locales,":;",-1); int i; for(i=0;localeArray[i]!=NULL;i++){ ctx_write_locale(ctx,sData,localeArray[i]); } setlocale(LC_ALL,NULL); xml_tags_write(sData->outF,"schema",XML_TAG_TYPE_END_ONLY,NULL,NULL); } typedef struct{ MakerDialog *self; gint currentMaxWidth; const gchar *pageName; gfloat xalign; gfloat yalign; } WidgetAlignment; static void caculate_max_label_width_callback(gpointer key, gpointer value, gpointer user_data){ WidgetAlignment *wAlignment=(WidgetAlignment *) user_data; if (!isEmptyString(wAlignment->pageName)){ if (isEmptyString(value) || strcmp(wAlignment->pageName,value)!=0) return; } gchar *keyStr=(gchar *) keyStr; GtkWidget *widget=maker_dialog_get_widget(wAlignment->self,key,"label"); GtkRequisition requisition; gtk_widget_size_request (widget,&requisition); wAlignment->currentMaxWidth=MAX(wAlignment->currentMaxWidth, requisition.width); } static void set_label_width_callback(gpointer key, gpointer value, gpointer user_data){ WidgetAlignment *wAlignment=(WidgetAlignment *) user_data; if (!isEmptyString(wAlignment->pageName)){ if (isEmptyString(value) || strcmp(wAlignment->pageName,value)!=0) return; } gchar *keyStr=(gchar *) keyStr; GtkWidget *widget=maker_dialog_get_widget(wAlignment->self,key,"label"); gtk_widget_set_size_request(widget, wAlignment->currentMaxWidth,-1); gtk_misc_set_alignment (GTK_MISC(widget),wAlignment->xalign,wAlignment->yalign); gtk_widget_show(widget); } /** * atob: * @string: A string. * @returns: Boolean value represented by @string. * * String to boolean. * It returns FALSE if: * 1. @string is NULL or have 0 length. * 2. @string starts with 'F', 'f', 'N' or 'n'. * 3. @string can be converted to a numeric 0. * * Everything else is TRUE. */ gboolean atob(const gchar *string){ if (!string) return FALSE; if (strlen(string)<=0) return FALSE; if (string[0]=='F' || string[0]=='f' || string[0]=='N' || string[0]=='n') return FALSE; char *endPtr=NULL; long int longValue=strtol(string, &endPtr, 10); if (longValue==0 && *endPtr=='\0'){ // 0 return FALSE; } return TRUE; } ibus-chewing-1.4.10.1-Source/src/IBusChewingEngine.gob000664 001750 001750 00000116201 12266510632 022545 0ustar00dchendchen000000 000000 requires 2.0.0 %alltop{ /* * Copyright © 2009,2010 Red Hat, Inc. All rights reserved. * Copyright © 2009,2010 Ding-Yi Chen * * This file is part of the ibus-chewing Project. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include #include #include #include #include #define GETTEXT_PACKAGE "gtk20" #include #include #include #include #include #include #include "ibus-chewing-util.h" %} enum CHEWING_KBTYPE{ INVALID=-1, DEFAULT, HSU, IBM, GIN_YIEH, ETEN, ETEN26, DVORAK, DVORAK_HSU, DACHEN_CP26, HAN_YU } Chewing:KbType; enum CHEWING_MODIFIER_SYNC{ DISABLE, FROM_KEYBOARD, FROM_IM } Chewing:Modifier:Sync; enum CHEWING_INPUT_STYLE{ IN_APPLICATION, IN_CANDIDATE, } Chewing:Input:Style; /** * ChewingInputMode: * @BYPASS: Bypass the cursor movement keys. * @EDITING: Forming Chinese character (in pre-edit buffer). * @SELECTING: Start Selecting candidate. Immediately after character is formed. * @SELECTING_CONTINUE: Still selecting candidate,. * @SELECTION_DONE: A candidate is manually selected. * * Chewing input (key handling) mode. */ enum CHEWING_INPUT_MODE{ BYPASS, EDITING, SELECTING, SELECTING_CONTINUE, SELECTION_DONE } Chewing:Input:Mode; enum CHEWING_OUTPUT_CHARSET{ AUTO, BIG5, UTF8 } Chewing:Output:Charset; /** * ChewingFlag: * @PLAIN_ZHUYIN: Plain chewing mode (no AI). * @FORCE_LOWERCASE_ENGLISH: Force Lowercase even when CapsLock is on. * @NUMPAD_ALWAYS_NUMBER: Key from num pad should always produce number. * @EASY_SYMBOL_INPUT: Symbols can be inputed by pressing Shift->[key] * * Chewing flags stores configuration switches. * The flags are only changed when initializing or preferences are changed. */ enum CHEWING_FLAG{ PLAIN_ZHUYIN= 0x1, FORCE_LOWERCASE_ENGLISH= 0x2, NUMPAD_ALWAYS_NUMBER= 0x4, EASY_SYMBOL_INPUT= 0x8, } Chewing:Flag; /** * EngineStatus: * @INITIALIZED: Engine is initialized. * @ENABLED: Engine is enabled. * @FOCUS_IN: Engine gets focus. * @SHOW_CANDIDATE: Whether the candidate selection should be shown. Important for Plain Zhuyin. * @NEED_COMMIT: There's Something to commit. * @FORCE_COMMIT: The engine should commit * @IS_PASSWORD: Current input is password. * @IS_ENGLISH: English mode * * Engine status show the current states of engine, * Thus this will change quite often. * * libChewing does not have direct method to clean commit buffer. * Thus NEED_COMMIT is needed to prevent unnecessary commit. */ enum ENGINE_STATUS{ INITIALIZED= 0x1, ENABLED= 0x2, FOCUS_IN= 0x4, SHOW_CANDIDATE= 0x8, NEED_COMMIT= 0x10, FORCE_COMMIT= 0x20, IS_PASSWORD= 0x40, } Engine:Status; %h{ #include "maker-dialog.h" #define GCONF_KEY_PREFIX "/desktop/ibus/engine/Chewing/" /* For easy symbol input work around */ #define EASY_SYMBOL_INPUT_WORK_AROUND extern PropertySpec propSpecs[]; extern const gchar *page_labels[]; extern const gchar *button_labels[]; extern GtkResponseType button_responses[]; #define ZHUYIN_BUFFER_SIZE 12 #define ibus_chewing_engine_set_status_flag(cengine,f) cengine->_priv->statusFlags |= f #define ibus_chewing_engine_clear_status_flag(cengine,f) cengine->_priv->statusFlags &= ~f #define IBUS_CHEWING_LOG(level, msg, args...) \ switch (level){\ case 0:\ g_warning(msg, ##args);break;\ case 1:\ g_message(msg, ##args);break;\ case 2:\ g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, msg, ##args);break;\ default:\ g_debug(msg, ##args);break;\ } %} %privateheader{ void ibus_chewing_engine_handle_Default(IBusChewingEngine *self, guint keyval, gboolean shiftPressed); #define self_handle_Default ibus_chewing_engine_handle_Default gboolean ibus_chewing_engine_process_key_event(IBusEngine *engine, guint keysym, guint keycode, guint modifiers); void ibus_chewing_engine_candidate_clicked(IBusEngine *engine, guint index, guint button, guint state); void ibus_chewing_engine_property_activate(IBusEngine *engine, const gchar *prop_name, guint prop_state); void ibus_chewing_engine_set_content_type(IBusEngine *engine, guint purpose, guint hints); %} %{ extern gint ibus_chewing_verbose; //extern IBusConfig *iConfig; #define IBUS_CHEWING_MAIN #include "IBusChewingEngine-def.c" %} class IBus:Chewing:Engine from IBus:Engine{ public ChewingContext *context=NULL destroywith chewing_delete; public Chewing:Modifier:Sync syncCapsLock_local=CHEWING_MODIFIER_SYNC_DISABLE; public GtkWidget *setting_dialog={ GTK_WIDGET(maker_dialog_new_full(_("Setting"),3,page_labels,1,button_labels,button_responses))}; protected gint selKeys[MAX_SELKEY]; protected ChewingInputMode inputMode=CHEWING_INPUT_MODE_BYPASS; /* Controlling flags */ protected ChewingFlag chewingFlags=0; /* Log file */ protected FILE *logFile=NULL; /* Indicate the string is commited to avoid update() set NEED_COMMIT status again when focus in event is triiger, because the last key is Return key and libchewing is still Commit state. */ //public guint hasCommit=0; private guint statusFlags=0; /* For easy symbol input work around */ private ChewingInputStyle inputStyle; protected IBusLookupTable *table=NULL destroywith ibus_lookup_table_clear; public IBusProperty *chieng_prop={ g_object_ref_sink ( ibus_property_new("chewing_chieng_prop",PROP_TYPE_NORMAL, SELF_GET_CLASS(self)->chieng_prop_label_chi, NULL, SELF_GET_CLASS(self)->chieng_prop_tooltip_chi, TRUE, TRUE, PROP_STATE_UNCHECKED, NULL)) } destroywith g_object_unref; public IBusProperty *alnumSize_prop={ g_object_ref_sink ( ibus_property_new("chewing_alnumSize_prop",PROP_TYPE_NORMAL, SELF_GET_CLASS(self)->alnumSize_prop_label_half, NULL, NULL, TRUE, TRUE, PROP_STATE_UNCHECKED, NULL)) } destroywith g_object_unref; public IBusProperty *settings_prop={ g_object_ref_sink ( ibus_property_new("chewing_settings_prop",PROP_TYPE_TOGGLE, SELF_GET_CLASS(self)->settings_prop_label, quote_me(PRJ_DATA_DIR) "/icons/settings.png", NULL, TRUE, TRUE, PROP_STATE_UNCHECKED, NULL)) } destroywith g_object_unref; public IBusPropList *prop_list={ g_object_ref_sink (ibus_prop_list_new()) } destroywith g_object_unref; public IBusConfig *config=NULL; protected IBusKeymap *keymap_us={ibus_keymap_get("us")}; private Display *pDisplay = {XOpenDisplay( NULL )} destroywith XCloseDisplay; private guint key_last=0; private gchar zhuyin_latest[ZHUYIN_BUFFER_SIZE]; classwide IBusText *chieng_prop_label_chi={ g_object_ref_sink(ibus_text_new_from_static_string(_("Chi")))}; classwide IBusText *chieng_prop_label_eng={ g_object_ref_sink(ibus_text_new_from_static_string(_("Eng")))}; classwide IBusText *chieng_prop_tooltip_chi={ g_object_ref_sink(ibus_text_new_from_static_string(_("Click to switch to English")))}; classwide IBusText *chieng_prop_tooltip_eng={ g_object_ref_sink(ibus_text_new_from_static_string(_("Click to switch to Chinese")))}; classwide IBusText *alnumSize_prop_label_full={ g_object_ref_sink(ibus_text_new_from_static_string(_("Full")))}; classwide IBusText *alnumSize_prop_label_half={ g_object_ref_sink(ibus_text_new_from_static_string(_("Half")))}; classwide IBusText *settings_prop_label={ g_object_ref_sink(ibus_text_new_from_static_string(_("Settings")))}; classwide IBusText *emptyText={ g_object_ref_sink(ibus_text_new_from_static_string(""))}; init (self) { /* initialize the object here */ gchar *logFilename=getenv ("IBUS_CHEWING_LOGFILE"); if (logFilename!=NULL){ self->logFile=fopen(logFilename, "w+"); if (self->logFile==NULL){ g_warning("Cannot write to logfile %s, ignored\n", logFilename); } } g_log_set_handler (NULL, G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, ibus_chewing_log_handler, self); IBUS_CHEWING_LOG(1,"****[I1] init() %sinitialized",(self->_priv->statusFlags & ENGINE_STATUS_INITIALIZED)? "": "un" ); if (!(self->_priv->statusFlags & ENGINE_STATUS_INITIALIZED)){ maker_dialog_set_verbose_level(MAKER_DIALOG(self->setting_dialog),ibus_chewing_verbose); gchar buf[100]; g_snprintf(buf,100,"%s/.chewing",getenv("HOME")); IBUS_CHEWING_LOG(6,"[I6] init() CHEWING_DATADIR=%s", quote_me(CHEWING_DATADIR) ); chewing_Init(quote_me(CHEWING_DATADIR), buf); self->context=chewing_new(); chewing_set_ChiEngMode(self->context, CHINESE_MODE); self->inputMode=CHEWING_INPUT_MODE_SELECTION_DONE; /* init properties */ ibus_prop_list_append(self->prop_list,self->chieng_prop); ibus_prop_list_append(self->prop_list,self->alnumSize_prop); ibus_prop_list_append(self->prop_list,self->settings_prop); ibus_chewing_engine_set_status_flag(self,ENGINE_STATUS_INITIALIZED); } } class_init(klass){ ibus_engine_class->property_activate= ibus_chewing_engine_property_activate; ibus_engine_class->process_key_event = ibus_chewing_engine_process_key_event; ibus_engine_class->candidate_clicked = ibus_chewing_engine_candidate_clicked; #if IBUS_CHECK_VERSION(1, 5, 4) ibus_engine_class->set_content_type = ibus_chewing_engine_set_content_type; #endif } private void load_setting(self){ #define BUFFER_SIZE_LOCAL 200 IBUS_CHEWING_LOG(3,"[I3] load_setting()"); #if IBUS_CHECK_VERSION(1, 4, 0) GError *error=NULL; GDBusConnection *connection=ibus_service_get_connection(IBUS_SERVICE(self)); self->config=g_object_ref_sink(ibus_config_new (connection, NULL, &error)); g_assert(error==NULL); #else GList *connections_list=ibus_service_get_connections(IBUS_SERVICE(self)); g_assert(connections_list); g_assert(connections_list->data); IBusConnection *iConnection=(IBusConnection *) connections_list->data; self->config=g_object_ref_sink(ibus_config_new(iConnection)); #endif int i; gchar buf[BUFFER_SIZE_LOCAL]; for (i=0; propSpecs[i].valueType!=G_TYPE_INVALID;i++){ GValue gValue={0}; IBUS_CHEWING_LOG(4,"[I4] load_setting(), i=%d",i); if (ibus_chewing_config_get_value(self->config, "engine/Chewing", propSpecs[i].key, &gValue)){ switch(propSpecs[i].valueType){ case G_TYPE_BOOLEAN: buf[0]=(g_value_get_boolean(&gValue))? '1' : '0'; buf[1]='\0'; break; case G_TYPE_UINT: g_snprintf(buf,BUFFER_SIZE_LOCAL,"%u", g_value_get_uint(&gValue)); break; case G_TYPE_INT: g_snprintf(buf,BUFFER_SIZE_LOCAL,"%d", g_value_get_int(&gValue)); break; case G_TYPE_STRING: g_strlcpy(buf, g_value_get_string(&gValue), BUFFER_SIZE_LOCAL); break; default: break; } }else{ g_warning("[WW] %s /desktop/ibus/engine/Chewing/%s, %s %s", _("Warning: cannot load configure key"), propSpecs[i].key, (propSpecs[i].defaultValue)? _(" Use default value:") : _(" No default value, skipped.") , (propSpecs[i].defaultValue)? propSpecs[i].defaultValue : "" ); if (propSpecs[i].defaultValue){ g_strlcpy(buf,propSpecs[i].defaultValue, BUFFER_SIZE_LOCAL); }else{ continue; } } /* Add property to dialog */ maker_dialog_add_property(MAKER_DIALOG(self->setting_dialog),&propSpecs[i],buf,self); maker_dialog_apply_widget_value(MAKER_DIALOG(self->setting_dialog),propSpecs[i].key); if (G_IS_VALUE(&gValue)){ g_value_unset(&gValue); } } for (i=0; page_labels[i]!=NULL;i++){ maker_dialog_align_labels(MAKER_DIALOG(self->setting_dialog),page_labels[i],1.0f, 0.5f); } gtk_widget_show_all(GTK_WIDGET(MAKER_DIALOG(self->setting_dialog)->dialog_notebook)); #undef BUFFER_SIZE_LOCAL } protected void restore_mode(self){ gint isCapsLockOff=(is_caps_led_on(self->_priv->pDisplay)) ? 0: 1; gint isChinese=chewing_get_ChiEngMode(self->context); switch(self->syncCapsLock_local){ case CHEWING_MODIFIER_SYNC_FROM_KEYBOARD: chewing_set_ChiEngMode(self->context, isCapsLockOff); break; case CHEWING_MODIFIER_SYNC_FROM_IM: if (isChinese!=isCapsLockOff){ set_caps_led(!isChinese, self->_priv->pDisplay); } break; case CHEWING_MODIFIER_SYNC_DISABLE: break; } self_refresh_property(self,"chewing_chieng_prop"); } protected void set_lookup_table_label(self,const gchar *labels){ int i,len=strlen(labels); g_array_set_size(self->table->labels,0); for(i=0;itable,text); } } private gchar *make_preedit_string(self, gint *zhuyin_item_written_ptr){ gchar *buff_str=chewing_buffer_String(self->context); IBUS_CHEWING_LOG(4, "[I4] make_preedit_string(): chewing_buffer_String=%s ", buff_str); int chiSymbolCursor = chewing_cursor_Current(self->context); int zhuyin_count; int zhuyin_tone=-1; gchar *zhuyin_str=chewing_zuin_String(self->context,&zhuyin_count); *zhuyin_item_written_ptr= zhuyin_count; IBUS_CHEWING_LOG(5, "[I5] make_preedit_string(): chewing_zuin_String=%s count=%d inputMode=%d", zhuyin_str,zhuyin_count,self->inputMode); switch(self->inputMode){ case CHEWING_INPUT_MODE_EDITING: g_strlcpy(self->_priv->zhuyin_latest,zhuyin_str,ZHUYIN_BUFFER_SIZE); zhuyin_tone=0; break; case CHEWING_INPUT_MODE_SELECTING: zhuyin_tone=get_tone(chewing_get_KBType(self->context),self->_priv->key_last); add_tone(self->_priv->zhuyin_latest,zhuyin_tone); if (zhuyin_tone>0 ){ if (self->chewingFlags & CHEWING_FLAG_PLAIN_ZHUYIN){ /* Open candidate selection window */ if (chewing_get_spaceAsSelection(self->context)){ chewing_handle_Space(self->context); }else{ chewing_handle_Down(self->context); } } } break; case CHEWING_INPUT_MODE_SELECTING_CONTINUE: /* Do Nothing, as the action has been taken by * either chewing_handle_Space, chewing_handle_Left, * or chewing_handle_Right */ break; case CHEWING_INPUT_MODE_SELECTION_DONE: self->_priv->zhuyin_latest[0]='\0'; zhuyin_tone=-1; if (zhuyin_count) self->inputMode=CHEWING_INPUT_MODE_EDITING; break; default: /* BYPASS */ break; } gsize len=strlen(zhuyin_str)+strlen(buff_str); gchar *preeditBuf=g_new(gchar, len+1); preeditBuf[0]='\0'; if (chiSymbolCursor>0){ g_utf8_strncpy(preeditBuf, buff_str, chiSymbolCursor); } gsize zhuyin_start=strlen(preeditBuf); /* Inserting zhuyinBuf */ if (zhuyin_count>0){ g_strlcat(preeditBuf,zhuyin_str,len+1); } /* Append rest chiSymbolBuf */ g_strlcat(preeditBuf,buff_str+zhuyin_start, len+1); g_free(buff_str); g_free(zhuyin_str); IBUS_CHEWING_LOG(4, "[I4] make_preedit_string(): return preedit=%s zhuyin_latest=%s zhuyin_tone=%d inputMode=%d", preeditBuf, self->_priv->zhuyin_latest,zhuyin_tone,self->inputMode); return preeditBuf; } private void show_lookup_table(self, gboolean isShow){ ibus_engine_update_lookup_table(IBUS_ENGINE(self),self->table,isShow); if (isShow){ ibus_chewing_engine_set_status_flag(self,ENGINE_STATUS_SHOW_CANDIDATE); ibus_engine_show_lookup_table(IBUS_ENGINE(self)); }else{ ibus_engine_hide_lookup_table(IBUS_ENGINE(self)); ibus_chewing_engine_clear_status_flag(self,ENGINE_STATUS_SHOW_CANDIDATE); } } private void update_lookup_table(self){ ibus_lookup_table_clear(self->table); int i=0; char *candidate=NULL; IBusText *iText=NULL; IBUS_CHEWING_LOG(4,"[I4] update_lookup_table() CurrentPage=%d", chewing_cand_CurrentPage(self->context)); if (self->inputMode==CHEWING_INPUT_MODE_SELECTING){ int choicePerPage=chewing_cand_ChoicePerPage(self->context); chewing_cand_Enumerate(self->context); for(i=0;icontext)){ candidate=chewing_cand_String(self->context); iText=g_object_ref_sink(ibus_text_new_from_string (candidate)); ibus_lookup_table_append_candidate(self->table,iText); g_free(candidate); g_object_unref (iText); }else{ break; } } self_show_lookup_table(self, TRUE); }else{ self_show_lookup_table(self, FALSE); } } /* Apply IBusText attributes */ private IBusText *decorate_preedit(self, gchar *preeditBuf, gint *chiSymbolCursor, gint zhuyin_item_written){ IBusText *iText=g_object_ref_sink(ibus_text_new_from_string(preeditBuf)); *chiSymbolCursor = chewing_cursor_Current(self->context); IBUS_CHEWING_LOG(4,"[I4] decorate_preedit() chiSymbolCursor=%d preeditBuf=%s statusFlags=%x", *chiSymbolCursor,preeditBuf, self->_priv->statusFlags); g_free(preeditBuf); gint cursorRight=0; gint charLen=(gint) g_utf8_strlen(iText->text, -1); cursorRight=*chiSymbolCursor + zhuyin_item_written; IBUS_CHEWING_LOG(5,"[I5] decorate_preedit() charLen=%d cursorRight=%d", charLen, cursorRight); IntervalType it; chewing_interval_Enumerate(self->context); it.from=0; it.to=charLen; int phase=1; int last=0; int i; if(chewing_interval_hasNext(self->context)) chewing_interval_Get(self->context,&it); for(i=0;i0)?IBUS_ATTR_UNDERLINE_SINGLE:IBUS_ATTR_UNDERLINE_LOW, last, i+1); phase*=-1; } last=i+1; if(chewing_interval_hasNext(self->context)){ chewing_interval_Get(self->context,&it); if(it.from>=*chiSymbolCursor){ it.from+=zhuyin_item_written; it.to+=zhuyin_item_written; } } }else{ if(last < i){ ibus_text_append_attribute (iText, IBUS_ATTR_TYPE_UNDERLINE, (phase>0)?IBUS_ATTR_UNDERLINE_SINGLE:IBUS_ATTR_UNDERLINE_LOW, last, i); phase*=-1; } last=i; } } } return iText; } private void update_aux_string(self, IBusText *preeditIText){ IBUS_CHEWING_LOG(4,"[I4] update_aux_string() statusFlags=%x", self->_priv->statusFlags); IBusText *iText=NULL; switch (self->_priv->inputStyle){ case CHEWING_INPUT_STYLE_IN_APPLICATION: if (chewing_aux_Length(self->context)>0){ gchar *aux_string=chewing_aux_String(self->context); iText=g_object_ref_sink(ibus_text_new_from_string (aux_string)); ibus_engine_update_auxiliary_text(IBUS_ENGINE(self),iText,TRUE); g_object_unref (iText); ibus_engine_show_auxiliary_text(IBUS_ENGINE(self)); g_free(aux_string); }else{ ibus_engine_hide_auxiliary_text(IBUS_ENGINE(self)); } break; case CHEWING_INPUT_STYLE_IN_CANDIDATE: if (self->inputMode==CHEWING_INPUT_MODE_BYPASS){ ibus_engine_hide_auxiliary_text(IBUS_ENGINE(self)); }else{ ibus_engine_update_auxiliary_text(IBUS_ENGINE(self),preeditIText,TRUE); ibus_engine_show_auxiliary_text(IBUS_ENGINE(self)); } break; } } private void update_preedit(self, IBusText *preeditIText,gint chiSymbolCursor){ IBUS_CHEWING_LOG(5,"[I5] update_preedit() text=%s statusFlags=%x", preeditIText->text, self->_priv->statusFlags); int mode; if(g_utf8_strlen(preeditIText->text, -1)>0) mode=IBUS_ENGINE_PREEDIT_COMMIT; else mode=IBUS_ENGINE_PREEDIT_CLEAR; ibus_engine_update_preedit_text (IBUS_ENGINE(self),SELF_GET_CLASS(self)->emptyText, 0, TRUE); switch (self->_priv->inputStyle){ case CHEWING_INPUT_STYLE_IN_APPLICATION: ibus_engine_update_preedit_text_with_mode (IBUS_ENGINE(self),preeditIText, chiSymbolCursor, TRUE, mode); break; case CHEWING_INPUT_STYLE_IN_CANDIDATE: ibus_engine_update_preedit_text_with_mode (IBUS_ENGINE(self),SELF_GET_CLASS(self)->emptyText, 0, TRUE, mode); break; } IBUS_CHEWING_LOG(5,"[I5] update_preedit(): return"); } protected gboolean update(self){ IBUS_CHEWING_LOG(3,"[I3] update() statusFlags=%x", self->_priv->statusFlags); self_determine_input_mode(self); gint chiSymbolCursor; gint zhuyin_item_written; self_check_commit(self); gchar *preeditBuf=self_make_preedit_string(self, &zhuyin_item_written); IBusText *iText=self_decorate_preedit(self, preeditBuf, &chiSymbolCursor, zhuyin_item_written); if (g_object_is_floating(iText)){ g_object_ref_sink(iText); } self_update_aux_string(self, iText); self_update_preedit(self, iText, chiSymbolCursor); g_object_unref(iText); IBUS_CHEWING_LOG(4,"[I4] update() inputMode=%d nPhoneSeq=%d statusFlags=%x", self->inputMode, chewing_get_phoneSeqLen(self->context), self->_priv->statusFlags); self_update_lookup_table(self); gboolean ret=TRUE; if (chewing_keystroke_CheckIgnore(self->context)){ ret=FALSE; } IBUS_CHEWING_LOG(4,"[I4] update() return %s",(ret)? "TRUE": "FALSE"); return ret; } protected void refresh_property(self,const gchar *prop_name){ IBUS_CHEWING_LOG(5,"[I5] refresh_property(%s) status=%x",prop_name, self->_priv->statusFlags); if (strcmp(prop_name,"chewing_chieng_prop")==0){ if (chewing_get_ChiEngMode(self->context)){ /* Chinese */ ibus_property_set_label(self->chieng_prop,SELF_GET_CLASS(self)->chieng_prop_label_chi); ibus_property_set_tooltip(self->chieng_prop,SELF_GET_CLASS(self)->chieng_prop_tooltip_chi); #if IBUS_CHECK_VERSION(1, 5, 4) ibus_property_set_symbol(self->chieng_prop,SELF_GET_CLASS(self)->chieng_prop_label_chi); #endif }else{ ibus_property_set_label(self->chieng_prop,SELF_GET_CLASS(self)->chieng_prop_label_eng); ibus_property_set_tooltip(self->chieng_prop,SELF_GET_CLASS(self)->chieng_prop_tooltip_eng); #if IBUS_CHECK_VERSION(1, 5, 4) ibus_property_set_symbol(self->chieng_prop,SELF_GET_CLASS(self)->chieng_prop_label_eng); #endif } ibus_engine_update_property(IBUS_ENGINE(self),self->chieng_prop); }else if (strcmp(prop_name,"chewing_alnumSize_prop")==0){ if (chewing_get_ShapeMode(self->context)){ /* Full-Sized Shape */ ibus_property_set_label(self->alnumSize_prop,SELF_GET_CLASS(self)->alnumSize_prop_label_full); }else{ /* Half-Sized Shape */ ibus_property_set_label(self->alnumSize_prop,SELF_GET_CLASS(self)->alnumSize_prop_label_half); } ibus_engine_update_property(IBUS_ENGINE(self),self->alnumSize_prop); } } protected gboolean is_password(self){ IBUS_CHEWING_LOG(5, "[I5] is_password = %d", self->chewingFlags & ENGINE_STATUS_IS_PASSWORD); return !!(self->_priv->statusFlags & ENGINE_STATUS_IS_PASSWORD); } /** * refresh_property_list: * @self: this instances. * * Refresh the property list (language bar). */ public void refresh_property_list(self){ self_refresh_property(self,"chewing_chieng_prop"); self_refresh_property(self,"chewing_alnumSize_prop"); self_refresh_property(self,"chewing_settings_prop"); if (self->_priv->statusFlags & (ENGINE_STATUS_ENABLED | ENGINE_STATUS_FOCUS_IN)){ ibus_engine_register_properties(IBUS_ENGINE(self),self->prop_list); IBUS_ENGINE_GET_CLASS(self)->property_show(IBUS_ENGINE(self),"chewing_chieng_prop"); IBUS_ENGINE_GET_CLASS(self)->property_show(IBUS_ENGINE(self),"chewing_alnumSize_prop"); IBUS_ENGINE_GET_CLASS(self)->property_show(IBUS_ENGINE(self),"chewing_settings_prop"); } } /** * hide_property_list: * @self: this instances. * * Hide the property list (language bar). */ public void hide_property_list(self){ IBUS_ENGINE_GET_CLASS(self)->property_hide(IBUS_ENGINE(self),"chewing_chieng_prop"); IBUS_ENGINE_GET_CLASS(self)->property_hide(IBUS_ENGINE(self),"chewing_alnumSize_prop"); IBUS_ENGINE_GET_CLASS(self)->property_hide(IBUS_ENGINE(self),"chewing_settings_prop"); } /** * save_config: * @self: this instances. * @key_suffix: key to be set. * @returns: TRUE if successful, FALSE otherwise. * * Save the property value to disk. */ public gboolean save_config(self, const gchar *key_suffix){ IBUS_CHEWING_LOG(1,"[I1] save_config(%s,-)",key_suffix); GValue gValue={0}; maker_dialog_get_widget_value(MAKER_DIALOG(self->setting_dialog),key_suffix,&gValue); return ibus_chewing_config_set_value (self->config, "engine/Chewing", key_suffix,&gValue); } /** * save_config_all: * @self: this instances. * @key_suffix: key to be set. * @returns: TRUE if all successful, FALSE otherwise. * * Save alll property values to disk. */ public gboolean save_config_all(self){ int i; gboolean success=TRUE; for(i=0;propSpecs[i].valueType!=G_TYPE_INVALID;i++){ if (!self_save_config(self,propSpecs[i].key)){ success=FALSE; } } return success; } protected gboolean is_selectKey(self, guint keyval){ gint j; for (j=0;j< MAX_SELKEY;j++){ if (self->selKeys[j]==keyval){ return TRUE; } } return FALSE; } protected void set_selKeys_string(self,const gchar* selKeys_str){ int j; int len_min= MIN(strlen(selKeys_str), MAX_SELKEY); for (j=0;j< len_min;j++){ self->selKeys[j]=(gint) selKeys_str[j]; } chewing_set_selKey(self->context, self->selKeys,len_min); } private IBusProperty* get_iBusProperty(self, const gchar *prop_name){ if (strcmp(prop_name,"chewing_chieng_prop")==0){ return self->chieng_prop; }else if (strcmp(prop_name,"chewing_alnumSize_prop")==0){ return self->alnumSize_prop; }else if (strcmp(prop_name,"chewing_settings_prop")==0){ return self->settings_prop; } IBUS_CHEWING_LOG(2,"[I2] get_iBusProperty(%s): NULL is returned",prop_name); return NULL; } /* * determine_input_mode: * * Determine input mode. */ private void determine_input_mode(self){ gint zhuyin_count=-1; gchar *str_ptr=chewing_zuin_String(self->context,&zhuyin_count); IBUS_CHEWING_LOG(3, "[I3] determine_input_mode(): chewing_zuin_String=%s count=%d inputMode=%d keyLast=%s", str_ptr,zhuyin_count,self->inputMode, keyName_get(self->_priv->key_last)); int zhuyin_tone=-1; gint totalChoice=chewing_cand_TotalChoice(self->context); IBUS_CHEWING_LOG(5, "[I5] determine_input_mode(): TotalChoice=%d", totalChoice); // if (chewing_commit_Check(self->context) // && (self->_priv->key_last==IBUS_Return || self->_priv->key_last==IBUS_KP_Enter)){ // if(!self->hasCommit) // ibus_chewing_engine_set_status_flag(self,ENGINE_STATUS_NEED_COMMIT); // } if (totalChoice >0){ /* Candidate selection mode ensure. */ self->inputMode=CHEWING_INPUT_MODE_SELECTING; }else if (zhuyin_count>0){ /* Incomplete Character*/ self->inputMode=CHEWING_INPUT_MODE_EDITING; }else{ /* Character/Phrase is completed. */ switch(self->inputMode){ case CHEWING_INPUT_MODE_BYPASS: if (chewing_buffer_Len(self->context)>0){ /* Has punctuation mark in buffer */ self->inputMode=CHEWING_INPUT_MODE_SELECTING; } break; case CHEWING_INPUT_MODE_EDITING: zhuyin_tone=get_tone(chewing_get_KBType(self->context),self->_priv->key_last); if (zhuyin_tone>0 ){ if (self->chewingFlags & CHEWING_FLAG_PLAIN_ZHUYIN){ /* For plain zhuyin, Enter SELECTING mode */ self->inputMode=CHEWING_INPUT_MODE_SELECTING; }else{ /* For normal zhuyin, Enter SELECTION_DONE mode */ self->inputMode=CHEWING_INPUT_MODE_SELECTION_DONE; } } break; case CHEWING_INPUT_MODE_SELECTING: /* ESC to cancel input mode */ if (self->chewingFlags & CHEWING_FLAG_PLAIN_ZHUYIN && chewing_get_escCleanAllBuf(self->context) && self->_priv->key_last == IBUS_Escape) { /* Close candidate window */ self->inputMode=CHEWING_INPUT_MODE_SELECTION_DONE; chewing_handle_Esc(self->context); ibus_chewing_engine_clear_status_flag(self, ENGINE_STATUS_SHOW_CANDIDATE); break; } /* Switch to another page */ if (self_is_selectKey(self, self->_priv->key_last)){ self->inputMode=CHEWING_INPUT_MODE_SELECTION_DONE; }else{ switch(self->_priv->key_last){ case ' ': /* Space to next page */ if (!chewing_get_spaceAsSelection(self->context)){ break; } case IBUS_Left: case IBUS_KP_Left: case IBUS_Right: case IBUS_KP_Right: self->inputMode=CHEWING_INPUT_MODE_SELECTING_CONTINUE; break; default: break; } } break; case CHEWING_INPUT_MODE_SELECTING_CONTINUE: break; case CHEWING_INPUT_MODE_SELECTION_DONE: /* One of selection keys is pressed */ break; } } if (totalChoice + chewing_buffer_Len(self->context) + zhuyin_count==0){ /* If preedit buffer is empty, then enter BYPASS mode.*/ /* So cursor keys can be used freely. */ self->inputMode=CHEWING_INPUT_MODE_BYPASS; self->_priv->zhuyin_latest[0]='\0'; } g_free(str_ptr); IBUS_CHEWING_LOG(2, "[I2] determine_input_mode() return: zhuyin_latest=%s zhuyin_tone=%d inputMode=%d", self->_priv->zhuyin_latest,zhuyin_tone,self->inputMode); } /* * Clean chewing buffer */ protected void clean_chewing_buffer(self){ /* Save the orig Esc clean buffer state */ gint origState=chewing_get_escCleanAllBuf(self->context); chewing_set_escCleanAllBuf(self->context, TRUE); chewing_handle_Esc(self->context); chewing_set_escCleanAllBuf(self->context, origState); } /* commit string */ protected gboolean commit(self){ gchar *commit_string=chewing_commit_String(self->context); IBUS_CHEWING_LOG(2,"[I2] commit() commit:%s", commit_string); IBusText *iText=g_object_ref_sink(ibus_text_new_from_string(commit_string)); ibus_engine_commit_text(IBUS_ENGINE(self),iText); //self->hasCommit = 1; g_object_unref(iText); chewing_free(commit_string); if ((self->_priv->statusFlags & ENGINE_STATUS_FORCE_COMMIT)){ /* Force commit implies chewing buffer need to be cleaned. */ IBUS_CHEWING_LOG(3,"[I3] _commit() clean chewing buffer for force commit."); self_clean_chewing_buffer(self); ibus_chewing_engine_clear_status_flag(self, ENGINE_STATUS_FORCE_COMMIT); } return TRUE; } /** * check_commit: * * Invoke commit() if NEED_COMMIT and commit flag is TRUE. */ protected gboolean check_commit(self){ gint isCommit=chewing_commit_Check(self->context); gint committed=FALSE; IBUS_CHEWING_LOG(2,"[I2] check_commit() %s statusFlags=%x", (isCommit) ? "TRUE": "FALSE", self->_priv->statusFlags); if (isCommit && (self->_priv->statusFlags & ENGINE_STATUS_NEED_COMMIT)){ self_commit(self); committed =TRUE; } if (!chewing_buffer_Check(self->context)){ /* Buffer is empty, safe to clear the ENGINE_STATUS_NEED_COMMIT */ ibus_chewing_engine_clear_status_flag(self, ENGINE_STATUS_NEED_COMMIT); } return committed; } /** * force_commit: * * Simulate key combos to commit current preedit. * This is triggered by: * + Press text selection key combos, such as Shift-(ArrowKeys) * * Note: From IBus 1.3, focus-out event is already been handled by * ibus_engine_update_preedit_text_with_mode() * 2. * */ protected void force_commit(self){ IBUS_CHEWING_LOG(2,"[I2] force_commit() buffer=%d, commit=%d statusFlags=%x", chewing_buffer_Check(self->context), chewing_commit_Check(self->context), self->_priv->statusFlags); /* Close candidate window */ if (self->_priv->statusFlags & ENGINE_STATUS_SHOW_CANDIDATE){ chewing_handle_Esc(self->context); ibus_chewing_engine_clear_status_flag(self, ENGINE_STATUS_SHOW_CANDIDATE); } /* Remove the incomplete zhuyin symbol */ if (self->inputMode==CHEWING_INPUT_MODE_EDITING) chewing_handle_Esc(self->context); if (chewing_buffer_Check(self->context)){ chewing_handle_Enter(self->context); IBUS_CHEWING_LOG(3,"[I3] force_commit() buffer is not empty."); // if (self->_priv->inputStyle==CHEWING_INPUT_STYLE_IN_CANDIDATE){ // /* But if in IN_CANDIDATE mode, still need to simulate enter. // */ // if (!chewing_commit_Check(self->context)){ // chewing_handle_Enter(self->context); // } // } ibus_chewing_engine_set_status_flag(self, ENGINE_STATUS_FORCE_COMMIT); // self_update(self); } // if (chewing_commit_Check(self->context)){ // IBUS_CHEWING_LOG(3, // "[I3] force_commit() has something to commit. buffer=%d, commit=%d", // chewing_buffer_Check(self->context),chewing_commit_Check(self->context)); // self_update(self); // } } /*============================================ * Overridden Parent (IBusEngine) methods */ override (IBus:Engine) void reset(IBus:Engine *engine){ IBUS_CHEWING_LOG(1,"[I1] reset"); Self *self=SELF(engine); /* Always clean buffer */ self_clean_chewing_buffer(self); ibus_chewing_engine_clear_status_flag(self, ENGINE_STATUS_FORCE_COMMIT | ENGINE_STATUS_NEED_COMMIT); ibus_lookup_table_clear(self->table); /* Save KBType type, becaue chewing_Reset() will reset it to default. */ int kbType=chewing_get_KBType(self->context); chewing_Reset(self->context); chewing_set_KBType(self->context,kbType); ibus_engine_hide_auxiliary_text(engine); ibus_engine_hide_lookup_table(engine); ibus_engine_update_preedit_text(engine, SELF_GET_CLASS(self)->emptyText, 0, FALSE ); } override (IBus:Engine) void page_up(IBus:Engine *engine){ Self *self=SELF(engine); if (self_is_password(self)) return; chewing_handle_PageUp(self->context); self_update(self); } override (IBus:Engine) void page_down(IBus:Engine *engine){ Self *self=SELF(engine); if (self_is_password(self)) return; chewing_handle_PageDown(self->context); self_update(self); } override (IBus:Engine) void cursor_up(IBus:Engine *engine){ Self *self=SELF(engine); if (self_is_password(self)) return; chewing_handle_Up(self->context); self_update(self); } override (IBus:Engine) void cursor_down(IBus:Engine *engine){ Self *self=SELF(engine); if (self_is_password(self)) return; chewing_handle_Down(self->context); self_update(self); } override (IBus:Engine) void enable(IBus:Engine *engine){ IBUS_CHEWING_LOG(2,"[I2] enable()"); Self *self=SELF(engine); if (!self->config){ self_load_setting(self); } ibus_chewing_engine_set_status_flag(self, ENGINE_STATUS_ENABLED); self_refresh_property_list(self); self->inputMode=CHEWING_INPUT_MODE_SELECTION_DONE; } override (IBus:Engine) void disable(IBus:Engine *engine){ IBUS_CHEWING_LOG(2,"[I2] disable()"); Self *self=SELF(engine); ibus_chewing_engine_clear_status_flag(self,ENGINE_STATUS_ENABLED); self_hide_property_list(self); self->inputMode=CHEWING_INPUT_MODE_BYPASS; } override (IBus:Engine) void focus_in(IBus:Engine *engine){ Self *self=SELF(engine); if (!self->config){ self_load_setting(self); } ibus_chewing_engine_set_status_flag(self, ENGINE_STATUS_FOCUS_IN); self_restore_mode(self); self_refresh_property_list(self); /* Shouldn't have anything to commit when Focus-in */ self_clean_chewing_buffer(self); ibus_chewing_engine_clear_status_flag(self, ENGINE_STATUS_FORCE_COMMIT | ENGINE_STATUS_NEED_COMMIT); // self_update(self); IBUS_CHEWING_LOG(4,"[I4] focus_in(): return"); } override (IBus:Engine) void focus_out(IBus:Engine *engine){ Self *self=SELF(engine); IBUS_CHEWING_LOG(2,"***[I2] focus_out(): statusFlags=%x",self->_priv->statusFlags); ibus_chewing_engine_clear_status_flag(self, ENGINE_STATUS_FOCUS_IN); /* * force commit is no longer needed, * as ibus_engine_update_preedit_text_with_mode now send to focus out with * IBUS_ENGINE_PREEDIT_COMMIT */ // self_force_commit(self); IBUS_CHEWING_LOG(5,"[I5] focus_out(): return"); } override (IBus:Engine) void set_capabilities(IBus:Engine *engine, guint caps){ Self *self=SELF(engine); IBUS_CHEWING_LOG(2,"*** [I2] set_capabilities(%x): statusFlags=%x",caps, self->_priv->statusFlags); } override (IBus:Engine) void property_activate(IBus:Engine *engine, const gchar *prop_name, guint prop_state){ IBUS_CHEWING_LOG(2,"***[I2] property_activate(-, %s, %u)", prop_name, prop_state); Self *self=SELF(engine); gboolean needRefresh=TRUE; if (strcmp(prop_name,"chewing_chieng_prop")==0){ /* Toggle Chinese <-> English */ gint isChinese=chewing_get_ChiEngMode(self->context); gint setChinese = (isChinese) ? 0:1; chewing_set_ChiEngMode(self->context, setChinese); gint isCapsLockOff=(is_caps_led_on(self->_priv->pDisplay)) ? 0: 1; IBUS_CHEWING_LOG(3,"** [I3] property_activate setChinese=%d isCapsLockOff=%d", setChinese, isCapsLockOff); if (self->syncCapsLock_local != CHEWING_MODIFIER_SYNC_DISABLE){ if (setChinese != isCapsLockOff){ set_caps_led(! setChinese, self->_priv->pDisplay); IBUS_CHEWING_LOG(4,"* [I4] property_activate setChinese=%d isCapsLockOff=%d", setChinese, isCapsLockOff); } } }else if (strcmp(prop_name,"chewing_alnumSize_prop")==0){ /* Toggle Full <-> Half */ chewing_set_ShapeMode(self->context, !chewing_get_ShapeMode(self->context)); }else if (strcmp(prop_name,"chewing_settings_prop")==0){ if (ibus_chewing_property_get_state(self->settings_prop) ==PROP_STATE_UNCHECKED){ gtk_widget_show_all(self->setting_dialog); if (gtk_dialog_run(GTK_DIALOG(self->setting_dialog)) ==GTK_RESPONSE_OK){ self_save_config_all(self); } gtk_widget_hide(self->setting_dialog); ibus_property_set_state(self->settings_prop,PROP_STATE_UNCHECKED); } }else{ IBUS_CHEWING_LOG(3,"[I3] property_activate(-, %s, %u) not recognized",prop_name, prop_state); needRefresh=FALSE; } if (needRefresh) self_refresh_property(self,prop_name); } override (IBus:Engine) void property_show(IBus:Engine *engine, const gchar *prop_name){ IBUS_CHEWING_LOG(5,"[I5] property_show(-, %s)",prop_name); Self *self=SELF(engine); IBusProperty *prop=self_get_iBusProperty(self, prop_name); ibus_property_set_visible(prop,TRUE); ibus_engine_update_property(engine,prop); } override (IBus:Engine) void property_hide(IBus:Engine *engine, const gchar *prop_name){ IBUS_CHEWING_LOG(5,"[I5] property_hide(-, %s)",prop_name); Self *self=SELF(engine); IBusProperty *prop=self_get_iBusProperty(self, prop_name); ibus_property_set_visible(prop,FALSE); ibus_engine_update_property(engine,prop); } } %{ #include "IBusChewingEngine-input-events.c" %} ibus-chewing-1.4.10.1-Source/src/CMakeLists.txt000664 001750 001750 00000005427 12266510632 021326 0ustar00dchendchen000000 000000 SET(IBUS_CHEWING_TARGET ibus-engine-chewing) SET(IBUS_CHEWING_SCHEMAS ${CMAKE_CURRENT_BINARY_DIR}/ibus-chewing.schemas CACHE INTERNAL "ibus-chewing.schemas") # Location of library include files SET(DEPENDENCIES CHEWING GCONF2 GTK2 IBUS X11 XTST) FOREACH(_d ${DEPENDENCIES}) INCLUDE_DIRECTORIES(${${_d}_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ) LINK_DIRECTORIES(${${_d}_LIBRARY_DIRS}) LIST(APPEND _ibus_chewing_target_link_libraries ${${_d}_LIBRARIES}) ENDFOREACH(_d ${DEPENDENCIES}) #================================================================== # Sources # SET(GOB2_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/") MACRO(GOB_GENERATE name gobFile) LIST(APPEND GOB_GENERATED_C_${name} ${GOB2_OUTPUT_DIR}${name}.c) LIST(APPEND GOB_GENERATED_${name} ${GOB2_OUTPUT_DIR}${name}.c) LIST(APPEND GOB_GENERATED_${name} ${GOB2_OUTPUT_DIR}${name}.h) LIST(APPEND GOB_GENERATED_${name} ${GOB2_OUTPUT_DIR}${name}-private.h) ADD_CUSTOM_COMMAND(OUTPUT ${GOB_GENERATED_${name}} COMMAND ${GOB2_EXECUTABLE} "${gobFile}" -o "${GOB2_OUTPUT_DIR}" DEPENDS ${gobFile} ${ARGN} ) ENDMACRO(GOB_GENERATE name gobFile) GOB_GENERATE(ibus-chewing-engine ${CMAKE_CURRENT_SOURCE_DIR}/IBusChewingEngine.gob IBusChewingEngine-def.c ibus-chewing-util.h IBusChewingEngine-input-events.c) GOB_GENERATE(maker-dialog ${CMAKE_CURRENT_SOURCE_DIR}/MakerDialog.gob) SET_SOURCE_FILES_PROPERTIES(${GOB_GENERATED_ibus-chewing-engine} ${GOB_GENERATED_maker-dialog} PROPERTIES GENERATED true) ADD_CUSTOM_TARGET(gob2 DEPENDS ${GOB_GENERATED_ibus-chewing-engine} ${GOB_GENERATED_maker-dialog} COMMENT "Preprocess with gob2." ) # executable built from some source ADD_EXECUTABLE(${IBUS_CHEWING_TARGET} ${CMAKE_CURRENT_SOURCE_DIR}/main.c ${GOB_GENERATED_ibus-chewing-engine} ${GOB_GENERATED_maker-dialog} ) ADD_EXECUTABLE(generate-gconf-schemas ${CMAKE_CURRENT_SOURCE_DIR}/generate-gconf-schemas.c ${CMAKE_CURRENT_SOURCE_DIR}/ibus-chewing-util.h ${GOB_GENERATED_maker-dialog} ) # Link the executable to the library. TARGET_LINK_LIBRARIES(${IBUS_CHEWING_TARGET} ${_ibus_chewing_target_link_libraries} ) TARGET_LINK_LIBRARIES(generate-gconf-schemas ${GTK2_LIBRARIES} ) IF(NOT DEFINED LIB_INSTALL_DIR) SET(LIB_INSTALL_DIR "lib${IS_64}") ENDIF() SET_COMPILE_ENV(LIB_INSTALL_DIR "${LIB_INSTALL_DIR}" DISPLAY STRING "Chewing library directory") ADD_CUSTOM_COMMAND(TARGET generate-gconf-schemas POST_BUILD COMMAND ${CMAKE_CURRENT_BINARY_DIR}/generate-gconf-schemas -v 3 -l "C;${TRANSLATED}" ${IBUS_CHEWING_SCHEMAS} COMMENT "Generating gconf-schemas" VERBATIM ) MANAGE_FILE_INSTALL(TARGETS ${IBUS_CHEWING_TARGET} ARGS LIBEXEC DESTINATION ${LIBEXEC_DIR} LIBRARY DESTINATION ${LIB_INSTALL_DIR} ) ibus-chewing-1.4.10.1-Source/README000664 001750 001750 00000000255 12266510632 016651 0ustar00dchendchen000000 000000 ibus-chewing It is a Chinese input engine for IBus. It is released under GPLv2, see COPYING for detail. See USER-GUIDE for usage documentation; INSTALL for installation. ibus-chewing-1.4.10.1-Source/INSTALL000664 001750 001750 00000001560 12266510632 017022 0ustar00dchendchen000000 000000 Installation Instructions ************************* 0. Required: libchewing>=0.3.2-16 (with chewing_zuin path, or upstream r1048), cmake >=2.4 gob >=2 gettext gtk2 GConf2 libXtst 1. Remove the old build cache: If you have previous ibus-chewing, or change between ibus 1.1 and ibus 1.2, You may need to remove CMakeCache.txt 2. Extract source and enter the extracted directory, then: cmake . -DCMAKE_INSTALL_PREFIX='/usr' -DLIBEXEC_DIR='/usr/libexec' make Change CMAKE_INSTALL_PREFIX and LIBEXEC_DIR if you want to install in different directories. 3. If you have previous version installed, then need to: make uninstall_schemas 4. Install and register schemas: sudo make install make install_schemas 5. Use iBus UI or run ibus-setup to add ibus-chewing. 6. Restart iBus and Enjoy! To see other available build targets, use make help ibus-chewing-1.4.10.1-Source/.gitignore000664 001750 001750 00000001102 12266510632 017751 0ustar00dchendchen000000 000000 .* *~ *.sw[op] **/CMakeFiles/ **/_CPack_Packages/ **/Testing/ **/BUILD/ **/BUILDROOT/ **/RPMS/ **/SPECS/ **/SOURCES/ **/SRPMS/ **/FedPkg/ *NO_PACK* bin/ *.la *.lo *.loT bodhi.template CMakeCache.txt cmake-fedora/ cmake_*install.cmake CPack*Config.cmake CTestTestfile.cmake CVS/ data/*.schemas debug*s.list *.gmo gtk-doc.make ibus-chewing.spec ibus-chewing*.tar.* install_manifest.txt ltmain.sh Makefile missing Modules *.o *.old *.orig *.pot py-compile *.so RPM-ChangeLog src/ibus-chewing-engine*.[ch] src/maker-dialog*.[ch] stamp-h1 *.rej *.rpm *.bak tags *.xml arch/PKGBUILD ibus-chewing-1.4.10.1-Source/RELEASE-NOTES.txt000664 001750 001750 00000000211 12273100202 020452 0ustar00dchendchen000000 000000 PRJ_VER=1.4.10.1 SUMMARY=Resolves Bug 1054937 REDHAT_BUGZILLA=1054937 [Changes] - Resolves Bug 1054937 - Broken %defattr in ibus-chewing ibus-chewing-1.4.10.1-Source/po/uk_UA.po000664 001750 001750 00000030043 12271746763 017765 0ustar00dchendchen000000 000000 # yurchor , 2012. #zanata msgid "" msgstr "Project-Id-Version: ibus-chewing 1.4.5\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-01-15 21:09+1000\n" "PO-Revision-Date: 2012-12-06 02:12-0500\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" "X-Generator: Zanata 3.0.3\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" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author yurchor #: ../src/IBusChewingEngine.gob:367 msgid " No default value, skipped." msgstr "Немає типового значення, пропущено." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author yurchor #: ../src/IBusChewingEngine.gob:367 msgid " Use default value:" msgstr "Використовувати типове значення:" #: ../src/IBusChewingEngine-def.c:264 msgid "Add phrases in front" msgstr "Додавати фрази на початку" #: ../src/IBusChewingEngine-def.c:268 msgid "Add phrases in the front." msgstr "Додавати фрази на початку." #: ../src/IBusChewingEngine-def.c:314 msgid "Always input numbers when number keys from key pad is inputted." msgstr "Завжди вводити цифри, якщо натискаються клавіші цифр на цифровій " "панелі." #: ../src/IBusChewingEngine-def.c:68 msgid "Auto" msgstr "Автоматично" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author yurchor #: ../src/IBusChewingEngine-def.c:258 msgid "Auto move cursor" msgstr "Автоматичне пересування курсора" #: ../src/IBusChewingEngine-def.c:262 msgid "Automatically move cursor to next character." msgstr "Автоматично пересувати курсор до наступного символу." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author yurchor #: ../src/IBusChewingEngine-def.c:69 msgid "Big5" msgstr "Big5" #: ../src/IBusChewingEngine-def.c:322 msgid "Candidate per page" msgstr "Варіант на сторінку" #: ../src/main.c:91 msgid "Chewing" msgstr "Чжуінь" #: ../src/main.c:84 msgid "Chewing component" msgstr "Компонент чжуінь" #: ../src/IBusChewingEngine.gob:255 msgid "Chi" msgstr "Чі" #: ../src/IBusChewingEngine-def.c:328 msgid "Choose phrases from backward" msgstr "Вибирати фрази з кінця" #: ../src/IBusChewingEngine-def.c:332 msgid "Choose phrases from the back, without moving cursor." msgstr "Вибирати фрази з кінця без пересування курсора." #: ../src/IBusChewingEngine.gob:261 msgid "Click to switch to Chinese" msgstr "" #: ../src/IBusChewingEngine.gob:259 msgid "Click to switch to English" msgstr "" #: ../src/IBusChewingEngine-def.c:270 msgid "Easy symbol input" msgstr "Просте введення символів" #: ../src/IBusChewingEngine-def.c:274 msgid "Easy symbol input." msgstr "Просте введення символів." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author yurchor #: ../src/IBusChewingEngine-def.c:2 msgid "Editing" msgstr "Редагування" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author yurchor #: ../src/IBusChewingEngine.gob:257 msgid "Eng" msgstr "Eng" #: ../src/IBusChewingEngine-def.c:276 msgid "Esc clean all buffer" msgstr "Esc спрожнює весь буфер" #: ../src/IBusChewingEngine-def.c:280 msgid "Escape key cleans the text in pre-edit-buffer." msgstr "Клавіша Escape спорожнює вміст буфера попереднього редагування." #: ../src/IBusChewingEngine-def.c:288 msgid "Force lowercase in En mode" msgstr "Примусовий нижній регістр у режимі англійської" #: ../src/IBusChewingEngine.gob:263 msgid "Full" msgstr "Повні" #: ../src/IBusChewingEngine.gob:265 msgid "Half" msgstr "Половинні" #: ../src/IBusChewingEngine-def.c:255 msgid "Hsu's keyboard selection keys, 1 for asdfjkl789, 2 for asdfzxcv89 ." msgstr "Клавіші вибору клавіатури Сюя, 1 для asdfjkl789, 2 для asdfzxcv89 ." #: ../src/IBusChewingEngine-def.c:251 msgid "Hsu's selection key" msgstr "Клавіша вибору Сюя" #: ../src/IBusChewingEngine-def.c:292 msgid "Ignore CapsLock status and input lowercase by default.\n" "It is handy if you wish to enter lowercase by default. Uppercase can " "still be inputted with Shift." msgstr "Ігнорувати стан CapsLock і типово вводити символи нижнього " "регістру.\n" "Зручно, якщо ви маєте намір типово вводити символи у нижньому " "регістрі. Символи верхнього регістру можна вводити за допомогою " "клавіші Shift." #: ../src/IBusChewingEngine-def.c:320 msgid "In plain Zhuyin mode, automatic candidate selection and related " "options are disabled or ignored." msgstr "У режимі звичайного введення чжуїн автоматичний вибір варіантів та " "пов’язані з ним параметри буде вимкнено або проігноровано." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author yurchor #: ../src/IBusChewingEngine-def.c:4 msgid "Keyboard" msgstr "Клавіатура" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author yurchor #: ../src/IBusChewingEngine-def.c:239 msgid "Keyboard Type" msgstr "Тип клавіатури" #: ../src/IBusChewingEngine-def.c:249 msgid "Keys used to select candidate. For example \"asdfghjkl;\", press 'a' " "to select the 1st candidate, 's' for 2nd, and so on." msgstr "Клавіші, які використовуватимуться для вибору варіантів. Наприклад, " "якщо це «asdfghjkl;», натискання «a» вибиратиме перший кандидат, «s» " "— другий тощо." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author yurchor #: ../src/IBusChewingEngine-def.c:282 msgid "Maximum Chinese characters" msgstr "Максимальна кількість символів китайською" #: ../src/IBusChewingEngine-def.c:286 msgid "Maximum Chinese characters in pre-edit buffer, including inputing " "Zhuyin symbols" msgstr "Максимальна кількість символів китайської у буфері попереднього " "редагування, зокрема під час введення символів чжуїн" #: ../src/IBusChewingEngine-def.c:326 msgid "Number of candidate per page." msgstr "Кількість варіантів на сторінку." #: ../src/IBusChewingEngine-def.c:310 msgid "Number pad always input number" msgstr "Завжди вводити цифри з цифрової панелі" #: ../src/IBusChewingEngine-def.c:303 msgid "Occasionally, the CapsLock status does not match the IM, this option " "determines how these status be synchronized. Valid values:\n" "\"disable\": Do nothing.\n" "\"keyboard\": IM status follows keyboard status.\n" "\"IM\": Keyboard status follows IM status." msgstr "Якщо раптом стан CapsLock не відповідає стану способу введення, за " "допомогою цього пункту можна визначити спосіб синхронізації станів. " "Можливі значення:\n" "«вимкнути»: не виконувати синхронізації.\n" "«клавіатура»: змінювати стан способу введення за станом на " "клавіатурі.\n" "«спосіб введення»: змінювати стан на клавіатурі за станом у способі " "введення." #: ../src/main.c:85 ../src/main.c:93 msgid "Peng Huang, Ding-Yi Chen" msgstr "Пень Юань, Дінь-Ї Чен" #: ../src/IBusChewingEngine-def.c:316 msgid "Plain Zhuyin mode" msgstr "Звичайний режим чжуїн" #: ../src/IBusChewingEngine-def.c:243 msgid "Select Zhuyin keyboard layout." msgstr "Виберіть розкладку клавіатури чжуїн." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author yurchor #: ../src/IBusChewingEngine-def.c:3 msgid "Selecting" msgstr "Позначення" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author yurchor #: ../src/IBusChewingEngine-def.c:245 msgid "Selection keys" msgstr "Клавіші для позначення" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author yurchor #: ../src/IBusChewingEngine.gob:187 msgid "Setting" msgstr "Параметри" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author yurchor #: ../src/IBusChewingEngine.gob:268 msgid "Settings" msgstr "Параметри" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author yurchor #: ../src/IBusChewingEngine-def.c:334 msgid "Space to select" msgstr "Пробіл для позначення" #: ../src/IBusChewingEngine-def.c:297 msgid "Sync between CapsLock and IM" msgstr "Синхронізація CapsLock зі способом введення" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author yurchor #: ../src/IBusChewingEngine-def.c:70 msgid "UTF8" msgstr "UTF8" #: ../src/IBusChewingEngine.gob:365 msgid "Warning: cannot load configure key" msgstr "Попередження: не вдалося завантажити налаштування" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author yurchor #: ../src/IBusChewingEngine-def.c:41 msgid "dachen_26" msgstr "dachen_26" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author yurchor #: ../src/IBusChewingEngine-def.c:33 msgid "default" msgstr "типове" #: ../src/IBusChewingEngine-def.c:61 msgctxt "Sync" msgid "disable" msgstr "вимкнути" #: ../src/IBusChewingEngine-def.c:39 msgid "dvorak" msgstr "дворак" #: ../src/IBusChewingEngine-def.c:40 msgid "dvorak_hsu" msgstr "дворак_сюй" #: ../src/IBusChewingEngine-def.c:37 msgid "eten" msgstr "етен" #: ../src/IBusChewingEngine-def.c:38 msgid "eten26" msgstr "етен26" #: ../src/IBusChewingEngine-def.c:36 msgid "gin_yieh" msgstr "жін_є" #: ../src/IBusChewingEngine-def.c:42 msgid "hanyu" msgstr "ханю" #: ../src/IBusChewingEngine-def.c:34 msgid "hsu" msgstr "сюй" #: ../src/IBusChewingEngine-def.c:35 msgid "ibm" msgstr "ibm" #: ../src/IBusChewingEngine-def.c:75 msgid "in application window" msgstr "вікно програми" #: ../src/IBusChewingEngine-def.c:76 msgid "in candidate window" msgstr "вікно варіантів" #: ../src/IBusChewingEngine-def.c:63 msgctxt "Sync" msgid "input method" msgstr "спосіб введення" #: ../src/IBusChewingEngine-def.c:62 msgctxt "Sync" msgid "keyboard" msgstr "клавіатура" ibus-chewing-1.4.10.1-Source/po/zh_TW.po000664 001750 001750 00000021060 12271747035 020004 0ustar00dchendchen000000 000000 # Translation of Traditional Chinese of ibus-chewing # Copyright (C) 2008, 2009, 2010 # Huang Peng . Ding-Yi Chen # swyear # This file is distributed under the same license as the ibus-chewing package. # dchen , 2014. #zanata msgid "" msgstr "Project-Id-Version: ibus-chewing 1.4.5\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-01-15 21:09+1000\n" "PO-Revision-Date: 2014-01-15 05:25-0500\n" "Last-Translator: dchen \n" "Language-Team: Chinese (Traditional Han, Taiwan)\n" "Language: zh-TW\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Zanata 3.0.3\n" "Plural-Forms: nplurals=1; plural=0\n" #: ../src/IBusChewingEngine.gob:367 msgid " No default value, skipped." msgstr " 無預設值,略去。" #: ../src/IBusChewingEngine.gob:367 msgid " Use default value:" msgstr " 使用預設值:" #: ../src/IBusChewingEngine-def.c:264 msgid "Add phrases in front" msgstr "前方加詞" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author dchen #: ../src/IBusChewingEngine-def.c:268 msgid "Add phrases in the front." msgstr "前方加詞。" #: ../src/IBusChewingEngine-def.c:314 msgid "Always input numbers when number keys from key pad is inputted." msgstr "用數字版輸入時總是輸入數字,並不負責選字。" #: ../src/IBusChewingEngine-def.c:68 msgid "Auto" msgstr "自動" #: ../src/IBusChewingEngine-def.c:258 msgid "Auto move cursor" msgstr "自動移游標" #: ../src/IBusChewingEngine-def.c:262 msgid "Automatically move cursor to next character." msgstr "自動移游標至下一個字。" #: ../src/IBusChewingEngine-def.c:69 msgid "Big5" msgstr "大五碼" #: ../src/IBusChewingEngine-def.c:322 msgid "Candidate per page" msgstr "每頁備選字數" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author dchen #: ../src/main.c:91 msgid "Chewing" msgstr "新酷音" #: ../src/main.c:84 msgid "Chewing component" msgstr "酷音元件" #: ../src/IBusChewingEngine.gob:255 msgid "Chi" msgstr "中" #: ../src/IBusChewingEngine-def.c:328 msgid "Choose phrases from backward" msgstr "後方選詞" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author dchen #: ../src/IBusChewingEngine-def.c:332 msgid "Choose phrases from the back, without moving cursor." msgstr "直接由後方選詞,不必把游標移到候選詞前。" #: ../src/IBusChewingEngine.gob:261 msgid "Click to switch to Chinese" msgstr "點擊以切換至中文" #: ../src/IBusChewingEngine.gob:259 msgid "Click to switch to English" msgstr "點擊以切換至英文" #: ../src/IBusChewingEngine-def.c:270 msgid "Easy symbol input" msgstr "簡易符號輸入" #: ../src/IBusChewingEngine-def.c:274 msgid "Easy symbol input." msgstr "簡易符號輸入。" #: ../src/IBusChewingEngine-def.c:2 msgid "Editing" msgstr "編輯" #: ../src/IBusChewingEngine.gob:257 msgid "Eng" msgstr "英" #: ../src/IBusChewingEngine-def.c:276 msgid "Esc clean all buffer" msgstr "Esc 鍵清預編區" #: ../src/IBusChewingEngine-def.c:280 msgid "Escape key cleans the text in pre-edit-buffer." msgstr "Esc 鍵清預編區。" #: ../src/IBusChewingEngine-def.c:288 msgid "Force lowercase in En mode" msgstr "CapsLock時英數仍用小寫" #: ../src/IBusChewingEngine.gob:263 msgid "Full" msgstr "全" #: ../src/IBusChewingEngine.gob:265 msgid "Half" msgstr "半" #: ../src/IBusChewingEngine-def.c:255 msgid "Hsu's keyboard selection keys, 1 for asdfjkl789, 2 for asdfzxcv89 ." msgstr "許氏鍵盤選擇鍵設定。1 為使用 asdfjkl789,2 為使用asdfzxcv89。" #: ../src/IBusChewingEngine-def.c:251 msgid "Hsu's selection key" msgstr "許式鍵盤選擇鍵" #: ../src/IBusChewingEngine-def.c:292 msgid "Ignore CapsLock status and input lowercase by default.\n" "It is handy if you wish to enter lowercase by default. Uppercase can " "still be inputted with Shift." msgstr "即使在CapsLcok On 的狀態時,仍然輸出小寫英文字母。 \n" "這對習慣打小寫的用戶來說比較方便。大寫字母仍然可用Shift 鍵輸入。" #: ../src/IBusChewingEngine-def.c:320 msgid "In plain Zhuyin mode, automatic candidate selection and related " "options are disabled or ignored." msgstr "在單純注音模式,自動選詞功能及選項將被關閉或忽略。" #: ../src/IBusChewingEngine-def.c:4 msgid "Keyboard" msgstr "鍵盤" #: ../src/IBusChewingEngine-def.c:239 msgid "Keyboard Type" msgstr "鍵盤排列" #: ../src/IBusChewingEngine-def.c:249 msgid "Keys used to select candidate. For example \"asdfghjkl;\", press 'a' " "to select the 1st candidate, 's' for 2nd, and so on." msgstr "設定選字按鍵。以 \"asdfghjkl;\" 為例,按 'a' 選第一個候選字詞,按 " "'s' 選第二個,依此類推。" #: ../src/IBusChewingEngine-def.c:282 msgid "Maximum Chinese characters" msgstr "容納中文字數" #: ../src/IBusChewingEngine-def.c:286 msgid "Maximum Chinese characters in pre-edit buffer, including inputing " "Zhuyin symbols" msgstr "預編區可容納中文字數(包含輸入中的注音符號)" #: ../src/IBusChewingEngine-def.c:326 msgid "Number of candidate per page." msgstr "每頁可顯示候選字詞數。" #: ../src/IBusChewingEngine-def.c:310 msgid "Number pad always input number" msgstr "數字版總是輸入數字" #: ../src/IBusChewingEngine-def.c:303 msgid "Occasionally, the CapsLock status does not match the IM, this option " "determines how these status be synchronized. Valid values:\n" "\"disable\": Do nothing.\n" "\"keyboard\": IM status follows keyboard status.\n" "\"IM\": Keyboard status follows IM status." msgstr "CapsLock 狀態有時會跟輸入法不同步,這個選項決定如何同步這些狀態。可用" "的值:\n" "\"disable\": 停用本功能。\n" "\"keyboard\": 輸入法向 Caps Lock 狀態同步。\n" "\"im\": Caps Lock 向輸入法狀態同步。" #: ../src/main.c:85 ../src/main.c:93 msgid "Peng Huang, Ding-Yi Chen" msgstr "黃鵬,陳定彞" #: ../src/IBusChewingEngine-def.c:316 msgid "Plain Zhuyin mode" msgstr "單純注音模式" #: ../src/IBusChewingEngine-def.c:243 msgid "Select Zhuyin keyboard layout." msgstr "選擇注音符號的鍵盤排列。" #: ../src/IBusChewingEngine-def.c:3 msgid "Selecting" msgstr "選字" #: ../src/IBusChewingEngine-def.c:245 msgid "Selection keys" msgstr "選字按鍵" #: ../src/IBusChewingEngine.gob:187 msgid "Setting" msgstr "設定" #: ../src/IBusChewingEngine.gob:268 msgid "Settings" msgstr "設定" #: ../src/IBusChewingEngine-def.c:334 msgid "Space to select" msgstr "空白鍵選字" #: ../src/IBusChewingEngine-def.c:297 msgid "Sync between CapsLock and IM" msgstr "CapsLock與輸入法狀態同步" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author dchen #: ../src/IBusChewingEngine-def.c:70 msgid "UTF8" msgstr "UTF8" #: ../src/IBusChewingEngine.gob:365 msgid "Warning: cannot load configure key" msgstr "警告:無法載入設定鍵" #: ../src/IBusChewingEngine-def.c:41 msgid "dachen_26" msgstr "大千26鍵" #: ../src/IBusChewingEngine-def.c:33 msgid "default" msgstr "預設" #: ../src/IBusChewingEngine-def.c:61 msgctxt "Sync" msgid "disable" msgstr "停用" #: ../src/IBusChewingEngine-def.c:39 msgid "dvorak" msgstr "Dvorak" #: ../src/IBusChewingEngine-def.c:40 msgid "dvorak_hsu" msgstr "Dvorak+許氏" #: ../src/IBusChewingEngine-def.c:37 msgid "eten" msgstr "倚天" #: ../src/IBusChewingEngine-def.c:38 msgid "eten26" msgstr "倚天26鍵" #: ../src/IBusChewingEngine-def.c:36 msgid "gin_yieh" msgstr "精業" #: ../src/IBusChewingEngine-def.c:42 msgid "hanyu" msgstr "漢語" #: ../src/IBusChewingEngine-def.c:34 msgid "hsu" msgstr "許氏" #: ../src/IBusChewingEngine-def.c:35 msgid "ibm" msgstr "IBM" #: ../src/IBusChewingEngine-def.c:75 msgid "in application window" msgstr "在輸入視窗組詞" #: ../src/IBusChewingEngine-def.c:76 msgid "in candidate window" msgstr "在候選視窗組詞" #: ../src/IBusChewingEngine-def.c:63 msgctxt "Sync" msgid "input method" msgstr "由輸入法" #: ../src/IBusChewingEngine-def.c:62 msgctxt "Sync" msgid "keyboard" msgstr "由鍵盤" ibus-chewing-1.4.10.1-Source/po/pt_BR.po000664 001750 001750 00000034666 12271747113 017774 0ustar00dchendchen000000 000000 # gcintra , 2012. #zanata msgid "" msgstr "Project-Id-Version: ibus-chewing 1.4.5\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-01-15 21:09+1000\n" "PO-Revision-Date: 2012-11-28 08:19-0500\n" "Last-Translator: gcintra \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" "X-Generator: Zanata 3.0.3\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine.gob:367 msgid " No default value, skipped." msgstr "Nenhum valor padrão, pulado." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine.gob:367 msgid " Use default value:" msgstr "Usar valor padrão:" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:264 msgid "Add phrases in front" msgstr "Adicionar frases na frente" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:268 msgid "Add phrases in the front." msgstr "Adicionar frases na frente" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:314 msgid "Always input numbers when number keys from key pad is inputted." msgstr "Sempre inserir números quando as chaves de números a partir do pad é " "inserida" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:68 msgid "Auto" msgstr "Auto" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:258 msgid "Auto move cursor" msgstr "Auto mover o cursor" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:262 msgid "Automatically move cursor to next character." msgstr "Mover automaticamente o cursor para o próximo carácter" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:69 msgid "Big5" msgstr "Big5" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:322 msgid "Candidate per page" msgstr "Candidato por página" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/main.c:91 msgid "Chewing" msgstr "Chewing" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/main.c:84 msgid "Chewing component" msgstr "Componente Chewing" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine.gob:255 msgid "Chi" msgstr "Chi" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:328 msgid "Choose phrases from backward" msgstr "Escolher frases de tras para frente" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:332 msgid "Choose phrases from the back, without moving cursor." msgstr "Escolehr frases a partir do final, sem mover o cursor" #: ../src/IBusChewingEngine.gob:261 msgid "Click to switch to Chinese" msgstr "" #: ../src/IBusChewingEngine.gob:259 msgid "Click to switch to English" msgstr "" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:270 msgid "Easy symbol input" msgstr "Entrada de símbolo fácil" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:274 msgid "Easy symbol input." msgstr "Entrada de símbolo fácil." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:2 msgid "Editing" msgstr "Editando" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine.gob:257 msgid "Eng" msgstr "Eng" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:276 msgid "Esc clean all buffer" msgstr "Esc limpar todo o buffer" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:280 msgid "Escape key cleans the text in pre-edit-buffer." msgstr "Tecla Escape limpa o texto no buffer de pré-edição" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:288 msgid "Force lowercase in En mode" msgstr "Forçar letra minúscula no modo En" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine.gob:263 msgid "Full" msgstr "Cheio" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine.gob:265 msgid "Half" msgstr "Meio" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:255 msgid "Hsu's keyboard selection keys, 1 for asdfjkl789, 2 for asdfzxcv89 ." msgstr "teclas de seleção do teclado de Hsu , 1 para asdfjkl789, 2 para " "asdfzxcv89 ." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:251 msgid "Hsu's selection key" msgstr "tela de seleção do Hsu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:292 msgid "Ignore CapsLock status and input lowercase by default.\n" "It is handy if you wish to enter lowercase by default. Uppercase can " "still be inputted with Shift." msgstr "Ignorar o estado CapsLock e inserir letra minúscula por padrão.\n" "É fácil se você deseja inserir letras minúsculas por padrão. A letra " "maiúscula pode ainda ser inserida com o Shift." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:320 msgid "In plain Zhuyin mode, automatic candidate selection and related " "options are disabled or ignored." msgstr "Em modo simples de Zhuyin, a seleção de candidato automática e " "opções relacionadas são desabilitadas ou ignoradas." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:4 msgid "Keyboard" msgstr "Teclado" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:239 msgid "Keyboard Type" msgstr "Tipo de Teclado" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:249 msgid "Keys used to select candidate. For example \"asdfghjkl;\", press 'a' " "to select the 1st candidate, 's' for 2nd, and so on." msgstr "Teclas usadas para selecionar candidato. Por exemplo \"asdfghjkl;\", " "pressione 'a' para selecionar o 1o. candidato, 's' para o 2o. e " "assim por diante." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:282 msgid "Maximum Chinese characters" msgstr "Máximo de Caracteres chineses" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:286 msgid "Maximum Chinese characters in pre-edit buffer, including inputing " "Zhuyin symbols" msgstr "Máximo de caracteres chineses no buffer de pré-edição, incluindo os " "simbolos Zhuyin de inserção." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:326 msgid "Number of candidate per page." msgstr "Número de candidato por página" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:310 msgid "Number pad always input number" msgstr "Pad de números sempre insere números" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:303 msgid "Occasionally, the CapsLock status does not match the IM, this option " "determines how these status be synchronized. Valid values:\n" "\"disable\": Do nothing.\n" "\"keyboard\": IM status follows keyboard status.\n" "\"IM\": Keyboard status follows IM status." msgstr "Geralmente o status do CapsLock não coincide com o IM, esta opção " "determina como estes status são sincronizados. Valores válidos:\n" "\"disable\": Não faz nada.¶\n" "\"keyboard\": status do IM segue o status do teclado.¶\n" "\"IM\": Status do Teclado segue o status do IM." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/main.c:85 ../src/main.c:93 msgid "Peng Huang, Ding-Yi Chen" msgstr "Peng Huang, Ding-Yi Chen" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:316 msgid "Plain Zhuyin mode" msgstr "Modo Simples Zhuyin" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:243 msgid "Select Zhuyin keyboard layout." msgstr "Selecionar layout do teclado Zhuyin." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:3 msgid "Selecting" msgstr "Selecionando" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:245 msgid "Selection keys" msgstr "Teclas de seleção" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine.gob:187 msgid "Setting" msgstr "Configuração" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine.gob:268 msgid "Settings" msgstr "Configurações" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:334 msgid "Space to select" msgstr "Espaço para selecionar" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:297 msgid "Sync between CapsLock and IM" msgstr "Sinc entre o CapsLock e IM" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:70 msgid "UTF8" msgstr "UTF8" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine.gob:365 msgid "Warning: cannot load configure key" msgstr "Aviso: não foi possível carregar a tecla de configuração" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:41 msgid "dachen_26" msgstr "dachen_26" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:33 msgid "default" msgstr "padrão" #: ../src/IBusChewingEngine-def.c:61 msgctxt "Sync" msgid "disable" msgstr "" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:39 msgid "dvorak" msgstr "dvorak" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:40 msgid "dvorak_hsu" msgstr "dvorak_hsu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:37 msgid "eten" msgstr "eten" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:38 msgid "eten26" msgstr "eten26" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:36 msgid "gin_yieh" msgstr "gin_yieh" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:42 msgid "hanyu" msgstr "hanyu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:34 msgid "hsu" msgstr "hsu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:35 msgid "ibm" msgstr "ibm" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:75 msgid "in application window" msgstr "na janela do aplicativo" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gcintra #: ../src/IBusChewingEngine-def.c:76 msgid "in candidate window" msgstr "na janela do candidato" #: ../src/IBusChewingEngine-def.c:63 msgctxt "Sync" msgid "input method" msgstr "" #: ../src/IBusChewingEngine-def.c:62 msgctxt "Sync" msgid "keyboard" msgstr "" ibus-chewing-1.4.10.1-Source/po/zh_CN.po000664 001750 001750 00000032534 12271747035 017762 0ustar00dchendchen000000 000000 # Translation to Simplfied Chinese of ibus-chewing # Copyright (C) YEAR Huang Peng # This file is distributed under the same license as the PACKAGE package. # Peng Huang , 2008. msgid "" msgstr "Project-Id-Version: ibus-chewing 1.4.5\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-01-15 21:09+1000\n" "PO-Revision-Date: 2012-11-28 08:19-0500\n" "Last-Translator: leahliu \n" "Language-Team: LANGUAGE \n" "Language: zh-CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Zanata 3.0.3\n" "Plural-Forms: nplurals=1; plural=0\n" #: ../src/IBusChewingEngine.gob:367 msgid " No default value, skipped." msgstr " 无缺省值,略去。" #: ../src/IBusChewingEngine.gob:367 msgid " Use default value:" msgstr " 使用缺省值:" #: ../src/IBusChewingEngine-def.c:264 msgid "Add phrases in front" msgstr "前方加词" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:268 msgid "Add phrases in the front." msgstr "前方加词" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:314 msgid "Always input numbers when number keys from key pad is inputted." msgstr "在使用数字键盘的按键输入时总是输入数字。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:68 msgid "Auto" msgstr "自动" #: ../src/IBusChewingEngine-def.c:258 msgid "Auto move cursor" msgstr "自动移游标下一个字" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:262 msgid "Automatically move cursor to next character." msgstr "自动将光标移动到下一个字符。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:69 msgid "Big5" msgstr "Big5" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:322 msgid "Candidate per page" msgstr "每页中的候选词" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/main.c:91 msgid "Chewing" msgstr "酷音(Chewing)" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/main.c:84 msgid "Chewing component" msgstr "酷音组件" #: ../src/IBusChewingEngine.gob:255 msgid "Chi" msgstr "中" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:328 msgid "Choose phrases from backward" msgstr "反向取词" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:332 msgid "Choose phrases from the back, without moving cursor." msgstr "在不移动光标的情况下反向取词。" #: ../src/IBusChewingEngine.gob:261 msgid "Click to switch to Chinese" msgstr "" #: ../src/IBusChewingEngine.gob:259 msgid "Click to switch to English" msgstr "" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:270 msgid "Easy symbol input" msgstr "轻松输入符号" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:274 msgid "Easy symbol input." msgstr "轻松输入符号" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:2 msgid "Editing" msgstr "编辑中" #: ../src/IBusChewingEngine.gob:257 msgid "Eng" msgstr "英" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:276 msgid "Esc clean all buffer" msgstr "Esc 清除所有缓存" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:280 msgid "Escape key cleans the text in pre-edit-buffer." msgstr "按 Esc 键可清除所有预编辑缓冲中的文本。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:288 msgid "Force lowercase in En mode" msgstr "在 En 模式中强制使用小写" #: ../src/IBusChewingEngine.gob:263 msgid "Full" msgstr "全" #: ../src/IBusChewingEngine.gob:265 msgid "Half" msgstr "半" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:255 msgid "Hsu's keyboard selection keys, 1 for asdfjkl789, 2 for asdfzxcv89 ." msgstr "Hsu 的键盘选择键,1 代表 asdfjkl789,2 代表 asdfzxcv89。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:251 msgid "Hsu's selection key" msgstr "Hsu 的选择键" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:292 msgid "Ignore CapsLock status and input lowercase by default.\n" "It is handy if you wish to enter lowercase by default. Uppercase can " "still be inputted with Shift." msgstr "忽略 CapsLock 状态,默认输入小写。\n" "如果您希望默认输入小写就很方便。您仍可使用 Shift 键输入大写。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:320 msgid "In plain Zhuyin mode, automatic candidate selection and related " "options are disabled or ignored." msgstr "在简单注音模式中,禁用或忽略自动候选词选择及相关选项。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:4 msgid "Keyboard" msgstr "键盘" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:239 msgid "Keyboard Type" msgstr "键盘类型" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:249 msgid "Keys used to select candidate. For example \"asdfghjkl;\", press 'a' " "to select the 1st candidate, 's' for 2nd, and so on." msgstr "用来选择候选词的键。例如:\"asdfghjkl;\",按 'a' 选择第一个词,'s' 代" "表第二个,依次类推。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:282 msgid "Maximum Chinese characters" msgstr "最多中文字符" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:286 msgid "Maximum Chinese characters in pre-edit buffer, including inputing " "Zhuyin symbols" msgstr "在预编辑缓冲中最多的中文字符数,其中包括输入的注音符号。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:326 msgid "Number of candidate per page." msgstr "每页中的候选词数。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:310 msgid "Number pad always input number" msgstr "数字键盘总是输入数字" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:303 msgid "Occasionally, the CapsLock status does not match the IM, this option " "determines how these status be synchronized. Valid values:\n" "\"disable\": Do nothing.\n" "\"keyboard\": IM status follows keyboard status.\n" "\"IM\": Keyboard status follows IM status." msgstr "偶尔也有 CapsLock 状态与输入法不符的情况,这个选项可决定如何同步这些" "状态。有效值为:\n" "\"disable\":什么都不做。\n" "\"keyboard\":输入法状态遵循键盘状态。\n" "\"IM\":键盘状态遵循输入法状态。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/main.c:85 ../src/main.c:93 msgid "Peng Huang, Ding-Yi Chen" msgstr "黄鹏,陳定彞" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:316 msgid "Plain Zhuyin mode" msgstr "简单注音模式" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:243 msgid "Select Zhuyin keyboard layout." msgstr "选择注音键盘布局。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:3 msgid "Selecting" msgstr "选择中" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:245 msgid "Selection keys" msgstr "选择键" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine.gob:187 msgid "Setting" msgstr "设置" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine.gob:268 msgid "Settings" msgstr "设置" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:334 msgid "Space to select" msgstr "按空格选择" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:297 msgid "Sync between CapsLock and IM" msgstr "同步 CapsLock 和输入法" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:70 msgid "UTF8" msgstr "UTF8" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine.gob:365 msgid "Warning: cannot load configure key" msgstr "警告:无法载入配置键" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:41 msgid "dachen_26" msgstr "dachen_26" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:33 msgid "default" msgstr "默认" #: ../src/IBusChewingEngine-def.c:61 msgctxt "Sync" msgid "disable" msgstr "" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:39 msgid "dvorak" msgstr "dvorak" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:40 msgid "dvorak_hsu" msgstr "dvorak_hsu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:37 msgid "eten" msgstr "eten" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:38 msgid "eten26" msgstr "eten26" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:36 msgid "gin_yieh" msgstr "gin_yieh" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:42 msgid "hanyu" msgstr "中文" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:34 msgid "hsu" msgstr "许氏" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:35 msgid "ibm" msgstr "ibm" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:75 msgid "in application window" msgstr "在程序窗口中" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author leahliu #: ../src/IBusChewingEngine-def.c:76 msgid "in candidate window" msgstr "在候选词窗口中" #: ../src/IBusChewingEngine-def.c:63 #, fuzzy msgctxt "Sync" msgid "input method" msgstr "新酷音" #: ../src/IBusChewingEngine-def.c:62 #, fuzzy msgctxt "Sync" msgid "keyboard" msgstr "键盘" ibus-chewing-1.4.10.1-Source/po/ja_JP.po000664 001750 001750 00000035471 12271747035 017747 0ustar00dchendchen000000 000000 # noriko , 2012. #zanata msgid "" msgstr "Project-Id-Version: ibus-chewing 1.4.5\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-01-15 21:09+1000\n" "PO-Revision-Date: 2012-11-28 08:19-0500\n" "Last-Translator: noriko \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" "X-Generator: Zanata 3.0.3\n" "Plural-Forms: nplurals=1; plural=0\n" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine.gob:367 msgid " No default value, skipped." msgstr "デフォルト値がありません、 省略しました。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine.gob:367 msgid " Use default value:" msgstr "デフォルト値を使用:" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:264 msgid "Add phrases in front" msgstr "先頭に語句を追加" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:268 msgid "Add phrases in the front." msgstr "先頭に語句を追加します。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:314 msgid "Always input numbers when number keys from key pad is inputted." msgstr "キーパッドの番号キーが入力された場合は常に番号を入力します。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:68 msgid "Auto" msgstr "自動" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:258 msgid "Auto move cursor" msgstr "自動カーソル移動" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:262 msgid "Automatically move cursor to next character." msgstr "カーソルを自動的に次の文字に移動させます。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:69 msgid "Big5" msgstr "Big5" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:322 msgid "Candidate per page" msgstr "ページごとの候補" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/main.c:91 msgid "Chewing" msgstr "Chewing" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/main.c:84 msgid "Chewing component" msgstr "Chewing コンポーネント" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine.gob:255 msgid "Chi" msgstr "Chi" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:328 msgid "Choose phrases from backward" msgstr "後方から語句を選択" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:332 msgid "Choose phrases from the back, without moving cursor." msgstr "カーソル移動せずに後ろから語句を選択します。" #: ../src/IBusChewingEngine.gob:261 msgid "Click to switch to Chinese" msgstr "" #: ../src/IBusChewingEngine.gob:259 msgid "Click to switch to English" msgstr "" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:270 msgid "Easy symbol input" msgstr "簡単な記号入力" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:274 msgid "Easy symbol input." msgstr "簡単な記号入力です。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:2 msgid "Editing" msgstr "編集" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine.gob:257 msgid "Eng" msgstr "Eng" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:276 msgid "Esc clean all buffer" msgstr "全バッファの Esc キー消去" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:280 msgid "Escape key cleans the text in pre-edit-buffer." msgstr "Esc (エスケープ) キーでプレ編集バッファにあるテキストを消去します。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:288 msgid "Force lowercase in En mode" msgstr "英語モードでは小文字を強制" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine.gob:263 msgid "Full" msgstr "全" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine.gob:265 msgid "Half" msgstr "半" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:255 msgid "Hsu's keyboard selection keys, 1 for asdfjkl789, 2 for asdfzxcv89 ." msgstr "Hsu のキーボード選択キーです。 1 は asdfjkl789、 2 は asdfzxcv89 で" "す。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:251 msgid "Hsu's selection key" msgstr "Hsu の選択キー" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:292 msgid "Ignore CapsLock status and input lowercase by default.\n" "It is handy if you wish to enter lowercase by default. Uppercase can " "still be inputted with Shift." msgstr "CapsLock 状態を無視してデフォルトでは小文字を入力します。\n" "デフォルトでは小文字入力にしたい場合に便利です。 Shift を使用すれば大" "文字入力も可能です。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:320 msgid "In plain Zhuyin mode, automatic candidate selection and related " "options are disabled or ignored." msgstr "プレーンのズウイン (Zhuyin) モードでは、 候補自動選択および関連オプ" "ションは無効になっているか無視されます。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:4 msgid "Keyboard" msgstr "キーボード" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:239 msgid "Keyboard Type" msgstr "キーボードのタイプ" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:249 msgid "Keys used to select candidate. For example \"asdfghjkl;\", press 'a' " "to select the 1st candidate, 's' for 2nd, and so on." msgstr "候補の選択に使用するキーです。 たとえば、 「asdfghjkl;」なら「a」を押" "して 1 番目の候補を選択します。 2 番目の候補を選択する場合は「s」を押" "します。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:282 msgid "Maximum Chinese characters" msgstr "中国語文字の最大数" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:286 msgid "Maximum Chinese characters in pre-edit buffer, including inputing " "Zhuyin symbols" msgstr "ズウイン記号の入力など、 プレ編集バッファ内の中国語文字の最大数" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:326 msgid "Number of candidate per page." msgstr "1 ページの候補数" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:310 msgid "Number pad always input number" msgstr "番号パッドは常に入力番号" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:303 msgid "Occasionally, the CapsLock status does not match the IM, this option " "determines how these status be synchronized. Valid values:\n" "\"disable\": Do nothing.\n" "\"keyboard\": IM status follows keyboard status.\n" "\"IM\": Keyboard status follows IM status." msgstr "CapsLock 状態が入力メソッドと一致しない場合があります。 このオプショ" "ンを使ってこうした状態をどのように同期するかを指定します。 有効な値は" "次の通りです。\n" "「disable」何もしません。\n" "「keyboard」入力メソッド状態をキーボードの状態に従わせます。\n" "「IM」キーボード状態を入力メソッド状態に従わせます。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/main.c:85 ../src/main.c:93 msgid "Peng Huang, Ding-Yi Chen" msgstr "Peng Huang, Ding-Yi Chen" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:316 msgid "Plain Zhuyin mode" msgstr "プレーンのズウインモード" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:243 msgid "Select Zhuyin keyboard layout." msgstr "ズウインのキーボードレイアウトを選択します。" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:3 msgid "Selecting" msgstr "選択" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:245 msgid "Selection keys" msgstr "選択キー" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine.gob:187 msgid "Setting" msgstr "設定" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine.gob:268 msgid "Settings" msgstr "設定" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:334 msgid "Space to select" msgstr "選択にスペースキー" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:297 msgid "Sync between CapsLock and IM" msgstr "CapsLock と入力メソッド間の同期" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:70 msgid "UTF8" msgstr "UTF8" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine.gob:365 msgid "Warning: cannot load configure key" msgstr "警告: 設定キーをロードできません" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:41 msgid "dachen_26" msgstr "dachen_26" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:33 msgid "default" msgstr "デフォルト" #: ../src/IBusChewingEngine-def.c:61 msgctxt "Sync" msgid "disable" msgstr "" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:39 msgid "dvorak" msgstr "ドボラック" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:40 msgid "dvorak_hsu" msgstr "dvorak_hsu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:37 msgid "eten" msgstr "eten" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:38 msgid "eten26" msgstr "eten26" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:36 msgid "gin_yieh" msgstr "gin_yieh" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:42 msgid "hanyu" msgstr "hanyu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:34 msgid "hsu" msgstr "hsu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:35 msgid "ibm" msgstr "ibm" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:75 msgid "in application window" msgstr "アプリケーションウィンドウ内" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author noriko #: ../src/IBusChewingEngine-def.c:76 msgid "in candidate window" msgstr "候補ウィンドウ内" #: ../src/IBusChewingEngine-def.c:63 msgctxt "Sync" msgid "input method" msgstr "" #: ../src/IBusChewingEngine-def.c:62 msgctxt "Sync" msgid "keyboard" msgstr "" ibus-chewing-1.4.10.1-Source/po/it_IT.po000664 001750 001750 00000034714 12271746754 020002 0ustar00dchendchen000000 000000 # fvalen , 2012. #zanata msgid "" msgstr "Project-Id-Version: ibus-chewing 1.4.5\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-01-15 21:09+1000\n" "PO-Revision-Date: 2012-11-28 08:19-0500\n" "Last-Translator: fvalen \n" "Language-Team: Italian\n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Zanata 3.0.3\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine.gob:367 msgid " No default value, skipped." msgstr "Nessun valore predefinito, operazione saltata." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine.gob:367 msgid " Use default value:" msgstr "Usa il valore predefinito:" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:264 msgid "Add phrases in front" msgstr "Aggiungi espressioni davanti" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:268 msgid "Add phrases in the front." msgstr "Aggiungi espressioni davanti." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:314 msgid "Always input numbers when number keys from key pad is inputted." msgstr "Inserisci sempre i numeri quando i tasti numerici della tastiera " "sono inseriti." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:68 msgid "Auto" msgstr "Auto" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:258 msgid "Auto move cursor" msgstr "Sposta automaticamente il cursore" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:262 msgid "Automatically move cursor to next character." msgstr "Sposta automaticamente il cursore al carattere successivo." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:69 msgid "Big5" msgstr "Big5" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:322 msgid "Candidate per page" msgstr "Candidato per pagina" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/main.c:91 msgid "Chewing" msgstr "Chewing" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/main.c:84 msgid "Chewing component" msgstr "Componente Chewing" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine.gob:255 msgid "Chi" msgstr "Chi" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:328 msgid "Choose phrases from backward" msgstr "Seleziona espressioni all'indietro" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:332 msgid "Choose phrases from the back, without moving cursor." msgstr "Seleziona espressioni all'indietro senza spostare il cursore." #: ../src/IBusChewingEngine.gob:261 msgid "Click to switch to Chinese" msgstr "" #: ../src/IBusChewingEngine.gob:259 msgid "Click to switch to English" msgstr "" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:270 msgid "Easy symbol input" msgstr "Input simbolo semplice" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:274 msgid "Easy symbol input." msgstr "Input simbolo semplice." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:2 msgid "Editing" msgstr "Modifica" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine.gob:257 msgid "Eng" msgstr "Eng" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:276 msgid "Esc clean all buffer" msgstr "Pulisci con Esc tutto il buffer" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:280 msgid "Escape key cleans the text in pre-edit-buffer." msgstr "Il tasto Escape rimuove il testo in pre-edit-buffer." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:288 msgid "Force lowercase in En mode" msgstr "Forza minuscolo in modalità En" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine.gob:263 msgid "Full" msgstr "Completo" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine.gob:265 msgid "Half" msgstr "Metà" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:255 msgid "Hsu's keyboard selection keys, 1 for asdfjkl789, 2 for asdfzxcv89 ." msgstr "Tasti di selezione della tastiera di Hsu, 1 per asdfjkl789, 2 per " "asdfzxcv89 ." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:251 msgid "Hsu's selection key" msgstr "Tasto di selezione di Hsu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:292 msgid "Ignore CapsLock status and input lowercase by default.\n" "It is handy if you wish to enter lowercase by default. Uppercase can " "still be inputted with Shift." msgstr "Ignora CapsLock ed input minuscolo per impostazione predefinita. ¶ È " "utile se inserisci il minuscolo per impostazione predefinita. Il " "maiuscolo può ancora essere inserito con il tasto Maiusc \"Shift\"." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:320 msgid "In plain Zhuyin mode, automatic candidate selection and related " "options are disabled or ignored." msgstr "In modalità semplice Zhuyin, la selezione del candidato automatica e " "le opzioni relative sono disabilitate o ignorate." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:4 msgid "Keyboard" msgstr "Tastiera" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:239 msgid "Keyboard Type" msgstr "Tipo di tastiera" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:249 msgid "Keys used to select candidate. For example \"asdfghjkl;\", press 'a' " "to select the 1st candidate, 's' for 2nd, and so on." msgstr "Tasti usati per selezionare il candidato. Per esempio \"asdfghjkl;" "\", premere 'a' per selezionare il primo candidato, 's' per " "selezionare il secondo e così via." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:282 msgid "Maximum Chinese characters" msgstr "Numero massimo di caratteri cinesi" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:286 msgid "Maximum Chinese characters in pre-edit buffer, including inputing " "Zhuyin symbols" msgstr "Numero massimo di caratteri cinesi in pre-edit buffer, incluso " "l'input dei simboli Zhuyin" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:326 msgid "Number of candidate per page." msgstr "Numero di candicati per pagina." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:310 msgid "Number pad always input number" msgstr "Il tastierino numerico inserisce sempre il numero" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:303 msgid "Occasionally, the CapsLock status does not match the IM, this option " "determines how these status be synchronized. Valid values:\n" "\"disable\": Do nothing.\n" "\"keyboard\": IM status follows keyboard status.\n" "\"IM\": Keyboard status follows IM status." msgstr "Talvolta lo stato di Capslock non corrisponde all'IM, questa opzione " "determina come sincronizzare lo stato. I valori validi sono:¶\n" "\"disable\": Non fare niente.¶\n" "\"keyboard\": lo stato IM segue lo stato della tastiera.¶\n" "\"IM\": lo stato della tastiera segue lo stato IM." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/main.c:85 ../src/main.c:93 msgid "Peng Huang, Ding-Yi Chen" msgstr "Peng Huang, Ding-Yi Chen" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:316 msgid "Plain Zhuyin mode" msgstr "Modalità Zhuyin semplice" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:243 msgid "Select Zhuyin keyboard layout." msgstr "Seleziona il layout della tastiera Zhuyin" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:3 msgid "Selecting" msgstr "Selezione" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:245 msgid "Selection keys" msgstr "Tasti di selezione" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine.gob:187 msgid "Setting" msgstr "Impostazione" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine.gob:268 msgid "Settings" msgstr "Impostazioni" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:334 msgid "Space to select" msgstr "Spazio da selezionare" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:297 msgid "Sync between CapsLock and IM" msgstr "Sincronizza tra CapsLock e IM" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:70 msgid "UTF8" msgstr "UTF8" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine.gob:365 msgid "Warning: cannot load configure key" msgstr "Attenzione: impossibile caricare la chiave di configurazione" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:41 msgid "dachen_26" msgstr "dachen_26" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:33 msgid "default" msgstr "default" #: ../src/IBusChewingEngine-def.c:61 msgctxt "Sync" msgid "disable" msgstr "" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:39 msgid "dvorak" msgstr "dvorak" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:40 msgid "dvorak_hsu" msgstr "dvorak_hsu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:37 msgid "eten" msgstr "eten" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:38 msgid "eten26" msgstr "eten26" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:36 msgid "gin_yieh" msgstr "gin_yieh" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:42 msgid "hanyu" msgstr "hanyu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:34 msgid "hsu" msgstr "hsu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:35 msgid "ibm" msgstr "ibm" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:75 msgid "in application window" msgstr "nella finestra dell'applicazione" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author fvalen #: ../src/IBusChewingEngine-def.c:76 msgid "in candidate window" msgstr "nella finestra del candidato" #: ../src/IBusChewingEngine-def.c:63 msgctxt "Sync" msgid "input method" msgstr "" #: ../src/IBusChewingEngine-def.c:62 msgctxt "Sync" msgid "keyboard" msgstr "" ibus-chewing-1.4.10.1-Source/po/de_DE.po000664 001750 001750 00000034266 12271746745 017734 0ustar00dchendchen000000 000000 # hedda , 2012. #zanata msgid "" msgstr "Project-Id-Version: ibus-chewing 1.4.5\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-01-15 21:09+1000\n" "PO-Revision-Date: 2012-11-28 08:19-0500\n" "Last-Translator: hedda \n" "Language-Team: German (Germany)\n" "Language: de-DE\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Zanata 3.0.3\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine.gob:367 msgid " No default value, skipped." msgstr " Kein Standardwert, überspringen." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine.gob:367 msgid " Use default value:" msgstr " Standardwert verwenden:" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:264 msgid "Add phrases in front" msgstr "Ausdrücke am Anfang einfügen" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:268 msgid "Add phrases in the front." msgstr "Ausdrücke am Anfang einfügen." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:314 msgid "Always input numbers when number keys from key pad is inputted." msgstr "Immer Zahlen eingeben, wenn Zahlentasten vom Nummernblock verwendet " "werden." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:68 msgid "Auto" msgstr "Auto" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:258 msgid "Auto move cursor" msgstr "Auto-Cursor" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:262 msgid "Automatically move cursor to next character." msgstr "Cursor automatisch zum nächsten Zeichen bewegen." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:69 msgid "Big5" msgstr "Big5" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:322 msgid "Candidate per page" msgstr "Kandidaten pro Seite" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/main.c:91 msgid "Chewing" msgstr "Chewing" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/main.c:84 msgid "Chewing component" msgstr "Chewing-Komponente" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine.gob:255 msgid "Chi" msgstr "Chi" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:328 msgid "Choose phrases from backward" msgstr "Ausdrücke von hinten wählen" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:332 msgid "Choose phrases from the back, without moving cursor." msgstr "Ausdrücke von hinten wählen, ohne den Cursor zu bewegen." #: ../src/IBusChewingEngine.gob:261 msgid "Click to switch to Chinese" msgstr "" #: ../src/IBusChewingEngine.gob:259 msgid "Click to switch to English" msgstr "" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:270 msgid "Easy symbol input" msgstr "Einfache Symboleingabe" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:274 msgid "Easy symbol input." msgstr "Einfache Symboleingabe." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:2 msgid "Editing" msgstr "Bearbeiten" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine.gob:257 msgid "Eng" msgstr "Eng" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:276 msgid "Esc clean all buffer" msgstr "Esc löscht Puffer" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:280 msgid "Escape key cleans the text in pre-edit-buffer." msgstr "Escape-Taste löscht Text im Puffer." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:288 msgid "Force lowercase in En mode" msgstr "Kleinschreibung in En-Modus erzwingen" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine.gob:263 msgid "Full" msgstr "Voll" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine.gob:265 msgid "Half" msgstr "Halb" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:255 msgid "Hsu's keyboard selection keys, 1 for asdfjkl789, 2 for asdfzxcv89 ." msgstr "Hsu's Tastaturauswahl-Tasten, 1 für asdfjkl789, 2 für asdfzxcv89 ." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:251 msgid "Hsu's selection key" msgstr "Hsu's Auswahltaste" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:292 msgid "Ignore CapsLock status and input lowercase by default.\n" "It is handy if you wish to enter lowercase by default. Uppercase can " "still be inputted with Shift." msgstr "CapsLock-Status ignorieren und standardmäßig Kleinschreibung " "verwenden.\n" "Praktisch für die standardmäßige Eingabe in Kleinschreibung. " "Großschreibung kann per Umschalttaste aktiviert werden." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:320 msgid "In plain Zhuyin mode, automatic candidate selection and related " "options are disabled or ignored." msgstr "In einfachem Zhuyin-Modus werden automatische Kandidatenauswahl und " "zugehörige Optionen deaktiviert oder ignoriert." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:4 msgid "Keyboard" msgstr "Tastatur" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:239 msgid "Keyboard Type" msgstr "Tastaturtyp" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:249 msgid "Keys used to select candidate. For example \"asdfghjkl;\", press 'a' " "to select the 1st candidate, 's' for 2nd, and so on." msgstr "Tasten zur Kandidatenauswahl. Zum Beispiel \"asdfghjkl;\", drücken " "Sie 'a', um den 1. Kandidaten zu wählen, 's' für den 2., etc." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:282 msgid "Maximum Chinese characters" msgstr "Maximale Chinesische Zeichen" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:286 msgid "Maximum Chinese characters in pre-edit buffer, including inputing " "Zhuyin symbols" msgstr "Maximale Chinesische Zeichen im Puffer, einschließlich Zhuyin-Symbole" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:326 msgid "Number of candidate per page." msgstr "Anzahl der Kandidaten pro Seite." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:310 msgid "Number pad always input number" msgstr "Nummernblock gibt immer Zahlen ein" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:303 msgid "Occasionally, the CapsLock status does not match the IM, this option " "determines how these status be synchronized. Valid values:\n" "\"disable\": Do nothing.\n" "\"keyboard\": IM status follows keyboard status.\n" "\"IM\": Keyboard status follows IM status." msgstr "Gelegentlich stimmt der CapsLock-Status nicht mit der IM überein, " "diese Option legt fest, wie diese Status synchronisiert werden. " "Gültige Werte:\n" "\"Deaktivieren\": Nichts tun.\n" "\"Tastatur\": IM-Status folgt dem Tastaturstatus.\n" "\"IM\": Tastaturstatus folgt dem IM-Status." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/main.c:85 ../src/main.c:93 msgid "Peng Huang, Ding-Yi Chen" msgstr "Peng Huang, Ding-Yi Chen" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:316 msgid "Plain Zhuyin mode" msgstr "Einfacher Zhuyin-Modus" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:243 msgid "Select Zhuyin keyboard layout." msgstr "Zhuyin-Tastaturbelegung wählen." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:3 msgid "Selecting" msgstr "Wählen" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:245 msgid "Selection keys" msgstr "Auswahltasten" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine.gob:187 msgid "Setting" msgstr "Einstellung" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine.gob:268 msgid "Settings" msgstr "Einstellungen" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:334 msgid "Space to select" msgstr "Leertaste zum Auswählen" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:297 msgid "Sync between CapsLock and IM" msgstr "Sync zwischen CapsLock und IM" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:70 msgid "UTF8" msgstr "UTF8" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine.gob:365 msgid "Warning: cannot load configure key" msgstr "Warnung: Konfigurationsschlüssel konnte nicht geladen werden" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:41 msgid "dachen_26" msgstr "dachen_26" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:33 msgid "default" msgstr "Standard" #: ../src/IBusChewingEngine-def.c:61 msgctxt "Sync" msgid "disable" msgstr "" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:39 msgid "dvorak" msgstr "dvorak" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:40 msgid "dvorak_hsu" msgstr "dvorak_hsu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:37 msgid "eten" msgstr "eten" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:38 msgid "eten26" msgstr "eten26" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:36 msgid "gin_yieh" msgstr "gin_yieh" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:42 msgid "hanyu" msgstr "hanyu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:34 msgid "hsu" msgstr "hsu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:35 msgid "ibm" msgstr "ibm" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:75 msgid "in application window" msgstr "in Applikationsfenster" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author hedda #: ../src/IBusChewingEngine-def.c:76 msgid "in candidate window" msgstr "in Kandidatenfenster" #: ../src/IBusChewingEngine-def.c:63 msgctxt "Sync" msgid "input method" msgstr "" #: ../src/IBusChewingEngine-def.c:62 msgctxt "Sync" msgid "keyboard" msgstr "" ibus-chewing-1.4.10.1-Source/po/ko_KR.po000664 001750 001750 00000035040 12271747035 017761 0ustar00dchendchen000000 000000 # eukim , 2012. #zanata # mkim , 2012. #zanata msgid "" msgstr "Project-Id-Version: ibus-chewing 1.4.5\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-01-15 21:09+1000\n" "PO-Revision-Date: 2012-12-04 10:53-0500\n" "Last-Translator: mkim \n" "Language-Team: Korean\n" "Language: ko\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Zanata 3.0.3\n" "Plural-Forms: nplurals=1; plural=0\n" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine.gob:367 msgid " No default value, skipped." msgstr "디폴트 값이 없음, 생략함. " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine.gob:367 msgid " Use default value:" msgstr "디폴트 값 사용: " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:264 msgid "Add phrases in front" msgstr "처음에 단어 추가 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:268 msgid "Add phrases in the front." msgstr "처음에 단어 추가 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:314 msgid "Always input numbers when number keys from key pad is inputted." msgstr "키 패드에서 숫자 키를 입력하면 항상 번호가 입력됩니다. " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:68 msgid "Auto" msgstr "자동 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:258 msgid "Auto move cursor" msgstr "자동 커서 이동 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:262 msgid "Automatically move cursor to next character." msgstr "자동으로 커서를 다음 문자로 이동시킵니다. " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:69 msgid "Big5" msgstr "Big5" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:322 msgid "Candidate per page" msgstr "페이지 당 후보 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/main.c:91 msgid "Chewing" msgstr "Chewing" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/main.c:84 msgid "Chewing component" msgstr "Chewing 구성 요소 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine.gob:255 msgid "Chi" msgstr "Chi" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:328 msgid "Choose phrases from backward" msgstr "뒤에서 단어 선택 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:332 msgid "Choose phrases from the back, without moving cursor." msgstr "커서를 이동하지 않고 뒤에서 단어를 선택합니다. " #: ../src/IBusChewingEngine.gob:261 msgid "Click to switch to Chinese" msgstr "" #: ../src/IBusChewingEngine.gob:259 msgid "Click to switch to English" msgstr "" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:270 msgid "Easy symbol input" msgstr "쉬운 기호 입력 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:274 msgid "Easy symbol input." msgstr "쉬운 기호를 입력합니다. " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:2 msgid "Editing" msgstr "편집 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine.gob:257 msgid "Eng" msgstr "Eng" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:276 msgid "Esc clean all buffer" msgstr "Esc 키는 모든 버퍼를 지웁니다 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:280 msgid "Escape key cleans the text in pre-edit-buffer." msgstr "Esc 키는 사전 편집 버퍼의 텍스트를 지웁니다. " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:288 msgid "Force lowercase in En mode" msgstr "En 모드에서 소문자를 강제 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine.gob:263 msgid "Full" msgstr "전체 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine.gob:265 msgid "Half" msgstr "반 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:255 msgid "Hsu's keyboard selection keys, 1 for asdfjkl789, 2 for asdfzxcv89 ." msgstr "Hsu 키보드 선택 키입니다. 1은 asdfjkl789이고 2는 asdfzxcv89입니다. " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:251 msgid "Hsu's selection key" msgstr "Hsu 선택 키 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:292 msgid "Ignore CapsLock status and input lowercase by default.\n" "It is handy if you wish to enter lowercase by default. Uppercase can " "still be inputted with Shift." msgstr "CapsLock 상태를 무시하고 디폴트로 소문자를 입력합니다.\n" "디폴트로 소문자를 입력하고자 하는 경우 유용합니다. Shift를 사용하여 " "대문자 입력도 가능합니다. " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:320 msgid "In plain Zhuyin mode, automatic candidate selection and related " "options are disabled or ignored." msgstr "Plain Zhuyin 모드에서 자동 후보 선택 및 관련 옵션이 비활성화되어 있거" "나 무시됩니다. " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:4 msgid "Keyboard" msgstr "키보드 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:239 msgid "Keyboard Type" msgstr "키보드 유형 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:249 msgid "Keys used to select candidate. For example \"asdfghjkl;\", press 'a' " "to select the 1st candidate, 's' for 2nd, and so on." msgstr "후보 선택에 사용하는 키입니다. 예를 들어, \"asdfghjkl;\"의 경우 " "'a'를 눌러 첫 번째 후보로 선택하고 두번째 후보를 선택하려면 's'를 누" "릅니다. " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:282 msgid "Maximum Chinese characters" msgstr "최대 중국어 문자 수 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:286 msgid "Maximum Chinese characters in pre-edit buffer, including inputing " "Zhuyin symbols" msgstr "Zhuyin 기호 입력을 포함하여 사전 편집 버퍼에서 최대 중국어 문자 수 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:326 msgid "Number of candidate per page." msgstr "페이지 당 후보 수 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:310 msgid "Number pad always input number" msgstr "번호 패드는 항상 번호 입력 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:303 msgid "Occasionally, the CapsLock status does not match the IM, this option " "determines how these status be synchronized. Valid values:\n" "\"disable\": Do nothing.\n" "\"keyboard\": IM status follows keyboard status.\n" "\"IM\": Keyboard status follows IM status." msgstr "CapsLock 상태가 입력 방식과 일치하지 않을 수 있습니다. 이 옵션을 사용" "하여 이러한 상태를 동기화할 방법을 지정합니다. 유효한 값은 다음과 같" "습니다:\n" "\"disable\": 아무것도 실행하지 않습니다. \n" "\"keyboard\": 입력 방식 상태는 키보다 상태를 따릅니다.\n" "\"IM\": 키보드 상태는 입력 방식 상태를 따릅니다. " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/main.c:85 ../src/main.c:93 msgid "Peng Huang, Ding-Yi Chen" msgstr "Peng Huang, Ding-Yi Chen" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:316 msgid "Plain Zhuyin mode" msgstr "Plain Zhuyin 모드 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:243 msgid "Select Zhuyin keyboard layout." msgstr "Zhuyin 키보드 레이아웃을 선택합니다. " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:3 msgid "Selecting" msgstr "선택 중 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:245 msgid "Selection keys" msgstr "선택 키 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine.gob:187 msgid "Setting" msgstr "설정 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine.gob:268 msgid "Settings" msgstr "설정 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:334 msgid "Space to select" msgstr "선택 공간 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:297 msgid "Sync between CapsLock and IM" msgstr "CapsLock과 입력 방식 간의 동기화 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:70 msgid "UTF8" msgstr "UTF8" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine.gob:365 msgid "Warning: cannot load configure key" msgstr "경고: 설정 키를 불러올 수 없음 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:41 msgid "dachen_26" msgstr "dachen_26" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:33 msgid "default" msgstr "디폴트 " #: ../src/IBusChewingEngine-def.c:61 msgctxt "Sync" msgid "disable" msgstr "비활성화 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:39 msgid "dvorak" msgstr "드보락 (dvorak)" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:40 msgid "dvorak_hsu" msgstr "dvorak_hsu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:37 msgid "eten" msgstr "eten" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:38 msgid "eten26" msgstr "eten26" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:36 msgid "gin_yieh" msgstr "gin_yieh" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:42 msgid "hanyu" msgstr "hanyu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:34 msgid "hsu" msgstr "hsu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:35 msgid "ibm" msgstr "ibm" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:75 msgid "in application window" msgstr "애플리케이션 창에서 " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author eukim #: ../src/IBusChewingEngine-def.c:76 msgid "in candidate window" msgstr "후보 창에서 " #: ../src/IBusChewingEngine-def.c:63 msgctxt "Sync" msgid "input method" msgstr "입력 방식 " #: ../src/IBusChewingEngine-def.c:62 msgctxt "Sync" msgid "keyboard" msgstr "키보드 " ibus-chewing-1.4.10.1-Source/po/fr_FR.po000664 001750 001750 00000035671 12271747035 017764 0ustar00dchendchen000000 000000 # samfreemanz , 2012. #zanata msgid "" msgstr "Project-Id-Version: ibus-chewing 1.4.5\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-01-15 21:09+1000\n" "PO-Revision-Date: 2012-11-28 08:19-0500\n" "Last-Translator: samfreemanz \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" "X-Generator: Zanata 3.0.3\n" "Plural-Forms: nplurals=2; plural=(n > 1)\n" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine.gob:367 msgid " No default value, skipped." msgstr "Aucune valeur par défaut, ignoré." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine.gob:367 msgid " Use default value:" msgstr "Utiliser la valeur par défaut :" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:264 msgid "Add phrases in front" msgstr "Ajouter des phrases devant" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:268 msgid "Add phrases in the front." msgstr "Ajouter des phrases à l'avant." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:314 msgid "Always input numbers when number keys from key pad is inputted." msgstr "Toujours entrer des chiffres lorsque des touches de chiffres du " "clavier sont saisies." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:68 msgid "Auto" msgstr "Auto" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:258 msgid "Auto move cursor" msgstr "Déplacement automatique du curseur" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:262 msgid "Automatically move cursor to next character." msgstr "Automatiquement déplacer le curseur sur le caractère suivant." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:69 msgid "Big5" msgstr "Big5" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:322 msgid "Candidate per page" msgstr "Candidat par page" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/main.c:91 msgid "Chewing" msgstr "Chewing" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/main.c:84 msgid "Chewing component" msgstr "Composant Chewing" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine.gob:255 msgid "Chi" msgstr "Chi" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:328 msgid "Choose phrases from backward" msgstr "Choisir des phrases depuis l'arrière" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:332 msgid "Choose phrases from the back, without moving cursor." msgstr "Choisir des phrases depuis l'arrière, sans déplacer le curseur." #: ../src/IBusChewingEngine.gob:261 msgid "Click to switch to Chinese" msgstr "" #: ../src/IBusChewingEngine.gob:259 msgid "Click to switch to English" msgstr "" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:270 msgid "Easy symbol input" msgstr "Entrée Easy Symbol" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:274 msgid "Easy symbol input." msgstr "Entrée Easy symbol." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:2 msgid "Editing" msgstr "Modifier" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine.gob:257 msgid "Eng" msgstr "Eng" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:276 msgid "Esc clean all buffer" msgstr "Esc supprime toute la mémoire-tampon" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:280 msgid "Escape key cleans the text in pre-edit-buffer." msgstr "La touche d'échappement (« Esc ») supprimer le texte dans la mémoire-" "tampon pré-modifications." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:288 msgid "Force lowercase in En mode" msgstr "Force les minuscules en mode En" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine.gob:263 msgid "Full" msgstr "Plein" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine.gob:265 msgid "Half" msgstr "Moitié" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:255 msgid "Hsu's keyboard selection keys, 1 for asdfjkl789, 2 for asdfzxcv89 ." msgstr "Touches de sélection du clavier Hsu, 1 pour asdfjkl789, 2 pour " "asdfzxcv89 ." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:251 msgid "Hsu's selection key" msgstr "Touche de sélection de Hsu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:292 msgid "Ignore CapsLock status and input lowercase by default.\n" "It is handy if you wish to enter lowercase by default. Uppercase can " "still be inputted with Shift." msgstr "Ignorer le statut CapsLock et entrer des lettres minuscules par " "défaut.\n" "Ceci est pratique si vous souhaitez saisir des lettres minuscules " "par défaut. Les majuscules peuvent toujours être saisies avec la " "touche « Shift »." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:320 msgid "In plain Zhuyin mode, automatic candidate selection and related " "options are disabled or ignored." msgstr "En mode Zhuyin simple, la sélection de candidat automatique et les " "options qui y sont liées sont désactivées ou ignorées." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:4 msgid "Keyboard" msgstr "Clavier" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:239 msgid "Keyboard Type" msgstr "Type de clavier" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:249 msgid "Keys used to select candidate. For example \"asdfghjkl;\", press 'a' " "to select the 1st candidate, 's' for 2nd, and so on." msgstr "Touches utilisées pour sélectionner le candidat. Par exemple : " "\"asdfghjkl;\", appuyez sur 'a' pour sélectionner le 1er candidat, " "sur 's' pour le 2ème, et ainsi de suite." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:282 msgid "Maximum Chinese characters" msgstr "Caractères chinois maximum" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:286 msgid "Maximum Chinese characters in pre-edit buffer, including inputing " "Zhuyin symbols" msgstr "Caractères chinois maximum dans la mémoire-tampon pré-modifications, " "y compris les entrées de symboles Zhuyin" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:326 msgid "Number of candidate per page." msgstr "Nombre de candidats par page." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:310 msgid "Number pad always input number" msgstr "Le pavé numérique produit toujours des chiffres" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:303 msgid "Occasionally, the CapsLock status does not match the IM, this option " "determines how these status be synchronized. Valid values:\n" "\"disable\": Do nothing.\n" "\"keyboard\": IM status follows keyboard status.\n" "\"IM\": Keyboard status follows IM status." msgstr "Occasionnellement, le statut CapsLock ne correspond pas à l'IM, " "cette option détermine la manière par laquelle ces statuts sont " "synchronisés. Valeurs valides :\n" "\"disable\": ne rien faire.\n" "\"keyboard\": le statut IM suit le statut du clavier.\n" "\"IM\": le statut du clavier suit le statut IM." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/main.c:85 ../src/main.c:93 msgid "Peng Huang, Ding-Yi Chen" msgstr "Peng Huang, Ding-Yi Chen" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:316 msgid "Plain Zhuyin mode" msgstr "Mode Zhuyin simple" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:243 msgid "Select Zhuyin keyboard layout." msgstr "Sélectionner la disposition Zhuyin du clavier." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:3 msgid "Selecting" msgstr "Sélection" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:245 msgid "Selection keys" msgstr "Touches de sélection" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine.gob:187 msgid "Setting" msgstr "Paramétrer" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine.gob:268 msgid "Settings" msgstr "Paramètres" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:334 msgid "Space to select" msgstr "Espace à sélectionner" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:297 msgid "Sync between CapsLock and IM" msgstr "Synchronisation de CapsLock et IM" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:70 msgid "UTF8" msgstr "UTF8" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine.gob:365 msgid "Warning: cannot load configure key" msgstr "Avertissement : chargement de la touche de configuration impossible" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:41 msgid "dachen_26" msgstr "dachen_26" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:33 msgid "default" msgstr "par défaut" #: ../src/IBusChewingEngine-def.c:61 msgctxt "Sync" msgid "disable" msgstr "" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:39 msgid "dvorak" msgstr "dvorak" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:40 msgid "dvorak_hsu" msgstr "dvorak_hsu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:37 msgid "eten" msgstr "eten" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:38 msgid "eten26" msgstr "eten26" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:36 msgid "gin_yieh" msgstr "gin_yieh" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:42 msgid "hanyu" msgstr "hanyu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:34 msgid "hsu" msgstr "hsu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:35 msgid "ibm" msgstr "ibm" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:75 msgid "in application window" msgstr "dans la fenêtre d'application" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author samfreemanz #: ../src/IBusChewingEngine-def.c:76 msgid "in candidate window" msgstr "dans la fenêtre du candidat" #: ../src/IBusChewingEngine-def.c:63 msgctxt "Sync" msgid "input method" msgstr "" #: ../src/IBusChewingEngine-def.c:62 msgctxt "Sync" msgid "keyboard" msgstr "" ibus-chewing-1.4.10.1-Source/po/zanata.xml.in000664 001750 001750 00000001273 12266510632 021015 0ustar00dchendchen000000 000000 @ZANATA_SERVER@ @PROJECT_NAME@ master gettext de-DE es-ES fr it ja ko pt-BR uk zh-CN zh-TW ibus-chewing-1.4.10.1-Source/po/ibus-chewing.pot000664 001750 001750 00000013650 12273073303 021517 0ustar00dchendchen000000 000000 # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: ibus-chewing 1.4.10.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-02-01 12:23+0800\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/IBusChewingEngine.gob:367 msgid " No default value, skipped." msgstr "" #: ../src/IBusChewingEngine.gob:367 msgid " Use default value:" msgstr "" #: ../src/IBusChewingEngine-def.c:264 msgid "Add phrases in front" msgstr "" #: ../src/IBusChewingEngine-def.c:268 msgid "Add phrases in the front." msgstr "" #: ../src/IBusChewingEngine-def.c:314 msgid "Always input numbers when number keys from key pad is inputted." msgstr "" #: ../src/IBusChewingEngine-def.c:68 msgid "Auto" msgstr "" #: ../src/IBusChewingEngine-def.c:258 msgid "Auto move cursor" msgstr "" #: ../src/IBusChewingEngine-def.c:262 msgid "Automatically move cursor to next character." msgstr "" #: ../src/IBusChewingEngine-def.c:69 msgid "Big5" msgstr "" #: ../src/IBusChewingEngine-def.c:322 msgid "Candidate per page" msgstr "" #: ../src/main.c:91 msgid "Chewing" msgstr "" #: ../src/main.c:84 msgid "Chewing component" msgstr "" #: ../src/IBusChewingEngine.gob:255 msgid "Chi" msgstr "" #: ../src/IBusChewingEngine-def.c:328 msgid "Choose phrases from backward" msgstr "" #: ../src/IBusChewingEngine-def.c:332 msgid "Choose phrases from the back, without moving cursor." msgstr "" #: ../src/IBusChewingEngine.gob:261 msgid "Click to switch to Chinese" msgstr "" #: ../src/IBusChewingEngine.gob:259 msgid "Click to switch to English" msgstr "" #: ../src/IBusChewingEngine-def.c:270 msgid "Easy symbol input" msgstr "" #: ../src/IBusChewingEngine-def.c:274 msgid "Easy symbol input." msgstr "" #: ../src/IBusChewingEngine-def.c:2 msgid "Editing" msgstr "" #: ../src/IBusChewingEngine.gob:257 msgid "Eng" msgstr "" #: ../src/IBusChewingEngine-def.c:276 msgid "Esc clean all buffer" msgstr "" #: ../src/IBusChewingEngine-def.c:280 msgid "Escape key cleans the text in pre-edit-buffer." msgstr "" #: ../src/IBusChewingEngine-def.c:288 msgid "Force lowercase in En mode" msgstr "" #: ../src/IBusChewingEngine.gob:263 msgid "Full" msgstr "" #: ../src/IBusChewingEngine.gob:265 msgid "Half" msgstr "" #: ../src/IBusChewingEngine-def.c:255 msgid "Hsu's keyboard selection keys, 1 for asdfjkl789, 2 for asdfzxcv89 ." msgstr "" #: ../src/IBusChewingEngine-def.c:251 msgid "Hsu's selection key" msgstr "" #: ../src/IBusChewingEngine-def.c:292 msgid "" "Ignore CapsLock status and input lowercase by default.\n" "It is handy if you wish to enter lowercase by default. Uppercase can still " "be inputted with Shift." msgstr "" #: ../src/IBusChewingEngine-def.c:320 msgid "" "In plain Zhuyin mode, automatic candidate selection and related options are " "disabled or ignored." msgstr "" #: ../src/IBusChewingEngine-def.c:4 msgid "Keyboard" msgstr "" #: ../src/IBusChewingEngine-def.c:239 msgid "Keyboard Type" msgstr "" #: ../src/IBusChewingEngine-def.c:249 msgid "" "Keys used to select candidate. For example \"asdfghjkl;\", press 'a' to " "select the 1st candidate, 's' for 2nd, and so on." msgstr "" #: ../src/IBusChewingEngine-def.c:282 msgid "Maximum Chinese characters" msgstr "" #: ../src/IBusChewingEngine-def.c:286 msgid "" "Maximum Chinese characters in pre-edit buffer, including inputing Zhuyin " "symbols" msgstr "" #: ../src/IBusChewingEngine-def.c:326 msgid "Number of candidate per page." msgstr "" #: ../src/IBusChewingEngine-def.c:310 msgid "Number pad always input number" msgstr "" #: ../src/IBusChewingEngine-def.c:303 msgid "" "Occasionally, the CapsLock status does not match the IM, this option " "determines how these status be synchronized. Valid values:\n" "\"disable\": Do nothing.\n" "\"keyboard\": IM status follows keyboard status.\n" "\"IM\": Keyboard status follows IM status." msgstr "" #: ../src/main.c:85 ../src/main.c:93 msgid "Peng Huang, Ding-Yi Chen" msgstr "" #: ../src/IBusChewingEngine-def.c:316 msgid "Plain Zhuyin mode" msgstr "" #: ../src/IBusChewingEngine-def.c:243 msgid "Select Zhuyin keyboard layout." msgstr "" #: ../src/IBusChewingEngine-def.c:3 msgid "Selecting" msgstr "" #: ../src/IBusChewingEngine-def.c:245 msgid "Selection keys" msgstr "" #: ../src/IBusChewingEngine.gob:187 msgid "Setting" msgstr "" #: ../src/IBusChewingEngine.gob:268 msgid "Settings" msgstr "" #: ../src/IBusChewingEngine-def.c:334 msgid "Space to select" msgstr "" #: ../src/IBusChewingEngine-def.c:297 msgid "Sync between CapsLock and IM" msgstr "" #: ../src/IBusChewingEngine-def.c:70 msgid "UTF8" msgstr "" #: ../src/IBusChewingEngine.gob:365 msgid "Warning: cannot load configure key" msgstr "" #: ../src/IBusChewingEngine-def.c:41 msgid "dachen_26" msgstr "" #: ../src/IBusChewingEngine-def.c:33 msgid "default" msgstr "" #: ../src/IBusChewingEngine-def.c:61 msgctxt "Sync" msgid "disable" msgstr "" #: ../src/IBusChewingEngine-def.c:39 msgid "dvorak" msgstr "" #: ../src/IBusChewingEngine-def.c:40 msgid "dvorak_hsu" msgstr "" #: ../src/IBusChewingEngine-def.c:37 msgid "eten" msgstr "" #: ../src/IBusChewingEngine-def.c:38 msgid "eten26" msgstr "" #: ../src/IBusChewingEngine-def.c:36 msgid "gin_yieh" msgstr "" #: ../src/IBusChewingEngine-def.c:42 msgid "hanyu" msgstr "" #: ../src/IBusChewingEngine-def.c:34 msgid "hsu" msgstr "" #: ../src/IBusChewingEngine-def.c:35 msgid "ibm" msgstr "" #: ../src/IBusChewingEngine-def.c:75 msgid "in application window" msgstr "" #: ../src/IBusChewingEngine-def.c:76 msgid "in candidate window" msgstr "" #: ../src/IBusChewingEngine-def.c:63 msgctxt "Sync" msgid "input method" msgstr "" #: ../src/IBusChewingEngine-def.c:62 msgctxt "Sync" msgid "keyboard" msgstr "" ibus-chewing-1.4.10.1-Source/po/es_ES.po000664 001750 001750 00000035137 12271746757 017773 0ustar00dchendchen000000 000000 # gguerrer , 2012. #zanata msgid "" msgstr "Project-Id-Version: ibus-chewing 1.4.5\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-01-15 21:09+1000\n" "PO-Revision-Date: 2012-11-28 08:19-0500\n" "Last-Translator: gguerrer \n" "Language-Team: Spanish (Spain)\n" "Language: es-ES\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Zanata 3.0.3\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine.gob:367 msgid " No default value, skipped." msgstr "No hay valor predeterminado, se omite." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine.gob:367 msgid " Use default value:" msgstr "Usar valor predeterminado:" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:264 msgid "Add phrases in front" msgstr "Añadir frases al frente" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:268 msgid "Add phrases in the front." msgstr "Añadir frases al frente." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:314 msgid "Always input numbers when number keys from key pad is inputted." msgstr "Siempre introduzca números al ingresar teclas numéricas desde el " "teclado." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:68 msgid "Auto" msgstr "Auto" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:258 msgid "Auto move cursor" msgstr "Desplace el cursor de forma automática" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:262 msgid "Automatically move cursor to next character." msgstr "Desplace el cursor de forma automática al siguiente caracter." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:69 msgid "Big5" msgstr "Big5" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:322 msgid "Candidate per page" msgstr "Candidato por página" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/main.c:91 msgid "Chewing" msgstr "Chewing" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/main.c:84 msgid "Chewing component" msgstr "Componente de Chewing" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine.gob:255 msgid "Chi" msgstr "Chi (Chino)" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:328 msgid "Choose phrases from backward" msgstr "Elija frases desde atrás" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:332 msgid "Choose phrases from the back, without moving cursor." msgstr "Elija frases desde atrás, sin desplazar el cursor." #: ../src/IBusChewingEngine.gob:261 msgid "Click to switch to Chinese" msgstr "" #: ../src/IBusChewingEngine.gob:259 msgid "Click to switch to English" msgstr "" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:270 msgid "Easy symbol input" msgstr "Fácil entrada de símbolo" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:274 msgid "Easy symbol input." msgstr "Fácil entrada de símbolo" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:2 msgid "Editing" msgstr "Modificar rol:" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine.gob:257 msgid "Eng" msgstr "Eng (Inglés)" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:276 msgid "Esc clean all buffer" msgstr "ESC limpieza de todo el buffer" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:280 msgid "Escape key cleans the text in pre-edit-buffer." msgstr "La tecla de escape limpia el texto en el buffer de pre-edición" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:288 msgid "Force lowercase in En mode" msgstr "Fuerza el modo En minúsculas" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine.gob:263 msgid "Full" msgstr "Total" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine.gob:265 msgid "Half" msgstr "Medio" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:255 msgid "Hsu's keyboard selection keys, 1 for asdfjkl789, 2 for asdfzxcv89 ." msgstr "Selección de teclas del teclado de Hsu, 1 para asdfjkl789, 2 para " "asdfzxcv89 ." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:251 msgid "Hsu's selection key" msgstr "Teclas de Selección de Hsu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:292 msgid "Ignore CapsLock status and input lowercase by default.\n" "It is handy if you wish to enter lowercase by default. Uppercase can " "still be inputted with Shift." msgstr "Ignore el estatus de MAYÚS e ingrese minúsculas de forma " "predeterminada. \n" "Es útil si desea ingresar minúsculas de forma predeterminada. La " "mayúscula puede ingresarse aún con Shift. " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:320 msgid "In plain Zhuyin mode, automatic candidate selection and related " "options are disabled or ignored." msgstr "En modo plano Zhuyin, la selección automática de candidatos y las " "opciones relacionadas se inhabilitan o ignoran. " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:4 msgid "Keyboard" msgstr "Teclado" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:239 msgid "Keyboard Type" msgstr "Tipo de teclado" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:249 msgid "Keys used to select candidate. For example \"asdfghjkl;\", press 'a' " "to select the 1st candidate, 's' for 2nd, and so on." msgstr "Las teclas utilizadas para seleccionar candidatos. Por ejemplo " "\"asdfghjkl;\", presione 'a' para seleccionar el 1er candidato, 's' " "para segundo y así sucesivamente. " # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:282 msgid "Maximum Chinese characters" msgstr "Número máximo de caracteres chinos" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:286 msgid "Maximum Chinese characters in pre-edit buffer, including inputing " "Zhuyin symbols" msgstr "Máximos caracteres chinos en buffer de pre-edición, incluyendo " "ingreso de símbolos de entrada" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:326 msgid "Number of candidate per page." msgstr "Número de candidato por página." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:310 msgid "Number pad always input number" msgstr "Almohadilla numérica siempre ingrese número" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:303 msgid "Occasionally, the CapsLock status does not match the IM, this option " "determines how these status be synchronized. Valid values:\n" "\"disable\": Do nothing.\n" "\"keyboard\": IM status follows keyboard status.\n" "\"IM\": Keyboard status follows IM status." msgstr "En ocasiones, el estatus de MAYÚS no coincide con IM, esta opción " "determina cómo estos estatus se sincronizan. Valores válidos:\n" "\"disable\": No hace nada.\n" "\"keyboard\": estatus IM sigue el estatus de teclado\n" "\"IM\": Estatus de teclado sigue el estatus IM." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/main.c:85 ../src/main.c:93 msgid "Peng Huang, Ding-Yi Chen" msgstr "Peng Huang, Ding-Yi Chen" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:316 msgid "Plain Zhuyin mode" msgstr "Modo plano Zhuyin" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:243 msgid "Select Zhuyin keyboard layout." msgstr "Seleccione la presentación de teclado Zhuyin." # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:3 msgid "Selecting" msgstr "Selección" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:245 msgid "Selection keys" msgstr "Teclas de selección" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine.gob:187 msgid "Setting" msgstr "Configuración" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine.gob:268 msgid "Settings" msgstr "Configuración" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:334 msgid "Space to select" msgstr "Espacio para seleccionar" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:297 msgid "Sync between CapsLock and IM" msgstr "Sincronización entre MAYÚS e IM" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:70 msgid "UTF8" msgstr "UTF8" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine.gob:365 msgid "Warning: cannot load configure key" msgstr "Advertencia: no se puede cargar la tecla de configuración" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:41 msgid "dachen_26" msgstr "dachen_26" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:33 msgid "default" msgstr "Predeterminado" #: ../src/IBusChewingEngine-def.c:61 msgctxt "Sync" msgid "disable" msgstr "" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:39 msgid "dvorak" msgstr "dvorak" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:40 msgid "dvorak_hsu" msgstr "dvorak_hsu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:37 msgid "eten" msgstr "eten" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:38 msgid "eten26" msgstr "eten26" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:36 msgid "gin_yieh" msgstr "gin_yieh" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:42 msgid "hanyu" msgstr "hanyu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:34 msgid "hsu" msgstr "hsu" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:35 msgid "ibm" msgstr "ibm" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:75 msgid "in application window" msgstr "En ventana de aplicaciones" # translation auto-copied from project ibus-chewing, version 1.3.10, document ibus-chewing, author gguerrer #: ../src/IBusChewingEngine-def.c:76 msgid "in candidate window" msgstr "En ventana de candidatos" #: ../src/IBusChewingEngine-def.c:63 msgctxt "Sync" msgid "input method" msgstr "" #: ../src/IBusChewingEngine-def.c:62 msgctxt "Sync" msgid "keyboard" msgstr "" ibus-chewing-1.4.10.1-Source/po/CMakeLists.txt000664 001750 001750 00000001132 12266510632 021142 0ustar00dchendchen000000 000000 # Translated languages. SET(SUPPORTED_TRANSLATION zh_CN zh_TW) INCLUDE(ManageTranslation) SET(SOURCES_I18N ${CMAKE_SOURCE_DIR}/src/IBusChewingEngine.gob ${CMAKE_SOURCE_DIR}/src/IBusChewingEngine-input-events.c ${CMAKE_SOURCE_DIR}/src/IBusChewingEngine-def.c ${CMAKE_SOURCE_DIR}/src/main.c) MANAGE_GETTEXT(SRCS ${SOURCES_I18N}) SET(ZANATA_SERVER "https://translate.zanata.org/zanata/") CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/zanata.xml.in ${CMAKE_CURRENT_BINARY_DIR}/zanata.xml @ONLY) SET(ZANATA_XML_FILE ${CMAKE_CURRENT_BINARY_DIR}/zanata.xml) MANAGE_ZANATA(${ZANATA_SERVER} YES) ibus-chewing-1.4.10.1-Source/data/chewing.xml.in000664 001750 001750 00000001605 12266510632 021455 0ustar00dchendchen000000 000000 org.freedesktop.IBus.Chewing Chewing Component @PRJ_VER@ @LICENSE@ Peng Huang, Ding-Yi Chen http://code.google.com/p/ibus @LIBEXEC_DIR@/ibus-engine-chewing --ibus ibus-chewing chewing Chewing Chinese chewing input method zh_TW GPLv2+ Peng Huang, Ding-Yi Chen @PRJ_DATA_DIR@/icons/@PROJECT_NAME@.png us 80 @HOTKEYS_XML@ @SYMBOL_XML@ ibus-chewing-1.4.10.1-Source/icons/ibus-chewing.png000664 001750 001750 00000003610 12266510632 022174 0ustar00dchendchen000000 000000 PNG  IHDR00` sRGBgAMA a cHRMz&u0`:pQ<PLTE?R?R?R?R?R?R?R?R?S?S?S?S?S?S?T?T?T?T?T?T?T?U?U?U?U?U?U?U?V?V?V?V?V?V?V?W?W?W?W?W?W?W?X?X?X?X[k[lQfQfQgQg[oeto}euevevevevevewewewo}o}o~o~ewewewewexexyyooyy鄐׏ُ߄ㄒ脒ꄓ쏛嚤ݚޚߚᚥ⚥㚥䚥嚥皦蚦隦ꚦ뚦욦횦藺᧰⧰䧰姰槱秱觱駱맱ﴻ紼봼 tRNSS% pHYsodtEXtSoftwarePaint.NET v3.5EIDATHKSRQ!MMeqPD,l56}/RԲ2KCIK_?'雹p9 3sĔ ,{+d98bpTq@e6  *f `#!|;6s?txJ)!x1l^76 (1 mt cwzކB~tC`|'=#v_Ċ;ZN8i') *Ju_3# 0WUib 'ܵy# Oa[BYI\r:N-nw8l|:~C<܂KV͖ĐCHp|w@GC,D!K !kVd B(!p4`)aXۀ6+1Hx c$?2}-B"H [KH#\@%{AyDos~(PpDsa"Ha"$sqUPەO矶 QD8uA [ATЙ+!5rJm?ֹcn;5LJniݘ~ଙ>VK _#}+!2ƑŇ\fC`cٗ 7տAIENDB`ibus-chewing-1.4.10.1-Source/icons/ibus-chewing-orig.png000664 001750 001750 00000011064 12266510632 023134 0ustar00dchendchen000000 000000 PNG  IHDR00WbKGDC pHYs  IDATh޵it\ՑoEnvɒ,Xf`H 'xXC !Á I0bLH&dB 8!`fclYdI[RK·e5wnoխ1I-`>1k^}{J-}bҳElτNM&ąelL.h&_,['s'=Spx;a  L`${DHt.'s3 ڬ][̚5)-b1y/2dpb*Ko8MQT/Lx!s.Xh Xt0wYtapXax+ؾ=dn:Jl&[ߤF{;̐xc jQK?$I۷`Y'p|{LV)^gSSfMK/ 1w`PF/*RhlkW5kPce *y'0;a|AGx&wٽ!fG}ŎF)>j]̎xNd \WbM+/7$]W]G3Io⫯얯#M)XϏx#[ICeW|F^< `pz%!ű' Swc,W\&T:!-d )M8##Dt#_>kSgR8鱾c6fvC;,@<_ 6n`/?z3v}D0穼gF{;]@߭wbXer#8D"&˾}Y*mZ$BThՕ~K>J(DD -1q惄$(7ĭavm0Mf0W]֜=8(`v~Z02q!bċZLƹ =P$]NJ`<؅J(DP|u5m6o-]<|,F_HDrў=Y6BMuוre!&9*>gծÌD㧠(EaUȅ$xT&V=@J0Hͦ x(5\<5Md[$y챚)D&Z[h ϼ-]aZe9X&gr0ebJC--F;ԟ3V%l[M^uJD"&۶ٷ/,CS G Ԃ?t$)O-!gG= {8 Hlۖb۶$,+̞g9c9G}6zmy"᫯@--lߏNwcۂ8 ^.4Ē%>=^u'8c (\_xpbC>"Vw/ͯ<0PJA݌)'Oزmc48UfiQVR[#l<ڵanB=2p姑}\c@!Im{5ȾV_o) 4IG^ڌp]zؼ93όPW8眩^KEA. :ɭΕJY 8. :+zM5}GfGT3&=zk+&޽nn!RشfZYH$cм XPaZT޷.F-+!'{,BȾC7|j0{;.lD##6އHbQd.SQR_䣡CCJ PH@FӤ'2g"<U`x'yJ<;C&pc4ǻpD)wIcUgj,YRȲe~.ࡴT㑎u5 |!\$g;3C"w?E]B𒋦@Rռ[!Ѫ*3z]g*!46!pqI z~fN}Nmgw#( -_KVf"=ȁJI1+"xg'@'MH bGSnzjy[6De688h1Zi5ڈX݌:cȄ"DnFQڍV컇3MIp]lIא ^n!=֏&>X/m I5.K7u`eثHBH RSqN`9 8IC>R'V6'"%hm{Xxh"IȊ>y7OiOqah; ߯ ϣL-#(PS;(RBh,@t.g^xHj~r4Owi/Hgxj#{X_eoMZvA4n*x7ÉQ y)bB*GZZ\\ ,kZlz|Ͳe/]~Ҋ"L 1`@FAntSwN*mbuFuJ 4gvsh;*aH2/Vϯ|hT 1v`džs)62ȤB"!#:H2_ N| N1$?){}K܉oivjb#. ؖN yt@I= @[ISѪP \$݃6IHm}  'G+ '{AL͚!v6H j9sdk=ÏSyߝx9 "y=t4pΙ8#qbO<;t#oe^ٽ2S}M3g j%RCBLDa!͊_'pm%'ZZ)vN>]484#K a'>o^wIg͞%Ql1c8n}q2ayzl'mRg_tEXtCommentCreated with The GIMPd%nIENDB`ibus-chewing-1.4.10.1-Source/icons/settings.png000664 001750 001750 00000002712 12266510632 021452 0ustar00dchendchen000000 000000 PNG  IHDR00WbKGDtIME "(B0lIDAThOhgnL՚J,+4m id)69 5I(R""Z$x/, %B̟w&3j wy}?C="~3;;y"ԛx~ܹ~\⺮0MS9,//3??si!tqvYh4&RJ͛ɩk!{B_FFF>=Z[caaaqO{ ?tqJv֨RKLRJ\V?}{={Ƕ_ӶVBjϕRgϞ+… /Ҷˮ~X,KeUI)jZ}CKRʫ\,Jy(Y]1 !'<ј0uO-mff柮>t1>(c>RPV~FFF8tP4ƃx\.]mve566?fee%ʶR !GŲ,]ETU*Jb\JɁ8x CCCܽ{w}}}}ڲ0 #G r8VC۷cǎ%ZR)eYVh+ |i2E MBē:'yMyHmV@4t]U Q+$'M@XLNฐ,H@>/  BDZ)]qdF??m۸e4mJf'&&&k RyJB`X~jnܯ.GR'?>#e MFU[ܿ=Ʌe5O K {ʞ+*ڿAVAP++~R8}t0|̙^>u癀#A>>ZMh@ظ^...tʕI6J)2 bd2P$}MP>A^0/D~ܩ] m@A` Nq잀Az/a50kIENDB`ibus-chewing-1.4.10.1-Source/Modules/ManageString.cmake000664 001750 001750 00000032345 12266510707 022772 0ustar00dchendchen000000 000000 # - Collection of String utility macros. # # Included by: # ManageVarible # # Defines the following functions: # STRING_APPEND(var str [separator]) # - Append a string to a variable # * Parameters: # + var: A variable that stores the result. # + str: A string to be appended to end of line. # + separator: Separator to separate between strings. # # STRING_PADDING(var str length [padStr]) # - Padding the string to specified length # * Parameters: # + var: A variable that stores the result. # + str: A string. # + length: Required length. # + padStr: String that used in padding. Default: " " # # STRING_PREPEND(var str [separator]) # - Prepend a string to a variable # * Parameters: # + var: A variable that stores the result. # + str: A string to be appended to end of line. # + separator: Separator to separate between strings. # # STRING_SPLIT(var delimiter str [NOESCAPE_SEMICOLON] [ESCAPE_VARIABLE] [ALLOW_EMPTY]) # - Split a string into a list using a delimiter, # which can be in 1 or more characters long. # * Parameters: # + var: A variable that stores the result. # + delimiter: To separate a string. # + str: A string. # + NOESCAPE_SEMICOLON: (Optional) Do not escape semicolons. # + ESCAPE_VARIABLE: (Optional) Escape variables. # + ALLOW_EMPTY: (Optional) Allow empty element exist in the array. # # STRING_TRIM(var str [NOUNQUOTE]) # - Trim a string by removing the leading and trailing spaces, # just like STRING(STRIP ...) in CMake 2.6 and later. # This macro is needed as CMake 2.4 does not support STRING(STRIP ..) # This macro also remove quote and double quote marks around the string, # unless NOUNQUOTE is defined. # * Parameters: # + var: A variable that stores the result. # + str: A string. # + NOUNQUOTE: (Optional) do not remove the double quote mark # around the string. # # Defines the following macros: # STRING_ESCAPE_SEMICOLON(var str) # - Escape the semicolon # * Parameters: # + var: A variable that stores the result. # + str: A string. # # STRING_UNQUOTE(var str) # - Remove double quote marks and quote marks around a string. # If the string is not quoted, then content of str is copied to var # * Parameters: # + var: A variable that stores the result. # + str: A string. # # STRING_JOIN(var delimiter str_list [str...]) # - Concatenate strings, with delimiter inserted between strings. # * Parameters: # + var: A variable that stores the result. # + str_list: A list of string. # + str: (Optional) more string to be join. # # IF(NOT DEFINED _MANAGE_STRING_CMAKE_) SET(_MANAGE_STRING_CMAKE_ "DEFINED") FUNCTION(STRING_APPEND var str) IF(${ARGC} GREATER 2) SET(_sep "${ARGV2}") ELSE(${ARGC} GREATER 2) SET(_sep "") ENDIF(${ARGC} GREATER 2) IF("${${var}}" STREQUAL "") SET(${var} "${str}" PARENT_SCOPE) ELSE("${${var}}" STREQUAL "") SET(${var} "${${var}}${_sep}${str}" PARENT_SCOPE) ENDIF("${${var}}" STREQUAL "") ENDFUNCTION(STRING_APPEND var str) FUNCTION(STRING_PADDING var str length) SET(_ret "${str}") IF(${ARGN}) SET(_padStr ${ARGN}) ELSE(${ARGN}) SET(_padStr " ") ENDIF(${ARGN}) STRING(LENGTH "${str}" _strLen) STRING(LENGTH "${_padStr}" _padLen) WHILE( _strLen LESS length) SET(_ret "${_ret}${_padStr}") MATH(EXPR _strLen ${_strLen}+${_padLen}) ENDWHILE( _strLen LESS length) SET(${var} "${_ret}" PARENT_SCOPE) ENDFUNCTION(STRING_PADDING var str length) FUNCTION(STRING_PREPEND var str) IF(${ARGC} GREATER 2) SET(_sep "${ARGV2}") ELSE(${ARGC} GREATER 2) SET(_sep "") ENDIF(${ARGC} GREATER 2) IF("${${var}}" STREQUAL "") SET(${var} "${str}" PARENT_SCOPE) ELSE("${${var}}" STREQUAL "") SET(${var} "${str}${_sep}${${var}}" PARENT_SCOPE) ENDIF("${${var}}" STREQUAL "") ENDFUNCTION(STRING_PREPEND var str) # Return (index of lefttmost non match character) # Return _strLen if all characters matches regex FUNCTION(STRING_LEFTMOST_NOTMATCH_INDEX var str regex) STRING(LENGTH "${str}" _strLen) SET(_index 0) SET(_ret ${_strLen}) WHILE(_index LESS _strLen) STRING(SUBSTRING "${str}" ${_index} 1 _strCursor) #MESSAGE("***STRING_UNQUOTE: _i=${_index} _strCursor=${_strCursor}") IF(NOT "${_strCursor}" MATCHES "${regex}") SET(_ret ${_index}) SET(_index ${_strLen}) ENDIF(NOT "${_strCursor}" MATCHES "${regex}") MATH(EXPR _index ${_index}+1) ENDWHILE(_index LESS _strLen) SET(${var} ${_ret} PARENT_SCOPE) ENDFUNCTION(STRING_LEFTMOST_NOTMATCH_INDEX var str) # Return (index of rightmost non match character) +1 # Return 0 if all characters matches regex # FUNCTION(STRING_RIGHTMOST_NOTMATCH_INDEX var str regex) STRING(LENGTH "${str}" _strLen) MATH(EXPR _index ${_strLen}) SET(_ret 0) WHILE(_index GREATER 0) MATH(EXPR _index_1 ${_index}-1) STRING(SUBSTRING "${str}" ${_index_1} 1 _strCursor) #MESSAGE("***STRING_UNQUOTE: _i=${_index} _strCursor=${_strCursor}") IF(NOT "${_strCursor}" MATCHES "${regex}") SET(_ret ${_index}) SET(_index 0) ENDIF(NOT "${_strCursor}" MATCHES "${regex}") MATH(EXPR _index ${_index}-1) ENDWHILE(_index GREATER 0) SET(${var} ${_ret} PARENT_SCOPE) ENDFUNCTION(STRING_RIGHTMOST_NOTMATCH_INDEX var str) FUNCTION(STRING_TRIM var str) #_STRING_ESCAPE(_ret "${str}" ${ARGN}) STRING_LEFTMOST_NOTMATCH_INDEX(_leftIndex "${str}" "[ \t\n\r]") STRING_RIGHTMOST_NOTMATCH_INDEX(_rightIndex "${str}" "[ \t\n\r]") #MESSAGE("_left=${_leftIndex} _rightIndex=${_rightIndex} str=|${str}|") MATH(EXPR _subLen ${_rightIndex}-${_leftIndex}) SET(_NOUNQUOTE 0) FOREACH( _arg ${ARGN}) IF(_arg STREQUAL "NOUNQUOTE") SET(_NOUNQUOTE 1) ENDIF(_arg STREQUAL "NOUNQUOTE") ENDFOREACH( _arg ${ARGN}) IF(_subLen GREATER 0) STRING(SUBSTRING "${str}" ${_leftIndex} ${_subLen} _ret) # IF _subLen > 1 # IF UNQUOTE; then unquote # Otherwise don't touch IF (_subLen GREATER 1) IF(NOT _NOUNQUOTE) STRING_UNQUOTE(_ret "${_ret}") ENDIF(NOT _NOUNQUOTE) ENDIF (_subLen GREATER 1) ELSE(_subLen GREATER 0) SET(_ret "") ENDIF(_subLen GREATER 0) SET(${var} "${_ret}" PARENT_SCOPE) # Unencoding #_STRING_UNESCAPE(${var} "${_ret}" ${ARGN}) ENDFUNCTION(STRING_TRIM var str) MACRO(STRING_ESCAPE_SEMICOLON var str) STRING(REGEX REPLACE ";" "\\\\;" ${var} "${str}") ENDMACRO(STRING_ESCAPE_SEMICOLON var str) # Internal function # Nested Variable cannot be escaped here, as variable is already substituted # at the time it passes to this macro. FUNCTION(_STRING_ESCAPE var str) # ';' and '\' are tricky, need to be encoded. # '#' => '#H' # '\' => '#B' # ';' => '#S' # '$' => '#D' SET(_NOESCAPE_SEMICOLON "") SET(_ESCAPE_VARIABLE "") FOREACH(_arg ${ARGN}) IF(${_arg} STREQUAL "NOESCAPE_SEMICOLON") SET(_NOESCAPE_SEMICOLON "NOESCAPE_SEMICOLON") ELSEIF(${_arg} STREQUAL "ESCAPE_VARIABLE") SET(_ESCAPE_VARIABLE "ESCAPE_VARIABLE") ENDIF(${_arg} STREQUAL "NOESCAPE_SEMICOLON") ENDFOREACH(_arg ${ARGN}) STRING(REGEX REPLACE "#" "#H" _ret "${str}") STRING(REGEX REPLACE "\\\\" "#B" _ret "${_ret}") IF(NOT _ESCAPE_VARIABLE STREQUAL "") STRING(REGEX REPLACE "$" "#D" _ret "${_ret}") ENDIF(NOT _ESCAPE_VARIABLE STREQUAL "") IF(_NOESCAPE_SEMICOLON STREQUAL "") STRING(REGEX REPLACE ";" "#S" _ret "${_ret}") ENDIF(_NOESCAPE_SEMICOLON STREQUAL "") #MESSAGE("_STRING_ESCAPE:_ret=${_ret}") SET(${var} "${_ret}" PARENT_SCOPE) ENDFUNCTION(_STRING_ESCAPE var str) FUNCTION(_STRING_UNESCAPE var str) # '#B' => '\' # '#H' => '#' # '#D' => '$' # '#S' => ';' SET(_ESCAPE_VARIABLE "") SET(_NOESCAPE_SEMICOLON "") SET(_ret "${str}") FOREACH(_arg ${ARGN}) IF(${_arg} STREQUAL "NOESCAPE_SEMICOLON") SET(_NOESCAPE_SEMICOLON "NOESCAPE_SEMICOLON") ELSEIF(${_arg} STREQUAL "ESCAPE_VARIABLE") SET(_ESCAPE_VARIABLE "ESCAPE_VARIABLE") STRING(REGEX REPLACE "#D" "$" _ret "${_ret}") ENDIF(${_arg} STREQUAL "NOESCAPE_SEMICOLON") ENDFOREACH(_arg ${ARGN}) #MESSAGE("###_STRING_UNESCAPE: var=${var} _ret=${_ret} _NOESCAPE_SEMICOLON=${_NOESCAPE_SEMICOLON} ESCAPE_VARIABLE=${_ESCAPE_VARIABLE}") STRING(REGEX REPLACE "#B" "\\\\" _ret "${_ret}") IF("${_NOESCAPE_SEMICOLON}" STREQUAL "") # ESCAPE_SEMICOLON STRING(REGEX REPLACE "#S" "\\\\;" _ret "${_ret}") ELSE("${_NOESCAPE_SEMICOLON}" STREQUAL "") # Don't ESCAPE_SEMICOLON STRING(REGEX REPLACE "#S" ";" _ret "${_ret}") ENDIF("${_NOESCAPE_SEMICOLON}" STREQUAL "") IF(NOT _ESCAPE_VARIABLE STREQUAL "") # '#D' => '$' STRING(REGEX REPLACE "#D" "$" _ret "${_ret}") ENDIF(NOT _ESCAPE_VARIABLE STREQUAL "") STRING(REGEX REPLACE "#H" "#" _ret "${_ret}") SET(${var} "${_ret}" PARENT_SCOPE) #MESSAGE("*** _STRING_UNESCAPE: ${var}=${${var}}") ENDFUNCTION(_STRING_UNESCAPE var str) MACRO(STRING_UNQUOTE var str) SET(_ret "${str}") STRING(LENGTH "${str}" _strLen) # IF _strLen > 1 # IF lCh and rCh are both "\"" # Remove _lCh and _rCh # ELSEIF lCh and rCh are both "'" # Remove _lCh and _rCh # Otherwise don't touch IF(_strLen GREATER 1) STRING(SUBSTRING "${str}" 0 1 _lCh) MATH(EXPR _strLen_1 ${_strLen}-1) MATH(EXPR _strLen_2 ${_strLen_1}-1) STRING(SUBSTRING "${str}" ${_strLen_1} 1 _rCh) #MESSAGE("_lCh=${_lCh} _rCh=${_rCh} _ret=|${_ret}|") IF("${_lCh}" STREQUAL "\"" AND "${_rCh}" STREQUAL "\"") STRING(SUBSTRING "${_ret}" 1 ${_strLen_2} _ret) ELSEIF("${_lCh}" STREQUAL "'" AND "${_rCh}" STREQUAL "'") STRING(SUBSTRING "${_ret}" 1 ${_strLen_2} _ret) ENDIF("${_lCh}" STREQUAL "\"" AND "${_rCh}" STREQUAL "\"") ENDIF (_strLen GREATER 1) SET(${var} "${_ret}") ENDMACRO(STRING_UNQUOTE var str) MACRO(STRING_JOIN var delimiter) SET(_ret "") FOREACH(_str ${ARGN}) STRING_APPEND(_ret "${_str}" "${delimiter}") ENDFOREACH(_str ${ARGN}) SET(${var} "${_ret}") ENDMACRO(STRING_JOIN var delimiter) FUNCTION(STRING_FIND var str search_str) STRING(LENGTH "${str}" _str_len) STRING(LENGTH "${search_str}" _search_len) MATH(EXPR _str_end ${_str_len}-${_search_len}+1) SET(_index 0) SET(_str_remain "") SET(_result -1) WHILE(_index LESS _str_end) STRING(SUBSTRING "${str}" ${_index} ${_search_len} _str_window) IF(_str_window STREQUAL search_str) SET(_result ${_index}) BREAK() ELSE(_str_window STREQUAL search_str) MATH(EXPR _index ${_index}+1) ENDIF(_str_window STREQUAL search_str) ENDWHILE(_index LESS _str_end) SET(${var} ${_result} PARENT_SCOPE) ENDFUNCTION(STRING_FIND var str search) FUNCTION(STRING_SPLIT_2 var str_remain has_delimiter delimiter str) STRING_FIND(_index "${str}" "${delimiter}") IF(_index EQUAL -1) SET(${has_delimiter} "0" PARENT_SCOPE) SET(${var} "${str}" PARENT_SCOPE) SET(${str_remain} "" PARENT_SCOPE) ELSE(_index EQUAL -1) SET(${has_delimiter} "1" PARENT_SCOPE) STRING(SUBSTRING "${str}" 0 ${_index} _var) SET(${var} "${_var}" PARENT_SCOPE) STRING(LENGTH "${str}" _str_len) STRING(LENGTH "${delimiter}" _delimiter_len) MATH(EXPR _str_2_start ${_index}+${_delimiter_len}) MATH(EXPR _str_2_len ${_str_len}-${_index}-${_delimiter_len}) STRING(SUBSTRING "${str}" ${_str_2_start} ${_str_2_len} _str_remain) SET(${str_remain} "${_str_remain}" PARENT_SCOPE) ENDIF(_index EQUAL -1) ENDFUNCTION(STRING_SPLIT_2 var str_remain has_delimiter delimiter str) FUNCTION(STRING_SPLIT var delimiter str) #MESSAGE("***STRING_SPLIT: var=${var} str=${str}") SET(_max_tokens "") SET(_NOESCAPE_SEMICOLON "") SET(_ESCAPE_VARIABLE "") SET(_ALLOW_EMPTY "") FOREACH(_arg ${ARGN}) IF(${_arg} STREQUAL "NOESCAPE_SEMICOLON") SET(_NOESCAPE_SEMICOLON "NOESCAPE_SEMICOLON") ELSEIF(${_arg} STREQUAL "ESCAPE_VARIABLE") SET(_ESCAPE_VARIABLE "ESCAPE_VARIABLE") ELSEIF(${_arg} STREQUAL "ALLOW_EMPTY") SET(_ALLOW_EMPTY "ALLOW_EMPTY") ELSE(${_arg} STREQUAL "NOESCAPE_SEMICOLON") SET(_max_tokens ${_arg}) ENDIF(${_arg} STREQUAL "NOESCAPE_SEMICOLON") ENDFOREACH(_arg ${ARGN}) IF(NOT _max_tokens) SET(_max_tokens -1) ENDIF(NOT _max_tokens) _STRING_ESCAPE(_str "${str}" ${_NOESCAPE_SEMICOLON} ${_ESCAPE_VARIABLE}) _STRING_ESCAPE(_delimiter "${delimiter}" ${_NOESCAPE_SEMICOLON} ${_ESCAPE_VARIABLE}) SET(_str_list "") SET(_token_count 1) WHILE(NOT _token_count EQUAL _max_tokens) STRING_SPLIT_2(_token _str _has_delimiter "${_delimiter}" "${_str}") #MESSAGE("_token_count=${_token_count} _max_tokens=${_max_tokens} _token=|${_token}| _str=${_str}") MATH(EXPR _token_count ${_token_count}+1) IF(NOT "${_token}" STREQUAL "" OR _ALLOW_EMPTY) LIST(APPEND _str_list "${_token}") ENDIF(NOT "${_token}" STREQUAL "" OR _ALLOW_EMPTY) IF(_has_delimiter EQUAL 0) ## No more tokens BREAK() ENDIF(_has_delimiter EQUAL 0) ENDWHILE(NOT _token_count EQUAL _max_tokens) IF(_has_delimiter EQUAL 1) LIST(APPEND _str_list "${_str}") ENDIF(_has_delimiter EQUAL 1) # Unencoding _STRING_UNESCAPE(_var "${_str_list}" ${_NOESCAPE_SEMICOLON} ${_ESCAPE_VARIABLE}) #MESSAGE("***STRING_SPLIT: tokens=${${var}}") SET(${var} "${_var}" PARENT_SCOPE) ENDFUNCTION(STRING_SPLIT var delimiter str) ENDIF(NOT DEFINED _MANAGE_STRING_CMAKE_) ibus-chewing-1.4.10.1-Source/Modules/ManageGConf.cmake000664 001750 001750 00000004425 12266510707 022516 0ustar00dchendchen000000 000000 # - GConf relative targets such as install/unstall schemas. # This module finds gconftool-2 or gconftool for GConf manipulation. # # Reads following variables: # GCONF_SCHEMAS_FILE: Schema file. # Default: "${PROJECT_NAME}.schemas" # # GCONF_SCHEMAS_INSTALLED_DIR: Direct of installed schemas files. # Default: "${SYSCONF_INSTALL_DIR}/gconf/schemas" # # GCONF_CONFIG_SOURCE: configuration source. # Default: "" (Use the system default) # # Defines following targets: # install_schemas: install schemas # # uninstall_schemas: uninstall schemas # IF(NOT DEFINED _MANAGE_GCONF_CMAKE_) SET(_MANAGE_GCONF_CMAKE_ DEFINED) INCLUDE(ManageDependency) MANAGE_DEPENDENCY(REQUIRES GCONF2 REQUIRED FEDORA_NAME "GConf2") MANAGE_DEPENDENCY(BUILD_REQUIRES GCONF2 REQUIRED PKG_CONFIG "gconf-2.0" FEDORA_NAME "GConf2" DEVEL ) IF (NOT DEFINED GCONF_SCHEMAS_FILE) SET(GCONF_SCHEMAS_FILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.schemas") ENDIF(NOT DEFINED GCONF_SCHEMAS_FILE) GET_FILENAME_COMPONENT(_gconf_schemas_basename ${GCONF_SCHEMAS_FILE} NAME) IF (NOT DEFINED GCONF_SCHEMAS_INSTALLED_DIR) IF(SYSCONF_INSTALL_DIR) SET(GCONF_SCHEMAS_INSTALLED_DIR "${SYSCONF_INSTALL_DIR}/gconf/schemas") ELSE(SYSCONF_INSTALL_DIR) SET(GCONF_SCHEMAS_INSTALLED_DIR "${SYSCONF_DIR}/gconf/schemas") ENDIF(SYSCONF_INSTALL_DIR) ENDIF(NOT DEFINED GCONF_SCHEMAS_INSTALLED_DIR) IF (NOT DEFINED GCONF_CONFIG_SOURCE) SET(GCONF_CONFIG_SOURCE "") ENDIF(NOT DEFINED GCONF_CONFIG_SOURCE) SET(ENV{GCONF_CONFIG_SOURCE} ${GCONF_CONFIG_SOURCE}) ADD_CUSTOM_TARGET(uninstall_schemas COMMAND GCONF_CONFIG_SOURCE=${GCONF_CONFIG_SOURCE} ${GCONF2_EXECUTABLE} --makefile-uninstall-rule ${GCONF_SCHEMAS_INSTALLED_DIR}/${_gconf_schemas_basename} COMMENT "Uninstalling schemas" ) ADD_CUSTOM_TARGET(install_schemas COMMAND cmake -E copy ${GCONF_SCHEMAS_FILE} ${GCONF_SCHEMAS_INSTALLED_DIR}/${_gconf_schemas_basename} COMMAND GCONF_CONFIG_SOURCE=${GCONF_CONFIG_SOURCE} ${GCONF2_EXECUTABLE} --makefile-install-rule ${GCONF_SCHEMAS_INSTALLED_DIR}/${_gconf_schemas_basename} DEPENDS ${GCONF_SCHEMAS_FILE} COMMENT "Installing schemas" ) MANAGE_FILE_INSTALL(SYSCONF ${GCONF_SCHEMAS_FILE} DEST_SUBDIR "gconf/schemas") ENDIF(NOT DEFINED _MANAGE_GCONF_CMAKE_) ibus-chewing-1.4.10.1-Source/Modules/ManageFile.cmake000664 001750 001750 00000021740 12273072306 022374 0ustar00dchendchen000000 000000 # - Module for File Handling Function # # Includes: # ManageMessage # # Defines following variables: # # Defines following functions: # FIND_FILE_ERROR_HANDLING( # [ERROR_MSG errorMessage] # [ERROR_VAR errorVar] # [VERBOSE_LEVEL verboseLevel] # [FIND_FILE_ARGS ...] # ) # - Find a file, with proper error handling. # It is essentially a wrapper of FIND_FILE # * Parameter: # + VAR: The variable that stores the path of the found program. # + name: The filename of the command. # + verboseLevel: See ManageMessage for semantic of # each verbose level. # + ERROR_MSG errorMessage: Error message to be append. # + ERROR_VAR errorVar: Variable to be set as 1 when not found. # + FIND_FILE_ARGS: A list of arguments to be passed # to FIND_FILE # # FIND_PROGRAM_ERROR_HANDLING( # [ERROR_MSG errorMessage] # [ERROR_VAR errorVar] # [VERBOSE_LEVEL verboseLevel] # [FIND_PROGRAM_ARGS ...] # ) # - Find an executable program, with proper error handling. # It is essentially a wrapper of FIND_PROGRAM # * Parameter: # + VAR: The variable that stores the path of the found program. # + name: The filename of the command. # + verboseLevel: See ManageMessage for semantic of # each verbose level. # + ERROR_MSG errorMessage: Error message to be append. # + ERROR_VAR errorVar: Variable to be set as 1 when not found. # + FIND_PROGRAM_ARGS: A list of arguments to be passed # to FIND_PROGRAM # # Defines following macros: # MANAGE_FILE_INSTALL(fileType # [files | FILES files] [DEST_SUBDIR subDir] [RENAME newName] [ARGS args] # ) # - Manage file installation. # * Parameter: # + fileType: Type of files. Valid values: # BIN, PRJ_DOC, DATA, PRJ_DATA, # SYSCONF, SYSCONF_NO_REPLACE, # LIB, LIBEXEC, TARGETS # + DEST_SUBDIR subDir: Subdir of Destination dir # + files: Files to be installed. # + RENAME newName: Destination filename. # + args: Arguments for INSTALL. # # GIT_GLOB_TO_CMAKE_REGEX(var glob) # - Convert git glob to cmake file regex # This macro covert git glob used in gitignore to # cmake file regex used in CPACK_SOURCE_IGNORE_FILES # * Parameter: # + var: Variable that hold the result. # + glob: Glob to be converted # IF(NOT DEFINED _MANAGE_FILE_CMAKE_) SET(_MANAGE_FILE_CMAKE_ "DEFINED") SET(FILE_INSTALL_LIST_TYPES "BIN" "PRJ_DOC" "DATA" "PRJ_DATA" "SYSCONF" "SYSCONF_NO_REPLACE" "LIB" "LIBEXEC" ) MACRO(_MANAGE_FILE_SET_FILE_INSTALL_LIST fileType) SET(FILE_INSTALL_${fileType}_LIST "${FILE_INSTALL_${fileType}_LIST}" CACHE INTERNAL "List of files install as ${fileType}" FORCE ) ENDMACRO(_MANAGE_FILE_SET_FILE_INSTALL_LIST fileType) FOREACH(_fLT ${FILE_INSTALL_LIST_TYPES}) SET(FILE_INSTALL_${_fLT}_LIST "") _MANAGE_FILE_SET_FILE_INSTALL_LIST(${_fLT}) ENDFOREACH(_fLT ${FILE_INSTALL_LIST_TYPES}) MACRO(_MANAGE_FILE_INSTALL_FILE_OR_DIR fileType) IF(_opt_RENAME) SET(_install_options "RENAME" "${_opt_RENAME}") ELSE(_opt_RENAME) SET(_install_options "") ENDIF (_opt_RENAME) FOREACH(_f ${_fileList}) GET_FILENAME_COMPONENT(_a "${_f}" ABSOLUTE) SET(_absolute "") STRING(REGEX MATCH "^/" _absolute "${_f}") IF(IS_DIRECTORY "${_a}") SET(_install_type "DIRECTORY") ELSE(IS_DIRECTORY "${_a}") IF("${fileType}" STREQUAL "BIN") SET(_install_type "PROGRAMS") ELSE("${fileType}" STREQUAL "BIN") SET(_install_type "FILES") ENDIF("${fileType}" STREQUAL "BIN") ENDIF(IS_DIRECTORY "${_a}") INSTALL(${_install_type} ${_f} DESTINATION "${_destDir}" ${_install_options} ${ARGN}) IF(_opt_RENAME) SET(_n "${_opt_RENAME}") ELSEIF(_absolute) GET_FILENAME_COMPONENT(_n "${_f}" NAME) ELSE(_opt_RENAME) SET(_n "${_f}") ENDIF(_opt_RENAME) IF(_opt_DEST_SUBDIR) LIST(APPEND FILE_INSTALL_${fileType}_LIST "${_opt_DEST_SUBDIR}/${_n}") ELSE(_opt_DEST_SUBDIR) LIST(APPEND FILE_INSTALL_${fileType}_LIST "${_n}") ENDIF(_opt_DEST_SUBDIR) ENDFOREACH(_f ${_fileList}) _MANAGE_FILE_SET_FILE_INSTALL_LIST("${fileType}") ENDMACRO(_MANAGE_FILE_INSTALL_FILE_OR_DIR fileType) MACRO(_MANAGE_FILE_INSTALL_TARGET) SET(_installValidOptions "RUNTIME" "LIBEXEC" "LIBRARY" "ARCHIVE") VARIABLE_PARSE_ARGN(_oT _installValidOptions ${ARGN}) SET(_installOptions "") FOREACH(_f ${_fileList}) GET_TARGET_PROPERTY(_tP "${_f}" TYPE) IF(_tP STREQUAL "EXECUTABLE") LIST(APPEND _installOptions RUNTIME) IF(_oT_RUNTIME) LIST(APPEND FILE_INSTALL_BIN_LIST ${_f}) _MANAGE_FILE_SET_FILE_INSTALL_LIST("BIN") LIST(APPEND _installOptions "${_oT_RUNTIME}") ELSEIF(_oT_LIBEXEC) LIST(APPEND FILE_INSTALL_LIBEXEC_LIST ${_f}) _MANAGE_FILE_SET_FILE_INSTALL_LIST("LIBEXEC") LIST(APPEND _installOptions "${_oT_LIBEXEC}") ELSE(_oT_RUNTIME) M_MSG(${M_ERROR} "MANAGE_FILE_INSTALL_TARGETS: Type ${_tP} is not yet implemented.") ENDIF(_oT_RUNTIME) ELSEIF(_tP STREQUAL "SHARED_LIBRARY") LIST(APPEND FILE_INSTALL_LIB_LIST ${_f}) _MANAGE_FILE_SET_FILE_INSTALL_LIST("LIB") LIST(APPEND _installOptions "LIBRARY" "${_oT_LIBRARY}") ELSEIF(_tP STREQUAL "STATIC_LIBRARY") M_MSG(${M_OFF} "MANAGE_FILE_INSTALL_TARGETS: Fedora does not recommend type ${_tP}, excluded from rpm") LIST(APPEND _installOptions "ARCHIVE" "${_oT_ARCHIVE}") ELSE(_tP STREQUAL "EXECUTABLE") M_MSG(${M_ERROR} "MANAGE_FILE_INSTALL_TARGETS: Type ${_tP} is not yet implemented.") ENDIF(_tP STREQUAL "EXECUTABLE") ENDFOREACH(_f ${_fileList}) INSTALL(TARGETS ${_fileList} ${_installOptions}) ENDMACRO(_MANAGE_FILE_INSTALL_TARGET) MACRO(MANAGE_FILE_INSTALL fileType) SET(_validOptions "DEST_SUBDIR" "FILES" "ARGS" "RENAME") VARIABLE_PARSE_ARGN(_opt _validOptions ${ARGN}) SET(_fileList "") LIST(APPEND _fileList ${_opt} ${_opt_FILES}) IF("${fileType}" STREQUAL "SYSCONF_NO_REPLACE") SET(_destDir "${SYSCONF_DIR}/${_opt_DEST_SUBDIR}") _MANAGE_FILE_INSTALL_FILE_OR_DIR("${fileType}") ELSEIF("${fileType}" STREQUAL "TARGETS") _MANAGE_FILE_INSTALL_TARGET(${_opt_ARGS}) ELSE("${fileType}" STREQUAL "SYSCONF_NO_REPLACE") SET(_destDir "${${fileType}_DIR}/${_opt_DEST_SUBDIR}") _MANAGE_FILE_INSTALL_FILE_OR_DIR("${fileType}") ENDIF("${fileType}" STREQUAL "SYSCONF_NO_REPLACE") ENDMACRO(MANAGE_FILE_INSTALL fileType) MACRO(FIND_ERROR_HANDLING TYPE VAR) SET(_verboseLevel ${M_ERROR}) SET(_errorMsg "") SET(_errorVar "") SET(_findFileArgList "") SET(_state "") FOREACH(_arg ${ARGN}) IF(_state STREQUAL "ERROR_MSG") SET(_errorMsg "${_arg}") SET(_state "") ELSEIF(_state STREQUAL "ERROR_VAR") SET(_errorVar "${_arg}") SET(_state "") ELSEIF(_state STREQUAL "VERBOSE_LEVEL") SET(_verboseLevel "${_arg}") SET(_state "") ELSEIF(_state STREQUAL "FIND_ARGS") LIST(APPEND _findFileArgList "${_arg}") ELSE(_state STREQUAL "ERROR_MSG") IF(_arg STREQUAL "ERROR_MSG") SET(_state "${_arg}") ELSEIF(_arg STREQUAL "ERROR_VAR") SET(_state "${_arg}") ELSEIF(_arg STREQUAL "VERBOSE_LEVEL") SET(_state "${_arg}") ELSE(_arg STREQUAL "ERROR_MSG") SET(_state "FIND_ARGS") LIST(APPEND _findFileArgList "${_arg}") ENDIF(_arg STREQUAL "ERROR_MSG") ENDIF(_state STREQUAL "ERROR_MSG") ENDFOREACH(_arg ${ARGN}) IF("${TYPE}" STREQUAL "PROGRAM") FIND_PROGRAM(${VAR} ${_findFileArgList}) SET(_type "Program") ELSE("${TYPE}" STREQUAL "PROGRAM") FIND_FILE(${VAR} ${_findFileArgList}) SET(_type "File") ENDIF("${TYPE}" STREQUAL "PROGRAM") IF(${VAR} STREQUAL "${VAR}-NOTFOUND") M_MSG(${_verboseLevel} "${_type} ${_findFileArgList} is not found!${_errorMsg}") IF (NOT _errorVar STREQUAL "") SET(${_errorVar} 1) ENDIF(NOT _errorVar STREQUAL "") ENDIF(${VAR} STREQUAL "${VAR}-NOTFOUND") ENDMACRO(FIND_ERROR_HANDLING TYPE VAR) FUNCTION(FIND_FILE_ERROR_HANDLING VAR) FIND_ERROR_HANDLING(FILE ${VAR} ${ARGN}) ENDFUNCTION(FIND_FILE_ERROR_HANDLING VAR) FUNCTION(FIND_PROGRAM_ERROR_HANDLING VAR) FIND_ERROR_HANDLING(PROGRAM ${VAR} ${ARGN}) ENDFUNCTION(FIND_PROGRAM_ERROR_HANDLING VAR) MACRO(GIT_GLOB_TO_CMAKE_REGEX var glob) SET(_s "${glob}") STRING(REGEX REPLACE "!" "!e" _s "${_s}") STRING(REGEX REPLACE "[*]{2}" "!d" _s "${_s}") STRING(REGEX REPLACE "[*]" "!s" _s "${_s}") STRING(REGEX REPLACE "[?]" "!q" _s "${_s}") STRING(REGEX REPLACE "[.]" "\\\\\\\\." _s "${_s}") STRING(REGEX REPLACE "!d" ".*" _s "${_s}") STRING(REGEX REPLACE "!s" "[^/]*" _s "${_s}") STRING(REGEX REPLACE "!q" "[^/]" _s "${_s}") STRING(REGEX REPLACE "!e" "!" _s "${_s}") STRING(LENGTH "${_s}" _len) MATH(EXPR _l ${_len}-1) STRING(SUBSTRING "${_s}" ${_l} 1 _t) IF( _t STREQUAL "/") SET(_s "/${_s}") ELSE( _t STREQUAL "/") SET(_s "${_s}\$") ENDIF( _t STREQUAL "/") SET(${var} "${_s}") ENDMACRO(GIT_GLOB_TO_CMAKE_REGEX var glob) ENDIF(NOT DEFINED _MANAGE_FILE_CMAKE_) ibus-chewing-1.4.10.1-Source/Modules/ManageEnvironment.cmake000664 001750 001750 00000015062 12266510707 024025 0ustar00dchendchen000000 000000 # - Manage build environment such as environment variables and compile flags. # This module predefine various environment variables, cmake policies, and # compile flags. # # The setting can be viewed and modified by ccmake. # # List of frequently used variable and compile flags: # + CMAKE_INSTALL_PREFIX: Compile flag whose value is ${CMAKE_INSTALL_PREFIX}. # + BIN_DIR: Directory for executable. # Default: ${CMAKE_INSTALL_PREFIX}/bin # + DATA_DIR: Directory for architecture independent data files. # Default: ${CMAKE_INSTALL_PREFIX}/share # + DOC_DIR: Directory for documentation # Default: ${DATA_DIR}/doc # + SYSCONF_DIR: System wide configuration files. # Default: /etc # + LIB_DIR: System wide library path. # Default: ${CMAKE_INSTALL_PREFIX}/lib for 32 bit, # ${CMAKE_INSTALL_PREFIX}/lib64 for 64 bit. # + LIBEXEC_DIR: Executables that are not meant to be executed by user directly. # Default: ${CMAKE_INSTALL_PREFIX}/libexec # + PROJECT_NAME: Project name # # Defines following macros: # SET_COMPILE_ENV(var default_value [ENV_NAME env_name] # [CACHE type docstring [FORCE]]) # - Ensure a variable is set to nonempty value, then add the variable and value to # compiling definition. # The value is determined by following order: # 1. Value of var if var is defined. # 2. Environment variable with the same name (or specified via ENV_NAME) # 3. Parameter default_value # Parameters: # + var: Variable to be set # + default_value: Default value of the var # + env_name: (Optional)The name of environment variable. # Only need if different from var. # + CACHE type docstring [FORCE]: # Same with "SET" command. # # SET_USUAL_COMPILE_ENVS() # - Set the most often used variable and compile flags. # It defines compile flags according to the values of corresponding variables, # usually under the same or similar name. # If a corresponding variable is not defined yet, then a default value is assigned # to that variable, then define the flag. # # Defines following flags according to the variable with same name. # + CMAKE_INSTALL_PREFIX: Compile flag whose value is ${CMAKE_INSTALL_PREFIX}. # + BIN_DIR: Directory for executable. # Default: ${CMAKE_INSTALL_PREFIX}/bin # + DATA_DIR: Directory for architecture independent data files. # Default: ${CMAKE_INSTALL_PREFIX}/share # + DOC_DIR: Directory for documentation # Default: ${DATA_DIR}/doc # + SYSCONF_DIR: System wide configuration files. # Default: /etc # + LIB_DIR: System wide library path. # Default: ${CMAKE_INSTALL_PREFIX}/lib for 32 bit, # ${CMAKE_INSTALL_PREFIX}/lib64 for 64 bit. # + LIBEXEC_DIR: Executables that are not meant to be executed by user directly. # Default: ${CMAKE_INSTALL_PREFIX}/libexec # + PROJECT_NAME: Project name # + PRJ_VER: Project version # + PRJ_DATA_DIR: Data directory for the project. # Default: ${DATA_DIR}/${PROJECT_NAME} # + PRJ_DOC_DIR: DocuFILEPATH = File chooser dialog. # Default: ${DOC_DIR}/${PROJECT_NAME}-${PRJ_VER} IF(NOT DEFINED _MANAGE_ENVIRONMENT_CMAKE_) SET(_MANAGE_ENVIRONMENT_CMAKE_ "DEFINED") SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON) MACRO(SET_COMPILE_ENV var default_value) SET(_stage "") SET(_env "${var}") SET(_setOpts "") SET(_force 0) FOREACH(_arg ${ARGN}) IF(_arg STREQUAL "ENV_NAME") SET(_stage "ENV_NAME") ELSEIF(_arg STREQUAL "CACHE") SET(_stage "_CACHE") ELSE(_arg STREQUAL "ENV_NAME") IF(_stage STREQUAL "ENV_NAME") SET(_env "${_arg}") ELSEIF(_stage STREQUAL "_CACHE") LIST(APPEND _setOpts "${_arg}") IF(_arg STREQUAL "FORCE") SET(_force 1) ENDIF(_arg STREQUAL "FORCE") ENDIF(_stage STREQUAL "ENV_NAME") ENDIF(_arg STREQUAL "ENV_NAME") ENDFOREACH(_arg ${ARGN}) IF(NOT "${_setOpts}" STREQUAL "") LIST(INSERT _setOpts 0 "CACHE") ENDIF(NOT "${_setOpts}" STREQUAL "") # Set the variable IF(_force) IF(NOT "$ENV{${_env}}" STREQUAL "") SET(${var} "$ENV{${_env}}" ${_setOpts}) ELSE(NOT "$ENV{${_env}}" STREQUAL "") SET(${var} "${default_value}" ${_setOpts}) ENDIF(NOT "$ENV{${_env}}" STREQUAL "") ELSE(_force) IF(NOT "${${var}}" STREQUAL "") SET(${var} "${${var}}" ${_setOpts}) ELSEIF(NOT "$ENV{${_env}}" STREQUAL "") SET(${var} "$ENV{${_env}}" ${_setOpts}) ELSE(NOT "${${var}}" STREQUAL "") # Default value SET(${var} "${default_value}" ${_setOpts}) ENDIF(NOT "${${var}}" STREQUAL "") ENDIF(_force) # Enforce CMP0005 to new, yet pop after ADD_DEFINITION CMAKE_POLICY(PUSH) CMAKE_POLICY(SET CMP0005 NEW) ADD_DEFINITIONS(-D${_env}=${${var}}) CMAKE_POLICY(POP) M_MSG(${M_INFO2} "SET(${var} ${${var}})") ENDMACRO(SET_COMPILE_ENV var default_value) MACRO(MANAGE_CMAKE_POLICY policyName defaultValue) IF(POLICY ${policyName}) CMAKE_POLICY(GET "${policyName}" _cmake_policy_value) IF(_cmake_policy_value STREQUAL "") # Policy not defined yet CMAKE_POLICY(SET "${policyName}" "${defaultValue}") ENDIF(_cmake_policy_value STREQUAL "") ENDIF(POLICY ${policyName}) ENDMACRO(MANAGE_CMAKE_POLICY policyName defaultValue) # Include should be put after the cmake policy INCLUDE(ManageMessage) M_MSG(${M_INFO1} "CMAKE_HOST_SYSTEM=${CMAKE_HOST_SYSTEM}") M_MSG(${M_INFO1} "CMAKE_SYSTEM=${CMAKE_SYSTEM}") #################################################################### # CMake Variables # SET_COMPILE_ENV(BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Binary dir") SET_COMPILE_ENV(DATA_DIR "${CMAKE_INSTALL_PREFIX}/share" CACHE PATH "Data dir") SET_COMPILE_ENV(DOC_DIR "${DATA_DIR}/doc" CACHE PATH "Documentation dir") SET_COMPILE_ENV(SYSCONF_DIR "/etc" CACHE PATH "System configuration dir") SET_COMPILE_ENV(LIBEXEC_DIR "${CMAKE_INSTALL_PREFIX}/libexec" CACHE PATH "LIBEXEC dir") IF(CMAKE_SYSTEM_PROCESSOR MATCHES "64") SET_COMPILE_ENV(IS_64 "64" CACHE STRING "IS_64") ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES "64") SET_COMPILE_ENV(LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib${IS_64}" CACHE PATH "Library dir") SET_COMPILE_ENV(PROJECT_NAME "${PROJECT_NAME}") SET_COMPILE_ENV(PRJ_DATA_DIR "${DATA_DIR}/${PROJECT_NAME}") # Directory to store cmake-fedora specific temporary files. IF(NOT CMAKE_FEDORA_TMP_DIR) SET(CMAKE_FEDORA_TMP_DIR "${CMAKE_BINARY_DIR}/NO_PACK") ENDIF(NOT CMAKE_FEDORA_TMP_DIR) ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_FEDORA_TMP_DIR} COMMAND cmake -E make_directory ${CMAKE_FEDORA_TMP_DIR} COMMENT "Create CMAKE_FEDORA_TMP_DIR" ) ENDIF(NOT DEFINED _MANAGE_ENVIRONMENT_CMAKE_) ibus-chewing-1.4.10.1-Source/Modules/ManageDependency.cmake000664 001750 001750 00000010561 12266510707 023576 0ustar00dchendchen000000 000000 # - Dependency Management Module # This module handle dependencies by using pkg-config and/or # search the executable. # # Includes: # ManageFile # ManageVersion # # Defines following macro: # MANAGE_DEPENDENCY(listVar var [VER ver [EXACT]] [REQUIRED] # [PROGRAM_NAMES name1 ...] [PKG_CONFIG pkgConfigName] # [FEDORA_NAME fedoraPkgName] [DEVEL] # ) # - Add a new dependency. # Arguments: # + listVar: List variable that hold all dependency of the same kind. # + var: Main variable. It recommend to use uppercase name, # such as GETTEXT # + VER ver [EXACT]: Minimum version. # Specify the exact version by providing "EXACT". # + REQUIRED: Specify that this dependency is required. # + PROGRAM_NAMES name1 ...: Executable to be found. # If found, ${var}_EXECUTABLE is defined as the full path # to the executable; if not found; the whole dependency is # deemed as not found. # + PKG_CONFIG pkgConfigName: Name of the pkg-config file # exclude the directory and .pc. e.g. "gtk+-2.0" # + FEDORA_NAME fedoraPkgName: Package name in Fedora. # If not specified, use the lower case of ${var}. # Note that '-devel' should be omitted here. # + DEVEL: devel package is used. It will append '-devel' # to fedoraPkgName # IF(NOT DEFINED _MANAGE_DEPENDENCY_CMAKE_) SET (_MANAGE_DEPENDENCY_CMAKE_ "DEFINED") INCLUDE(ManageFile) INCLUDE(ManageVariable) MACRO(MANAGE_DEPENDENCY listVar var) SET(_validOptions "VER" "EXACT" "REQUIRED" "PROGRAM_NAMES" "PKG_CONFIG" "FEDORA_NAME" "DEVEL") VARIABLE_PARSE_ARGN(${var} _validOptions ${ARGN}) UNSET(_ver) UNSET(_rel) IF(DEFINED ${var}_REQUIRED) SET(_verbose "${M_ERROR}") SET(_required "REQUIRED") ELSE(DEFINED ${var}_REQUIRED) SET(_verbose "${M_OFF}") SET(_required "") ENDIF(DEFINED ${var}_REQUIRED) IF(${var}_VER) SET(_ver "${${var}_VER}") IF(DEFINED ${var}_EXACT) SET(_rel "=") SET(_exact "EXACT") ELSE(DEFINED ${var}_EXACT) SET(_rel ">=") SET(_exact "") ENDIF(DEFINED ${var}_EXACT) ENDIF(${var}_VER) IF(${var}_PROGRAM_NAMES) MESSAGE(STATUS "checking for program '${${var}_PROGRAM_NAMES}'") FIND_PROGRAM(${var}_EXECUTABLE NAMES "${${var}_PROGRAM_NAMES}" DOC "${var} executable" ) IF(${var}_EXECUTABLE-NOTFOUND) M_MSG("${_verbose}" "Cannot found ${${var}_PROGRAM_NAMES} in path.") ELSE(${var}_EXECUTABLE-NOTFOUND) MESSAGE(STATUS " found ${${var}_EXECUTABLE}") ENDIF(${var}_EXECUTABLE-NOTFOUND) FIND_PROGRAM_ERROR_HANDLING(${var}_EXECUTABLE VERBOSE_LEVEL "${_verbose}" "${${var}_PROGRAM_NAMES}" ) MARK_AS_ADVANCED(${var}_EXECUTABLE) ENDIF(${var}_PROGRAM_NAMES) IF(${var}_PKG_CONFIG) IF(NOT PKG_CONFIG_VERSION) FIND_PACKAGE(PkgConfig REQUIRED) ## Auto-add pkgconfig as dependency LIST(APPEND ${listVar} "pkgconfig") ENDIF(NOT PKG_CONFIG_VERSION) PKG_CHECK_MODULES(${var} ${_required} "${${var}_PKG_CONFIG}${_rel}${_ver}") EXECUTE_PROCESS(COMMAND ${PKG_CONFIG_EXECUTABLE} --print-variables "${${var}_PKG_CONFIG}" OUTPUT_VARIABLE _variables OUTPUT_STRIP_TRAILING_WHITESPACE RESULT_VARIABLE _ret ) IF(NOT _ret) STRING_SPLIT(${var}_VARIABLES "\n" "${_variables}") FOREACH(_v ${${var}_VARIABLES}) STRING(TOUPPER "${_v}" _u) EXECUTE_PROCESS(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable "${_v}" "${${var}_PKG_CONFIG}" OUTPUT_VARIABLE ${var}_${_u} OUTPUT_STRIP_TRAILING_WHITESPACE ) MARK_AS_ADVANCED(${var}_${_u}) M_MSG(${M_INFO1} "${var}_${_u}=${${var}_${_u}}") ENDFOREACH(_v ${var}_VARIABLES) ENDIF(NOT _ret) ENDIF(${var}_PKG_CONFIG) IF(${var}_FEDORA_NAME) SET(_name "${${var}_FEDORA_NAME}") ELSE(${var}_FEDORA_NAME) STRING(TOLOWER "${var}" _name) ENDIF(${var}_FEDORA_NAME) IF(DEFINED ${var}_DEVEL) SET(_name "${_name}-devel") ENDIF(DEFINED ${var}_DEVEL) IF("${_ver}" STREQUAL "") SET(_newDep "${_name}") ELSE("${_ver}" STREQUAL "") SET(_newDep "${_name} ${_rel} ${_ver}") ENDIF("${_ver}" STREQUAL "") ## Insert when it's not duplicated LIST(FIND ${listVar} "${_newDep}" _index) IF(_index EQUAL -1) LIST(APPEND ${listVar} "${_newDep}") SET(${listVar} "${${listVar}}" CACHE INTERNAL "${listVar}") ENDIF(_index EQUAL -1) ENDMACRO(MANAGE_DEPENDENCY listVar var) ENDIF(NOT DEFINED _MANAGE_DEPENDENCY_CMAKE_) ibus-chewing-1.4.10.1-Source/Modules/ManageUninstall.cmake000664 001750 001750 00000002010 12266510707 023457 0ustar00dchendchen000000 000000 # - Uninstall target. # Use this module to provide uninstall target. # # Define following targets # uninstall: For uninstalling the package. # IF(NOT DEFINED _MANAGE_UNINSTALL_CMAKE_) SET(_MANAGE_UNINSTALL_CMAKE_ "DEFINED") SET(CMAKE_UNINSTALL_IN_SEARCH_PATH ${CMAKE_MODULE_PATH} ${CMAKE_ROOT}/Modules ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/Modules) FIND_FILE(CMAKE_UNINSTALL_IN cmake_uninstall.cmake.in PATHS ${CMAKE_UNINSTALL_IN_SEARCH_PATH}) # MESSAGE("CMAKE_UNINSTALL_IN=${CMAKE_UNINSTALL_IN}") IF(CMAKE_UNINSTALL_IN STREQUAL "CMAKE_UNINSTALL_IN-NOTFOUND") MESSAGE(FATAL_ERROR "Cannot find cmake_uninstall.cmake.in in" "${CMAKE_UNINSTALL_IN_SEARCH_PATH}") ENDIF(CMAKE_UNINSTALL_IN STREQUAL "CMAKE_UNINSTALL_IN-NOTFOUND") CONFIGURE_FILE("${CMAKE_UNINSTALL_IN}" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY) ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" ) ENDIF(NOT DEFINED _MANAGE_UNINSTALL_CMAKE_) ibus-chewing-1.4.10.1-Source/Modules/ManageVariable.cmake000664 001750 001750 00000035563 12266510707 023256 0ustar00dchendchen000000 000000 # - Get or set variables from various sources. # # Includes: # ManageString # # Included by: # ManageVersion # PackRPM # # Defines following functions: # SETTING_STRING_GET_VARIABLE(var value str # [NOUNQUOTE] [NOREPLACE] [setting_sign] # ) # - Get a variable and a value from a setting in string format. # i.e. VAR=Value # pattern. '#' is used for comment. # * Parameters: # + var: Variable name extracted from str. # + value: Value extracted from str # + str: String to be extracted variable and value from. # + NOUNQUOTE: (Optional) do not remove the double quote mark around the string. # + NOREPLACE (Optional) Without this parameter, this macro replaces # previous defined variables, use NOREPLACE to prevent this. # + NOESCAPE_SEMICOLON: (Optional) do not escape semicolons. # + setting_sign: (Optional) The symbol that separate attribute name and its value. # Default value: "=" # # Defines following macros: # COMMAND_OUTPUT_TO_VARIABLE(var cmd) # - Store command output to a variable, without new line characters (\n and \r). # This macro is suitable for command that output one line result. # Note that the var will be set to ${var_name}-NOVALUE if cmd does not have # any output. # * Parameters: # var: A variable that stores the result. # cmd: A command. # # SETTING_FILE_GET_VARIABLES_PATTERN(var attr_pattern setting_file # [NOUNQUOTE] [NOREPLACE] # [NOESCAPE_SEMICOLON] [setting_sign] # ) # - Get variable values from a setting file if their names matches given # pattern. '#' is used for comment. # * Parameters: # + var: Variable to store the attribute value. # Set to "" to set attribute under matched variable name. # + attr_pattern: Regex pattern of variable name. # + setting_file: Setting filename. # + NOUNQUOTE: (Optional) do not remove the double quote mark around the string. # + NOREPLACE (Optional) Without this parameter, this macro replaces # previous defined variables, use NOREPLACE to prevent this. # + NOESCAPE_SEMICOLON: (Optional) do not escape semicolons. # + setting_sign: (Optional) The symbol that separate attribute name and its value. # Default value: "=" # # SETTING_FILE_GET_ALL_VARIABLES(setting_file [NOUNQUOTE] [NOREPLACE] # [NOESCAPE_SEMICOLON] [setting_sign] # ) # - Get all variable values from a setting file. # It is equivalent to: # SETTING_FILE_GET_VARIABLES_PATTERN("" "[A-Za-z_][A-Za-z0-9_]*" # "${setting_file}" ${ARGN}) # '#' is used to comment out setting. # * Parameters: # + setting_file: Setting filename. # + NOUNQUOTE: (Optional) do not remove the double quote mark around the string. # + NOREPLACE (Optional) Without this parameter, this macro replaces # previous defined variables, use NOREPLACE to prevent this. # + NOESCAPE_SEMICOLON: (Optional) Do not escape semicolons. # + setting_sign: (Optional) The symbol that separate attribute name and its value. # Default value: "=" # # SETTING_FILE_GET_VARIABLE(var attr_name setting_file # [NOUNQUOTE] [NOREPLACE] # [NOESCAPE_SEMICOLON] [setting_sign] # ) # - Get a variable value from a setting file. # It is equivalent to: # SETTING_FILE_GET_VARIABLES_PATTERN(${var} "${attr_name}" # "${setting_file}" ${ARGN}) # '#' is used to comment out setting. # * Parameters: # + var: Variable to store the attribute value. # + attr_name: Name of the variable. # + setting_file: Setting filename. # + NOUNQUOTE: (Optional) do not remove the double quote mark around the string. # + NOREPLACE (Optional) Without this parameter, this macro replaces # previous defined variables, use NOREPLACE to prevent this. # + NOESCAPE_SEMICOLON: (Optional) do not escape semicolons. # + setting_sign: (Optional) The symbol that separate attribute name and its value. # Default value: "=" # # SETTING_FILE_GET_ALL_VARIABLES(setting_file [NOUNQUOTE] [NOREPLACE] # [NOESCAPE_SEMICOLON] [setting_sign] # ) # - Get all attribute values from a setting file. # '#' is used to comment out setting. # * Parameters: # + setting_file: Setting filename. # + NOUNQUOTE: (Optional) do not remove the double quote mark around the string. # + NOREPLACE (Optional) Without this parameter, this macro replaces # previous defined variables, use NOREPLACE to prevent this. # + NOESCAPE_SEMICOLON: (Optional) Do not escape semicolons. # + setting_sign: (Optional) The symbol that separate attribute name and its value. # Default value: "=" # # GET_ENV(var default_value [env] # [[CACHE type docstring [FORCE]] | PARENT_SCOPE] # ) # - Get the value of a environment variable, or use default # if the environment variable does not exist or is empty. # * Parameters: # var: Variable to be set # default_value: Default value of the var # env: (Optional) The name of environment variable. Only need if different from var. # CACHE ... : Arguments for SET # PARENT_SCOPE: Arguments for SET # # SET_VAR(var untrimmed_value) # - Trim an set the value to a variable. # * Parameters: # var: Variable to be set # untrimmed_value: Untrimmed values that may have space, \t, \n, \r in the front or back of the string. # # VARIABLE_PARSE_ARGN(var validOptions [arguments ]) # - Parse the arguments and put the result in var and var_ # * Parameters: # var: Main variable name. # validOptions: List name of valid options. # arguments: (Optional) variable to be parsed. # # VARIABLE_TO_ARGN(var prefix validOptions) # - Merge the variable and options to the form of ARGN. # Like the reverse of VARIABLE_PARSE_ARGN # * Parameters: # var: Variable that holds result. # prefix: Main variable name that to be processed. # validOptions: List name of valid options. # IF(NOT DEFINED _MANAGE_VARIABLE_CMAKE_) SET(_MANAGE_VARIABLE_CMAKE_ "DEFINED") INCLUDE(ManageString) MACRO(COMMAND_OUTPUT_TO_VARIABLE var cmd) EXECUTE_PROCESS( COMMAND ${cmd} ${ARGN} OUTPUT_VARIABLE _cmd_output OUTPUT_STRIP_TRAILING_WHITESPACE ) IF(_cmd_output) SET(${var} ${_cmd_output}) ELSE(_cmd_output) SET(var "${var}-NOVALUE") ENDIF(_cmd_output) #SET(value ${${var}}) #MESSAGE("var=${var} _cmd_output=${_cmd_output} value=|${value}|" ) ENDMACRO(COMMAND_OUTPUT_TO_VARIABLE var cmd) # This macro is meant to be internal. MACRO(_MANAGE_VARIABLE_SET var value) SET(${var} "${value}") ENDMACRO(_MANAGE_VARIABLE_SET var value) # it deals the "encoded" line. FUNCTION(SETTING_STRING_GET_VARIABLE var value str ) SET(setting_sign "=") SET(_NOUNQUOTE "") SET(_NOREPLACE "") FOREACH(_arg ${ARGN}) IF (${_arg} STREQUAL "NOUNQUOTE") SET(_NOUNQUOTE "NOUNQUOTE") ELSEIF (${_arg} STREQUAL "NOREPLACE") SET(_NOREPLACE "NOREPLACE") ELSE(${_arg} STREQUAL "NOUNQUOTE") SET(setting_sign ${_arg}) ENDIF(${_arg} STREQUAL "NOUNQUOTE") ENDFOREACH(_arg ${ARGN}) STRING_SPLIT(_tokens "${setting_sign}" "${str}" 2) #MESSAGE("_tokens=${_tokens}") SET(_varName "") SET(_val "") FOREACH(_token ${_tokens}) #MESSAGE("_varName=${_varName} _token=${_token}") IF(_varName STREQUAL "") SET(_varName "${_token}") ELSE(_varName STREQUAL "") SET(_val "${_token}") ENDIF(_varName STREQUAL "") ENDFOREACH(_token ${_tokens}) #MESSAGE("_varName=${_varName} _val=${_val}") SET(${var} "${_varName}" PARENT_SCOPE) # Set var when # 1. NOREPLACE is not set, or # 2. var has value already. SET(_setVar 0) IF(_NOREPLACE STREQUAL "") STRING_TRIM(_value "${_val}" ${_NOUNQUOTE}) ELSEIF(${var} STREQUAL "") STRING_TRIM(_value "${_val}" ${_NOUNQUOTE}) ELSE(_NOREPLACE STREQUAL "") SET(_value "${${var}}") ENDIF(_NOREPLACE STREQUAL "") SET(${value} "${_value}" PARENT_SCOPE) #MESSAGE("_varName=${_varName} _value=${_value}") ENDFUNCTION(SETTING_STRING_GET_VARIABLE var str) # Internal macro # Similar to STRING_ESCAPE, but read directly from file, # This avoid the variable substitution # Variable escape is enforced. MACRO(FILE_READ_ESCAPE var filename) # '$' is very tricky. # '$' => '#D' GET_FILENAME_COMPONENT(_filename_abs "${filename}" ABSOLUTE) EXECUTE_PROCESS(COMMAND cat ${filename} COMMAND sed -e "s/#/#H/g" COMMAND sed -e "s/[$]/#D/g" COMMAND sed -e "s/;/#S/g" COMMAND sed -e "s/[\\]/#B/g" OUTPUT_VARIABLE _ret OUTPUT_STRIP_TRAILING_WHITESPACE) STRING(REGEX REPLACE "\n" ";" _ret "${_ret}") #MESSAGE("_ret=|${_ret}|") SET(${var} "${_ret}") ENDMACRO(FILE_READ_ESCAPE var filename) MACRO(SETTING_FILE_GET_VARIABLES_PATTERN var attr_pattern setting_file) IF("${setting_file}" STREQUAL "") M_MSG(${M_FATAL} "SETTING_FILE_GET_VARIABLES_PATTERN: setting_file ${setting_file} is empty") ENDIF("${setting_file}" STREQUAL "") SET(setting_sign "=") SET(_noUnQuoted "") SET(_noEscapeSemicolon "") SET(_noReplace "") SET(_escapeVariable "") FOREACH(_arg ${ARGN}) IF (${_arg} STREQUAL "NOUNQUOTE") SET(_noUnQuoted "NOUNQUOTE") ELSEIF (${_arg} STREQUAL "NOREPLACE") SET(_noReplace "NOREPLACE") ELSEIF (${_arg} STREQUAL "NOESCAPE_SEMICOLON") SET(_noEscapeSemicolon "NOESCAPE_SEMICOLON") ELSEIF (${_arg} STREQUAL "ESCAPE_VARIABLE") SET(_escapeVariable "ESCAPE_VARIABLE") ELSE(${_arg} STREQUAL "NOUNQUOTE") SET(setting_sign ${_arg}) ENDIF(${_arg} STREQUAL "NOUNQUOTE") ENDFOREACH(_arg) # Escape everything to be safe. FILE_READ_ESCAPE(_lines "${setting_file}") #STRING_SPLIT(_lines "\n" "${_txt_content}") #MESSAGE("_lines=|${_lines}|") SET(_actual_line "") SET(_join_next 0) FOREACH(_line ${_lines}) #MESSAGE("_line=|${_line}|") IF(NOT _line MATCHES "^[ \\t]*#H") # Not a comment line. IF(_join_next EQUAL 1) SET(_actual_line "${_actual_line}${_line}" ) ELSE(_join_next EQUAL 1) SET(_actual_line "${_line}") ENDIF(_join_next EQUAL 1) #MESSAGE("_actual_line=|${_actual_line}|") IF(_actual_line MATCHES "#B$") #Join the lines that end with \\ SET(_join_next 1) STRING(REGEX REPLACE "#B$" "" _actual_line "${_actual_line}") ELSE(_actual_line MATCHES "#B$") SET(_join_next 0) IF(_actual_line MATCHES "[ \\t]*${attr_pattern}[ \\t]*${setting_sign}") #MESSAGE("*** matched_line=|${_actual_line}|") SETTING_STRING_GET_VARIABLE(_attr _value "${_actual_line}" ${setting_sign} ${_noUnQuoted} ) #MESSAGE("*** _attr=${_attr} _value=${_value}") IF(_noReplace STREQUAL "" OR NOT DEFINED ${_attr}) # Unencoding _STRING_UNESCAPE(_value "${_value}" ${_noEscapeSemicolon} ESCAPE_VARIABLE) IF(_escapeVariable STREQUAL "") # Variable should not be escaped # i.e. need substitution _MANAGE_VARIABLE_SET(_value "${_value}") ENDIF(_escapeVariable STREQUAL "") IF("${var}" STREQUAL "") SET(${_attr} "${_value}") ELSE("${var}" STREQUAL "") SET(${var} "${_value}") ENDIF("${var}" STREQUAL "") ENDIF(_noReplace STREQUAL "" OR NOT DEFINED ${_attr}) ENDIF(_actual_line MATCHES "[ \\t]*${attr_pattern}[ \\t]*${setting_sign}") ENDIF(_actual_line MATCHES "#B$") ENDIF(NOT _line MATCHES "^[ \\t]*#H") ENDFOREACH(_line ${_lines}) #SET(${var} "${_value}") ENDMACRO(SETTING_FILE_GET_VARIABLES_PATTERN var attr_pattern setting_file) MACRO(SETTING_FILE_GET_VARIABLE var attr_name setting_file) SETTING_FILE_GET_VARIABLES_PATTERN(${var} "${attr_name}" "${setting_file}" ${ARGN}) ENDMACRO(SETTING_FILE_GET_VARIABLE var attr_name setting_file) MACRO(SETTING_FILE_GET_ALL_VARIABLES setting_file) SETTING_FILE_GET_VARIABLES_PATTERN("" "[A-Za-z_][A-Za-z0-9_.]*" "${setting_file}" ${ARGN}) ENDMACRO(SETTING_FILE_GET_ALL_VARIABLES setting_file) MACRO(GET_ENV var default_value) SET(_env "${var}") SET(_state "") SET(_setArgList "") FOREACH(_arg ${ARGN}) IF(_state STREQUAL "set_args") LIST(APPEND _setArgList "${_arg}") ELSE(_state STREQUAL "set_args") IF (_arg STREQUAL "CACHE") SET(_state "set_args") LIST(APPEND _setArgList "${_arg}") ELSEIF (_arg STREQUAL "PARENT_SCOPE") SET(_state "set_args") LIST(APPEND _setArgList "${_arg}") ELSE(_arg STREQUAL "CACHE") SET(_env "${_arg}") ENDIF(_arg STREQUAL "CACHE") ENDIF(_state STREQUAL "set_args") ENDFOREACH(_arg ${ARGN}) IF ("$ENV{${_env}}" STREQUAL "") SET(${var} "${default_value}" ${_setArgList}) ELSE("$ENV{${_env}}" STREQUAL "") SET(${var} "$ENV{${_env}}" ${_setArgList}) ENDIF("$ENV{${_env}}" STREQUAL "") # MESSAGE("Variable ${var}=${${var}}") ENDMACRO(GET_ENV var default_value) MACRO(SET_VAR var untrimmedValue) SET(_noUnQuoted "") FOREACH(_arg ${ARGN}) IF (${_arg} STREQUAL "NOUNQUOTE") SET(_noUnQuoted "NOUNQUOTE") ENDIF(${_arg} STREQUAL "NOUNQUOTE") ENDFOREACH(_arg ${ARGN}) #MESSAGE("untrimmedValue=${untrimmedValue}") IF ("${untrimmedValue}" STREQUAL "") SET(${var} "") ELSE("${untrimmedValue}" STREQUAL "") STRING_TRIM(trimmedValue "${untrimmedValue}" ${_noUnQuoted}) #MESSAGE("***SET_VAR: trimmedValue=${trimmedValue}") SET(${var} "${trimmedValue}") ENDIF("${untrimmedValue}" STREQUAL "") #SET(value "${${var}}") #MESSAGE("***SET_VAR: ${var}=|${value}|") ENDMACRO(SET_VAR var untrimmedValue) MACRO(VARIABLE_PARSE_ARGN var validOptions) SET(_optName "") ## Last _optName SET(_listName ${var}) ## Unset all, otherwise ghost from previous running exists. UNSET(${var}) FOREACH(_o ${${validOptions}}) UNSET(${var}_${_o}) ENDFOREACH(_o ${validOptions}) FOREACH(_arg ${ARGN}) LIST(FIND ${validOptions} "${_arg}" _optIndex) IF(_optIndex EQUAL -1) ## Not an option name. Append to existing options LIST(APPEND ${_listName} "${_arg}") ELSE(_optIndex EQUAL -1) ## _arg is an option name. SET(_listName "${var}_${_arg}") ## If the option already exists IF(DEFINED ${var}_${_arg}) ### then append to it with option name ### this is especiall useful for ADD_CUSTOM_TARGET_COMMAND LIST(APPEND ${_listName} "${_arg}") ELSE(DEFINED ${var}_${_arg}) ### otherwise init the option name, ### , so it can be find by IF(DEFINED ...) SET(${_listName} "") ENDIF(DEFINED ${var}_${_arg}) ENDIF(_optIndex EQUAL -1) ENDFOREACH(_arg ${ARGN}) ENDMACRO(VARIABLE_PARSE_ARGN var validOptions) MACRO(VARIABLE_TO_ARGN var prefix validOptions) SET(${var} "${${prefix}}") FOREACH(_o ${${validOptions}}) IF(DEFINED ${prefix}_${_o}) LIST(APPEND ${var} "${_o}" "${${prefix}_${_o}}") ENDIF(DEFINED ${prefix}_${_o}) ENDFOREACH(_o ${${validOptions}}) ENDMACRO(VARIABLE_TO_ARGN var prefix validOptions) ENDIF(NOT DEFINED _MANAGE_VARIABLE_CMAKE_) ibus-chewing-1.4.10.1-Source/Modules/ManageArchive.cmake000664 001750 001750 00000026775 12273070154 023112 0ustar00dchendchen000000 000000 # - Archive Management Module # By default CPack pack everything under the source directory, # this is usually # undesirable. We avoid this by using the sane default ignore list. # # Includes: # ManageFile # ManageVersion # CPack # # Included by: # ManageRPM # # Defines following target: # pack_remove_old: Remove old source package files. # # Defines following function: # SOURCE_ARCHIVE_CONTENTS_ADD(filename) # - Add a file to source archive if the file is not in the archive. # * Parameters: # - filename: Filename to be added. # # SOURCE_ARCHIVE_CONTENTS_ADD_NO_CHECK(filename) # - Add a file to source archive without check. # * Parameters: # - filename: Filename to be added. # # Defines following macro: # PACK_SOURCE_CPACK(var [GENERATOR cpackGenerator] # [GITIGNORE gitignoreFile] [INCLUDE fileList] # ) # - Pack with CPack. Thus cpack related targets # such as 'package_source' will be added. # * Parameters: # + var: Variable that hold cpack filename (without directory). # + GENERATOR cpackGenerator: Specify CPack Generator to be used. # Default: TGZ # + GITIGNORE gitignoreFile: Use gitignore # file as bases of ignore_file list # + INCLUDE fileList: List of files that to be packed disregarding # the ignore file. This is useful for packing the generated file # such as .pot or Changelog. # * Define following variables: # + PROJECT_NAME: Project name # + PRJ_VER: Project version # + PRJ_SUMMARY: (Optional) Project summary # + VENDOR: Organization that issue this project. # + SOURCE_ARCHIVE_CONTENTS: List of files to be packed to archive. # + SOURCE_ARCHIVE_FILE_EXTENSION: File extension of # the source package # + SOURCE_ARCHIVE_IGNORE_FILES: List of files to be # ignored to archive. # + SOURCE_ARCHIVE_NAME: Name of source archive (without path) # # PACK_SOURCE_ARCHIVE([outputDir | OUTPUT_FILE file] # [GENERATOR cpackGenerator] # [GITIGNORE gitignoreFile] [INCLUDE fileList])[generator] # ) # - Pack source archive, this provide an convenient wrapper # of PACK_SOURCE_CPACK. # Default output name: --Source. # * Parameters: # + outputDir: Directory to write source archive. # + OUTPUT_FILE file: Output file with path. # See PACK_SOURCE_CPACK for other parameters. # * Read following variables: # + SOURCE_ARCHIVE_FILE: Path to source archive file # * Target: # + pack_src: Pack source files like package_source. # + clean_pack_src: Remove all source archives. # + clean_old_pack_src: Remove all old source package. # # IF(NOT DEFINED _MANAGE_ARCHIVE_CMAKE_) SET (_MANAGE_ARCHIVE_CMAKE_ "DEFINED") SET(SOURCE_ARCHIVE_IGNORE_FILES_COMMON "/\\\\.svn/" "/CVS/" "/\\\\.git/" "/\\\\.hg/" "NO_PACK") SET(SOURCE_ARCHIVE_IGNORE_FILES_CMAKE "/CMakeFiles/" "_CPack_Packages/" "/Testing/" "\\\\.directory$" "CMakeCache\\\\.txt$" "/install_manifest.txt$" "/cmake_install\\\\.cmake$" "/cmake_uninstall\\\\.cmake$" "/CPack.*\\\\.cmake$" "/CTestTestfile\\\\.cmake$" "Makefile$" "/${PROJECT_NAME}-${PRJ_VER}-SOURCE/" ) SET(SOURCE_ARCHIVE_IGNORE_FILES ${SOURCE_ARCHIVE_IGNORE_FILES_CMAKE} ${SOURCE_ARCHIVE_IGNORE_FILES_COMMON} ) INCLUDE(ManageVersion) INCLUDE(ManageFile) FUNCTION(SOURCE_ARCHIVE_CONTENTS_ADD filename) GET_FILENAME_COMPONENT(_file "${filename}" ABSOLUTE) FILE(RELATIVE_PATH _f ${CMAKE_SOURCE_DIR} "${_file}") LIST(FIND SOURCE_ARCHIVE_CONTENTS "${_f}" _index) IF(_index LESS 0) LIST(APPEND SOURCE_ARCHIVE_CONTENTS "${_f}") SET(SOURCE_ARCHIVE_CONTENTS "${SOURCE_ARCHIVE_CONTENTS}" CACHE INTERNAL "Source archive file list" ) ENDIF(_index LESS 0) ENDFUNCTION(SOURCE_ARCHIVE_CONTENTS_ADD filename) FUNCTION(SOURCE_ARCHIVE_CONTENTS_ADD_NO_CHECK filename) GET_FILENAME_COMPONENT(_file "${filename}" ABSOLUTE) FILE(RELATIVE_PATH _f ${CMAKE_SOURCE_DIR} "${_file}") LIST(APPEND SOURCE_ARCHIVE_CONTENTS "${_f}") SET(SOURCE_ARCHIVE_CONTENTS "${SOURCE_ARCHIVE_CONTENTS}" CACHE INTERNAL "Source archive file list" ) ENDFUNCTION(SOURCE_ARCHIVE_CONTENTS_ADD_NO_CHECK filename) # Internal: SOURCE_ARCHIVE_GET_CONTENTS() # - Return all source file to be packed. # This is called by SOURCE_ARCHIVE(), # So no need to call it again. FUNCTION(SOURCE_ARCHIVE_GET_CONTENTS ) SET(_fileList "") FILE(GLOB_RECURSE _ls FOLLOW_SYMLINKS "*" ) STRING(REPLACE "\\\\" "\\" _ignore_files "${SOURCE_ARCHIVE_IGNORE_FILES}") #SET(_ignore_files "${SOURCE_ARCHIVE_IGNORE_FILES}") FOREACH(_file ${_ls}) SET(_matched 0) FOREACH(filePattern ${_ignore_files}) M_MSG(${M_INFO3} "_file=${_file} filePattern=${filePattern}") IF(_file MATCHES "${filePattern}") SET(_matched 1) BREAK() ENDIF(_file MATCHES "${filePattern}") ENDFOREACH(filePattern ${_ignore_files}) IF(NOT _matched) SOURCE_ARCHIVE_CONTENTS_ADD_NO_CHECK("${_file}") ENDIF(NOT _matched) ENDFOREACH(_file ${_ls}) SET(SOURCE_ARCHIVE_CONTENTS "${SOURCE_ARCHIVE_CONTENTS}" CACHE INTERNAL "Source archive file list" ) M_MSG(${M_INFO2} "SOURCE_ARCHIVE_CONTENTS=${SOURCE_ARCHIVE_CONTENTS}") ENDFUNCTION(SOURCE_ARCHIVE_GET_CONTENTS) MACRO(CMAKE_REGEX_TO_REGEX var cmrgx) STRING(REPLACE "\\\\" "\\" ${var} "${cmrgx}") ENDMACRO(CMAKE_REGEX_TO_REGEX var cmrgx) MACRO(SOURCE_ARCHIVE_GET_IGNORE_LIST _ignoreListVar _includeListVar) IF(${_ignoreListVar}) FILE(STRINGS "${${_ignoreListVar}}" _content REGEX "^[^#]") FOREACH(_s ${_content}) STRING(STRIP "${_s}" _s) STRING(LENGTH "${_s}" _l) IF(_l GREATER 0) ## Covert the string from glob to cmake regex GIT_GLOB_TO_CMAKE_REGEX(_cmrgx ${_s}) LIST(APPEND SOURCE_ARCHIVE_IGNORE_FILES "${_cmrgx}") ENDIF(_l GREATER 0) ENDFOREACH(_s ${_content}) ENDIF(${_ignoreListVar}) ## regex match one of include files ## then remove that line FOREACH(_ignore_pattern ${SOURCE_ARCHIVE_IGNORE_FILES}) CMAKE_REGEX_TO_REGEX(_ip "${_ignore_pattern}") FOREACH(_i ${${_includeListVar}}) STRING(REGEX MATCH "${_ip}" _ret "${_i}") IF(_ret) LIST(REMOVE_ITEM SOURCE_ARCHIVE_IGNORE_FILES "${_ignore_pattern}") ENDIF(_ret) ENDFOREACH(_i ${${_includeListVar}}) ENDFOREACH(_ignore_pattern ${SOURCE_ARCHIVE_IGNORE_FILES}) ENDMACRO(SOURCE_ARCHIVE_GET_IGNORE_LIST _ignoreListVar _includeListVar) MACRO(PACK_SOURCE_CPACK var) SET(_valid_options "GENERATOR" "INCLUDE" "GITIGNORE") VARIABLE_PARSE_ARGN(_opt _valid_options ${ARGN}) IF(NOT _opt_GENERATOR) SET(_opt_GENERATOR "TGZ") ENDIF(NOT _opt_GENERATOR) SET(CPACK_GENERATOR "${_opt_GENERATOR}") SET(CPACK_SOURCE_GENERATOR ${CPACK_GENERATOR}) IF(${CPACK_GENERATOR} STREQUAL "TGZ") SET(SOURCE_ARCHIVE_FILE_EXTENSION "tar.gz") ELSEIF(${CPACK_GENERATOR} STREQUAL "TBZ2") SET(SOURCE_ARCHIVE_FILE_EXTENSION "tar.bz2") ELSEIF(${CPACK_GENERATOR} STREQUAL "ZIP") SET(SOURCE_ARCHIVE_FILE_EXTENSION "zip") ENDIF(${CPACK_GENERATOR} STREQUAL "TGZ") SET(CPACK_PACKAGE_VERSION ${PRJ_VER}) IF(PRJ_SUMMARY) SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PRJ_SUMMARY}") ENDIF(PRJ_SUMMARY) IF(EXISTS ${CMAKE_SOURCE_DIR}/COPYING) SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING) ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/COPYING) IF(EXISTS ${CMAKE_SOURCE_DIR}/README) SET(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_SOURCE_DIR}/README) ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/README) SET(CPACK_PACKAGE_VENDOR "${VENDOR}") SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PRJ_VER}-Source") LIST(APPEND SOURCE_ARCHIVE_IGNORE_FILES "${PROJECT_NAME}-[^/]*-Source") SET(SOURCE_ARCHIVE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}.${SOURCE_ARCHIVE_FILE_EXTENSION}" CACHE STRING "Source archive name" FORCE) SET(${var} "${SOURCE_ARCHIVE_NAME}") SOURCE_ARCHIVE_GET_IGNORE_LIST(_opt_GITIGNORE _opt_INCLUDE) LIST(APPEND CPACK_SOURCE_IGNORE_FILES ${SOURCE_ARCHIVE_IGNORE_FILES}) SOURCE_ARCHIVE_GET_CONTENTS() SET(SOURCE_ARCHIVE_CONTENTS_ABSOLUTE "") FOREACH(_file ${SOURCE_ARCHIVE_CONTENTS}) LIST(APPEND SOURCE_ARCHIVE_CONTENTS_ABSOLUTE "${CMAKE_HOME_DIRECTORY}/${_file}") ENDFOREACH(_file ${SOURCE_ARCHIVE_CONTENTS}) INCLUDE(CPack) ENDMACRO(PACK_SOURCE_CPACK var) MACRO(PACK_SOURCE_ARCHIVE) SET(_valid_options "OUTPUT_FILE" "GENERATOR" "INCLUDE" "GITIGNORE") VARIABLE_PARSE_ARGN(_opt _valid_options ${ARGN}) IF(PRJ_VER STREQUAL "") M_MSG(${M_FATAL} "PRJ_VER not defined") ENDIF(PRJ_VER STREQUAL "") ## PACK_SOURCE_CPACK to pack with default output file VARIABLE_TO_ARGN(_cpack_source_pack_opts _opt _valid_options) PACK_SOURCE_CPACK(_source_archive_file ${_cpack_source_pack_opts}) ## Does user want his own output file or directory SET(_own 0) SET(_own_dir 0) SET(_own_file 0) IF(_opt) SET(_outputDir "${_opt}") ENDIF(_opt) IF(_opt_OUTPUT_FILE) GET_FILENAME_COMPONENT(_outputDir ${_opt_OUTPUT_FILE} PATH) GET_FILENAME_COMPONENT(_outputFile ${_opt_OUTPUT_FILE} NAME) ENDIF(_opt_OUTPUT_FILE) GET_FILENAME_COMPONENT(_currentDir_real "." REALPATH) IF(_outputDir) GET_FILENAME_COMPONENT(_outputDir_real ${_outputDir} REALPATH) ELSE(_outputDir) SET(_outputDir_real ${_currentDir_real}) ENDIF(_outputDir) IF(NOT _outputFile) SET(_outputFile "${_source_archive_file}") ENDIF(NOT _outputFile) IF(NOT _outputDir_real STREQUAL "${_currentDir_real}") SET(_own_dir 1) SET(_own 1) ENDIF(NOT _outputDir_real STREQUAL "${_currentDir_real}") IF(NOT _outputFile STREQUAL "${_source_archive_file}") SET(_own_file 1) SET(_own 1) ENDIF(NOT _outputFile STREQUAL "${_source_archive_file}") GET_FILENAME_COMPONENT(SOURCE_ARCHIVE_FILE "${_outputDir_real}/${_outputFile}" ABSOLUTE) SET(SOURCE_ARCHIVE_FILE ${SOURCE_ARCHIVE_FILE} CACHE FILEPATH "Source archive file" FORCE) SET(SOURCE_ARCHIVE_NAME "${_outputFile}" CACHE FILEPATH "Source archive name" FORCE) SET(_dep_list ${SOURCE_ARCHIVE_CONTENTS_ABSOLUTE}) ## If own directory, IF(_own_dir) ### Need to create it ADD_CUSTOM_COMMAND(OUTPUT ${_outputDir_real} COMMAND ${CMAKE_COMMAND} -E make_directory ${_outputDir_real} COMMENT "Create dir for source archive output." ) LIST(APPEND _dep_list ${_outputDir_real}) ENDIF(_own_dir) SET(_make_targets COMMAND make package_source) IF(TARGET test) LIST(INSERT _make_targets 0 COMMAND make test) ENDIF(TARGET test) ## If own, need to move to it. IF(_own) ADD_CUSTOM_TARGET_COMMAND(pack_src OUTPUT ${SOURCE_ARCHIVE_FILE} COMMAND make package_source COMMAND ${CMAKE_COMMAND} -E copy "${_source_archive_file}" "${SOURCE_ARCHIVE_FILE}" COMMAND ${CMAKE_COMMAND} -E remove "${_source_archive_file}" DEPENDS ${_dep_list} COMMENT "Packing the source as: ${SOURCE_ARCHIVE_FILE}" VERBATIM ) ELSE(_own) ADD_CUSTOM_TARGET_COMMAND(pack_src OUTPUT ${SOURCE_ARCHIVE_FILE} COMMAND make package_source DEPENDS ${_dep_list} COMMENT "Packing the source as: ${SOURCE_ARCHIVE_FILE}" VERBATIM ) ENDIF(_own) ADD_CUSTOM_TARGET(clean_old_pack_src COMMAND find . -name '${PROJECT_NAME}*.${SOURCE_ARCHIVE_FILE_EXTENSION}' ! -name '${PROJECT_NAME}-${PRJ_VER}-*.${SOURCE_ARCHIVE_FILE_EXTENSION}' -print -delete COMMENT "Cleaning old source archives" ) ADD_DEPENDENCIES(clean_old_pack_src changelog ) ADD_CUSTOM_TARGET(clean_pack_src COMMAND find . -name '${PROJECT_NAME}*.${SOURCE_ARCHIVE_FILE_EXTENSION}' -print -delete COMMENT "Cleaning all source archives" ) ENDMACRO(PACK_SOURCE_ARCHIVE) ENDIF(NOT DEFINED _MANAGE_ARCHIVE_CMAKE_) ibus-chewing-1.4.10.1-Source/Modules/ManageRelease.cmake000664 001750 001750 00000003320 12273072306 023067 0ustar00dchendchen000000 000000 # - Module that perform release task. # This module provides common targets for release or post-release chores. # # Defines following macros: # MANAGE_RELEASE(releaseTargets) # - Run release targets. # This macro skips the missing targets so distro package maintainers # do not have to get the irrelevant dependencies. # For the "hard" requirement, please use cmake command # "ADD_DEPENDENCIES". # Arguments: # + releaseTargets: Targets need to be done for a release. # Note that sequence of the targets does not guarantee the # sequence of execution. # Defines following targets: # + release: Perform everything required for a release. # Reads following variables: # + RELEASE_DEPENDS_FILES: List of files that the release depends. # Note that the sequence of the target does not guarantee the # sequence of execution. # IF(NOT DEFINED _MANAGE_RELEASE_CMAKE_) SET(_MANAGE_RELEASE_CMAKE_ "DEFINED") INCLUDE(ManageMessage) MACRO(MANAGE_RELEASE) ## Target: release ADD_CUSTOM_TARGET(release DEPENDS ${RELEASE_DEPENDS_FILES} COMMENT "Releasing ${PROJECT_NAME}-${PRJ_VER}" ) ## Add dependent targets that actually exists SET(_releaseTargets "") FOREACH(_target ${ARGN}) IF(TARGET ${_target}) LIST(APPEND _releaseTargets "${_target}") ## Release targets should be build after target tag ADD_DEPENDENCIES(${_target} tag) ELSE(TARGET ${_target}) M_MSG(${M_OFF} "Target ${_target} does not exist, skipped.") ENDIF(TARGET ${_target}) ENDFOREACH(_target ${ARGN}) IF(_releaseTargets) ADD_DEPENDENCIES(release ${_releaseTargets}) ENDIF(_releaseTargets) ENDMACRO(MANAGE_RELEASE) ENDIF(NOT DEFINED _MANAGE_RELEASE_CMAKE_) ibus-chewing-1.4.10.1-Source/Modules/ManageRPM.cmake000664 001750 001750 00000047061 12271744611 022162 0ustar00dchendchen000000 000000 # - RPM generation, maintaining (remove old rpm) and verification (rpmlint). # This module provides macros that provides various rpm building and # verification targets. # # This module needs variable from ManageArchive, so INCLUDE(ManageArchive) # before this module. # # Includes: # ManageFile # ManageTarget # # Reads and defines following variables if dependencies are satisfied: # PRJ_RPM_SPEC_FILE: spec file for rpmbuild. # RPM_SPEC_BUILD_ARCH: (optional) Set "BuildArch:" # RPM_BUILD_ARCH: (optional) Arch that will be built." # RPM_DIST_TAG: (optional) Current distribution tag such as el5, fc10. # Default: Distribution tag from rpm --showrc # # RPM_BUILD_TOPDIR: (optional) Directory of the rpm topdir. # Default: ${CMAKE_BINARY_DIR} # # RPM_BUILD_SPECS: (optional) Directory of generated spec files # and RPM-ChangeLog. # Note this variable is not for locating # SPEC template (project.spec.in), RPM-ChangeLog source files. # These are located through the path of spec_in. # Default: ${RPM_BUILD_TOPDIR}/SPECS # # RPM_BUILD_SOURCES: (optional) Directory of source (tar.gz or zip) files. # Default: ${RPM_BUILD_TOPDIR}/SOURCES # # RPM_BUILD_SRPMS: (optional) Directory of source rpm files. # Default: ${RPM_BUILD_TOPDIR}/SRPMS # # RPM_BUILD_RPMS: (optional) Directory of generated rpm files. # Default: ${RPM_BUILD_TOPDIR}/RPMS # # RPM_BUILD_BUILD: (optional) Directory for RPM build. # Default: ${RPM_BUILD_TOPDIR}/BUILD # # RPM_BUILD_BUILDROOT: (optional) Directory for RPM build. # Default: ${RPM_BUILD_TOPDIR}/BUILDROOT # # RPM_RELEASE_NO: (optional) RPM release number # Default: 1 # # Defines following variables: # RPM_IGNORE_FILES: A list of exclude file patterns for PackSource. # This value is appended to SOURCE_ARCHIVE_IGNORE_FILES after including # this module. # RPM_FILES_SECTION_CONTENT: A list of string # # Defines following Macros: # RPM_SPEC_STRING_ADD(var str [position]) # - Add a string to SPEC string. # * Parameters: # + var: Variable that hold results in string format. # + str: String to be added. # + position: (Optional) position to put the tag. # Valid value: FRONT for inserting in the beginning. # Default: Append in the end of string. # of string. # # RPM_SPEC_STRING_ADD_DIRECTIVE var directive attribute content) # - Add a SPEC directive (e.g. %description -l zh_TW) to SPEC string. # Parameters: # + var: Variable that hold results in string format. # + directive: Directive to be added. # + attribute: Attribute of tag. That is, string between '()' # + value: Value fot the tag. # + position: (Optional) position to put the tag. # Valid value: FRONT for inserting in the beginning. # Default: Append in the end of string. # of string. # # RPM_SPEC_STRING_ADD_TAG(var tag attribute value [position]) # - Add a SPEC tag (e.g. BuildArch: noarch) to SPEC string. # Parameters: # + var: Variable that hold results in string format. # + tag: Tag to be added. # + attribute: Attribute of tag. That is, string between '()' # + value: Value fot the tag. # + position: (Optional) position to put the tag. # Valid value: FRONT for inserting in the beginning. # Default: Append in the end of string. # of string. # # PACK_RPM([SPEC_IN specInFile] [SPEC specFile]) # - Generate spec and pack rpm according to the spec file. # Parameters: # + SPEC_IN specInFile: RPM SPEC template file as .spec.in # + SPEC specFile: Output RPM SPEC file # Default: ${RPM_BUILD_SPEC}/${PROJECT_NAME}.spec # Targets: # + srpm: Build srpm (rpmbuild -bs). # + rpm: Build rpm and srpm (rpmbuild -bb) # + rpmlint: Run rpmlint to generated rpms. # + clean_rpm": Clean all rpm and build files. # + clean_pkg": Clean all source packages, rpm and build files. # + clean_old_rpm: Remove old rpm and build files. # + clean_old_pkg: Remove old source packages and rpms. # This macro defines following variables: # + PRJ_RELEASE: Project release with distribution tags. (e.g. 1.fc13) # + RPM_RELEASE_NO: Project release number, without distribution tags. (e.g. 1) # + PRJ_SRPM_FILE: Path to generated SRPM file, including relative path. # + PRJ_RPM_FILES: Binary RPM files to be build. # This macro reads following variables # + RPM_SPEC_CMAKE_FLAGS: cmake flags in RPM spec. # + RPM_SPEC_MAKE_FLAGS: "make flags in RPM spec. # # RPM_MOCK_BUILD() # - Add mock related targets. # Targets: # + rpm_mock_i386: Make i386 rpm # + rpm_mock_x86_64: Make x86_64 rpm # This macor reads following variables?: # + MOCK_RPM_DIST_TAG: Prefix of mock configure file, such as "fedora-11", "fedora-rawhide", "epel-5". # Default: Convert from RPM_DIST_TAG # IF(NOT DEFINED _MANAGE_RPM_CMAKE_) SET (_MANAGE_RPM_CMAKE_ "DEFINED") INCLUDE(ManageFile) INCLUDE(ManageTarget) SET(_manage_rpm_dependency_missing 0) SET(_cmake_fedora_dependency_missing 0) SET(RPM_SPEC_TAG_PADDING 16 CACHE STRING "RPM SPEC Tag padding") SET(CMAKE_FEDORA_ADDITIONAL_SCRIPT_PATH ${CMAKE_SOURCE_DIR}/scripts ${CMAKE_SOURCE_DIR}/cmake-fedora/scripts) FIND_PROGRAM_ERROR_HANDLING(RPM_CMD ERROR_MSG " rpm build support is disabled." ERROR_VAR _manage_rpm_dependency_missing VERBOSE_LEVEL ${M_OFF} "rpm" ) FIND_PROGRAM_ERROR_HANDLING(RPMBUILD_CMD ERROR_MSG " rpm build support is disabled." ERROR_VAR _manage_rpm_dependency_missing VERBOSE_LEVEL ${M_OFF} NAMES "rpmbuild-md5" "rpmbuild" ) FIND_PROGRAM_ERROR_HANDLING(CMAKE_FEDORA_KOJI_CMD ERROR_MSG " cmake-fedora support is disabled." ERROR_VAR _cmake_fedora_dependency_missing VERBOSE_LEVEL ${M_OFF} "cmake-fedora-koji" PATHS ${CMAKE_FEDORA_ADDITIONAL_SCRIPT_PATH} ) IF(NOT _manage_rpm_dependency_missing) INCLUDE(ManageVariable) SET(RPM_SPEC_CMAKE_FLAGS "-DCMAKE_FEDORA_ENABLE_FEDORA_BUILD=1" CACHE STRING "CMake flags in RPM SPEC" ) SET(RPM_SPEC_MAKE_FLAGS "VERBOSE=1 %{?_smp_mflags}" CACHE STRING "Make flags in RPM SPEC" ) SET(RPM_SPEC_BUILD_OUTPUT "%cmake ${RPM_SPEC_CMAKE_FLAGS} . make ${RPM_SPEC_MAKE_FLAGS}" ) SET(RPM_SPEC_INSTALL_OUTPUT "%__rm -rf %{buildroot} make install DESTDIR=%{buildroot}" ) SET(RPM_SPEC_FILES_SECTION_OUTPUT "%defattr(-,root,root,-)") # %{dist} EXECUTE_PROCESS(COMMAND ${RPM_CMD} -E "%{dist}" COMMAND sed -e "s/^\\.//" OUTPUT_VARIABLE _RPM_DIST_TAG OUTPUT_STRIP_TRAILING_WHITESPACE ) SET(RPM_DIST_TAG "${_RPM_DIST_TAG}" CACHE STRING "RPM Dist Tag") SET(RPM_RELEASE_NO "1" CACHE STRING "RPM Release Number") SET(RPM_BUILD_TOPDIR "${CMAKE_BINARY_DIR}" CACHE PATH "RPM topdir") SET(RPM_IGNORE_FILES "debug.*s.list") FOREACH(_dir "SPECS" "SOURCES" "SRPMS" "RPMS" "BUILD" "BUILDROOT") IF(NOT RPM_BUILD_${_dir}) SET(RPM_BUILD_${_dir} "${RPM_BUILD_TOPDIR}/${_dir}" CACHE PATH "RPM ${_dir} dir" ) MARK_AS_ADVANCED(RPM_BUILD_${_dir}) IF(NOT "${_dir}" STREQUAL "SPECS") LIST(APPEND RPM_IGNORE_FILES "/${_dir}/") ENDIF(NOT "${_dir}" STREQUAL "SPECS") FILE(MAKE_DIRECTORY "${RPM_BUILD_${_dir}}") ENDIF(NOT RPM_BUILD_${_dir}) ENDFOREACH(_dir "SPECS" "SOURCES" "SRPMS" "RPMS" "BUILD" "BUILDROOT") # Add RPM build directories in ignore file list. LIST(APPEND SOURCE_ARCHIVE_IGNORE_FILES ${RPM_IGNORE_FILES}) ENDIF(NOT _manage_rpm_dependency_missing) MACRO(MANAGE_RPM_CHANGELOG) EXECUTE_PROCESS(COMMAND cat "${CHANGELOG_ITEM_FILE}" OUTPUT_VARIABLE CHANGELOG_ITEMS OUTPUT_STRIP_TRAILING_WHITESPACE ) SET(RPM_CHANGELOG_FILE "${RPM_BUILD_SPECS}/RPM-ChangeLog") SET(RPM_CHANGELOG_PREV_FILE "${RPM_CHANGELOG_FILE}.prev") IF(NOT _cmake_fedora_dependency_missing) IF(EXISTS "${RPM_CHANGELOG_PREV_FILE}") IF("${RELEASE_NOTES_FILE}" IS_NEWER_THAN "${RPM_CHANGELOG_PREV_FILE}") M_MSG(${M_INFO1} "Updating RPM-ChangeLog.prev from koji") EXECUTE_PROCESS( COMMAND ${CMAKE_FEDORA_KOJI_CMD} newest-changelog "${PROJECT_NAME}" OUTPUT_FILE ${RPM_CHANGELOG_PREV_FILE} ) ELSE("${RELEASE_NOTES_FILE}" IS_NEWER_THAN "${RPM_CHANGELOG_PREV_FILE}") M_MSG(${M_INFO1} "RPM-ChangeLog.prev is newer than RELEASE-NOTES, no need to update") ENDIF("${RELEASE_NOTES_FILE}" IS_NEWER_THAN "${RPM_CHANGELOG_PREV_FILE}") ELSE(EXISTS "${RPM_CHANGELOG_PREV_FILE}") M_MSG(${M_INFO1} "Create newest RPM-ChangeLog.prev from koji") EXECUTE_PROCESS( COMMAND ${CMAKE_FEDORA_KOJI_CMD} newest-changelog "${PROJECT_NAME}" OUTPUT_FILE ${RPM_CHANGELOG_PREV_FILE} ) ENDIF(EXISTS "${RPM_CHANGELOG_PREV_FILE}") ENDIF(NOT _cmake_fedora_dependency_missing) IF(EXISTS ${RPM_CHANGELOG_PREV_FILE}) # Update RPM_ChangeLog # Use this instead of FILE(READ is to avoid error when reading '\' # character. EXECUTE_PROCESS(COMMAND cat "${RPM_CHANGELOG_PREV_FILE}" OUTPUT_VARIABLE RPM_CHANGELOG_PREV OUTPUT_STRIP_TRAILING_WHITESPACE ) ELSE(EXISTS ${RPM_CHANGELOG_PREV_FILE}) SET(RPM_CHNAGELOG_PREV "") ENDIF(EXISTS ${RPM_CHANGELOG_PREV_FILE}) ENDMACRO(MANAGE_RPM_CHANGELOG) FUNCTION(RPM_SPEC_STRING_ADD var str) IF("${ARGN}" STREQUAL "FRONT") STRING_PREPEND(${var} "${str}" "\n") SET(pos "${ARGN}") ELSE("${ARGN}" STREQUAL "FRONT") STRING_APPEND(${var} "${str}" "\n") ENDIF("${ARGN}" STREQUAL "FRONT") SET(${var} "${${var}}" PARENT_SCOPE) ENDFUNCTION(RPM_SPEC_STRING_ADD var str) FUNCTION(RPM_SPEC_STRING_ADD_DIRECTIVE var directive attribute content) SET(_str "%${directive}") IF(NOT attribute STREQUAL "") STRING_APPEND(_str " ${attribute}") ENDIF(NOT attribute STREQUAL "") IF(NOT content STREQUAL "") STRING_APPEND(_str "\n${content}") ENDIF(NOT content STREQUAL "") STRING_APPEND(_str "\n") RPM_SPEC_STRING_ADD(${var} "${_str}" ${ARGN}) SET(${var} "${${var}}" PARENT_SCOPE) ENDFUNCTION(RPM_SPEC_STRING_ADD_DIRECTIVE var directive attribute content) FUNCTION(RPM_SPEC_STRING_ADD_TAG var tag attribute value) IF("${attribute}" STREQUAL "") SET(_str "${tag}:") ELSE("${attribute}" STREQUAL "") SET(_str "${tag}(${attribute}):") ENDIF("${attribute}" STREQUAL "") STRING_PADDING(_str "${_str}" ${RPM_SPEC_TAG_PADDING}) STRING_APPEND(_str "${value}") RPM_SPEC_STRING_ADD(${var} "${_str}" ${ARGN}) SET(${var} "${${var}}" PARENT_SCOPE) ENDFUNCTION(RPM_SPEC_STRING_ADD_TAG var tag attribute value) MACRO(PRJ_RPM_SPEC_PREPARE_FILES fileType pathPrefix) FOREACH(_f ${FILE_INSTALL_${fileType}_LIST}) RPM_SPEC_STRING_ADD(RPM_SPEC_FILES_SECTION_OUTPUT "${pathPrefix}${_f}" "\n" ) ENDFOREACH(_f ${FILE_INSTALL_${fileType}_LIST}) ENDMACRO(PRJ_RPM_SPEC_PREPARE_FILES) MACRO(PRJ_RPM_SPEC_PREPARE) ## Summary RPM_SPEC_STRING_ADD_TAG(RPM_SPEC_SUMMARY_OUTPUT "Summary" "" "${PRJ_SUMMARY}" ) SET(_lang "") FOREACH(_sT ${SUMMARY_TRANSLATIONS}) IF(_lang STREQUAL "") SET(_lang "${_sT}") ELSE(_lang STREQUAL "") RPM_SPEC_STRING_ADD_TAG(RPM_SPEC_SUMMARY_OUTPUT "Summary" "${lang}" "${PRJ_SUMMARY}" ) SET(_lang "") ENDIF(_lang STREQUAL "") ENDFOREACH(_sT ${SUMMARY_TRANSLATIONS}) ## Url SET(RPM_SPEC_URL_OUTPUT "${RPM_SPEC_URL}") ## Source SET(_buf "") SET(_i 0) FOREACH(_s ${RPM_SPEC_SOURCES}) RPM_SPEC_STRING_ADD_TAG(_buf "Source${_i}" "" "${_s}") MATH(EXPR _i ${_i}+1) ENDFOREACH(_s ${RPM_SPEC_SOURCES}) RPM_SPEC_STRING_ADD(RPM_SPEC_SOURCE_OUTPUT "${_buf}" FRONT) ## Requires (and BuildRequires) SET(_buf "") FOREACH(_s ${BUILD_REQUIRES}) RPM_SPEC_STRING_ADD_TAG(_buf "BuildRequires" "" "${_s}") ENDFOREACH(_s ${RPM_SPEC_SOURCES}) FOREACH(_s ${REQUIRES}) RPM_SPEC_STRING_ADD_TAG(_buf "Requires" "" "${_s}") ENDFOREACH(_s ${RPM_SPEC_SOURCES}) RPM_SPEC_STRING_ADD(RPM_SPEC_REQUIRES_OUTPUT "${_buf}" FRONT) ## Description RPM_SPEC_STRING_ADD_DIRECTIVE(RPM_SPEC_DESCRIPTION_OUTPUT "description" "" "${PRJ_DESCRIPTION}" ) SET(_lang "") FOREACH(_sT ${DESCRIPTION_TRANSLATIONS}) IF(_lang STREQUAL "") SET(_lang "${_sT}") ELSE(_lang STREQUAL "") RPM_SPEC_STRING_ADD_DIRECTIVE(RPM_SPEC_DESCRIPTION_OUTPUT "description" "-l ${_lang}" "${_sT}" "\n" ) SET(_lang "") ENDIF(_lang STREQUAL "") ENDFOREACH(_sT ${DESCRIPTION_TRANSLATIONS}) ## Header ## %{_build_arch} IF("${BUILD_ARCH}" STREQUAL "") EXECUTE_PROCESS(COMMAND ${RPM_CMD} -E "%{_build_arch}" OUTPUT_VARIABLE _RPM_BUILD_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE) SET(RPM_BUILD_ARCH "${_RPM_BUILD_ARCH}" CACHE STRING "RPM Arch") ELSE("${BUILD_ARCH}" STREQUAL "") SET(RPM_BUILD_ARCH "${BUILD_ARCH}" CACHE STRING "RPM Arch") RPM_SPEC_STRING_ADD_TAG(RPM_SPEC_HEADER_OUTPUT "BuildArch" "" "${BUILD_ARCH}" ) ENDIF("${BUILD_ARCH}" STREQUAL "") ## Build IF(NOT RPM_SPEC_BUILD_OUTPUT) SET(RPM_SPEC_BUILD_OUTPUT "%cmake ${RPM_SPEC_CMAKE_FLAGS} . make ${RPM_SPEC_MAKE_FLAGS}" ) ENDIF(NOT RPM_SPEC_BUILD_OUTPUT) ## Install STRING_JOIN(PRJ_DOC_LIST " " ${FILE_INSTALL_PRJ_DOC_LIST}) IF(NOT PRJ_DOC_LIST STREQUAL "") SET(RPM_SPEC_PRJ_DOC_REMOVAL_OUTPUT "# We install document using doc (cd %{buildroot}${DOC_DIR}/%{name}-%{version} rm -fr * )" ) RPM_SPEC_STRING_ADD(RPM_SPEC_FILES_SECTION_OUTPUT "%doc ${PRJ_DOC_LIST}" ) ENDIF(NOT PRJ_DOC_LIST STREQUAL "") IF(HAS_TRANSLATION) RPM_SPEC_STRING_ADD_DIRECTIVE(RPM_SPEC_SCRIPT_OUTPUT "find_lang" "%{name}" "" FRONT ) RPM_SPEC_STRING_ADD_DIRECTIVE(RPM_SPEC_FILES_SECTION_OUTPUT "files" "-f %{name}.lang" "" FRONT ) ELSE(HAS_TRANSLATION) RPM_SPEC_STRING_ADD_DIRECTIVE(RPM_SPEC_FILES_SECTION_OUTPUT "files" "" "" FRONT ) ENDIF(HAS_TRANSLATION) PRJ_RPM_SPEC_PREPARE_FILES("BIN" "%{_bindir}/") PRJ_RPM_SPEC_PREPARE_FILES("LIB" "%{_libdir}/") PRJ_RPM_SPEC_PREPARE_FILES("PRJ_LIB" "%{_libdir}/%{name}/") PRJ_RPM_SPEC_PREPARE_FILES("LIBEXEC" "%{_libexecdir}/") PRJ_RPM_SPEC_PREPARE_FILES("PRJ_LIBEXEC" "%{_libexecdir}/%{name}/") PRJ_RPM_SPEC_PREPARE_FILES("SYSCONF" "%config %{_sysconfdir}/") PRJ_RPM_SPEC_PREPARE_FILES("PRJ_SYSCONF" "%config %{_sysconfdir}/%{name}/") PRJ_RPM_SPEC_PREPARE_FILES("SYSCONF_NO_REPLACE" "%config(noreplace) %{_sysconfdir}/") PRJ_RPM_SPEC_PREPARE_FILES("PRJ_SYSCONF_NO_REPLACE" "%config(noreplace) %{_sysconfdir}/%{name}/") PRJ_RPM_SPEC_PREPARE_FILES("DATA" "%{_datadir}/") PRJ_RPM_SPEC_PREPARE_FILES("PRJ_DATA" "%{_datadir}/%{name}/") ENDMACRO(PRJ_RPM_SPEC_PREPARE) MACRO(PACK_RPM) IF(NOT _manage_rpm_dependency_missing ) SET(_validOptions "SPEC_IN" "SPEC") VARIABLE_PARSE_ARGN(_opt _validOptions ${ARGN}) IF(NOT _opt_SPEC_IN) FIND_FILE_ERROR_HANDLING(_opt_SPEC_IN ERROR_MSG " spec.in is not found" VERBOSE_LEVEL ${M_ERROR} NAMES "project.spec.in" "${PROJECT_NAME}.spec.in" PATHS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/SPECS ${CMAKE_SOURCE_DIR}/SPECS ${CMAKE_CURRENT_SOURCE_DIR}/rpm ${CMAKE_SOURCE_DIR}/rpm ${RPM_BUILD_SPECS} ${CMAKE_ROOT_DIR}/Templates/fedora ) SET(_opt_SPEC "${RPM_BUILD_SPECS}/${PROJECT_NAME}.spec") ENDIF(NOT _opt_SPEC_IN) IF(NOT _opt_SPEC) SET(_opt_SPEC "${RPM_BUILD_SPECS}/${PROJECT_NAME}.spec") ENDIF(NOT _opt_SPEC) ## RPM spec.in and RPM-ChangeLog.prev PRJ_RPM_SPEC_PREPARE() SET(PRJ_RPM_SPEC_FILE "${_opt_SPEC}" CACHE FILEPATH "spec") SET(PRJ_SRPM_FILE "${RPM_BUILD_SRPMS}/${PROJECT_NAME}-${PRJ_VER}-${RPM_RELEASE_NO}.${RPM_DIST_TAG}.src.rpm" CACHE STRING "RPM files" FORCE) SET(PRJ_RPM_FILES "${RPM_BUILD_RPMS}/${RPM_BUILD_ARCH}/${PROJECT_NAME}-${PRJ_VER}-${RPM_RELEASE_NO}.${RPM_DIST_TAG}.${RPM_BUILD_ARCH}.rpm" CACHE STRING "RPM files" FORCE) INCLUDE(DateTimeFormat) MANAGE_RPM_CHANGELOG() # Generate spec IF(NOT "${_opt_SPEC_IN}" STREQUAL "") CONFIGURE_FILE(${_opt_SPEC_IN} ${_opt_SPEC}) ENDIF(NOT "${_opt_SPEC_IN}" STREQUAL "") #------------------------------------------------------------------- # RPM build commands and targets ADD_CUSTOM_TARGET_COMMAND(srpm OUTPUT ${PRJ_SRPM_FILE} COMMAND ${RPMBUILD_CMD} -bs ${PRJ_RPM_SPEC_FILE} --define '_sourcedir ${RPM_BUILD_SOURCES}' --define '_builddir ${RPM_BUILD_BUILD}' --define '_srcrpmdir ${RPM_BUILD_SRPMS}' --define '_rpmdir ${RPM_BUILD_RPMS}' --define '_specdir ${RPM_BUILD_SPECS}' DEPENDS ${PRJ_RPM_SPEC_FILE} ${SOURCE_ARCHIVE_FILE} COMMENT "Building srpm" ) # RPMs (except SRPM) ADD_CUSTOM_TARGET_COMMAND(rpm OUTPUT ${PRJ_RPM_FILES} COMMAND ${RPMBUILD_CMD} -bb ${PRJ_RPM_SPEC_FILE} --define '_sourcedir ${RPM_BUILD_SOURCES}' --define '_builddir ${RPM_BUILD_BUILD}' --define '_srcrpmdir ${RPM_BUILD_SRPMS}' --define '_rpmdir ${RPM_BUILD_RPMS}' --define '_specdir ${RPM_BUILD_SPECS}' DEPENDS ${PRJ_SRPM_FILE} COMMENT "Building rpm" ) ADD_CUSTOM_TARGET(install_rpms COMMAND find ${RPM_BUILD_RPMS}/${RPM_BUILD_ARCH} -name '${PROJECT_NAME}*-${PRJ_VER}-${RPM_RELEASE_NO}.*.${RPM_BUILD_ARCH}.rpm' ! -name '${PROJECT_NAME}-debuginfo-${RPM_RELEASE_NO}.*.${RPM_BUILD_ARCH}.rpm' -print -exec sudo rpm --upgrade --hash --verbose '{}' '\\;' DEPENDS ${PRJ_RPM_FILES} COMMENT "Install all rpms except debuginfo" ) ADD_CUSTOM_TARGET(rpmlint COMMAND find . -name '${PROJECT_NAME}*-${PRJ_VER}-${RPM_RELEASE_NO}.*.rpm' -print -exec rpmlint -I '{}' '\\;' DEPENDS ${PRJ_SRPM_FILE} ${PRJ_RPM_FILES} ) ADD_CUSTOM_TARGET(clean_old_rpm COMMAND find . -name '${PROJECT_NAME}*.rpm' ! -name '${PROJECT_NAME}*-${PRJ_VER}-${RPM_RELEASE_NO}.*.rpm' -print -delete COMMAND find ${RPM_BUILD_BUILD} -path '${PROJECT_NAME}*' ! -path '${RPM_BUILD_BUILD}/${PROJECT_NAME}-${PRJ_VER}-*' -print -delete COMMENT "Cleaning old rpms and build." ) ADD_CUSTOM_TARGET(clean_old_pkg ) ADD_DEPENDENCIES(clean_old_pkg clean_old_rpm clean_old_pack_src) ADD_CUSTOM_TARGET(clean_rpm COMMAND find . -name '${PROJECT_NAME}-*.rpm' -print -delete COMMENT "Cleaning rpms.." ) ADD_CUSTOM_TARGET(clean_pkg ) ADD_DEPENDENCIES(clean_rpm clean_old_rpm) ADD_DEPENDENCIES(clean_pkg clean_rpm clean_pack_src) ENDIF(NOT _manage_rpm_dependency_missing ) ENDMACRO(PACK_RPM) MACRO(RPM_MOCK_BUILD) IF(NOT _manage_rpm_dependency_missing ) FIND_PROGRAM(MOCK_CMD mock) IF(MOCK_CMD STREQUAL "MOCK_CMD-NOTFOUND") M_MSG(${M_OFF} "mock is not found in PATH, mock support disabled.") ELSE(MOCK_CMD STREQUAL "MOCK_CMD-NOTFOUND") IF(NOT RPM_BUILD_ARCH STREQUAL "noarch") IF(NOT DEFINED MOCK_RPM_DIST_TAG) STRING(REGEX MATCH "^fc([1-9][0-9]*)" _fedora_mock_dist "${RPM_DIST_TAG}") STRING(REGEX MATCH "^el([1-9][0-9]*)" _el_mock_dist "${RPM_DIST_TAG}") IF (_fedora_mock_dist) STRING(REGEX REPLACE "^fc([1-9][0-9]*)" "fedora-\\1" MOCK_RPM_DIST_TAG "${RPM_DIST_TAG}") ELSEIF (_el_mock_dist) STRING(REGEX REPLACE "^el([1-9][0-9]*)" "epel-\\1" MOCK_RPM_DIST_TAG "${RPM_DIST_TAG}") ELSE (_fedora_mock_dist) SET(MOCK_RPM_DIST_TAG "fedora-devel") ENDIF(_fedora_mock_dist) ENDIF(NOT DEFINED MOCK_RPM_DIST_TAG) #MESSAGE ("MOCK_RPM_DIST_TAG=${MOCK_RPM_DIST_TAG}") ADD_CUSTOM_TARGET(rpm_mock_i386 COMMAND ${CMAKE_COMMAND} -E make_directory ${RPM_BUILD_RPMS}/i386 COMMAND ${MOCK_CMD} -r "${MOCK_RPM_DIST_TAG}-i386" --resultdir="${RPM_BUILD_RPMS}/i386" ${PRJ_SRPM_FILE} DEPENDS ${PRJ_SRPM_FILE} ) ADD_CUSTOM_TARGET(rpm_mock_x86_64 COMMAND ${CMAKE_COMMAND} -E make_directory ${RPM_BUILD_RPMS}/x86_64 COMMAND ${MOCK_CMD} -r "${MOCK_RPM_DIST_TAG}-x86_64" --resultdir="${RPM_BUILD_RPMS}/x86_64" ${PRJ_SRPM_FILE} DEPENDS ${PRJ_SRPM_FILE} ) ENDIF(NOT RPM_BUILD_ARCH STREQUAL "noarch") ENDIF(MOCK_CMD STREQUAL "MOCK_CMD-NOTFOUND") ENDIF(NOT _manage_rpm_dependency_missing ) ENDMACRO(RPM_MOCK_BUILD) ENDIF(NOT DEFINED _MANAGE_RPM_CMAKE_) ibus-chewing-1.4.10.1-Source/Modules/ManageInstall.cmake000664 001750 001750 00000001653 12266510707 023130 0ustar00dchendchen000000 000000 # - Manage installation # Convenient collection of macros and functions to manage installation. # # Defines following macros: # MANAGE_INSTALL(var file1 [file2 ....]) # - Managed install. Files are installed to the path specified by var. # This macro also sets 'MANAGE_INSTALL_$var' as files that associate to this var # The files that are associated to this var is # Read and define: # + MANAGE_INSTALL_$var : Files to be installed under var. # Arguments: # + var: A variable that contains install destination path # + file1 ... : File to be installed to $var # IF(NOT DEFINED _MANAGE_INSTALL_CMAKE_) SET (_MANAGE_INSTALL_CMAKE_ "DEFINED") SET(MANAGE_INSTALL_FILES "") MACRO(MANAGE_INSTALL var file1) LIST(APPEND MANAGE_INSTALL_${var} ${file1} ${ARGN}) INSTALL(FILES $file1 ${ARGN} DESTINATION "${var}") ENDMACRO(MANAGE_INSTALL var file1) ENDIF(NOT DEFINED _MANAGE_INSTALL_CMAKE_) ibus-chewing-1.4.10.1-Source/Modules/ManageAPIDoc.cmake000664 001750 001750 00000003346 12266510707 022562 0ustar00dchendchen000000 000000 # - Mage generated API documents # This module is for API document generation, such as doxygen. # Defines following macros: # MANAGE_APIDOC_DOXYGEN(doxygen_in doc_dir) # - This macro generate documents according to doxygen template. # Arguments: # + doxygen_in: Doxygen template file. # + doc_dir: Document source directory to be copied from. # Reads following variable: # + PRJ_DOC_DIR: Directory for document # # IF(NOT DEFINED _MANAGE_APIDOC_CMAKE_) SET(_MANAGE_APIDOC_CMAKE_ "DEFINED") INCLUDE(ManageMessage) MACRO(MANAGE_APIDOC_DOXYGEN doxygen_in doc_dir) SET(SOURCE_ARCHIVE_IGNORE_FILES ${SOURCE_ARCHIVE_IGNORE_FILES} "/Doxyfile$") SET(_manage_apidoc_doxygen_dependency_missing 0) IF(NOT PRJ_DOC_DIR) M_MSG(${M_OFF} "PRJ_DOC_DIR undefined. Doxygen support disabled.") SET(_manage_apidoc_doxygen_dependency_missing 1) ENDIF(NOT PRJ_DOC_DIR) FIND_PACKAGE(doxygen) IF(NOT PACKAGE_FOUND_NAME) M_MSG(${M_OFF} "Package doxygen not found. Doxygen support disabled.") SET(_manage_apidoc_doxygen_dependency_missing 1) ENDIF(NOT PACKAGE_FOUND_NAME) FIND_PROGRAM(DOXYGEN_CMD doxygen) IF(DOXYGEN_CMD STREQUAL "DOXYGEN_CMD-NOTFOUND") M_MSG(${M_OFF} "Program doxygen not found. Doxygen support disabled.") SET(_manage_apidoc_doxygen_dependency_missing 1) ENDIF(DOXYGEN_CMD STREQUAL "DOXYGEN_CMD-NOTFOUND") IF(NOT _manage_apidoc_doxygen_dependency_missing) CONFIGURE_FILE(${doxygen_in} Doxyfile) ADD_CUSTOM_TARGET(doxygen COMMAND "${DOXYGEN_CMD}" "Doxyfile" ) INSTALL(DIRECTORY ${doc_dir} DESTINATION "${PRJ_DOC_DIR}" ) ENDIF(NOT _manage_apidoc_doxygen_dependency_missing) ENDMACRO(MANAGE_APIDOC_DOXYGEN doxygen_template) ENDIF(NOT DEFINED _MANAGE_APIDOC_CMAKE_) ibus-chewing-1.4.10.1-Source/Modules/ManageUpload.cmake000664 001750 001750 00000017357 12266510707 022756 0ustar00dchendchen000000 000000 # - Upload files to hosting services. # You can either use sftp, scp or supply custom command for upload. # # This module defines following macros: # MANAGE_UPLOAD_TARGET(targetName # [COMMAND program ...] [ADD_CUSTOM_TARGET_ARGUMENTS]) # - Make an upload target using arbitrary command. # This macro check whether the program after COMMAND exist, # if program exists, then add the make target, # if not, produce M_OFF warning. # Parameters: # + targetName: target name in make. # + program: Program that does upload. # + ADD_CUSTOM_TARGET_ARGUMENTS: Other ADD_CUSTOM_TARGET_ARGUMENTS # # MANAGE_UPLOAD_SCP(targetName # [USER user] [HOST_URL url] [UPLOAD_FILES files] # [REMOTE_DIR dir] [OPTIONS options] [DEPENDS files] # [COMMENT comments]) # - Make an upload target using scp. # This macro check whether scp exist, # if program exists, then add the make target, if not, produce M_OFF warning. # Parameters: # + targetName: target name in make. # + USER user: scp user. Note that if USER is used but user is not defined. # It produces M_OFF warning. # + HOST_URL url: scp server. # + UPLOAD_FILES: Files to be uploaded. This will be in DEPENDS list. # + REMOTE_DIR dir: Directory on the server. # + OPTIONS options: scp options. # + DEPENDS files: other files that should be in DEPENDS list. # + COMMENT comments: Comment to be shown when building the target. # # MANAGE_UPLOAD_SFTP(targetName # [BATCH batchFile] [USER user] [HOST_URL url] [UPLOAD_FILES files] # [REMOTE_DIR dir] [OPTIONS options] [DEPENDS files] # [COMMENT comments]) # - Make an upload target using sftp. # This macro check whether sftp exist, # if program exists, then add the make target, if not, produce M_OFF warning. # Parameters: # + targetName: target name in make. # + BATCH batchFile to be used in sftp. (sftp -b ) # + USER user: sftp user. Note that if USER is used but user is not defined. # It produces M_OFF warning. # + HOST_URL url: sftp server. # + UPLOAD_FILES: Files to be uploaded. This will be in DEPENDS list. # + REMOTE_DIR dir: Directory on the server. # + OPTIONS options: sftp options. # + DEPENDS files: other files that should be in DEPENDS list. # + COMMENT comments: Comment to be shown when building the target. # # MANAGE_UPLOAD_FEDORAHOSTED(targetName # [USER user] [UPLOAD_FILES files] [OPTIONS options] [DEPENDS files] # [COMMENT comments]) # - Make an upload target for uploading to FedoraHosted. # Parameters: # + targetName: target name in make. # + USER user: scp user. Note that if USER is used but user is not defined. # It produces M_OFF warning. # + UPLOAD_FILES: Files to be uploaded. This will be in DEPENDS list. # + OPTIONS options: scp options. # + DEPENDS files: other files that should be in DEPENDS list. # + COMMENT comments: Comment to be shown when building the target. # # MANAGE_UPLOAD_SOURCEFORGE(targetName [BATCH batchFile] # [USER user] [UPLOAD_FILES files] [OPTIONS options] [DEPENDS files] # [COMMENT comments]) # [UPLOAD_FILES files] [REMOTE_DIR remoteDir] # [UPLOAD_OPTIONS options] [DEPENDS files]) # - Make an upload target for uploading to SourceForge # Parameters: # + targetName: target name in make. # + BATCH batchFile to be used in sftp. (sftp -b ) # + USER user: sftp user. Note that if USER is used but user is not defined. # It produces M_OFF warning. # + UPLOAD_FILES: Files to be uploaded. This will be in DEPENDS list. # + OPTIONS options: sftp options. # + DEPENDS files: other files that should be in DEPENDS list. # + COMMENT comments: Comment to be shown when building the target. # # IF(NOT DEFINED _MANAGE_UPLOAD_CMAKE_) SET(_MANAGE_UPLOAD_CMAKE_ "DEFINED") INCLUDE(ManageMessage) INCLUDE(ManageVariable) FUNCTION(MANAGE_UPLOAD_TARGET targetName) SET(_cmd "") SET(_state "") FOREACH(_arg ${ARGN}) IF (_arg STREQUAL "COMMAND") SET(_state "cmd") ELSE(_arg STREQUAL "COMMAND") IF (_state STREQUAL "cmd") SET(_cmd "${_arg}") BREAK() ENDIF(_state STREQUAL "cmd") ENDIF(_arg STREQUAL "COMMAND") ENDFOREACH(_arg ${ARGN}) SET(_upload_target_missing_dependency 0) FIND_PROGRAM_ERROR_HANDLING(UPLOAD_CMD ERROR_MSG " Upload target ${targetName} disabled." ERROR_VAR _upload_target_missing_dependency VERBOSE_LEVEL ${M_OFF} "${_cmd}" ) IF(NOT _upload_target_missing_dependency) ADD_CUSTOM_TARGET(${targetName} ${ARGN} ) ENDIF(NOT _upload_target_missing_dependency) ENDFUNCTION(MANAGE_UPLOAD_TARGET targetName) MACRO(_MANAGE_UPLOAD_MAKE_URL var) SET(${var} ${_opt_HOST_URL}) IF(NOT "${_opt_USER}" STREQUAL "") SET(${var} "${_opt_USER}@${${var}}") ENDIF(NOT "${_opt_USER}" STREQUAL "") IF(NOT "${_opt_REMOTE_DIR}" STREQUAL "") SET(${var} "${${var}}:${_opt_REMOTE_DIR}") ENDIF(NOT "${_opt_REMOTE_DIR}" STREQUAL "") ENDMACRO(_MANAGE_UPLOAD_MAKE_URL var) FUNCTION(MANAGE_UPLOAD_SCP targetName) SET(_validOptions "USER" "HOST_URL" "UPLOAD_FILES" "REMOTE_DIR" "OPTIONS" "DEPENDS" "COMMENT") VARIABLE_PARSE_ARGN(_opt _validOptions ${ARGN}) IF("${_opt_HOST_URL}" STREQUAL "") M_MSG(${M_ERROR} "HOST_URL is required.") ENDIF("${_opt_HOST_URL}" STREQUAL "") IF("${_opt_UPLOAD_FILES}" STREQUAL "") M_MSG(${M_ERROR} "UPLOAD_FILES is required.") ENDIF("${_opt_UPLOAD_FILES}" STREQUAL "") _MANAGE_UPLOAD_MAKE_URL(_uploadUrl) IF("${_opt_COMMENT}" STREQUAL "") SET(_comment "${targetName}: Uploading to ${_uploadUrl}") ELSE("${_opt_COMMENT}" STREQUAL "") SET(_comment "${_opt_COMMENT}") ENDIF("${_opt_COMMENT}" STREQUAL "") MANAGE_UPLOAD_TARGET(${targetName} COMMAND scp ${_opt_OPTIONS} ${_opt_UPLOAD_FILES} ${_uploadUrl} DEPENDS ${_opt_UPLOAD_FILES} ${_opt_DEPENDS} COMMENT ${_comment} VERBATIM ) ENDFUNCTION(MANAGE_UPLOAD_SCP fileAlias) FUNCTION(MANAGE_UPLOAD_SFTP targetName) SET(_validOptions "USER" "HOST_URL" "UPLOAD_FILES" "REMOTE_DIR" "OPTIONS" "DEPENDS" "COMMENT" "BATCH") VARIABLE_PARSE_ARGN(_opt _validOptions ${ARGN}) IF("${_opt_HOST_URL}" STREQUAL "") M_MSG(${M_ERROR} "HOST_URL is required.") ENDIF("${_opt_HOST_URL}" STREQUAL "") IF("${_opt_UPLOAD_FILES}" STREQUAL "") M_MSG(${M_ERROR} "UPLOAD_FILES is required.") ENDIF("${_opt_UPLOAD_FILES}" STREQUAL "") _MANAGE_UPLOAD_MAKE_URL(_uploadUrl) IF("${_opt_COMMENT}" STREQUAL "") SET(_comment "${targetName}: Uploading to ${_uploadUrl}") ELSE("${_opt_COMMENT}" STREQUAL "") SET(_comment "${_opt_COMMENT}") ENDIF("${_opt_COMMENT}" STREQUAL "") IF(NOT "${_opt_BATCH}" STREQUAL "") SET(_batch "-b" "${_opt_BATCH}") ENDIF(NOT "${_opt_BATCH}" STREQUAL "") MANAGE_UPLOAD_TARGET(${targetName} COMMAND sftp ${_batch} ${_opt_OPTIONS} ${_opt_UPLOAD_FILES} ${_uploadUrl} DEPENDS ${_opt_UPLOAD_FILES} ${_opt_DEPENDS} COMMENT ${_comment} VERBATIM ) ENDFUNCTION(MANAGE_UPLOAD_SFTP fileAlias) #MACRO(MANAGE_UPLOAD_GOOGLE_UPLOAD) # FIND_PROGRAM(CURL_CMD curl) # IF(CURL_CMD STREQUAL "CURL_CMD-NOTFOUND") # MESSAGE(FATAL_ERROR "Need curl to perform google upload") # ENDIF(CURL_CMD STREQUAL "CURL_CMD-NOTFOUND") #ENDMACRO(MANAGE_UPLOAD_GOOGLE_UPLOAD) FUNCTION(MANAGE_UPLOAD_FEDORAHOSTED targetName) MANAGE_UPLOAD_SCP(${targetName} HOST_URL "fedorahosted.org" REMOTE_DIR "${PROJECT_NAME}" ${ARGN}) ENDFUNCTION(MANAGE_UPLOAD_FEDORAHOSTED fileAlias) FUNCTION(MANAGE_UPLOAD_SOURCEFORGE targetName) MANAGE_UPLOAD_SFTP(${targetName} HOST_URL "frs.sourceforge.net" REMOTE_DIR "/home/frs/project/${PROJECT_NAME}" ${ARGN}) ENDFUNCTION(MANAGE_UPLOAD_SOURCEFORGE fileAlias) ENDIF(NOT DEFINED _MANAGE_UPLOAD_CMAKE_) ibus-chewing-1.4.10.1-Source/Modules/ManageVersion.cmake000664 001750 001750 00000015040 12266510707 023142 0ustar00dchendchen000000 000000 # - Modules for manipulate version and ChangeLog # # Includes: # ManageVariable # DateTimeFormat # # Included by: # PackSource # # Defines following functions: # MANAGE_CHANGELOG_SPLIT(changeLogItemVar prevVar changeLogFile ver) # - Split the changeLog into two parts: # 1. changeLogItemVar: Current version, that is, # ChangeLog under the version specified by "ver". # 2. prev: Previous version. # Note that version info are returned. # Arguments: # + changeLogItemVar: Variable hold th # # RELEASE_NOTES_READ_FILE([releaseFile]) # - Load release file information. # Arguments: # + releaseFile: (Optional) release file to be read. # This file should contain following definition: # - PRJ_VER: Release version. # - SUMMARY: Summary of the release. Will be output as CHANGE_SUMMARY. # - Section [Changes]: # Changes of this release list below the section tag. # Default:RELEASE-NOTES.txt # This macro outputs following files: # + ChangeLog: Log of changes. # Depends on ChangeLog.prev and releaseFile. # This macro sets following variables: # + PRJ_VER: Release version. # + CHANGE_SUMMARY: Summary of changes. # + CHANGELOG_ITEMS: Lines below the [Changes] tag. # + RELEASE_NOTES_FILE: The loaded release file. # + PRJ_DOC_DIR: Documentation for the project. # Default: ${DOC_DIR}/${PROJECT_NAME}-${PRJ_VER} # IF(NOT DEFINED _MANAGE_VERSION_CMAKE_) SET(_MANAGE_VERSION_CMAKE_ "DEFINED") INCLUDE(ManageMessage) INCLUDE(ManageVariable) SET(CHANGELOG_FILE "${CMAKE_SOURCE_DIR}/ChangeLog" CACHE FILEPATH "ChangeLog") SET(CHANGELOG_PREV_FILE "${CMAKE_SOURCE_DIR}/ChangeLog.prev" CACHE FILEPATH "ChangeLog.prev") ADD_CUSTOM_TARGET(changelog_prev_update COMMAND ${CMAKE_COMMAND} -E copy ${CHANGELOG_FILE} ${CHANGELOG_PREV_FILE} DEPENDS ${CHANGELOG_FILE} COMMENT "${CHANGELOG_FILE} are saving as ${CHANGELOG_PREV_FILE}" ) FUNCTION(MANAGE_CHANGELOG_SPLIT changeLogItemVar prevVar changeLogFile ver) SET(_changeLogFileBuf "") SET(_this "") SET(_prev "") IF(EXISTS "${changeLogFile}") SET(_isThis 0) SET(_isPrev 0) # Use this instead of FILE(READ is to avoid error when reading '\' # character. EXECUTE_PROCESS(COMMAND cat "${changeLogFile}" OUTPUT_VARIABLE _changeLogFileBuf OUTPUT_STRIP_TRAILING_WHITESPACE) #MESSAGE("# _changeLogFileBuf=|${_changeLogFileBuf}|") STRING_SPLIT(_lines "\n" "${_changeLogFileBuf}" ALLOW_EMPTY) #MESSAGE("# _lines=|${_lines}|") LIST(LENGTH _lines _lineCount) MATH(EXPR _lineCount ${_lineCount}-1) FOREACH(_i RANGE ${_lineCount}) LIST(GET _lines ${_i} _line) #MESSAGE("# _i=${_i} _line=${_line}") STRING(REGEX MATCH "^\\* [A-Za-z]+ [A-Za-z]+ [0-9]+ [0-9]+ .+ <.+> - (.*)$" _match "${_line}") IF("${_match}" STREQUAL "") # Not a version line IF(_isThis) STRING_APPEND(_this "${_line}" "\n") ELSEIF(_isPrev) STRING_APPEND(_prev "${_line}" "\n") ELSE(_isThis) M_MSG(${M_ERROR} "ChangeLog: Cannot distinguish version for line :${_line}") ENDIF(_isThis) ELSE("${_match}" STREQUAL "") # Is a version line SET(_cV "${CMAKE_MATCH_1}") IF("${_cV}" STREQUAL "${ver}") SET(_isThis 1) SET(_isPrev 0) ELSE("${_cV}" STREQUAL "${ver}") SET(_isThis 0) SET(_isPrev 1) STRING_APPEND(_prev "${_line}" "\n") ENDIF("${_cV}" STREQUAL "${ver}") ENDIF("${_match}" STREQUAL "") ENDFOREACH(_i RANGE _lineCount) ENDIF(EXISTS "${changeLogFile}") SET(${changeLogItemVar} "${_this}" PARENT_SCOPE) SET(${prevVar} "${_prev}" PARENT_SCOPE) ENDFUNCTION(MANAGE_CHANGELOG_SPLIT changeLogItemVar prevVar changeLogFile ver) FUNCTION(MANAGE_CHANGELOG_UPDATE changeLogFile ver newChangeStr) SET(CHANGELOG_ITEM_FILE "${CMAKE_FEDORA_TMP_DIR}/ChangeLog.Item" CACHE INTERNAL "ChangeLog Item file") MANAGE_CHANGELOG_SPLIT(changeLogItemVar prevVar "${changeLogFile}" "${ver}") INCLUDE(DateTimeFormat) FILE(WRITE ${CHANGELOG_FILE} "* ${TODAY_CHANGELOG} ${MAINTAINER} - ${PRJ_VER}\n") IF (newChangeStr) FILE(WRITE ${CHANGELOG_ITEM_FILE} "${newChangeStr}") FILE(APPEND ${CHANGELOG_FILE} "${newChangeStr}\n\n") ELSE(newChangeStr) FILE(WRITE ${CHANGELOG_ITEM_FILE} "${changeLogItemVar}") FILE(APPEND ${CHANGELOG_FILE} "${changeLogItemVar}\n\n") ENDIF(newChangeStr) FILE(APPEND ${CHANGELOG_FILE} "${prevVar}") ENDFUNCTION(MANAGE_CHANGELOG_UPDATE changeLogFile ver newChangeStr) FUNCTION(RELEASE_NOTES_READ_FILE) INCLUDE(ManageString) SET_DIRECTORY_PROPERTIES(PROPERTIES CLEAN_NO_CUSTOM "1") FOREACH(_arg ${ARGN}) IF(EXISTS ${_arg}) SET(RELEASE_NOTES_FILE ${_arg} CACHE FILEPATH "Release File") ENDIF(EXISTS ${_arg}) ENDFOREACH(_arg ${ARGN}) IF(NOT RELEASE_NOTES_FILE) SET(RELEASE_NOTES_FILE "RELEASE-NOTES.txt" CACHE FILEPATH "Release Notes") ENDIF(NOT RELEASE_NOTES_FILE) FILE(STRINGS "${RELEASE_NOTES_FILE}" _release_lines) SET(_changeItemSection 0) SET(CHANGELOG_ITEMS "") ## Parse release file FOREACH(_line ${_release_lines}) IF(_changeItemSection) ### Append lines in change section STRING_APPEND(CHANGELOG_ITEMS "${_line}" "\n") ELSEIF("${_line}" MATCHES "^[[]Changes[]]") ### Start the change section SET(_changeItemSection 1) ELSE(_changeItemSection) ### Variable Setting section SETTING_STRING_GET_VARIABLE(var value "${_line}") #MESSAGE("var=${var} value=${value}") IF(NOT var MATCHES "#") IF(var STREQUAL "PRJ_VER") SET_COMPILE_ENV(${var} "${value}" CACHE STRING "Project Version" FORCE) ELSEIF(var STREQUAL "SUMMARY") SET(CHANGE_SUMMARY "${value}" CACHE STRING "Change Summary" FORCE) ELSE(var STREQUAL "PRJ_VER") SET(${var} "${value}" CACHE STRING "${var}" FORCE) ENDIF(var STREQUAL "PRJ_VER") ENDIF(NOT var MATCHES "#") ENDIF(_changeItemSection) ENDFOREACH(_line ${_release_line}) SET_COMPILE_ENV(PRJ_DOC_DIR "${DOC_DIR}/${PROJECT_NAME}-${PRJ_VER}" CACHE PATH "Project docdir prefix" FORCE ) MANAGE_CHANGELOG_UPDATE(${CHANGELOG_FILE} ${PRJ_VER} "${CHANGELOG_ITEMS}") ADD_CUSTOM_COMMAND(OUTPUT ${CHANGELOG_ITEM_FILE} COMMAND ${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR} DEPENDS ${RELEASE_NOTE_FILE} VERBATIM ) ADD_CUSTOM_COMMAND(OUTPUT ${CHANGELOG_FILE} COMMAND ${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR} DEPENDS ${RELEASE_NOTES_FILE} COMMENT "Building ${CHANGELOG_FILE}" VERBATIM ) ADD_CUSTOM_TARGET(changelog ALL DEPENDS ${CHANGELOG_FILE} VERBATIM ) ENDFUNCTION(RELEASE_NOTES_READ_FILE) ENDIF(NOT DEFINED _MANAGE_VERSION_CMAKE_) ibus-chewing-1.4.10.1-Source/Modules/DateTimeFormat.cmake000664 001750 001750 00000002053 12266510707 023251 0ustar00dchendchen000000 000000 # - Date/time format module. # # Included by: # ManageVersion # # Defines the following macros: # TODAY(date_var format [locale]) # - Get date of today in specified format and locale. # * Parameters: # date_var: Result date string # format: date format for date(1) # locale: locale of the string. Use current locale setting if # locale is not given. # # Provides the following variables: # TODAY_CHANGELOG: Today in the format that is used in RPM Changelog. # e.g. Wed 08 Aug 2010 # # TODAY_SHORT: Short presentation of today, e.g. 20100818. # IF(NOT DEFINED _DATE_TIME_FORMAT_CMAKE_) SET(_DATE_TIME_FORMAT_CMAKE_ "DEFINED") MACRO(TODAY date_var format) INCLUDE(ManageVariable) SET(_locale ${ARGV2}) IF(_locale) SET(ENV{LC_ALL} ${_locale}) ENDIF(_locale) COMMAND_OUTPUT_TO_VARIABLE(${date_var} date --utc "${format}") ENDMACRO(TODAY date_var format) TODAY(TODAY_CHANGELOG "+%a %b %d %Y" "C") TODAY(TODAY_SHORT "+%Y%m%d" "C") ENDIF(NOT DEFINED _DATE_TIME_FORMAT_CMAKE_) ibus-chewing-1.4.10.1-Source/Modules/ManageReleaseFedora.cmake000664 001750 001750 00000016236 12273072306 024222 0ustar00dchendchen000000 000000 # - Module for working with Fedora and EPEL releases. # # This module provides convenient targets and macros for Fedora and EPEL # releases by using fedpkg, koji, and bodhi # # This module check following files for dependencies: # 1. ~/.fedora-upload-ca.cert : Ensure it has certificate file to submit to Fedora. # 2. fedpkg : Required to submit to fedora. # 3. koji : Required to submit to fedora. # 4. bodhi : Required to submit to fedora. # # If on of above file is missing, this module will be skipped. # # This module read the supported release information from cmake-fedora.conf # It finds cmake-fedora.conf in following order: # 1. Current directory # 2. Path as defined CMAKE_SOURCE_DIR # 3. /etc/cmake-fedora.conf # # Includes: # ManageFile # ManageMessage # ManageTarget # # Defines following variables: # CMAKE_FEDORA_CONF: Path to cmake_fedora.conf # FEDPKG_CMD: Path to fedpkg # KOJI_CMD: Path to koji # GIT_CMD: Path to git # BODHI_CMD: Path to bodhi # KOJI_BUILD_SCRATCH_CMD: Path to koji-build-scratch # FEDPKG_DIR: Dir for FedPkg. It will use environment variable # FEDPKG_DIR, then use $CMAKE_BINARY_DIR/FedPkg. # FEDORA_KAMA: Fedora Karma. Default:3 # FEDORA_UNSTABLE_KARMA: Fedora unstable Karma. Default:3 # FEDORA_AUTO_KARMA: Whether to use fedora Karma system. Default:"True" # # Defines following functions: # RELEASE_FEDORA([scopeList]) # - Release this project to specified Fedora and EPEL releases. # Arguments: # + scopeList: List of Fedora and EPEL release to be build. # Valid values: # - rawhide: Build rawhide. # - fedora: Build actives fedora releases, including Rawhide. # - fedora_1: Build the latest supported fedora releases. # This is one release eariler than rawhide. # - fedora_2: Build the second latest supported fedora releases. # This is two releases eariler than rawhide. # - f22 f21 ...: Build the specified fedora releases. # - epel: Build the currently supported EPEL releases. # - epel_1: Build the latest supported EPEL releases. # - epel_2: Build the second latest supported EPEL releases. # - el7 el6 ... : The EPEL releases to be built. # If not specified, "fedora epel" will be used. # # Reads following variables: # + PRJ_SRPM_FILE: Project SRPM # + FEDPKG_DIR: Directory for fedpkg checkout. # Default: Environment variable FEDPKG_DIR, # then $CMAKE_BINARY_DIR/FedPkg. # Reads and define following variables: # + FEDORA_RAWHIDE_VER: Numeric version of rawhide, such as 18 # + FEDORA_SUPPORTED_VERS: Numeric versions of currently supported Fedora, # such as 17;16 # + EPEL_SUPPORTED_VERS: Numeric versions of currently supported EPEL # since version 5. Such as 6;5 # + FEDORA_KARMA: Karma for auto pushing. # Default: 3 # + FEDORA_UNSTABLE_KARMA: Karma for auto unpushing. # Default: 3 # Defines following targets: # + release_fedora: Make necessary steps for releasing on fedora, # such as making source file tarballs, source rpms, build with fedpkg # and upload to bodhi. # + koji_build_scratch: Scratch build using koji # # IF(NOT DEFINED _MANAGE_RELEASE_FEDORA_) SET(_MANAGE_RELEASE_FEDORA_ "DEFINED") INCLUDE(ManageMessage) INCLUDE(ManageFile) INCLUDE(ManageTarget) INCLUDE(ManageRPM) SET(_manage_release_fedora_dependencies_missing 0) FIND_FILE_ERROR_HANDLING(CMAKE_FEDORA_CONF ERROR_MSG " Fedora release support disabled." ERROR_VAR _manage_release_fedora_dependencies_missing VERBOSE_LEVEL ${M_OFF} NAMES cmake-fedora.conf cmake-fedora.conf.in PATHS /etc ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/cmake-fedora ${CMAKE_CURRENT_SOURCE_DIR}/cmake-fedora ) FUNCTION(RELEASE_FEDORA_FIND_DEPENDENCY var) FIND_PROGRAM_ERROR_HANDLING(${var} ERROR_MSG " Fedora support disabled." ERROR_VAR _manage_release_fedora_dependencies_missing VERBOSE_LEVEL ${M_OFF} ${ARGN} ) ENDFUNCTION(RELEASE_FEDORA_FIND_DEPENDENCY var) RELEASE_FEDORA_FIND_DEPENDENCY(FEDPKG_CMD fedpkg) RELEASE_FEDORA_FIND_DEPENDENCY(KOJI_CMD koji) RELEASE_FEDORA_FIND_DEPENDENCY(GIT_CMD git) RELEASE_FEDORA_FIND_DEPENDENCY(BODHI_CMD bodhi) RELEASE_FEDORA_FIND_DEPENDENCY(KOJI_BUILD_SCRATCH_CMD koji-build-scratch PATH ${CMAKE_FEDORA_ADDITIONAL_SCRIPT_PATH}) RELEASE_FEDORA_FIND_DEPENDENCY(CMAKE_FEDORA_KOJI_CMD cmake-fedora-koji PATH ${CMAKE_FEDORA_ADDITIONAL_SCRIPT_PATH}) RELEASE_FEDORA_FIND_DEPENDENCY(CMAKE_FEDORA_FEDPKG_CMD cmake-fedora-fedpkg PATH ${CMAKE_FEDORA_ADDITIONAL_SCRIPT_PATH}) ## Set variables IF(NOT _manage_release_fedora_dependencies_missing) # Set release tags according to CMAKE_FEDORA_CONF SETTING_FILE_GET_ALL_VARIABLES(${CMAKE_FEDORA_CONF}) SET(BODHI_TEMPLATE_FILE "${CMAKE_FEDORA_TMP_DIR}/bodhi.template" CACHE FILEPATH "Bodhi template file" ) GET_ENV(FEDPKG_DIR "${CMAKE_FEDORA_TMP_DIR}/FedPkg" CACHE PATH "FedPkg dir") ## Fedora package variables SET(FEDORA_KARMA "3" CACHE STRING "Fedora Karma") SET(FEDORA_UNSTABLE_KARMA "-3" CACHE STRING "Fedora unstable Karma") ENDIF(NOT _manage_release_fedora_dependencies_missing) FUNCTION(RELEASE_FEDORA_KOJI_BUILD_SCRATCH) IF(NOT _manage_release_fedora_dependencies_missing) ADD_CUSTOM_TARGET(koji_build_scratch COMMAND ${KOJI_BUILD_SCRATCH_CMD} ${PRJ_SRPM_FILE} ${ARGN} DEPENDS "${PRJ_SRPM_FILE}" COMMENT "koji scratch build on ${PRJ_SRPM_FILE}" VERBATIM ) ENDIF(NOT _manage_release_fedora_dependencies_missing) ADD_DEPENDENCIES(koji_build_scratch rpmlint) ADD_DEPENDENCIES(tag_pre koji_build_scratch) ENDFUNCTION(RELEASE_FEDORA_KOJI_BUILD_SCRATCH) FUNCTION(RELEASE_FEDORA_FEDPKG) IF(NOT _manage_release_fedora_dependencies_missing) IF(NOT DEFINED MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE) M_MSG(${M_ERROR} "Undefined MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE, please use MANAGE_SOURCE_VERSION_CONTROL_GIT or other source version control") ENDIF(NOT DEFINED MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE) M_MSG(${M_INFO2} "MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE=${MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE}") SET(_cmdOpts "") IF (NOT CHANGE_SUMMARY STREQUAL "") LIST(APPEND _cmdOpts "-m" "${CHANGE_SUMMARY}") ENDIF(NOT CHANGE_SUMMARY STREQUAL "") IF (NOT REDHAT_BUGZILLA STREQUAL "") LIST(APPEND _cmdOpts "-b" "${REDHAT_BUGZILLA}") ENDIF(NOT REDHAT_BUGZILLA STREQUAL "") ADD_CUSTOM_TARGET(fedpkg_build COMMAND ${CMAKE_FEDORA_FEDPKG_CMD} -d "${FEDPKG_DIR}" "${_cmdOpts}" "${PRJ_SRPM_FILE}" ${ARGN} DEPENDS "${MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE}" VERBATIM ) ENDIF(NOT _manage_release_fedora_dependencies_missing) ENDFUNCTION(RELEASE_FEDORA_FEDPKG) FUNCTION(RELEASE_FEDORA) IF(NOT _manage_release_fedora_dependencies_missing) ## Parse tags SET(_scope_list ${ARGN}) RELEASE_FEDORA_KOJI_BUILD_SCRATCH(${_scope_list}) RELEASE_FEDORA_FEDPKG(${_scope_list}) ADD_CUSTOM_TARGET(release_fedora COMMENT "Release for Fedora") ADD_DEPENDENCIES(release_fedora fedpkg_build) ENDIF(NOT _manage_release_fedora_dependencies_missing) ENDFUNCTION(RELEASE_FEDORA) ENDIF(NOT DEFINED _MANAGE_RELEASE_FEDORA_) ibus-chewing-1.4.10.1-Source/Modules/ManageTranslation.cmake000664 001750 001750 00000025302 12266510707 024015 0ustar00dchendchen000000 000000 # - Software Translation support # This module supports software translation by: # 1) Creates gettext related targets. # 2) Communicate to Zanata servers. # # Defines following targets: # + translations: Make the translation files. # This target itself does nothing but provide a target for others to # depend on. # If macro MANAGE_GETTEXT is used, then it depends on the target gmo_files. # # Defines following variables: # + XGETTEXT_OPTIONS_C: Usual xgettext options for C programs. # Defines or read from following variables: # + MANAGE_TRANSLATION_MSGFMT_OPTIONS: msgfmt options # Default: --check --check-compatibility --strict # + MANAGE_TRANSLATION_MSGMERGE_OPTIONS: msgmerge options # Default: --update --indent --backup=none # + MANAGE_TRANSLATION_XGETEXT_OPTIONS: xgettext options # Default: ${XGETTEXT_OPTIONS_C} # # Defines following macros: # MANAGE_GETTEXT [ALL] SRCS src1 [src2 [...]] # [LOCALES locale1 [locale2 [...]]] # [POTFILE potfile] # [MSGFMT_OPTIONS msgfmtOpt]] # [MSGMERGE_OPTIONS msgmergeOpt]] # [XGETTEXT_OPTIONS xgettextOpt]] # ) # - Provide Gettext support like pot file generation and # gmo file generation. # You can specify supported locales with LOCALES ... # or omit the locales to use all the po files. # # Arguments: # + ALL: (Optional) make target "all" depends on gettext targets. # + SRCS src1 [src2 [...]]: File list of source code that contains msgid. # + LOCALES locale1 [local2 [...]]:(optional) Locale list to be generated. # Currently, only the format: lang_Region (such as fr_FR) is supported. # + POTFILE potFile: (optional) pot file to be referred. # Default: ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pot # + MSGFMT_OPTIONS msgfmtOpt: (optional) msgfmt options. # Default: ${MANAGE_TRANSLATION_MSGFMT_OPTIONS} # + MSGMERGE_OPTIONS msgmergeOpt: (optional) msgmerge options. # Default: ${MANAGE_TRANSLATION_MSGMERGE_OPTIONS}, which is ## + XGETTEXT_OPTIONS xgettextOpt: (optional) xgettext_options. # Default: ${XGETTEXT_OPTIONS_C} # Defines following variables: # + MSGMERGE_CMD: the full path to the msgmerge tool. # + MSGFMT_CMD: the full path to the msgfmt tool. # + XGETTEXT_CMD: the full path to the xgettext. # Targets: # + pot_file: Generate the pot_file. # + gmo_files: Converts input po files into the binary output mo files. # # MANAGE_ZANATA(serverUrl [YES]) # - Use Zanata (was flies) as translation service. # Arguments: # + serverUrl: The URL of Zanata server # + YES: Assume yes for all questions. # Reads following variables: # + ZANATA_XML_FILE: Path to zanata.xml # Default:${CMAKE_CURRENT_SOURCE_DIR}/zanata.xml # + ZANATA_INI_FILE: Path to zanata.ini # Default:${CMAKE_CURRENT_SOURCE_DIR}/zanata.xml # + ZANATA_PUSH_OPTIONS: Options for zanata push # + ZANATA_PULL_OPTIONS: Options for zanata pull # Targets: # + zanata_project_create: Create project with PROJECT_NAME in zanata # server. # + zanata_version_create: Create version PRJ_VER in zanata server. # + zanata_push: Push source messages to zanata server # + zanata_push_trans: Push source messages and translations to zanata server. # + zanata_pull: Pull translations from zanata server. # IF(NOT DEFINED _MANAGE_TRANSLATION_CMAKE_) SET(_MANAGE_TRANSLATION_CMAKE_ "DEFINED") SET(XGETTEXT_OPTIONS_C --language=C --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 -s ) SET(MANAGE_TRANSLATION_MSGFMT_OPTIONS "--check" CACHE STRING "msgfmt options" ) SET(MANAGE_TRANSLATION_MSGMERGE_OPTIONS "--indent" "--update" "--backup=none" CACHE STRING "msgmerge options" ) SET(MANAGE_TRANSLATION_XGETTEXT_OPTIONS ${XGETTEXT_OPTIONS_C} CACHE STRING "xgettext options" ) SET_DIRECTORY_PROPERTIES(PROPERTIES CLEAN_NO_CUSTOM "1") INCLUDE(ManageArchive) INCLUDE(ManageMessage) INCLUDE(ManageFile) INCLUDE(ManageDependency) IF(NOT TARGET translations) ADD_CUSTOM_TARGET(translations COMMENT "Making translations" ) ENDIF(NOT TARGET translations) #======================================== # GETTEXT support MACRO(MANAGE_GETTEXT_INIT) FOREACH(_name "xgettext" "msgmerge" "msgfmt") STRING(TOUPPER "${_name}" _cmd) FIND_PROGRAM_ERROR_HANDLING(${_cmd}_CMD ERROR_MSG " gettext support is disabled." ERROR_VAR _gettext_dependency_missing VERBOSE_LEVEL ${M_OFF} "${_name}" ) ENDFOREACH(_name "xgettext" "msgmerge" "msgfmt") ENDMACRO(MANAGE_GETTEXT_INIT) FUNCTION(MANAGE_GETTEXT) SET(_gettext_dependency_missing 0) MANAGE_DEPENDENCY(BUILD_REQUIRES GETTEXT REQUIRED DEVEL) MANAGE_GETTEXT_INIT() IF(NOT _gettext_dependency_missing) SET(_validOptions "ALL" "SRCS" "LOCALES" "POTFILE" "MSGFMT_OPTIONS" "MSGMERGE_OPTIONS" "XGETTEXT_OPTIONS" ) VARIABLE_PARSE_ARGN(_opt _validOptions ${ARGN}) IF(DEFINED _opt_ALL) SET(_all "ALL") ENDIF(DEFINED _opt_ALL) # Default values IF(_opt_POTFILE) GET_FILENAME_COMPONENT(_opt_POTFILE "${_opt_POTFILE}" ABSOLUTE) ELSE(_opt_POTFILE) SET(_opt_POTFILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pot") ENDIF(_opt_POTFILE) GET_FILENAME_COMPONENT(_opt_POTFILE_NAME "${_opt_POTFILE}" NAME_WE) SOURCE_ARCHIVE_CONTENTS_ADD("${_opt_POTFILE}") IF(NOT _opt_LOCALES) FILE(GLOB _poFiles "*.po") FOREACH(_poFile ${_poFiles}) GET_FILENAME_COMPONENT(_locale "${_poFile}" NAME_WE) LIST(APPEND _opt_LOCALES "${_locale}") ENDFOREACH(_poFile ${_poFiles}) ENDIF(NOT _opt_LOCALES) FOREACH(_optName "MSGFMT" "MSGMERGE" "XGETTEXT") IF(NOT _opt_${_optName}_OPTIONS) SET(_opt_${_optName}_OPTIONS "${MANAGE_TRANSLATION_${_optName}_OPTIONS}" ) ENDIF(NOT _opt_${_optName}_OPTIONS) ENDFOREACH(_optName "MSGFMT" "MSGMERGE" "XGETTEXT") SET(_srcList "") SET(_srcList_abs "") FOREACH(_sF ${_opt_SRCS}) FILE(RELATIVE_PATH _relFile "${CMAKE_CURRENT_BINARY_DIR}" "${_sF}") LIST(APPEND _srcList ${_relFile}) GET_FILENAME_COMPONENT(_absPoFile ${_sF} ABSOLUTE) LIST(APPEND _srcList_abs ${_absPoFile}) ENDFOREACH(_sF ${_opt_SRCS}) ### Generating pot files ADD_CUSTOM_TARGET_COMMAND(pot_file NO_FORCE OUTPUT ${_opt_POTFILE} ${_all} COMMAND ${XGETTEXT_CMD} ${_opt_XGETTEXT_OPTIONS} -o ${_opt_POTFILE} --package-name=${PROJECT_NAME} --package-version=${PRJ_VER} ${_srcList} DEPENDS ${_srcList_abs} COMMENT "Extract translatable messages to ${_potFile}" ) ### Generating gmo files SET(_gmoList "") SET(_poList "") FOREACH(_locale ${_opt_LOCALES}) SET(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_locale}.gmo) SET(_poFile ${CMAKE_CURRENT_SOURCE_DIR}/${_locale}.po) SOURCE_ARCHIVE_CONTENTS_ADD("${_poFile}") ADD_CUSTOM_COMMAND(OUTPUT ${_poFile} COMMAND ${MSGMERGE_CMD} ${_opt_MSGMERGE_OPTIONS} ${_poFile} ${_opt_POTFILE} DEPENDS ${_opt_POTFILE} COMMENT "Running ${MSGMERGE_CMD}" ) ADD_CUSTOM_COMMAND(OUTPUT ${_gmoFile} COMMAND ${MSGFMT_CMD} ${_opt_MSGFMT_OPTIONS} -o ${_gmoFile} ${_poFile} DEPENDS ${_poFile} COMMENT "Running ${MSGFMT_CMD}" ) LIST(APPEND _gmoList "${_gmoFile}") ## No need to use MANAGE_FILE_INSTALL ## As this will handle by rpmbuild INSTALL(FILES ${_gmoFile} DESTINATION ${DATA_DIR}/locale/${_locale}/LC_MESSAGES RENAME ${_opt_POTFILE_NAME}.mo ) ENDFOREACH(_locale ${_opt_LOCALES}) SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${_potFile}" ) ADD_CUSTOM_TARGET(gmo_files ${_all} DEPENDS ${_gmoList} COMMENT "Generate gmo files for translation" ) ADD_DEPENDENCIES(translations gmo_files) ENDIF(NOT _gettext_dependency_missing) ENDFUNCTION(MANAGE_GETTEXT) #======================================== # ZANATA support MACRO(MANAGE_ZANATA serverUrl) SET(ZANATA_SERVER "${serverUrl}") FIND_PROGRAM(ZANATA_CMD zanata) SET(_manage_zanata_dependencies_missing 0) IF(ZANATA_CMD STREQUAL "ZANATA_CMD-NOTFOUND") SET(_manage_zanata_dependencies_missing 1) M_MSG(${M_OFF} "zanata (python client) not found! zanata support disabled.") ENDIF(ZANATA_CMD STREQUAL "ZANATA_CMD-NOTFOUND") SET(ZANATA_XML_FILE "${CMAKE_CURRENT_SOURCE_DIR}/zanata.xml" CACHE FILEPATH "zanata.xml") IF(NOT EXISTS "${ZANATA_XML_FILE}") SET(_manage_zanata_dependencies_missing 1) M_MSG(${M_OFF} "zanata.xml is not found! Zanata support disabled.") ENDIF(NOT EXISTS "${ZANATA_XML_FILE}") SET(ZANATA_INI_FILE "$ENV{HOME}/.config/zanata.ini" CACHE FILEPATH "zanata.ni") IF(NOT EXISTS "${ZANATA_INI_FILE}") SET(_manage_zanata_dependencies_missing 1) M_MSG(${M_OFF} "zanata.ini is not found! Zanata support disabled.") ENDIF(NOT EXISTS "${ZANATA_INI_FILE}") IF(NOT _manage_zanata_dependencies_missing) SET(_zanata_args --url "${ZANATA_SERVER}" --project-config "${ZANATA_XML_FILE}" --user-config "${ZANATA_INI_FILE}") # Parsing arguments SET(_yes "") FOREACH(_arg ${ARGN}) IF(_arg STREQUAL "YES") SET(_yes "yes" "|") ENDIF(_arg STREQUAL "YES") ENDFOREACH(_arg ${ARGN}) ADD_CUSTOM_TARGET(zanata_project_create COMMAND ${ZANATA_CMD} project create ${PROJECT_NAME} ${_zanata_args} --project-name "${PROJECT_NAME}" --project-desc "${PRJ_SUMMARY}" COMMENT "Creating project ${PROJECT_NAME} on Zanata server ${serverUrl}" VERBATIM ) ADD_CUSTOM_TARGET(zanata_version_create COMMAND ${ZANATA_CMD} version create ${PRJ_VER} ${_zanata_args} --project-id "${PROJECT_NAME}" COMMENT "Creating version ${PRJ_VER} on Zanata server ${serverUrl}" VERBATIM ) SET(_po_files_depend "") IF(MANAGE_TRANSLATION_GETTEXT_PO_FILES) SET(_po_files_depend "DEPENDS" ${MANAGE_TRANSLATION_GETTEXT_PO_FILES}) ENDIF(MANAGE_TRANSLATION_GETTEXT_PO_FILES) # Zanata push ADD_CUSTOM_TARGET(zanata_push COMMAND ${_yes} ${ZANATA_CMD} push ${_zanata_args} ${ZANATA_PUSH_OPTIONS} ${_po_files_depend} COMMENT "Push source messages to zanata server ${ZANATA_SERVER}" VERBATIM ) ADD_DEPENDENCIES(zanata_push pot_file) # Zanata push with translation ADD_CUSTOM_TARGET(zanata_push_trans COMMAND ${_yes} ${ZANATA_CMD} push ${_zanata_args} --push-type both ${ZANATA_PUSH_OPTIONS} ${_po_files_depend} COMMENT "Push source messages and translations to zanata server ${ZANATA_SERVER}" VERBATIM ) ADD_DEPENDENCIES(zanata_push_trans pot_file) # Zanata pull ADD_CUSTOM_TARGET(zanata_pull COMMAND ${_yes} ${ZANATA_CMD} pull ${_zanata_args} ${ZANATA_PULL_OPTIONS} COMMENT "Pull translations fro zanata server ${ZANATA_SERVER}" VERBATIM ) ENDIF(NOT _manage_zanata_dependencies_missing) ENDMACRO(MANAGE_ZANATA serverUrl) ENDIF(NOT DEFINED _MANAGE_TRANSLATION_CMAKE_) ibus-chewing-1.4.10.1-Source/Modules/cmake_uninstall.cmake.in000664 001750 001750 00000001654 12266510707 024170 0ustar00dchendchen000000 000000 IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) STRING(REGEX REPLACE "\n" ";" files "${files}") FOREACH(file ${files}) MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") IF(EXISTS "$ENV{DESTDIR}${file}") EXEC_PROGRAM( "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" OUTPUT_VARIABLE rm_out RETURN_VALUE rm_retval ) IF(NOT "${rm_retval}" STREQUAL 0) MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") ENDIF(NOT "${rm_retval}" STREQUAL 0) ELSE(EXISTS "$ENV{DESTDIR}${file}") MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") ENDIF(EXISTS "$ENV{DESTDIR}${file}") ENDFOREACH(file) ibus-chewing-1.4.10.1-Source/Modules/ManageMessage.cmake000664 001750 001750 00000004003 12266510707 023076 0ustar00dchendchen000000 000000 # - Manage the output and debug messages. # This module has macros that control how many messages to be shown # by defining the desire message level. # # Defined variables that represent verbose levels: # 1: M_FATAL - Critical error,Should stop immediately # 2: M_ERROR - Error that will Eventually fail # 3: M_WARN - General Warning. # 4: M_OFF - Optional functionalities are turned-off because requirement is not met. # 5: M_INFO1 - Info/debug message # 6: M_INFO2 - Info/debug message # 7: M_INFO3 - Info/debug message # # Read following variable: # + MANAGE_MESSAGE_LEVEL: Message level in integer. # Messages with greater level will be suppressed. # Default is ${M_OFF} # + MANAGE_MESSAGE_LABELS: Labels that printed in front of the message for # corresponding message level. # Default is "[Fatal] ;[Error] ;[Warn] ;[Off] ;[Info1] ;[Info2] ;[Info3] ") # # Define following macros: # M_MSG(level msg) # - Surpress the message if level is higher than MANAGE_MESSAGE_LEVEL # Otherwise show the message. # Arguments: # + level: level of the message. # + msg: Message to show. # IF(NOT DEFINED _MANAGE_MESSAGE_CMAKE_) SET(_MANAGE_MESSAGE_CMAKE_ "DEFINED") SET(M_FATAL 1) SET(M_ERROR 2) SET(M_WARN 3) SET(M_OFF 4) SET(M_INFO1 5) SET(M_INFO2 6) SET(M_INFO3 7) IF(NOT DEFINED MANAGE_MESSAGE_LABELS) SET(MANAGE_MESSAGE_LABELS "[Fatal] ;[Error] ;[Warn] ;[Off] ;[Info1] ;[Info2] ;[Info3] ") ENDIF(NOT DEFINED MANAGE_MESSAGE_LABELS) SET(MANAGE_MESSAGE_LEVEL ${M_OFF} CACHE STRING "Message (Verbose) Level") MACRO(M_MSG level msg) IF(NOT ${level} GREATER ${MANAGE_MESSAGE_LEVEL}) MATH(EXPR _lvl ${level}-1) LIST(GET MANAGE_MESSAGE_LABELS ${_lvl} _label) IF(${level} EQUAL 1) MESSAGE(FATAL_ERROR "${_label}${msg}") ELSE(${level} EQUAL 1) MESSAGE("${_label}${msg}") ENDIF(${level} EQUAL 1) ENDIF(NOT ${level} GREATER ${MANAGE_MESSAGE_LEVEL}) ENDMACRO(M_MSG level msg) ENDIF(NOT DEFINED _MANAGE_MESSAGE_CMAKE_) ibus-chewing-1.4.10.1-Source/Modules/ManageTarget.cmake000664 001750 001750 00000003421 12266510707 022743 0ustar00dchendchen000000 000000 # - Modules for managing targets and outputs. # # Includes: # ManageVariable # # Defines following functions: # ADD_CUSTOM_TARGET_COMMAND(target OUTPUT file1 [file2 ..] # [ALL] [NO_FORCE] COMMAND command1 ... # ) # - Combine ADD_CUSTOM_TARGET and ADD_CUSTOM_COMMAND. # This command is handy if you want a target that always refresh # the output files without writing the same build recipes # in separate ADD_CUSTOM_TARGET and ADD_CUSTOM_COMMAND. # # If you also want a target that run only if output files # do not exist or outdated. Specify "NO_FORCE". # The target for that will be "_no_force". # # * Parameters: # + target: target for this command # + OUTPUT file1, file2 ... : Files to be outputted by this command # + ALL: (Optional) The target is built with target 'all' # + NO_FORCE: (Optional) Produce a target that run only if # output files do not exist or outdated. # + command1 ... : Command to be run. # The rest arguments are same with ADD_CUSTOM_TARGET. # IF(NOT DEFINED _MANAGE_TARGET_CMAKE_) SET(_MANAGE_TARGET_CMAKE_ "DEFINED") INCLUDE(ManageVariable) FUNCTION(ADD_CUSTOM_TARGET_COMMAND target) SET(_validOptions "OUTPUT" "ALL" "NO_FORCE" "COMMAND") VARIABLE_PARSE_ARGN(_opt _validOptions ${ARGN}) IF(DEFINED _opt_ALL) SET(_all "ALL") ELSE(DEFINED _opt_ALL) SET(_all "") ENDIF(DEFINED _opt_ALL) ADD_CUSTOM_TARGET(${target} ${_all} COMMAND ${_opt_COMMAND} ) ADD_CUSTOM_COMMAND(OUTPUT ${_opt_OUTPUT} COMMAND ${_opt_COMMAND} ) IF(DEFINED _opt_NO_FORCE) ADD_CUSTOM_TARGET(${target}_no_force DEPENDS ${_opt_OUTPUT} ) ENDIF(DEFINED _opt_NO_FORCE) ENDFUNCTION(ADD_CUSTOM_TARGET_COMMAND) ENDIF(NOT DEFINED _MANAGE_TARGET_CMAKE_) ibus-chewing-1.4.10.1-Source/Modules/ManageSourceVersionControl.cmake000664 001750 001750 00000006656 12273070154 025674 0ustar00dchendchen000000 000000 # - Module for manipulate source version control systems. # This module provides an universal interface for supported # source version control systems, namely: # Git, Mercurial and SVN. # # Following targets are defined for each source version control (in Git terminology): # - tag: Tag the working tree with PRJ_VER and CHANGE_SUMMARY. # This target also does: # 1. Ensure there is nothing uncommitted. # 2. Push the commits and tags to server # - tag_pre: Targets that 'tag' depends on. # So you can push some check before the tag. # # Following variables are defined for each source version control: # - MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE: # The file that would be touched after target tag is completed. # # IF(NOT DEFINED _MANAGE_SOURCE_VERSION_CONTROL_CMAKE_) SET(_MANAGE_SOURCE_VERSION_CONTROL_CMAKE_ "DEFINED") INCLUDE(ManageTarget) MACRO(MANAGE_SOURCE_VERSION_CONTROL_COMMON) ADD_CUSTOM_TARGET(tag_pre COMMENT "Pre-tagging check" ) IF(TARGET test) ADD_DEPENDENCIES(tag_pre test) ENDIF(TARGET test) ENDMACRO(MANAGE_SOURCE_VERSION_CONTROL_COMMON) MACRO(MANAGE_SOURCE_VERSION_CONTROL_GIT) SET(MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE ${CMAKE_SOURCE_DIR}/.git/refs/tags/${PRJ_VER} CACHE PATH "Source Version Control Tag File" FORCE) ADD_CUSTOM_TARGET(commit_clean COMMAND git diff --exit-code COMMENT "Is git commit clean?" VERBATIM ) ADD_CUSTOM_TARGET(tag DEPENDS "${MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE}" ) ADD_CUSTOM_TARGET(tag_push COMMAND git push COMMAND git push --tags DEPENDS "${MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE}" COMMENT "Push to git" ) ADD_CUSTOM_COMMAND(OUTPUT ${MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE} COMMAND make commit_clean COMMAND make tag_pre COMMAND git tag -a -m "${CHANGE_SUMMARY}" "${PRJ_VER}" HEAD COMMENT "Tagging the source as ver ${PRJ_VER}" VERBATIM ) MANAGE_SOURCE_VERSION_CONTROL_COMMON() ENDMACRO(MANAGE_SOURCE_VERSION_CONTROL_GIT) MACRO(MANAGE_SOURCE_VERSION_CONTROL_HG) SET(MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE ${CMAKE_FEDORA_TEMP_DIR}/${PRJ_VER} CACHE PATH "Source Version Control Tag File" FORCE) ADD_CUSTOM_TARGET(tag DEPENDS "${MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE}" ) ADD_CUSTOM_COMMAND(OUTPUT "${MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE}" COMMAND make tag_pre COMMAND hg tag -m "${CHANGE_SUMMARY}" "${PRJ_VER}" COMMAND ${CMAKE_COMMAND} -E touch "${MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE}" COMMENT "Tagging the source as ver ${PRJ_VER}" VERBATIM ) MANAGE_SOURCE_VERSION_CONTROL_COMMON() ENDMACRO(MANAGE_SOURCE_VERSION_CONTROL_HG) MACRO(MANAGE_SOURCE_VERSION_CONTROL_SVN) SET(MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE ${CMAKE_FEDORA_TEMP_DIR}/${PRJ_VER} CACHE PATH "Source Version Control Tag File" FORCE) ADD_CUSTOM_TARGET(tag DEPENDS "${MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE}" ) ADD_CUSTOM_COMMAND(OUTPUT "${MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE}" COMMAND make tag_pre COMMAND svn copy "${SOURCE_BASE_URL}/trunk" "${SOURCE_BASE_URL}/tags/${PRJ_VER}" -m "${CHANGE_SUMMARY}" COMMAND cmake -E touch ${MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE} COMMENT "Tagging the source as ver ${PRJ_VER}" VERBATIM ) MANAGE_SOURCE_VERSION_CONTROL_COMMON() ENDMACRO(MANAGE_SOURCE_VERSION_CONTROL_SVN) ENDIF(NOT DEFINED _MANAGE_SOURCE_VERSION_CONTROL_CMAKE_) ibus-chewing-1.4.10.1-Source/Modules/CMakeLists.txt000664 001750 001750 00000000362 12266510707 022143 0ustar00dchendchen000000 000000 FILE(GLOB CMAKE_FEDORA_MODULES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "M*.cmake") LIST(APPEND CMAKE_FEDORA_MODULES cmake_uninstall.cmake.in DateTimeFormat.cmake) MANAGE_FILE_INSTALL(DATA ${CMAKE_FEDORA_MODULES} DEST_SUBDIR cmake/Modules ) ibus-chewing-1.4.10.1-Source/rpm/project.spec.in000664 001750 001750 00000001454 12266510632 021520 0ustar00dchendchen000000 000000 Name: @PROJECT_NAME@ Version: @PRJ_VER@ Release: @RPM_RELEASE_NO@%{?dist} @RPM_SPEC_SUMMARY_OUTPUT@ License: @LICENSE@ Group: @PRJ_GROUP@ URL: @RPM_SPEC_URL_OUTPUT@ @RPM_SPEC_SOURCE_OUTPUT@ @RPM_SPEC_REQUIRES_OUTPUT@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @RPM_SPEC_HEADER_OUTPUT@ @RPM_SPEC_DESCRIPTION_OUTPUT@ @RPM_SPEC_SUB_PACKAGE_OUTPUT@ %prep %setup -q -n %{name}-%{version}-Source %build # $RPM_OPT_FLAGS should be loaded from cmake macro. @RPM_SPEC_BUILD_OUTPUT@ %install @RPM_SPEC_INSTALL_OUTPUT@ @RPM_SPEC_PRJ_DOC_REMOVAL_OUTPUT@ @RPM_SPEC_SCRIPT_OUTPUT@ %clean @RPM_SPEC_FILES_SECTION_OUTPUT@ %changelog * @TODAY_CHANGELOG@ @MAINTAINER@ - @PRJ_VER@-@RPM_RELEASE_NO@ @CHANGELOG_ITEMS@ @RPM_CHANGELOG_PREV@ ibus-chewing-1.4.10.1-Source/rpm/RPM-ChangeLog.prev000664 001750 001750 00000037433 12266510632 021760 0ustar00dchendchen000000 000000 * Thu Jan 16 2014 Ding-Yi Chen - 1.4.6-5 - Target "translation" is built separately with all, in order to tame multiple job make. * Thu Jan 16 2014 Ding-Yi Chen - 1.4.6-1 - Fix Build for RHEL7 * Wed Jan 15 2014 Ding-Yi Chen - 1.4.5-1 - Resolves Bug 1013977 - ibus-chewing needs to have ibus write-cache --system in %post and %postun - Resolves Bug 1027031 - CVE-2013-4509 ibus-chewing: ibus: visible password entry flaw [rhel-7.0] - Resolves Bug 1028911 - [zh_TW]'Chinese<->English' switch does not work when clicking on the Chewing menu list. - Resolves Bug 1045868 - ibus-chewing *again* not built with $RPM_OPT_FLAGS - Option "Sync between caps lock and IM": + Default of is changed to "disable", because the previous default "keyboard" cause bug 1028911 for GNOME Shell. + Now Sync from "input method" can control Caps LED in GNOME shell. - Translation added: de_DE, es_ES, it_IT, pt_BR, uk_UA - Set environment IBUS_CHEWING_LOGFILE for ibus-chewing log. * Mon Dec 23 2013 Ding-Yi Chen - 1.4.4-1 - Resolves Bug 842856 - ibus-chewing 1.4.3-1 not built with $RPM_OPT_FLAGS - Resolves Bug 1027030 - CVE-2013-4509 ibus-chewing: ibus: visible password entry flaw [fedora-all] Thanks czchen for the GitHub pull request 39. - Added translations: fr_FR, ja_JP, ko_KR - Adopt cmake-fedora-1.2.0 * Sat Aug 03 2013 Fedora Release Engineering - 1.4.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Wed Feb 20 2013 Ville Skyttä - 1.4.3-3 - Build with $RPM_OPT_FLAGS (#842856). * Thu Feb 14 2013 Fedora Release Engineering - 1.4.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Mon Nov 26 2012 Ding-Yi Chen - 1.4.3-1 - Fixed GitHub issue #30: Rework decorate_preedit by merging pull request #30 from buganini - Fixed GitHub issue #31: Properly refresh property by merging pull request #31 from buganini * Thu Aug 23 2012 Ding-Yi Chen - 1.4.2-1 - Fixed GitHub issue #7: highlighted text be cut after switch back to pure ibus by merging pull request #24 from buganini - Fixed GitHub issue #20: Shift key will send duplicated strings by merging pull request #22 from buganini - Fixed GitHub issue #21: somethings wrong with cmake - Fixed GitHub issue #25: Weird symbol when input with somethings highlighted by merging pull request #26 from buganini - Fixed GitHub issue #27: Local path committed into tree - Fixed: Bug 713033 - [zh_TW] ibus-chewing problem - Fixed: Bug 745371 - ibus-chewing: mode confusion In Temporary English mode and Chinese mode later on - Fixed: Google Issue 1172: [ibus-chewing] move elf file to standard directory. - Fixed: Google Issue 1426: ibus-chewing-1.3.10 installs directory /gconf to root filesystem - Fixed: Google Issue 1428: ibus-chewing-1.3.10 fails to save it's settings - Fixed: Google Issue 1481: Some characters are missing when a long string in preedit buffer. - Fixed: Google Issue 1490: Cannot change INSTAL prefix for ibus-chewing-1.4.0 * Mon Jul 23 2012 Ding-Yi Chen - 1.4.0-1 - Merge pull request #13 from hiroshiyui to Fix wrong data type conversion - Fixed: Google Issue 1079: Use shift key to switch to English mode in ibus-chewing Also list as GitHub pull request #17 - Fixed: Google Issue 1089: Ibus-chewing cause window flicker when compiz enabled - Fixed: Google Issue 1329, Github Issue 3: Merge with buganini at gmail.com - Fixed: Google Issue 1351: ibus-chewing 1.3.10 mistakenly send uncommitted charactor. - Fixed: Google Issue 1374: ibus-chewing: cannot save the preference with gnomeshell - Fixed: Google Issue 1427: ibus-chewing-1.3.10 is not compatible with ibus-1.4.0 and higher Also list as GitHub pull request #16 - Fixed: GitHub Issue 5: Word missing when with libchewing-0.3.3 and ibus-chewing 1.3.10 Also list as GitHub pull request #15 - Fixed: Launchpad bug: 1014456 bus-chewing deletes characters if too many of them are entered Also list as GitHub pull request #19 * Thu Dec 15 2011 Ding-Yi Chen - 1.3.10-1 - Fixed Bug 726335 (Google issue 1281)- [abrt] ibus-chewing-1.3.9.2-3.fc15: g_atomic_int_get: Process /usr/libexec/ibus-engine-chewing was killed by signal 11 (SIGSEGV) using patch from Scott Tsai - Fixed Bug 727018 - ibus compose file needs a symbol tag for gnome-shell - Fixed characters duplication problem (Google issue 1245, GitHub ibus-chewing issue 2) - Fixed KP-Enter not been able to commit preedit buffer. (Google issue 1303, GitHub ibus-chewing issue 4) - Depends on cmake-fedora now. - Fixed issue 1274, which is addressed by yusake's comments on d9009bf. - Add compile flag for GNOME3. - Add command line option: showFlags - ibus-gnome special symbol - Thanks Fred Chien's patch against that candidate window cannot be closed with escape key since selected tone. - Thanks Fourdollar's patch for Fix plain zhuyin with space as selection problem. - Remove support for ibus-1.2 and prior. * Tue Feb 01 2011 Ding-Yi Chen - 1.3.5.20100714-3 - Resolves: #627794 - Add USER-GUIDE * Fri Nov 19 2010 Ding-Yi Chen - 1.3.9.2-1 - Fixed Bug 652909 - Added back a Changlog item that mention Nils Philippsen's change. - Apply Jim Huang's patch for zh_TW.po * Wed Nov 17 2010 Nils Philippsen - 1.3.8-2 - fix scriptlets * Fri Nov 12 2010 Ding-Yi Chen - 1.3.8-1 - Quick fix for f15 and ibus-1.4 build - Version scheme change. * Fri Sep 10 2010 Ding-Yi Chen - 1.3.7.20100910-1 - Input style of ibus-chewing is decommissioned under ibus >=1.3. Now the input style is determined solely on the setting of "Embed preedit in application window" in IBus. - Fixed: #608991, #632043 - Fixed Issue 1022: chewing commit some text in reset method (patched by Peng Huang). - Fixed Issue 1032: [ibus-chewing] Chewing not commit some single Chinese char into application when press enter. - Rewrite CMake modules to make them cleaner, and documents in cmake module help format. - [For developer and distro maintainer] Various targets changed. Use 'make help' to obtain a list of available targets. * Fri Jul 30 2010 Ding-Yi Chen - 1.3.6.20100730-1 - Resolves: #608991 - Sort of fix upstream issue 993. - Include USER-GUIDE - Remove NEWS, as this project does not use it. - Fix upstream Issue 1016: [ibus-chewing] Chewing should commit the complete string before disable chewing. But only for ibus-1.3.0 and later. - Mouse candidate selection now work in plain Zhuyin mode. - Default setting changes: (Won't affect current user though). + Auto move cursor: TRUE + Add phrases in front: TRUE + spaceAsSelection: FALSE * Wed Jul 14 2010 Ding-Yi Chen - 1.3.5.20100714-1 - Resolves: #608991 - Removes Ctrl-v/V Hotkey * Wed Jul 07 2010 Ding-Yi Chen - 1.3.5.20100706-1 - Fixed google issue 965: Candidate missing if both "Plain Zhuyin" and "Space As selection" are enabled. - Revised Basic.macro - Resolved: #608991 * Tue Jun 08 2010 Ding-Yi Chen - 1.3.4.20100608-1 - ibus-chewing can now use mouse to click on mouse. Thus Fix Issue 951: Chewing does not support selection of candidates via mouseclick Thanks zork@chromium.org for the patch. * Fri Jun 04 2010 Ding-Yi Chen - 1.3.4.20100605-1 - Fix Issue 942: Fix unsunk references in ibus-chewing Applied the patch provided by zork@chromium.org. - Rename CVS_DIST_TAGS to FEDORA_DIST_TAGS, and move its definition to cmake_modules/ - Gob2 generated file is now removed, because Bug 519108 is fixed from Fedora 11. * Wed Apr 07 2010 Peng Huang - 1.2.99.20100317-2 - Rebuild with ibus-1.3.0 * Wed Mar 17 2010 Ding-Yi Chen - 1.2.99.20100317-1 - Fix google 796: English input for dvorak - Fix google 797: Zhuyin input for dvorak - Fix google 807: ibus-chewing shows the over-the-spot panel even when not necessary * Fri Feb 19 2010 Ding-Yi Chen - 1.2.99.20100217-1 - Fixed the CMake description that leads summary incorrect. * Tue Feb 16 2010 Ding-Yi Chen - 1.2.99.20100216-1 - Fixed when typing English immediately after incomplete Chinese character. - Add zh_TW summary. - Revised description and write its zh_TW translation. * Mon Feb 15 2010 Ding-Yi Chen - 1.2.99.20100215-1 - "Macroize" rpm spec. - Resolves: #565388 * Fri Feb 12 2010 Ding-Yi Chen - 1.2.99.20100212-1 - Fixed Google issue 505. - Google issue 755 is fixed in libchewing-0.3.2-22, See Chewing Google issue 10 - Fixed behavior of Del, Backspace, Home, End - Revert the change that fix Google issue 758. - Change the default input style to "in candidate window", because not all application handle the on-the-spot mode well. - Fixed Google issue 776 * Tue Feb 09 2010 Ding-Yi Chen - 1.2.0.20100210-1 - Revert the change that fix Google issue 758. - Remove "tag" target, add "commit" which do commit and tag. * Tue Feb 09 2010 Ding-Yi Chen - 1.2.0.20100209-1 - Fixed Google issue 754: commit string is missing when inputting long English text in the end. - Fixed Google issue 758: Space is irresponsive in Temporary English mode if no Chinese in preedit buffer. - Fixed Google Issue 763: [ibus-chewing] [qt] Shift-Up/Down does not mark text area properly. - Change the String "on the spot" to "in application window", Chinese translation change to "在輸入處組詞" - Change the "over the spot" to "in candidate window", Chinese translation remain the same - Fixed bodhi submission. * Mon Feb 08 2010 Adam Jackson - 1.2.0.20100125-2 - Rebuild for new libibus.so.2 ABI. * Mon Jan 25 2010 Ding-Yi Chen - 1.2.0.20100125-1 - Add over-the-spot editing mode. - Possible fixed of Google issue 505: ibus acts strange in Qt programs. - Implemented Google issue 738: Add a mode that allow editing in candidate window (thus over-the-spot mode). * Fri Dec 11 2009 Ding-Yi Chen - 1.2.0.20091211-1 - Fix Google issue 608: ibus-chewing does not show cursor in xim mode. - Fix Google issue 611: ibus-chewing keyboard setting reverts to default unexpectlly. - Fix Google issue 660: failed to build with binutils-gold. - Remove make target commit. - Add make target tag * Fri Oct 09 2009 Ding-Yi Chen - 1.2.0.20091002-1 - Bug 518901 - ibus-chewing would not work with locale zh_TW.Big - Fix Google issue 501: ibus-chewing buffer doesn't get cleared when toggling ibus on/off - Fix Google issue 502: ibus-chewing: character selection window stays behind when toggling ibus off- Use WM's revised ibus-chewing icon. - Debug output now marked with levels. * Wed Sep 30 2009 Peng Huang - 1.2.0.20090917-2 - Rebuild with ibus-1.2.0 * Thu Sep 17 2009 Ding-Yi Chen - 1.2.0.20090917-1 - Addressed Upstream (IBUS Google code) issue 484: + Find the source that why the / and . are not working. - Pack the gob2 generation source to avoid the [Bug 519108]: [gob2] class and enum names convert incorrectly in mock / koji. * Wed Sep 09 2009 Ding-Yi Chen - 1.2.0.20090831-1 - IBusProperty and IBusPropList are free upon destruction. - Fixed Red Hat Bugzilla [Bug 519328] [ibus-chewing] inconsistent between normal mode and plain Zhuyin mode. - Addressed Upstream (IBUS Google code) issue 484: Arithmetic symbols (+-*/) on number pad does not input properly. * Wed Aug 26 2009 Ding-Yi Chen - 1.2.0.20090818-1 - Merged 1.2 and 1.1 source code. - Addressed Upstream (IBUS Google code) issue 471. - Remove libX11 dependency. * Fri Jul 24 2009 Fedora Release Engineering - 1.2.0.20090624-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Fri Jul 24 2009 Ding-Yi Chen - 1.2.0.20090624-1 - Lookup table now shows the selection key. * Mon Jun 22 2009 Peng Huang - 1.2.0.20090622-1 - Update to 1.2.0.20090622. * Fri May 22 2009 Ding-Yi Chen - 1.0.10.20090523-2 - Add back the export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` * Fri May 22 2009 Ding-Yi Chen - 1.0.10.20090523-1 - Applied Lubomir Rintel's patch * Fri May 22 2009 - Ding-Yi Chen - 1.0.10.20090522-1 - Now the 1st down key brings the longest possible phrases. The 2nd down key brings the 2nd longest possible phrases from the back, unlike the previous versions where the cursor stays in the head of longest phrase. - Add force lowercase in English mode option. - Fix double free issue when destroy ibus-chewing. - Hide ibus-chewing-panel when ibus-chewing is focus-out * Mon May 11 2009 Ding-Yi Chen - 1.0.9.20090508-1 Now commit is forced when switch of ibus-chewing or current application loses focus. - New ibus-chewing.png is contribute by WM. - input-keyboard.png is no longer needed and removed. - ibus-engine-chewing -v option now need an integer as verbose level. - ibus-chewing.schemas is now generated. - Fix some CMake modules bugs. * Tue Apr 28 2009 Ding-Yi Chen - 1.0.8.20090428-1 Fix the errors which Funda Wang as pointing out: - Move src/chewing.xml.in to data/ - Fixed some typo in next_version targets. - Remove GConf2 package requirement, while add gconftool-2 requirement. * Mon Mar 30 2009 Ding-Yi Chen - 1.0.5.20090330-1 - Added tooltips. - Revealed the sync caps lock setting. - Fixed Right key bug. - Added CMake policy 0011 as OLD. * Mon Mar 23 2009 Ding-Yi Chen - 1.0.4.20090323-2 - Fix koji build issues. * Mon Mar 23 2009 Ding-Yi Chen - 1.0.4.20090323-1 - Various Settings are now in dialog. - Integer settings are now revealed. - MakerDialog.gob is now available. - Work around of easy symbol input. - Fix iBus Google issue 310. * Sun Mar 22 2009 Lubomir Rintel - 1.0.3.20090311-2 - Properly reinstall the schema when updating from 1.0.2.20090303-1 or older * Wed Mar 11 2009 Ding-Yi Chen - 1.0.3.20090311-1 - IBus Google issue 305: ibus-chewing.schema -> ibus-chewing.schemas - IBus Google issue 307: hardcoded chewing datadir - Sync chewing candPerPage and IBusTable->page_size - Sync between IM and keyboard (Experimental) - ibus-chewing.schema -> ibus-chewing.schemas * Tue Mar 03 2009 Ding-Yi Chen - 1.0.2.20090303-1 - Required gconf2 -> GConf2. - Fix RPM install issues. * Fri Feb 27 2009 Ding-Yi Chen - 1.0.1.20090227-1 - Setting shows/hides KBType, selKeys, and various settings. - Add gconf schema. - Fix some memory leaking checked. - Move some function to cmake_modules. - Fix Google code issue 281 * Tue Feb 24 2009 Fedora Release Engineering - 0.1.1.20081023-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Wed Feb 18 2009 Ding-Yi Chen - 1.0.0.20090220-1 - First working version for IBus C * Wed Jan 28 2009 Ding-Yi Chen - 1.0.0.20090128-1 - Fix the binding with libchewing 0.3.2. * Sat Nov 29 2008 Ignacio Vazquez-Abrams - 0.1.1.20081023-2 - Rebuild for Python 2.6 * Thu Oct 23 2008 Huang Peng - 0.1.1.20080923-1 - Update to 0.1.1.20080923. * Wed Sep 17 2008 Huang Peng - 0.1.1.20080917-1 - Update to 0.1.1.20080917. * Tue Sep 16 2008 Huang Peng - 0.1.1.20080916-1 - Update to 0.1.1.20080916. * Tue Sep 09 2008 Huang Peng - 0.1.1.20080901-1 - Update to 0.1.1.20080901. * Fri Aug 15 2008 Huang Peng - 0.1.1.20081023-1 - The first version. ibus-chewing-1.4.10.1-Source/rpm/CMakeLists.txt000664 001750 001750 00000003764 12271717262 021343 0ustar00dchendchen000000 000000 SET(RPM_BUILD_TOPDIR ${CMAKE_BINARY_DIR}/rpm CACHE FILEPATH "RPM top dir") SET(RPM_BUILD_SOURCES ${CMAKE_BINARY_DIR} CACHE FILEPATH "RPM Source dir") INCLUDE(ManageRPM) INCLUDE(ManageReleaseFedora) RPM_SPEC_STRING_ADD_TAG(RPM_SPEC_REQUIRES_OUTPUT Requires pre "GConf2" ) RPM_SPEC_STRING_ADD_TAG(RPM_SPEC_REQUIRES_OUTPUT Requires post "GConf2" ) RPM_SPEC_STRING_ADD_TAG(RPM_SPEC_REQUIRES_OUTPUT Requires preun "GConf2" ) RPM_SPEC_STRING_ADD(RPM_SPEC_BUILD_OUTPUT "make VERBOSE=1 translations") RPM_SPEC_STRING_ADD_DIRECTIVE(RPM_SPEC_SCRIPT_OUTPUT pre "" "if [ \"$1\" -gt 1 ] ; then export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` [ -r %{_sysconfdir}/gconf/schemas/%{name}.schemas ] && gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/%{name}.schemas\\ >/dev/null || : # Upgrading 1.0.2.20090302-1.fc11 or older? [ -r %{_sysconfdir}/gconf/schemas/%{name}.schema ] && gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/%{name}.schema\\ >/dev/null || : fi " ) RPM_SPEC_STRING_ADD_DIRECTIVE(RPM_SPEC_SCRIPT_OUTPUT preun "" "if [ \"$1\" -eq 0 ] ; then export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || : fi " ) RPM_SPEC_STRING_ADD_DIRECTIVE(RPM_SPEC_SCRIPT_OUTPUT post "" "export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || : [ -x %{_bindir}/ibus ] && \\ %{_bindir}/ibus write-cache --system &>/dev/null || : " ) RPM_SPEC_STRING_ADD_DIRECTIVE(RPM_SPEC_SCRIPT_OUTPUT postun "" "[ -x %{_bindir}/ibus ] && \\ %{_bindir}/ibus write-cache --system &>/dev/null || : " ) ADD_CUSTOM_COMMAND(OUTPUT ${SOURCE_ARCHIVE_FILE} COMMAND make pack_src WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ) PACK_RPM() RELEASE_FEDORA(fedora) # "Off" Warning is displayed if mock is not installed. RPM_MOCK_BUILD() ibus-chewing-1.4.10.1-Source/AUTHORS000664 001750 001750 00000001030 12266510632 017031 0ustar00dchendchen000000 000000 Original Author: Peng Huang Current Maintainer: Ding-Yi Chen Translators: ----------- zh_CN.po: Peng Huang zh_TW.po: swyear Acknowledge: ----------- From Tango project: key_bindings.png settings.png (gnome-settings.png) From WM Chang: ibus-chewing.png Patch Accepted from: Fred Chien Peng Huang yusake zork@chromium.org hychen Four Dollar Scott Tsai buganini@gmail.com Huei-Horng Yo hiroshiyui ibus-chewing-1.4.10.1-Source/USER-GUIDE000664 001750 001750 00000010772 12266510632 017332 0ustar00dchendchen000000 000000 #summary User Guide for Chewing For the latest version of this document, please see http://code.google.com/p/ibus/wiki/ChewingUserGuide = Introduction = Chewing helps you inputting Chinese by its pronunciation, in the form of either [http://en.wikipedia.org/wiki/Bopomofo Bopomofo/Zhuyin] or [http://en.wikipedia.org/wiki/Pinyin Hanyu pinyin], as well as Chinese punctuation marks and normal and full shape number and English alphabets. For the ease of documentation and readability, following sections assume you are using the default configuration, that is, with default/DaChen Bopomofo keyboard layout, on an en_US keyboard, and default key-binding. = Glossary = Preedit buffer: The places for storing your typing before sending to the applications (such as firefox) you are using. = Mode = Mode determines how Chewing reacts on keyboard input. == Editing mode == This mode is for normal Chinese character and punctuation typing. You are more likely working on this mode. In this mode, alpha-numberic and punctuation marks are interpreted as either Bopomofo symbols or punctuation marks. If the symbols can form Chinese characters, it will choose the most suitable character according to the context in preedit buffer. It's recommend that you enter the whole Chinese sentences, so Chewing can do auto-correction for you. If you like what you see, you can press [Enter] to commit the characters in preedit buffer. If something go wrong, you can select the character by move your cursor using {Left} or {Right}, then press {Down} to enter Candidate Selection mode to choose words. To prevent the auto-correction on certain phrase, you may press {Tab} to break the auto-correction on the end of the sentence. You can also remember the 2,3,4 words phrases by pressing {Ctrl-2}, {Ctrl-3}, and {Ctrl-4} on the end of the phrase. Also note that Shift's behavior changes in this mode. Shift-(alpha number) outputs corresponding Full shape Chinese symbols if "Easy symbol input" is enabled; Or outputs corresponding number half shape lowercase English alphabets if "Easy symbol input" is disabled. Talking about inputing Chinese symbols, other then enable "Easy symbol input" mode, you can also press {Ctrl-1} to open up a symbol selection dialog, select the category, then use {Down} key to choose the symbols as you would do for characters. Hot-keys: ||Caps Lock || Toggle Temporary English sub-mode || ||Down || Enter Candidate Selection mode || ||Shift-Space|| Toggle Half/Full Shape sub-mode || ||Enter || Commit the content in preedit buffer to application || ||Tab || Break the auto-correction. || ||Ctrl-1 || Open symbol selection dialog || ||Ctrl-2 || Remember 2-word phrase. || ||Ctrl-3 || Remember 3-word phrase. || ||Ctrl-4 || Remember 4-word phrase. || === Half/Full Shape sub-mode ==== This sub-mode is for inputing half shape and full shape characters. Half shape characters are essentially normal English characters; while the full shape characters are full-width pretty symbols that resemble English characters. Hot-keys: ||Shift-Space|| Toggle Half/Full Shape sub-mode || === Temporary English sub-mode === This sub-mode is for temporary English inputting. Hot-keys: ||Caps Lock || Toggle Temporary English sub-mode || == Candidate Selection mode == This mode if for Choosing the candidate. Firstly, the longest phrases that fit the pronunciation are shown, then the second shortest, till the single characters. Pressing {Down} again to return to the longest phrases. For example, after entering "w91o3g4". Pressing {Down} makes Chewing displays 3-word candidate "台北市"; pressing {Down} again makes Chewing displays 2-word candidate "北市"; pressing {Down} again makes Chewing displays 1-word candidates "市","是"; pressing {Down} again makes Chewing displays back the 3-word candidates "台北市"; Hot-keys: ||Down || Next bunch of candidates in different length || ||Left || Previous page of candidates || ||Right || Next page of candidates || ||1, 2, ...0 || Select 1st, 2nd, ... 10th candidate || == Bypass mode == This mode is on whenever the preedit buffer is empty. This allows you to use movement keys (such as cursor keys and page up/page down) and popular key binding (Ctrl-A, Ctrl-S). ibus-chewing-1.4.10.1-Source/CMakeLists.txt000664 001750 001750 00000016257 12271206001 020526 0ustar00dchendchen000000 000000 cmake_minimum_required(VERSION 2.6.2) # CMP0011: New: Included scripts do automatic cmake_policy PUSH and POP. # Old: cmake_policy in included script affect the caller. CMAKE_POLICY(SET CMP0011 OLD) # Default CMAKE_INSTALL_PREFIX should be set before PROJECT() SET(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Install dir prefix") # Whether to build on fedora SET(CMAKE_FEDORA_ENABLE_FEDORA_BUILD "0" CACHE STRING "Enable fedora build") # Message level M_OFF (4) SET(MANAGE_MESSAGE_LEVEL 5 CACHE STRING "Message (Verbose) Level") #################################################################### # Project specific information # PROJECT(ibus-chewing) SET(PRJ_SUMMARY "The Chewing engine for IBus input platform") SET(SUMMARY_TRANSLATIONS "zh_TW" "IBus新酷音輸入法") SET(PRJ_DESCRIPTION "IBus-chewing is an IBus front-end of Chewing, an intelligent Chinese input method for Zhuyin (BoPoMoFo) users. It supports various Zhuyin keyboard layout, such as standard (DaChen), IBM, Gin-Yeah, Eten, Eten 26, Hsu, Dvorak, Dvorak-Hsu, and DaChen26. Chewing also support toned Hanyu pinyin input.") SET(DESCRIPTION_TRANSLATIONS "zh_TW" "IBus-chewing 是新酷音輸入法的IBus前端。 新酷音輸入法是個智慧型注音輸入法,支援多種鍵盤布局,諸如: 標準注音鍵盤、IBM、精業、倚天、倚天26鍵、許氏、Dvorak、Dvorak許氏 及大千26鍵。 本輸入法也同時支援帶調漢語拼音輸入。") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") SET(AUTHORS "Peng Huang, Ding-Yi Chen") SET(MAINTAINER "Ding-Yi Chen ") SET(VENDOR "Red Hat, APAC, Inc.") SET(LICENSE "GPLv2+") SET(PRJ_GROUP "System Environment/Libraries") SET(RPM_SPEC_URL "http://code.google.com/p/ibus/") SET(RPM_SPEC_SOURCES "http://ibus.googlecode.com/files/%{name}-%{version}-Source.tar.gz") SET(HAS_TRANSLATION 1) #################################################################### # Includes # SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/Modules ${CMAKE_ROOT}/Modules ${CMAKE_SOURCE_DIR}) # Create a link if Modules/ does not exists IF(EXISTS ${CMAKE_SOURCE_DIR}/cmake-fedora/Modules) IF(NOT EXISTS ${CMAKE_SOURCE_DIR}/Modules) EXECUTE_PROCESS(COMMAND ln -s ${CMAKE_SOURCE_DIR}/cmake-fedora/Modules .) ENDIF(NOT EXISTS ${CMAKE_SOURCE_DIR}/Modules) ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/cmake-fedora/Modules) # Use standard FHS if Fedora build is not enabled IF(NOT CMAKE_FEDORA_ENABLE_FEDORA_BUILD) IF(CMAKE_SYSTEM_PROCESSOR MATCHES "64") SET(LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib64" CACHE PATH "Library dir") ELSE(CMAKE_SYSTEM_PROCESSOR MATCHES "64") SET(LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Library dir") ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES "64") SET(LIBEXEC_DIR "${LIB_DIR}" CACHE PATH "LIBEXEC dir") ENDIF(NOT CMAKE_FEDORA_ENABLE_FEDORA_BUILD) INCLUDE(ManageEnvironment RESULT_VARIABLE MANAGE_ENVIRONMENT_PATH) IF(MANAGE_ENVIRONMENT_PATH STREQUAL "NOTFOUND") MESSAGE(FATAL_ERROR "ManageEnvironment is not found in CMAKE_MODULE_PATH, please: 1) git submodule init; git submodule update 2) or install cmake-fedora/ 3) wget -P SOURCES https://fedorahosted.org/releases/c/m/cmake-fedora/cmake-fedora-modules-only-latest.tar.gz tar zxvf SOURCES/cmake-fedora-modules-only-latest.tar.gz") ENDIF(MANAGE_ENVIRONMENT_PATH STREQUAL "NOTFOUND") MANAGE_CMAKE_POLICY(CMP0017 NEW) INCLUDE(ManageMessage) INCLUDE(ManageVersion) RELEASE_NOTES_READ_FILE() INCLUDE(ManageFile) INCLUDE(ManageSourceVersionControl) INCLUDE(ManageUninstall) INCLUDE(ManageVariable) INCLUDE(ManageDependency) #################################################################### # Dependencies # # Enable GNOME_SHELL support by set the value to 1 SET_COMPILE_ENV(GNOME_SHELL 1 DISPLAY BOOL "Enable GNOME Shell support") IF(IBUS_CHEWING_LOGFILE) ADD_DEFINITIONS(-DIBUS_CHEWING_LOGFILE=${IBUS_CHEWING_LOGFILE}) ENDIF(IBUS_CHEWING_LOGFILE) SET(IBUS_MIN_VER "1.3") SET(CHEWING_MIN_VER "0.3.3") ## Requires MANAGE_DEPENDENCY(REQUIRES GCONF2 REQUIRED FEDORA_NAME "GConf2") MANAGE_DEPENDENCY(REQUIRES GTK2 REQUIRED) MANAGE_DEPENDENCY(REQUIRES IBUS VER "${IBUS_MIN_VER}" REQUIRED) MANAGE_DEPENDENCY(REQUIRES CHEWING VER "${CHEWING_MIN_VER}" REQUIRED FEDORA_NAME "libchewing" ) SET(BUILD_REQUIRES "" CACHE INTERNAL "Build Requires") ## Build requires MANAGE_DEPENDENCY(BUILD_REQUIRES CMAKE VER "2.6.2" REQUIRED) MANAGE_DEPENDENCY(BUILD_REQUIRES GOB2 VER "2.0.16" REQUIRED PROGRAM_NAMES "gob2" ) MANAGE_DEPENDENCY(BUILD_REQUIRES GTK2 REQUIRED PKG_CONFIG "gtk+-2.0" DEVEL ) MANAGE_DEPENDENCY(BUILD_REQUIRES IBUS VER "${IBUS_MIN_VER}" REQUIRED PKG_CONFIG "ibus-1.0" DEVEL ) MANAGE_DEPENDENCY(BUILD_REQUIRES CHEWING VER "${CHEWING_MIN_VER}" REQUIRED PKG_CONFIG "chewing" FEDORA_NAME "libchewing" DEVEL ) MANAGE_DEPENDENCY(BUILD_REQUIRES X11 REQUIRED PKG_CONFIG "x11" FEDORA_NAME "libX11" DEVEL ) MANAGE_DEPENDENCY(BUILD_REQUIRES XTST REQUIRED PKG_CONFIG "xtst" FEDORA_NAME "libXtst" DEVEL ) M_MSG(${M_INFO1} "CHEWING_DATADIR=${CHEWING_DATADIR}") SET_COMPILE_ENV(CHEWING_DATADIR "${CHEWING_DATADIR}" DISPLAY PATH "Chewing data dir") #################################################################### # Building # # Generate chewing.xml SET(SYMBOL_XML "") IF(NOT GNOME_SHELL) SET(SYMBOL_XML "") ENDIF(NOT GNOME_SHELL) SET_COMPILE_ENV(CHEWING_HOTKEYS "Control+space") SET(HOTKEYS_XML "${CHEWING_HOTKEYS}") IF(NOT GNOME_SHELL) SET(HOTKEYS_XML "") ENDIF(NOT GNOME_SHELL) CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/data/chewing.xml.in ${CMAKE_BINARY_DIR}/data/chewing.xml) # Sub directories ADD_SUBDIRECTORY(po) ADD_SUBDIRECTORY(src bin) #################################################################### # Installing # MANAGE_SOURCE_VERSION_CONTROL_GIT() MANAGE_FILE_INSTALL(PRJ_DOC AUTHORS README ChangeLog COPYING USER-GUIDE) MANAGE_FILE_INSTALL(PRJ_DATA icons) MANAGE_FILE_INSTALL(DATA ${CMAKE_BINARY_DIR}/data/chewing.xml DEST_SUBDIR "ibus/component") # Schemas SET(GCONF_SCHEMAS_FILE ${IBUS_CHEWING_SCHEMAS}) INCLUDE(ManageGConf) #################################################################### # Packing # INCLUDE(ManageArchive) # GOB_GENERATED source codes are now excluded, # As Bug 519108 (https://bugzilla.redhat.com/show_bug.cgi?id=519108) # Is fixed from Fedora 11 PACK_SOURCE_ARCHIVE(${RPM_BUILD_SOURCES} GITIGNORE ${CMAKE_SOURCE_DIR}/.gitignore INCLUDE ${PROJECT_NAME}.pot ) INCLUDE(ManageRelease) SET(SOURCE_ARCHIVE_DIR ".") SET(_release_targets "tag_push") IF(CMAKE_FEDORA_ENABLE_FEDORA_BUILD) ADD_SUBDIRECTORY(rpm) LIST(APPEND _releaset_targets "release_fedora") ENDIF(CMAKE_FEDORA_ENABLE_FEDORA_BUILD) IF(DISTRO_ARCH) ADD_SUBDIRECTORY(arch) ENDIF(DISTRO_ARCH) MANAGE_RELEASE(${_release_targets}) ADD_CUSTOM_COMMAND(OUTPUT po/${PROJECT_NAME}.pot COMMAND make pot_file ) ##################################################################### # Hosting Release # #INCLUDE(ManageUpload) #ADD_CUSTOM_TARGET(upload # COMMENT "Uploading all files" # ) #MANAGE_UPLOAD_CMD(scp src UPLOAD_FILES ${SOURCE_ARCHIVE_FILE}) #ADD_DEPENDENCIES(upload upload_src) #################################################################### # Test Suites. # ENABLE_TESTING() ibus-chewing-1.4.10.1-Source/ChangeLog000664 001750 001750 00000033367 12273073311 017551 0ustar00dchendchen000000 000000 * Sat Feb 01 2014 Ding-Yi Chen - 1.4.10.1 - Resolves Bug 1054937 - Broken %defattr in ibus-chewing * Sat Feb 01 2014 Ding-Yi Chen - 1.4.10 - Resolves Bug 1054937 - Broken %defattr in ibus-chewing * Sat Feb 01 2014 Ding-Yi Chen - 1.4.9 - Resolves Bug 1054937 - Broken %defattr in ibus-chewing * Thu Jan 16 2014 Ding-Yi Chen - 1.4.7 - Target "translation" is built separately with all, in order to tame multiple job make. * Thu Jan 16 2014 Ding-Yi Chen - 1.4.6 - Fixed Build for RHEL7 * Wed Jan 15 2014 Ding-Yi Chen - 1.4.5 - Resolves Bug 1013977 - ibus-chewing needs to have ibus write-cache --system in %post and %postun - Resolves Bug 1027031 - CVE-2013-4509 ibus-chewing: ibus: visible password entry flaw [rhel-7.0] - Resolves Bug 1028911 - [zh_TW]'Chinese<->English' switch does not work when clicking on the Chewing menu list. - Resolves Bug 1045868 - ibus-chewing *again* not built with $RPM_OPT_FLAGS - Option "Sync between caps lock and IM": + Default of is changed to "disable", because the previous default "keyboard" cause bug 1028911 for GNOME Shell. + Now Sync from "input method" can control Caps LED in GNOME shell. - Translation added: de_DE, es_ES, it_IT, pt_BR, uk_UA - Set environment IBUS_CHEWING_LOGFILE for ibus-chewing log. * Mon Dec 23 2013 Ding-Yi Chen - 1.4.4 - Resolves Bug 842856 - ibus-chewing 1.4.3-1 not built with $RPM_OPT_FLAGS - Resolves Bug 1027030 - CVE-2013-4509 ibus-chewing: ibus: visible password entry flaw [fedora-all] Thanks czchen for the GitHub pull request 39. - Added translations: fr_FR, ja_JP, ko_KR - Adopt cmake-fedora-1.2.0 * Mon Nov 26 2012 Ding-Yi Chen - 1.4.3 - Fixed GitHub issue #30: Rework decorate_preedit by merging pull request #30 from buganini - Fixed GitHub issue #31: Properly refresh property by merging pull request #31 from buganini * Thu Aug 23 2012 Ding-Yi Chen - 1.4.2 - Fixed GitHub issue #7: highlighted text be cut after switch back to pure ibus by merging pull request #24 from buganini - Fixed GitHub issue #20: Shift key will send duplicated strings by merging pull request #22 from buganini - Fixed GitHub issue #21: somethings wrong with cmake - Fixed GitHub issue #25: Weird symbol when input with somethings highlighted by merging pull request #26 from buganini - Fixed GitHub issue #27: Local path committed into tree - Fixed: Bug 713033 - [zh_TW] ibus-chewing problem - Fixed: Bug 745371 - ibus-chewing: mode confusion In Temporary English mode and Chinese mode later on - Fixed: Google Issue 1172: [ibus-chewing] move elf file to standard directory. - Fixed: Google Issue 1426: ibus-chewing-1.3.10 installs directory /gconf to root filesystem - Fixed: Google Issue 1428: ibus-chewing-1.3.10 fails to save it's settings - Fixed: Google Issue 1481: Some characters are missing when a long string in preedit buffer. - Fixed: Google Issue 1490: Cannot change INSTAL prefix for ibus-chewing-1.4.0 * Mon Jul 23 2012 Ding-Yi Chen - 1.4.0 - Merge pull request #13 from hiroshiyui to Fix wrong data type conversion - Fixed: Google Issue 1079: Use shift key to switch to English mode in ibus-chewing Also list as GitHub pull request #17 - Fixed: Google Issue 1089: Ibus-chewing cause window flicker when compiz enabled - Fixed: Google Issue 1329, Github Issue 3: Merge with buganini at gmail.com - Fixed: Google Issue 1351: ibus-chewing 1.3.10 mistakenly send uncommitted charactor. - Fixed: Google Issue 1374: ibus-chewing: cannot save the preference with gnomeshell - Fixed: Google Issue 1427: ibus-chewing-1.3.10 is not compatible with ibus-1.4.0 and higher Also list as GitHub pull request #16 - Fixed: GitHub Issue 5: Word missing when with libchewing-0.3.3 and ibus-chewing 1.3.10 Also list as GitHub pull request #15 - Fixed: Launchpad bug: 1014456 bus-chewing deletes characters if too many of them are entered Also list as GitHub pull request #19 * Thu Dec 15 2011 - Ding-Yi Chen - 1.3.10 - Fixed Bug 726335 (Google issue 1281)- [abrt] ibus-chewing-1.3.9.2-3.fc15: g_atomic_int_get: Process /usr/libexec/ibus-engine-chewing was killed by signal 11 (SIGSEGV) using patch from Scott Tsai - Fixed Bug 727018 - ibus compose file needs a symbol tag for gnome-shell - Fixed characters duplication problem (Google issue 1245, GitHub ibus-chewing issue 2) - Fixed KP-Enter not been able to commit preedit buffer. (Google issue 1303, GitHub ibus-chewing issue 4) - Depends on cmake-fedora now. - Fixed issue 1274, which is addressed by yusake's comments on d9009bf. - Add compile flag for GNOME3. - Add command line option: showFlags - ibus-gnome special symbol - Thanks Fred Chien's patch against that candidate window cannot be closed with escape key since selected tone. - Thanks Fourdollar's patch for Fix plain zhuyin with space as selection problem. - Remove support for ibus-1.2 and prior. * Fri Nov 19 2010 Ding-Yi Chen - 1.3.9.2 - Fixed Bug 652909 - Added back a Changlog item that mention Nils Philippsen's change. - Apply Jim Huang's patch for zh_TW.po * Fri Nov 12 2010 Ding-Yi Chen - 1.3.8 - Quick fix for f15 and ibus-1.4 build - Version scheme change. * Fri Sep 10 2010 Ding-Yi Chen - 1.3.7.20100910 - Input style of ibus-chewing is decommissioned under ibus >=1.3. Now the input style is determined solely on the setting of "Embed preedit in application window" in IBus. - Resolves: #608991, #632043 - Fixed Issue 1022: chewing commit some text in reset method (patched by Peng Huang). - Fixed Issue 1032: [ibus-chewing] Chewing not commit some single Chinese char into application when press enter. - Rewrite CMake modules to make them cleaner, and documents in cmake module help format. - [For developer and distro maintainer] Various targets changed. Use 'make help' to obtain a list of available targets. * Fri Jul 30 2010 - Ding-Yi Chen - 1.3.6.20100730 - Resolves: #608991 - Sort of fix upstream issue 993. - Include USER-GUIDE - Remove NEWS, as this project does not use it. - Fix upstream Issue 1016: [ibus-chewing] Chewing should commit the complete string before disable chewing. But only for ibus-1.3.0 and later. - Mouse candidate selection now work in plain Zhuyin mode. - Default setting changes: (Won't affect current user though). + Auto move cursor: TRUE + Add phrases in front: TRUE + spaceAsSelection: FALSE * Wed Jul 14 2010 Ding-Yi Chen - 1.3.5.20100714 - Resolves: #608991 - Removes Ctrl-v/V Hotkey * Wed Jul 07 2010 - Ding-Yi Chen - 1.3.5.20100706 - Fixed google issue 965: Candidate missing if both "Plain Zhuyin" and "Space As selection" are enabled. - Revised Basic.macro - Resolved: #608991 * Tue Jun 08 2010 - Ding-Yi Chen - 1.3.4.20100608 - ibus-chewing can now use mouse to click on mouse. Thus Fix Issue 951: Chewing does not support selection of candidates via mouseclick Thanks zork@chromium.org for the patch. * Fri Jun 04 2010 - Ding-Yi Chen - 1.3.4.20100605 - Fix Issue 942: Fix unsunk references in ibus-chewing Applied the patch provided by zork@chromium.org. - Rename CVS_DIST_TAGS to FEDORA_DIST_TAGS, and move its definition to cmake_modules/ - Gob2 generated file is now removed, because Bug 519108 is fixed from Fedora 11. * Wed Mar 17 2010 - Ding-Yi Chen - 1.2.99.20100317 - Fix google 796: English input for dvorak - Fix google 797: Zhuyin input for dvorak - Fix google 807: ibus-chewing shows the over-the-spot panel even when not necessary * Fri Feb 19 2010 - Ding-Yi Chen - 1.2.99.20100217 - Fixed the CMake description that leads summary incorrect. * Tue Feb 16 2010 - Ding-Yi Chen - 1.2.99.20100216 - Fixed when typing English immediately after incomplete Chinese character. - Add zh_TW summary. - Revised description and write its zh_TW translation. * Tue Feb 16 2010 - Ding-Yi Chen - 1.2.99.20100215 - "Macroize" rpm spec. - Resolves: #565388 * Fri Feb 12 2010 - Ding-Yi Chen - 1.2.99.20100212 - Fixed Google issue 505. - Google issue 755 is fixed in libchewing-0.3.2-22, See Chewing Google issue 10 - Fixed behavior of Del, Backspace, Home, End - Revert the change that fix Google issue 758. - Change the default input style to "in candidate window", because not all application handle the on-the-spot mode well. - Fixed Google issue 776 * Tue Feb 09 2010 - Ding-Yi Chen - 1.2.0.20100210 - Revert the change that fix Google issue 758. - Remove "tag" target, add "commit" which do commit and tag. * Tue Feb 09 2010 - Ding-Yi Chen - 1.2.0.20100209 - Fixed Google issue 754: commit string is missing when inputting long English text in the end. - Fixed Google issue 758: Space is irresponsive in Temporary English mode if no Chinese in preedit buffer. - Fixed Google Issue 763: [ibus-chewing] [qt] Shift-Up/Down does not mark text area properly. - Change the String "on the spot" to "in application window", Chinese translation change to "在輸入處組詞" - Change the "over the spot" to "in candidate window", Chinese translation remain the same - Fixed bodhi submission. * Mon Jan 25 2010 - Ding-Yi Chen - 1.2.0.20100125 - Add over-the-spot editing mode. - Possible fixed of Google issue 505: ibus acts strange in Qt programs. - Implemented Google issue 738: Add a mode that allow editing in candidate window (thus over-the-spot mode). * Fri Dec 11 2009 - Ding-Yi Chen - 1.2.0.20091211 - Fix Google issue 608: ibus-chewing does not show cursor in xim mode. - Fix Google issue 611: ibus-chewing keyboard setting reverts to default unexpectlly. - Fix Google issue 660: failed to build with binutils-gold. - Remove make target commit. - Add make target tag * Fri Oct 02 2009 - Ding-Yi Chen - 1.2.0.20091002 - Bug 518901 - ibus-chewing would not work with locale zh_TW.Big - Fix Google issue 501: ibus-chewing buffer doesn't get cleared when toggling ibus on/off - Fix Google issue 502: ibus-chewing: character selection window stays behind when toggling ibus off- Use WM's revised ibus-chewing icon. - Debug output now marked with levels. * Thu Sep 17 2009 - Ding-Yi Chen - 1.2.0.20090917 - Addressed Upstream (IBUS Google code) issue 484: + Find the source that why the / and . are not working. - Pack the gob2 generation source to avoid the [Bug 519108]: [gob2] class and enum names convert incorrectly in mock / koji. * Wed Sep 09 2009 - Ding-Yi Chen - 1.2.0.20090831 - IBusProperty and IBusPropList are free upon destruction. - Fixed Red Hat Bugzilla [Bug 519328] [ibus-chewing] inconsistent between normal mode and plain Zhuyin mode. - Addressed Upstream (IBUS Google code) issue 484: Arithmetic symbols (+-*/) on number pad does not input properly. * Wed Aug 26 2009 - Ding-Yi Chen - 1.2.0.20090818 - Merged 1.2 and 1.1 source code. - Addressed Upstream (IBUS Google code) issue 471. - Remove libX11 dependency. * Mon Aug 17 2009 - Ding-Yi Chen - 1.2.0.20090624 - Lookup table now shows the selection key. * Mon Jun 22 2009 - Ding-Yi Chen - 1.2.0.20090622 - For IBus 1.2 - Revised dialog look. * Fri May 22 2009 - Ding-Yi Chen - 1.0.10.20090523 - Applied Lubomir Rintel's patch * Fri May 22 2009 - Ding-Yi Chen - 1.0.10.20090522 - Now the 1st down key brings the longest possible phrases. The 2nd down key brings the 2nd longest possible phrases from the back, unlike the previous versions where the cursor stays in the head of longest phrase. - Add force lowercase in English mode option. - Fix double free issue when destroy ibus-chewing. - Hide ibus-chewing-panel when ibus-chewing is focus-out * Mon May 11 2009 - Ding-Yi Chen - 1.0.9.20090508 Now commit is forced when switch of ibus-chewing or current application loses focus. - New ibus-chewing.png is contribute by WM. - input-keyboard.png is no longer needed and removed. - ibus-engine-chewing -v option now need an integer as verbose level. - ibus-chewing.schemas is now generated. - Fix some CMake modules bugs. * Tue Apr 28 2009 - Ding-Yi Chen - 1.0.8.20090428 Fix the errors which Funda Wang as pointing out: - Move src/chewing.xml.in to data/ - Fixed some typo in next_version targets. - Remove GConf2 package requirement, while add gconftool-2 requirement. * Mon Mar 30 2009 - Ding-Yi Chen - 1.0.5.20090330 - Added tooltips. - Revealed the sync caps lock setting. - Fixed Right key bug. - Added CMake policy 0011 as OLD. * Mon Mar 23 2009 Ding-Yi Chen - 1.0.4.20090323 - Various Settings are now in dialog. - Integer settings are now revealed. - MakerDialog.gob is now available. - Work around of easy symbol input. - Fix iBus Google issue 310. * Wed Mar 11 2009 Ding-Yi Chen - 1.0.3.20090311 - IBus Google issue 305: ibus-chewing.schema -> ibus-chewing.schemas - IBus Google issue 307: hardcoded chewing datadir - Sync chewing candPerPage and IBusTable->page_size - Sync between IM and keyboard (Experimental) * Tue Mar 03 2009 Ding-Yi Chen - 1.0.2.20090303 - Required gconf2 -> GConf2. - Fix RPM scriptlet. * Fri Feb 27 2009 Ding-Yi Chen - 1.0.1.20090227 - Add gconf schema. - Fix some memory leaking checked. - Move some function to cmake_modules. - Fix Google code issue 281 * Fri Feb 20 2009 - Ding-Yi Chen - 1.0.0.20090220 - This is a barely working version for with IBus C. - The build system is converted from autotool to CMake.ibus-chewing-1.4.10.1-Source/.gitmodules000664 001750 001750 00000000150 12266510632 020140 0ustar00dchendchen000000 000000 [submodule "cmake-fedora"] path = cmake-fedora url = http://git.fedorahosted.org/git/cmake-fedora.git