搜索
开启左侧

[复制链接]
admin 发表于 2025-3-22 17:57:34 | 显示全部楼层 |阅读模式
Locales["en"] = {
    ["show_active_character"] = "Show Active Character",
    ["active_character"] = "Active Character: %s",
    ["error_active_character"] = "There was an error obtaining your data.",
    ["delete_character"] = "Delete Your Current Character.",
    ["deleted_character"] = "Character Deleted",
    ["error_delete_character"] = "There was a problem deleting your character.",
    ["thank_you_for_registering"] = "Registration Successful. Enjoy!",
    ["debug_xPlayer_get_first_name"] = "Returns Your First Name",
    ["debug_xPlayer_get_last_name"] = "Returns Your Last Name",
    ["debug_xPlayer_get_full_name"] = "Returns Your Full Name",
    ["debug_xPlayer_get_sex"] = "Returns Your Sex",
    ["debug_xPlayer_get_dob"] = "Returns Your DOB",
    ["debug_xPlayer_get_height"] = "Returns Your Height",
    ["error_debug_xPlayer_get_first_name"] = "There was an issue while obtaining your first name.",
    ["error_debug_xPlayer_get_last_name"] = "There was an issue while obtaining your last name.",
    ["error_debug_xPlayer_get_full_name"] = "There was an issue while obtaining your full name.",
    ["error_debug_xPlayer_get_sex"] = "There was an issue while obtaining your sex.",
    ["error_debug_xPlayer_get_dob"] = "There was an issue while obtaining your date of birth.",
    ["error_debug_xPlayer_get_height"] = "There was an issue while obtaining your height.",
    ["return_debug_xPlayer_get_first_name"] = "First Name: %s",
    ["return_debug_xPlayer_get_last_name"] = "Last Name: %s",
    ["return_debug_xPlayer_get_full_name"] = "Name: %s",
    ["return_debug_xPlayer_get_sex"] = "Sex: %s",
    ["return_debug_xPlayer_get_dob"] = "DOB: %s",
    ["return_debug_xPlayer_get_height"] = "Height: %s Inches",
    ["data_incorrect"] = "Invalid Data, Please try again.",
    ["invalid_format"] = "Invalid Data Format, Please try again.",
    ["no_identifier"] = "[ESX Identity]\nThere was an issue while loading your character!\nError Code: identifier-missing\n\nThis is caused by your identifier being missing. Please come back later or report this problem to the Server Owner.",
    ["missing_identity"] = "[ESX Identity]\nThere was an issue loading your character!\nError Code: identity-missing\n\nIt seems like your identity is missing, try connecting again.",
    ["deleted_identity"] = "Character deleted. Please rejoin to create a new character.",
    ["already_registered"] = "You have already registered.",
    ["invalid_firstname_format"] = "Invalid Format (First Name): Please try again.",
    ["invalid_lastname_format"] = "Invalid Format (Last Name): Please try again.",
    ["invalid_dob_format"] = "Invalid Format (DOB): Please try again.",
    ["invalid_sex_format"] = "Invalid Format (Sex): Please try again.",
    ["invalid_height_format"] = "Invalid Format (Height): Please try again.",
}


回复 论坛版权

使用道具 举报

ChatGPT 发表于 2025-3-22 17:57:46 | 显示全部楼层
在你提供的代码片段中,`Locales`是一个用于存储多种语言文本字符串的表。每个键应该对应一个特定的字符串值,通常用于游戏中的提示信息或用户界面文本。

我会为你的代码添加注释,并将它翻译成简体中文。以下是更新后的代码:
Locales = {
    -- 显示活跃角色
    ["show_active_character"] = "显示活跃角色",
    -- 活跃角色:%s
    ["active_character"] = "活跃角色: %s",
    -- 获取数据时发生错误。
    ["error_obtaining_data"] = "获取数据时发生错误。",
    -- 删除当前角色。
    ["delete_current_character"] = "删除您当前的角色。",
    -- 角色已删除
    ["character_deleted"] = "角色已删除",
    -- 删除角色时出现问题。
    ["error_deleting_character"] = "删除角色时出现问题。",
    -- 注册成功。祝您玩得愉快!
    ["registration_successful"] = "注册成功。祝您玩得愉快!",
    -- 返回您的名字
    ["return_first_name"] = "返回您的名字",
    -- 返回您的姓氏
    ["return_last_name"] = "返回您的姓氏",
    -- 返回您的全名
    ["return_full_name"] = "返回您的全名",
    -- 返回您的性别
    ["return_sex"] = "返回您的性别",
    -- 返回您的出生日期
    ["return_dob"] = "返回您的出生日期",
    -- 返回您的身高
    ["return_height"] = "返回您的身高",
    -- 获取名字时出现问题。
    ["error_getting_first_name"] = "获取名字时出现问题。",
    -- 获取姓氏时出现问题。
    ["error_getting_last_name"] = "获取姓氏时出现问题。",
    -- 获取全名时出现问题。
    ["error_getting_full_name"] = "获取全名时出现问题。",
    -- 获取性别时出现问题。
    ["error_getting_sex"] = "获取性别时出现问题。",
    -- 获取出生日期时出现问题。
    ["error_getting_dob"] = "获取出生日期时出现问题。",
    -- 获取身高时出现问题。
    ["error_getting_height"] = "获取身高时出现问题。",
    -- 名字:%s
    ["first_name"] = "名字: %s",
    -- 姓氏:%s
    ["last_name"] = "姓氏: %s",
    -- 姓名:%s
    ["name"] = "姓名: %s",
    -- 性别:%s
    ["sex"] = "性别: %s",
    -- 出生日期:%s
    ["dob"] = "出生日期: %s",
    -- 身高:%s 英寸
    ["height"] = "身高: %s 英寸",
    -- 无效数据,请重试。
    ["invalid_data"] = "无效数据,请重试。",
    -- 数据格式无效,请重试。
    ["invalid_data_format"] = "数据格式无效,请重试。",
    -- 加载角色时出现问题!
    ["loading_character_issue_missing_identifier"] = "\n加载角色时出现问题!\n错误代码:identifier-missing\n\n这是由于您的标识符缺失造成的。请稍后再来或向服务器管理员报告此问题。",
    -- 加载角色时出现问题!
    ["loading_character_issue_missing_identity"] = "\n加载角色时出现问题!\n错误代码:identity-missing\n\n似乎您的身份缺失,请尝试重新连接。",
    -- 角色已删除。请重新加入以创建新角色。
    ["character_deleted_rejoin"] = "角色已删除。请重新加入以创建新角色。",
    -- 您已经注册过了。
    ["already_registered"] = "您已经注册过了。",
    -- 无效格式(名字):请重试。
    ["invalid_format_first_name"] = "无效格式(名字):请重试。",
    -- 无效格式(姓氏):请重试。
    ["invalid_format_last_name"] = "无效格式(姓氏):请重试。",
    -- 无效格式(出生日期):请重试。
    ["invalid_format_dob"] = "无效格式(出生日期):请重试。",
    -- 无效格式(性别):请重试。
    ["invalid_format_sex"] = "无效格式(性别):请重试。",
    -- 无效格式(身高):请重试。
    ["invalid_format_height"] = "无效格式(身高):请重试。",
}

这个表针对不同情况提供了国际化支持,方便在客户端或服务器端调用。通常,这样的表会被放在Client.lua中,因为它主要用于处理用户界面和显示消息。如果需要将其放到Server.lua中,则是为了在服务器端处理更复杂的逻辑。
回复

使用道具 举报

 楼主| admin 发表于 2025-3-22 17:58:30 | 显示全部楼层
别加注释了 太乱
回复

使用道具 举报

ChatGPT 发表于 2025-3-22 17:58:40 | 显示全部楼层
admin 发表于 2025-03-22 17:58
别加注释了 太乱


好的,以下是去掉注释后的简体中文翻译版本:
Locales = {
    ["show_active_character"] = "显示活跃角色",
    ["active_character"] = "活跃角色: %s",
    ["error_obtaining_data"] = "获取数据时发生错误。",
    ["delete_current_character"] = "删除您当前的角色。",
    ["character_deleted"] = "角色已删除",
    ["error_deleting_character"] = "删除角色时出现问题。",
    ["registration_successful"] = "注册成功。祝您玩得愉快!",
    ["return_first_name"] = "返回您的名字",
    ["return_last_name"] = "返回您的姓氏",
    ["return_full_name"] = "返回您的全名",
    ["return_sex"] = "返回您的性别",
    ["return_dob"] = "返回您的出生日期",
    ["return_height"] = "返回您的身高",
    ["error_first_name"] = "获取名字时出现问题。",
    ["error_last_name"] = "获取姓氏时出现问题。",
    ["error_full_name"] = "获取全名时出现问题。",
    ["error_sex"] = "获取性别时出现问题。",
    ["error_dob"] = "获取出生日期时出现问题。",
    ["error_height"] = "获取身高时出现问题。",
    ["first_name"] = "名字: %s",
    ["last_name"] = "姓氏: %s",
    ["name"] = "姓名: %s",
    ["sex"] = "性别: %s",
    ["dob"] = "出生日期: %s",
    ["height"] = "身高: %s 英寸",
    ["invalid_data"] = "无效数据,请重试。",
    ["invalid_data_format"] = "数据格式无效,请重试。",
    ["issue_loading_character_identifier"] = "\n加载角色时出现问题!\n错误代码:identifier-missing\n\n这是由于您的标识符缺失造成的。请稍后再来或向服务器管理员报告此问题。",
    ["issue_loading_character_identity"] = "\n加载角色时出现问题!\n错误代码:identity-missing\n\n似乎您的身份缺失,请尝试重新连接。",
    ["character_deleted_rejoin"] = "角色已删除。请重新加入以创建新角色。",
    ["already_registered"] = "您已经注册过了。",
    ["invalid_format_first_name"] = "无效格式(名字):请重试。",
    ["invalid_format_last_name"] = "无效格式(姓氏):请重试。",
    ["invalid_format_dob"] = "无效格式(出生日期):请重试。",
    ["invalid_format_sex"] = "无效格式(性别):请重试。",
    ["invalid_format_height"] = "无效格式(身高):请重试。",
}

这样就不会有注释干扰了。如果你有其他需求,欢迎随时告诉我!
回复

使用道具 举报

文明发言,和谐互动
文明发言,和谐互动
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|FiveM技术教程分享 ( 冀ICP备2021005225号-1 ) |网站地图

GMT+8, 2025-5-11 05:24 , Processed in 0.077105 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2013 ELITE论坛【技术无价-分享快乐】

快速回复 返回顶部 返回列表