Skip to content

Commit

Permalink
🌐 Improve localization #127
Browse files Browse the repository at this point in the history
  • Loading branch information
doroudi committed Jan 1, 2025
1 parent 7bc725c commit 37009df
Show file tree
Hide file tree
Showing 13 changed files with 103 additions and 50 deletions.
12 changes: 12 additions & 0 deletions locales/ar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ar: Arabic
de: German
ch: Chinese
home: الرئيسية
currencySign: درهم
common:
notFound: غير موجود
404Error: خطأ 404
Expand All @@ -17,6 +18,9 @@ common:
search: بحث
new: جدید
actions: الإجراءات
date: تاریخ
price: سعر
status: حالة
menu:
dashboard: لوحة التحكم
productManagement: إدارة المنتجات
Expand All @@ -43,6 +47,11 @@ menu:
pages: الصفحات
login: تسجيل الدخول
notFound: '404'
authentication: المصادقة
other: آخر
createProduct: إنشاء المنتج
register: تسجيل الدخول
forgetPassword: نسيت كلمة المرور
userMenu:
language: اللغة
theme: المظهر
Expand Down Expand Up @@ -166,3 +175,6 @@ notifications:
Github:
button: GitHub
tooltip: ادعم هذا المشروع من خلال إعطاء نجمة ⭐️ على GitHub

notify:
welcome: مرحبًا بك في لوحة تحكم يامي! لوحة إدارة مجانية تعتمد على Naive UI وVue 3، يرجى دعم هذا المشروع من خلال إعطاء نجمة ⭐️ على GitHub
14 changes: 12 additions & 2 deletions locales/ch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ ar: Arabic
de: German
ch: Chinese
home: 首页
English: 英语
Persian: 波斯语
currencySign: ¥
common:
notFound: 未找到
404Error: 404错误
Expand All @@ -19,6 +18,9 @@ common:
search: 搜索
new:
actions: 操作
date: 日期
price: 价格
status: 状态
menu:
dashboard: 仪表板
productManagement: 产品管理
Expand All @@ -45,6 +47,11 @@ menu:
pages: 页面
login: 登录
notFound: '404'
authentication: 验证
other: 其他
createProduct: 创建产品
register: 注册
forgetPassword: 忘记密码
userMenu:
language: 语言
theme: 主题
Expand Down Expand Up @@ -168,3 +175,6 @@ notifications:
Github:
button: Github
tooltip: 请在Github上给这个项目一个⭐️支持

notify:
welcome: 欢迎使用 Yummy Admin!基于 Naive UI 和 Vue 3 的免费管理面板,请在 GitHub 上点赞⭐️来支持此项目
12 changes: 12 additions & 0 deletions locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ar: Arabic
de: German
ch: Chinese
home: Startseite
currencySign:
common:
notFound: Nicht gefunden
404Error: 404 Fehler
Expand All @@ -17,6 +18,9 @@ common:
search: Suche
new: Neu
actions: Aktionen
date: Datum
price: Price
status: Status
menu:
dashboard: Dashboard
productManagement: Produktverwaltung
Expand All @@ -43,6 +47,11 @@ menu:
pages: Seiten
login: Anmelden
notFound: '404'
authentication: Authentifizierung
other: Andere
createProduct: Produkt erstellen
register: Registrieren
forgetPassword: Passwort vergessen
userMenu:
language: Sprache
theme: Design
Expand Down Expand Up @@ -164,3 +173,6 @@ notifications:
Github:
button: Github
tooltip: Unterstützen Sie dieses Projekt, indem Sie ihm einen Stern ⭐️ auf Github geben

notify:
welcome: Willkommen bei Yummy Admin! Kostenloses Admin-Panel basierend auf Naive UI und Vue 3. Bitte unterstützen Sie dieses Projekt, indem Sie auf GitHub einen Stern ⭐️ vergeben.
7 changes: 4 additions & 3 deletions locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ tr: Turkish
ar: Arabic
de: German
ch: Chinese
English: English
Persian: Persian
home: Home
currencySign: $
common:
Expand All @@ -22,6 +20,9 @@ common:
new: New
actions: Actions
name: Name
date: Date
price: Price
status: Status
menu:
dashboard: Dashboard
productManagement: Products Management
Expand Down Expand Up @@ -185,4 +186,4 @@ Github:
tooltip: Support this project by giving a star ⭐️ on GitHub

notify:
welcome: Welcome to YummyAdmin! Free Admin Panel based on NaiveUI and Vue3, please Support this project by giving a star ⭐️ on GitHub
welcome: Welcome to Yummy Admin! Free Admin Panel based on NaiveUI and Vue3, please Support this project by giving a star ⭐️ on GitHub
11 changes: 11 additions & 0 deletions locales/fa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ common:
search: جستجو
new: جدید
actions: عملیات
date: تاریخ
price: قیمت
status: وضعیت
brands:
create:
brandName: نام برند
Expand Down Expand Up @@ -121,6 +124,11 @@ menu:
pages: صفحات
login: ورود
notFound: '404'
authentication: احراز هویت
other: سایر
createProduct: ایجاد محصول
register: ثبت نام
forgetPassword: فراموشی رمز
products:
create:
barcode: بارکد
Expand Down Expand Up @@ -171,3 +179,6 @@ customize:
Github:
button: گیت هاب
tooltip: این پروژه را با دادن یک ستاره ⭐️ در گیت هاب پشتیبانی کنید

notify:
welcome: به پنل ادمین یامی خوش آمدید، لطفا این پروژه را با دادن یک ستاره ⭐️ در گیت هاب پشتیبانی کنید
46 changes: 28 additions & 18 deletions locales/tr.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
title: Yummy Admin
description: Ücretsiz Vue 3 Gösterge Paneli
direction: ltr
ar: Arabic
tr: Turkish
de: German
en: English
fa: Persian

title: Yummy Admin
description: Ücretsiz Vue 3 Gösterge Paneli
direction: ltr

currencySign:
home: Ana Sayfa
common:
403Error: Erişim izniniz yok
404Error: 404 Hatası
404Message: >-
Üzgünüz, aradığınız sayfa mevcut değil, kaldırılmış, adı değiştirilmiş veya
geçici olarak kullanılamıyor
actions: Eylemler
goHome: Ana Sayfaya Dön
new: Yeni
notFound: Bulunamadı
search: Ara
date: Tarih
price: Fiyat
status: Durum
brands:
create:
brandName: İsim
Expand Down Expand Up @@ -50,18 +64,6 @@ colors:
validations:
colorRequired: Renk seçilmedi
nameRequired: İsim gerekli
common:
403Error: Erişim izniniz yok
404Error: 404 Hatası
404Message: >-
Üzgünüz, aradığınız sayfa mevcut değil, kaldırılmış, adı değiştirilmiş veya
geçici olarak kullanılamıyor
actions: Eylemler
goHome: Ana Sayfaya Dön
new: Yeni
notFound: Bulunamadı
search: Ara

dashboard:
activeOrders: Aktif Siparişler
products: Ürünler
Expand All @@ -79,7 +81,7 @@ forgot:
register: Hesap Oluştur!
title: Şifremi Unuttum
username: Kullanıcı Adı
home: Ana Sayfa

login:
createAccount: Hesap Oluştur!
failedMessage: Giriş Başarısız
Expand Down Expand Up @@ -123,6 +125,11 @@ menu:
support: Destek
users: Kullanıcılar
websiteSettings: Website Ayarları
authentication: kimlik doğrulama
other: Diğer
createProduct: Ürün Oluştur
register: Kayıt Ol
forgetPassword: Şifremi Unuttum
not-found: Bulunamadı
notifications:
empty: Hiçbir bildirim yok
Expand Down Expand Up @@ -170,3 +177,6 @@ customize:
Github:
button: GitHub
tooltip: Bu projeye ⭐️ Github'da destek verin

notify:
welcome: Yummy Admin'e hoş geldiniz! Naive UI ve Vue 3 tabanlı Ücretsiz Admin Paneli, lütfen GitHub'da bir yıldız ⭐️ vererek bu projeyi destekleyin
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const rtlStyles = [
]
const customTheme = ref({ ...themeOverrides })
const { makeDarker, makeLighter } = useColors()
const { makeLighter } = useColors()
watch(() => layout.activeLanguage, () => {
const body = document.querySelector('body') as HTMLElement
Expand Down
2 changes: 1 addition & 1 deletion src/components/Customers/CustomerManagement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const columns: DataTableColumns<RowData> = [
title: t('common.actions'),
key: 'actions',
width: 110,
render(row) {
render() {
return [
h(
NButton,
Expand Down
4 changes: 2 additions & 2 deletions src/components/Dahboard/RecentOrders.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ const columns: DataTableColumns<RowData> = [
key: 'customer',
},
{
title: 'Price',
title: t('common.price'),
key: 'price',
render: row => renderPrice(row.totalPrice, t('currencySign')),
},
{
title: 'Status',
title: t('common.status'),
key: 'status',
fixed: 'right',
width: 80,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dahboard/TrendingProducts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const columns: DataTableColumns<RowData> = [
render: row => renderRate(row.rate),
},
{
title: 'Price',
title: t('common.price'),
key: 'price',
render: row => renderPrice(row.price, t('currencySign')),
},
Expand Down
6 changes: 3 additions & 3 deletions src/components/Orders/OrderManagement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const columns: DataTableColumns<RowData> = [
fixed: 'left',
},
{
title: 'Date',
title: t('common.date'),
key: 'createdDate',
render: row => h(NText, {}, { default: () => proxy.$filters.friendlyTime(row.createdDate) }),
},
Expand All @@ -30,12 +30,12 @@ const columns: DataTableColumns<RowData> = [
key: 'itemsCount',
},
{
title: 'Price',
title: t('common.price'),
key: 'category',
render: row => renderPrice(row.totalPrice, t('currencySign')),
},
{
title: 'Status',
title: t('common.status'),
key: 'status',
render: row => renderTag(row.status, getStatusColor(row.status), OrderStatus),
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/Products/ProductsManagement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ const columns: DataTableColumns<RowData> = [
render: row => renderRate(row.rate),
},
{
title: 'Price',
title: t('common.price'),
key: 'price',
render: row => renderPrice(row.price, t('currencySign')),
},
{
title: 'Status',
title: t('common.status'),
key: 'status',
render: row => renderTag(row.status, getStatusColor(row.status), ProductStatus),
},
Expand Down
31 changes: 14 additions & 17 deletions src/components/Review/ReviewManagement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ import type { RowData } from 'naive-ui/es/data-table/src/interface'
import {
Delete24Regular as DeleteIcon,
} from '@vicons/fluent'
import { useDialog, useMessage } from 'naive-ui'
const { t } = useI18n()
const store = useReviewStore()
const dialog = useDialog()
const message = useMessage()
onMounted(getItems)
const columns: DataTableColumns<RowData> = [
Expand Down Expand Up @@ -54,7 +51,7 @@ const columns: DataTableColumns<RowData> = [
},
},
{
title: 'DATE',
title: t('common.date'),
key: 'date',
render(row) {
return h(NText,
Expand All @@ -67,7 +64,7 @@ const columns: DataTableColumns<RowData> = [
title: t('common.actions'),
key: 'actions',
width: 110,
render(row) {
render() {
return [
h(
NButton,
Expand All @@ -89,18 +86,18 @@ function renderIcon(icon: any) {
return () => h(NIcon, null, { default: () => h(icon) })
}
function handleDeleteItem() {
dialog.error({
title: 'Confirm',
content: 'Are you sure?',
positiveText: 'Yes, Delete',
negativeText: 'Cancel',
onPositiveClick: () => {
/// store.deleteProduct(row.id)
message.success('Product was deleted!')
},
})
}
// function handleDeleteItem() {
// dialog.error({
// title: 'Confirm',
// content: 'Are you sure?',
// positiveText: 'Yes, Delete',
// negativeText: 'Cancel',
// onPositiveClick: () => {
// /// store.deleteProduct(row.id)
// message.success('Product was deleted!')
// },
// })
// }
function rowKey(row: RowData) {
return row.id
Expand Down

0 comments on commit 37009df

Please sign in to comment.