Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(919)

Side by Side Diff: ui/gtk3/panel.vala

Issue 339170043: ui/gtk3: Translate input method name in ibus (Closed)
Patch Set: Created 6 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ui/gtk3/switcher.vala » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* vim:set et sts=4 sw=4: 1 /* vim:set et sts=4 sw=4:
2 * 2 *
3 * ibus - The Input Bus 3 * ibus - The Input Bus
4 * 4 *
5 * Copyright(c) 2011-2014 Peng Huang <shawn.p.huang@gmail.com> 5 * Copyright(c) 2011-2014 Peng Huang <shawn.p.huang@gmail.com>
6 * Copyright(c) 2015-2017 Takao Fujwiara <takao.fujiwara1@gmail.com> 6 * Copyright(c) 2015-2017 Takao Fujwiara <takao.fujiwara1@gmail.com>
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 1302
1303 // Show properties and IME switching menu 1303 // Show properties and IME switching menu
1304 m_property_manager.create_menu_items(m_ime_menu); 1304 m_property_manager.create_menu_items(m_ime_menu);
1305 1305
1306 m_ime_menu.append(new Gtk.SeparatorMenuItem()); 1306 m_ime_menu.append(new Gtk.SeparatorMenuItem());
1307 1307
1308 // Append IMEs 1308 // Append IMEs
1309 foreach (var engine in m_engines) { 1309 foreach (var engine in m_engines) {
1310 var language = engine.get_language(); 1310 var language = engine.get_language();
1311 var longname = engine.get_longname(); 1311 var longname = engine.get_longname();
1312 var textdomain = engine.get_textdomain();
1313 var transname = GLib.dgettext(textdomain, longname);
1312 var item = new Gtk.MenuItem.with_label( 1314 var item = new Gtk.MenuItem.with_label(
1313 "%s - %s".printf (IBus.get_language_name(language), longname)); 1315 "%s - %s".printf (IBus.get_language_name(language), transname));
1314 // Make a copy of engine to workaround a bug in vala. 1316 // Make a copy of engine to workaround a bug in vala.
1315 // https://bugzilla.gnome.org/show_bug.cgi?id=628336 1317 // https://bugzilla.gnome.org/show_bug.cgi?id=628336
1316 var e = engine; 1318 var e = engine;
1317 item.activate.connect((item) => { 1319 item.activate.connect((item) => {
1318 for (int i = 0; i < m_engines.length; i++) { 1320 for (int i = 0; i < m_engines.length; i++) {
1319 if (e == m_engines[i]) { 1321 if (e == m_engines[i]) {
1320 switch_engine(i); 1322 switch_engine(i);
1321 break; 1323 break;
1322 } 1324 }
1323 } 1325 }
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
1714 } 1716 }
1715 m_engines[0] = engine; 1717 m_engines[0] = engine;
1716 1718
1717 string[] names = {}; 1719 string[] names = {};
1718 foreach(var desc in m_engines) { 1720 foreach(var desc in m_engines) {
1719 names += desc.get_name(); 1721 names += desc.get_name();
1720 } 1722 }
1721 m_settings_general.set_strv("engines-order", names); 1723 m_settings_general.set_strv("engines-order", names);
1722 } 1724 }
1723 } 1725 }
OLDNEW
« no previous file with comments | « no previous file | ui/gtk3/switcher.vala » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b