The dashboard of openstack adopts the Django architecture, while Django is a web development framework of Python.
Here we will not see the text in the box, but we will modify several HTML templates.
/usr/lib64/python2.6/site-packages/horizon/templates/auth/_login.html # 修改登录页面显示/usr/share/openstack-dashboard/openstack_dashboard/templates/_header.html # 修改的左上角的 pagetitle(animbus)/usr/lib64/python2.6/site-packages/horizon/templates/horizon/_subnav_list.html # 修改的是 NAVIGATION/usr/lib64/python2.6/site-packages/horizon/templates/horizon/common/_page_header.html # 修改的是 page_header内容/usr/share/openstack-dashboard/openstack_dashboard/templates/_header.html # 注释掉 about 按钮(右上角的)
Note: The annotator in Django template is <! --> Or {##}
cd /usr/share/openstack-dashboard/openstack_dashboard # 切换到这个目录下,不然执行下面这个命令或报错django-admin makemessages -l zh_CN # 如果有po文件,就不要重新生成po文件了 ll locale/zh_CN/LC_MESSAGES/django.po # 生成的po文件在这里# 直接编辑django.po文件,修改要翻译的内容msgfmt --statistics --verbose -o django.mo django.po # 编译po文件,会产生一个同名的mo文件
You want to learn more about Django internationalization, see here http://djangobook.py3k.cn/2.0/chapter19/
Reference
Http://www.aboutyun.com/blog-61-64.html
This article is from the "the-way-to-cloud" blog, please be sure to keep this source http://iceyao.blog.51cto.com/9426658/1568734
Horizon-animbus logo DIY