From 61f0fcfa8f27863358571adf5e62166d858dd22d Mon Sep 17 00:00:00 2001 From: baqianxin Date: Wed, 3 Jan 2018 10:00:11 +0800 Subject: [PATCH 1/6] add Chinese message --- src/messages/cn/admin.php | 278 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 278 insertions(+) create mode 100644 src/messages/cn/admin.php diff --git a/src/messages/cn/admin.php b/src/messages/cn/admin.php new file mode 100644 index 0000000000..ce47cf5819 --- /dev/null +++ b/src/messages/cn/admin.php @@ -0,0 +1,278 @@ + '中文', + 'button_save' => '保存', + 'button_confirm' => 'Yes', + 'button_abort' => 'Cancel', + 'button_send' => 'Send', + 'login_pre_title' => 'Login for {title}', + 'login_mail' => 'Email', + 'login_password' => 'Password', + 'login_btn_login' => 'Login', + 'login_securetoken' => 'Security code', + 'login_securetoken_info' => 'Enter the security code that was sent to your email.', + 'menu_node_system' => '系统管理', + 'menu_node_filemanager' => '文件管理', + 'menu_group_access' => '访问控制', + 'menu_group_system' => '系统参数', + 'menu_group_images' => '图片选项', + 'menu_access_item_user' => '用户', + 'menu_access_item_group' => '权限组', + 'menu_system_item_language' => '语言', + 'menu_system_item_tags' => 'Tags', + 'menu_images_item_effects' => 'Effects', + 'menu_images_item_filters' => '过滤器', + 'dashboard_title' => '欢迎.', + 'dashboard_text' => 'You can switch between modules in the main navigation at the top of the screen.
The side navigation to the left gives you access to functions of the selected module.', + 'layout_select_file' => 'Choose file', + 'layout_deleted_file' => 'You can\'t apply a filter because the original file was deleted. Upload or select a new file to apply a filter.', + 'layout_no_filter' => 'No filter', + 'layout_debug_table_key' => 'Name', + 'layout_debug_table_value' => 'Value', + 'layout_filemanager_save_dir' => 'Save?', + 'layout_filemanager_remove_dir' => 'Delete directory?', + 'layout_filemanager_remove_dir_not_empty' => 'Are you sure you want to delete the folder "%folderName%" with %count% files?', + 'layout_filemanager_remove_selected_files' => 'Delete selected files', + 'layout_filemanager_move_selected_files' => 'Move to', + 'layout_filemanager_upload_error' => 'Error while uploading file', + 'layout_filemanager_col_name' => 'Name', + 'layout_filemanager_col_type' => 'Type', + 'layout_filemanager_col_date' => 'Creation Date', + 'layout_filemanager_detail_name' => 'Filename', + 'layout_filemanager_detail_date' => 'Creation Date', + 'layout_filemanager_detail_filetype' => 'File Type', + 'layout_filemanager_detail_size' => 'Size', + 'layout_filemanager_detail_id' => 'Internal ID', + 'layout_filemanager_detail_download' => '下载', + 'layout_btn_reload' => '刷新', + 'layout_btn_version' => '版本', + 'layout_btn_useronline' => '当前用户', + 'layout_btn_logout' => '注销', + 'layout_btn_profile' => '用户设置', + 'layout_debug_luya_version' => '系统版本', + 'layout_debug_id' => 'ID', + 'layout_debug_sitetitle' => 'Site title', + 'layout_debug_remotetoken' => 'Remote token', + 'layout_debug_assetmanager_forcecopy' => 'AssetManager forceCopy', // no translation + 'layout_debug_transfer_exceptions' => 'Transfer Exceptions', // no translation + 'layout_debug_yii_debug' => 'YII_DEBUG', // no translation + 'layout_debug_yii_env' => 'YII_ENV', // no translation + 'layout_debug_app_language' => 'Yii App Language', // no translation + 'layout_debug_luya_language' => 'Luya Language', // no translation + 'layout_debug_yii_timezone' => 'Yii Timezone', // no translation + 'layout_debug_php_timezone' => 'PHP Timezone', // no translation + 'layout_debug_php_ini_memory_limit' => 'PHP memory_limit', // no translation + 'layout_debug_php_ini_max_exec' => 'PHP max_execution_time', // no translation + 'layout_debug_php_ini_post_max_size' => 'PHP post_max_size', // no translation + 'layout_debug_php_ini_upload_max_file' => 'PHP upload_max_filesize', // no translation + 'layout_search_min_letters' => 'Please enter a search term with at least three letters.', + 'layout_search_no_results' => 'No entries were found.', + 'layout_filemanager_upload_files' => '上传文件', + 'layout_filemanager_folder' => 'Folder', + 'layout_filemanager_add_folder' => '添加目录', + 'layout_filemanager_root_dir' => '根目录', + 'aws_groupauth_select_all' => '全选', + 'aws_groupauth_deselect_all' => '取消所有', + 'aws_groupauth_th_module' => '模块名', + 'aws_groupauth_th_function' => '菜单项', + 'aws_groupauth_th_add' => '添加', + 'aws_groupauth_th_edit' => '修改', + 'aws_groupauth_th_remove' => '删除', + 'model_group_name' => '组名', + 'model_group_description' => '权限描述', + 'model_group_user_buttons' => '用户列表', + 'model_group_btn_aws_groupauth' => '权限配置', + 'ngrest_crud_btn_list' => '列表', + 'ngrest_crud_btn_add' => '新增', + 'ngrest_crud_btn_close' => 'Close', + 'ngrest_crud_search_text' => '输入搜索词...', + 'ngrest_crud_rows_count' => 'Entries', + 'ngrest_crud_btn_create' => 'Create', + 'api_storage_image_upload_error' => 'The following error occurred while uploading an image \'{error}\'.', + 'api_storage_file_upload_success' => 'Files have been uploaded successfully.', + 'api_sotrage_file_upload_error' => 'The following error occurred while uploading a file \'{error}\'.', + 'api_sotrage_file_upload_empty_error' => 'No files found for uploading. Did you select any files?', + 'aws_changepassword_info' => 'Please enter a new password for this user. The password must have a minimum length of 6 characters.', + 'aws_changepassword_succes' => 'The password has been encrypted and stored successfully.', + 'aws_changepassword_new_pass' => '新密码', + 'aws_changepassword_new_pass_retry' => '重复密码', + 'view_index_redirect_type' => 'Link with', + 'view_index_redirect_internal' => 'internal page', + 'view_index_redirect_external' => 'external URL', + 'view_index_redirect_internal_select' => 'Choose the internal page that should be forwarded to.', + 'view_index_redirect_external_link' => 'External link', + 'view_index_redirect_external_link_help' => 'External links start with http:// or https:// (for absolute internal links, use // instead)', + +// added translation in 1.0.0-beta3: + + 'model_loginform_email_label' => 'Email', + 'model_loginform_password_label' => 'Password', + 'model_loginform_wrong_user_or_password' => 'Wrong email or password.', + 'ngrest_select_no_selection' => 'Nothing selected', + 'js_ngrest_error' => 'An error occurred while loading.', + 'js_ngrest_rm_page' => 'Do you really want to delete this entry? This can not be undone.', + 'js_ngrest_rm_confirm' => 'The record was deleted successfully.', + 'js_ngrest_rm_update' => 'The record was updated successfully.', + 'js_ngrest_rm_success' => 'The new record was inserted successfully.', + 'js_tag_exists' => 'exists already and can not be added.', + 'js_tag_success' => 'Tag information was saved.', + 'js_admin_reload' => 'The system was updated and has to be reloaded. Please save your changes in the current form. (Clicking "cancel" will display this dialog again in 30 seconds.)', + 'js_dir_till' => 'to', + 'js_dir_set_date' => 'Set current date', + 'js_dir_table_add_row' => 'Add row', + 'js_dir_table_add_column' => 'Add column', + 'js_dir_image_description' => 'Description', + 'js_dir_no_selection' => 'No entries available yet. Add new entries by clicking the + below to the left.', + 'js_dir_image_upload_ok' => 'The image was created successfully.', + 'js_dir_image_filter_error' => 'There was an error while applying the filter to the file.', + 'js_dir_upload_wait' => 'Your data is being uploaded and processed. This can take several minutes.', + 'js_dir_manager_upload_image_ok' => 'The file was uploaded successfully.', + 'js_dir_manager_rm_file_confirm' => 'Do you really want to delete this file?', + 'js_dir_manager_rm_file_ok' => 'The file was deleted successfully.', + 'js_zaa_server_proccess' => 'Please wait while the server is processing your data.', + +// added translation in 1.0.0-beta4: + + 'ngrest_crud_empty_row' => 'No data has been added to this table yet.', + +// added translation in 1.0.0-beta5: + + 'aws_gallery_empty' => 'Please select some images to the left to add them to the gallery album.', + 'aws_gallery_images' => 'Album images', + 'layout_useronline_name' => 'Name', + 'layout_useronline_mail' => 'Email', + 'layout_useronline_inactivesince' => 'Inactive since', + +// added translations in 1.0.0-beta6 + + 'layout_debug_caching' => 'Caching', + 'debug_state_on' => 'On', + 'debug_state_off' => 'Off', + +// added translations in 1.0.0-beta7 + + 'login_securetoken_mail_subject' => 'LUYA Security code', + 'login_securetoken_mail' => '

LUYA Security code

Use the following security code to log into your administration at {url}:

{token}', + 'login_async_token_error' => 'The provided security code is invalid.', + 'login_async_token_globalerror' => 'A Server error occurred, please contact your site administrator.', + 'ngrest_crud_csv_export_btn' => 'Generate CSV', + 'ngrest_crud_csv_export_btn_dl' => 'Download CSV', + 'layout_filemanager_search_text' => 'Enter search term...', + 'layout_filemanager_file_captions' => 'File caption', + 'layout_filemanager_file_captions_save_btn' => '保存', + 'mode_user_title' => '称呼', + 'mode_user_firstname' => '姓氏', + 'mode_user_lastname' => '名字', + 'mode_user_email' => '邮箱', + 'mode_user_password' => 'Password', + +// added translations in 1.0.0-beta8 + 'aws_tag_new' => 'Add new entry', + 'aws_tag_add' => 'add', + 'aws_tag_search' => 'Search entries', + 'aws_tag_list' => 'List of all entries', + 'dashboard_log_message_add' => 'Added a new row to {container}.', + 'dashboard_log_message_edit' => 'Updated an existing row in {container}.', + +// rc1 + + 'layout_btn_help' => 'Help', + 'right_panel_support_title' => 'Information & Help', + 'right_panel_support_tags_title' => 'Tags', + 'right_panel_support_support_title' => 'Support', + 'right_panel_support_support_text' => 'If you have any questions, please contact your webmaster or consult luya.io.', + +// rc2 + + 'ngrest_crud_group_prompt' => '分组字段', + 'ngrest_crud_filter_prompt' => 'Select filter', + 'ngrest_crud_ajax_search_length' => 'The search query must have a minimum length of 3 characters.', + 'menu_system_logger' => 'Logging', + 'layout_filemanager_detail_replace_file' => 'Replace file', + 'layout_rightbar_languagelabel' => '主界面语言', + 'layout_rightbar_savebtn' => '保存', + 'aws_changepassword_notequal' => 'The new password and the password repetition are not equal.', + 'aws_changeapssword_minchar' => 'The new password must have a minimum length of {min} characters.', + +// rc3 + + 'model_pk_id' => 'ID', + 'model_lang_name' => 'Name', + 'model_lang_short_code' => 'Short Code', + 'model_lang_is_default' => 'Is default', + 'model_lang_delete_error_is_default' => 'Unable to delete the default language of the System.', + 'model_logger_time' => 'Time', + 'model_logger_message' => 'Message', + 'model_logger_type' => 'Type', + 'model_logger_badgetype' => 'Status', + 'model_logger_trace_file' => 'Trace File', + 'model_logger_trace_line' => 'Trace Line', + 'model_logger_trace_function' => 'Trace Function', + 'model_logger_trace_function_args' => 'Trace Function Args', + 'model_logger_get' => 'Get', + 'model_logger_post' => 'Post', + 'model_logger_session' => 'Session', + 'model_logger_server' => 'Server', + 'model_logger_group_identifier' => 'Request Group', + 'model_logger_group_identifier_index' => 'Position', + 'model_storageeffect_identifier' => 'Identifier', + 'model_storageeffect_name' => 'Name', + 'model_storageeffect_imagine_name' => 'Effect Name', + 'model_storageeffect_imagine_json_params' => 'Effect JSON Configuration', + 'model_storagefilter_identifier' => 'Filter Identifier', + 'model_storagefilter_name' => 'Filter Name', + 'model_tag_name' => 'Tag Identifier', + 'model_user_lastlogintimestamp' => 'Last login', + 'model_user_title_mr' => 'Mr.', + 'model_user_title_mrs' => 'Ms.', + 'js_ngrest_toggler_success' => '%field% successfully updated.', + 'layout_image_filter_selection' => 'Select image filter:', + 'lock_admin_edit_crud_item' => 'Editing {module} "{table}" (ID: {id}).', + 'lock_cms_edit_page' => 'Editing page "{title}".', + 'layout_filemanager_col_size' => 'File size', + 'js_filemanager_count_files_overlay' => '%count% files', + 'js_link_change_value' => 'Change Link', + 'js_link_set_value' => 'Set Link', + 'callback_button_file_download_widget_success' => 'The file has been prepared. You can download it now.', + +// rc4 + + 'api_storage_file_upload_folder_error' => 'Error while saveing the file in the storage folder. A permission error could cause this problem. Make sure the storage folder is writeable.', + 'model_user_oldpassword' => '旧密码', + 'js_account_update_profile_success' => 'The profile data has been successfull updated.', + 'dashboard_lastlogin_title' => '最后登录时间', + 'layout_useronline_activity' => 'Activity', + 'layout_useronline_inactive' => 'inactive', + 'login_ssl_info' => 'Website uses encrypted secure connection.', + 'locked_info' => 'Someone already editing', + 'menu_dashboard' => '控制台', + 'js_link_not_set' => 'No Link selected', + +// 1.0.0 + + 'ngrest_button_delete' => 'Delete', + 'js_dir_manager_rm_file_confirm_title' => 'Remove file', + 'js_dir_manager_rm_folder_confirm_title' => 'Remove folder', + 'link_dir_target' => 'Link target', + 'link_dir_target_same' => 'Same window', + 'link_dir_target_blank' => 'New window', + 'view_index_redirect_file' => 'file', + 'view_index_redirect_mail' => 'e-mail address', + 'view_index_redirect_mail_help' => 'Please enter a valid e-mail address.', + 'menu_button_search' => '搜索', + 'layout_btn_user_settings' => 'Preference', + 'upload_err_message_0' => 'There is no error, the file uploaded with success.', + 'upload_err_message_1' => 'The uploaded file exceeds the upload_max_filesize directive in php.ini.', + 'upload_err_message_2' => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.', + 'upload_err_message_3' => 'The uploaded file was only partially uploaded.', + 'upload_err_message_4' => 'No file was uploaded.', + 'upload_err_message_6' => 'Missing a temporary folder.', + 'upload_err_message_7' => 'Failed to write file to disk.', + 'upload_err_message_8' => 'A PHP extension stopped the file upload.', + 'model_config_atr_name' => 'Identifier', + 'model_config_atr_name_hint' => 'Unique identifier for this variable. You can access system config with Config::get(identifier) in your application.', + 'model_config_atr_value' => 'Value', + 'model_config_atr_is_system' => 'Is system', + 'menu_system_item_config' => 'Config variables' +]; From ff3e059c44e165cc5b9466b7963bd68ba712fde9 Mon Sep 17 00:00:00 2001 From: baqianxin Date: Wed, 3 Jan 2018 10:17:35 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Module.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Module.php b/src/Module.php index 6e9cd9883c..a74897794c 100644 --- a/src/Module.php +++ b/src/Module.php @@ -71,6 +71,7 @@ final class Module extends \luya\admin\base\Module implements CoreModuleInterfac 'vi' => 'Việt Nam', 'pt' => 'Português', 'fa' => 'فارسی', + 'cn' => '中文简体', ]; /** From 8f36ecaa7e3e7130e56daa7d7b2574368262eac3 Mon Sep 17 00:00:00 2001 From: baqianxin Date: Wed, 3 Jan 2018 10:19:11 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=B7=BB=E5=8A=A0angular-locale=5Fcn.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../angular-i18n/angular-locale_cn.js | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 src/resources/angular-i18n/angular-locale_cn.js diff --git a/src/resources/angular-i18n/angular-locale_cn.js b/src/resources/angular-i18n/angular-locale_cn.js new file mode 100644 index 0000000000..55076c8432 --- /dev/null +++ b/src/resources/angular-i18n/angular-locale_cn.js @@ -0,0 +1,128 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); From 15d9d7b561c0ff925a9e3b7353c706f12d9f8fc9 Mon Sep 17 00:00:00 2001 From: baqianxin Date: Wed, 3 Jan 2018 16:04:38 +0800 Subject: [PATCH 4/6] add chinese message --- src/Module.php | 1 + src/messages/cn/admin.php | 278 ++++++++++++++++++ .../angular-i18n/angular-locale_cn.js | 128 ++++++++ 3 files changed, 407 insertions(+) create mode 100644 src/messages/cn/admin.php create mode 100644 src/resources/angular-i18n/angular-locale_cn.js diff --git a/src/Module.php b/src/Module.php index 6e9cd9883c..a74897794c 100644 --- a/src/Module.php +++ b/src/Module.php @@ -71,6 +71,7 @@ final class Module extends \luya\admin\base\Module implements CoreModuleInterfac 'vi' => 'Việt Nam', 'pt' => 'Português', 'fa' => 'فارسی', + 'cn' => '中文简体', ]; /** diff --git a/src/messages/cn/admin.php b/src/messages/cn/admin.php new file mode 100644 index 0000000000..7c2d96bdfe --- /dev/null +++ b/src/messages/cn/admin.php @@ -0,0 +1,278 @@ + '中文', + 'button_save' => '保存', + 'button_confirm' => '确认', + 'button_abort' => '取消', + 'button_send' => '发送', + 'login_pre_title' => 'Login for {title}', + 'login_mail' => 'Email', + 'login_password' => 'Password', + 'login_btn_login' => 'Login', + 'login_securetoken' => 'Security code', + 'login_securetoken_info' => 'Enter the security code that was sent to your email.', + 'menu_node_system' => '系统管理', + 'menu_node_filemanager' => '文件管理', + 'menu_group_access' => '访问控制', + 'menu_group_system' => '系统参数', + 'menu_group_images' => '图片选项', + 'menu_access_item_user' => '用户', + 'menu_access_item_group' => '权限组', + 'menu_system_item_language' => '语言', + 'menu_system_item_tags' => 'Tags', + 'menu_images_item_effects' => 'Effects', + 'menu_images_item_filters' => '过滤器', + 'dashboard_title' => '欢迎.', + 'dashboard_text' => 'You can switch between modules in the main navigation at the top of the screen.
The side navigation to the left gives you access to functions of the selected module.', + 'layout_select_file' => 'Choose file', + 'layout_deleted_file' => 'You can\'t apply a filter because the original file was deleted. Upload or select a new file to apply a filter.', + 'layout_no_filter' => 'No filter', + 'layout_debug_table_key' => 'Name', + 'layout_debug_table_value' => 'Value', + 'layout_filemanager_save_dir' => 'Save?', + 'layout_filemanager_remove_dir' => 'Delete directory?', + 'layout_filemanager_remove_dir_not_empty' => 'Are you sure you want to delete the folder "%folderName%" with %count% files?', + 'layout_filemanager_remove_selected_files' => 'Delete selected files', + 'layout_filemanager_move_selected_files' => 'Move to', + 'layout_filemanager_upload_error' => 'Error while uploading file', + 'layout_filemanager_col_name' => 'Name', + 'layout_filemanager_col_type' => 'Type', + 'layout_filemanager_col_date' => 'Creation Date', + 'layout_filemanager_detail_name' => 'Filename', + 'layout_filemanager_detail_date' => 'Creation Date', + 'layout_filemanager_detail_filetype' => 'File Type', + 'layout_filemanager_detail_size' => 'Size', + 'layout_filemanager_detail_id' => 'Internal ID', + 'layout_filemanager_detail_download' => '下载', + 'layout_btn_reload' => '刷新', + 'layout_btn_version' => '版本', + 'layout_btn_useronline' => '当前用户', + 'layout_btn_logout' => '注销', + 'layout_btn_profile' => '用户设置', + 'layout_debug_luya_version' => '系统版本', + 'layout_debug_id' => 'ID', + 'layout_debug_sitetitle' => 'Site title', + 'layout_debug_remotetoken' => 'Remote token', + 'layout_debug_assetmanager_forcecopy' => 'AssetManager forceCopy', // no translation + 'layout_debug_transfer_exceptions' => 'Transfer Exceptions', // no translation + 'layout_debug_yii_debug' => 'YII_DEBUG', // no translation + 'layout_debug_yii_env' => 'YII_ENV', // no translation + 'layout_debug_app_language' => 'Yii App Language', // no translation + 'layout_debug_luya_language' => 'Luya Language', // no translation + 'layout_debug_yii_timezone' => 'Yii Timezone', // no translation + 'layout_debug_php_timezone' => 'PHP Timezone', // no translation + 'layout_debug_php_ini_memory_limit' => 'PHP memory_limit', // no translation + 'layout_debug_php_ini_max_exec' => 'PHP max_execution_time', // no translation + 'layout_debug_php_ini_post_max_size' => 'PHP post_max_size', // no translation + 'layout_debug_php_ini_upload_max_file' => 'PHP upload_max_filesize', // no translation + 'layout_search_min_letters' => 'Please enter a search term with at least three letters.', + 'layout_search_no_results' => 'No entries were found.', + 'layout_filemanager_upload_files' => '上传文件', + 'layout_filemanager_folder' => 'Folder', + 'layout_filemanager_add_folder' => '添加目录', + 'layout_filemanager_root_dir' => '根目录', + 'aws_groupauth_select_all' => '全选', + 'aws_groupauth_deselect_all' => '取消所有', + 'aws_groupauth_th_module' => '模块名', + 'aws_groupauth_th_function' => '菜单项', + 'aws_groupauth_th_add' => '添加', + 'aws_groupauth_th_edit' => '修改', + 'aws_groupauth_th_remove' => '删除', + 'model_group_name' => '组名', + 'model_group_description' => '权限描述', + 'model_group_user_buttons' => '用户列表', + 'model_group_btn_aws_groupauth' => '权限配置', + 'ngrest_crud_btn_list' => '列表', + 'ngrest_crud_btn_add' => '新增', + 'ngrest_crud_btn_close' => 'Close', + 'ngrest_crud_search_text' => '输入搜索词...', + 'ngrest_crud_rows_count' => 'Entries', + 'ngrest_crud_btn_create' => 'Create', + 'api_storage_image_upload_error' => 'The following error occurred while uploading an image \'{error}\'.', + 'api_storage_file_upload_success' => 'Files have been uploaded successfully.', + 'api_sotrage_file_upload_error' => 'The following error occurred while uploading a file \'{error}\'.', + 'api_sotrage_file_upload_empty_error' => 'No files found for uploading. Did you select any files?', + 'aws_changepassword_info' => 'Please enter a new password for this user. The password must have a minimum length of 6 characters.', + 'aws_changepassword_succes' => 'The password has been encrypted and stored successfully.', + 'aws_changepassword_new_pass' => '新密码', + 'aws_changepassword_new_pass_retry' => '重复密码', + 'view_index_redirect_type' => 'Link with', + 'view_index_redirect_internal' => 'internal page', + 'view_index_redirect_external' => 'external URL', + 'view_index_redirect_internal_select' => 'Choose the internal page that should be forwarded to.', + 'view_index_redirect_external_link' => 'External link', + 'view_index_redirect_external_link_help' => 'External links start with http:// or https:// (for absolute internal links, use // instead)', + +// added translation in 1.0.0-beta3: + + 'model_loginform_email_label' => 'Email', + 'model_loginform_password_label' => 'Password', + 'model_loginform_wrong_user_or_password' => 'Wrong email or password.', + 'ngrest_select_no_selection' => 'Nothing selected', + 'js_ngrest_error' => 'An error occurred while loading.', + 'js_ngrest_rm_page' => 'Do you really want to delete this entry? This can not be undone.', + 'js_ngrest_rm_confirm' => 'The record was deleted successfully.', + 'js_ngrest_rm_update' => 'The record was updated successfully.', + 'js_ngrest_rm_success' => 'The new record was inserted successfully.', + 'js_tag_exists' => 'exists already and can not be added.', + 'js_tag_success' => 'Tag information was saved.', + 'js_admin_reload' => 'The system was updated and has to be reloaded. Please save your changes in the current form. (Clicking "cancel" will display this dialog again in 30 seconds.)', + 'js_dir_till' => 'to', + 'js_dir_set_date' => 'Set current date', + 'js_dir_table_add_row' => 'Add row', + 'js_dir_table_add_column' => 'Add column', + 'js_dir_image_description' => 'Description', + 'js_dir_no_selection' => 'No entries available yet. Add new entries by clicking the + below to the left.', + 'js_dir_image_upload_ok' => 'The image was created successfully.', + 'js_dir_image_filter_error' => 'There was an error while applying the filter to the file.', + 'js_dir_upload_wait' => 'Your data is being uploaded and processed. This can take several minutes.', + 'js_dir_manager_upload_image_ok' => 'The file was uploaded successfully.', + 'js_dir_manager_rm_file_confirm' => 'Do you really want to delete this file?', + 'js_dir_manager_rm_file_ok' => 'The file was deleted successfully.', + 'js_zaa_server_proccess' => 'Please wait while the server is processing your data.', + +// added translation in 1.0.0-beta4: + + 'ngrest_crud_empty_row' => 'No data has been added to this table yet.', + +// added translation in 1.0.0-beta5: + + 'aws_gallery_empty' => 'Please select some images to the left to add them to the gallery album.', + 'aws_gallery_images' => 'Album images', + 'layout_useronline_name' => 'Name', + 'layout_useronline_mail' => 'Email', + 'layout_useronline_inactivesince' => 'Inactive since', + +// added translations in 1.0.0-beta6 + + 'layout_debug_caching' => 'Caching', + 'debug_state_on' => 'On', + 'debug_state_off' => 'Off', + +// added translations in 1.0.0-beta7 + + 'login_securetoken_mail_subject' => 'LUYA Security code', + 'login_securetoken_mail' => '

LUYA Security code

Use the following security code to log into your administration at {url}:

{token}', + 'login_async_token_error' => 'The provided security code is invalid.', + 'login_async_token_globalerror' => 'A Server error occurred, please contact your site administrator.', + 'ngrest_crud_csv_export_btn' => '生成 CSV', + 'ngrest_crud_csv_export_btn_dl' => '下载 CSV', + 'layout_filemanager_search_text' => '输入搜索词...', + 'layout_filemanager_file_captions' => '文件标题', + 'layout_filemanager_file_captions_save_btn' => '保存', + 'mode_user_title' => '称呼', + 'mode_user_firstname' => '姓氏', + 'mode_user_lastname' => '名字', + 'mode_user_email' => '邮箱', + 'mode_user_password' => 'Password', + +// added translations in 1.0.0-beta8 + 'aws_tag_new' => 'Add new entry', + 'aws_tag_add' => 'add', + 'aws_tag_search' => 'Search entries', + 'aws_tag_list' => 'List of all entries', + 'dashboard_log_message_add' => 'Added a new row to {container}.', + 'dashboard_log_message_edit' => 'Updated an existing row in {container}.', + +// rc1 + + 'layout_btn_help' => 'Help', + 'right_panel_support_title' => 'Information & Help', + 'right_panel_support_tags_title' => 'Tags', + 'right_panel_support_support_title' => 'Support', + 'right_panel_support_support_text' => 'If you have any questions, please contact your webmaster or consult luya.io.', + +// rc2 + + 'ngrest_crud_group_prompt' => '分组字段', + 'ngrest_crud_filter_prompt' => 'Select filter', + 'ngrest_crud_ajax_search_length' => 'The search query must have a minimum length of 3 characters.', + 'menu_system_logger' => 'Logging', + 'layout_filemanager_detail_replace_file' => 'Replace file', + 'layout_rightbar_languagelabel' => '主界面语言', + 'layout_rightbar_savebtn' => '保存', + 'aws_changepassword_notequal' => 'The new password and the password repetition are not equal.', + 'aws_changeapssword_minchar' => 'The new password must have a minimum length of {min} characters.', + +// rc3 + + 'model_pk_id' => 'ID', + 'model_lang_name' => 'Name', + 'model_lang_short_code' => 'Short Code', + 'model_lang_is_default' => 'Is default', + 'model_lang_delete_error_is_default' => 'Unable to delete the default language of the System.', + 'model_logger_time' => 'Time', + 'model_logger_message' => 'Message', + 'model_logger_type' => 'Type', + 'model_logger_badgetype' => 'Status', + 'model_logger_trace_file' => 'Trace File', + 'model_logger_trace_line' => 'Trace Line', + 'model_logger_trace_function' => 'Trace Function', + 'model_logger_trace_function_args' => 'Trace Function Args', + 'model_logger_get' => 'Get', + 'model_logger_post' => 'Post', + 'model_logger_session' => 'Session', + 'model_logger_server' => 'Server', + 'model_logger_group_identifier' => 'Request Group', + 'model_logger_group_identifier_index' => 'Position', + 'model_storageeffect_identifier' => 'Identifier', + 'model_storageeffect_name' => 'Name', + 'model_storageeffect_imagine_name' => 'Effect Name', + 'model_storageeffect_imagine_json_params' => 'Effect JSON Configuration', + 'model_storagefilter_identifier' => 'Filter Identifier', + 'model_storagefilter_name' => 'Filter Name', + 'model_tag_name' => 'Tag Identifier', + 'model_user_lastlogintimestamp' => 'Last login', + 'model_user_title_mr' => 'Mr.', + 'model_user_title_mrs' => 'Ms.', + 'js_ngrest_toggler_success' => '%field% successfully updated.', + 'layout_image_filter_selection' => 'Select image filter:', + 'lock_admin_edit_crud_item' => 'Editing {module} "{table}" (ID: {id}).', + 'lock_cms_edit_page' => 'Editing page "{title}".', + 'layout_filemanager_col_size' => 'File size', + 'js_filemanager_count_files_overlay' => '%count% files', + 'js_link_change_value' => 'Change Link', + 'js_link_set_value' => 'Set Link', + 'callback_button_file_download_widget_success' => 'The file has been prepared. You can download it now.', + +// rc4 + + 'api_storage_file_upload_folder_error' => 'Error while saveing the file in the storage folder. A permission error could cause this problem. Make sure the storage folder is writeable.', + 'model_user_oldpassword' => '旧密码', + 'js_account_update_profile_success' => 'The profile data has been successfull updated.', + 'dashboard_lastlogin_title' => '最后登录时间', + 'layout_useronline_activity' => 'Activity', + 'layout_useronline_inactive' => 'inactive', + 'login_ssl_info' => 'Website uses encrypted secure connection.', + 'locked_info' => 'Someone already editing', + 'menu_dashboard' => '控制台', + 'js_link_not_set' => 'No Link selected', + +// 1.0.0 + + 'ngrest_button_delete' => 'Delete', + 'js_dir_manager_rm_file_confirm_title' => 'Remove file', + 'js_dir_manager_rm_folder_confirm_title' => 'Remove folder', + 'link_dir_target' => 'Link target', + 'link_dir_target_same' => 'Same window', + 'link_dir_target_blank' => 'New window', + 'view_index_redirect_file' => 'file', + 'view_index_redirect_mail' => 'e-mail address', + 'view_index_redirect_mail_help' => 'Please enter a valid e-mail address.', + 'menu_button_search' => '搜索', + 'layout_btn_user_settings' => 'Preference', + 'upload_err_message_0' => 'There is no error, the file uploaded with success.', + 'upload_err_message_1' => 'The uploaded file exceeds the upload_max_filesize directive in php.ini.', + 'upload_err_message_2' => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.', + 'upload_err_message_3' => 'The uploaded file was only partially uploaded.', + 'upload_err_message_4' => 'No file was uploaded.', + 'upload_err_message_6' => 'Missing a temporary folder.', + 'upload_err_message_7' => 'Failed to write file to disk.', + 'upload_err_message_8' => 'A PHP extension stopped the file upload.', + 'model_config_atr_name' => 'Identifier', + 'model_config_atr_name_hint' => 'Unique identifier for this variable. You can access system config with Config::get(identifier) in your application.', + 'model_config_atr_value' => 'Value', + 'model_config_atr_is_system' => 'Is system', + 'menu_system_item_config' => 'Config variables' +]; diff --git a/src/resources/angular-i18n/angular-locale_cn.js b/src/resources/angular-i18n/angular-locale_cn.js new file mode 100644 index 0000000000..2b92d5ff50 --- /dev/null +++ b/src/resources/angular-i18n/angular-locale_cn.js @@ -0,0 +1,128 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "上午", + "下午" + ], + "DAY": [ + "星期日", + "星期一", + "星期二", + "星期三", + "星期四", + "星期五", + "星期六" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "一月", + "二月", + "三月", + "四月", + "五月", + "六月", + "七月", + "八月", + "九月", + "十月", + "冬月", + "腊月" + ], + "SHORTDAY": [ + "日", + "一", + "二", + "三", + "四", + "五", + "六" + ], + "SHORTMONTH": [ + "一月", + "二月", + "三月", + "四月", + "五月", + "六月", + "七月", + "八月", + "九月", + "十月", + "冬月", + "腊月" + ], + "WEEKENDRANGE": [ + 6, + 0 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "cn", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); From 7e557509c93b08d76bbb65caf79aeecd19290687 Mon Sep 17 00:00:00 2001 From: baqianxin Date: Wed, 3 Jan 2018 16:09:57 +0800 Subject: [PATCH 5/6] add the changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 320c1aed25..d624d4b3b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. This projec ## 1.0.1 (in progress) +### Support +- Support The Chinese Language + ### Fixed [#30](https://github.com/luyadev/luya-module-admin/issues/30) Fixed non-unique input fields in account overview. From c646acdfa812621ef7d53711288415b5e1565725 Mon Sep 17 00:00:00 2001 From: baqianxin Date: Wed, 3 Jan 2018 16:31:22 +0800 Subject: [PATCH 6/6] add chinese translation --- src/messages/cn/admin.php | 68 +++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/src/messages/cn/admin.php b/src/messages/cn/admin.php index 7c2d96bdfe..55eceeb22b 100644 --- a/src/messages/cn/admin.php +++ b/src/messages/cn/admin.php @@ -108,29 +108,29 @@ 'model_loginform_email_label' => 'Email', 'model_loginform_password_label' => 'Password', - 'model_loginform_wrong_user_or_password' => 'Wrong email or password.', - 'ngrest_select_no_selection' => 'Nothing selected', - 'js_ngrest_error' => 'An error occurred while loading.', - 'js_ngrest_rm_page' => 'Do you really want to delete this entry? This can not be undone.', - 'js_ngrest_rm_confirm' => 'The record was deleted successfully.', - 'js_ngrest_rm_update' => 'The record was updated successfully.', - 'js_ngrest_rm_success' => 'The new record was inserted successfully.', - 'js_tag_exists' => 'exists already and can not be added.', - 'js_tag_success' => 'Tag information was saved.', - 'js_admin_reload' => 'The system was updated and has to be reloaded. Please save your changes in the current form. (Clicking "cancel" will display this dialog again in 30 seconds.)', + 'model_loginform_wrong_user_or_password' => '密码或用户名错误.', + 'ngrest_select_no_selection' => '没有选中项', + 'js_ngrest_error' => '加载时发生错误.', + 'js_ngrest_rm_page' => '你确认想要删除这一项吗? 此操作无法撤销.', + 'js_ngrest_rm_confirm' => '这条记录删除成功.', + 'js_ngrest_rm_update' => '这条记录更新成功.', + 'js_ngrest_rm_success' => '这条新纪录插入成功.', + 'js_tag_exists' => '已存在,不可添加.', + 'js_tag_success' => '标签信息已保存.', + 'js_admin_reload' => '系统已更新,必须重新加载. 请将您的更改保存在当前表单中. (点击“取消”将在30秒内再次显示该对话框.)', 'js_dir_till' => 'to', - 'js_dir_set_date' => 'Set current date', - 'js_dir_table_add_row' => 'Add row', - 'js_dir_table_add_column' => 'Add column', - 'js_dir_image_description' => 'Description', - 'js_dir_no_selection' => 'No entries available yet. Add new entries by clicking the + below to the left.', - 'js_dir_image_upload_ok' => 'The image was created successfully.', - 'js_dir_image_filter_error' => 'There was an error while applying the filter to the file.', - 'js_dir_upload_wait' => 'Your data is being uploaded and processed. This can take several minutes.', - 'js_dir_manager_upload_image_ok' => 'The file was uploaded successfully.', - 'js_dir_manager_rm_file_confirm' => 'Do you really want to delete this file?', - 'js_dir_manager_rm_file_ok' => 'The file was deleted successfully.', - 'js_zaa_server_proccess' => 'Please wait while the server is processing your data.', + 'js_dir_set_date' => '设置当前日期', + 'js_dir_table_add_row' => '添加行', + 'js_dir_table_add_column' => '添加列', + 'js_dir_image_description' => '描述', + 'js_dir_no_selection' => '没有可用条目. 点击左侧下方的 + 添加新条目.', + 'js_dir_image_upload_ok' => '图片上传成功.', + 'js_dir_image_filter_error' => '将过滤器应用于文件时发生错误.', + 'js_dir_upload_wait' => '您的数据正在上传和处理。这可能需要几分钟的时间.', + 'js_dir_manager_upload_image_ok'=>'文件上传成功', + 'js_dir_manager_rm_file_confirm'=>'你真的要删除这个文件吗?', + 'js_dir_manager_rm_file_ok'=>'文件已成功删除', + 'js_zaa_server_proccess'=>'请等待服务器正在处理您的数据', // added translation in 1.0.0-beta4: @@ -140,8 +140,8 @@ 'aws_gallery_empty' => 'Please select some images to the left to add them to the gallery album.', 'aws_gallery_images' => 'Album images', - 'layout_useronline_name' => 'Name', - 'layout_useronline_mail' => 'Email', + 'layout_useronline_name' => '昵称', + 'layout_useronline_mail' => '账号', 'layout_useronline_inactivesince' => 'Inactive since', // added translations in 1.0.0-beta6 @@ -259,20 +259,20 @@ 'link_dir_target_blank' => 'New window', 'view_index_redirect_file' => 'file', 'view_index_redirect_mail' => 'e-mail address', - 'view_index_redirect_mail_help' => 'Please enter a valid e-mail address.', + 'view_index_redirect_mail_help' => '请输入一个有效的邮箱地址.', 'menu_button_search' => '搜索', 'layout_btn_user_settings' => 'Preference', - 'upload_err_message_0' => 'There is no error, the file uploaded with success.', - 'upload_err_message_1' => 'The uploaded file exceeds the upload_max_filesize directive in php.ini.', - 'upload_err_message_2' => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.', - 'upload_err_message_3' => 'The uploaded file was only partially uploaded.', - 'upload_err_message_4' => 'No file was uploaded.', - 'upload_err_message_6' => 'Missing a temporary folder.', - 'upload_err_message_7' => 'Failed to write file to disk.', - 'upload_err_message_8' => 'A PHP extension stopped the file upload.', + 'upload_err_message_0'=>'没有错误,文件上传成功', + 'upload_err_message_1'=>'上传的文件超过了php.ini中的upload_max_filesize设置', + 'upload_err_message_2'=>'上传的文件超出了HTML表单中指定的MAX_FILE_SIZE设置。', + 'upload_err_message_3'=>'部分文件上传成功', + 'upload_err_message_4'=>'没有文件上传成功', + 'upload_err_message_6'=>'缺少临时文件夹', + 'upload_err_message_7'=>'无法将文件写入磁盘', + 'upload_err_message_8'=>'一个PHP扩展阻止了文件上传', 'model_config_atr_name' => 'Identifier', 'model_config_atr_name_hint' => 'Unique identifier for this variable. You can access system config with Config::get(identifier) in your application.', 'model_config_atr_value' => 'Value', 'model_config_atr_is_system' => 'Is system', - 'menu_system_item_config' => 'Config variables' + 'menu_system_item_config' => '系统变量' ];