├── COPYING ├── debian ├── changelog ├── compat ├── control ├── copyright ├── install ├── maintscript ├── rules └── source │ └── format ├── generate_desktop_files ├── makepot ├── mintlocale.pot ├── test ├── test-im └── usr ├── bin ├── add-remove-locales ├── mintlocale ├── mintlocale-im └── set-default-locale ├── lib └── linuxmint │ └── mintlocale │ ├── ImConfig │ ├── ImConfig.py │ └── __init__.py │ ├── add.py │ ├── im.py │ ├── install_remove.py │ └── mintlocale.py └── share ├── applications ├── mintlocale-im.desktop └── mintlocale.desktop ├── icons └── hicolor │ ├── 16x16 │ └── apps │ │ └── mintlocale-im.png │ ├── 22x22 │ └── apps │ │ └── mintlocale-im.png │ ├── 24x24 │ └── apps │ │ └── mintlocale-im.png │ ├── 32x32 │ └── apps │ │ └── mintlocale-im.png │ ├── 48x48 │ └── apps │ │ └── mintlocale-im.png │ └── 96x96 │ └── apps │ └── mintlocale-im.svg ├── linuxmint ├── adjustments │ └── 15-mintlocale.menu └── mintlocale │ ├── add.ui │ ├── countries │ ├── data │ └── pkg_depends │ ├── im.ui │ ├── iminfo │ ├── fcitx.info │ ├── ibus.info │ ├── locale │ │ ├── ja.info │ │ ├── ko.info │ │ ├── te.info │ │ ├── th.info │ │ ├── vi.info │ │ ├── zh-hans.info │ │ └── zh-hant.info │ └── uim.info │ ├── install_remove.ui │ ├── language_packs │ ├── languages │ ├── mintlocale.ui │ └── templates │ ├── default_locale.template │ ├── lightdm_pam_environment.template │ └── mdm_pam_environment.template └── polkit-1 └── actions └── com.linuxmint.mintlocale.policy /COPYING: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | mintlocale (1.6.4) xia; urgency=medium 2 | 3 | * Skip hunspell-de-xx, prefer hunspell-de-xx-frami 4 | 5 | -- Clement Lefebvre Mon, 25 Nov 2024 13:03:18 +0000 6 | 7 | mintlocale (1.6.3) xia; urgency=medium 8 | 9 | * Port to AptKit 10 | 11 | -- Clement Lefebvre Mon, 25 Nov 2024 12:30:08 +0000 12 | 13 | mintlocale (1.6.2) wilma; urgency=medium 14 | 15 | [ Michael Webster ] 16 | * polkit: Remove restrictions for remote/non-active sessions. 17 | 18 | -- Clement Lefebvre Tue, 11 Jun 2024 14:29:59 +0100 19 | 20 | mintlocale (1.6.1) wilma; urgency=medium 21 | 22 | * Provide a data/pkg_depends for check-language-support. 23 | * Update language_packs info 24 | 25 | -- Clement Lefebvre Thu, 29 Feb 2024 14:13:14 +0000 26 | 27 | mintlocale (1.6.0) wilma; urgency=medium 28 | 29 | * Use /etc/locale.conf if it exists 30 | 31 | -- Clement Lefebvre Wed, 28 Feb 2024 15:52:35 +0000 32 | 33 | mintlocale (1.5.9) virginia; urgency=medium 34 | 35 | * langpacks: Remove openoffice.org-hyphenation 36 | 37 | -- Clement Lefebvre Tue, 09 Jan 2024 09:26:57 +0000 38 | 39 | mintlocale (1.5.8) uma; urgency=medium 40 | 41 | [ Vincent Vermeulen ] 42 | * Update countries - North Macedonia 43 | 44 | -- Clement Lefebvre Wed, 26 May 2021 13:43:30 +0100 45 | 46 | mintlocale (1.5.7) ulyana; urgency=medium 47 | 48 | * Exit and warn when the locale archive isn't present 49 | 50 | -- Clement Lefebvre Thu, 05 Nov 2020 10:26:30 +0000 51 | 52 | mintlocale (1.5.6) ulyana; urgency=medium 53 | 54 | [ okaestne ] 55 | * fix DeprecationWarnings 56 | 57 | [ Clement Lefebvre ] 58 | * Packages: Remove chromium-browser 59 | 60 | -- Clement Lefebvre Thu, 05 Nov 2020 10:03:45 +0000 61 | 62 | mintlocale (1.5.5) ulyana; urgency=medium 63 | 64 | * Remove connection to AC changed signal 65 | * l10n: Generate files 66 | 67 | -- Clement Lefebvre Wed, 13 May 2020 15:44:29 +0100 68 | 69 | mintlocale (1.5.4) debbie; urgency=medium 70 | 71 | [ Michael Webster ] 72 | * mintlocale.py: Fix signal name typo. 73 | 74 | [ Clement Lefebvre ] 75 | * Only show UTF-8 locales 76 | 77 | -- Clement Lefebvre Tue, 21 Jan 2020 10:13:25 +0000 78 | 79 | mintlocale (1.5.3) tricia; urgency=medium 80 | 81 | [ Clement Lefebvre ] 82 | * Add support for LC_TIME configuration 83 | * Fix flags in HiDPI 84 | * Fix flags in HiDPI in add/remove windows 85 | * Set variables in ~.xsessionrc 86 | 87 | [ JosephMcc ] 88 | * ui: Fix a small label spacing issues (#70) 89 | 90 | [ Clement Lefebvre ] 91 | * l10n: Update POT 92 | 93 | -- Clement Lefebvre Wed, 13 Nov 2019 13:08:24 +0100 94 | 95 | mintlocale (1.5.2) tina; urgency=medium 96 | 97 | [ gm10 ] 98 | * Switch to mintcommon v2 and remove unused imports (#66) 99 | 100 | [ Clement Lefebvre ] 101 | * set-default-locale: Use templates instead of sed 102 | * l10n: Generate files 103 | 104 | -- Clement Lefebvre Sun, 30 Jun 2019 15:25:43 +0200 105 | 106 | mintlocale (1.5.1) tessa; urgency=medium 107 | 108 | * Add support for Kabyle 109 | 110 | -- Clement Lefebvre Tue, 11 Dec 2018 17:23:20 +0000 111 | 112 | mintlocale (1.5.0) tessa; urgency=medium 113 | 114 | * Rewrite IM tool 115 | * Remove IM from mintlocale.py 116 | * Remove section header 117 | * Fcitx: Drop Qimpanel UI 118 | * IM: Generate POT and rephrase a few msgids 119 | 120 | -- Clement Lefebvre Fri, 21 Sep 2018 13:09:11 +0100 121 | 122 | mintlocale (1.4.9) tara; urgency=medium 123 | 124 | * Provide app icon for mintlocale-im 125 | 126 | -- Clement Lefebvre Mon, 18 Jun 2018 10:02:40 +0200 127 | 128 | mintlocale (1.4.8) tara; urgency=medium 129 | 130 | [ Clement Lefebvre ] 131 | * Use mint-common to generate polkit policy 132 | 133 | [ monsta ] 134 | * fix runtime dependencies (#59) 135 | 136 | [ Clement Lefebvre ] 137 | * Fix missing UI icon in MATE/Xfce 138 | 139 | -- Clement Lefebvre Thu, 07 Jun 2018 12:43:25 +0100 140 | 141 | mintlocale (1.4.7) tara; urgency=medium 142 | 143 | [ monsta ] 144 | * properly clean obsolete adjustments file from /etc (#58) 145 | 146 | [ Clement Lefebvre ] 147 | * Add messages in polkit policies 148 | 149 | -- Clement Lefebvre Wed, 30 May 2018 17:08:29 +0100 150 | 151 | mintlocale (1.4.6) tara; urgency=medium 152 | 153 | [ monsta ] 154 | * depend on python3 as migration is already done (#57) 155 | 156 | [ Clement Lefebvre ] 157 | * Fix adjustments 158 | 159 | -- Clement Lefebvre Wed, 30 May 2018 12:23:45 +0100 160 | 161 | mintlocale (1.4.5) tara; urgency=medium 162 | 163 | [ Vincent Vermeulen ] 164 | * Show sorted locales in language and region picker (#51) 165 | 166 | [ JosephMcc ] 167 | * mintlocale.py: Remove some broken and hardcoded theming (#53) 168 | * Stop using stock buttons (#52) 169 | 170 | [ Clement Lefebvre ] 171 | * Switch from synaptic to mint-common's APTDaemon 172 | * Migrate to Pkexec 173 | * Aptdaemon: Differentiate between finished/cancelled callbacks 174 | * l10n: Update files 175 | 176 | -- Clement Lefebvre Mon, 07 May 2018 12:13:33 +0100 177 | 178 | mintlocale (1.4.4) sylvia; urgency=medium 179 | 180 | [ Michael Webster ] 181 | * install_remove.py: Use xapp to set an icon name for the window. 182 | 183 | [ NikoKrause ] 184 | * add missing file to makepot and update translation template (#46) 185 | 186 | [ Clement Lefebvre ] 187 | * Synaptic: Don't specify string messages 188 | * IM: Fix confusion between None and XIM 189 | * Synaptic: Don't specify progress strings 190 | 191 | [ Michael Webster ] 192 | * install_remove: Use an XAppGtkWindow from the builder file. 193 | 194 | [ Troy Curtis ] 195 | * Transition python2 scripts to python3. (#49) 196 | 197 | [ Clement Lefebvre ] 198 | * l10n: Update POT file 199 | 200 | -- Clement Lefebvre Thu, 26 Oct 2017 13:25:11 +0100 201 | 202 | mintlocale (1.4.3) sonya; urgency=medium 203 | 204 | [ Björn Esser ] 205 | * locale_path must be declared first (#45) 206 | 207 | -- Clement Lefebvre Fri, 12 May 2017 15:28:50 +0100 208 | 209 | mintlocale (1.4.2) sonya; urgency=medium 210 | 211 | [ Björn Esser ] 212 | * Changes for red hat based OS (#44) 213 | 214 | -- Clement Lefebvre Sun, 07 May 2017 16:49:41 +0100 215 | 216 | mintlocale (1.4.1) sonya; urgency=medium 217 | 218 | * l10n: Generate desktop files 219 | * Don't show IM section if Imconfig.available() returns FALSE 220 | * Don't show APT features in non-Debian derivatives 221 | 222 | -- Clement Lefebvre Sun, 07 May 2017 12:50:20 +0100 223 | 224 | mintlocale (1.4.0) sonya; urgency=medium 225 | 226 | * Improve support for LightDM 227 | 228 | -- Clement Lefebvre Mon, 27 Mar 2017 13:22:13 +0100 229 | 230 | mintlocale (1.3.9) serena; urgency=medium 231 | 232 | * Remove debug print statement 233 | * Fix gtk.gdk.X11Window has no attribute get_xid in LMDE 234 | 235 | -- Clement Lefebvre Tue, 03 Jan 2017 14:23:43 +0000 236 | 237 | mintlocale (1.3.8) serena; urgency=medium 238 | 239 | * IM: Redesigned IM support 240 | * Fix firefox/thunderbird localization in LMDE 241 | * Fixed #31 242 | * Fixed #40 243 | * Moved the list of support packages to a file 244 | * Suggest k3b-i18n when k3b is installed 245 | * HiDPI flags 246 | 247 | -- Clement Lefebvre Wed, 02 Nov 2016 14:35:30 +0000 248 | 249 | mintlocale (1.3.7) sarah; urgency=medium 250 | 251 | * Fixed imconfig -m not being parsed correctly in Mint 18 252 | 253 | -- Clement Lefebvre Wed, 15 Jun 2016 10:17:56 +0100 254 | 255 | mintlocale (1.3.6) sarah; urgency=medium 256 | 257 | * Added fcitx-config-gtk2 to list of fcitx required packages 258 | 259 | -- Clement Lefebvre Tue, 14 Jun 2016 17:01:59 +0100 260 | 261 | mintlocale (1.3.5) sarah; urgency=medium 262 | 263 | * Fixed applying locale system-wide (regression during dev. cycle) 264 | 265 | -- Clement Lefebvre Mon, 13 Jun 2016 16:16:34 +0100 266 | 267 | mintlocale (1.3.4) sarah; urgency=medium 268 | 269 | [ Daniel Alley ] 270 | * Moved non-code from usr/lib to usr/share 271 | * Fixes for Mint 18 (remain compatible with Mint 17) 272 | 273 | -- Clement Lefebvre Fri, 13 May 2016 10:24:45 +0100 274 | 275 | mintlocale (1.3.3) sarah; urgency=medium 276 | 277 | [ Daniel Alley ] 278 | * Moved ui files from /usr/lib to /usr/share 279 | * Formatting 280 | * Removed dh-python from the build process & formatted control file 281 | * Renamed folders from camelCase to lowercase 282 | 283 | [ Clement Lefebvre ] 284 | * Updated generated files 285 | 286 | -- Clement Lefebvre Fri, 22 Apr 2016 12:27:22 +0100 287 | 288 | mintlocale (1.3.2) sarah; urgency=medium 289 | 290 | * Reviewed shebangs, removed trailing spaces, simplified imports 291 | 292 | -- Clement Lefebvre Fri, 19 Feb 2016 12:16:53 +0000 293 | 294 | mintlocale (1.3.1) rosa; urgency=medium 295 | 296 | * Fixed a few issues in iminfo 297 | * Tuned IM info for Korean 298 | * Partially tuned IM info for Chinese (need more info from a Chinese user...) 299 | * IM: Added lists for Thai and Vietnamese 300 | 301 | -- Clement Lefebvre Thu, 26 Nov 2015 19:52:59 +0000 302 | 303 | mintlocale (1.3.0) rosa; urgency=medium 304 | 305 | * IM: Hide button when everything is installed for a particular IM 306 | 307 | -- Clement Lefebvre Thu, 26 Nov 2015 13:55:13 +0000 308 | 309 | mintlocale (1.2.9) rosa; urgency=medium 310 | 311 | * Added missing etc/linuxmint/adjustments/15-mintlocale.menu 312 | 313 | -- Clement Lefebvre Sat, 14 Nov 2015 18:26:04 +0000 314 | 315 | mintlocale (1.2.8) rosa; urgency=medium 316 | 317 | [ leigh123linux ] 318 | * fix gi import version 319 | 320 | [ Clement Lefebvre ] 321 | * Removed trailing spaces 322 | * Let users launch mintlocale in IM mode 323 | * Explicitly set python shebangs 324 | * Updated desktop files 325 | 326 | -- Clement Lefebvre Fri, 06 Nov 2015 16:04:54 +0000 327 | 328 | mintlocale (1.2.7) rafaela; urgency=medium 329 | 330 | * Added memu item to Xfce settings 331 | 332 | -- Clement Lefebvre Thu, 09 Jul 2015 13:44:46 +0200 333 | 334 | mintlocale (1.2.6) rafaela; urgency=medium 335 | 336 | [ Asier Iturralde Sarasola ] 337 | * Use flags of minority languages 338 | 339 | -- Clement Lefebvre Sat, 13 Jun 2015 10:15:54 +0200 340 | 341 | mintlocale (1.2.5) rafaela; urgency=medium 342 | 343 | [ Philippe Jandot ] 344 | * Generated /etc/default/locale and .pam_environment must be not have double quote in the variables assignement 345 | 346 | -- Clement Lefebvre Thu, 11 Jun 2015 09:43:55 +0200 347 | 348 | mintlocale (1.2.4) rafaela; urgency=medium 349 | 350 | [ JosephMcc ] 351 | * Revamp the UI 352 | 353 | -- Clement Lefebvre Tue, 09 Jun 2015 11:37:17 +0200 354 | 355 | mintlocale (1.2.3) rafaela; urgency=medium 356 | 357 | [ Yikei Lu ] 358 | * Separate im.info by languages 359 | 360 | [ Clement Lefebvre ] 361 | * Load im info in a different thread (it was making mintlocale slow to start) 362 | 363 | -- Clement Lefebvre Mon, 08 Jun 2015 14:40:56 +0200 364 | 365 | mintlocale (1.2.2) betsy; urgency=medium 366 | 367 | * Replace utf8 with UTF-8 in current language/region (workaround LightDM GTK greeter messing up locale in .dmrc and accountservice) 368 | 369 | -- Clement Lefebvre Thu, 05 Mar 2015 16:59:49 +0100 370 | 371 | mintlocale (1.2.1) rebecca; urgency=medium 372 | 373 | * Added gcin support 374 | * Fix cases where LC_NUMERIC isn't set or when .pam_environment doesn't exist 375 | * Added dep on im-config (require 0.23-1+ to use the -m argument) 376 | * Added support for non-UTF8 locales 377 | 378 | -- Clement Lefebvre Sat, 25 Oct 2014 17:03:26 +0200 379 | 380 | mintlocale (1.2.0) rebecca; urgency=medium 381 | 382 | * Small bug fix 383 | 384 | -- Clement Lefebvre Thu, 23 Oct 2014 23:18:59 +0200 385 | 386 | mintlocale (1.1.9) rebecca; urgency=medium 387 | 388 | * New UI 389 | * Added support for Input Methods 390 | 391 | -- Clement Lefebvre Thu, 23 Oct 2014 22:55:14 +0200 392 | 393 | mintlocale (1.1.8) rebecca; urgency=medium 394 | 395 | * Fix small typo: dictionnaries -> dictionaries 396 | * Don't write to /var/lib/locales/supported.d if it doesn't exist (in LMDE for instance) 397 | 398 | -- Clement Lefebvre Tue, 30 Sep 2014 13:02:31 +0200 399 | 400 | mintlocale (1.1.7) qiana; urgency=medium 401 | 402 | * Fixed mintlocale not starting in certain languages 403 | 404 | -- Clement Lefebvre Fri, 06 Jun 2014 13:36:24 +0100 405 | 406 | mintlocale (1.1.6) qiana; urgency=medium 407 | 408 | * Updated desktop file 409 | 410 | -- Clement Lefebvre Tue, 27 May 2014 10:57:37 +0100 411 | 412 | mintlocale (1.1.5) qiana; urgency=medium 413 | 414 | * Improved keyboard navigation 415 | 416 | -- Clement Lefebvre Wed, 21 May 2014 13:54:00 +0100 417 | 418 | mintlocale (1.1.4) qiana; urgency=medium 419 | 420 | * Improved l10n 421 | 422 | -- Clement Lefebvre Tue, 20 May 2014 11:25:18 +0100 423 | 424 | mintlocale (1.1.3) qiana; urgency=medium 425 | 426 | * Updated desktop file 427 | 428 | -- Clement Lefebvre Sun, 04 May 2014 13:32:11 +0100 429 | 430 | mintlocale (1.1.2) qiana; urgency=medium 431 | 432 | * UI fix for Qiana 433 | * Added gir1.2-accountsservice-1.0 to the deps 434 | * Added dependency on synaptic 435 | * Compatibility with GTK+ 3.4: removed setting the model value to None 436 | 437 | -- Clement Lefebvre Mon, 14 Apr 2014 13:11:49 +0100 438 | 439 | mintlocale (1.1) debian; urgency=low 440 | 441 | * Bug fixes 442 | 443 | -- Clement Lefebvre Fri, 14 Mar 2014 14:16:35 +0000 444 | 445 | mintlocale (1.0) petra; urgency=low 446 | 447 | * Initial release 448 | 449 | -- Clement Lefebvre Mon, 17 Feb 2014 11:37:00 +0000 450 | 451 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: mintlocale 2 | Section: admin 3 | Priority: optional 4 | Maintainer: Clement Lefebvre 5 | Build-Depends: debhelper (>= 9) 6 | Standards-Version: 3.9.5 7 | 8 | Package: mintlocale 9 | Architecture: all 10 | Depends: python3, 11 | python3-gi, 12 | aptkit, 13 | gir1.2-accountsservice-1.0, 14 | gir1.2-gdkpixbuf-2.0, 15 | gir1.2-glib-2.0, 16 | gir1.2-gtk-3.0, 17 | gir1.2-xapp-1.0, 18 | im-config (>= 0.23-1), 19 | iso-flag-png, 20 | ${misc:Depends} 21 | Description: Language selection tool 22 | Locale selection. 23 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: mintlocale 3 | Upstream-Contact: Clement Lefebvre 4 | Source: https://github.com/linuxmint/mintlocale 5 | 6 | Files: * 7 | Copyright: 2014 Clement Lefebvre 8 | License: GPL-2+ 9 | This program is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation; either version 2 of the License, or 12 | (at your option) any later version. 13 | . 14 | This program is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | . 19 | On Debian systems, the complete text of the GNU General 20 | Public License can be found in `/usr/share/common-licenses/GPL'. 21 | -------------------------------------------------------------------------------- /debian/install: -------------------------------------------------------------------------------- 1 | usr 2 | -------------------------------------------------------------------------------- /debian/maintscript: -------------------------------------------------------------------------------- 1 | rm_conffile /etc/linuxmint/adjustments/15-mintlocale.menu 1.4.7~ 2 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | %: 4 | dh ${@} -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /generate_desktop_files: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | DOMAIN = "mintlocale" 4 | PATH = "/usr/share/linuxmint/locale" 5 | 6 | import os 7 | import gettext 8 | import mintcommon.additionalfiles as additionalfiles 9 | 10 | os.environ['LANGUAGE'] = "en_US.UTF-8" 11 | gettext.install(DOMAIN, PATH) 12 | 13 | prefix = "[Desktop Entry]\n" 14 | 15 | suffix = """Exec=mintlocale 16 | Icon=preferences-desktop-locale 17 | Terminal=false 18 | Type=Application 19 | Encoding=UTF-8 20 | Categories=GNOME;GTK;Settings;DesktopSettings;XFCE;X-XFCE-SettingsDialog;X-XFCE-SystemSettings; 21 | StartupNotify=false 22 | """ 23 | 24 | additionalfiles.generate(DOMAIN, PATH, "usr/share/applications/mintlocale.desktop", prefix, _("Languages"), _("Language settings"), suffix) 25 | 26 | prefix = "[Desktop Entry]\n" 27 | 28 | suffix = """Exec=mintlocale-im 29 | Icon=mintlocale-im 30 | Terminal=false 31 | Type=Application 32 | Encoding=UTF-8 33 | Categories=GNOME;GTK;Settings;DesktopSettings;XFCE;X-XFCE-SettingsDialog;X-XFCE-SystemSettings; 34 | StartupNotify=false 35 | """ 36 | 37 | additionalfiles.generate(DOMAIN, PATH, "usr/share/applications/mintlocale-im.desktop", prefix, _("Input method"), _("Language settings"), suffix) 38 | 39 | prefix = """ 40 | 43 | 44 | 45 | Linux Mint 46 | https://linuxmint.com/ 47 | 48 | 49 | preferences-desktop-locale 50 | """ 51 | 52 | suffix=""" 53 | 54 | no 55 | no 56 | auth_admin_keep 57 | 58 | /usr/bin/add-remove-locales 59 | true 60 | 61 | """ 62 | 63 | additionalfiles.generate_polkit_policy(DOMAIN, PATH, "usr/share/polkit-1/actions/com.linuxmint.mintlocale.policy", prefix, _("Languages"), suffix) 64 | 65 | 66 | prefix=""" 67 | 68 | preferences-desktop-locale 69 | """ 70 | 71 | suffix=""" 72 | 73 | no 74 | no 75 | auth_admin_keep 76 | 77 | /usr/bin/set-default-locale 78 | false 79 | 80 | 81 | 82 | """ 83 | 84 | additionalfiles.generate_polkit_policy(DOMAIN, PATH, "usr/share/polkit-1/actions/com.linuxmint.mintlocale.policy", prefix, _("Languages"), suffix, append=True) 85 | -------------------------------------------------------------------------------- /makepot: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | intltool-extract --type=gettext/glade usr/share/linuxmint/mintlocale/mintlocale.ui 3 | intltool-extract --type=gettext/glade usr/share/linuxmint/mintlocale/install_remove.ui 4 | intltool-extract --type=gettext/glade usr/share/linuxmint/mintlocale/add.ui 5 | intltool-extract --type=gettext/glade usr/share/linuxmint/mintlocale/im.ui 6 | xgettext --language=Python --keyword=_ --keyword=N_ --output=mintlocale.pot usr/lib/linuxmint/mintlocale/*.py usr/share/linuxmint/mintlocale/*.ui.h generate_desktop_files 7 | rm -f usr/share/linuxmint/mintlocale/*.ui.h 8 | -------------------------------------------------------------------------------- /mintlocale.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: PACKAGE VERSION\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2019-11-13 13:07+0100\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=CHARSET\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" 20 | 21 | #: usr/lib/linuxmint/mintlocale/add.py:43 22 | msgid "Add a New Language" 23 | msgstr "" 24 | 25 | #: usr/lib/linuxmint/mintlocale/im.py:91 26 | msgid "Already installed" 27 | msgstr "" 28 | 29 | #: usr/lib/linuxmint/mintlocale/im.py:118 30 | msgid "Input Method" 31 | msgstr "" 32 | 33 | #: usr/lib/linuxmint/mintlocale/im.py:188 34 | msgid "XIM" 35 | msgstr "" 36 | 37 | #: usr/lib/linuxmint/mintlocale/im.py:191 38 | msgid "None" 39 | msgstr "" 40 | 41 | #: usr/lib/linuxmint/mintlocale/install_remove.py:71 42 | msgid "Install / Remove Languages" 43 | msgstr "" 44 | 45 | #: usr/lib/linuxmint/mintlocale/install_remove.py:217 46 | msgid "Some language packs are missing" 47 | msgstr "" 48 | 49 | #: usr/lib/linuxmint/mintlocale/install_remove.py:221 50 | msgid "Fully installed" 51 | msgstr "" 52 | 53 | #: usr/lib/linuxmint/mintlocale/mintlocale.py:311 54 | msgid "Language Settings" 55 | msgstr "" 56 | 57 | #: usr/lib/linuxmint/mintlocale/mintlocale.py:332 58 | msgid "Apply System-Wide" 59 | msgstr "" 60 | 61 | #: usr/lib/linuxmint/mintlocale/mintlocale.py:337 62 | msgid "Install / Remove Languages..." 63 | msgstr "" 64 | 65 | #: usr/lib/linuxmint/mintlocale/mintlocale.py:350 66 | msgid "Language" 67 | msgstr "" 68 | 69 | #: usr/lib/linuxmint/mintlocale/mintlocale.py:350 70 | msgid "Language, interface..." 71 | msgstr "" 72 | 73 | #: usr/lib/linuxmint/mintlocale/mintlocale.py:355 74 | msgid "Region" 75 | msgstr "" 76 | 77 | #: usr/lib/linuxmint/mintlocale/mintlocale.py:355 78 | msgid "Numbers, currency, addresses, measurement..." 79 | msgstr "" 80 | 81 | #: usr/lib/linuxmint/mintlocale/mintlocale.py:360 82 | msgid "Time format" 83 | msgstr "" 84 | 85 | #: usr/lib/linuxmint/mintlocale/mintlocale.py:360 86 | msgid "Date and time..." 87 | msgstr "" 88 | 89 | #: usr/lib/linuxmint/mintlocale/mintlocale.py:477 90 | #: usr/lib/linuxmint/mintlocale/mintlocale.py:478 91 | #: usr/lib/linuxmint/mintlocale/mintlocale.py:479 92 | msgid "No locale defined" 93 | msgstr "" 94 | 95 | #: usr/lib/linuxmint/mintlocale/mintlocale.py:566 96 | msgid "Language:" 97 | msgstr "" 98 | 99 | #: usr/lib/linuxmint/mintlocale/mintlocale.py:567 100 | msgid "Region:" 101 | msgstr "" 102 | 103 | #: usr/lib/linuxmint/mintlocale/mintlocale.py:568 104 | msgid "Time format:" 105 | msgstr "" 106 | 107 | #: usr/lib/linuxmint/mintlocale/mintlocale.py:569 108 | msgid "System locale" 109 | msgstr "" 110 | 111 | #: usr/lib/linuxmint/mintlocale/mintlocale.py:573 112 | msgid "Language support" 113 | msgstr "" 114 | 115 | #: usr/lib/linuxmint/mintlocale/mintlocale.py:573 116 | #, python-format 117 | msgid "%d language installed" 118 | msgid_plural "%d languages installed" 119 | msgstr[0] "" 120 | msgstr[1] "" 121 | 122 | #: usr/share/linuxmint/mintlocale/add.ui.h:1 123 | msgid "Cancel" 124 | msgstr "" 125 | 126 | #: usr/share/linuxmint/mintlocale/add.ui.h:2 127 | #: usr/share/linuxmint/mintlocale/im.ui.h:8 128 | msgid "Install" 129 | msgstr "" 130 | 131 | #: usr/share/linuxmint/mintlocale/add.ui.h:3 132 | msgid "Install the selected language" 133 | msgstr "" 134 | 135 | #: usr/share/linuxmint/mintlocale/im.ui.h:1 136 | msgid "Input method framework:" 137 | msgstr "" 138 | 139 | #: usr/share/linuxmint/mintlocale/im.ui.h:2 140 | msgid "Welcome" 141 | msgstr "" 142 | 143 | #: usr/share/linuxmint/mintlocale/im.ui.h:3 144 | msgid "" 145 | "Input methods are used to write symbols and characters which are not present " 146 | "on the keyboard. They are useful to write in Chinese, Japanese, Korean, " 147 | "Thai, Vietnamese..." 148 | msgstr "" 149 | 150 | #: usr/share/linuxmint/mintlocale/im.ui.h:4 151 | msgid "" 152 | "To add support for a particular language, select it in the sidebar and " 153 | "follow the instructions." 154 | msgstr "" 155 | 156 | #: usr/share/linuxmint/mintlocale/im.ui.h:5 157 | msgid "Help" 158 | msgstr "" 159 | 160 | #: usr/share/linuxmint/mintlocale/im.ui.h:6 161 | msgid "To write in simplified Chinese follow the steps below:" 162 | msgstr "" 163 | 164 | #: usr/share/linuxmint/mintlocale/im.ui.h:7 165 | msgid "- Install the language support packages: " 166 | msgstr "" 167 | 168 | #: usr/share/linuxmint/mintlocale/im.ui.h:9 169 | msgid "- Log out and log back in." 170 | msgstr "" 171 | 172 | #: usr/share/linuxmint/mintlocale/im.ui.h:10 173 | msgid "" 174 | "- Right-click the Fcitx applet in the system tray and choose \"Configure\"." 175 | msgstr "" 176 | 177 | #: usr/share/linuxmint/mintlocale/im.ui.h:11 178 | msgid "" 179 | "- In the Fcitx configuration screen, add the Pinyin input method " 180 | "(uncheck \"Only Show Current Language\" if necessary)." 181 | msgstr "" 182 | 183 | #: usr/share/linuxmint/mintlocale/im.ui.h:12 184 | msgid "- Switch between input methods with Ctrl+Space." 185 | msgstr "" 186 | 187 | #: usr/share/linuxmint/mintlocale/im.ui.h:13 188 | msgid "- Change the input method framework to Fcitx." 189 | msgstr "" 190 | 191 | #: usr/share/linuxmint/mintlocale/im.ui.h:14 192 | msgid "Note: SunPinyin can also be used (either with Fcitx or IBus)." 193 | msgstr "" 194 | 195 | #: usr/share/linuxmint/mintlocale/im.ui.h:15 196 | msgid "Simplified Chinese" 197 | msgstr "" 198 | 199 | #: usr/share/linuxmint/mintlocale/im.ui.h:16 200 | msgid "To write in traditional Chinese follow the steps below:" 201 | msgstr "" 202 | 203 | #: usr/share/linuxmint/mintlocale/im.ui.h:17 204 | msgid "Note: Chewing can also be used (either with Fcitx or IBus)." 205 | msgstr "" 206 | 207 | #: usr/share/linuxmint/mintlocale/im.ui.h:18 208 | msgid "Traditional Chinese" 209 | msgstr "" 210 | 211 | #: usr/share/linuxmint/mintlocale/im.ui.h:19 212 | msgid "To write in Hiragana, Katakana and Kanji follow the steps below:" 213 | msgstr "" 214 | 215 | #: usr/share/linuxmint/mintlocale/im.ui.h:20 216 | msgid "" 217 | "- In the Fcitx configuration screen, add the Mozc input method " 218 | "(uncheck \"Only Show Current Language\" if necessary)." 219 | msgstr "" 220 | 221 | #: usr/share/linuxmint/mintlocale/im.ui.h:21 222 | msgid "Note: Mozc can also be used with the IBus input method." 223 | msgstr "" 224 | 225 | #: usr/share/linuxmint/mintlocale/im.ui.h:22 226 | msgid "Japanese" 227 | msgstr "" 228 | 229 | #: usr/share/linuxmint/mintlocale/im.ui.h:23 230 | msgid "To write in Hangul follow the steps below:" 231 | msgstr "" 232 | 233 | #: usr/share/linuxmint/mintlocale/im.ui.h:24 234 | msgid "" 235 | "- In the Fcitx configuration screen, add the Hangul input method " 236 | "(uncheck \"Only Show Current Language\" if necessary)." 237 | msgstr "" 238 | 239 | #: usr/share/linuxmint/mintlocale/im.ui.h:25 240 | msgid "Note: Hangul can also be used with the IBus input method." 241 | msgstr "" 242 | 243 | #: usr/share/linuxmint/mintlocale/im.ui.h:26 244 | msgid "Korean" 245 | msgstr "" 246 | 247 | #: usr/share/linuxmint/mintlocale/im.ui.h:27 248 | msgid "To write in Thai follow the steps below:" 249 | msgstr "" 250 | 251 | #: usr/share/linuxmint/mintlocale/im.ui.h:28 252 | msgid "" 253 | "- In the Fcitx configuration screen, add the Thai input method " 254 | "(uncheck \"Only Show Current Language\" if necessary)." 255 | msgstr "" 256 | 257 | #: usr/share/linuxmint/mintlocale/im.ui.h:29 258 | msgid "" 259 | "Note: You can also use iBus or define a Thai keyboard layout without using " 260 | "any input method." 261 | msgstr "" 262 | 263 | #: usr/share/linuxmint/mintlocale/im.ui.h:30 264 | msgid "Thai" 265 | msgstr "" 266 | 267 | #: usr/share/linuxmint/mintlocale/im.ui.h:31 268 | msgid "To write in Vietnamese follow the steps below:" 269 | msgstr "" 270 | 271 | #: usr/share/linuxmint/mintlocale/im.ui.h:32 272 | msgid "" 273 | "- In the Fcitx configuration screen, add the Unikey input method " 274 | "(uncheck \"Only Show Current Language\" if necessary)." 275 | msgstr "" 276 | 277 | #: usr/share/linuxmint/mintlocale/im.ui.h:33 278 | msgid "Note: Unikey can also be used with the IBus input method." 279 | msgstr "" 280 | 281 | #: usr/share/linuxmint/mintlocale/im.ui.h:34 282 | msgid "Vietnamese" 283 | msgstr "" 284 | 285 | #: usr/share/linuxmint/mintlocale/im.ui.h:35 286 | msgid "To write in Telugu follow the steps below:" 287 | msgstr "" 288 | 289 | #: usr/share/linuxmint/mintlocale/im.ui.h:36 290 | msgid "- Change the input method framework to IBus." 291 | msgstr "" 292 | 293 | #: usr/share/linuxmint/mintlocale/im.ui.h:37 294 | msgid "" 295 | "- Right-click the IBus applet in the system tray and choose \"Preferences\"." 296 | msgstr "" 297 | 298 | #: usr/share/linuxmint/mintlocale/im.ui.h:38 299 | msgid "- In the IBus configuration screen, add the Telugu input method." 300 | msgstr "" 301 | 302 | #: usr/share/linuxmint/mintlocale/im.ui.h:39 303 | msgid "- Switch between input methods with Super+Space." 304 | msgstr "" 305 | 306 | #: usr/share/linuxmint/mintlocale/im.ui.h:40 307 | msgid "Note: Telugu can also be used with Fcitx." 308 | msgstr "" 309 | 310 | #: usr/share/linuxmint/mintlocale/im.ui.h:41 311 | msgid "Telugu" 312 | msgstr "" 313 | 314 | #: usr/share/linuxmint/mintlocale/install_remove.ui.h:1 315 | msgid "" 316 | "Note: Installing or upgrading language packs can trigger the " 317 | "installation of additional languages" 318 | msgstr "" 319 | 320 | #: usr/share/linuxmint/mintlocale/install_remove.ui.h:2 321 | msgid "Add..." 322 | msgstr "" 323 | 324 | #: usr/share/linuxmint/mintlocale/install_remove.ui.h:3 325 | msgid "Add a new language" 326 | msgstr "" 327 | 328 | #: usr/share/linuxmint/mintlocale/install_remove.ui.h:4 329 | msgid "Remove" 330 | msgstr "" 331 | 332 | #: usr/share/linuxmint/mintlocale/install_remove.ui.h:5 333 | msgid "Remove the selected language" 334 | msgstr "" 335 | 336 | #: usr/share/linuxmint/mintlocale/install_remove.ui.h:6 337 | msgid "Install language packs" 338 | msgstr "" 339 | 340 | #: usr/share/linuxmint/mintlocale/install_remove.ui.h:7 341 | msgid "" 342 | "Install any missing language packs, translations files, dictionaries for the " 343 | "selected language" 344 | msgstr "" 345 | 346 | #: usr/share/linuxmint/mintlocale/install_remove.ui.h:8 347 | msgid "Close" 348 | msgstr "" 349 | 350 | #: generate_desktop_files:24 generate_desktop_files:63 351 | #: generate_desktop_files:84 352 | msgid "Languages" 353 | msgstr "" 354 | 355 | #: generate_desktop_files:24 generate_desktop_files:37 356 | msgid "Language settings" 357 | msgstr "" 358 | 359 | #: generate_desktop_files:37 360 | msgid "Input method" 361 | msgstr "" 362 | -------------------------------------------------------------------------------- /test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo rm -rf /usr/lib/linuxmint/mintlocale 4 | sudo cp -R usr / 5 | mintlocale 6 | -------------------------------------------------------------------------------- /test-im: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo rm -rf /usr/lib/linuxmint/mintlocale 4 | sudo cp -R usr / 5 | mintlocale-im 6 | -------------------------------------------------------------------------------- /usr/bin/add-remove-locales: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import os 4 | 5 | os.system("/usr/lib/linuxmint/mintlocale/install_remove.py") 6 | -------------------------------------------------------------------------------- /usr/bin/mintlocale: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | /usr/lib/linuxmint/mintlocale/mintlocale.py $@ 4 | -------------------------------------------------------------------------------- /usr/bin/mintlocale-im: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | /usr/lib/linuxmint/mintlocale/im.py $@ 4 | -------------------------------------------------------------------------------- /usr/bin/set-default-locale: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | from string import Template 4 | import sys 5 | 6 | locale_path = sys.argv[1] 7 | locale = sys.argv[2] 8 | info = locale.replace(".UTF-8", "") 9 | language = info.split("_")[0] 10 | region = sys.argv[3] 11 | time = sys.argv[4] 12 | 13 | substitutions = {'locale':locale, 'info':info, 'language':language, 'region':region, 'time':time} 14 | 15 | 16 | template_file = open("/usr/share/linuxmint/mintlocale/templates/default_locale.template") 17 | template = Template(template_file.read()) 18 | text = template.substitute(substitutions) 19 | 20 | with open(locale_path, "w") as output_file: 21 | output_file.write(text) 22 | -------------------------------------------------------------------------------- /usr/lib/linuxmint/mintlocale/ImConfig/ImConfig.py: -------------------------------------------------------------------------------- 1 | # ImConfig.py (c) 2012-2014 Canonical 2 | # Author: Gunnar Hjalmarsson 3 | # 4 | # Released under the GPL 5 | # 6 | 7 | import os 8 | import subprocess 9 | 10 | 11 | class ImConfig(object): 12 | 13 | def __init__(self): 14 | pass 15 | 16 | def available(self): 17 | return os.path.exists('/usr/bin/im-config') 18 | 19 | def getAvailableInputMethods(self): 20 | inputMethods = subprocess.check_output(['im-config', '-l']).decode().split() 21 | return sorted(inputMethods) 22 | 23 | def getAllInputMethods(self): 24 | inputMethods = subprocess.check_output(['im-config', '-l', '-a']).decode().split() 25 | return sorted(inputMethods) 26 | 27 | def getCurrentInputMethod(self): 28 | # Output from the comamand "im-config -m" is different between Trusty (17.x) and Xenial (18.x), but the first three values are the same 29 | splits = subprocess.check_output(['im-config', '-m']).decode().split() 30 | (systemConfig, userConfig, autoConfig) = splits[0:3] 31 | 32 | if userConfig != 'missing': 33 | return userConfig 34 | 35 | """ 36 | no saved user configuration 37 | let's ask the system and save the system configuration as the user ditto 38 | """ 39 | system_conf = '' 40 | if os.path.exists('/usr/bin/fcitx'): 41 | # Ubuntu Kylin special 42 | system_conf = 'fcitx' 43 | elif systemConfig == 'default': 44 | # Using the autoConfig value might be incorrect if the mode in 45 | # /etc/default/im-config is 'cjkv'. However, as from im-config 0.24-1ubuntu1 46 | # the mode is 'auto' for all users of language-selector-gnome. 47 | system_conf = autoConfig 48 | elif os.path.exists('/etc/X11/xinit/xinputrc'): 49 | for line in open('/etc/X11/xinit/xinputrc'): 50 | if line.startswith('run_im'): 51 | system_conf = line.split()[1] 52 | break 53 | if not system_conf: 54 | system_conf = autoConfig 55 | self.setInputMethod(system_conf) 56 | return system_conf 57 | 58 | def setInputMethod(self, im): 59 | subprocess.call(['im-config', '-n', im]) 60 | 61 | if __name__ == '__main__': 62 | im = ImConfig() 63 | print('available input methods: %s' % im.getAvailableInputMethods()) 64 | print('current method: %s' % im.getCurrentInputMethod()) 65 | print("setting method 'fcitx'") 66 | im.setInputMethod('fcitx') 67 | print('current method: %s' % im.getCurrentInputMethod()) 68 | print('removing ~/.xinputrc') 69 | im.setInputMethod('REMOVE') 70 | -------------------------------------------------------------------------------- /usr/lib/linuxmint/mintlocale/ImConfig/__init__.py: -------------------------------------------------------------------------------- 1 | __all__ = ['ImConfig'] 2 | -------------------------------------------------------------------------------- /usr/lib/linuxmint/mintlocale/add.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import os 4 | import subprocess 5 | import sys 6 | import gettext 7 | import locale 8 | import codecs 9 | 10 | import gi 11 | gi.require_version('Gtk', '3.0') 12 | from gi.repository import Gtk, Gdk, GdkPixbuf 13 | 14 | # i18n 15 | APP = 'mintlocale' 16 | LOCALE_DIR = "/usr/share/linuxmint/locale" 17 | locale.bindtextdomain(APP, LOCALE_DIR) 18 | gettext.bindtextdomain(APP, LOCALE_DIR) 19 | gettext.textdomain(APP) 20 | _ = gettext.gettext 21 | 22 | FLAG_PATH = "/usr/share/iso-flag-png/%s.png" 23 | FLAG_SIZE = 22 24 | 25 | class MintLocale: 26 | 27 | ''' Create the UI ''' 28 | 29 | def __init__(self): 30 | 31 | self.selected_language = None 32 | 33 | self.builder = Gtk.Builder() 34 | self.builder.set_translation_domain("mintlocale") 35 | self.builder.add_from_file('/usr/share/linuxmint/mintlocale/add.ui') 36 | self.window = self.builder.get_object("main_window") 37 | self.scale = self.window.get_scale_factor() 38 | 39 | self.builder.get_object("main_window").connect("destroy", Gtk.main_quit) 40 | 41 | self.treeview = self.builder.get_object("treeview_language_list") 42 | 43 | self.builder.get_object("main_window").set_title(_("Add a New Language")) 44 | self.builder.get_object("main_window").set_icon_name("preferences-desktop-locale") 45 | self.builder.get_object("main_window").connect("destroy", Gtk.main_quit) 46 | self.builder.get_object("button_close").connect("clicked", Gtk.main_quit) 47 | self.builder.get_object("button_install").connect("clicked", self.button_install_clicked) 48 | 49 | ren = Gtk.CellRendererPixbuf() 50 | column = Gtk.TreeViewColumn("Flags", ren) 51 | column.add_attribute(ren, "pixbuf", 2) 52 | column.set_cell_data_func(ren, self.data_func_surface) 53 | ren.set_property('ypad', 5) 54 | ren.set_property('xpad', 10) 55 | self.treeview.append_column(column) 56 | 57 | ren = Gtk.CellRendererText() 58 | column = Gtk.TreeViewColumn("Languages", ren) 59 | column.add_attribute(ren, "markup", 0) 60 | self.treeview.append_column(column) 61 | 62 | self.build_lang_list() 63 | 64 | def data_func_surface(self, column, cell, model, iter_, *args): 65 | pixbuf = model.get_value(iter_, 2) 66 | surface = Gdk.cairo_surface_create_from_pixbuf(pixbuf, self.scale) 67 | cell.set_property("surface", surface) 68 | 69 | # Checks for minority languages that have a flag and returns the corresponding flag_path or the unchanged flag_path 70 | def set_minority_language_flag_path(self, locale_code, flag_path): 71 | # Get the language code from the locale_code. For example, Basque's locale code can be eu or eu_es or eu_fr, Welsh's cy or cy_gb... 72 | language_code = locale_code.split("_")[0] 73 | 74 | if language_code == 'ca': 75 | flag_path = FLAG_PATH % '_catalonia' 76 | elif language_code == 'cy': 77 | flag_path = FLAG_PATH % '_wales' 78 | elif language_code == 'eu': 79 | flag_path = FLAG_PATH % '_basque' 80 | elif language_code == 'gl': 81 | flag_path = FLAG_PATH % '_galicia' 82 | 83 | return flag_path 84 | 85 | def build_lang_list(self): 86 | self.builder.get_object('button_install').set_sensitive(False) 87 | 88 | model = Gtk.ListStore(str, str, GdkPixbuf.Pixbuf) # label, locale, flag 89 | model.set_sort_column_id(0, Gtk.SortType.ASCENDING) 90 | 91 | # Load countries into memory 92 | self.countries = {} 93 | with codecs.open('/usr/share/linuxmint/mintlocale/countries', "r", encoding='utf-8') as file: 94 | for line in file: 95 | line = line.strip() 96 | split = line.split("=") 97 | if len(split) == 2: 98 | self.countries[split[0]] = split[1] 99 | 100 | # Load languages into memory 101 | self.languages = {} 102 | with codecs.open('/usr/share/linuxmint/mintlocale/languages', "r", encoding='utf-8') as file: 103 | for line in file: 104 | line = line.strip() 105 | split = line.split("=") 106 | if len(split) == 2: 107 | self.languages[split[0]] = split[1] 108 | 109 | if os.path.exists("/usr/share/i18n/SUPPORTED"): 110 | with codecs.open("/usr/share/i18n/SUPPORTED", "r", encoding="utf-8") as file: 111 | locales = file.read() 112 | else: 113 | locales = u"" 114 | 115 | installed = subprocess.check_output("localedef --list-archive | sed s/utf8/UTF-8/g", shell=True).decode("utf-8").split("\n") 116 | for line in locales.split("\n"): 117 | line = line.strip() 118 | if line == '' or line.startswith('#'): 119 | continue 120 | # Only allow UTF-8 locales 121 | if "UTF-8" not in line: 122 | continue 123 | parts = line.split(" ") 124 | locale = parts[0].strip() 125 | lcharmap = None 126 | if len(parts) > 1: 127 | lcharmap = parts[1].strip() 128 | 129 | if locale not in installed: 130 | locale_code = locale.split(".")[0].strip() 131 | charmap = None 132 | if len(locale.split(".")) > 1: 133 | charmap = locale.split(".")[1].strip() 134 | 135 | if "_" in locale_code: 136 | split = locale_code.split("_") 137 | if len(split) == 2: 138 | language_code = split[0] 139 | 140 | if language_code == "iw": 141 | continue # use 'he' instead 142 | 143 | if language_code in self.languages: 144 | language = self.languages[language_code] 145 | else: 146 | language = language_code 147 | 148 | country_code = split[1].split('@')[0].lower() 149 | if country_code in self.countries: 150 | country = self.countries[country_code] 151 | else: 152 | country = country_code 153 | 154 | if '@' in split[1]: 155 | language_label = "%s (@%s), %s" % (language, split[1].split('@')[1].strip(), country) 156 | else: 157 | language_label = "%s, %s" % (language, country) 158 | flag_path = FLAG_PATH % country_code 159 | else: 160 | if locale_code in self.languages: 161 | language_label = self.languages[locale_code] 162 | else: 163 | language_label = locale_code 164 | flag_path = FLAG_PATH % locale_code 165 | 166 | flag_path = self.set_minority_language_flag_path(locale_code, flag_path) 167 | 168 | if lcharmap is not None and lcharmap != "UTF-8": 169 | language_label = "%s %s" % (language_label, lcharmap) 170 | 171 | iter = model.append() 172 | model.set_value(iter, 0, language_label) 173 | model.set_value(iter, 1, line) 174 | if os.path.exists(flag_path): 175 | model.set_value(iter, 2, GdkPixbuf.Pixbuf.new_from_file_at_size(flag_path, -1, FLAG_SIZE * self.scale)) 176 | else: 177 | model.set_value(iter, 2, GdkPixbuf.Pixbuf.new_from_file_at_size(FLAG_PATH % '_generic', -1, FLAG_SIZE * self.scale)) 178 | 179 | treeview = self.builder.get_object("treeview_language_list") 180 | treeview.set_model(model) 181 | treeview.set_search_column(0) 182 | self.treeview.connect("cursor-changed", self.select_language) 183 | 184 | def select_language(self, treeview, data=None): 185 | model = treeview.get_model() 186 | active = treeview.get_selection().get_selected_rows() 187 | if(len(active) > 0): 188 | active = active[1] 189 | if (len(active) > 0): 190 | active = active[0] 191 | if active is not None: 192 | row = model[active] 193 | language = row[1] 194 | self.selected_language = language 195 | self.builder.get_object("button_install").set_sensitive(True) 196 | 197 | def button_install_clicked(self, button): 198 | parts = self.selected_language.split(" ") 199 | locale = parts[0].strip() 200 | short_locale = locale.split(".")[0].strip() 201 | if len(parts) > 1: 202 | charmap = parts[1].strip() 203 | print("localedef -f %s -i %s %s" % (charmap, short_locale, locale)) 204 | os.system("localedef -f %s -i %s %s" % (charmap, short_locale, locale)) 205 | else: 206 | print("localedef -i %s %s" % (short_locale, locale)) 207 | os.system("localedef -i %s %s" % (short_locale, locale)) 208 | if os.path.exists("/var/lib/locales/supported.d"): 209 | os.system("localedef --list-archive | sed 's/utf8/UTF-8 UTF-8/g' > /var/lib/locales/supported.d/mintlocale") 210 | sys.exit(0) 211 | 212 | if __name__ == "__main__": 213 | MintLocale() 214 | Gtk.main() 215 | -------------------------------------------------------------------------------- /usr/lib/linuxmint/mintlocale/im.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import apt 4 | import codecs 5 | import gettext 6 | import locale 7 | import aptkit.simpleclient 8 | import os 9 | 10 | try: 11 | import _thread as thread 12 | except ImportError as err: 13 | import thread 14 | 15 | import gi 16 | gi.require_version('Gtk', '3.0') 17 | gi.require_version('AccountsService', '1.0') 18 | gi.require_version('XApp', '1.0') 19 | from gi.repository import Gtk, GObject, Gdk, XApp 20 | 21 | from ImConfig.ImConfig import ImConfig 22 | 23 | # i18n 24 | APP = 'mintlocale' 25 | LOCALE_DIR = "/usr/share/linuxmint/locale" 26 | locale.bindtextdomain(APP, LOCALE_DIR) 27 | gettext.bindtextdomain(APP, LOCALE_DIR) 28 | gettext.textdomain(APP) 29 | _ = gettext.gettext 30 | 31 | (IM_CHOICE, IM_NAME) = list(range(2)) 32 | 33 | GObject.threads_init() 34 | 35 | class IMLanguage(): 36 | 37 | def __init__(self, codename, methods, button, app): 38 | self.app = app 39 | self.packages = [] 40 | self.missing_packages = [] 41 | self.apt = aptkit.simpleclient.SimpleAPTClient(self.app.window) 42 | self.button = button 43 | self.button.connect('clicked', self.install) 44 | self.button.set_sensitive(False) 45 | 46 | # load package list 47 | info_paths = [] 48 | info_paths.append("/usr/share/linuxmint/mintlocale/iminfo/locale/%s.info" % codename) 49 | for input_method in methods.split(":"): 50 | info_paths.append("/usr/share/linuxmint/mintlocale/iminfo/%s.info" % input_method) 51 | for info_path in info_paths: 52 | with codecs.open(info_path, encoding='utf-8') as f: 53 | for line in f: 54 | line = line.strip() 55 | if line.startswith("#") or line == "": 56 | # skip empty lines and comments 57 | continue 58 | if line not in self.packages: 59 | self.packages.append(line) 60 | 61 | def install(self, widget): 62 | if len(self.missing_packages) > 0: 63 | self.app.lock_ui() 64 | if self.app.cache_updated: 65 | self.apt.set_finished_callback(self.on_install_finished) 66 | self.apt.set_cancelled_callback(self.on_install_finished) 67 | self.apt.install_packages(self.missing_packages) 68 | else: 69 | self.apt.set_finished_callback(self.on_update_finished) 70 | self.apt.update_cache() 71 | 72 | def on_update_finished(self, transaction=None, exit_state=None): 73 | self.app.cache_updated = True 74 | self.apt.set_finished_callback(self.on_install_finished) 75 | self.apt.set_cancelled_callback(self.on_install_finished) 76 | self.apt.install_packages(self.missing_packages) 77 | 78 | def on_install_finished(self, transaction=None, exit_state=None): 79 | self.app.check_input_methods() 80 | 81 | def update_status(self, cache): 82 | self.missing_packages = [] 83 | for package in self.packages: 84 | if package in cache and not cache[package].is_installed: 85 | self.missing_packages.append(package) 86 | if len(self.missing_packages) > 0: 87 | self.button.show() 88 | self.button.set_sensitive(True) 89 | self.button.set_tooltip_text("\n".join(self.missing_packages)) 90 | else: 91 | self.button.set_label(_("Already installed")) 92 | self.button.set_tooltip_text("") 93 | 94 | class IM: 95 | 96 | ''' Create the UI ''' 97 | 98 | def __init__(self): 99 | 100 | # Prepare the APT cache 101 | self.cache = apt.Cache() 102 | self.cache_updated = False 103 | 104 | # load our glade ui file in 105 | self.builder = Gtk.Builder() 106 | self.builder.set_translation_domain("mintlocale") 107 | self.builder.add_from_file('/usr/share/linuxmint/mintlocale/im.ui') 108 | 109 | self.window = self.builder.get_object("main_window") 110 | self.window.set_title(_("Input Method")) 111 | XApp.set_window_icon_name(self.window, "mintlocale-im") 112 | self.window.connect("destroy", Gtk.main_quit) 113 | 114 | self.im_combo = self.builder.get_object("im_combo") 115 | model = Gtk.ListStore(GObject.TYPE_STRING, GObject.TYPE_STRING) 116 | cell = Gtk.CellRendererText() 117 | self.im_combo.pack_start(cell, True) 118 | self.im_combo.add_attribute(cell, 'text', IM_NAME) 119 | self.im_combo.set_model(model) 120 | 121 | self.ImConfig = ImConfig() 122 | 123 | self.im_languages = [] 124 | self.im_languages.append(IMLanguage("zh-hans", "fcitx:ibus", self.builder.get_object("button_szh"), self)) 125 | self.im_languages.append(IMLanguage("zh-hant", "fcitx:ibus", self.builder.get_object("button_tzh"), self)) 126 | self.im_languages.append(IMLanguage("ja", "fcitx:ibus", self.builder.get_object("button_ja"), self)) 127 | self.im_languages.append(IMLanguage("th", "fcitx:ibus", self.builder.get_object("button_th"), self)) 128 | self.im_languages.append(IMLanguage("vi", "fcitx:ibus", self.builder.get_object("button_vi"), self)) 129 | self.im_languages.append(IMLanguage("ko", "fcitx:ibus", self.builder.get_object("button_ko"), self)) 130 | self.im_languages.append(IMLanguage("te", "ibus", self.builder.get_object("button_te"), self)) 131 | 132 | self.im_loaded = False # don't react to im changes until we're fully loaded (we're loading that combo asynchronously) 133 | self.im_combo.connect("changed", self.on_combobox_input_method_changed) 134 | 135 | self.lock_ui() 136 | self.check_input_methods() 137 | 138 | self.window.show_all() 139 | 140 | def lock_ui(self): 141 | self.window.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.WATCH)) 142 | for im in self.im_languages: 143 | im.button.set_sensitive(False) 144 | self.im_combo.set_sensitive(False) 145 | 146 | def check_input_methods(self): 147 | if not self.ImConfig.available(): 148 | self.lock_ui() 149 | self.toolbar.hide() 150 | return 151 | else: 152 | self.im_combo.set_sensitive(True) 153 | 154 | if not self.im_combo.get_model(): 155 | print("no model") 156 | return 157 | 158 | thread.start_new_thread(self.check_input_methods_async, ()) 159 | 160 | def check_input_methods_async(self): 161 | self.im_loaded = False 162 | 163 | # slow operations 164 | currentIM = self.ImConfig.getCurrentInputMethod() 165 | availableIM = self.ImConfig.getAvailableInputMethods() 166 | allIM = self.ImConfig.getAllInputMethods() 167 | GObject.idle_add(self.check_input_methods_update_ui, currentIM, availableIM, allIM) 168 | 169 | def check_input_methods_update_ui(self, currentIM, availableIM, allIM): 170 | 171 | self.cache.open(None) 172 | 173 | for im_language in self.im_languages: 174 | im_language.update_status(self.cache) 175 | 176 | model = self.im_combo.get_model() 177 | model.clear() 178 | 179 | # find out about the other options 180 | names = dict(xim=_('XIM'), ibus='IBus', scim='SCIM', fcitx='Fcitx', uim='UIM', gcin='gcin', hangul='Hangul', thai='Thai') 181 | iter = model.append() 182 | model.set_value(iter, IM_CHOICE, "none") 183 | model.set_value(iter, IM_NAME, _("None")) 184 | self.im_combo.set_active_iter(iter) 185 | for (i, IM) in enumerate(availableIM): 186 | name = names[IM] if IM in names else IM 187 | iter = model.append() 188 | model.set_value(iter, IM_CHOICE, IM) 189 | model.set_value(iter, IM_NAME, name) 190 | if IM == currentIM: 191 | self.im_combo.set_active_iter(iter) 192 | 193 | self.window.get_window().set_cursor(None) 194 | self.im_loaded = True 195 | 196 | def on_combobox_input_method_changed(self, widget): 197 | if not self.im_loaded: 198 | # IM info not fully loaded yet, so ignore the signal 199 | return 200 | 201 | model = self.im_combo.get_model() 202 | if self.im_combo.get_active() < 0: 203 | return 204 | (IM_choice, IM_name) = model[self.im_combo.get_active()] 205 | self.ImConfig.setInputMethod(IM_choice) 206 | 207 | 208 | if __name__ == "__main__": 209 | 210 | IM() 211 | Gtk.main() 212 | -------------------------------------------------------------------------------- /usr/lib/linuxmint/mintlocale/install_remove.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import os 4 | import gettext 5 | import apt_pkg 6 | import aptkit.simpleclient 7 | import subprocess 8 | import locale 9 | import codecs 10 | 11 | import gi 12 | gi.require_version('Gtk', '3.0') 13 | from gi.repository import Gtk, Gdk, GdkPixbuf 14 | 15 | # i18n 16 | APP = 'mintlocale' 17 | LOCALE_DIR = "/usr/share/linuxmint/locale" 18 | locale.bindtextdomain(APP, LOCALE_DIR) 19 | gettext.bindtextdomain(APP, LOCALE_DIR) 20 | gettext.textdomain(APP) 21 | _ = gettext.gettext 22 | 23 | FLAG_PATH = "/usr/share/iso-flag-png/%s.png" 24 | FLAG_SIZE = 22 25 | 26 | class LanguagePack: 27 | 28 | def __init__(self, category, language, dependency, package): 29 | self.category = category 30 | self.language = language 31 | self.dependency = dependency 32 | self.package = package 33 | 34 | class MintLocale: 35 | 36 | ''' Create the UI ''' 37 | 38 | def __init__(self): 39 | 40 | self.selected_language = None 41 | self.selected_language_packs = None 42 | 43 | self.language_packs = [] 44 | with codecs.open("/usr/share/linuxmint/mintlocale/language_packs", 'r', encoding='utf-8') as f: 45 | for line in f: 46 | line = line.strip() 47 | columns = line.split(":") 48 | if len(columns) == 4: 49 | (category, language, dependency, package) = columns 50 | if package.endswith("-"): 51 | self.language_packs.append(LanguagePack(category, language, dependency, "%sLANG" % package)) 52 | self.language_packs.append(LanguagePack(category, language, dependency, "%sLANG-COUNTRY" % package)) 53 | else: 54 | self.language_packs.append(LanguagePack(category, language, dependency, package)) 55 | 56 | apt_pkg.init() 57 | self.cache = apt_pkg.Cache(None) 58 | self.cache_updated = False 59 | 60 | 61 | self.builder = Gtk.Builder() 62 | self.builder.set_translation_domain("mintlocale") 63 | self.builder.add_from_file('/usr/share/linuxmint/mintlocale/install_remove.ui') 64 | self.window = self.builder.get_object("main_window") 65 | self.window.set_icon_name("preferences-desktop-locale") 66 | self.scale = self.window.get_scale_factor() 67 | self.builder.get_object("main_window").connect("destroy", Gtk.main_quit) 68 | 69 | self.treeview = self.builder.get_object("treeview_language_list") 70 | 71 | self.builder.get_object("main_window").set_title(_("Install / Remove Languages")) 72 | self.builder.get_object("main_window").set_icon_name("preferences-desktop-locale") 73 | self.builder.get_object("main_window").connect("destroy", Gtk.main_quit) 74 | self.builder.get_object("button_close").connect("clicked", Gtk.main_quit) 75 | self.builder.get_object("button_install").connect("clicked", self.button_install_clicked) 76 | self.builder.get_object("button_add").connect("clicked", self.button_add_clicked) 77 | self.builder.get_object("button_remove").connect("clicked", self.button_remove_clicked) 78 | 79 | ren = Gtk.CellRendererPixbuf() 80 | column = Gtk.TreeViewColumn("Flags", ren) 81 | column.add_attribute(ren, "pixbuf", 2) 82 | column.set_cell_data_func(ren, self.data_func_surface) 83 | ren.set_property('ypad', 5) 84 | ren.set_property('xpad', 10) 85 | self.treeview.append_column(column) 86 | 87 | ren = Gtk.CellRendererText() 88 | column = Gtk.TreeViewColumn("Languages", ren) 89 | column.add_attribute(ren, "markup", 0) 90 | self.treeview.append_column(column) 91 | 92 | ren = Gtk.CellRendererText() 93 | column = Gtk.TreeViewColumn("Packs", ren) 94 | column.add_attribute(ren, "markup", 3) 95 | ren.set_property('xpad', 10) 96 | self.treeview.append_column(column) 97 | 98 | self.build_lang_list() 99 | 100 | self.apt = aptkit.simpleclient.SimpleAPTClient(self.window) 101 | 102 | def data_func_surface(self, column, cell, model, iter_, *args): 103 | pixbuf = model.get_value(iter_, 2) 104 | surface = Gdk.cairo_surface_create_from_pixbuf(pixbuf, self.scale) 105 | cell.set_property("surface", surface) 106 | 107 | def split_locale(self, locale_code): 108 | if "_" in locale_code: 109 | split = locale_code.split("_") 110 | language_code = split[0] 111 | if language_code in self.languages: 112 | language = self.languages[language_code] 113 | else: 114 | language = language_code 115 | 116 | country_code = split[1].lower().split('@')[0].strip() 117 | if country_code in self.countries: 118 | country = self.countries[country_code] 119 | else: 120 | country = country_code 121 | 122 | if '@' in split[1]: 123 | language_label = "%s (@%s), %s" % (language, split[1].split('@')[1].strip(), country) 124 | else: 125 | language_label = "%s, %s" % (language, country) 126 | else: 127 | if locale_code in self.languages: 128 | language_label = self.languages[locale_code] 129 | else: 130 | language_label = locale_code 131 | language_code = locale_code 132 | country_code = "" 133 | 134 | return (language_code, country_code, language_label) 135 | 136 | def build_lang_list(self): 137 | self.cache = apt_pkg.Cache(None) 138 | 139 | self.builder.get_object('button_install').set_sensitive(False) 140 | self.builder.get_object('button_remove').set_sensitive(False) 141 | 142 | model = Gtk.ListStore(str, str, GdkPixbuf.Pixbuf, str, bool, object) # label, locale, flag, packs_label, packs_installed, list_of_missing_packs 143 | model.set_sort_column_id(0, Gtk.SortType.ASCENDING) 144 | 145 | # Load countries into memory 146 | self.countries = {} 147 | with codecs.open('/usr/share/linuxmint/mintlocale/countries', "r", encoding="utf-8") as file: 148 | for line in file: 149 | line = line.strip() 150 | split = line.split("=") 151 | if len(split) == 2: 152 | self.countries[split[0]] = split[1] 153 | 154 | # Load languages into memory 155 | self.languages = {} 156 | with codecs.open('/usr/share/linuxmint/mintlocale/languages', "r", encoding='utf-8') as file: 157 | for line in file: 158 | line = line.strip() 159 | split = line.split("=") 160 | if len(split) == 2: 161 | self.languages[split[0]] = split[1] 162 | 163 | locales = subprocess.check_output("localedef --list-archive", shell=True) 164 | locales = locales.decode('utf-8').strip() 165 | for line in locales.split("\n"): 166 | line = line.replace("utf8", "UTF-8").strip() 167 | 168 | # Only allow UTF-8 locales 169 | if "UTF-8" not in line: 170 | continue 171 | 172 | locale_code = line.split(".")[0].strip() 173 | charmap = None 174 | if len(line.split(".")) > 1: 175 | charmap = line.split(".")[1].strip() 176 | 177 | language_code, country_code, language_label = self.split_locale(locale_code) 178 | if country_code == "": 179 | flag_path = FLAG_PATH % locale_code 180 | else: 181 | flag_path = FLAG_PATH % country_code 182 | 183 | # Check for minority languages. Get tje language code from the locale_code. 184 | # For example, Basque's locale code can be eu or eu_es or eu_fr, Welsh's cy or cy_gb... 185 | if language_code == 'ca': 186 | flag_path = FLAG_PATH % '_catalonia' 187 | elif language_code == 'cy': 188 | flag_path = FLAG_PATH % '_wales' 189 | elif language_code == 'eu': 190 | flag_path = FLAG_PATH % '_basque' 191 | elif language_code == 'gl': 192 | flag_path = FLAG_PATH % '_galicia' 193 | 194 | if charmap is not None and charmap != "UTF-8": 195 | language_label = "%s %s" % (language_label, charmap) 196 | 197 | # Check if the language packs are installed 198 | missing_packs = [] 199 | missing_pack_names = [] 200 | for language_pack in self.language_packs: 201 | if language_pack.language == "" or language_pack.language == language_code: 202 | pkgname = language_pack.package.replace("LANG", language_code).replace("COUNTRY", country_code) 203 | depname = language_pack.dependency 204 | if pkgname in ["hunspell-de-de", "hunspell-de-at", "hunspell-de-ch"]: 205 | # Skip hunspell for German, hunspell-de-xx-frami is prefered instead and conflicts with it 206 | print(f"Skipping {pkgname}, frami version is preferred.") 207 | continue 208 | if pkgname in self.cache: 209 | pkg = self.cache[pkgname] 210 | if (pkg.has_versions and pkg.current_state != apt_pkg.CURSTATE_INSTALLED): 211 | if depname != "": 212 | if depname in self.cache and self.cache[depname].current_state == apt_pkg.CURSTATE_INSTALLED: 213 | if pkgname not in missing_pack_names: 214 | missing_packs.append(pkg) 215 | missing_pack_names.append(pkgname) 216 | else: 217 | if pkgname not in missing_pack_names: 218 | missing_packs.append(pkg) 219 | missing_pack_names.append(pkgname) 220 | 221 | iter = model.append() 222 | model.set_value(iter, 0, language_label) 223 | model.set_value(iter, 1, line) 224 | if len(missing_pack_names) > 0: 225 | model.set_value(iter, 3, "%s" % _("Some language packs are missing")) 226 | model.set_value(iter, 4, False) 227 | model.set_value(iter, 5, missing_pack_names) 228 | else: 229 | model.set_value(iter, 3, "%s" % _("Fully installed")) 230 | model.set_value(iter, 4, True) 231 | if os.path.exists(flag_path): 232 | model.set_value(iter, 2, GdkPixbuf.Pixbuf.new_from_file_at_size(flag_path, -1, FLAG_SIZE * self.scale)) 233 | else: 234 | model.set_value(iter, 2, GdkPixbuf.Pixbuf.new_from_file_at_size(FLAG_PATH % '_generic', -1, FLAG_SIZE * self.scale)) 235 | 236 | treeview = self.builder.get_object("treeview_language_list") 237 | treeview.set_model(model) 238 | treeview.set_search_column(0) 239 | self.treeview.connect("cursor-changed", self.select_language) 240 | 241 | def select_language(self, treeview, data=None): 242 | model = treeview.get_model() 243 | active = treeview.get_selection().get_selected_rows() 244 | if(len(active) > 0): 245 | active = active[1] 246 | if (len(active) > 0): 247 | active = active[0] 248 | if active is not None: 249 | row = model[active] 250 | language = row[1] 251 | langpacks_installed = row[4] 252 | self.selected_language = language 253 | self.selected_language_packs = row[5] 254 | self.builder.get_object("button_remove").set_sensitive(True) 255 | self.builder.get_object("button_install").set_sensitive(not langpacks_installed) 256 | 257 | def button_install_clicked(self, button): 258 | if self.selected_language_packs is not None: 259 | if self.cache_updated: 260 | self.apt.set_finished_callback(self.on_install_finished) 261 | self.apt.set_cancelled_callback(self.on_install_finished) 262 | self.apt.install_packages(self.selected_language_packs) 263 | else: 264 | self.apt.set_finished_callback(self.on_update_finished) 265 | self.apt.update_cache() 266 | 267 | def on_update_finished(self, transaction=None, exit_state=None): 268 | self.cache_updated = True 269 | self.apt.set_finished_callback(self.on_install_finished) 270 | self.apt.set_cancelled_callback(self.on_install_finished) 271 | self.apt.install_packages(self.selected_language_packs) 272 | 273 | def on_install_finished(self, transaction=None, exit_state=None): 274 | self.build_lang_list() 275 | 276 | def button_add_clicked(self, button): 277 | os.system("/usr/lib/linuxmint/mintlocale/add.py") 278 | self.build_lang_list() 279 | 280 | def button_remove_clicked(self, button): 281 | locale = self.selected_language.replace("UTF-8", "utf8") 282 | os.system("localedef --delete-from-archive %s" % locale) 283 | # If there are no more locales using the language, remove the language packs 284 | (language_code, country_code, language_label) = self.split_locale(locale) 285 | num_locales = subprocess.check_output("localedef --list-archive | grep %s_ | wc -l" % language_code, shell=True) 286 | num_locales = num_locales.decode('utf-8').strip() 287 | # Check if the language packs are installed 288 | if num_locales == "0": 289 | installed_packs = [] 290 | for prefix in ["language-pack", "language-pack-gnome"]: 291 | for pkgname in ["%s-%s" % (prefix, language_code), "%s-%s-%s" % (prefix, language_code, country_code)]: 292 | if pkgname in self.cache: 293 | pkg = self.cache[pkgname] 294 | if (pkg.has_versions and pkg.current_state == apt_pkg.CURSTATE_INSTALLED): 295 | installed_packs.append(pkgname) 296 | print(pkgname) 297 | 298 | if len(installed_packs) > 0: 299 | self.apt.set_finished_callback(self.on_install_finished) 300 | self.apt.remove_packages(installed_packs) 301 | 302 | self.build_lang_list() 303 | 304 | if __name__ == "__main__": 305 | MintLocale() 306 | Gtk.main() 307 | -------------------------------------------------------------------------------- /usr/lib/linuxmint/mintlocale/mintlocale.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import os 4 | import gettext 5 | import grp 6 | import locale 7 | import subprocess 8 | import codecs 9 | import sys 10 | 11 | try: 12 | import configparser 13 | except ImportError as err: 14 | import ConfigParser as configparser 15 | 16 | import gi 17 | gi.require_version('Gtk', '3.0') 18 | gi.require_version('AccountsService', '1.0') 19 | gi.require_version('XApp', '1.0') 20 | from gi.repository import Gtk, AccountsService, GLib, Gdk, GdkPixbuf, XApp 21 | 22 | 23 | # Used to detect Debian derivatives (we don't want to show APT features in other distros) 24 | IS_DEBIAN = os.path.exists("/etc/debian_version") 25 | 26 | if IS_DEBIAN: 27 | import apt 28 | 29 | # i18n 30 | APP = 'mintlocale' 31 | LOCALE_DIR = "/usr/share/linuxmint/locale" 32 | locale.bindtextdomain(APP, LOCALE_DIR) 33 | gettext.bindtextdomain(APP, LOCALE_DIR) 34 | gettext.textdomain(APP) 35 | _ = gettext.gettext 36 | 37 | FLAG_PATH = "/usr/share/iso-flag-png/%s.png" 38 | FLAG_SIZE = 22 39 | BUTTON_FLAG_SIZE = 22 40 | 41 | def list_header_func(row, before, user_data): 42 | if before and not row.get_header(): 43 | row.set_header(Gtk.Separator(orientation=Gtk.Orientation.HORIZONTAL)) 44 | 45 | class Locale(): 46 | 47 | def __init__(self, id, name): 48 | self.id = id 49 | self.name = name 50 | 51 | class PictureChooserButton (Gtk.Button): 52 | 53 | def __init__(self, num_cols=4, has_button_label=False, scale=1): 54 | super(PictureChooserButton, self).__init__() 55 | self.scale = scale 56 | self.num_cols = num_cols 57 | self.row = 0 58 | self.col = 0 59 | self.menu = Gtk.Menu() 60 | self.button_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=2) 61 | self.button_image = Gtk.Image() 62 | self.button_box.add(self.button_image) 63 | 64 | if has_button_label: 65 | self.button_label = Gtk.Label() 66 | self.button_box.add(self.button_label) 67 | 68 | self.add(self.button_box) 69 | self.connect("button-release-event", self._on_button_clicked) 70 | self.progress = 0.0 71 | 72 | context = self.get_style_context() 73 | context.add_class("gtkstyle-fallback") 74 | 75 | self.connect_after("draw", self.on_draw) 76 | 77 | def on_draw(self, widget, cr, data=None): 78 | if self.progress == 0: 79 | return False 80 | 81 | box = widget.get_allocation() 82 | 83 | context = widget.get_style_context() 84 | c = context.get_background_color(Gtk.StateFlags.SELECTED) 85 | 86 | max_length = box.width * .6 87 | start = (box.width - max_length) / 2 88 | y = box.height - 5 89 | 90 | cr.save() 91 | 92 | cr.set_source_rgba(c.red, c.green, c.blue, c.alpha) 93 | cr.set_line_width(3) 94 | cr.set_line_cap(1) 95 | cr.move_to(start, y) 96 | cr.line_to(start + (self.progress * max_length), y) 97 | cr.stroke() 98 | 99 | cr.restore() 100 | return False 101 | 102 | def increment_loading_progress(self, inc): 103 | progress = self.progress + inc 104 | self.progress = min(1.0, progress) 105 | self.queue_draw() 106 | 107 | def reset_loading_progress(self): 108 | self.progress = 0.0 109 | self.queue_draw() 110 | 111 | def set_picture_from_file(self, path): 112 | pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(path, -1, FLAG_SIZE * self.scale) 113 | surface = Gdk.cairo_surface_create_from_pixbuf(pixbuf, self.scale) 114 | self.button_image.set_from_surface(surface) 115 | 116 | def set_button_label(self, label): 117 | self.button_label.set_markup(label) 118 | 119 | def popup_menu_below_button(self, menu, *args): 120 | # Done this way for compatibility across Gtk versions 121 | # Mint 17.x => "widget" will be arg 2 122 | # Mint 18.x => "widget" will be arg 4 123 | widget = args[-1] 124 | 125 | window = widget.get_window() 126 | display = Gdk.Display.get_default() 127 | monitor = display.get_monitor_at_window(window) 128 | 129 | warea = monitor.get_workarea() 130 | wrect = widget.get_allocation() 131 | mrect = menu.get_allocation() 132 | 133 | unused_var, window_x, window_y = window.get_origin() 134 | 135 | # Position left edge of the menu with the right edge of the button 136 | x = window_x + wrect.x + wrect.width 137 | # Center the menu vertically with respect to the monitor 138 | y = warea.y + (warea.height / 2) - (mrect.height / 2) 139 | 140 | # Now, check if we're still touching the button - we want the right edge 141 | # of the button always 100% touching the menu 142 | 143 | if y > (window_y + wrect.y): 144 | y = y - (y - (window_y + wrect.y)) 145 | elif (y + mrect.height) < (window_y + wrect.y + wrect.height): 146 | y = y + ((window_y + wrect.y + wrect.height) - (y + mrect.height)) 147 | 148 | push_in = True # push_in is True so all menu is always inside screen 149 | return (x, y, push_in) 150 | 151 | def _on_button_clicked(self, widget, event): 152 | if event.button == 1: 153 | self.menu.show_all() 154 | self.menu.popup(None, None, self.popup_menu_below_button, self, event.button, event.time) 155 | 156 | def _on_picture_selected(self, menuitem, path, callback, id=None): 157 | if id is not None: 158 | result = callback(path, id) 159 | else: 160 | result = callback(path) 161 | 162 | if result: 163 | self.set_picture_from_file(path) 164 | 165 | def clear_menu(self): 166 | menu = self.menu 167 | self.menu = Gtk.Menu() 168 | self.row = 0 169 | self.col = 0 170 | menu.destroy() 171 | 172 | def add_picture(self, path, callback, title=None, id=None): 173 | if os.path.exists(path): 174 | pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(path, -1, FLAG_SIZE * self.scale) 175 | surface = Gdk.cairo_surface_create_from_pixbuf(pixbuf, self.scale) 176 | image = Gtk.Image.new_from_surface(surface) 177 | menuitem = Gtk.MenuItem() 178 | if title is not None: 179 | vbox = Gtk.VBox() 180 | vbox.pack_start(image, False, False, 2) 181 | label = Gtk.Label() 182 | label.set_markup(title) 183 | vbox.pack_start(label, False, False, 2) 184 | menuitem.add(vbox) 185 | else: 186 | menuitem.add(image) 187 | if id is not None: 188 | menuitem.connect('activate', self._on_picture_selected, path, callback, id) 189 | else: 190 | menuitem.connect('activate', self._on_picture_selected, path, callback) 191 | self.menu.attach(menuitem, self.col, self.col + 1, self.row, self.row + 1) 192 | self.col = (self.col + 1) % self.num_cols 193 | if (self.col == 0): 194 | self.row = self.row + 1 195 | 196 | def add_separator(self): 197 | self.row = self.row + 1 198 | self.menu.attach(Gtk.SeparatorMenuItem(), 0, self.num_cols, self.row, self.row + 1) 199 | 200 | def add_menuitem(self, menuitem): 201 | self.row = self.row + 1 202 | self.menu.attach(menuitem, 0, self.num_cols, self.row, self.row + 1) 203 | 204 | 205 | class SettingsPage(Gtk.Box): 206 | 207 | def __init__(self): 208 | Gtk.Box.__init__(self) 209 | self.set_orientation(Gtk.Orientation.VERTICAL) 210 | self.set_spacing(15) 211 | self.set_margin_start(80) 212 | self.set_margin_end(80) 213 | self.set_margin_top(15) 214 | self.set_margin_bottom(15) 215 | 216 | def add_section(self): 217 | section = SettingsBox() 218 | self.pack_start(section, False, False, 0) 219 | 220 | return section 221 | 222 | 223 | class SettingsBox(Gtk.Frame): 224 | 225 | def __init__(self): 226 | Gtk.Frame.__init__(self) 227 | self.set_shadow_type(Gtk.ShadowType.IN) 228 | frame_style = self.get_style_context() 229 | frame_style.add_class("view") 230 | self.size_group = Gtk.SizeGroup.new(Gtk.SizeGroupMode.VERTICAL) 231 | 232 | self.box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) 233 | self.add(self.box) 234 | 235 | self.list_box = Gtk.ListBox() 236 | self.list_box.set_selection_mode(Gtk.SelectionMode.NONE) 237 | self.list_box.set_header_func(list_header_func, None) 238 | self.box.add(self.list_box) 239 | 240 | def add_row(self, row): 241 | self.list_box.add(row) 242 | 243 | 244 | class SettingsRow(Gtk.ListBoxRow): 245 | 246 | def __init__(self, label, main_widget, alternative_widget=None): 247 | 248 | self.main_widget = main_widget 249 | self.alternative_widget = alternative_widget 250 | self.label = label 251 | self.stack = Gtk.Stack() 252 | self.stack.set_transition_type(Gtk.StackTransitionType.SLIDE_LEFT_RIGHT) 253 | self.stack.set_transition_duration(1000) 254 | 255 | self.stack.add_named(main_widget, "main_widget") 256 | if alternative_widget is not None: 257 | self.stack.add_named(self.alternative_widget, "alternative_widget") 258 | 259 | Gtk.ListBoxRow.__init__(self) 260 | 261 | hbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL) 262 | hbox.set_border_width(5) 263 | hbox.set_margin_start(20) 264 | hbox.set_margin_end(20) 265 | self.add(hbox) 266 | 267 | grid = Gtk.Grid() 268 | grid.set_column_spacing(15) 269 | hbox.pack_start(grid, True, True, 0) 270 | 271 | self.description_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) 272 | self.description_box.props.hexpand = True 273 | self.description_box.props.halign = Gtk.Align.START 274 | self.description_box.props.valign = Gtk.Align.CENTER 275 | self.label.props.xalign = 0.0 276 | self.description_box.add(self.label) 277 | 278 | grid.attach(self.description_box, 0, 0, 1, 1) 279 | grid.attach_next_to(self.stack, self.description_box, Gtk.PositionType.RIGHT, 1, 1) 280 | 281 | def show_alternative_widget(self): 282 | if self.alternative_widget is not None: 283 | self.stack.set_visible_child(self.alternative_widget) 284 | 285 | 286 | class MintLocale: 287 | 288 | ''' Create the UI ''' 289 | 290 | def __init__(self): 291 | 292 | # Determine path to system locale-config 293 | self.locale_path='/etc/default/locale' 294 | if os.path.exists('/etc/locale.conf'): 295 | self.locale_path='/etc/locale.conf' 296 | 297 | # Prepare the APT cache 298 | if IS_DEBIAN: 299 | self.cache = apt.Cache() 300 | self.cache_updated = False 301 | 302 | # load our glade ui file in 303 | self.builder = Gtk.Builder() 304 | self.builder.set_translation_domain("mintlocale") 305 | self.builder.add_from_file('/usr/share/linuxmint/mintlocale/mintlocale.ui') 306 | 307 | self.window = self.builder.get_object("main_window") 308 | self.window.set_title(_("Language Settings")) 309 | self.window.connect("destroy", Gtk.main_quit) 310 | XApp.set_window_icon_name(self.window, "preferences-desktop-locale") 311 | 312 | self.scale = self.window.get_scale_factor() 313 | 314 | self.toolbar = Gtk.Toolbar() 315 | self.toolbar.get_style_context().add_class("primary-toolbar") 316 | self.builder.get_object("box1").pack_start(self.toolbar, False, False, 0) 317 | 318 | 319 | size_group = Gtk.SizeGroup.new(Gtk.SizeGroupMode.HORIZONTAL) 320 | 321 | self.locale_button = PictureChooserButton(num_cols=2, has_button_label=True, scale=self.scale) 322 | size_group.add_widget(self.locale_button) 323 | self.region_button = PictureChooserButton(num_cols=2, has_button_label=True, scale=self.scale) 324 | size_group.add_widget(self.region_button) 325 | self.time_button = PictureChooserButton(num_cols=2, has_button_label=True, scale=self.scale) 326 | size_group.add_widget(self.time_button) 327 | 328 | self.locale_system_wide_button = Gtk.Button() 329 | self.locale_system_wide_button.set_label(_("Apply System-Wide")) 330 | self.locale_system_wide_button.connect("clicked", self.button_system_language_clicked) 331 | size_group.add_widget(self.locale_system_wide_button) 332 | 333 | self.locale_install_button = Gtk.Button() 334 | self.locale_install_button.set_label(_("Install / Remove Languages...")) 335 | self.locale_install_button.connect("clicked", self.button_install_remove_clicked) 336 | size_group.add_widget(self.locale_install_button) 337 | 338 | self.system_label = Gtk.Label() 339 | self.install_label = Gtk.Label() 340 | 341 | page = SettingsPage() 342 | self.builder.get_object("box1").pack_start(page, True, True, 0) 343 | 344 | language_settings = page.add_section() 345 | 346 | label = Gtk.Label.new() 347 | label.set_markup("%s\n%s" % (_("Language"), _("Language, interface..."))) 348 | row = SettingsRow(label, self.locale_button) 349 | language_settings.add_row(row) 350 | 351 | label = Gtk.Label.new() 352 | label.set_markup("%s\n%s" % (_("Region"), _("Numbers, currency, addresses, measurement..."))) 353 | row = SettingsRow(label, self.region_button) 354 | language_settings.add_row(row) 355 | 356 | label = Gtk.Label.new() 357 | label.set_markup("%s\n%s" % (_("Time format"), _("Date and time..."))) 358 | row = SettingsRow(label, self.time_button) 359 | language_settings.add_row(row) 360 | 361 | self.system_row = SettingsRow(self.system_label, self.locale_system_wide_button) 362 | self.system_row.set_no_show_all(True) 363 | language_settings.add_row(self.system_row) 364 | 365 | self.install_row = SettingsRow(self.install_label, self.locale_install_button) 366 | self.install_row.set_no_show_all(True) 367 | if IS_DEBIAN: 368 | language_settings.add_row(self.install_row) 369 | 370 | self.pam_environment_path = os.path.join(GLib.get_home_dir(), ".pam_environment") 371 | self.xsessionrc_path = os.path.join(GLib.get_home_dir(), ".xsessionrc") 372 | self.dmrc_path = os.path.join(GLib.get_home_dir(), ".dmrc") 373 | self.dmrc = configparser.ConfigParser() 374 | self.dmrc.optionxform = str # force case sensitivity on ConfigParser 375 | self.dmrc.read(self.dmrc_path) 376 | if not self.dmrc.has_section('Desktop'): 377 | self.dmrc.add_section('Desktop') 378 | 379 | current_user = GLib.get_user_name() 380 | 381 | self.current_language = None 382 | dmrc_language = None 383 | env_language = os.environ['LANG'] 384 | 385 | if self.dmrc.has_option('Desktop', 'Language'): 386 | dmrc_language = self.dmrc.get('Desktop', 'Language') 387 | 388 | if dmrc_language is not None: 389 | self.current_language = dmrc_language 390 | else: 391 | self.current_language = env_language 392 | 393 | print("User language in .dmrc: %s" % dmrc_language) 394 | print("User language in $LANG: %s" % env_language) 395 | print("Current language: %s" % self.current_language) 396 | 397 | if 'LC_NUMERIC' in os.environ: 398 | self.current_region = os.environ['LC_NUMERIC'] 399 | else: 400 | self.current_region = self.current_language 401 | 402 | if 'LC_TIME' in os.environ: 403 | self.current_time = os.environ['LC_TIME'] 404 | else: 405 | self.current_time = self.current_language 406 | 407 | if os.path.exists(self.pam_environment_path): 408 | with codecs.open(self.pam_environment_path, 'r', encoding='UTF-8') as pam_file: 409 | for line in pam_file: 410 | line = line.strip() 411 | if line.startswith("LC_NUMERIC="): 412 | self.current_region = line.split("=")[1].replace("\"", "").replace("'", "").strip() 413 | if line.startswith("LC_TIME="): 414 | self.current_time = line.split("=")[1].replace("\"", "").replace("'", "").strip() 415 | 416 | print("Current region: %s" % self.current_region) 417 | print("Current time: %s" % self.current_time) 418 | 419 | # Replace utf8 with UTF-8 (lightDM GTK greeter messes that up) 420 | self.current_language = self.current_language.replace(".utf8", ".UTF-8") 421 | self.current_region = self.current_region.replace(".utf8", ".UTF-8") 422 | self.current_time = self.current_time.replace(".utf8", ".UTF-8") 423 | 424 | self.build_lang_list() 425 | self.set_system_locale() 426 | self.set_num_installed() 427 | 428 | self.accountService = AccountsService.UserManager.get_default().get_user(current_user) 429 | self.accountService.connect('notify::is-loaded', self.accountservice_ready) 430 | 431 | groups = grp.getgrall() 432 | for group in groups: 433 | (name, pw, gid, mem) = group 434 | if name in ("adm", "sudo", "wheel", "root"): 435 | for user in mem: 436 | if current_user == user: 437 | self.system_row.set_no_show_all(False) 438 | self.install_row.set_no_show_all(False) 439 | language_settings.show_all() 440 | break 441 | 442 | self.window.show_all() 443 | 444 | def button_system_language_clicked(self, button): 445 | print("Setting system locale: language '%s', region '%s', time '%s'" % (self.current_language, self.current_region, self.current_time)) 446 | subprocess.call(['pkexec', 'set-default-locale', self.locale_path, self.current_language, self.current_region, self.current_time]) 447 | self.set_system_locale() 448 | pass 449 | 450 | def button_install_remove_clicked(self, button): 451 | os.system("pkexec add-remove-locales") 452 | self.build_lang_list() 453 | self.set_system_locale() 454 | self.set_num_installed() 455 | 456 | # Checks for minority languages that have a flag and returns the corresponding flag_path or the unchanged flag_path 457 | def set_minority_language_flag_path(self, locale_code, flag_path): 458 | # Get the language code from the locale_code. For example, Basque's locale code can be eu or eu_es or eu_fr, Welsh's cy or cy_gb... 459 | language_code = locale_code.split("_")[0] 460 | 461 | if language_code == 'ca': 462 | flag_path = FLAG_PATH % '_catalonia' 463 | elif language_code == 'cy': 464 | flag_path = FLAG_PATH % '_wales' 465 | elif language_code == 'eu': 466 | flag_path = FLAG_PATH % '_basque' 467 | elif language_code == 'gl': 468 | flag_path = FLAG_PATH % '_galicia' 469 | 470 | return flag_path 471 | 472 | def set_system_locale(self): 473 | language_str = _("No locale defined") 474 | region_str = _("No locale defined") 475 | time_str = _("No locale defined") 476 | 477 | # Get system locale 478 | if os.path.exists(self.locale_path): 479 | vars = dict() 480 | with open(self.locale_path) as f: 481 | for line in f: 482 | eq_index = line.find('=') 483 | var_name = line[:eq_index].strip() 484 | value = line[eq_index + 1:].strip() 485 | vars[var_name] = value 486 | if "LANG" in vars: 487 | locale = vars['LANG'].replace('"', '').replace("'", "") 488 | locale = locale.split(".")[0].strip() 489 | if "_" in locale: 490 | split = locale.split("_") 491 | if len(split) == 2: 492 | language_code = split[0] 493 | if language_code in self.languages: 494 | language = self.languages[language_code] 495 | else: 496 | language = language_code 497 | country_code = split[1].lower() 498 | if country_code in self.countries: 499 | country = self.countries[country_code] 500 | else: 501 | country = country_code 502 | language_label = u"%s, %s" % (language, country) 503 | else: 504 | if locale in self.languages: 505 | language_label = self.languages[locale] 506 | else: 507 | language_label = locale 508 | 509 | language_str = language_label 510 | 511 | if "LC_NUMERIC" in vars: 512 | locale = vars['LC_NUMERIC'].replace('"', '').replace("'", "") 513 | locale = locale.split(".")[0].strip() 514 | if "_" in locale: 515 | split = locale.split("_") 516 | if len(split) == 2: 517 | language_code = split[0] 518 | if language_code in self.languages: 519 | language = self.languages[language_code] 520 | else: 521 | language = language_code 522 | country_code = split[1].lower() 523 | if country_code in self.countries: 524 | country = self.countries[country_code] 525 | else: 526 | country = country_code 527 | language_label = u"%s, %s" % (language, country) 528 | else: 529 | if locale in self.languages: 530 | language_label = self.languages[locale] 531 | else: 532 | language_label = locale 533 | 534 | region_str = language_label 535 | 536 | if "LC_TIME" in vars: 537 | locale = vars['LC_TIME'].replace('"', '').replace("'", "") 538 | locale = locale.split(".")[0].strip() 539 | if "_" in locale: 540 | split = locale.split("_") 541 | if len(split) == 2: 542 | language_code = split[0] 543 | if language_code in self.languages: 544 | language = self.languages[language_code] 545 | else: 546 | language = language_code 547 | country_code = split[1].lower() 548 | if country_code in self.countries: 549 | country = self.countries[country_code] 550 | else: 551 | country = country_code 552 | language_label = u"%s, %s" % (language, country) 553 | else: 554 | if locale in self.languages: 555 | language_label = self.languages[locale] 556 | else: 557 | language_label = locale 558 | 559 | time_str = language_label 560 | 561 | 562 | language_prefix = (_("Language:")) 563 | region_prefix = (_("Region:")) 564 | time_prefix = (_("Time format:")) 565 | self.system_label.set_markup("%s\n%s %s\n%s %s\n%s %s" % (_("System locale"), language_prefix, language_str, region_prefix, region_str, time_prefix, time_str)) 566 | 567 | def set_num_installed(self): 568 | num_installed = int(subprocess.check_output("localedef --list-archive | wc -l", shell=True)) 569 | self.install_label.set_markup("%s\n%s" % (_("Language support"), gettext.ngettext("%d language installed", "%d languages installed", num_installed) % num_installed)) 570 | 571 | def accountservice_ready(self, user, param): 572 | self.window.show() 573 | 574 | def build_lang_list(self): 575 | 576 | self.locale_button.clear_menu() 577 | self.region_button.clear_menu() 578 | self.time_button.clear_menu() 579 | self.locale_button.set_button_label(self.current_language) 580 | self.region_button.set_button_label(self.current_region) 581 | self.time_button.set_button_label(self.current_time) 582 | 583 | # Load countries into memory 584 | self.countries = {} 585 | with codecs.open('/usr/share/linuxmint/mintlocale/countries', "r", encoding='utf-8') as file: 586 | for line in file: 587 | line = line.strip() 588 | split = line.split("=") 589 | if len(split) == 2: 590 | self.countries[split[0]] = split[1] 591 | 592 | # Load languages into memory 593 | self.languages = {} 594 | with codecs.open('/usr/share/linuxmint/mintlocale/languages', "r", encoding='utf-8') as file: 595 | for line in file: 596 | line = line.strip() 597 | split = line.split("=") 598 | if len(split) == 2: 599 | self.languages[split[0]] = split[1] 600 | 601 | cur_index = -1 # find the locale :P 602 | locales = subprocess.check_output("localedef --list-archive", shell=True) 603 | locales = locales.decode('utf-8') 604 | if len(locales) == 0: 605 | print("Locale archive not found. Regenerate it with 'sudo locale-gen'.") 606 | sys.exit(1) 607 | 608 | built_locales = {} 609 | for line in locales.rstrip().split("\n"): 610 | line = line.replace("utf8", "UTF-8") 611 | 612 | # Only allow UTF-8 locales 613 | if "UTF-8" not in line: 614 | continue 615 | 616 | cur_index += 1 617 | locale_code = line.split(".")[0].strip() 618 | charmap = None 619 | if len(line.split(".")) > 1: 620 | charmap = line.split(".")[1].strip() 621 | 622 | if "_" in locale_code: 623 | split = locale_code.split("_") 624 | if len(split) == 2: 625 | language_code = split[0] 626 | 627 | if language_code in self.languages: 628 | language = self.languages[language_code] 629 | else: 630 | language = language_code 631 | 632 | country_code = split[1].lower().split('@')[0].strip() 633 | if country_code in self.countries: 634 | country = self.countries[country_code] 635 | else: 636 | country = country_code 637 | 638 | if '@' in split[1]: 639 | language_label = u"%s (@%s), %s" % (language, split[1].split('@')[1].strip(), country) 640 | else: 641 | language_label = u"%s, %s" % (language, country) 642 | 643 | flag_path = FLAG_PATH % country_code 644 | else: 645 | if locale_code in self.languages: 646 | language_label = self.languages[locale_code] 647 | else: 648 | language_label = locale_code 649 | flag_path = FLAG_PATH % locale_code 650 | 651 | flag_path = self.set_minority_language_flag_path(locale_code, flag_path) 652 | 653 | if charmap is not None and charmap != "UTF-8": 654 | language_label = u"%s %s" % (language_label, charmap) 655 | 656 | if os.path.exists(flag_path): 657 | flag = flag_path 658 | else: 659 | flag = FLAG_PATH % '_generic' 660 | 661 | built_locales[language_label] = (line, flag) 662 | 663 | for language_label, (line, flag) in sorted(built_locales.items()): 664 | locale = Locale(line, language_label) 665 | self.locale_button.add_picture(flag, self.set_user_locale, title=language_label, id=locale) 666 | self.region_button.add_picture(flag, self.set_user_region, title=language_label, id=locale) 667 | self.time_button.add_picture(flag, self.set_user_time, title=language_label, id=locale) 668 | 669 | if (line == self.current_language): 670 | self.locale_button.set_picture_from_file(flag) 671 | self.locale_button.set_button_label(language_label) 672 | 673 | if (line == self.current_region): 674 | self.region_button.set_picture_from_file(flag) 675 | self.region_button.set_button_label(language_label) 676 | 677 | if (line == self.current_time): 678 | self.time_button.set_picture_from_file(flag) 679 | self.time_button.set_button_label(language_label) 680 | 681 | self.locale_button.show_all() 682 | self.region_button.show_all() 683 | self.time_button.show_all() 684 | 685 | def set_user_locale(self, path, locale): 686 | self.locale_button.set_button_label(locale.name) 687 | print(u"Setting language to %s" % locale.id) 688 | # Set it in Accounts Service 689 | try: 690 | self.accountService.set_language(locale.id) 691 | except: 692 | pass 693 | 694 | # Set it in .dmrc 695 | self.dmrc.set('Desktop', 'Language', locale.id) 696 | with codecs.open(self.dmrc_path, 'w', encoding='utf-8') as configfile: 697 | self.dmrc.write(configfile) 698 | os.system("sed -i 's/ = /=/g' %s" % self.dmrc_path) # Remove space characters around "="" sign, created by ConfigParser 699 | 700 | self.current_language = locale.id 701 | 702 | # Set it in .pam_environment and .xsessionrc 703 | self.set_pam_environment() 704 | self.set_xsessionrc() 705 | 706 | self.locale_system_wide_button.set_sensitive(True) 707 | 708 | return True 709 | 710 | def set_user_region(self, path, locale): 711 | self.region_button.set_button_label(locale.name) 712 | print("Setting region to %s" % locale.id) 713 | 714 | # We don't call self.accountService.set_formats_locale(locale.id) here... 715 | # First, we don't really use AccountsService, we're only doing this to be nice to LightDM and all.. 716 | # Second, it's Ubuntu specific... 717 | # Third it overwrites LC_TIME in .pam_environment 718 | 719 | self.current_region = locale.id 720 | 721 | # Set it in .pam_environment and .xsessionrc 722 | self.set_pam_environment() 723 | self.set_xsessionrc() 724 | 725 | self.locale_system_wide_button.set_sensitive(True) 726 | 727 | return True 728 | 729 | def set_user_time(self, path, locale): 730 | self.time_button.set_button_label(locale.name) 731 | print("Setting time to %s" % locale.id) 732 | 733 | # We don't call self.accountService.set_formats_locale(locale.id) here... 734 | # First, we don't really use AccountsService, we're only doing this to be nice to LightDM and all.. 735 | # Second, it's Ubuntu specific... 736 | # Third it overwrites LC_TIME in .pam_environment 737 | 738 | self.current_time = locale.id 739 | 740 | # Set it in .pam_environment and .xsessionrc 741 | self.set_pam_environment() 742 | self.set_xsessionrc() 743 | 744 | self.locale_system_wide_button.set_sensitive(True) 745 | 746 | return True 747 | 748 | def set_pam_environment(self): 749 | shortlocale = self.current_language 750 | if "." in self.current_language: 751 | shortlocale = self.current_language.split(".")[0] 752 | 753 | if os.path.exists(self.pam_environment_path): 754 | 755 | # Replace values for present fields 756 | for lc_variable in ['LC_NUMERIC', 'LC_MONETARY', 'LC_PAPER', 'LC_NAME', 'LC_ADDRESS', 'LC_TELEPHONE', 'LC_MEASUREMENT', 'LC_IDENTIFICATION']: 757 | os.system("sed -i 's/^%s=.*/%s=%s/g' %s" % (lc_variable, lc_variable, self.current_region, self.pam_environment_path)) 758 | for lc_variable in ['LANG']: 759 | os.system("sed -i 's/^%s=.*/%s=%s/g' %s" % (lc_variable, lc_variable, self.current_language, self.pam_environment_path)) 760 | for lc_variable in ['LC_TIME']: 761 | os.system("sed -i 's/^%s=.*/%s=%s/g' %s" % (lc_variable, lc_variable, self.current_time, self.pam_environment_path)) 762 | for lc_variable in ['LANGUAGE']: 763 | os.system("sed -i 's/^%s=.*/%s=%s/g' %s" % (lc_variable, lc_variable, shortlocale, self.pam_environment_path)) 764 | 765 | # Check missing fields 766 | with codecs.open(self.pam_environment_path, 'r', encoding='utf-8') as file: 767 | content = file.read() 768 | 769 | for lc_variable in ['LC_NUMERIC', 'LC_MONETARY', 'LC_PAPER', 'LC_NAME', 'LC_ADDRESS', 'LC_TELEPHONE', 'LC_MEASUREMENT', 'LC_IDENTIFICATION']: 770 | if not (("%s=" % lc_variable) in content or ("%s =" % lc_variable) in content): 771 | os.system("echo '%s=%s' >> %s" % (lc_variable, self.current_region, self.pam_environment_path)) 772 | if not ("LC_TIME=" in content or "LC_TIME =" in content): 773 | os.system("echo 'LC_TIME=%s' >> %s" % (self.current_time, self.pam_environment_path)) 774 | 775 | if ("XDG_SEAT_PATH" in os.environ): 776 | # LightDM 777 | if not ("PAPERSIZE=" in content or "PAPERSIZE =" in content): 778 | os.system("echo 'PAPERSIZE=a4' >> %s" % self.pam_environment_path) 779 | if not ("LANGUAGE=" in content or "LANGUAGE =" in content): 780 | os.system("echo 'LANGUAGE=%s' >> %s" % (shortlocale, self.pam_environment_path)) 781 | if not ("LANG=" in content or "LANG =" in content): 782 | os.system("echo 'LANG=%s' >> %s" % (self.current_language, self.pam_environment_path)) 783 | else: 784 | # MDM 785 | for lc_variable in ['LANGUAGE', 'LANG']: 786 | os.system("sed -i '/^%s=.*/d' %s" % (lc_variable, self.pam_environment_path)) 787 | 788 | else: 789 | if ("XDG_SEAT_PATH" in os.environ): 790 | # LightDM 791 | os.system("sed -e 's/$locale/%s/g' -e 's/$shortlocale/%s/g' -e 's/$region/%s/g' -e 's/$time/%s/g' /usr/share/linuxmint/mintlocale/templates/lightdm_pam_environment.template > %s" % (self.current_language, shortlocale, self.current_region, self.current_time, self.pam_environment_path)) 792 | else: 793 | # MDM 794 | os.system("sed -e 's/$locale/%s/g' -e 's/$region/%s/g' -e 's/$time/%s/g' /usr/share/linuxmint/mintlocale/templates/mdm_pam_environment.template > %s" % (self.current_language, self.current_region, self.current_time, self.pam_environment_path)) 795 | 796 | def set_xsessionrc(self): 797 | shortlocale = self.current_language 798 | if "." in self.current_language: 799 | shortlocale = self.current_language.split(".")[0] 800 | 801 | if not os.path.exists(self.xsessionrc_path): 802 | os.mknod(self.xsessionrc_path) 803 | 804 | # Replace values for present fields 805 | for lc_variable in ['LC_NUMERIC', 'LC_MONETARY', 'LC_PAPER', 'LC_NAME', 'LC_ADDRESS', 'LC_TELEPHONE', 'LC_MEASUREMENT', 'LC_IDENTIFICATION']: 806 | os.system("sed -i 's/^%s=.*/%s=%s/g' %s" % (lc_variable, lc_variable, self.current_region, self.xsessionrc_path)) 807 | for lc_variable in ['LANG']: 808 | os.system("sed -i 's/^%s=.*/%s=%s/g' %s" % (lc_variable, lc_variable, self.current_language, self.xsessionrc_path)) 809 | for lc_variable in ['LC_TIME']: 810 | os.system("sed -i 's/^%s=.*/%s=%s/g' %s" % (lc_variable, lc_variable, self.current_time, self.xsessionrc_path)) 811 | for lc_variable in ['LANGUAGE']: 812 | os.system("sed -i 's/^%s=.*/%s=%s/g' %s" % (lc_variable, lc_variable, shortlocale, self.xsessionrc_path)) 813 | 814 | # Check missing fields 815 | with codecs.open(self.xsessionrc_path, 'r', encoding='utf-8') as file: 816 | content = file.read() 817 | 818 | for lc_variable in ['LC_NUMERIC', 'LC_MONETARY', 'LC_PAPER', 'LC_NAME', 'LC_ADDRESS', 'LC_TELEPHONE', 'LC_MEASUREMENT', 'LC_IDENTIFICATION']: 819 | if not (("%s=" % lc_variable) in content or ("%s =" % lc_variable) in content): 820 | os.system("echo '%s=%s' >> %s" % (lc_variable, self.current_region, self.xsessionrc_path)) 821 | if not ("LC_TIME=" in content or "LC_TIME =" in content): 822 | os.system("echo 'LC_TIME=%s' >> %s" % (self.current_time, self.xsessionrc_path)) 823 | if not ("PAPERSIZE=" in content or "PAPERSIZE =" in content): 824 | os.system("echo 'PAPERSIZE=a4' >> %s" % self.xsessionrc_path) 825 | if not ("LANGUAGE=" in content or "LANGUAGE =" in content): 826 | os.system("echo 'LANGUAGE=%s' >> %s" % (shortlocale, self.xsessionrc_path)) 827 | if not ("LANG=" in content or "LANG =" in content): 828 | os.system("echo 'LANG=%s' >> %s" % (self.current_language, self.xsessionrc_path)) 829 | 830 | if __name__ == "__main__": 831 | 832 | MintLocale() 833 | Gtk.main() 834 | -------------------------------------------------------------------------------- /usr/share/applications/mintlocale-im.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Input method 3 | Name[am]=የማስገቢያ ዘዴ 4 | Name[ar]=أسلوب الإدخال 5 | Name[be]=Метад уводу 6 | Name[bg]=Метод за въвеждане 7 | Name[ca]=Mètode d'entrada 8 | Name[ca@valencia]=Mètode d'entrada 9 | Name[cs]=Metoda zadávání znaků 10 | Name[cy]=Dull mewnbwn 11 | Name[da]=Indtastningsmetode 12 | Name[de]=Eingabemethode 13 | Name[el]=Μέθοδος εισόδου 14 | Name[eo]=Eniga metodo 15 | Name[es]=Método de entrada 16 | Name[et]=Sisestusmeetod 17 | Name[eu]=Sarrera-metodoa 18 | Name[fi]=Syöttötapa 19 | Name[fr]=Méthode de saisie 20 | Name[fr_CA]=Méthode de saisie 21 | Name[frp]=Mètoda d’entrâ 22 | Name[fy]=Ynfiermetoade 23 | Name[gd]=Dòigh ion-chuir 24 | Name[gl]=Método de entrada 25 | Name[he]=שיטת קלט 26 | Name[hi]=इनपुट विधि 27 | Name[hr]=Način unosa 28 | Name[hu]=Beviteli mód 29 | Name[ia]=Methodo de input 30 | Name[id]=Metode Input 31 | Name[ie]=Metode de intrada 32 | Name[is]=Inntaksaðferð 33 | Name[it]=Metodo di immissione 34 | Name[ja]=入力方法 35 | Name[kab]=Tarrayt n usekcem 36 | Name[kk]=Енгізу әдісі 37 | Name[ko]=한글 입력 38 | Name[ku]=Şêweyê têketinê 39 | Name[lo]=ທາງເລືອກການໃສ່ຂໍ້ມູນ 40 | Name[lt]=Įvesties metodas 41 | Name[lv]=Ievades metode 42 | Name[mr]=इनपुट पद्धत 43 | Name[ms]=Kaedah input 44 | Name[nap]=Metodo d'immissione 45 | Name[nb]=Inndatametode 46 | Name[nds]=Eingabemethode 47 | Name[ne]=प्रविष्टि हुने तरिका 48 | Name[nl]=Invoermethode 49 | Name[oc]=Metòde de sasida 50 | Name[pap]=Metodo di yena 51 | Name[pl]=Sposób wprowadzania tekstu 52 | Name[pt]=Método de introdução 53 | Name[pt_BR]=Método de entrada 54 | Name[ro]=Metodă de introducere 55 | Name[ru]=Способ ввода 56 | Name[sc]=Mètodu de mintidura 57 | Name[sk]=Metóda vstupu 58 | Name[sl]=Način vnosa 59 | Name[sr]=Начин уноса 60 | Name[sr@latin]=Način unosa 61 | Name[sv]=Inmatningsmetod 62 | Name[ta]=உள்ளீட்டு முறை 63 | Name[th]=วิธีการป้อนข้อมูล 64 | Name[tr]=Giriş yöntemi 65 | Name[tt]=Кертү ысулы 66 | Name[uk]=Метод введення 67 | Name[ur]=لکھنے کی طرز 68 | Name[uz]=Киритиш усули 69 | Name[vi]=Phương thức nhập 70 | Name[zh_CN]=输入法 71 | Name[zh_HK]=輸入法 72 | Name[zh_TW]=輸入法 73 | Comment=Language settings 74 | Comment[am]=ቋንቋ ማሰናጃዎች 75 | Comment[ar]=إعدادات اللغة 76 | Comment[az]=Dil tәnzimlәmәlәri 77 | Comment[be]=Настáўленні мовы 78 | Comment[bg]=Езикови настройки 79 | Comment[bs]=Jezičke postavke 80 | Comment[ca]=Ajusts de l'idioma 81 | Comment[ca@valencia]=Configuració d'idioma 82 | Comment[cs]=Jazyková nastavení 83 | Comment[cy]=Gosodiadau iaith 84 | Comment[da]=Sprogindstillinger 85 | Comment[de]=Spracheinstellungen 86 | Comment[el]=Ρυθμίσεις γλώσσας 87 | Comment[eo]=Lingvaj agordoj 88 | Comment[es]=Configuración del idioma 89 | Comment[et]=Keele seaded 90 | Comment[eu]=Hizkuntzaren ezarpenak 91 | Comment[fi]=Kieliasetukset 92 | Comment[fr]=Paramètres de langue 93 | Comment[fr_CA]=Paramètres de langue 94 | Comment[frp]=Configuracions de lèngua 95 | Comment[fy]=Taalynstellingen 96 | Comment[gd]=Roghainnean cànain 97 | Comment[gl]=Axustes do idioma 98 | Comment[he]=הגדרות שפה 99 | Comment[hi]=भाषीय सेटिंग्स 100 | Comment[hr]=Postavke jezika 101 | Comment[hu]=Nyelvi beállítások 102 | Comment[ia]=Configurationes del lingua 103 | Comment[id]=Pengaturan bahasa 104 | Comment[ie]=Parametres de lingue 105 | Comment[is]=Tungumálastillingar 106 | Comment[it]=Impostazioni lingua 107 | Comment[ja]=言語の設定 108 | Comment[kab]=Iɣewwaṛen n tutlayt 109 | Comment[kk]=Тіл баптаулары 110 | Comment[km]=ការ​កំណត់​ភាសា 111 | Comment[ko]=언어 설정 112 | Comment[ku]=Mîhengên ziman 113 | Comment[lo]=ຕັ້ງຄ່າພາສາ 114 | Comment[lt]=Kalbos nustatymai 115 | Comment[lv]=Valodas iestatījumi 116 | Comment[ml]=ഭാഷ ക്രമീകരണങ്ങൾ 117 | Comment[mr]=भाषा संयोजना 118 | Comment[ms]=Tetapan bahasa 119 | Comment[nap]=Settaggi d''a lengua 120 | Comment[nb]=Språkinnstillinger 121 | Comment[nds]=Spracheinstellungen 122 | Comment[ne]=भाषा सेटिंग्स ! 123 | Comment[nl]=Taalinstellingen 124 | Comment[oc]=Paramètres de lenga 125 | Comment[pap]=Opshonnan pa e idioma 126 | Comment[pl]=Ustawienia języka 127 | Comment[pt]=Definições de idioma 128 | Comment[pt_BR]=Configurações de idioma 129 | Comment[ro]=Setări limbă 130 | Comment[ru]=Настройки языка 131 | Comment[sc]=Sèberos de sa limba 132 | Comment[sk]=Nastavenia jazyka 133 | Comment[sl]=Nastavitve jezika 134 | Comment[sq]=Rregullimet për gjuhën 135 | Comment[sr]=Подешавања језика 136 | Comment[sr@latin]=Postavke jezika 137 | Comment[sv]=Språkinställningar 138 | Comment[ta]=மொழி அமைப்புகள் 139 | Comment[tg]=Танзимоти забон 140 | Comment[th]=การตั้งค่าภาษา 141 | Comment[tr]=Dil ayarları 142 | Comment[tt]=Тел көйләүләре 143 | Comment[uk]=Налаштування мови 144 | Comment[ur]=زبان کی ترتیبات 145 | Comment[uz]=Тил созламалари 146 | Comment[vi]=Thiết lập ngôn ngữ 147 | Comment[zh_CN]=语言设置 148 | Comment[zh_HK]=語言設定 149 | Comment[zh_TW]=語言設定 150 | Exec=mintlocale-im 151 | Icon=mintlocale-im 152 | Terminal=false 153 | Type=Application 154 | Encoding=UTF-8 155 | Categories=GNOME;GTK;Settings;DesktopSettings;XFCE;X-XFCE-SettingsDialog;X-XFCE-SystemSettings; 156 | StartupNotify=false 157 | -------------------------------------------------------------------------------- /usr/share/applications/mintlocale.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Languages 3 | Name[am]=ቋንቋዎች 4 | Name[ar]=اللغات 5 | Name[az]=Dillər 6 | Name[be]=Мовы 7 | Name[bg]=Езици 8 | Name[bs]=Jezici 9 | Name[ca]=Idiomes 10 | Name[ca@valencia]=Idiomes 11 | Name[cs]=Jazyky 12 | Name[cy]=Ieithoedd 13 | Name[da]=Sprog 14 | Name[de]=Sprachen 15 | Name[el]=Γλώσσες 16 | Name[eo]=Lingvoj 17 | Name[es]=Idiomas 18 | Name[et]=Keeled 19 | Name[eu]=Hizkuntzak 20 | Name[fi]=Kielet 21 | Name[fr]=Langues 22 | Name[fr_CA]=Langues 23 | Name[frp]=Lèngües 24 | Name[fy]=Talen 25 | Name[gd]=Cànain 26 | Name[gl]=Idiomas 27 | Name[he]=שפות 28 | Name[hi]=भाषाएँ 29 | Name[hr]=Jezici 30 | Name[hu]=Nyelvek 31 | Name[ia]=Linguas 32 | Name[id]=Bahasa 33 | Name[ie]=Lingues 34 | Name[is]=Tungumál 35 | Name[it]=Lingue 36 | Name[ja]=言語 37 | Name[ka]=ენები 38 | Name[kab]=Tutlayin 39 | Name[kk]=Тілдер 40 | Name[km]=ភាសា 41 | Name[ko]=언어 42 | Name[ku]=Ziman 43 | Name[lo]=ພາສາ 44 | Name[lt]=Kalbos 45 | Name[lv]=Valodas 46 | Name[ml]=ഭാഷകള്‍ 47 | Name[mr]=भाषा 48 | Name[ms]=Bahasa 49 | Name[nap]=Lengue 50 | Name[nb]=Språk 51 | Name[nds]=Sprachen 52 | Name[ne]=भाषाहरु 53 | Name[nl]=Talen 54 | Name[oc]=Lengas 55 | Name[pap]=Idiomanan 56 | Name[pl]=Języki 57 | Name[pt]=Idiomas 58 | Name[pt_BR]=Idiomas 59 | Name[ro]=Limbi 60 | Name[ru]=Языки 61 | Name[sc]=Limbas 62 | Name[sk]=Jazyky 63 | Name[sl]=Jeziki 64 | Name[sq]=Gjuhët 65 | Name[sr]=Језици 66 | Name[sr@latin]=Jezici 67 | Name[sv]=Språk 68 | Name[ta]=மொழிகள் 69 | Name[tg]=Забонҳо 70 | Name[th]=ภาษา 71 | Name[tr]=Diller 72 | Name[tt]=Телләр 73 | Name[uk]=Мови 74 | Name[ur]=زبانیں 75 | Name[uz]=Тиллар 76 | Name[vi]=Ngôn ngữ 77 | Name[zh_CN]=语言 78 | Name[zh_HK]=語言 79 | Name[zh_TW]=語言 80 | Comment=Language settings 81 | Comment[am]=ቋንቋ ማሰናጃዎች 82 | Comment[ar]=إعدادات اللغة 83 | Comment[az]=Dil tәnzimlәmәlәri 84 | Comment[be]=Настáўленні мовы 85 | Comment[bg]=Езикови настройки 86 | Comment[bs]=Jezičke postavke 87 | Comment[ca]=Ajusts de l'idioma 88 | Comment[ca@valencia]=Configuració d'idioma 89 | Comment[cs]=Jazyková nastavení 90 | Comment[cy]=Gosodiadau iaith 91 | Comment[da]=Sprogindstillinger 92 | Comment[de]=Spracheinstellungen 93 | Comment[el]=Ρυθμίσεις γλώσσας 94 | Comment[eo]=Lingvaj agordoj 95 | Comment[es]=Configuración del idioma 96 | Comment[et]=Keele seaded 97 | Comment[eu]=Hizkuntzaren ezarpenak 98 | Comment[fi]=Kieliasetukset 99 | Comment[fr]=Paramètres de langue 100 | Comment[fr_CA]=Paramètres de langue 101 | Comment[frp]=Configuracions de lèngua 102 | Comment[fy]=Taalynstellingen 103 | Comment[gd]=Roghainnean cànain 104 | Comment[gl]=Axustes do idioma 105 | Comment[he]=הגדרות שפה 106 | Comment[hi]=भाषीय सेटिंग्स 107 | Comment[hr]=Postavke jezika 108 | Comment[hu]=Nyelvi beállítások 109 | Comment[ia]=Configurationes del lingua 110 | Comment[id]=Pengaturan bahasa 111 | Comment[ie]=Parametres de lingue 112 | Comment[is]=Tungumálastillingar 113 | Comment[it]=Impostazioni lingua 114 | Comment[ja]=言語の設定 115 | Comment[kab]=Iɣewwaṛen n tutlayt 116 | Comment[kk]=Тіл баптаулары 117 | Comment[km]=ការ​កំណត់​ភាសា 118 | Comment[ko]=언어 설정 119 | Comment[ku]=Mîhengên ziman 120 | Comment[lo]=ຕັ້ງຄ່າພາສາ 121 | Comment[lt]=Kalbos nustatymai 122 | Comment[lv]=Valodas iestatījumi 123 | Comment[ml]=ഭാഷ ക്രമീകരണങ്ങൾ 124 | Comment[mr]=भाषा संयोजना 125 | Comment[ms]=Tetapan bahasa 126 | Comment[nap]=Settaggi d''a lengua 127 | Comment[nb]=Språkinnstillinger 128 | Comment[nds]=Spracheinstellungen 129 | Comment[ne]=भाषा सेटिंग्स ! 130 | Comment[nl]=Taalinstellingen 131 | Comment[oc]=Paramètres de lenga 132 | Comment[pap]=Opshonnan pa e idioma 133 | Comment[pl]=Ustawienia języka 134 | Comment[pt]=Definições de idioma 135 | Comment[pt_BR]=Configurações de idioma 136 | Comment[ro]=Setări limbă 137 | Comment[ru]=Настройки языка 138 | Comment[sc]=Sèberos de sa limba 139 | Comment[sk]=Nastavenia jazyka 140 | Comment[sl]=Nastavitve jezika 141 | Comment[sq]=Rregullimet për gjuhën 142 | Comment[sr]=Подешавања језика 143 | Comment[sr@latin]=Postavke jezika 144 | Comment[sv]=Språkinställningar 145 | Comment[ta]=மொழி அமைப்புகள் 146 | Comment[tg]=Танзимоти забон 147 | Comment[th]=การตั้งค่าภาษา 148 | Comment[tr]=Dil ayarları 149 | Comment[tt]=Тел көйләүләре 150 | Comment[uk]=Налаштування мови 151 | Comment[ur]=زبان کی ترتیبات 152 | Comment[uz]=Тил созламалари 153 | Comment[vi]=Thiết lập ngôn ngữ 154 | Comment[zh_CN]=语言设置 155 | Comment[zh_HK]=語言設定 156 | Comment[zh_TW]=語言設定 157 | Exec=mintlocale 158 | Icon=preferences-desktop-locale 159 | Terminal=false 160 | Type=Application 161 | Encoding=UTF-8 162 | Categories=GNOME;GTK;Settings;DesktopSettings;XFCE;X-XFCE-SettingsDialog;X-XFCE-SystemSettings; 163 | StartupNotify=false 164 | -------------------------------------------------------------------------------- /usr/share/icons/hicolor/16x16/apps/mintlocale-im.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linuxmint/mintlocale/2d317c509736d67c310e2d6234f89cbcfdd9e804/usr/share/icons/hicolor/16x16/apps/mintlocale-im.png -------------------------------------------------------------------------------- /usr/share/icons/hicolor/22x22/apps/mintlocale-im.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linuxmint/mintlocale/2d317c509736d67c310e2d6234f89cbcfdd9e804/usr/share/icons/hicolor/22x22/apps/mintlocale-im.png -------------------------------------------------------------------------------- /usr/share/icons/hicolor/24x24/apps/mintlocale-im.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linuxmint/mintlocale/2d317c509736d67c310e2d6234f89cbcfdd9e804/usr/share/icons/hicolor/24x24/apps/mintlocale-im.png -------------------------------------------------------------------------------- /usr/share/icons/hicolor/32x32/apps/mintlocale-im.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linuxmint/mintlocale/2d317c509736d67c310e2d6234f89cbcfdd9e804/usr/share/icons/hicolor/32x32/apps/mintlocale-im.png -------------------------------------------------------------------------------- /usr/share/icons/hicolor/48x48/apps/mintlocale-im.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linuxmint/mintlocale/2d317c509736d67c310e2d6234f89cbcfdd9e804/usr/share/icons/hicolor/48x48/apps/mintlocale-im.png -------------------------------------------------------------------------------- /usr/share/linuxmint/adjustments/15-mintlocale.menu: -------------------------------------------------------------------------------- 1 | hide /usr/share/applications/im-config.desktop 2 | 3 | -------------------------------------------------------------------------------- /usr/share/linuxmint/mintlocale/add.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | True 7 | True 8 | center 9 | 800 10 | 600 11 | preferences-desktop-locale 12 | 13 | 14 | True 15 | False 16 | 6 17 | vertical 18 | 19 | 20 | True 21 | False 22 | in 23 | 24 | 25 | True 26 | True 27 | True 28 | False 29 | True 30 | True 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | True 39 | True 40 | 0 41 | 42 | 43 | 44 | 45 | True 46 | False 47 | 6 48 | 6 49 | center 50 | 51 | 52 | Cancel 53 | True 54 | True 55 | True 56 | 57 | 58 | False 59 | True 60 | 0 61 | 62 | 63 | 64 | 65 | Install 66 | True 67 | False 68 | True 69 | True 70 | True 71 | Install the selected language 72 | Install the selected language 73 | 74 | 75 | False 76 | True 77 | 1 78 | 79 | 80 | 81 | 82 | False 83 | True 84 | 1 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /usr/share/linuxmint/mintlocale/countries: -------------------------------------------------------------------------------- 1 | ad=Andorra 2 | ae=United Arab Emirates 3 | af=Afghanistan 4 | ag=Antigua and Barbuda 5 | ai=Anguilla 6 | al=Albania 7 | am=Armenia 8 | an=Netherlands Antilles 9 | ao=Angola 10 | aq=Antarctica 11 | ar=Argentina 12 | as=American Samoa 13 | at=Austria 14 | au=Australia 15 | aw=Aruba 16 | az=Azerbaijan 17 | ba=Bosnia-Herzegovina 18 | bb=Barbados 19 | bd=Bangladesh 20 | be=Belgium 21 | bf=Burkina Faso 22 | bg=Bulgaria 23 | bh=Bahrain 24 | bi=Burundi 25 | bj=Benin 26 | bm=Bermuda 27 | bn=Brunei Darussalam 28 | bo=Bolivia 29 | br=Brazil 30 | bs=Bahamas 31 | bt=Bhutan 32 | bv=Bouvet Island 33 | bw=Botswana 34 | by=Belarus 35 | bz=Belize 36 | ca=Canada 37 | cc=Cocos (Keeling) Islands 38 | cd=The Democratic Republic of The Congo 39 | cf=Central African Republic 40 | cg=Congo 41 | ch=Switzerland 42 | ci=Ivory Coast 43 | ck=Cook Islands 44 | cl=Chile 45 | cm=Cameroon 46 | cn=China 47 | co=Colombia 48 | cr=Costa Rica 49 | cu=Cuba 50 | cv=Cape Verde 51 | cx=Christmas Island 52 | cy=Cyprus 53 | cz=Czech Republic 54 | de=Germany 55 | dj=Djibouti 56 | dk=Denmark 57 | dm=Dominica 58 | do=Dominican Republic 59 | dz=Algeria 60 | ec=Ecuador 61 | ee=Estonia 62 | eg=Egypt 63 | eh=Western Sahara 64 | er=Eritrea 65 | es=Spain 66 | et=Ethiopia 67 | fi=Finland 68 | fj=Fiji 69 | fk=Falkland Islands (Malvinas) 70 | fm=Micronesia 71 | fo=Faroe Islands 72 | fr=France 73 | ga=Gabon 74 | gb=United Kingdom 75 | gd=Grenada 76 | ge=Georgia 77 | gf=French Guiana 78 | gh=Ghana 79 | gi=Gibraltar 80 | gl=Greenland 81 | gm=Gambia 82 | gn=Guinea 83 | gp=Guadeloupe (Fr.) 84 | gq=Equatorial Guinea 85 | gr=Greece 86 | gs=South Georgia And The South Sandwich Islands 87 | gt=Guatemala 88 | gu=Guam (U.S.) 89 | gw=Guinea-Bissau 90 | gy=Guyana 91 | hk=Hong Kong 92 | hm=Heard Island And Mcdonald Islands 93 | hn=Honduras 94 | hr=Croatia 95 | ht=Haiti 96 | hu=Hungary 97 | id=Indonesia 98 | ie=Ireland 99 | il=Israel 100 | im=Isle of Man 101 | in=India 102 | io=British Indian Ocean Territory 103 | iq=Iraq 104 | ir=Iran 105 | is=Iceland 106 | it=Italy 107 | jm=Jamaica 108 | jo=Jordan 109 | jp=Japan 110 | ke=Kenya 111 | kg=Kyrgyzstan 112 | kh=Cambodia 113 | ki=Kiribati 114 | km=Comoros 115 | kn=Saint Kitts and Nevis 116 | kp=Korea (North) 117 | kr=Korea (South) 118 | kw=Kuwait 119 | ky=Cayman Islands 120 | kz=Kazakstan 121 | la=Lao People's Democratic Republic 122 | lb=Lebanon 123 | lc=Saint Lucia 124 | li=Liechtenstein 125 | lk=Sri Lanka 126 | lr=Liberia 127 | ls=Lesotho 128 | lt=Lithuania 129 | lu=Luxembourg 130 | lv=Latvia 131 | ly=Libyan Arab Jamahiriya 132 | ma=Morocco 133 | mc=Monaco 134 | md=Moldova 135 | me=Montenegro 136 | mg=Madagascar 137 | mh=Marshall Islands 138 | mk=North Macedonia 139 | ml=Mali 140 | mm=Myanmar 141 | mn=Mongolia 142 | mo=Macau 143 | mp=Northern Mariana Islands 144 | mq=Martinique 145 | mr=Mauritania 146 | ms=Montserrat 147 | mt=Malta 148 | mu=Mauritius 149 | mv=Maldives 150 | mw=Malawi 151 | mx=Mexico 152 | my=Malaysia 153 | mz=Mozambique 154 | na=Namibia 155 | nc=New Caledonia (Fr.) 156 | ne=Niger 157 | nf=Norfolk Island 158 | ng=Nigeria 159 | ni=Nicaragua 160 | nl=Netherlands 161 | no=Norway 162 | np=Nepal 163 | nr=Nauru 164 | nu=Niue 165 | nz=New Zealand 166 | om=Oman 167 | pa=Panama 168 | pe=Peru 169 | pf=Polynesia (Fr.) 170 | pg=Papua New Guinea 171 | ph=Philippines 172 | pk=Pakistan 173 | pl=Poland 174 | pm=Saint Pierre and Miquelon 175 | pn=Pitcairn 176 | pr=Puerto Rico (U.S.) 177 | ps=Palestinian Territory, Occupied 178 | pt=Portugal 179 | pw=Palau 180 | py=Paraguay 181 | qa=Qatar 182 | re=Reunion (Fr.) 183 | ro=Romania 184 | ru=Russia 185 | rw=Rwanda 186 | sa=Saudi Arabia 187 | sb=Solomon Islands 188 | sc=Seychelles 189 | sd=Sudan 190 | se=Sweden 191 | sg=Singapore 192 | sh=Saint Helena 193 | si=Slovenia 194 | sj=Svalbard and Jan Mayen 195 | sk=Slovakia 196 | sl=Sierra Leone 197 | sm=San Marino 198 | sn=Senegal 199 | so=Somalia 200 | sr=Suriname 201 | st=Sao Tome And Principe 202 | su=U.S.S.R. 203 | sv=El Salvador 204 | sy=Syrian Arab Republic 205 | sz=Swaziland 206 | tc=Turks And Caicos Islands 207 | td=Chad 208 | tf=French Southern Territories 209 | tg=Togo 210 | th=Thailand 211 | tj=Tajikistan 212 | tk=Tokelau 213 | tm=Turkmenistan 214 | tn=Tunisia 215 | to=Tonga 216 | tp=East Timor 217 | tr=Turkey 218 | tt=Trinidad and Tobago 219 | tv=Tuvalu 220 | tw=Taiwan 221 | tz=Tanzania 222 | ua=Ukraine 223 | ug=Uganda 224 | uk=United Kingdom 225 | um=United States Minor Outlying Islands 226 | us=United States 227 | uy=Uruguay 228 | uz=Uzbekistan 229 | va=Holy See (Vatican City State) 230 | vc=St. Vincent and the Grenadines 231 | ve=Venezuela 232 | vg=Virgin Islands, British 233 | vi=Virgin Islands, U.S. 234 | vn=Vietnam 235 | vu=Vanuatu 236 | wf=Wallis and Futuna 237 | ws=Samoa 238 | ye=Yemen 239 | yt=Mayotte 240 | yu=Yugoslavia 241 | za=South Africa 242 | zm=Zambia 243 | zw=Zimbabwe 244 | rs=Serbia 245 | -------------------------------------------------------------------------------- /usr/share/linuxmint/mintlocale/data/pkg_depends: -------------------------------------------------------------------------------- 1 | ../language_packs -------------------------------------------------------------------------------- /usr/share/linuxmint/mintlocale/iminfo/fcitx.info: -------------------------------------------------------------------------------- 1 | fcitx 2 | fcitx-config-gtk 3 | fcitx-config-gtk2 4 | fcitx-frontend-all 5 | fcitx-frontend-fbterm 6 | fcitx-frontend-gtk2 7 | fcitx-frontend-gtk3 8 | fcitx-frontend-qt4 9 | fcitx-frontend-qt5 10 | fcitx-keyboard 11 | fcitx-libs 12 | fcitx-libs-gclient 13 | fcitx-libs-qt 14 | fcitx-libs-qt5 15 | fcitx-module-dbus 16 | fcitx-module-kimpanel 17 | fcitx-module-lua 18 | fcitx-module-x11 19 | fcitx-modules 20 | fcitx-tools 21 | fcitx-ui-classic 22 | gir1.2-fcitx-1.0 23 | im-config 24 | poppler-data -------------------------------------------------------------------------------- /usr/share/linuxmint/mintlocale/iminfo/ibus.info: -------------------------------------------------------------------------------- 1 | gir1.2-ibus-1.0 2 | ibus 3 | ibus-clutter 4 | ibus-gtk 5 | ibus-gtk3 6 | ibus-qt4 7 | ibus-table 8 | im-config 9 | poppler-data -------------------------------------------------------------------------------- /usr/share/linuxmint/mintlocale/iminfo/locale/ja.info: -------------------------------------------------------------------------------- 1 | fcitx-mozc 2 | fonts-ipafont-mincho 3 | fonts-takao-gothic 4 | fonts-takao-mincho 5 | ibus-mozc 6 | mozc-data 7 | mozc-server 8 | mozc-utils-gui -------------------------------------------------------------------------------- /usr/share/linuxmint/mintlocale/iminfo/locale/ko.info: -------------------------------------------------------------------------------- 1 | fcitx-hangul 2 | ibus-hangul -------------------------------------------------------------------------------- /usr/share/linuxmint/mintlocale/iminfo/locale/te.info: -------------------------------------------------------------------------------- 1 | fonts-telu 2 | fcitx-m17n 3 | ibus-m17n 4 | -------------------------------------------------------------------------------- /usr/share/linuxmint/mintlocale/iminfo/locale/th.info: -------------------------------------------------------------------------------- 1 | fcitx-table 2 | fcitx-table-thai 3 | fonts-thai-tlwg 4 | gtk-im-libthai 5 | ibus-libthai 6 | ibus-table-thai -------------------------------------------------------------------------------- /usr/share/linuxmint/mintlocale/iminfo/locale/vi.info: -------------------------------------------------------------------------------- 1 | fcitx-unikey 2 | ibus-unikey -------------------------------------------------------------------------------- /usr/share/linuxmint/mintlocale/iminfo/locale/zh-hans.info: -------------------------------------------------------------------------------- 1 | fcitx-module-cloudpinyin 2 | fcitx-pinyin 3 | fcitx-sunpinyin 4 | fcitx-table 5 | fcitx-table-wubi 6 | fonts-arphic-ukai 7 | fonts-arphic-uming 8 | fonts-noto-cjk 9 | ibus-sunpinyin 10 | ibus-table-wubi -------------------------------------------------------------------------------- /usr/share/linuxmint/mintlocale/iminfo/locale/zh-hant.info: -------------------------------------------------------------------------------- 1 | fcitx-chewing 2 | fcitx-pinyin 3 | fcitx-table-cangjie 4 | fonts-arphic-ukai 5 | fonts-arphic-uming 6 | fonts-noto-cjk 7 | ibus-chewing 8 | ibus-table-cangjie3 9 | ibus-table-cangjie5 10 | ibus-table-quick-classic -------------------------------------------------------------------------------- /usr/share/linuxmint/mintlocale/iminfo/uim.info: -------------------------------------------------------------------------------- 1 | im-config 2 | uim 3 | uim-applet-gnome 4 | uim-common 5 | uim-dict-gtk 6 | uim-dict-gtk3 7 | uim-fep 8 | uim-gtk2.0 9 | uim-gtk3 10 | uim-qt 11 | uim-utils 12 | uim-xim -------------------------------------------------------------------------------- /usr/share/linuxmint/mintlocale/install_remove.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | True 8 | True 9 | center 10 | 800 11 | 600 12 | preferences-desktop-locale 13 | 14 | 15 | True 16 | False 17 | 6 18 | vertical 19 | 6 20 | 21 | 22 | True 23 | False 24 | in 25 | 26 | 27 | True 28 | True 29 | True 30 | False 31 | True 32 | True 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | True 41 | True 42 | 0 43 | 44 | 45 | 46 | 47 | True 48 | False 49 | <b><small>Note: Installing or upgrading language packs can trigger the installation of additional languages</small></b> 50 | True 51 | 52 | 53 | False 54 | True 55 | 1 56 | 57 | 58 | 59 | 60 | True 61 | False 62 | 6 63 | 6 64 | center 65 | 66 | 67 | Add... 68 | True 69 | True 70 | True 71 | True 72 | Add a new language 73 | Add a new language 74 | 75 | 76 | False 77 | True 78 | 0 79 | 80 | 81 | 82 | 83 | Remove 84 | True 85 | False 86 | True 87 | True 88 | True 89 | Remove the selected language 90 | Remove the selected language 91 | 92 | 93 | False 94 | True 95 | 1 96 | 97 | 98 | 99 | 100 | Install language packs 101 | True 102 | False 103 | True 104 | True 105 | True 106 | Install any missing language packs, translations files, dictionaries for the selected language 107 | Install any missing language packs, translations files, dictionaries for the selected language 108 | 109 | 110 | False 111 | True 112 | 2 113 | 114 | 115 | 116 | 117 | False 118 | True 119 | 2 120 | 121 | 122 | 123 | 124 | True 125 | True 126 | 6 127 | end 128 | 129 | 130 | Close 131 | True 132 | True 133 | True 134 | 135 | 136 | False 137 | True 138 | 0 139 | 140 | 141 | 142 | 143 | False 144 | False 145 | 3 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /usr/share/linuxmint/mintlocale/language_packs: -------------------------------------------------------------------------------- 1 | # 2 | # This file is based on pkg_depends (from language-selector-gnome) 3 | # 4 | # File format: 5 | # Column 1: category (tr: translations, fn: fonts, in: input method, wa: writing assistence) 6 | # Column 2: languange code for which the package should only be installed. If empty, install for all languages. 7 | # The language code will be appended in the specified format 8 | # Column 3: dependency package(s). Only install the package in column 4 when this dependency package is already installed. 9 | # Column 4: Package to pull. Can contain language codes at the end if column 2 is empty. 10 | # 11 | # Format: %LCODE% 12 | tr:::language-pack- 13 | tr::gvfs:language-pack-gnome- 14 | # Format: %LCODE% or %LCODE%-%CCODE% 15 | tr::libreoffice-common:libreoffice-l10n- 16 | tr::libreoffice-common:libreoffice-help- 17 | tr::firefox:firefox-locale- 18 | tr::firefox:firefox-l10n- 19 | tr::thunderbird:thunderbird-locale- 20 | tr::thunderbird:thunderbird-l10n- 21 | tr::lightning-extension:lightning-extension-locale- 22 | tr::sunbird:sunbird-locale- 23 | tr::sword-text-gerlut1545:sword-language-pack- 24 | tr::gimp:gimp-help- 25 | tr::evolution:evolution-documentation- 26 | tr::sylpheed:sylpheed-i18n 27 | tr::amarok:amarok-help- 28 | # Format: %LCODE% or %LCODE%%CCODE% or %LCODE%-%VARIANT% 29 | tr::kdelibs5-data:kde-l10n- 30 | tr::calligra-libs:calligra-l10n- 31 | tr::gcompris:gcompris-sound- 32 | 33 | # Finnish support for voikko 34 | wa:fi:libreoffice-core:libreoffice-voikko 35 | wa:fi:ispell:tmispell-voikko 36 | wa:fi::libenchant-voikko 37 | wa:fi::libenchant-2-voikko 38 | wa:fi::voikko-fi 39 | 40 | # North Saami support for voikko (universe package) 41 | wa:se::libenchant-2-voikko 42 | wa:se::giella-sme 43 | 44 | # LibreOffice support 45 | wa::libreoffice-common:hyphen- 46 | wa::libreoffice-common:mythes- 47 | wa:::hunspell- 48 | # languages which don't provide a hunspell dictionary yet 49 | wa:eo::myspell-eo 50 | wa:et::myspell-et 51 | wa:fa::myspell-fa 52 | wa:fo::myspell-fo 53 | wa:ga::myspell-ga 54 | wa:gv::myspell-gv 55 | wa:hy::myspell-hy 56 | wa:ku::myspell-ku 57 | wa:nr::myspell-nr 58 | wa:ns::myspell-ns 59 | wa:ss::myspell-ss 60 | wa:st::myspell-st 61 | wa:tn::myspell-tn 62 | wa:ts::myspell-ts 63 | wa:ve::myspell-ve 64 | wa:xh::myspell-xh 65 | wa:zu::myspell-zu 66 | 67 | # Package names not matching the locale 68 | wa:de::hunspell-de-at-frami 69 | wa:de::hunspell-de-ch-frami 70 | wa:de::hunspell-de-de-frami 71 | wa:nb::hunspell-no 72 | wa:nb:libreoffice-common:hyphen-no 73 | wa:nb:libreoffice-common:mythes-no 74 | wa:nn::hunspell-no 75 | wa:nn:libreoffice-common:hyphen-no 76 | wa:nn:libreoffice-common:mythes-no 77 | 78 | # Aspell support for Sylpheed and Abiword 79 | wa::sylpheed:hunspell- 80 | wa::abiword:aspell- 81 | wa::gedit:hunspell- 82 | 83 | # poppler-data is useful for CJK 84 | wa::poppler-utils:poppler-data 85 | 86 | # word lists 87 | wa:bg::wbulgarian 88 | wa:ca::wcatalan 89 | wa:da::wdanish 90 | wa:de::wngerman 91 | wa:de::wogerman 92 | wa:de::wswiss 93 | wa:en::wamerican 94 | wa:en::wbritish 95 | wa:es::wspanish 96 | wa:fo::wfaroese 97 | wa:fr::wfrench 98 | wa:ga::wirish 99 | wa:ga::wmanx 100 | wa:gd::wgaelic 101 | wa:gl::wgalician-minimos 102 | wa:it::witalian 103 | wa:nb::wnorwegian 104 | wa:nl::wdutch 105 | wa:nn::wnorwegian 106 | wa:pl::wpolish 107 | wa:pt::wportuguese 108 | wa:pt::wbrazilian 109 | wa:sv::wswedish 110 | wa:uk::wukrainian 111 | 112 | # fonts 113 | fn:am::fonts-sil-abyssinica 114 | fn:ar::fonts-arabeyes 115 | fn:ar::fonts-kacst 116 | fn:as::fonts-beng 117 | fn:bn::fonts-beng 118 | fn:bo::fonts-tibetan-machine 119 | fn:dz::fonts-tibetan-machine 120 | fn:el::fonts-mgopen 121 | fn:fa::fonts-farsiweb 122 | fn:fa::fonts-sil-scheherazade 123 | fn:gu::fonts-gujr 124 | fn:he::fonts-sil-ezra 125 | fn:hi::fonts-deva 126 | fn:ii::fonts-sil-nuosusil 127 | fn:ja::fonts-takao-mincho 128 | fn:ja::fonts-takao-gothic 129 | fn:km::fonts-khmeros 130 | fn:kn::fonts-knda 131 | fn:lo::fonts-lao 132 | fn:ml::fonts-mlym 133 | fn:mn::fonts-manchufont 134 | fn:mnc::fonts-manchufont 135 | fn:mr::fonts-deva 136 | fn:my::fonts-sil-padauk 137 | fn:ne::fonts-deva 138 | fn:or::fonts-orya 139 | fn:pa::fonts-guru 140 | fn:si::fonts-lklug-sinhala 141 | fn:ta::fonts-taml 142 | fn:te::fonts-telu 143 | fn:th::fonts-thai-tlwg 144 | fn:ug::fonts-ukij-uyghur 145 | fn:ur::fonts-nafees 146 | fn:ur::fonts-sil-scheherazade 147 | fn:yi::fonts-sil-ezra 148 | 149 | # GhostScript CJK resources 150 | fn:ja:gs-cjk-resource:poppler-data 151 | fn:ja:gs-cjk-resource:fonts-ipafont-mincho 152 | fn:ko:gs-cjk-resource:poppler-data 153 | fn:zh-hans:gs-cjk-resource:poppler-data 154 | fn:zh-hant:gs-cjk-resource:poppler-data 155 | -------------------------------------------------------------------------------- /usr/share/linuxmint/mintlocale/languages: -------------------------------------------------------------------------------- 1 | aa=Afar 2 | af=Afrikaans 3 | am=Amharic 4 | an=Aragonese 5 | ar=Arabic 6 | as=Assamese 7 | ast=Asturian 8 | az=Azerbaijani 9 | be=Belarusian 10 | ber=Berber languages 11 | bg=Bulgarian 12 | bn=Bengali 13 | bo=Tibetan 14 | br=Breton 15 | bs=Bosnian 16 | ca=Catalan; Valencian 17 | crh=Turkish, Crimean 18 | cs=Czech 19 | csb=Kashubian 20 | cy=Welsh 21 | da=Danish 22 | de=German 23 | dv=Divehi; Dhivehi; Maldivian 24 | dz=Dzongkha 25 | el=Greek, Modern (1453-) 26 | en=English 27 | eo=Esperanto 28 | es=Spanish; Castilian 29 | et=Estonian 30 | eu=Basque 31 | fa=Persian 32 | fi=Finnish 33 | fil=Filipino 34 | fo=Faroese 35 | fr=French 36 | fur=Friulian 37 | fy=Western Frisian 38 | ga=Irish 39 | gd=Gaelic; Scottish Gaelic 40 | gl=Galician 41 | gu=Gujarati 42 | gv=Manx 43 | ha=Hausa 44 | he=Hebrew 45 | hi=Hindi 46 | hr=Croatian 47 | hsb=Sorbian (Upper) 48 | ht=Haitian; Haitian Creole 49 | hu=Hungarian 50 | hy=Armenian 51 | ia=Interlingua (International Auxiliary Language Association) 52 | id=Indonesian 53 | ig=Igbo 54 | is=Icelandic 55 | it=Italian 56 | iu=Inuktitut 57 | ja=Japanese 58 | ka=Georgian 59 | kab=Kabyle 60 | kk=Kazakh 61 | kl=Kalaallisut (Greenlandic) 62 | km=Central Khmer 63 | kn=Kannada 64 | ko=Korean 65 | ks=Kashmiri 66 | ku=Kurdish 67 | kw=Cornish 68 | ky=Kirghiz; Kyrgyz 69 | la=Latin 70 | lg=Ganda 71 | li=Limburgan; Limburger; Limburgish 72 | lo=Lao 73 | lt=Lithuanian 74 | lv=Latvian 75 | mai=Maithili 76 | mg=Malagasy 77 | mi=Maori 78 | mk=Macedonian 79 | ml=Malayalam 80 | mn=Mongolian 81 | mr=Marathi 82 | ms=Malay 83 | mt=Maltese 84 | nan=Chinese, Min Nan 85 | nb=Bokmål, Norwegian; Norwegian Bokmål 86 | nds=German, Low 87 | ne=Nepali 88 | nl=Dutch; Flemish 89 | nn=Norwegian Nynorsk; Nynorsk, Norwegian 90 | nso=Sotho, Northern 91 | oc=Occitan (post 1500) 92 | om=Oromo 93 | or=Oriya 94 | pa=Panjabi; Punjabi 95 | pap=Papiamento 96 | pl=Polish 97 | pt=Portuguese 98 | ro=Romanian 99 | ru=Russian 100 | rw=Kinyarwanda 101 | sa=Sanskrit 102 | sc=Sardinian 103 | sd=Sindhi 104 | se=Northern Sami 105 | shs=Shuswap 106 | si=Sinhala; Sinhalese 107 | sk=Slovak 108 | sl=Slovenian 109 | so=Somali 110 | sq=Albanian 111 | sr=Serbian 112 | st=Sotho, Southern 113 | sv=Swedish 114 | ta=Tamil 115 | te=Telugu 116 | tg=Tajik 117 | th=Thai 118 | ti=Tigrinya 119 | tk=Turkmen 120 | tl=Tagalog 121 | tlh=Klingon 122 | tr=Turkish 123 | ts=Tsonga 124 | tt=Tatar 125 | ug=Uighur; Uyghur 126 | uk=Ukrainian 127 | ur=Urdu 128 | uz=Uzbek 129 | ve=Venda 130 | vi=Vietnamese 131 | wa=Walloon 132 | wo=Wolof 133 | xh=Xhosa 134 | yi=Yiddish 135 | yo=Yoruba 136 | zh=Chinese 137 | zh-hans=Simplified Chinese 138 | zh-hant=Traditional Chinese 139 | zu=Zulu 140 | -------------------------------------------------------------------------------- /usr/share/linuxmint/mintlocale/mintlocale.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | True 7 | False 8 | center 9 | preferences-desktop-locale 10 | 11 | 12 | 13 | 14 | 15 | True 16 | False 17 | vertical 18 | 6 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /usr/share/linuxmint/mintlocale/templates/default_locale.template: -------------------------------------------------------------------------------- 1 | LANG=$locale 2 | LANGUAGE=$info:$language 3 | LC_NUMERIC=$region 4 | LC_TIME=$time 5 | LC_MONETARY=$region 6 | LC_PAPER=$region 7 | LC_IDENTIFICATION=$region 8 | LC_NAME=$region 9 | LC_ADDRESS=$region 10 | LC_TELEPHONE=$region 11 | LC_MEASUREMENT=$region 12 | -------------------------------------------------------------------------------- /usr/share/linuxmint/mintlocale/templates/lightdm_pam_environment.template: -------------------------------------------------------------------------------- 1 | LC_NUMERIC=$region 2 | LC_TIME=$time 3 | LC_MONETARY=$region 4 | LC_PAPER=$region 5 | LC_IDENTIFICATION=$region 6 | LC_NAME=$region 7 | LC_ADDRESS=$region 8 | LC_TELEPHONE=$region 9 | LC_MEASUREMENT=$region 10 | PAPERSIZE=a4 11 | LANGUAGE=$shortlocale 12 | LANG=$locale 13 | -------------------------------------------------------------------------------- /usr/share/linuxmint/mintlocale/templates/mdm_pam_environment.template: -------------------------------------------------------------------------------- 1 | LC_NUMERIC=$region 2 | LC_TIME=$time 3 | LC_MONETARY=$region 4 | LC_PAPER=$region 5 | LC_IDENTIFICATION=$region 6 | LC_NAME=$region 7 | LC_ADDRESS=$region 8 | LC_TELEPHONE=$region 9 | LC_MEASUREMENT=$region 10 | PAPERSIZE=a4 11 | -------------------------------------------------------------------------------- /usr/share/polkit-1/actions/com.linuxmint.mintlocale.policy: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | Linux Mint 8 | https://linuxmint.com/ 9 | 10 | 11 | preferences-desktop-locale 12 | Languages 13 | ቋንቋዎች 14 | اللغات 15 | Dillər 16 | Мовы 17 | Езици 18 | Jezici 19 | Idiomes 20 | Idiomes 21 | Jazyky 22 | Ieithoedd 23 | Sprog 24 | Sprachen 25 | Γλώσσες 26 | Lingvoj 27 | Idiomas 28 | Keeled 29 | Hizkuntzak 30 | Kielet 31 | Langues 32 | Langues 33 | Lèngües 34 | Talen 35 | Cànain 36 | Idiomas 37 | שפות 38 | भाषाएँ 39 | Jezici 40 | Nyelvek 41 | Linguas 42 | Bahasa 43 | Lingues 44 | Tungumál 45 | Lingue 46 | 言語 47 | ენები 48 | Tutlayin 49 | Тілдер 50 | ភាសា 51 | 언어 52 | Ziman 53 | ພາສາ 54 | Kalbos 55 | Valodas 56 | ഭാഷകള്‍ 57 | भाषा 58 | Bahasa 59 | Lengue 60 | Språk 61 | Sprachen 62 | भाषाहरु 63 | Talen 64 | Lengas 65 | Idiomanan 66 | Języki 67 | Idiomas 68 | Idiomas 69 | Limbi 70 | Языки 71 | Limbas 72 | Jazyky 73 | Jeziki 74 | Gjuhët 75 | Језици 76 | Jezici 77 | Språk 78 | மொழிகள் 79 | Забонҳо 80 | ภาษา 81 | Diller 82 | Телләр 83 | Мови 84 | زبانیں 85 | Тиллар 86 | Ngôn ngữ 87 | 语言 88 | 語言 89 | 語言 90 | 91 | 92 | auth_admin_keep 93 | auth_admin_keep 94 | auth_admin_keep 95 | 96 | /usr/bin/add-remove-locales 97 | true 98 | 99 | 100 | 101 | preferences-desktop-locale 102 | Languages 103 | ቋንቋዎች 104 | اللغات 105 | Dillər 106 | Мовы 107 | Езици 108 | Jezici 109 | Idiomes 110 | Idiomes 111 | Jazyky 112 | Ieithoedd 113 | Sprog 114 | Sprachen 115 | Γλώσσες 116 | Lingvoj 117 | Idiomas 118 | Keeled 119 | Hizkuntzak 120 | Kielet 121 | Langues 122 | Langues 123 | Lèngües 124 | Talen 125 | Cànain 126 | Idiomas 127 | שפות 128 | भाषाएँ 129 | Jezici 130 | Nyelvek 131 | Linguas 132 | Bahasa 133 | Lingues 134 | Tungumál 135 | Lingue 136 | 言語 137 | ენები 138 | Tutlayin 139 | Тілдер 140 | ភាសា 141 | 언어 142 | Ziman 143 | ພາສາ 144 | Kalbos 145 | Valodas 146 | ഭാഷകള്‍ 147 | भाषा 148 | Bahasa 149 | Lengue 150 | Språk 151 | Sprachen 152 | भाषाहरु 153 | Talen 154 | Lengas 155 | Idiomanan 156 | Języki 157 | Idiomas 158 | Idiomas 159 | Limbi 160 | Языки 161 | Limbas 162 | Jazyky 163 | Jeziki 164 | Gjuhët 165 | Језици 166 | Jezici 167 | Språk 168 | மொழிகள் 169 | Забонҳо 170 | ภาษา 171 | Diller 172 | Телләр 173 | Мови 174 | زبانیں 175 | Тиллар 176 | Ngôn ngữ 177 | 语言 178 | 語言 179 | 語言 180 | 181 | 182 | auth_admin_keep 183 | auth_admin_keep 184 | auth_admin_keep 185 | 186 | /usr/bin/set-default-locale 187 | false 188 | 189 | 190 | 191 | --------------------------------------------------------------------------------