Skip to content

Commit

Permalink
feat(Locale): language file move to _common (#1281)
Browse files Browse the repository at this point in the history
  • Loading branch information
anlyyao authored Mar 29, 2024
1 parent a1e811f commit 1c958c1
Show file tree
Hide file tree
Showing 18 changed files with 24 additions and 732 deletions.
4 changes: 2 additions & 2 deletions src/config-provider/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { InjectionKey, ComputedRef } from 'vue';
import _mergeWith from 'lodash/mergeWith';
import merge from 'lodash/merge';
import isArray from 'lodash/isArray';
import defaultConfig from '../locale/default-config';
import defaultZhLocale from '../locale/zh_CN';
import defaultConfig from '../_common/js/global-config/mobile/default-config';
import defaultZhLocale from '../_common/js/global-config/mobile/locale/zh_CN';
import { GlobalConfigProvider } from './type';

export const defaultGlobalConfig = merge(defaultConfig, defaultZhLocale);
Expand Down
35 changes: 0 additions & 35 deletions src/locale/CONTRIBUTING.md

This file was deleted.

35 changes: 0 additions & 35 deletions src/locale/CONTRIBUTING_zh-CN.md

This file was deleted.

89 changes: 0 additions & 89 deletions src/locale/ar_001.ts

This file was deleted.

3 changes: 3 additions & 0 deletions src/locale/ar_KW.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import arKW from '../_common/js/global-config/mobile/locale/ar_KW';

export default arKW;
3 changes: 0 additions & 3 deletions src/locale/default-config.ts

This file was deleted.

90 changes: 2 additions & 88 deletions src/locale/en_US.ts
Original file line number Diff line number Diff line change
@@ -1,89 +1,3 @@
// 文件有效,为国际化做准备
import 'dayjs/locale/en';
import enUs from '../_common/js/global-config/mobile/locale/en_US';

export default {
actionSheet: {
cancel: 'Cancel',
},
calendar: {
confirm: 'Confirm',
title: 'Select Date',
weekdays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
monthTitle: '{month} {year}',
months: [
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'November',
'December',
],
},
cascader: {
title: 'Title',
placeholder: 'Select options',
},
dropdownMenu: {
reset: 'Reset',
confirm: 'Confirm',
},
dateTimePicker: {
title: 'Select Date',
cancel: 'Cancel',
confirm: 'Confirm',
format: 'YYYY-MM-DD',
yearLabel: 'Year',
monthLabel: 'Month',
dateLabel: 'Date',
hourLabel: 'Hour',
minuteLabel: 'Minute',
secondLabel: 'Second',
},
picker: {
cancel: 'Cancel',
confirm: 'Confirm',
},
pullDownRefresh: {
loadingTexts: ['Pull to refresh', 'Loose to refresh', 'Refreshing ', 'Refresh completed'],
},
rate: {
valueText: '{value} score',
noValueText: 'No score',
},
tabBar: {
newsAriaLabel: 'There is new news',
moreNewsAriaLabel: 'There is a lot of news',
haveMoreNewsAriaLabel: 'There are {value}+ news',
haveNewsAriaLabel: 'There are {value} news',
},
table: {
empty: 'Empty Data',
},
list: {
loading: 'Loading...',
loadingMoreText: 'Click to load more',
pulling: 'Pull to refresh...',
loosing: 'Loose to refresh...',
success: 'Refresh successful',
},
upload: {
progress: {
uploadingText: 'Uploading...',
waitingText: 'Waiting',
failText: 'Failed',
successText: 'Success',
},
},
guide: {
next: 'Next',
skip: 'Skip',
finish: 'Finish',
back: 'Back',
},
};
export default enUs;
89 changes: 0 additions & 89 deletions src/locale/it-it.ts

This file was deleted.

3 changes: 3 additions & 0 deletions src/locale/it_IT.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import itIT from '../_common/js/global-config/mobile/locale/it_IT';

export default itIT;
Loading

0 comments on commit 1c958c1

Please sign in to comment.