Skip to content

Multilingual Support

FLonpl6 edited this page Dec 16, 2014 · 3 revisions
⚠️ The actual system allowing the plugin to handle multiple languages is a custom solution build quickly to answer the need of our Chinese users while dealing with the restriction of the oVirt's UI Plugins. In the future versions, we will have to switch to something less specific as for example angular-translate.

Description

We build a simple multilingual support based on the solution provided by Hallstein Brøtan on his post: Creating multilingual support using AngularJS.

Due to the fact oVirt's UI Plugins doesn't seems to support static files, most of the translations are in the js file translations.js except for the answers from the API which are with the requests in the file ajax.js.

The language is chosen on the default browser language and not on the language define by the user in oVirt. This is due to the fact that the UI Plugin can't access the language parameter in the oVirt URL.

Supported Languages

  • 🇬🇧 English [Default]
  • 🇨🇳 Chinese

N.B. The answers of the API are still in English and so the messages displayed in the browser are pre-generated ones. To get the precise message send by the API, you should check them in your browser console.

Label Names and Translations

💡 Some of the messages where the {domain-name} has to be inserted are split in two.

General

Label Name English 中国
TAB_NAME Domains 域名
PROCESSING Processing... 处理...

Menu

Label Name English 中国
BTN_ADD_LABEL Add 添加
BTN_REFRESH_LABEL Refresh 刷新

Table

Label Name English 中国
TABLE_DOMAIN_LABEL Domain
TABLE_USERNAME_LABEL Username 用户名
TABLE_ACTIONS_LABEL Actions 行动
TABLE_NO_DOMAINS No domain to display. 无域显示。
TABLE_BTN_EDIT_LABEL Edit 编辑
TABLE_BTN_REMOVE_LABEL Delete 删除

Notification Messages

Label Name English 中国
NOTIFICATION_WELCOME Thanks for using this plugin. All the code is on GitHub. If you have any suggestion please open an issue on GitHub. 感谢您使用这个插件。所有的代码是在GitHub上。如果您有任何建议,请在GitHub上提一个issue。
NOTIFICATION_NEED_RESTART oVirt Engine restart is required in order for the changes to take place (service ovirt-engine restart). oVirt引擎需要重新启动,以更修改生效(service ovirt-engine restart)。
NOTIFICATION_REMOVE_USERS Please remove all users and groups of this domain using the Administration portal or the API. 请删除所有使用了管理门户或API的域的用户和组。

Notification Refresh

Label Name English 中国
NOTIFICATION_REFRESH_FAILED Impossible to refresh the list of Domains. 无法刷新域的列表。
NOTIFICATION_REFRESH_SUCCESS The list of Domains has been refreshed successfully. 域名列表中已成功刷新。

Notification Delete

Label Name English 中国
NOTIFICATION_DELETE_SUCCESS {domain-name} has been successfully deleted. _{domain-name}_已成功删除。
NOTIFICATION_DELETE_FAILED Impossible to delete the domain {domain-name}. 无法删除域_{domain-name}_。

Notification Add

Label Name English 中国
NOTIFICATION_ADD_SUCCESS The domain {domain-name} has been added successfully. 域_{domain-name}_已成功添加。
NOTIFICATION_ADD_FAILED Impossible to add the domain {domain-name}. 无法添加域_{domain-name}_。

Notification Edit

Label Name English 中国
NOTIFICATION_EDIT_SUCCESS The domain {domain-name} has been edited successfully. 域_{domain-name}_。
NOTIFICATION_EDIT_FAILED Impossible to edit the domain {domain-name}. 无法编辑域_{domain-name}_。

Add Dialog

Label Name English 中国
DIALOG_ADD_TITLE Add Domain 添加域
DIALOG_ADD_FORM_DOMAIN Domain
DIALOG_ADD_FORM_DOMAIN_HELP The domain you want to add. 您想要添加的域。
DIALOG_ADD_FORM_PROVIDER Provider 提供商
DIALOG_ADD_FORM_PROVIDER_HELP The LDAP provider type of server used for the domain. 域所使用的域服务器的LDAP提供程序类型。
DIALOG_ADD_FORM_USER User 用户
DIALOG_ADD_FORM_USER_HELP The domain user. 域用户。
DIALOG_ADD_FORM_PASSWORD Password 密码
DIALOG_ADD_FORM_PASSWORD_HELP If you want to use a file containing the password use the Advanced Parameters. 如果您想要使用一个包含密码的文件,请使用高级的参数
DIALOG_ADD_FORM_PASSWORD_SHOW Show password 显示密码
DIALOG_ADD_FORM_ADVANCED_PARAM Advanced Parameters 高级参数
DIALOG_ADD_FORM_ADDPERMISSION Add Permission 添加权限
DIALOG_ADD_FORM_ADDPERMISSION_HELP Add engine superuser permissions to the user. 为用户添加engine超级用户权限。
DIALOG_ADD_FORM_CONFIGFILE Config File 配置文件
DIALOG_ADD_FORM_CONFIGFILE_HELP Use the given alternate configuration file. [Use the absolute path of the file on the machine] 使用给定的备用配置文件。 [使用本机上的文件的绝对路径]
DIALOG_ADD_FORM_LDAPSERVERS LDAP Servers LDAP服务器
DIALOG_ADD_FORM_LDAPSERVERS_HELP A comma delimited list of LDAP servers to be set to the domain. LDAP服务器的逗号分隔的列表中设置的域。
DIALOG_ADD_FORM_RESOLVEKDC Resolve KDC 解析KDC
DIALOG_ADD_FORM_RESOLVEKDC_HELP Resolve KDC servers using DNS (don't assume they are the same as LDAP servers). 使用DNS解析服务器KDC(不要以为他们是一样的LDAP服务器)。
DIALOG_ADD_FORM_PASSWORDFILE Password File 密码文件
DIALOG_ADD_FORM_PASSWORDFILE_HELP A file containing the password. [Use the absolute path of the file on the machine] 包含密码的文件。 [使用本机上的文件的绝对路径]
DIALOG_ADD_FORM_ERROR_MSG Domain, Provider, User and PasswordFile are requiered input. Please fill them correctly ! 需要输入域,供应商,用户和密码文件。请正确填写他们!

Edit Dialog

Label Name English 中国
DIALOG_EDIT_TITLE Edit 编辑
DIALOG_EDIT_HELP To edit {domain-name} please fill only the fields you want to modify. 编辑_{domain-name}_请只填写您要修改的字段。
DIALOG_EDIT_FORM_PROVIDER Provider 提供商
DIALOG_EDIT_FORM_PROVIDER_HELP The LDAP provider type of server used for the domain. 域所使用的域服务器的LDAP提供程序类型。
DIALOG_EDIT_FORM_USER User 用户
DIALOG_EDIT_FORM_USER_HELP The domain user. 域用户。
DIALOG_EDIT_FORM_PASSWORD Password 密码
DIALOG_EDIT_FORM_PASSWORD_HELP If you want to use a file containing the password use the Advanced Parameters. 如果你想使用包含密码​​的文件请使用的高级参数。
DIALOG_EDIT_FORM_PASSWORD_SHOW Show password 显示密码
DIALOG_EDIT_FORM_ADDPERMISSION A dd Permission 添加权限
DIALOG_EDIT_FORM_ADDPERMISSION_HELP Add engine superuser permissions to the user. 为用户添加engine超级用户权限。
DIALOG_EDIT_FORM_CONFIGFILE Config File 配置文件
DIALOG_EDIT_FORM_CONFIGFILE_HELP Use the given alternate configuration file. [Use the absolute path of the file on the machine] 使用给定的备用配置文件。 [使用本机上的文件的绝对路径]
DIALOG_EDIT_FORM_LDAPSERVERS LDAP Servers LDAP服务器
DIALOG_EDIT_FORM_LDAPSERVERS_HELP A comma delimited list of LDAP servers to be set to the domain. LDAP服务器的逗号分隔的列表中设置的域。
DIALOG_EDIT_FORM_RESOLVEKDC Resolve KDC 解析KDC
DIALOG_EDIT_FORM_RESOLVEKDC_HELP Resolve KDC servers using DNS (don't assume they are the same as LDAP servers). 使用DNS解析服务器KDC(不要以为他们是一样的LDAP服务器)。
DIALOG_EDIT_FORM_PASSWORDFILE Password File 密码文件
DIALOG_EDIT_FORM_PASSWORDFILE_HELP A file containing the password. [Use the absolute path of the file on the machine] 包含密码的文件。 [使用本机上的文件的绝对路径]
DIALOG_EDIT_FORM_ERROR_MSG Your form is not correct ! Please precise a valid absolute path to the file containing the password. 您的格式不正确!请将正确的路径写到包含密码的文件中。

Delete Dialog

Label Name English 中国
DIALOG_DELETE_HELP Are you sure you want to delete the domain {domain-name} ? 你确定要删除域_{domain-name}_?