summaryrefslogtreecommitdiffstats
path: root/t/superuser--priority-upgrade.t
blob: 1aa9eea1fab5b61de61d4efa28d9a0f806de9e2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
9
Diffstat (limited to 'po')
-rw-r--r--po/zh_CN.po90
1 files changed, 18 insertions, 72 deletions
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 4d944f62..eea11dd4 100644
-#!/usr/bin/perl use strict; use lib '.', 't'; use helper; use Expect; use urpm::util; use Test::More 'no_plan'; need_root_and_prepare(); $ENV{TESTING_priority_upgrade} = 1; $ENV{PERL5LIB} = ".."; #- for restart with local urpmi my $name = 'priority-upgrade'; test('a b', 'a', 'a', 'b'); test('a-strict b', 'a-strict', 'a-strict b bb1', 'b', [ 'What is your choice', "\n" ], [ 'Proceed with the installation of the 2 packages?', "\n" ], [ 'restarting urpmi', '' ], ); test_ab_auto_select('', [ 'What is your choice', "\n" ], [ 'Proceed with the installation of the 3 packages?', "\n" ], ); test_ab_auto_select('a', [ 'Proceed with the installation of one package?', "\n" ], [ 'restarting urpmi', '' ], [ 'What is your choice', "\n" ], [ 'Proceed with the installation of the 2 packages?', "\n" ], ); test_ab_auto_select('b', [ 'What is your choice', "\n" ], [ 'Proceed with the installation of the 2 packages?', "\n" ], [ 'restarting urpmi', '' ], [ 'Proceed with the installation of one package?', "\n" ], ); test_ab_auto_select('a,b', [ 'What is your choice', "\n" ], [ 'Proceed with the installation of the 3 packages?', "\n" ], ); sub test_ab_auto_select { my ($priority_upgrade, @expected) = @_; test('a b', undef, 'a b bb1', $priority_upgrade, @expected); } sub test { my ($pkgs_v1, $wanted_v2, $pkgs_v2, $priority_upgrade, @expected) = @_; unlink "$::pwd/media/$name"; symlink "$name-1", "$::pwd/media/$name"; urpmi_addmedia("$name $::pwd/media/$name"); if ($priority_upgrade) { set_urpmi_cfg_global_options({ 'priority-upgrade' => $priority_upgrade }); } urpmi($pkgs_v1); my @pkgs_v1 = split(' ', $pkgs_v1); is(`rpm -qa --root $::pwd/root | sort`, join('', map { "$_-1-1\n" } @pkgs_v1)); unlink "$::pwd/media/$name"; symlink "$name-2", "$::pwd/media/$name"; if ($wanted_v2) { urpmi_update('-a'); urpmi_expected($wanted_v2, \@expected); } else { urpmi_expected('--auto-update', \@expected); } my @pkgs_v2 = split(' ', $pkgs_v2); my @l = ( (map { "$_-2-1\n" } @pkgs_v2), (map { "$_-1-1\n" } difference2(\@pkgs_v1, \@pkgs_v2)), ); is(`rpm -qa --root $::pwd/root | sort`, join('', sort @l)); system_('rm -rf root'); } sub urpmi_expected { my ($options, $expected) = @_; if (0) { #- try it interactively for debugging system_(urpm_cmd('urpmi', '-d') . " $options"); return; } my $cmd = urpmi_cmd() . " $options"; print "# $cmd\n"; my $expect = Expect->spawn($cmd); foreach (@$expected) { my ($msg, $to_send) = @$_; my $ok = $expect->expect(2, # timeout in seconds [ $msg => sub { $expect->send($to_send); } ]); print "$to_send"; ok($ok, qq(expecting "$msg")); $ok or return; } $expect->expect(2, [ qr/restarting urpmi/ => sub { fail('not restarting urpmi') } ], [ 'eof' => sub {} ]); $expect->soft_close; is($expect->exitstatus, 0, $cmd); }
, c-format
msgid "Mail contact:"
-msgstr "联系邮件:"
+msgstr "联系邮件:"
#: ../mdkonline:163
#, c-format
@@ -451,7 +451,7 @@ msgid ""
"From now you will receive on security and updates \n"
"announcements thanks to Mandrakeonline."
msgstr ""
-"从现在开始,您将能够收到 Mandrakeonline 发出的安全\n"
+"从现在开始,您将能够收到 Mandrakeonline 发出的安全"
"和更新通知了。"
#: ../mdkonline:178
@@ -460,7 +460,7 @@ msgid ""
"Mandrakeonline offers you the ability to automate the updates.\n"
"A program will run regulary in your system waiting for new updates\n"
msgstr ""
-"Mandrakeonline 还能让您自动保持更新。您的系统中会定期运行一个特\n"
+"Mandrakeonline 还能让您自动保持更新。您的系统中会定期运行一个特"
"定的程序,该程序会自动下载并安装更新\n"
#: ../mdkonline:180
@@ -471,7 +471,7 @@ msgstr "上传文件时发生了错误,请重试"
#: ../mdkonline:186
#, c-format
msgid "Country"
-msgstr "国家"
+msgstr "国家/地区"
#: ../mdkonline:198
#, c-format
@@ -484,14 +484,14 @@ msgid "Your Mandrakeonline account has been successfully configured\n"
msgstr "您的 Mandrakeonline 账户已经配置成功\n"
#: ../mdkonline:214
-#, fuzzy, c-format
+#, c-format
msgid "Configuration uploaded successfully"
-msgstr "您的上传已经成功!"
+msgstr "配置上传成功"
#: ../mdkonline:215
-#, fuzzy, c-format
+#, c-format
msgid "Problem uploading configuration"
-msgstr "正在读取配置\n"
+msgstr "读取配置出错"
#: ../mdkonline:216
#, c-format
@@ -499,6 +499,7 @@ msgid ""
"Cannot connect to mandrakeonline website: wrong login/password or router/"
"firewall bad settings"
msgstr ""
+"无法连接到 mandrakeonline 网站: 登录名/密码不对,或路由器/防火墙设置错误"
#: ../mdkonline.pm:66
#, c-format
@@ -584,58 +585,3 @@ msgid ""
msgstr ""
"Mandrakeupdate 无法上传差异文件。请给 support@mandrakeonline.net 发送邮件"
-#, fuzzy
-#~ msgid "Please Wait"
-#~ msgstr "请稍候"
-
-#~ msgid "Next"
-#~ msgstr "下一步"
-
-#~ msgid "Cancel"
-#~ msgstr "取消"
-
-#~ msgid "Previous"
-#~ msgstr "上一步"
-
-#~ msgid "I don't have a Mandrakeonline account and I want to subscribe"
-#~ msgstr "我没有 Mandrakeonline 账户,我要订阅"
-
-#~ msgid "Mandrakelinux Privacy Policy"
-#~ msgstr "Mandrakelinux 隐私保护政策"
-
-#~ msgid "Authentification"
-#~ msgstr "身份验证"
-
-#~ msgid "Send Configuration"
-#~ msgstr "发送配置"
-
-#~ msgid "Finish"
-#~ msgstr "完成"
-
-#~ msgid "automated Upgrades"
-#~ msgstr "自动升级"
-
-#~ msgid "Country:"
-#~ msgstr "国家:"
-
-#~ msgid "Error"
-#~ msgstr "出错"
-
-#~ msgid "Quitting Wizard\n"
-#~ msgstr "正在退出向导\n"
-
-#~ msgid ""
-#~ "Mandrakeonline could not be contacted, please try again at a later time"
-#~ msgstr "Mandrakeonline 无法连接,请稍后再试一次"
-
-#~ msgid "Wrong password"
-#~ msgstr "密码错误"
-
-#~ msgid " --update - Update keys\n"
-#~ msgstr " --update - 更新密钥\n"
-
-#~ msgid "Skip Wizard"
-#~ msgstr "跳过向导"
-
-#~ msgid "Subscribe"
-#~ msgstr "订阅"