-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathyi-hua-edx-platform.html
More file actions
212 lines (180 loc) · 9.86 KB
/
yi-hua-edx-platform.html
File metadata and controls
212 lines (180 loc) · 9.86 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<link rel="short icon" href="http://softing.qiniudn.com/20140603011448867_easyicon_net_128.ico" type="image/x-ico">
<meta charset="utf-8">
<title>汉化edx-platform</title>
<meta name="author" content="tulpar">
<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- <link href="/favicon.png" rel="icon"> -->
<link href="/theme/css/main.css" media="screen, projection"
rel="stylesheet" type="text/css">
<script src="/theme/js/modernizr-2.0.js"></script>
<script src="/theme/js/ender.js"></script>
<script src="/theme/js/octopress.js" type="text/javascript"></script>
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic"
rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic"
rel="stylesheet" type="text/css">
</head>
<body>
<header role="banner"><hgroup>
<h1><a href="/">Dreaming</a></h1>
</hgroup></header>
<nav role="navigation"><ul class="subscription" data-subscription="rss">
</ul>
<ul class="main-navigation">
<li class="active">
<a href="/category/it.html">It</a>
</li>
<li >
<a href="/category/life.html">Life</a>
</li>
</ul></nav>
<div id="main">
<div id="content">
<div>
<article class="hentry" role="article">
<header>
<h1 class="entry-title">汉化edx-platform</h1>
<p class="meta"><time datetime="2014-02-09T00:00:00+08:00" pubdate>Sun 09 February 2014</time></p>
</header>
<div class="entry-content"><h5>搭建好edx-paltform 之后,需要定制:汉化,处理视频存储问题,定制前台。</h5>
<h5>此文讲解汉化。谢谢<a href="http://d.edustack.org/t/edx-platform/40">fmyzjs</a>,<a href="http://www.idefs.comr/recordsedx-platform-internationalization-i18n.html">竹轩小站</a></h5>
<h3>1.准备</h3>
<ul>
<li>基本的linux运维知识</li>
<li>部署成功的edx平台(如果没有可以去edustack.org下载我们的测试镜像)</li>
<li>transifex账号(OpenEdx翻译项目是在transifex.com上,有兴趣的同学可以参与进来)</li>
<li>耐心
最后提醒,请不要使用root用户,必要时请使用sudo,如果您执意,GoodBye!</li>
</ul>
<hr />
<h3>2.安装transifex客户端</h3>
<p><code>sudo apt-get install transifex-client</code></p>
<h3>3.在用户家目录新建transifex配置文件并编辑</h3>
<p><code>vi ~/.transifexrc</code></p>
<h5>写入以下内容</h5>
<div class="highlight"><pre><span class="k">[https://www.transifex.com]</span>
<span class="na">hostname</span> <span class="o">=</span> <span class="s">https://www.transifex.com</span>
<span class="na">username</span> <span class="o">=</span> <span class="s">user</span>
<span class="na">password</span> <span class="o">=</span> <span class="s">pass</span>
<span class="na">token</span> <span class="o">=</span>
</pre></div>
<h5>其中请将username和password改成您自己的用户名和密码,token留空</h5>
<h3>4.修改.transifexrc文件权限</h3>
<p><code>chmod o+rw ~/.transifexrc</code></p>
<h3>5.切换到edxapp用户并加载对应的环境变量</h3>
<div class="highlight"><pre><span class="n">sudo</span> <span class="o">-</span><span class="n">u</span> <span class="n">edxapp</span> <span class="n">bash</span>
<span class="n">source</span> <span class="o">/</span><span class="n">edx</span><span class="o">/</span><span class="n">app</span><span class="o">/</span><span class="n">edxapp</span><span class="o">/</span><span class="n">edxapp_env</span>
<span class="n">cd</span> <span class="o">/</span><span class="n">edx</span><span class="o">/</span><span class="n">app</span><span class="o">/</span><span class="n">edxapp</span><span class="o">/</span><span class="n">edx</span><span class="o">-</span><span class="n">platform</span>
</pre></div>
<h3>6.修改*ms.env.json文件</h3>
<p><code>vim ../lms.env.json</code></p>
<h5>lms.env.json添加以下内容</h5>
<div class="highlight"><pre><span class="s">"USE_I18N"</span><span class="o">:</span> <span class="nb">true</span><span class="p">,</span>
<span class="s">"LANGUAGE_CODE"</span><span class="o">:</span> <span class="s">"zh-cn"</span>
</pre></div>
<p><code>vim ../cms.env.json</code></p>
<h5>cms.env.json添加以下内容</h5>
<div class="highlight"><pre><span class="s">"USE_I18N"</span><span class="o">:</span> <span class="nb">true</span><span class="p">,</span>
<span class="s">"LANGUAGE_CODE"</span><span class="o">:</span> <span class="s">"zh-cn"</span>
</pre></div>
<h3>7.执行翻译(请注意我说的是翻译,不是汉化,因为这不仅仅是汉化)</h3>
<div class="highlight"><pre><span class="n">tx</span> <span class="n">pull</span> <span class="o">-</span><span class="n">l</span> <span class="n">zh_CN</span>
<span class="n">python</span> <span class="p">.</span><span class="o">/</span><span class="n">i18n</span><span class="o">/</span><span class="n">generate</span><span class="p">.</span><span class="n">py</span>
</pre></div>
<h3>8.更新assets</h3>
<div class="highlight"><pre><span class="n">paver</span> <span class="n">update_assets</span> <span class="n">lms</span> <span class="o">--</span><span class="n">settings</span> <span class="n">aws</span>
<span class="n">paver</span> <span class="n">update_assets</span> <span class="n">cms</span> <span class="o">--</span><span class="n">settings</span> <span class="n">aws</span>
</pre></div>
<h3>9.退出edxapp用户并重启edxapp</h3>
<div class="highlight"><pre><span class="n">exit</span>
<span class="n">sudo</span> <span class="o">/</span><span class="n">edx</span><span class="o">/</span><span class="n">bin</span><span class="o">/</span><span class="n">supervisorctl</span> <span class="o">-</span><span class="n">c</span> <span class="o">/</span><span class="n">edx</span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">supervisord</span><span class="p">.</span><span class="n">conf</span> <span class="n">restart</span> <span class="n">edxapp</span><span class="o">:</span>
</pre></div></div>
<footer>
<p class="meta">
<span class="byline author vcard">
Posted by <span class="fn">tulpar</span>
</span>
<time datetime="2014-02-09T00:00:00+08:00" pubdate>Sun 09 February 2014</time> <span class="categories">
<a class="category" href="/tag/edx.html">Edx</a>
</span>
</p><div class="sharing">
</div> </footer>
</article>
<!-- Duoshuo Comment BEGIN -->
<div class="ds-thread"></div>
<script type="text/javascript">
var duoshuoQuery = {short_name:"tlbog"};
(function() {
var ds = document.createElement('script');
ds.type = 'text/javascript';ds.async = true;
ds.src = 'http://static.duoshuo.com/embed.js';
ds.charset = 'UTF-8';
(document.getElementsByTagName('head')[0]
|| document.getElementsByTagName('body')[0]).appendChild(ds);
})();
</script>
<!-- Duoshuo Comment END -->
</div>
<aside class="sidebar">
<section>
<h1>Recent Posts</h1>
<ul id="recent_posts">
<li class="post">
<a href="/xie-bo-ke-jiao-ben.html">写博客脚本</a>
</li>
<li class="post">
<a href="/gong-zuo-shi-de-sui-bi.html">工作时的随笔</a>
</li>
<li class="post">
<a href="/ce-shi-wen-zhang.html">测试文章</a>
</li>
<li class="post">
<a href="/djangokai-qi-the-sites-framework.html">Django开启 the sites framework</a>
</li>
<li class="post">
<a href="/django-17shi-yong.html">Django 1.7试用</a>
</li>
</ul>
</section>
<section>
<h1>Categories</h1>
<ul id="recent_posts">
<li><a href="/category/it.html">It</a></li>
<li><a href="/category/life.html">Life</a></li>
</ul>
</section>
<section>
<h1>Tags</h1>
<a href="/tag/mysql.html">Mysql</a>, <a href="/tag/tmux.html">Tmux</a>, <a href="/tag/fan-qiang.html">翻墙</a>, <a href="/tag/linux.html">Linux</a>, <a href="/tag/edx.html">Edx</a>, <a href="/tag/virtualbox.html">VirtualBox</a>, <a href="/tag/wo-ai-wo-jia.html">我爱我家</a>, <a href="/tag/userena.html">userena</a>, <a href="/tag/xadmin.html">Xadmin</a>, <a href="/tag/shell.html">Shell</a>, <a href="/tag/python.html">Python</a>, <a href="/tag/djangopython.html">Django,python</a>, <a href="/tag/ssh.html">ssh</a>, <a href="/tag/ubuntu.html">Ubuntu</a>, <a href="/tag/git.html">Git</a>, <a href="/tag/ce-shi.html">测试</a>, <a href="/tag/ueditor.html">Ueditor</a>, <a href="/tag/github.html">Github</a>, <a href="/tag/socketio.html">Socket.io</a>, <a href="/tag/django.html">Django</a>, <a href="/tag/du-shu.html">读书</a>, <a href="/tag/bo-ke.html">博客</a>, <a href="/tag/ngrok.html">ngrok</a> </section>
<section>
<h1>Social</h1>
<ul>
<li><a href="http://izda.com" target="_blank">ئىزدە</a></li>
<li><a href="http://www.google.com" target="_blank">Google</a></li>
<li><a href="http://www.zhihu.com/" target="_blank">知乎</a></li>
<li><a href="http://www.douban.com/" target="_blank">豆瓣</a></li>
</ul>
</section>
<section>
<h1>Blogroll</h1>
<ul>
<li><a href="https://github.com/tulpar008" target="_blank">My Github</a></li>
<li><a href="#" target="_blank">tulpar008@gmail.com</a></li>
</ul>
</section>
</aside> </div>
</div>
<footer role="contentinfo"><p>
Copyright © 2013-2015 - tulpar -
<span class="credit">Powered by <a href="http://getpelican.com">Pelican</a></span>
</p></footer>
</body>
</html>