diff --git a/.gitignore b/.gitignore
index eae2719..6836c5c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -149,4 +149,7 @@ dmypy.json
.pyre/
# docker
-install.lock
\ No newline at end of file
+install.lock
+
+# backup
+pagermaid*.tar.gz
diff --git a/languages/built-in/en.yml b/languages/built-in/en.yml
deleted file mode 100644
index 0a93c2d..0000000
--- a/languages/built-in/en.yml
+++ /dev/null
@@ -1,535 +0,0 @@
-# English
-# main
-web_TypeError: Oops ~ Web interface is configured to bind to an invalid address.
-web_KeyError: Oops ~ Web interface configuration is missing in the config file.
-PhoneNumberInvalidError: Oops ~ The phone number entered is invalid. Please make sure to append country code.
-module: module
-error: loading error
-start: PagerMaid-Modify have started, type -help in any chat for help message.
-# utils
-msg_ValueError: Oops ~ No messages were successfully obtained!
-isinstance: Oops ~ Length must be an integer!
-# init
-platform: Detected platform as
-platform_load: proceeding to early load process of PagerMaid.
-platform_unsupported: is not supported, please start PagerMaid on Linux or *BSD.
-error_prefix: Oops ~
-python: Please upgrade your python interpreter to at least version 3.6.
-config_error: Oops ~ Please place a valid configuration file in the working directory.
-save_id: The user ID is get successfully.
-# modules_init
-modules_init_loading_modules: Load built-in modules
-modules_init_loading_plugins: Load plugin
-# listener
-command: command
-has_reg: is already registered.
-too_long: Oops ~ The output generated was too long and could not be presented.
-run_error: Oops ~ An error occurred while executing this command.
-report_error: Oops ~ report error.
-use_method: Usage
-# account
-# username
-username_des: sets the username.
-arg_error: Invalid argument.
-username_exist: Username is taken.
-username_vaild: Invalid username.
-username_set: Username have been updated.
-username_cancel: Username has been unset.
-username_whatset: Username has been set to
-# name
-name_des: Alters the display name.
-name_vaild: Invalid first name.
-name_set: Display name is successfully altered.
-name_whatset: Changed display name to
-# pfp
-pfp_des: Set attachment of message replied to as profile picture.
-pfp_process: Setting profile picture . . .
-pfp_e_notp: Unable to parse attachment as image.
-pfp_e_size: The image dimensions are smaller than minimum requirement.
-pfp_e_img: An error occurred while the server is interpreting the command.
-# bio
-bio_des: Sets the biography to the string in the parameter.
-bio_too_lang: Provided string is too long.
-bio_set: Bio has been altered successfully.
-bio_cancel: Bio has been unset.
-bio_whatset: Bio has been set to
-# rmpfp
-rmpfp_des: Deletes defined amount of profile pictures.
-int: integer
-rmpfp_p: Removed
-rmpfp_l: profile picture(s).
-# profile
-profile_des: Shows user profile in a large message.
-profile_process: Generating user profile summary . . .
-profile_e_no: The specified user does not exist.
-profile_e_nou: The username specified does not exist.
-profile_e_nof: The UserID specified does not correspond to a user.
-profile_e_long: The UserID specified have exceeded the integer limit.
-profile_user: User
-profile_noset: Not set.
-profile_nobio: Not set.
-profile_yes: true
-profile_no: false
-profile_name: Profile
-profile_username: Username
-profile_fname: First name
-profile_lname: Last name
-profile_bio: Bio
-profile_gic: Group in common
-profile_verified: Verified
-profile_restricted: Restricted
-profile_type: Type
-# block
-block_des: Block an user.
-block_process: Processing . . .
-block_success: Success block
-block_exist: is already a blacklist.
-## unblock
-unblock_des: Unblock an user.
-unblock_process: Processing . . .
-unblock_success: Success unblock
-unblock_exist: isn't in a blacklist.
-
-# avoid
-# ghost
-ghost_des: Toggles ghosting of chat, requires redis.
-redis_dis: Redis is offline, cannot operate.
-ghost_e_mark: Unable to set flag on self.
-ghost_set_f: ChatID
-ghost_set_l: added to ghosted chats.
-ghost_cancel: removed from ghosted chats.
-ghost_e_noexist: Current chat is not ghosted.
-ghost_e_exist: Current chat is ghosted.
-# deny
-deny_des: Toggles denying of chat, requires redis.
-deny_set: added to denied chats.
-deny_cancel: removed from denied chats.
-deny_e_noexist: Current chat is not denied.
-deny_e_exist: Current chat is denied.
-# help
-help_des: Shows a list of commands or help string of a single command.
-help_list: Commands
-help_send: Issue
-help_see: to view help for a specific command.*
-help_source: 🖥 Source
-help_plugin: 🔅 Plugins
-help_module: 💠 Modules
-# qr
-# genqr
-genqr_des: Generates a QR Code sticker from a specific string.
-genqr_process: Generating QR code...
-genqr_e_encode: Invalid characters in target string.
-genqr_ok: Generated QR Code for
-# parseqr
-parseqr_des: Parse attachment of replied message as a QR Code and output results.
-parseqr_nofile: There are no attachments in the message.
-parseqr_content: Content
-parseqr_e_noqr: Target is not a QR Code.
-parseqr_log: Parsed QR Code with content
-# backup
-# backup
-backup_des: Backup data files to local and log channel, support database backup, safe and reliable.
-backup_process: Processing backup... It may take some time to complete.
-backup_success_channel: Backup complete! Zipped backup has been sent to log channel.
-backup_success: Backup complete!
-# recovery
-recovery_des: Restore data from local backup or replied backup file, and support full database recovery easily and quickly.
-recovery_file_error: Unknown backup file. It may not be the type of file backed up by PagerMaid.
-recovery_down: 'Downloading backup file to local...
-It is recommended to reduce the use of PagerMaid in the backup process.'
-recovery_process: Restoring backup... It may take some time to complete.
-recovery_file_not_found: No backup file found.
-recovery_success: Backup restored!
-# captions
-# convert
-convert_des: Reply to an attachment message and convert it to image output
-convert_process: Converting...
-convert_no_file: Something went wrong. There seems to be no attachment in the reply message.
-convert_error: Something went wrong, woooo ~ An error occurred during the conversion.
-convert_invalid: Something went wrong, woooo ~ The photo dimensions are invalid.
-# caption
-caption_des: Add two lines of captions to the reply picture. The captions will be added to the top and bottom respectively. The captions need to be separated by commas.
-caption_process: The image is being rendered...
-caption_error_grammer: Something went wrong ~ Wrong grammar.
-caption_no_file: Something went wrong, woooo~ There is no attachment in the target message
-caption_error: Something went wrong, woohoo~ An error occurred during the conversion.
-caption_success1: caption successfully
-caption_success2: Added to a picture.
-# ocr
-ocr_des: Extract text from the reply image
-ocr_psm_len_error: Oh, something went wrong...psm value is 0-13
-ocr_processing: The picture is being processed, please wait...
-ocr_no_file: Something went wrong. There is no attachment in the reply message.
-ocr_no_result: Did not identify any text.
-ocr_result_hint: The following is the extracted text
-# highlight
-highlight_des: Generate a picture with syntax highlighting.
-highlight_processing: The image is being rendered, please wait...
-highlight_no_file: Something went wrong, woooo~ The target message could not be retrieved.
-highlight_uploading: Uploading pictures...
-# handle_failure
-handle_failure_error: Something went wrong oh woo woo ~ Please report this problem.
-# clock
-# time
-time_des: Display the time in a specific area. If the parameter is empty, the configuration value will be displayed by default.
-time_parameters:
-time_time: time
-time_config: Something went wrong oh woo woo ~ Please check your config file.
-# external
-# translate
-translate_des: Translate the target message into the specified language through Google Translate. (Support reply)
-translate_parameters:
-translate_processing: The translation is being generated...
-translate_ValueError: Something went wrong ~ The target language could not be found, please correct the error in the configuration file.
-translate_ImportError: Something went wrong ~ The translators module could not be found.
-translate_hits: text translation
-translate_original_lang: source language
-translate_tg_limit_uploading_file: The output exceeds the TG limit, and it is trying to upload a file.
-translate_get: Message
-translate_from: from
-translate_to: translated to
-# tts
-tts_des: Generate voice messages based on character strings via Google Text to Speech.
-tts_processing: generating speech...
-tts_AssertionError: Something went wrong ~ Invalid parameter.
-tts_ValueError: Something went wrong ~ The target language could not be found, please correct the error in the configuration file.
-tts_RuntimeError: Something went wrong, woohoo~ An error occurred while loading the language array.
-tts_success: A text-to-speech audio message is generated
-# google
-google_des: Use Google query
-google_processing: Pulling results...
-google_connection_error: failed to connect to google server
-google_success: queried on Google search engine
-# fetchaudio
-fetchaudio_des: fetch audio files from multiple platforms.
-fetchaudio_error_grammer: Something went wrong ~ Wrong grammar.
-fetchaudio_processing: Fetching audio...
-fetchaudio_error_downloading: Something went wrong, woooo~ The original soundtrack failed to download.
-fetchaudio_success: fetched an audio from the link
-fetchaudio_link: link
-# fun
-# animate
-animate_des: Use messages to animate text.
-# teletype
-teletype_des: Make typing animation by editing the message. Will generate a lot of operation records!
-# mock
-mock_des: mock people through weird capital letters.
-# widen
-widen_des: widen each character in the string.
-widen_already: This message has been widened.
-# fox
-fox_des: Use fox to make your message look less complete
-# owo
-owo_des: Convert the message to OwO.
-# flip
-flip_des: Flip the message.
-# ship
-ship_des: Generate random friends, and also support designated targets.
-ship_processing: Generate base friends...
-ship_BaseException: Something went wrong, woooo~ An error occurred while acquiring users.
-ship_hint: Congratulations to both
-# rng
-rng_des: Generate a random string with a specific length.
-# aaa
-aaa_des: send a message containing a and A
-# asciiart
-asciiart_des: Generate ASCII text for the specified string.
-# tuxsay
-tuxsay_des: Generate an ASCII art message that looks like a penguin talking
-# coin
-coin_des: Throw a coin.
-coin_processing: Throwing a coin...
-coin_lost: I lost my coin
-# help
-# lang
-lang_des: Switch language.
-lang_change_to: The language has been switched to
-lang_reboot: Restarting.
-lang_current_lang: The current language is
-lang_all_lang: "All available languages are "
-# alias
-alias_des: Redirect original command.
-alias_list: 'The following is a list of redirect commands:'
-alias_no: You have not redirected any original commands.
-alias_success: Edit redirection command success,PagerMaid-Modify is restarting.
-alias_exist: Something went wrong, woooo~ The command that is redirected is already occupied.
-alias_no_exist: Something went wrong, woooo~ The original command is not redirected.
-# message
-# id
-id_des: Get various information about a message.
-id_hint: The following is the information of the reply message
-id_is_bot_yes: true
-id_da: dead number
-# uslog
-uslog_des: forward a message to the log.
-uslog_success: Logged.
-uslog_log_disable: Something went wrong, woooo~ Logging has been disabled.
-# log
-log_des: silently forward a message to the log.
-# re
-re_des: Reread the reply message in the current conversation. (Need to reply to a message)
-re_parameters:
-re_too_big: oh oh something went wrong... this number is too big to provoke
-re_arg_error: Oh, something went wrong...maybe the parameter contains symbols other than numbers
-re_forbidden: Oh, something went wrong...you do not have permission to forward messages from this group.
-not_reply: Something went wrong ~ You don't seem to reply to a message.
-# leave
-leave_res: Say "goodbye" and leave the session.
-leave_bye: You are a waste of my time, goodbye.
-leave_not_group: Something went wrong ohh~ The current chat does not seem to be a group chat.
-# meter2feet
-m2f_des: Convert meters to feet.
-m2f_get: will
-m2f_meter: meter
-m2f_convert_to: convert to
-m2f_feet: feet
-# feet2meter
-f2m_des: Convert feet to meters.
-# hitokoto
-hitokoto_des: A word of the day
-hitokoto_type_anime: animation
-hitokoto_type_manga: manga
-hitokoto_type_game: game
-hitokoto_type_article: Literature
-hitokoto_type_original: original
-hitokoto_type_web: from the web
-hitokoto_type_other: other
-hitokoto_type_movie: Movie
-hitokoto_type_poem: poem
-hitokoto_type_netease_music: Netease Cloud
-hitokoto_type_philosophy: philosophy
-hitokoto_type_meme: trembling
-# plugin
-# apt
-apt_des: Used to manage plugins installed to PagerMaid-Modify.
-apt_parameters: "{update|search|show|status|install|remove|enable|disable|upload|export} "
-apt_processing: Installing plugins...
-apt_no_py: Something went wrong ~ Failed to get the plug-in file from the attachment.
-apt_plugin: plugin
-apt_installed: installed
-apt_reboot: PagerMaid-Modify is restarting.
-apt_install_success: successful installation
-apt_not_found: Error, No plugin found
-apt_install_failed: installation failed
-apt_no_update: no need to update
-apt_remove_success: The plugin was successfully removed
-apt_remove: remove plugin
-apt_removed_plugins: removed plugins
-apt_not_exist: Something went wrong ~ The specified plug-in does not exist.
-apt_no_running_plugins: There are no running plugins.
-apt_no_load_falied_plugins: There are no running plugins.
-apt_no_disabled_plugins: Plugins that are not disabled
-apt_plugin_list: plug-in list
-apt_plugin_running: running
-apt_plugin_disabled: disabled
-apt_plugin_failed: failed to load
-apt_enable: enabled
-apt_disable: disabled
-apt_uploading: uploading plugin...
-apt_updated: updated
-apt_why_not_install_a_plugin: Install a plug-in in the warehouse and try again?
-apt_loading_from_online_but_nothing_need_to_update: "Reading cloud plug-in list...Done\nReading local plug-in version information...Done\n**There are no plug-ins that need to be updated. **"
-apt_loading_from_online_and_updating: "Reading cloud plug-in list...complete\nreading local plug-in version information...complete\nupdating plug-in..."
-apt_reading_list: "Reading cloud plug-in list...complete\nreading local plug-in version information...complete\n"
-apt_search_no_name: How can I search without a plug-in name?
-apt_search_not_found: No related plugins were found in the plugin repository.
-apt_search_result_hint: The following are the search results of the plugin repository
-apt_search_supporting: still in cycle
-apt_search_not_supporting: Abandoned treatment
-apt_plugin_name: plug-in name
-apt_plugin_ver: version
-apt_plugin_section: category
-apt_plugin_maintainer: Author
-apt_plugin_size: size
-apt_plugin_support: support period
-apt_plugin_des_short: description
-# prune
-# prune
-prune_des: Replying to a message with this command will delete all messages between the latest message and the message. Limit, 1000 messages based on message ID, more than 1000 messages may trigger the limit of deleting messages too quickly. (Non-group administrators only delete their own messages)
-prune_hint1: Deleted in bulk
-prune_hint2: messages.
-# selfprune
-sp_des: delete a specific number of messages sent by you in the current conversation. Limit, 1000 messages based on message ID, more than 1000 may trigger the limit of deleting messages too quickly. Non-administrators cannot delete the group message. (Reverse order) When the number is large enough, all messages can be deleted.
-sp_parameters:
-sp_hint: self-sent
-# yourprune
-yp_des: delete the current conversation you reply to a specific number of messages sent by the user. Limit, 1000 messages based on message ID, more than 1000 may trigger the limit of deleting messages too quickly. (Reverse order, need to delete message permission) When the number is large enough, all messages can be deleted.
-yp_hint: Reply to what the user sent
-# del
-del_des: Delete the message you replied to in the current conversation. (Need to reply to a message)
-del_notification: A message was deleted.
-del_BadRequestError: Something went wrong, woooo~ I don
-# send_prune_notify
-spn_deleted: deleted
-# status
-# sysinfo
-sysinfo_des: Retrieve system information through neofetch.
-sysinfo_loading: Loading system information...
-# fortune
-fortune_des: read fortune cookies information.
-fortune_not_exist: Something went wrong, woooo~ There are no fortune cookies on this system
-# fbcon
-fbcon_des: Take a screenshot of the currently bound frame buffer console.
-fbcon_processing: Taking a screenshot of the frame buffer console...
-fbcon_no_fbdump: Something went wrong ~ woof ~ fbdump is not installed on this system
-fbcon_no_ImageMagick: Something went wrong, woooo ~ ImageMagick is not installed on this system
-fbcon_no_permission: Something went wrong. The user running PagerMaid-Modify is not in the video group.
-fbcon_caption: A screenshot of the bound frame buffer.
-fbcon_error: Something went wrong ~ The file generation failed due to an unexpected error. Please make sure that the apt packages fbcat and imagemagick have been installed, and your machine has a graphics card.
-# status
-status_des: Output the running status of PagerMaid-Modify.
-status_online: online
-status_offline: offline
-status_hint: PagerMaid-Modify running status
-status_name: Host name
-status_platform: Host platform
-status_release: Kernel version
-status_python: Python version
-status_telethon: Telethon version
-status_db: Database status
-status_uptime: Uptime
-# stats
-stats_des: View conversation statistics.
-stats_loading: Loading...
-stats_hint: Conversations Status
-stats_dialogs: Total
-stats_private: PM
-stats_group: Group
-stats_supergroup: SuperGroup
-stats_channel: Channel
-stats_bot: Bot
-# speedtest
-speedtest_des: Execute the speedtest script and send the result.
-speedtest_processing: Execute test scripts...
-speedtest_ServerFailure: Unable to determine the best server.
-speedtest_ConnectFailure: Connection failure.
-# connection
-connection_des: Display the connection information between the server running PagerMaid-Modify and the Telegram server.
-connection_hint: Connection information
-connection_country: Area
-connection_dc: Data center connected to
-connection_nearest_dc: nearest data center
-# pingdc
-pingdc_des: Test your server to the delay of the telegram data servers.
-pingdc_1: DC1(Miami FL,USA)
-pingdc_2: DC2(Amsterdam,NL)
-pingdc_3: DC3(Miami FL,USA)
-pingdc_4: DC4(Amsterdam,NL)
-pingdc_5: DC5(Singapore)
-# ping
-ping_des: Estimate ping between Telegram and PagerMaid-Modify (Message and Packet)
-# topcloud
-topcloud_des: Generate a word cloud picture of resource usage.
-topcloud_processing: generating pictures...
-topcloud_caption: The running process.
-topcloud_success: A word cloud picture of resource usage is generated.
-# sticker
-# sticker
-sticker_des: Collect the replied images/stickers as stickers, and specify emoji through parameters to set a non-default emoji.
-sticker_processing: Collecting images/stickers...
-sticker_downloading: Downloading the picture...
-sticker_type_not_support: Something went wrong, woooo~ This file type is not supported.
-sticker_reply_not_sticker: Something went wrong ~ Please reply to the message with pictures/stickers.
-sticker_pack_title: private possession
-sticker_resizing: Resizing the image...
-sticker_telegram_server_error: Failed to connect to Telegram server...
-sticker_change_pack_to: switch to private collection
-sticker_last_is_full: The last sticker pack is full...
-sticker_has_been_added: This picture/sticker has been added to
-sticker_this: this
-sticker_pack: sticker pack
-sticker_another_running: Another command is adding a sticker, trying again
-sticker_no_pack_exist_creating: The sticker pack does not exist, it is being created...
-sticker_to_no: Something went wrong ~ Please specify a sticker pack.
-sticker_to_full: Something went wrong ~ This sticker pack is full.
-# upload_sticker
-us_animated_uploading: Upload animations...
-us_static_uploading: Uploading pictures...
-us_static_rounding: Rounding in progress...
-us_change_rounding_true: Automatic conversion of rounded corners for stickers has been turned on.
-us_change_rounding_false: Automatic conversion of rounded corners for stickers has been turned off.
-## merge
-merge_command_error: Command parameter error!
-merge_processing_left: Processing the 【
-merge_processing_right: 】st message.
-merge_total_processed_left: A total of 【
-merge_total_processed_right: 】 stickers were processed.
-## search
-sticker_search_des: Find a Sticker set by keyword.
-sticker_search_no: Did not find any sticker set.
-sticker_search_result: "The following are the sticker sets we found:"
-
-# system
-# sh
-sh_des: remotely execute Shell commands on Telegram.
-sh_parameters:
-sh_channel: Something went wrong ~ The current PagerMaid-Modify configuration prohibits the execution of Shell commands in the channel.
-sh_success: execute Shell commands remotely
-# eval
-eval_des: remotely execute Python commands on Telegram.
-eval_parameters:
-eval_channel: Something went wrong ~ The current PagerMaid-Modify configuration prohibits the execution of Python commands in the channel.
-eval_success: execute Python commands remotely
-eval_need_dev: '**Please note: This command can directly operate your account**
-
-This command is only for developers. If you know what you are doing, please manually configure the `dev` item in the Redis database to any value or create the `dev` file in the `data` folder.'
-# restart
-restart_des: Restart PagerMaid-Modify
-restart_processing: Try to restart PagerMaid-Modify.
-restart_complete: PagerMaid-Modify has been restarted.
-restart_log: PagerMaid-Modify restarts.
-# trace
-trace_des: Trace the redirection of the URL.
-trace_processing: Tracking redirection...
-trace_over128: Something went wrong, woooo~ More than 128 redirects, aborting!
-trace_re: redirect
-trace_http_error: Something went wrong ~ There was a problem when sending the HTTP request.
-# chat
-chat_des: Join the Pagermaid-Modify user group.
-chat_message: Hello everyone, I am a newcomer.
-chat_already_join1: You have already successfully joined
-chat_already_join2: User group.
-chat_error: Something went wrong ~ Please try to manually add @PagerMaid_Modify
-chat_join_success: You have successfully joined
-# update
-# update
-update_des: Check for updates from remote sources and install them to PagerMaid-Modify.
-update_processing: Checking the remote source for update...
-update_platform_version: system version number
-update_git_version: Git version number
-update_local_git_change: local modification
-update_hash: local modification
-update_date: submission time
-update_NoSuchPathError: The directory does not exist
-update_InvalidGitRepositoryError: This PagerMaid-Modify instance is not installed from source, please upgrade it through your local package manager.
-update_GitCommandError: Something went wrong ~ I received an error from git
-update_not_active_branch: Something went wrong, woooo~ This branch is not maintained
-update_in_branch: in the branch
-update_is_updated: is already the latest.
-update_found_update_in_branch: found the update, it exists in the branch
-update_change_log: update log
-update_log_too_big: The update log is too long and files are being attached.
-update_hint: Please use the following command to update
-update_found_pulling: An update was found and is being pulled...
-update_success: Update successfully.
-update_failed: update failed
-update_auto_upgrade_git_failed_ubuntu: It is detected that your system is Ubuntu or Debain. Try to upgrade git automatically but failed. Please upgrade manually.
-update_auto_upgrade_git_failed_cent: It is detected that your system is CentOS, try to upgrade git automatically but failed, please upgrade manually.
-update_auto_upgrade_git_hint: Your git version is too low and has tried to automatically upgrade for you. If you are reminded of this error again, please upgrade manually.
-update_master: Received a known CVE and is forcing an update to the PagerMaid-Modify instance
-update_plugins: Received a known CVE and is forcing an update to the relevant plugin
-
-# sb
-sb_des: Ban a user in the common group of administrator privileges.
-sb_des_auto: Manage the automatic banned list.
-sb_pause: Pause
-sb_no: Not ban user
-sb_per: In
-sb_in: groups banned user
-sb_pro: 'Groups:'
-sb_no_per: There is no ban user permission.
-sb_set: This group has been added to the automatic banned list.
-sb_remove: The automatic banned list has been removed this group.
-sb_exist: This group exists in the automatic banned list.
-sb_no_exist: This group does't exist in the automatic banned list.
-sb_channel: Successfully blocked this channel in this group.
diff --git a/languages/built-in/locales.yml b/languages/built-in/locales.yml
new file mode 100644
index 0000000..2cb0048
--- /dev/null
+++ b/languages/built-in/locales.yml
@@ -0,0 +1,544 @@
+# converted from http://pastebin.com/raw/ppdMS687
+ab:
+ name: Abkhaz
+ nativeName: "аҧсуа"
+aa:
+ name: Afar
+ nativeName: Afaraf
+af:
+ name: Afrikaans
+ nativeName: Afrikaans
+ak:
+ name: Akan
+ nativeName: Akan
+sq:
+ name: Albanian
+ nativeName: Shqip
+am:
+ name: Amharic
+ nativeName: "አማርኛ"
+ar:
+ name: Arabic
+ nativeName: "العربية"
+an:
+ name: Aragonese
+ nativeName: "Aragonés"
+hy:
+ name: Armenian
+ nativeName: "Հայերեն"
+as:
+ name: Assamese
+ nativeName: "অসমীয়া"
+av:
+ name: Avaric
+ nativeName: "авар мацӀ"
+ae:
+ name: Avestan
+ nativeName: avesta
+ay:
+ name: Aymara
+ nativeName: "aymar aru"
+az:
+ name: Azerbaijani
+ nativeName: "azərbaycan dili"
+bm:
+ name: Bambara
+ nativeName: bamanankan
+ba:
+ name: Bashkir
+ nativeName: "башҡорт теле"
+eu:
+ name: Basque
+ nativeName: "euskara"
+be:
+ name: Belarusian
+ nativeName: "Беларуская"
+bn:
+ name: Bengali
+ nativeName: "বাংলা"
+bh:
+ name: Bihari
+ nativeName: "भोजपुरी"
+bi:
+ name: Bislama
+ nativeName: Bislama
+bs:
+ name: Bosnian
+ nativeName: "bosanski jezik"
+br:
+ name: Breton
+ nativeName: brezhoneg
+bg:
+ name: Bulgarian
+ nativeName: "български език"
+my:
+ name: Burmese
+ nativeName: "ဗမာစာ"
+ca:
+ name: "Catalan"
+ nativeName: "Català"
+ch:
+ name: Chamorro
+ nativeName: Chamoru
+ce:
+ name: Chechen
+ nativeName: "нохчийн мотт"
+ny:
+ name: "Chichewa"
+ nativeName: "chiCheŵa"
+zh-cn:
+ name: Chinese
+ nativeName: "中文简体"
+zh-tw:
+ name: Chinese-TaiWan
+ nativeName: "中文繁体 - 台湾"
+cv:
+ name: Chuvash
+ nativeName: "чӑваш чӗлхи"
+kw:
+ name: Cornish
+ nativeName: Kernewek
+co:
+ name: Corsican
+ nativeName: "corsu"
+cr:
+ name: Cree
+ nativeName: "ᓀᐦᐃᔭᐍᐏᐣ"
+hr:
+ name: Croatian
+ nativeName: hrvatski
+cs:
+ name: Czech
+ nativeName: "česky"
+da:
+ name: Danish
+ nativeName: dansk
+dv:
+ name: "Maldivian"
+ nativeName: "ދިވެހި"
+nl:
+ name: Dutch
+ nativeName: "Nederlands"
+en:
+ name: English
+ nativeName: English
+eo:
+ name: Esperanto
+ nativeName: Esperanto
+et:
+ name: Estonian
+ nativeName: "eesti"
+ee:
+ name: Ewe
+ nativeName: "Eʋegbe"
+fo:
+ name: Faroese
+ nativeName: "føroyskt"
+fj:
+ name: Fijian
+ nativeName: "vosa Vakaviti"
+fi:
+ name: Finnish
+ nativeName: "suomi"
+fr:
+ name: French
+ nativeName: "français"
+ff:
+ name: "Fula"
+ nativeName: "Fulfulde"
+gl:
+ name: Galician
+ nativeName: Galego
+ka:
+ name: Georgian
+ nativeName: "ქართული"
+de:
+ name: German
+ nativeName: Deutsch
+el:
+ name: "Greek"
+ nativeName: "Ελληνικά"
+gn:
+ name: "Guaraní"
+ nativeName: "Avañeẽ"
+gu:
+ name: Gujarati
+ nativeName: "ગુજરાતી"
+ht:
+ name: "Haitian"
+ nativeName: "Kreyòl ayisyen"
+ha:
+ name: Hausa
+ nativeName: "Hausa, هَوُسَ"
+he:
+ name: "Hebrew"
+ nativeName: "עברית"
+hz:
+ name: Herero
+ nativeName: Otjiherero
+hi:
+ name: Hindi
+ nativeName: "हिन्दी, हिंदी"
+ho:
+ name: "Hiri Motu"
+ nativeName: "Hiri Motu"
+hu:
+ name: Hungarian
+ nativeName: Magyar
+ia:
+ name: Interlingua
+ nativeName: Interlingua
+id:
+ name: Indonesian
+ nativeName: "Bahasa Indonesia"
+ga:
+ name: Irish
+ nativeName: Gaeilge
+ig:
+ name: Igbo
+ nativeName: "Asụsụ Igbo"
+ik:
+ name: Inupiaq
+ nativeName: "Iñupiaq"
+io:
+ name: Ido
+ nativeName: Ido
+is:
+ name: Icelandic
+ nativeName: "Íslenska"
+it:
+ name: Italian
+ nativeName: Italiano
+iu:
+ name: Inuktitut
+ nativeName: "ᐃᓄᒃᑎᑐᑦ"
+ja:
+ name: Japanese
+ nativeName: "日本語"
+jv:
+ name: Javanese
+ nativeName: "basa Jawa"
+kl:
+ name: "Kalaallisut"
+ nativeName: "kalaallisut"
+kn:
+ name: Kannada
+ nativeName: "ಕನ್ನಡ"
+kr:
+ name: Kanuri
+ nativeName: Kanuri
+ks:
+ name: Kashmiri
+ nativeName: "कश्मीरी, كشميري"
+kk:
+ name: Kazakh
+ nativeName: "Қазақ тілі"
+km:
+ name: Khmer
+ nativeName: "ភាសាខ្មែរ"
+ki:
+ name: "Kikuyu"
+ nativeName: "Gĩkũyũ"
+rw:
+ name: Kinyarwanda
+ nativeName: Ikinyarwanda
+ky:
+ name: "Kirghiz"
+ nativeName: "кыргыз тили"
+kv:
+ name: Komi
+ nativeName: "коми кыв"
+kg:
+ name: Kongo
+ nativeName: KiKongo
+ko:
+ name: Korean
+ nativeName: "한국어"
+ku:
+ name: Kurdish
+ nativeName: "Kurdî, كوردی"
+kj:
+ name: "Kwanyama"
+ nativeName: Kuanyama
+la:
+ name: Latin
+ nativeName: "latine"
+lb:
+ name: "Luxembourgish"
+ nativeName: "Lëtzebuergesch"
+lg:
+ name: Luganda
+ nativeName: Luganda
+li:
+ name: "Limburgish"
+ nativeName: Limburgs
+ln:
+ name: Lingala
+ nativeName: "Lingála"
+lo:
+ name: Lao
+ nativeName: "ພາສາລາວ"
+lt:
+ name: Lithuanian
+ nativeName: "lietuvių kalba"
+lv:
+ name: Latvian
+ nativeName: "latviešu valoda"
+gv:
+ name: Manx
+ nativeName: "Gaelg"
+mk:
+ name: Macedonian
+ nativeName: "македонски јазик"
+mg:
+ name: Malagasy
+ nativeName: "Malagasy fiteny"
+ms:
+ name: Malay
+ nativeName: "bahasa Melayu, بهاس ملايو"
+ml:
+ name: Malayalam
+ nativeName: "മലയാളം"
+mt:
+ name: Maltese
+ nativeName: Malti
+mi:
+ name: "Māori"
+ nativeName: "te reo Māori"
+mr:
+ name: "Marathi"
+ nativeName: "मराठी"
+mh:
+ name: Marshallese
+ nativeName: "Kajin M̧ajeļ"
+mn:
+ name: Mongolian
+ nativeName: "монгол"
+na:
+ name: Nauru
+ nativeName: "Ekakairũ Naoero"
+nv:
+ name: "Navajo"
+ nativeName: "Diné bizaad"
+nb:
+ name: "Norwegian Bokmål"
+ nativeName: "Norsk bokmål"
+nd:
+ name: "North Ndebele"
+ nativeName: isiNdebele
+ne:
+ name: Nepali
+ nativeName: "नेपाली"
+ng:
+ name: Ndonga
+ nativeName: Owambo
+nn:
+ name: "Norwegian Nynorsk"
+ nativeName: "Norsk nynorsk"
+no:
+ name: Norwegian
+ nativeName: Norsk
+ii:
+ name: Nuosu
+ nativeName: "ꆈꌠ꒿ Nuosuhxop"
+nr:
+ name: "South Ndebele"
+ nativeName: isiNdebele
+oc:
+ name: Occitan
+ nativeName: Occitan
+oj:
+ name: "Ojibwe"
+ nativeName: "ᐊᓂᔑᓈᐯᒧᐎᓐ"
+om:
+ name: Oromo
+ nativeName: "Afaan Oromoo"
+or:
+ name: Oriya
+ nativeName: "ଓଡ଼ିଆ"
+os:
+ name: "Ossetian, Ossetic"
+ nativeName: "ирон æвзаг"
+pa:
+ name: "Panjabi, Punjabi"
+ nativeName: "ਪੰਜਾਬੀ, پنجابی"
+pi:
+ name: "Pāli"
+ nativeName: "पाऴि"
+fa:
+ name: Persian
+ nativeName: "فارسی"
+pl:
+ name: Polish
+ nativeName: polski
+ps:
+ name: "Pashto, Pushto"
+ nativeName: "پښتو"
+pt-BR:
+ name: Portuguese (Brazil)
+ nativeName: "Português"
+qu:
+ name: Quechua
+ nativeName: "Runa Simi"
+rm:
+ name: Romansh
+ nativeName: "rumantsch grischun"
+rn:
+ name: Kirundi
+ nativeName: kiRundi
+ro:
+ name: "Romanian"
+ nativeName: "română"
+ru:
+ name: Russian
+ nativeName: "русский язык"
+sa:
+ name: "Sanskrit (Saṁskṛta)"
+ nativeName: "संस्कृतम्"
+sc:
+ name: Sardinian
+ nativeName: sardu
+sd:
+ name: Sindhi
+ nativeName: "सिन्धी, سنڌي، سندھی"
+se:
+ name: "Northern Sami"
+ nativeName: "Davvisámegiella"
+sm:
+ name: Samoan
+ nativeName: "gagana faa Samoa"
+sg:
+ name: Sango
+ nativeName: "yângâ tî sängö"
+sr:
+ name: Serbian
+ nativeName: "српски језик"
+gd:
+ name: "Scottish Gaelic; Gaelic"
+ nativeName: "Gàidhlig"
+sn:
+ name: Shona
+ nativeName: chiShona
+si:
+ name: "Sinhala, Sinhalese"
+ nativeName: "සිංහල"
+sk:
+ name: Slovak
+ nativeName: "slovenčina"
+sl:
+ name: Slovene
+ nativeName: "slovenščina"
+so:
+ name: Somali
+ nativeName: "Soomaaliga, af Soomaali"
+st:
+ name: "Southern Sotho"
+ nativeName: Sesotho
+es-ES:
+ name: "Spanish"
+ nativeName: "español"
+es-MX:
+ name: "Spanish (Mexico)"
+ nativeName: "español"
+su:
+ name: Sundanese
+ nativeName: "Basa Sunda"
+sw:
+ name: Swahili
+ nativeName: Kiswahili
+ss:
+ name: Swati
+ nativeName: SiSwati
+sv:
+ name: Swedish
+ nativeName: svenska
+ta:
+ name: Tamil
+ nativeName: "தமிழ்"
+te:
+ name: Telugu
+ nativeName: "తెలుగు"
+tg:
+ name: Tajik
+ nativeName: "тоҷикӣ"
+th:
+ name: Thai
+ nativeName: "ไทย"
+ti:
+ name: Tigrinya
+ nativeName: "ትግርኛ"
+bo:
+ name: "Tibetan Standard"
+ nativeName: "བོད་ཡིག"
+tk:
+ name: Turkmen
+ nativeName: "Türkmen"
+tl:
+ name: Tagalog
+ nativeName: "Wikang Tagalog"
+tn:
+ name: Tswana
+ nativeName: Setswana
+to:
+ name: "Tonga (Tonga Islands)"
+ nativeName: "faka Tonga"
+tr:
+ name: Turkish
+ nativeName: "Türkçe"
+ts:
+ name: Tsonga
+ nativeName: Xitsonga
+tt:
+ name: Tatar
+ nativeName: "татарча"
+tw:
+ name: Twi
+ nativeName: Twi
+ty:
+ name: Tahitian
+ nativeName: "Reo Tahiti"
+ug:
+ name: "Uyghur"
+ nativeName: "Uyƣurqə, ئۇيغۇرچە"
+uk:
+ name: Ukrainian
+ nativeName: "українська"
+ur:
+ name: Urdu
+ nativeName: "اردو"
+uz:
+ name: Uzbek
+ nativeName: "zbek"
+ve:
+ name: Venda
+ nativeName: "Tshivenḓa"
+vi:
+ name: Vietnamese
+ nativeName: "Tiếng Việt"
+vo:
+ name: "Volapük"
+ nativeName: "Volapük"
+wa:
+ name: Walloon
+ nativeName: Walon
+cy:
+ name: Welsh
+ nativeName: Cymraeg
+wo:
+ name: Wolof
+ nativeName: Wollof
+fy:
+ name: "Western Frisian"
+ nativeName: Frysk
+xh:
+ name: Xhosa
+ nativeName: isiXhosa
+yi:
+ name: Yiddish
+ nativeName: "ייִדיש"
+yo:
+ name: Yoruba
+ nativeName: "Yorùbá"
+za:
+ name: "Zhuang, Chuang"
+ nativeName: "Saɯ cueŋƅ"
diff --git a/languages/built-in/zh-cn.yml b/languages/built-in/zh-cn.yml
index 756a700..50d40ba 100644
--- a/languages/built-in/zh-cn.yml
+++ b/languages/built-in/zh-cn.yml
@@ -255,7 +255,6 @@ coin_lost: 我丢了硬币
## lang
lang_des: 切换语言。
lang_change_to: 语言已切换到
-lang_reboot: 正在重新启动。
lang_current_lang: 当前语言是
lang_all_lang: 所有可用的语言有:
## alias
diff --git a/languages/built-in/zh-tw.yml b/languages/built-in/zh-tw.yml
deleted file mode 100644
index af82f88..0000000
--- a/languages/built-in/zh-tw.yml
+++ /dev/null
@@ -1,534 +0,0 @@
-# Chinese (TW)
-# main
-web_TypeError: Error!Web 介面綁定了一個無效網址。
-web_KeyError: Error!設定檔缺少Web介面配置。
-PhoneNumberInvalidError: Error!電話號碼無效,請確定添加了國家/地區代碼。
-module: 模組
-error: 載入錯誤
-start: PagerMaid-Modify 已經啟動,在任何聊天室輸入 -help 取得說明。
-# utils
-msg_ValueError: Error!沒有成功獲取訊息!
-isinstance: Error!長度必須是整數!
-# init
-platform: 將平台檢測為「
-platform_load: ,進入早期載入進度。
-platform_unsupported: 不支援的平台!請在Linux 或 BSD 系統運行!
-error_prefix: Error!
-python: 請升級Python 3到最新版。
-config_error: Error!請在應用程式目錄裡放一個有效的設定檔。
-save_id: 設定用戶標示成功。
-# modules_init
-modules_init_loading_modules: 載入內建模組
-modules_init_loading_plugins: 載入插件
-# listener
-command: 指令
-has_reg: 已被註冊
-too_long: Error!產生的輸出太長,無法顯示。
-run_error: Error!執行這個指令時發生錯誤。
-report_error: 上報錯誤Error!
-use_method: 使用方法
-# account
-# username
-username_des: 透過指令設定用戶名(不支援回覆)
-arg_error: 您貌似輸入了一個無效的參數。
-username_exist: 用戶名已經存在。
-username_vaild: 您貌似輸入了一個無效的用戶名…
-username_set: 用戶名設定成功!
-username_cancel: 用戶名已被取消。
-username_whatset: 用戶名已被設定為
-# name
-name_des: 換個名稱。(不支援回覆)
-name_vaild: 您貌似輸入了一個無效的名字。
-name_set: 顯示名稱成功更改!
-name_whatset: 顯示名稱已被更改為
-# pfp
-pfp_des: 回覆某條包含附件的訊息然後把他變成新的頭貼。
-pfp_process: 設定頭貼中...
-pfp_e_notp: 無法將此附件解析為圖片。
-pfp_e_size: 圖片太小了啦!
-pfp_e_img: 圖片損毀了啦!
-# bio
-bio_des: 設定我的介紹
-bio_too_lang: 太長!
-bio_set: 介紹設定成功!
-bio_cancel: 進度已取消。
-bio_whatset: 介紹已被設定為
-# rmpfp
-rmpfp_des: 刪除我指定數量的頭貼
-int: 數字
-rmpfp_p: 刪除了
-rmpfp_l: 張頭貼
-# profile
-profile_des: 生成一位用戶的介紹(訊息有點長)
-profile_process: 生成用戶介紹摘要中…
-profile_e_no: 指定的用戶不存在。
-profile_e_nou: 指定的用戶名不存在。
-profile_e_nof: 無法透過此UserID找到對應的用戶。
-profile_e_long: 指定的UserID已超出長度限制,錯了吧?
-profile_user: 用戶
-profile_noset: 好像沒有設定OAO
-profile_nobio: 沒有公開的介紹
-profile_yes: 是
-profile_no: 否
-profile_name: 用戶介紹
-profile_username: 用戶名
-profile_fname: 名字
-profile_lname: 姓氏
-profile_bio: 用戶介紹
-profile_gic: 共同的群組
-profile_verified: 官方認證
-profile_restricted: 受到限制
-profile_type: 類型
-# block
-block_des: 拉黑一個用戶
-block_process: 正在拉黑中 . . .
-block_success: 成功拉黑
-block_exist: 已存在黑名單中。
-# unblock
-unblock_des: 取消拉黑一個用戶
-unblock_process: 正在取消拉黑中 . . .
-unblock_success: 成功取消拉黑
-unblock_exist: 不存在黑名單中。
-
-# avoid
-# ghost
-ghost_des: 開啟對話的自動已讀,需要Redis
-redis_dis: Error!Redis離線qwq
-ghost_e_mark: 為什麼要在我的收藏裡面用?
-ghost_set_f: 已成功將
-ghost_set_l: 添加到自動已讀名單中。
-ghost_cancel: 從自動已讀名單中移除。
-ghost_e_noexist: Emm...當前聊天室不存在自動已讀名單中。
-ghost_e_exist: Emm...當前聊天室存在自動已讀名單中。
-# deny
-deny_des: 拒絕聊天功能,需要Redis
-deny_set: 已經加到自動拒絕聊天名單中。
-deny_cancel: 已經從自動拒絕聊天名單中移除。
-deny_e_noexist: Emm...當前聊天室不存在自動拒絕聊天名單中。
-deny_e_exist: Emm...當前聊天室存在自動拒絕聊天名單中。
-# help
-help_des: 顯示指令列表或者單一指令的用途。
-help_list: 指令列表
-help_send: 發送
-help_see: 以查看特定指令的幫助
-help_source: 🖥 原始碼
-help_plugin: 🔅 插件列表
-help_module: 💠 內置模塊
-# qr
-# genqr
-genqr_des: 生成 QR 扣。
-genqr_process: 正在生成QR 扣。。。
-genqr_e_encode: 解析目標訊息的字符出現錯誤。
-genqr_ok: 生成了一個QR 扣。
-# parseqr
-parseqr_des: 回覆一張QR 扣進行解析並發送QR 扣的內容。
-parseqr_nofile: 回覆的訊息裡面沒有附件。
-parseqr_content: 內容
-parseqr_e_noqr: 回覆的附件錯誤!
-parseqr_log: 已解析QR 扣的內容,如下:
-# backup
-# backup
-backup_des: 備份數據文件到本地以及日誌頻道,支援數據庫備份,安全可靠。
-backup_process: 備份中,請耐心等待備份程序完成...
-backup_success_channel: 數據文件備份完成並已打包發送到 Log 頻道!
-backup_success: 數據文件備份完成!
-# recovery
-recovery_des: 從本地備份或者所回复的備份文件中恢復數據,支持數據庫的全量恢復,方便快速。
-recovery_file_error: 未知的文件,可能並不是通過 PagerMaid 所備份的文件類型。
-recovery_down: 正在下載備份文件到本地... 備份的過程中,建議減少使用 PagerMaid
-recovery_process: 開始恢復,可能需要一定的時間。。
-recovery_file_not_found: 找不到備份文件。
-recovery_success: 備份恢復完成!
-# captions
-# convert
-convert_des: 回覆附件訊息並轉換為圖片
-convert_process: 正在轉換……
-convert_no_file: Error!回覆的消息沒有附件。
-convert_error: Error!轉換期間發生錯誤!
-convert_invalid: Error!圖片尺寸無效!
-# caption
-caption_des: 將兩行字幕添加到回覆的照片中,分別位於底部和頂部,請以逗號分割兩句。
-caption_process: 正在渲染照片…
-caption_error_grammer: Error!文法錯誤。
-caption_no_file: Error!目標訊息沒有附件
-caption_error: Error!轉換期間發生了錯誤。
-caption_success1: 成功將字幕
-caption_success2: 添加到了一張圖片。
-# ocr
-ocr_des: 從回覆的圖片中提取文字
-ocr_psm_len_error: Error!psm取值為0-13
-ocr_processing: 正在處理圖片,等下…
-ocr_no_file: Error!回覆的訊息沒有附件。
-ocr_no_result: 沒有提取到任何文字。
-ocr_result_hint: 以下是提取到的文字
-# highlight
-highlight_des: 生成有文法Highlight的圖片
-highlight_processing: 正在渲染圖片,等下…
-highlight_no_file: Error!無法檢索目標訊息。
-highlight_uploading: 正在上傳圖片…
-# handle_failure
-handle_failure_error: Error!請報告此問題。
-# clock
-# time
-time_des: 顯示特定區域的時間。
-time_parameters: <地區>
-time_time: 時間
-time_config: 出錯了嗚嗚嗚 ~ 配置文件填寫錯誤
-# external
-# translate
-translate_des: 透過Google翻譯把目標訊息翻譯成指定的語言。(支援回覆)
-translate_parameters: <文字>
-translate_processing: 正在生成翻譯…
-translate_ValueError: Error!找不到目標語言,請更正設定檔!
-translate_ImportError: Error!請先安裝 translators 模組!
-translate_hits: 文字翻譯
-translate_original_lang: 源語言
-translate_tg_limit_uploading_file: 輸出超過限制,正在嘗試上傳檔案。
-translate_get: 把一條訊息
-translate_from: 從
-translate_to: 翻譯到了
-# tts
-tts_des: 透過Google文字轉語音生成語音訊息。
-tts_processing: 生成語音中…
-tts_AssertionError: Error!無效參數。
-tts_ValueError: Error!找不到目標語言,請更正設定檔。
-tts_RuntimeError: Error!載入語言時出錯。
-tts_success: 生成了一條語音訊息。
-# google
-google_des: 使用Google查詢
-google_processing: 正在取得結果…
-google_connection_error: 連接伺服器失敗
-google_success: 在Google查詢了
-# fetchaudio
-fetchaudio_des: 從多個平台獲取音頻文件。
-fetchaudio_error_grammer: Error!錯誤的文法。
-fetchaudio_processing: 獲取音頻中…
-fetchaudio_error_downloading: Error!原聲帶下載失敗。
-fetchaudio_success: 從連結中獲取了一條音頻
-fetchaudio_link: 連結
-# fun
-# animate
-animate_des: 使用訊息製作文字動畫。
-# teletype
-teletype_des: 透過編輯訊息來製作打字動畫,大量日誌警告!
-# mock
-mock_des: 怪異的大寫。
-# widen
-widen_des: monospace all
-widen_already: 已被monospace
-# fox
-fox_des: 使用狐狸改掉您的訊息
-# owo
-owo_des: 將訊息轉換成OwO
-# flip
-flip_des: 反轉文字
-# ship
-ship_des: 產生隨機好友,也支援指定目標。
-ship_processing: 正在產生好友。。。
-ship_BaseException: Error!獲取用戶時出錯
-ship_hint: 恭喜兩位
-# rng
-rng_des: 生成特定長度的隨機文字
-# aaa
-aaa_des: 發送一條由大小寫A組成的訊息
-# asciiart
-asciiart_des: 為指定的文字產生ASCII聞言文字
-# tuxsay
-tuxsay_des: 生成企鵝說話。
-# coin
-coin_des: 擲硬幣。
-coin_processing: 正在擲硬幣…
-coin_lost: 我擲了硬幣
-# help
-# lang
-lang_des: 切換語言
-lang_change_to: 語言已切換到
-lang_reboot: 正在重新啟動。
-lang_current_lang: 目前語言是
-lang_all_lang: 所有語言有這些:
-# alias
-alias_des: 重定向原始命令。
-alias_list: 以下是重定向命令列表:
-alias_no: 您還沒有重定向任何原始命令。
-alias_success: 編輯重定向命令成功,PagerMaid-Modify 正在重新啟動。
-alias_exist: 出錯了嗚嗚嗚 ~ 重定向指向的命令已被佔用。
-alias_no_exist: 出錯了嗚嗚嗚 ~ 原始命令沒有被重定向。
-# message
-# id
-id_des: 獲取一條訊息的所有資訊。
-id_hint: 以下:
-id_is_bot_yes: 是
-id_da: 死號
-# uslog
-uslog_des: 傳傳一條訊息到日誌。
-uslog_success: 紀錄了。
-uslog_log_disable: Error!日誌紀錄被禁用。
-# log
-log_des: 安靜的傳傳一條訊息到日誌。
-# re
-re_des: 在目前聊天室復讀回覆的訊息。
-re_parameters: <次數>
-re_too_big: Error!數字過大
-re_arg_error: Error!不是數字!
-re_forbidden: Error!您没有权限!
-not_reply: Error!您沒有回覆訊息!
-# leave
-leave_res: 說再見並離開聊天室。
-leave_bye: 抱歉,暫時離開…
-leave_not_group: Error!目前聊天不是群組。
-# meter2feet
-m2f_des: 把公尺轉換成英呎。
-m2f_get: 將
-m2f_meter: 公尺
-m2f_convert_to: 轉換成了
-m2f_feet: 英呎
-# feet2meter
-f2m_des: 把英呎轉換成公尺
-# hitokoto
-hitokoto_des: 每日一言
-hitokoto_type_anime: 動畫
-hitokoto_type_manga: 漫畫
-hitokoto_type_game: 遊戲
-hitokoto_type_article: 文學
-hitokoto_type_original: 原創
-hitokoto_type_web: 網路
-hitokoto_type_other: 其他
-hitokoto_type_movie: 電影
-hitokoto_type_poem: 詩詞
-hitokoto_type_netease_music: 網易
-hitokoto_type_philosophy: 哲學
-hitokoto_type_meme: 迷因
-# plugin
-# apt
-apt_des: 用於管理插件。
-apt_parameters: "{update|search|show|status|install|remove|enable|disable|upload|export} <插件名稱/文件>"
-apt_processing: 安裝插件中…
-apt_no_py: Error!無法獲取插件文件。
-apt_plugin: 插件
-apt_installed: 已安裝
-apt_reboot: 正在重新啟動 PagerMaid-Modify。
-apt_install_success: 安裝成功
-apt_not_found: Error!沒有找到插件
-apt_install_failed: 安裝失敗
-apt_no_update: 沒必要更新
-apt_remove_success: 成功刪除插件
-apt_remove: 刪除插件
-apt_removed_plugins: 已刪除的插件
-apt_not_exist: Error!指定的插件不存在。
-apt_no_running_plugins: 沒有執行中的插件。
-apt_no_load_falied_plugins: 沒有執行中的插件。
-apt_no_disabled_plugins: 沒有關閉的插件。
-apt_plugin_list: 插件列表
-apt_plugin_running: 執行中
-apt_plugin_disabled: 已關閉
-apt_plugin_failed: 載入失敗
-apt_enable: 已啟用
-apt_disable: 已禁用
-apt_uploading: 上傳插件中…
-apt_updated: 已更新
-apt_why_not_install_a_plugin: 安裝一個倉庫裡的插件再試試?
-apt_loading_from_online_but_nothing_need_to_update: "正在獲取雲端插件列表(1/2)\n正在讀取本地插件版本訊息(2/2)\n**沒有需要更新的插件**"
-apt_loading_from_online_and_updating: "正在獲取雲端插件列表(1/3)\n正在讀取本地插件版本訊息(2/3)\n正在更新插件(3/3)"
-apt_reading_list: "正在獲取雲端插件列表(1/2)\n正在讀取本地插件版本訊息(2/2)"
-apt_search_no_name: 沒有插件名!
-apt_search_not_found: 未搜索到您指定的插件。
-apt_search_result_hint: 以下是搜索結果。
-apt_search_supporting: 仍在支援週期中。
-apt_search_not_supporting: 已不被支援。
-apt_plugin_name: 插件名
-apt_plugin_ver: 版本
-apt_plugin_section: 分類
-apt_plugin_maintainer: 作者
-apt_plugin_size: 容量
-apt_plugin_support: 支援週期
-apt_plugin_des_short: 說明
-# prune
-# prune
-prune_des: 刪除回覆的訊息後的所有消息。
-prune_hint1: 批量刪除了
-prune_hint2: 條訊息
-# selfprune
-sp_des: 刪除您發送的特定數量訊息。
-sp_parameters: <數量>
-sp_hint: 自行發送的
-# yourprune
-yp_des: 刪除您回覆用戶的特定數量訊息。
-yp_hint: 回覆用戶所發送的
-# del
-del_des: 刪除您回覆的訊息
-del_notification: 刪除了一條訊息。
-del_BadRequestError: Error!沒有權限。
-# send_prune_notify
-spn_deleted: 刪除了
-# status
-# sysinfo
-sysinfo_des: 透過neofetch檢索系統資訊。
-sysinfo_loading: 正在載入系統資訊…
-# fortune
-fortune_des: 讀取 Fortune Cookies資訊。
-fortune_not_exist: Error!系統沒有Fortune Cookies
-# fbcon
-fbcon_des: 拍攝當前綁定的幀緩衝控制台的螢幕截圖。
-fbcon_processing: 正在拍攝當前綁定的幀緩衝控制台的螢幕截圖…
-fbcon_no_fbdump: Error!此系統未安裝FBdump
-fbcon_no_ImageMagick: Error!沒有ImageMagick
-fbcon_no_permission: Error!用戶不在視頻群組中。
-fbcon_caption: 綁定的幀緩衝區的螢幕截圖。
-fbcon_error: Error!請安裝fbcat and ImageMagick
-# status
-status_des: 輸出運行狀態
-status_online: 掛在網上
-status_offline: 離線
-status_hint: 運行狀態
-status_name: 主機名
-status_platform: 主機平台
-status_release: Kernel版本
-status_python: Python版本
-status_telethon: Telethon版本
-status_db: 數據庫狀態
-status_uptime: 運行時間
-# stats
-stats_des: 查看我的對話統計信息。
-stats_loading: 加載中 . . .
-stats_hint: 對話統計
-stats_dialogs: 對話總數
-stats_private: 您擁有的私聊數為
-stats_group: 您擁有的普通群組數為
-stats_supergroup: 您擁有的超級群組數為
-stats_channel: 您擁有的頻道數為
-stats_bot: 您激活的機器人數為
-# speedtest
-speedtest_des: 執行Speedtest腳本然後發送結果
-speedtest_processing: 執行腳本
-speedtest_ServerFailure: Unable to determine the best server.
-speedtest_ConnectFailure: Connection failure.
-# connection
-connection_des: 顯示伺服器和Telegram之間的資訊。
-connection_hint: 連接資訊
-connection_country: 地區
-connection_dc: 連到的DC
-connection_nearest_dc: 最近的DC
-# pingdc
-pingdc_des: 計算伺服器Delays
-pingdc_1: DC1(美國-邁阿密)
-pingdc_2: DC2(荷蘭-阿姆斯特丹)
-pingdc_3: DC3(美國-邁阿密)
-pingdc_4: DC4(荷蘭-阿姆斯特丹)
-pingdc_5: DC5(新加坡)
-# ping
-ping_des: 計算 PagerMaid-Modify 和 Telegram 之間的信息和數據包延遲。
-# topcloud
-topcloud_des: 產生一張佔用資源的詞雲圖片。
-topcloud_processing: 正在產生…
-topcloud_caption: 正在運行的進度。
-topcloud_success: 生成了一張圖片!
-# sticker
-# sticker
-sticker_des: 收集圖片作為貼圖並指定Emoji
-sticker_processing: 正在收集…
-sticker_downloading: 正在下載…
-sticker_type_not_support: Error!不支援這個文件類型。
-sticker_reply_not_sticker: Error!回覆圖片!
-sticker_pack_title: 的自用貼圖
-sticker_resizing: 調整中…
-sticker_telegram_server_error: 連接Telegram失敗!
-sticker_change_pack_to: "切換到自用貼圖 "
-sticker_last_is_full: " 上一個貼圖包滿了…"
-sticker_has_been_added: 這個貼圖被加到了
-sticker_this: 這個
-sticker_pack: 貼圖包
-sticker_another_running: 已經開啟了一個指令,正在重試
-sticker_no_pack_exist_creating: 貼圖包不存在,正在創建…
-sticker_to_no: Error!沒有指定貼圖包
-sticker_to_full: Error!這個貼圖包已滿
-# upload_sticker
-us_animated_uploading: 上傳動圖中…
-us_static_uploading: 上傳圖片中…
-us_static_rounding: 圖片圓角處理中…
-us_change_rounding_true: 已開啟貼紙自動轉換圓角功能
-us_change_rounding_false: 已關閉貼紙自動轉換圓角功能
-## merge
-merge_command_error: 命令參數錯誤!
-merge_processing_left: 正在處理第【
-merge_processing_right: 】條消息。
-merge_total_processed_left: 共處理了【
-merge_total_processed_right: 】張貼紙。
-## search
-sticker_search_des: 通過關鍵詞查找 Sticker 包。
-sticker_search_no: 沒有找到任何 Sticker 包。
-sticker_search_result: 以下是查找到的 Sticker 包:
-
-# system
-# sh
-sh_des: 執行 Shell 指令
-sh_parameters: <指令>
-sh_channel: Error!不能在頻道執行指令。
-sh_success: 執行Shell指令
-# eval
-eval_des: 執行 Python 指令
-eval_parameters: <指令>
-eval_channel: Error!不能在頻道執行指令。
-eval_success: 執行 Python 指令
-eval_need_dev: '**請注意:此命令可以直接操作您的賬戶**
-
-此命令僅適用於開發者,如果您知道您在做什麼的話,請手動在 Redis 數據庫配置 dev 項為任意值或者在 data 文件夾下創建 dev 文件。'
-# restart
-restart_des: 重新啟動
-restart_processing: 正在嘗試重新啟動
-restart_complete: PagerMaid-Modify 重新啟動完成
-restart_log: 重新啟動 PagerMaid-Modify
-# trace
-trace_des: 跟蹤URL的重新導向。
-trace_processing: 跟蹤中…
-trace_over128: Error!重新導向超過128次!
-trace_re: 重新導向
-trace_http_error: Error!發送要求時出了問題OAO
-# chat
-chat_des: 加入用戶群。
-chat_message: 嗨大家好~
-chat_already_join1: 您早就加入過了!
-chat_already_join2: 用戶群組。
-chat_error: Error!請手動加入 @PagerMaid_Modify
-chat_join_success: 您已成功加入
-# update
-# update
-update_des: 檢查更新並安裝
-update_processing: 正在檢查源…
-update_platform_version: 系統版本號
-update_git_version: Git 版本號
-update_local_git_change: 本地修改
-update_hash: 本地修改
-update_date: 提交時間
-update_NoSuchPathError: 目錄不存在
-update_InvalidGitRepositoryError: Error!請手動升級
-update_GitCommandError: Error!Git報錯
-update_not_active_branch: Error!分支沒有維護
-update_in_branch: 在分支
-update_is_updated: 中已是最新
-update_found_update_in_branch: 找到了更新,存在於分支
-update_change_log: 更新日誌
-update_log_too_big: 更新日誌太長,正在產生文件
-update_hint: 請使用以下命令更新
-update_found_pulling: 找到更新,正在獲取
-update_success: 更新成功。
-update_failed: 更新失敗
-update_auto_upgrade_git_failed_ubuntu: 檢測到您的系統為Ubuntu/Debian,嘗試自動升級Git失敗,請手動。
-update_auto_upgrade_git_failed_cent: 檢測到您的系統為CentOS/RedHat Linux,嘗試自動升級Git失敗,請手動。
-update_auto_upgrade_git_hint: 檢測到您Git版本過低,已嘗試自動升級。若此錯誤持續發生,請手動。
-update_master: 收到已知的 CVE ,正在強制更新 PagerMaid-Modify 實例
-update_plugins: 收到已知的 CVE ,正在強制更新相關插件
-
-# sb
-sb_des: 在自己擁有管理員權限的共同群組中封禁一位用戶。
-sb_des_auto: 管理自動封禁列表。
-sb_pause: 暫停
-sb_no: 沒有在任何群封禁用戶
-sb_per: 在
-sb_in: 個群封禁了用戶
-sb_pro: 受影響的群組
-sb_no_per: 沒有封禁用戶權限。
-sb_set: 已被添加到自動封禁列表中。
-sb_remove: 已被移除自動封禁列表。
-sb_exist: 此群組存在於自動封禁列表中。
-sb_no_exist: 此群組不存在於自動封禁列表中。
-sb_channel: 成功在本群封禁此頻道。
diff --git a/languages/languages.py b/languages/languages.py
new file mode 100644
index 0000000..c3ce4f3
--- /dev/null
+++ b/languages/languages.py
@@ -0,0 +1,55 @@
+import os
+import traceback
+import yaml
+
+
+class Lang:
+ def __init__(self, locale):
+ self.locales = self.get_available_locales()
+ if locale not in self.locales:
+ locale = "zh-cn"
+ print(f"{locale} is not a valid locale , using zh-cn instead")
+ self.locale = locale
+ self.text = self.load_text()
+ self.all_locales = self.load_locales()
+ self.help_msg = {}
+ for i in self.locales:
+ self.help_msg[i] = f"`{i}` - {self.all_locales[i]['name']} ( {self.all_locales[i]['nativeName']} )"
+
+ @staticmethod
+ def get_available_locales() -> list:
+ return sorted([lang.split(".")[0] for lang in os.listdir("languages/built-in")
+ if not lang.endswith("locales.yml")])
+
+ def load_text(self) -> dict:
+ text = {}
+ for locale in self.locales:
+ with open(f"languages/built-in/{locale}.yml", "r", encoding="utf-8") as yaml_file:
+ text.update({locale: yaml.load(yaml_file, Loader=yaml.FullLoader)})
+ try:
+ with open(f"languages/custom.yml", "r", encoding="utf-8") as x:
+ lang_temp = yaml.safe_load(x)
+ for key, value in lang_temp.items():
+ text["custom"][key] = value
+ except FileNotFoundError:
+ pass
+ except Exception as e:
+ traceback.print_exc()
+ return text
+
+ @staticmethod
+ def load_locales():
+ with open(f"languages/built-in/locales.yml", "r", encoding="utf-8") as yaml_file:
+ return yaml.load(yaml_file, Loader=yaml.FullLoader)
+
+ def get(self, text):
+ try:
+ return self.text["custom"][text]
+ except KeyError:
+ try:
+ return self.text[self.locale][text]
+ except KeyError:
+ try:
+ return self.text["zh-cn"][text]
+ except KeyError:
+ return text
diff --git a/pagermaid/__init__.py b/pagermaid/__init__.py
index b776b08..72b996c 100644
--- a/pagermaid/__init__.py
+++ b/pagermaid/__init__.py
@@ -12,7 +12,7 @@ from time import time
from os import getcwd, makedirs, environ, remove
from os.path import exists
from sys import version_info, platform
-from yaml import load, FullLoader, safe_load
+from yaml import load, FullLoader
from json import load as load_json
from shutil import copyfile
from redis import StrictRedis
@@ -41,6 +41,8 @@ from urllib.error import URLError
from concurrent.futures._base import TimeoutError
from redis.exceptions import ResponseError
+from languages.languages import Lang
+
persistent_vars = {}
module_dir = __path__[0]
working_dir = getcwd()
@@ -69,26 +71,7 @@ except FileNotFoundError:
exit(1)
# i18n
-lang_dict: dict = {}
-
-try:
- with open(f"languages/built-in/{config['application_language']}.yml", "r", encoding="utf-8") as f:
- lang_dict = safe_load(f)
-except Exception as e:
- print("Reading language YAML file failed")
- print(e)
- exit(1)
-
-# Customization
-try:
- with open(f"languages/custom.yml", "r", encoding="utf-8") as f:
- lang_temp = safe_load(f)
- for key, value in lang_temp.items():
- lang_dict[key] = value
-except FileNotFoundError:
- pass
-except Exception as e:
- logs.fatal("Reading custom YAML file failed")
+language = Lang(config["application_language"])
# alias
alias_dict: dict = {}
@@ -105,8 +88,7 @@ if exists("data/alias.json"):
def lang(text: str) -> str:
""" i18n """
- result = lang_dict.get(text, text)
- return result
+ return language.get(text)
analytics = None
diff --git a/pagermaid/modules/help.py b/pagermaid/modules/help.py
index 9d6f68f..4021524 100644
--- a/pagermaid/modules/help.py
+++ b/pagermaid/modules/help.py
@@ -2,7 +2,7 @@
from os import listdir
from json import dump as json_dump
-from pagermaid import help_messages, alias_dict, redis_status, redis
+from pagermaid import help_messages, alias_dict, redis_status, redis, language
from pagermaid.utils import lang, alias_command
from pagermaid.listener import listener, config
@@ -72,24 +72,24 @@ async def help_raw_command(context):
description=lang('lang_des'))
async def lang_change(context):
to_lang = context.arguments
- from_lang = config["application_language"]
- dir, ldir = listdir('languages/built-in'), []
- for i in dir:
- if not i.find('yml') == -1:
- ldir.append(i[:-4])
+ from_lang = language.locale
+
with open('config.yml') as f:
file = f.read()
- if to_lang in ldir:
+ if to_lang in language.locales:
file = file.replace(f'application_language: "{from_lang}"', f'application_language: "{to_lang}"')
with open('config.yml', 'w') as f:
f.write(file)
- result = await context.edit(f"{lang('lang_change_to')} {to_lang}, {lang('lang_reboot')}")
- if redis_status():
- redis.set("restart_edit", f"{result.id}|{result.chat_id}")
- await context.client.disconnect()
+ await context.edit(f"{lang('lang_change_to')} {to_lang}")
+ language.locale = to_lang
else:
+ msg = ""
+ for i in language.help_msg:
+ msg += f"\n{language.help_msg[i]}"
await context.edit(
- f'{lang("lang_current_lang")} {config["application_language"]}\n\n{lang("lang_all_lang")}{",".join(ldir)}')
+ f'{lang("lang_current_lang")} {language.help_msg[from_lang]}\n\n'
+ f'{lang("lang_all_lang")}\n'
+ f'{msg}')
@listener(is_plugin=False, outgoing=True, command="alias",
diff --git a/pagermaid/utils.py b/pagermaid/utils.py
index be04c1e..f78d81e 100644
--- a/pagermaid/utils.py
+++ b/pagermaid/utils.py
@@ -19,14 +19,14 @@ from asyncio.subprocess import PIPE
from telethon.errors import UserNotParticipantError
from telethon.tl.types import Channel, ChannelParticipantAdmin, ChannelParticipantCreator
from youtube_dl import YoutubeDL
-from pagermaid import module_dir, bot, lang_dict, alias_dict, user_bot, config, proxy_addr, proxy_port, http_addr, \
+from pagermaid import module_dir, bot, alias_dict, user_bot, config, proxy_addr, proxy_port, http_addr, \
http_port
+from pagermaid import language
def lang(text: str) -> str:
""" i18n """
- result = lang_dict.get(text, text)
- return result
+ return language.get(text)
def alias_command(command: str) -> str: