Skip to content

Commit aaa8ada

Browse files
authored
Merge pull request #1194 from ShangYi7/main
Added zh-tw language and modified the file name
2 parents fdd380e + e772426 commit aaa8ada

File tree

3 files changed

+137
-4
lines changed

3 files changed

+137
-4
lines changed

locale/cn.lua renamed to locale/zh-cn.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ local Translations = {
120120
},
121121
}
122122

123-
if GetConvar('qb_locale', 'en') == 'cn' then
123+
if GetConvar('qb_locale', 'en') == 'zh-cn' then
124124
Lang = Locale:new({
125125
phrases = Translations,
126126
warnOnMissing = true,
127127
fallbackLang = Lang,
128128
})
129-
end
129+
end

locale/zh-tw.lua

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
local Translations = {
2+
error = {
3+
not_online = '玩家不在線上',
4+
wrong_format = '格式不正確',
5+
missing_args = '尚未輸入所有參數 (x, y, z)',
6+
missing_args2 = '必須填寫所有參數!',
7+
no_access = '無法使用此指令',
8+
company_too_poor = '您的雇主已破產',
9+
item_not_exist = '物品不存在',
10+
too_heavy = '背包已滿',
11+
location_not_exist = '位置不存在',
12+
duplicate_license = '[QBCORE] - 發現重複的 Rockstar 授權',
13+
no_valid_license = '[QBCORE] - 找不到有效的 Rockstar 授權',
14+
not_whitelisted = '[QBCORE] - 您不在此伺服器的白名單中',
15+
server_already_open = '伺服器已經開啟',
16+
server_already_closed = '伺服器已經關閉',
17+
no_permission = '您沒有此權限..',
18+
no_waypoint = '尚未設置導航點',
19+
tp_error = '傳送時發生錯誤',
20+
ban_table_not_found = '[QBCORE] - 無法在資料庫中找到封禁清單。請確認您已正確匯入 SQL 檔案。',
21+
connecting_database_error = '[QBCORE] - 連接資料庫時發生錯誤。請確保 SQL 伺服器正在運行,且 server.cfg 檔案中的設定正確。',
22+
connecting_database_timeout = '[QBCORE] - 資料庫連接超時。請確保 SQL 伺服器正在運行,且 server.cfg 檔案中的設定正確。',
23+
},
24+
success = {
25+
server_opened = '伺服器已經開啟',
26+
server_closed = '伺服器已經關閉',
27+
teleported_waypoint = '傳送至導航點。',
28+
},
29+
info = {
30+
received_paycheck = '您收到了 $%{value} 的薪水',
31+
job_info = '工作: %{value} | 等級: %{value2} | 上班狀態: %{value3}',
32+
gang_info = '幫派: %{value} | 等級: %{value2}',
33+
on_duty = '您現在已經上班了!',
34+
off_duty = '您現在已經下班了!',
35+
checking_ban = '你好 %s,我們正在檢查您是否被封禁',
36+
join_server = '歡迎 %s 加入 {Server Name}',
37+
checking_whitelisted = '你好 %s,我們正在檢查您的白名單權限',
38+
exploit_banned = '您因作弊行為而被封禁。請查看我們的 Discord 以獲取更多資訊: %{discord}',
39+
exploit_dropped = '您因使用外掛程式而被踢出伺服器',
40+
},
41+
command = {
42+
tp = {
43+
help = '傳送至玩家或座標 (僅限管理員)',
44+
params = {
45+
x = { name = 'id/x', help = '玩家 ID 或 X 座標' },
46+
y = { name = 'y', help = 'Y 座標' },
47+
z = { name = 'z', help = 'Z 座標' },
48+
},
49+
},
50+
tpm = { help = '傳送至標記點 (僅限管理員)' },
51+
togglepvp = { help = '切換伺服器 PVP 狀態 (僅限管理員)' },
52+
addpermission = {
53+
help = '給予玩家權限 (僅限最高權限)',
54+
params = {
55+
id = { name = 'id', help = '玩家 ID' },
56+
permission = { name = 'permission', help = '權限等級' },
57+
},
58+
},
59+
removepermission = {
60+
help = '移除玩家權限 (僅限最高權限)',
61+
params = {
62+
id = { name = 'id', help = '玩家 ID' },
63+
permission = { name = 'permission', help = '權限等級' },
64+
},
65+
},
66+
openserver = { help = '開放伺服器給所有人 (僅限管理員)' },
67+
closeserver = {
68+
help = '關閉伺服器給無權限者 (僅限管理員)',
69+
params = {
70+
reason = { name = 'reason', help = '關閉原因 (選填)' },
71+
},
72+
},
73+
car = {
74+
help = '生成載具 (僅限管理員)',
75+
params = {
76+
model = { name = 'model', help = '載具型號名稱' },
77+
},
78+
},
79+
dv = { help = '刪除載具 (僅限管理員)' },
80+
dvall = { help = '刪除所有載具 (僅限管理員)' },
81+
dvp = { help = '刪除所有 NPC (僅限管理員)' },
82+
dvo = { help = '刪除所有物件 (僅限管理員)' },
83+
givemoney = {
84+
help = '給予玩家金錢 (僅限管理員)',
85+
params = {
86+
id = { name = 'id', help = '玩家 ID' },
87+
moneytype = { name = 'moneytype', help = '金錢類型 (現金, 銀行, 加密貨幣)' },
88+
amount = { name = 'amount', help = '金額' },
89+
},
90+
},
91+
setmoney = {
92+
help = '設定玩家金錢數量 (僅限管理員)',
93+
params = {
94+
id = { name = 'id', help = '玩家 ID' },
95+
moneytype = { name = 'moneytype', help = '金錢類型 (現金, 銀行, 加密貨幣)' },
96+
amount = { name = 'amount', help = '金額' },
97+
},
98+
},
99+
job = { help = '查看你的工作' },
100+
setjob = {
101+
help = '設定玩家工作 (僅限管理員)',
102+
params = {
103+
id = { name = 'id', help = '玩家 ID' },
104+
job = { name = 'job', help = '工作名稱' },
105+
grade = { name = 'grade', help = '工作等級' },
106+
},
107+
},
108+
gang = { help = '查看你所在的幫派' },
109+
setgang = {
110+
help = '設定玩家幫派 (僅限管理員)',
111+
params = {
112+
id = { name = 'id', help = '玩家 ID' },
113+
gang = { name = 'gang', help = '幫派名稱' },
114+
grade = { name = 'grade', help = '幫派等級' },
115+
},
116+
},
117+
ooc = { help = 'OOC 聊天訊息' },
118+
me = {
119+
help = '顯示本地訊息',
120+
params = {
121+
message = { name = 'message', help = '要發送的訊息' }
122+
},
123+
},
124+
},
125+
}
126+
127+
if GetConvar('qb_locale', 'en') == 'zh-tw' then
128+
Lang = Locale:new({
129+
phrases = Translations,
130+
warnOnMissing = true,
131+
fallbackLang = Lang,
132+
})
133+
end

server/functions.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,9 @@ function QBCore.Functions.CreateVehicle(source, model, vehtype, coords, warp)
395395
end
396396

397397
function PaycheckInterval()
398-
if not next(QBCore.Players) then
398+
if not next(QBCore.Players) then
399399
SetTimeout(QBCore.Config.Money.PayCheckTimeOut * (60 * 1000), PaycheckInterval) -- Prevent paychecks from stopping forever once 0 players
400-
return
400+
return
401401
end
402402
for _, Player in pairs(QBCore.Players) do
403403
if not Player then return end

0 commit comments

Comments
 (0)