Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add vietnamese language #214

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/fork/lang/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ import FRFork from './fr/fork'
import PTFork from './pt/fork'
import ZHFork from './zh/fork'
import AZfork from './az/fork'
import VIFork from './vi/fork'
import ENAppLog from './en/appLog'
import FRAppLog from './fr/appLog'
import PTAppLog from './pt/appLog'
import ZHAppLog from './zh/appLog'
import AZAppLog from './az/appLog'
import VIAppLog from './vi/appLog'
import { createI18n } from 'vue-i18n'
import type { I18n } from 'vue-i18n'

Expand All @@ -31,6 +33,10 @@ const lang = {
az: {
fork: AZfork,
appLog: AZAppLog
},
vi: {
fork: VIFork,
appLog: VIAppLog
}
}

Expand Down
46 changes: 46 additions & 0 deletions src/fork/lang/vi/appLog.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
export default {
startInstall: 'Bắt đầu cài đặt {service}',
startDown: `Bắt đầu tải xuống {service}, Liên kết tải xuống: {url}`,
downSuccess: 'Tải xuống hoàn tất, cài đặt {service}',
downFail: 'Tải xuống thất bại, cài đặt {service} không thành công',
installSuccess: 'Cài đặt {service} thành công, vị trí cài đặt: {appDir}',
installFail: 'Cài đặt {service} không thành công, lý do: {error}',
installFromZip: 'Gói cài đặt đã tồn tại, cài đặt {service}',
installFromZipFail: 'Cài đặt thất bại, tải xuống lại gói cài đặt để cài đặt',

startServiceBegin: 'Bắt đầu dịch vụ {service}...',
serviceUseBundle: 'Đã sử dụng phiên bản tích hợp, Bắt đầu giải nén và cài đặt {service}',
bundleUnzipSuccess: 'Giải nén cài đặt hoàn tất, vị trí cài đặt: {appDir}',
bundleUnzipFail: 'Giải nén cài đặt không thành công, lý do: {error}',
confInit: 'Tệp cấu hình không tồn tại, tạo tệp cấu hình',
confInitSuccess: 'Tạo tệp cấu hình thành công, đường dẫn tệp: {file}',
confInitFail: 'Tạo tệp cấu hình không thành công, lý do: {error}',
apachePortHandleBegin: 'Bắt đầu lấy tất cả các cổng nghe Apache từ trang web',
apachePortHandleEnd: 'Hoàn tất lấy cổng nghe Apache, ghi tệp cấu hình thành công',
execStartCommand: 'Bắt đầu thực thi lệnh khởi động',
execStartCommandSuccess: 'Thực thi lệnh khởi động thành công, bắt đầu kiểm tra xem khởi động có thành công không',
execStartCommandFail: 'Thực thi lệnh khởi động không thành công, lý do: {error}, dịch vụ {service} không khởi động được',
startServiceSuccess: 'Dịch vụ {service} khởi động thành công, pid: {pid}',
startServiceFail: 'Dịch vụ {service} không khởi động được, lý do: {error}',

stopServiceBegin: 'Bắt đầu dừng dịch vụ {service}',
stopServiceEnd: 'Dịch vụ {service} đã dừng thành công',

initDBPass: 'Bắt đầu khởi tạo mật khẩu cơ sở dữ liệu',
initDBPassSuccess: 'Khởi tạo mật khẩu cơ sở dữ liệu thành công, mật khẩu tài khoản: {user} {pass}',
initDBPassFail: 'Không thể khởi tạo mật khẩu cơ sở dữ liệu, lý do: {error}',
initDBDataDir: 'Không tìm thấy thư mục dữ liệu, bắt đầu khởi tạo thư mục dữ liệu',
initDBDataDirSuccess: 'Khởi tạo thư mục dữ liệu thành công, đường dẫn thư mục dữ liệu: {dir}',
initDBDataDirFail: 'Khởi tạo thư mục dữ liệu không thành công, lý do: {error}',

initPlugin: 'Bắt đầu khởi tạo plugin và thực thi lệnh: {command}',
initPluginSuccess: 'Khởi tạo plugin thành công',
initPluginFail: 'Khởi tạo plugin không thành công, lý do: {error}',

erlangEnvInit: 'Thử khởi tạo môi trường thời gian chạy Erlang',
erlangEnvInitEnd: 'Hoàn tất khởi tạo môi trường thời gian chạy Erlang',

newProjectBegin: 'Bắt đầu một dự án mới và thực thi lệnh: {command}',
newProjectSuccess: 'Dự án mới đã được tạo thành công, đường dẫn dự án: {dir}',
newProjectFail: 'Không thể tạo dự án mới'
}
28 changes: 28 additions & 0 deletions src/fork/lang/vi/fork.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export default {
binNoFound: 'Tệp khởi động không tồn tại, thao tác thất bại.',
confNoFound: 'Tệp cấu hình không tồn tại, máy chủ không khởi động được',
apacheLogPathErr: 'Đường dẫn nhật ký của tệp cấu hình bị sai, chuyển đổi thất bại',
switchFail: 'Chuyển đổi thất bại',
needPassWord: 'Sudo cần mật khẩu máy tính, vui lòng nhập',
versionError: 'Phiên bản sai, vui lòng chọn lại',
needSelectVersion: 'Vui lòng chọn một phiên bản trước',
serviceNoRun: 'Dịch vụ không chạy',
brewNoFound: 'Không tìm thấy Brew',
getVersionNumFail: 'Không lấy được số phiên bản',
hostsFileNoFound: 'Không tìm thấy tệp hosts',
hostsWriteFail: 'Không thể ghi vào tệp /private/etc/hosts',
hostsReadFail: 'Không thể đọc tệp /private/etc/hosts',
startFail: 'Không thể khởi động, vui lòng kiểm tra tệp nhật ký',
command: 'Lệnh',
nvmDirNoFound: 'Không tìm thấy NVM_DIR',
phpiniNoFound: 'Không tìm thấy tệp php.ini',
ExtensionInstallFail: 'Cài đặt tiện ích mở rộng thất bại',
phpStopFail: 'PHP{version} không dừng được, vui lòng thử dừng thủ công',
ExtensionInstallFailTips: 'Cài đặt tiện ích mở rộng và thực thi lệnh:\n{command}\nNếu cài đặt không thành công, bạn có thể thử sao chép lệnh và tự cài đặt\n',
versionNoFound: 'Không lấy được phiên bản phần mềm, thao tác thất bại.',
postgresqlInit: 'Dịch vụ đã khởi động thành công\nThư mục dữ liệu là {dir}\nNgười dùng ban đầu là root, Mật khẩu là root',
toolFileNotExist: 'Tệp không tồn tại',
downFileFail: 'Tải tệp xuống thất bại!',
licenseTips: 'Nếu không có giấy phép, chỉ có thể tạo tối đa ba trang web',
trialEnd: 'Bản dùng thử đã hết hạn. Để tiếp tục sử dụng tính năng này, vui lòng mua giấy phép'
}
6 changes: 6 additions & 0 deletions src/main/lang/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import MenuPT from './pt/menu'
import MenuZH from './zh/menu'
import MenuAZ from './az/menu'
import MenuAR from './ar/menu'
import MenuVI from './vi/menu'
import UpdateEN from './en/update'
import UpdateFR from './fr/update'
import UpdatePT from './pt/update'
import UpdateZH from './zh/update'
import UpdateAZ from './az/update'
import UpdateAR from './ar/update'
import UpdateVI from './vi/update'

import { createI18n } from 'vue-i18n'
import type { I18n } from 'vue-i18n'
Expand Down Expand Up @@ -38,6 +40,10 @@ export const lang = {
ar: {
menu: MenuAR,
update: UpdateAR
},
vi: {
menu: MenuVI,
update: UpdateVI
}
}

Expand Down
23 changes: 23 additions & 0 deletions src/main/lang/vi/menu.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export default {
about: 'Giới thiệu',
app: 'FlyEnv',
checkForUpdates: 'Kiểm tra cập nhật...',
hide: 'Ẩn FlyEnv',
hideOthers: 'Ẩn ứng dụng khác',
unhide: 'Hiển thị tất cả',
quit: 'Thoát FlyEnv',
edit: 'Chỉnh sửa',
cut: 'Cắt',
copy: 'Sao chép',
paste: 'Dán',
selectAll: 'Chọn tất cả',
window: 'Cửa sổ',
close: 'Đóng',
minimize: 'Thu nhỏ',
zoom: 'Thu phóng',
fullscreen: 'Chế độ toàn màn hình',
front: 'Đưa FlyEnv lên trước',
dev: 'Mở cửa sổ gỡ lỗi',
needInstallHelper: 'FlyEnv cần cài đặt một chương trình hỗ trợ',
waitHelper: 'Chương trình hỗ trợ đang khởi động, vui lòng đợi'
}
11 changes: 11 additions & 0 deletions src/main/lang/vi/update.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default {
checkForUpdates: 'Kiểm tra cập nhật',
'update-available-message': 'Đã có phiên bản FlyEnv mới hơn, cập nhật ngay?',
'update-not-available-message': 'Bạn đang sử dụng phiên bản mới nhất!',
'update-downloaded-message': 'Sẵn sàng cài đặt...',
'update-error-message': 'Lỗi cập nhật',
yes: 'Có',
no: 'Không',
needUpdateTitleTips: 'Cảnh báo',
needUpdateContentTips: 'Phát hiện thấy tên ứng dụng hiện tại không phải là FlyEnv. Bạn có thể đang sử dụng PhpWebStudy (không còn được hỗ trợ) hoặc đã thay đổi tên ứng dụng theo cách thủ công. Vui lòng tải xuống và cài đặt lại FlyEnv hoặc khôi phục tên ứng dụng thành FlyEnv'
}
12 changes: 10 additions & 2 deletions src/render/components/AI/Chat/tool.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import { ChatLineRound } from '@element-plus/icons-vue'
import { AIStore } from '@/components/AI/store'
import { CreateSiteTest } from '@/components/AI/Task/CreateSiteTest'
import { AIKeys, AIKeysEN } from '@/components/AI/key'
import { AIKeys, AIKeysEN, AIKeysVI } from '@/components/AI/key'
import { CreateSite } from '@/components/AI/Task/CreateSite'
import { SiteAccessIssues } from '@/components/AI/Task/SiteAccessIssues'
import { NginxStartFail } from '@/components/AI/Task/NginxStartFail'
Expand Down Expand Up @@ -57,7 +57,15 @@

const querySearch = (queryString: string, cb: any) => {
console.log('querySearch: ', queryString)
const ALLKeys = appStore.config.setup.lang === 'zh' ? AIKeys : AIKeysEN
let ALLKeys = AIKeysEN;
switch (appStore.config.setup.lang) {
case 'zh':
ALLKeys = AIKeys;
break;
case 'vi':
ALLKeys = AIKeysVI;
break;
}
const find = ALLKeys.find((a) => a.txt === queryString.trim())
if (find) {
cb([
Expand Down
116 changes: 116 additions & 0 deletions src/render/components/AI/key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,119 @@ export const AIKeysEN: Array<AIKeyItem> = [
task: 'MysqlPassword'
}
]
export const AIKeysVI: Array<AIKeyItem> = [
{
tips: [
['kết thúc', 'dừng', 'chấm dứt', 'thoát'],
['tác vụ', 'nhiệm vụ']
],
txt: 'Hủy tác vụ',
task: 'StopTask'
},
{
tips: [
['macports', 'port', 'macport', 'phiên bản'],
['không thể', 'làm sao', 'không có', 'không'],
['sử dụng', 'cài đặt', 'thêm']
],
txt: 'Cài đặt MacPorts',
task: 'MacportInstall'
},
{
tips: [
['homebrew', 'brew', 'phiên bản'],
['không thể', 'làm sao', 'không có', 'không'],
['sử dụng', 'cài đặt', 'thêm']
],
txt: 'Cài đặt Homebrew',
task: 'HomebrewInstall'
},
{
tips: [
['mới', 'tạo', 'thêm', 'sinh'],
['ngẫu nhiên', 'thử nghiệm'],
['trang web', 'trang']
],
txt: 'Tạo trang web ngẫu nhiên',
task: 'CreateSiteTest'
},
{
tips: [
['mới', 'tạo', 'thêm', 'sinh'],
['trang web', 'trang']
],
txt: 'Tạo trang web',
task: 'CreateSite'
},
{
tips: [
['trang web', 'trang'],
['truy cập', 'duyệt', 'không thể', 'không mở được'],
['bất thường', 'báo lỗi', 'mở']
],
txt: 'Lỗi truy cập trang web',
task: 'SiteAccessIssues'
},
{
tips: [['nginx'], ['khởi động', 'dịch vụ', 'mở', 'bật'], ['bất thường', 'báo lỗi', 'thất bại']],
txt: 'Nginx khởi động thất bại',
task: 'StartNginx'
},
{
tips: [['apache'], ['khởi động', 'dịch vụ', 'mở', 'bật'], ['bất thường', 'báo lỗi', 'thất bại']],
txt: 'Apache khởi động thất bại',
task: 'StartApache'
},
{
tips: [['mysql'], ['khởi động', 'dịch vụ', 'mở', 'bật'], ['bất thường', 'báo lỗi', 'thất bại']],
txt: 'Mysql khởi động thất bại',
task: 'StartMysql'
},
{
tips: [['mariadb'], ['khởi động', 'dịch vụ', 'mở', 'bật'], ['bất thường', 'báo lỗi', 'thất bại']],
txt: 'Mariadb khởi động thất bại',
task: 'StartMariaDB'
},
{
tips: [['memcached'], ['khởi động', 'dịch vụ', 'mở', 'bật'], ['bất thường', 'báo lỗi', 'thất bại']],
txt: 'Memcached khởi động thất bại',
task: 'StartMemcached'
},
{
tips: [
['homebrew', 'brew'],
['php7', 'php5', 'thấp'],
['không', 'không có', 'thiếu'],
['khả dụng', 'tìm thấy', 'hiển thị']
],
txt: 'Homebrew không có PHP phiên bản thấp',
task: 'HomebrewPhp7Issues'
},
{
tips: [
['phiên bản', 'kho lưu trữ', 'quản lý', 'phiên bản hóa'],
['không', 'không hiển thị', 'trống', 'luôn', 'luôn tải', 'không có nội dung', 'không có dữ liệu'],
['hiển thị', 'tải', 'nội dung', 'dữ liệu']
],
txt: 'Quản lý phiên bản Homebrew không có dữ liệu',
task: 'VersionManagerEmpty'
},
{
tips: [
['phiên bản', 'phần mềm', 'dịch vụ'],
['cài đặt', 'thêm', 'không thể', 'cài'],
['chậm', 'treo', 'cài đặt', 'xong']
],
txt: 'Cài đặt phiên bản rất chậm',
task: 'VersionInstallSlow'
},
{
tips: [
['mysql', 'maraidb'],
['cơ sở dữ liệu', 'mật khẩu', 'quản lý', 'ban đầu'],
['mật khẩu', 'công cụ', 'phần mềm']
],
txt: 'Mật khẩu ban đầu của Mysql&MariaDB',
task: 'MysqlPassword'
}
]
33 changes: 33 additions & 0 deletions src/render/components/About/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,39 @@
</el-col>
</el-row>
</template>
<template v-else-if="lang === 'vi'">
<el-row style="padding: 0 20px; margin-top: 30px">
<el-col>
Cảm ơn vì đã sử dụng FlyEnv. Nếu bạn có bất kỳ câu hỏi hoặc đề xuất nào, bạn có thể tham gia
Cộng đồng để thảo luận. Bạn cũng có thể gửi các vấn đề của GitHub
</el-col>
<el-col style="margin-top: 12px">
Nếu FlyEnv hữu ích cho bạn, xin vui lòng đóng vai chính và nhà tài trợ cho dự án. Cảm ơn
</el-col>
<el-col style="margin-top: 12px">
GitHub:
<a
target="_blank"
href="javascript:"
rel="noopener noreferrer"
@click="openUrl($event, 'https://github.com/xpf0000/FlyEnv')"
>
https://github.com/xpf0000/FlyEnv
</a>
</el-col>
<el-col style="margin-top: 12px">
Sponsor:
<a
target="_blank"
href="javascript:"
rel="noopener noreferrer"
@click="openUrl($event, 'https://www.macphpstudy.com/sponsor.html')"
>
https://www.macphpstudy.com/sponsor.html
</a>
</el-col>
</el-row>
</template>
<template v-else>
<el-row style="padding: 0 20px; margin-top: 30px">
<el-col>
Expand Down
Loading