~ubuntu-branches/ubuntu/saucy/wicd/saucy

« back to all changes in this revision

Viewing changes to wicd/translations.py

  • Committer: Bazaar Package Importer
  • Author(s): David Paleino
  • Date: 2009-06-22 17:59:27 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090622175927-iax3alden0bmj6zg
Tags: 1.6.1-3
* debian/config, debian/templates updated:
  - only show users to add to netdev, skip those who are already
    members (Closes: #534138)
  - gracefully handle upgrades from previous broken versions, where
    debconf set a value of ${default} for wicd/users
    (Closes: #532112)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
# -* coding: utf-8 -*-
 
3
 
 
4
""" translations -- module for handling the translation strings for wicd. """
 
5
#
 
6
#   Copyright (C) 2007 - 2009 Adam Blackburn
 
7
#   Copyright (C) 2007 - 2009 Dan O'Reilly
 
8
#   Copyright (C) 2009        Andrew Psaltis
 
9
#
 
10
#   This program is free software; you can redistribute it and/or modify
 
11
#   it under the terms of the GNU General Public License Version 2 as
 
12
#   published by the Free Software Foundation.
 
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
#   You should have received a copy of the GNU General Public License
 
20
#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
21
#
 
22
import locale
 
23
import os
 
24
import wpath
 
25
import gettext
 
26
 
 
27
 
 
28
def get_gettext():
 
29
    """ Set up gettext for translations. """
 
30
    # Borrowed from an excellent post on how to do this at
 
31
    # http://www.learningpython.com/2006/12/03/translating-your-pythonpygtk-application/
 
32
    local_path = wpath.translations
 
33
    langs = []
 
34
    osLanguage = os.environ.get('LANGUAGE', None)
 
35
    if osLanguage:
 
36
        langs += osLanguage.split(":")
 
37
    osLanguage = None
 
38
    osLanguage = os.environ.get('LC_MESSAGES', None)
 
39
    if osLanguage:
 
40
        langs += osLanguage.split(":")
 
41
    try:
 
42
        # This avoids a bug: locale.getdefaultlocale() prefers
 
43
        # LC_CTYPE over LANG/LANGUAGE
 
44
        lc, encoding = locale.getdefaultlocale(envvars=('LC_MESSAGES', 
 
45
                                                        'LC_ALL', 'LANG', 
 
46
                                                        'LANGUAGE'))
 
47
    except ValueError, e:
 
48
        print str(e)
 
49
        print "Default locale unavailable, falling back to en_US"
 
50
    if (lc):
 
51
        langs += [lc]
 
52
    langs += ["en_US"]
 
53
    lang = gettext.translation('wicd', local_path, languages=langs, 
 
54
                               fallback=True)
 
55
    _ = lang.gettext
 
56
    return _
 
57
 
 
58
# Generated automatically on Sat, 20 Jun 2009 23:13:56 CDT
 
59
_ = get_gettext()
 
60
language = {}
 
61
language['resetting_ip_address'] = _('''Resetting IP address...''')
 
62
language['prefs_help'] = _('''Preferences dialog''')
 
63
language['no_dhcp_offers'] = _('''Connection Failed: No DHCP offers received.''')
 
64
language['more_help'] = _('''For more detailed help, consult the wicd-curses(8) man page.''')
 
65
language['bad_pass'] = _('''Connection Failed: Bad password''')
 
66
language['cannot_start_daemon'] = _('''Unable to connect to wicd daemon DBus interface. This typically means there was a problem starting the daemon. Check the wicd log for more information.''')
 
67
language['verifying_association'] = _('''Verifying access point association...''')
 
68
language['wired_always_on'] = _('''Always show wired interface''')
 
69
language['could_not_connect'] = _('''Could not connect to wicd's D-Bus interface. Check the wicd log for error messages.''')
 
70
language['path_to_pac_file'] = _('''Path to PAC File''')
 
71
language['always_switch_to_wired'] = _('''Always switch to wired connection when available''')
 
72
language['disconn_help'] = _('''Disconnect from all networks''')
 
73
language['wired_networks'] = _('''Wired Networks''')
 
74
language['backend_alert'] = _('''Changes to your backend won't occur until the daemon is restarted.''')
 
75
language['about_help'] = _('''Stop a network connection in progress''')
 
76
language['connecting'] = _('''Connecting''')
 
77
language['pre_disconnect_script'] = _('''Run pre-disconnect script''')
 
78
language['cannot_edit_scripts_1'] = _('''To avoid various complications, wicd-curses does not support directly editing the scripts directly.  However, you can edit them manually.  First, (as root)", open the "$A" config file, and look for the section labeled by the $B in question.  In this case, this is:''')
 
79
language['cannot_edit_scripts_3'] = _('''You can also configure the wireless networks by looking for the "[<ESSID>]" field in the config file.''')
 
80
language['cannot_edit_scripts_2'] = _('''Once there, you can adjust (or add) the "beforescript", "afterscript", and "disconnectscript" variables as needed, to change the preconnect, postconnect, and disconnect scripts respectively.  Note that you will be specifying the full path to the scripts - not the actual script contents.  You will need to add/edit the script contents separately.  Refer to the wicd manual page for more information.''')
 
81
language['scripts_need_pass'] = _('''You must enter your password to configure scripts''')
 
82
language['dns_domain'] = _('''DNS domain''')
 
83
language['aborted'] = _('''Connection Cancelled''')
 
84
language['scanning_stand_by'] = _('''Scanning networks... stand by...''')
 
85
language['password'] = _('''Password''')
 
86
language['no_daemon_tooltip'] = _('''Wicd daemon unreachable''')
 
87
language['use_static_dns'] = _('''Use Static DNS''')
 
88
language['setting_broadcast_address'] = _('''Setting broadcast address...''')
 
89
language['choose_wired_profile'] = _('''Select or create a wired profile to connect with''')
 
90
language['make_wired_profile'] = _('''To connect to a wired network, you must create a network profile.  To create a network profile, type a name that describes this network, and press Add.''')
 
91
language['esc_to_cancel'] = _('''Press ESC to cancel''')
 
92
language['scanning'] = _('''Scanning''')
 
93
language['flushing_routing_table'] = _('''Flushing the routing table...''')
 
94
language['brought_to_you'] = _('''Brought to you by:''')
 
95
language['refresh_help'] = _('''Refresh network list''')
 
96
language['select_hidden_essid'] = _('''Select Hidden Network ESSID''')
 
97
language['ext_programs'] = _('''External Programs''')
 
98
language['connect'] = _('''Connect''')
 
99
language['help_help'] = _('''Display this help dialog''')
 
100
language['use_global_dns'] = _('''Use global DNS servers''')
 
101
language['enable_encryption'] = _('''This network requires encryption to be enabled.''')
 
102
language['use_last_used_profile'] = _('''Use last used profile on wired autoconnect''')
 
103
language['preferences'] = _('''Preferences''')
 
104
language['dhcp_failed'] = _('''Connection Failed: Unable to Get IP Address''')
 
105
language['setting_static_ip'] = _('''Setting static IP addresses...''')
 
106
language['connecting_to_daemon'] = _('''Connecting to daemon...''')
 
107
language['automatic_connect'] = _('''Automatically connect to this network''')
 
108
language['add_new_wired_profile'] = _('''Add a new wired profile''')
 
109
language['dhcp_client'] = _('''DHCP Client''')
 
110
language['display_type_dialog'] = _('''Use dBm to measure signal strength''')
 
111
language['global_settings'] = _('''Use these settings for all networks sharing this essid''')
 
112
language['config_help'] = _('''Configure Selected Network''')
 
113
language['use_debug_mode'] = _('''Enable debug mode''')
 
114
language['removing_old_connection'] = _('''Removing old connection...''')
 
115
language['no_sudo_prog'] = _('''Could not find a graphical sudo program.  The script editor could not be launched.  You'll have to edit scripts directly your configuration file.''')
 
116
language['wireless_networks'] = _('''Wireless Networks''')
 
117
language['configuring_wired'] = _('''Configuring preferences for wired profile "$A"''')
 
118
language['no_wireless_networks_found'] = _('''No wireless networks found.''')
 
119
language['madwifi_for_adhoc'] = _('''Check if using madwifi/atheros drivers''')
 
120
language['properties'] = _('''Properties''')
 
121
language['setting_encryption_info'] = _('''Setting encryption info''')
 
122
language['about'] = _('''About Wicd''')
 
123
language['ok'] = _('''OK''')
 
124
language['adhoc_help'] = _('''Set up Ad-hoc network''')
 
125
language['scripts_help'] = _('''Select scripts''')
 
126
language['invalid_address'] = _('''Invalid address in $A entry.''')
 
127
language['configuring_interface'] = _('''Configuring wireless interface...''')
 
128
language['generating_psk'] = _('''Generating PSK...''')
 
129
language['validating_authentication'] = _('''Validating authentication...''')
 
130
language['essid'] = _('''ESSID''')
 
131
language['anonymous_identity'] = _('''Anonymous Identity''')
 
132
language['wireless_interface'] = _('''Wireless Interface''')
 
133
language['hidden_network'] = _('''Hidden Network''')
 
134
language['key'] = _('''Key''')
 
135
language['wicd_curses'] = _('''Wicd Curses Interface''')
 
136
language['debugging'] = _('''Debugging''')
 
137
language['use_encryption'] = _('''Use Encryption''')
 
138
language['wpa_supplicant'] = _('''WPA Supplicant''')
 
139
language['global_dns_servers'] = _('''Global DNS servers''')
 
140
language['not_connected'] = _('''Not connected''')
 
141
language['done'] = _('''Done connecting...''')
 
142
language['cannot_connect_to_daemon'] = _('''Can't connect to the daemon, trying to start it automatically...''')
 
143
language['cancel'] = _('''Cancel''')
 
144
language['case_sensitive'] = _('''All controls are case sensitive''')
 
145
language['gateway'] = _('''Gateway''')
 
146
language['backend'] = _('''Backend''')
 
147
language['dbus_fail'] = _('''DBus failure! This is most likely caused by the wicd daemon stopping while wicd-curses is running. Please restart the daemon, and then restart wicd-curses.''')
 
148
language['terminated'] = _('''Terminated by user''')
 
149
language['wired_detect'] = _('''Wired Link Detection''')
 
150
language['add_new_profile'] = _('''Add a new profile''')
 
151
language['use_ics'] = _('''Activate Internet Connection Sharing''')
 
152
language['create_adhoc_network'] = _('''Create an Ad-Hoc Network''')
 
153
language['interface_up'] = _('''Putting interface up...''')
 
154
language['global_dns_not_enabled'] = _('''Global DNS has not been enabled in general preferences.''')
 
155
language['dns'] = _('''DNS''')
 
156
language['advanced_settings'] = _('''Advanced Settings''')
 
157
language['username'] = _('''Username''')
 
158
language['wicd_auto_config'] = _('''Automatic (recommended)''')
 
159
language['wired_network_found'] = _('''Wired connection detected''')
 
160
language['netmask'] = _('''Netmask''')
 
161
language['select_a_network'] = _('''Choose from the networks below:''')
 
162
language['connect_help'] = _('''Connect to selected network''')
 
163
language['no_delete_last_profile'] = _('''wicd-curses does not support deleting the last wired profile.  Try renaming it ('F2')''')
 
164
language['gen_settings'] = _('''General Settings''')
 
165
language['connected_to_wireless'] = _('''Connected to $A at $B (IP: $C)''')
 
166
language['exception'] = _('''EXCEPTION! Please report this to the maintainer and file a bug report with the backtrace below:''')
 
167
language['configuring_wireless'] = _('''Configuring preferences for wireless network "$A" ($B)''')
 
168
language['generating_wpa_config'] = _('''Generating WPA configuration file...''')
 
169
language['search_domain'] = _('''Search domain''')
 
170
language['encrypt_info_missing'] = _('''Required encryption information is missing.''')
 
171
language['running_dhcp'] = _('''Obtaining IP address...''')
 
172
language['lost_dbus'] = _('''The wicd daemon has shut down. The UI will not function properly until it is restarted.''')
 
173
language['wired_network_instructions'] = _('''To connect to a wired network, you must create a network profile. To create a network profile, type a name that describes this network, and press Add.''')
 
174
language['setting_static_dns'] = _('''Setting static DNS servers...''')
 
175
language['auto_reconnect'] = _('''Automatically reconnect on connection loss''')
 
176
language['use_wep_encryption'] = _('''Use Encryption (WEP only)''')
 
177
language['wired_autoconnect_settings'] = _('''Wired Autoconnect Settings''')
 
178
language['before_script'] = _('''Run script before connect''')
 
179
language['always_use_wext'] = _('''You should almost always use wext as the WPA supplicant driver''')
 
180
language['network_interfaces'] = _('''Network Interfaces''')
 
181
language['use_default_profile'] = _('''Use default profile on wired autoconnect''')
 
182
language['scan'] = _('''Scan''')
 
183
language['ip'] = _('''IP''')
 
184
language['connected_to_wired'] = _('''Connected to wired network (IP: $A)''')
 
185
language['wpa_supplicant_driver'] = _('''WPA Supplicant Driver''')
 
186
language['access_cards'] = _('''Wicd needs to access your computer's network cards.''')
 
187
language['killswitch_enabled'] = _('''Wireless Kill Switch Enabled''')
 
188
language['hidden_network_essid'] = _('''Hidden Network ESSID''')
 
189
language['secured'] = _('''Secured''')
 
190
language['interface_down'] = _('''Putting interface down...''')
 
191
language['authentication'] = _('''Authentication''')
 
192
language['after_script'] = _('''Run script after connect''')
 
193
language['show_wired_list'] = _('''Prompt for profile on wired autoconnect''')
 
194
language['channel'] = _('''Channel''')
 
195
language['unsecured'] = _('''Unsecured''')
 
196
language['rename_wired_profile'] = _('''Rename wired profile''')
 
197
language['daemon_unavailable'] = _('''The wicd daemon is unavailable, so your request cannot be completed''')
 
198
language['stop_showing_chooser'] = _('''Stop Showing Autoconnect pop-up temporarily''')
 
199
language['scan_help'] = _('''Scan for hidden networks''')
 
200
language['use_static_ip'] = _('''Use Static IPs''')
 
201
language['raw_screen_arg'] = _('''use urwid's raw screen controller''')
 
202
language['route_flush'] = _('''Route Table Flushing''')
 
203
language['scripts'] = _('''Scripts''')
 
204
language['identity'] = _('''Identity''')
 
205
language['automatic_reconnection'] = _('''Automatic Reconnection''')
 
206
language['wired_interface'] = _('''Wired Interface''')
 
207
language['press_to_quit'] = _('''Press F8 or Q to quit.''')
 
208
language['default_wired'] = _('''Use as default profile (overwrites any previous default)''')
 
209
language['wired_network'] = _('''Wired Network''')
 
210
language['dns_server'] = _('''DNS server''')
 
211
language['notifications'] = _('''Notifications''')
 
212
language['display_notifications'] = _('''Display notifications about connection status''')
 
213
language['connection_established'] = _('''Connection established''')
 
214
language['disconnected'] = _('''Disconnected''')
 
215
language['establishing_connection'] = _('''Establishing connection...''')
 
216
language['association_failed'] = _('''Connection failed: Could not contact the wireless access point.''')
 
217
language['access_denied'] = _('''Unable to contact the Wicd daemon due to an access denied error from DBus.  Please check your DBus configuration.''')
 
218
language['disconnecting_active'] = _('''Disconnecting active connections...''')
 
219
language['access_denied_wc'] = _('''ERROR: wicd-curses was denied access to the wicd daemon: please check that your user is in the "$A" group.''')
 
220
language['post_disconnect_script'] = _('''Run post-disconnect script''')