forked from jd-opensource/nutui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: build internationalization config
- Loading branch information
1 parent
56d1bf9
commit f50f8fb
Showing
14 changed files
with
246 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,82 @@ | ||
export interface BaseLang { | ||
save: string; | ||
confirm: string; | ||
cancel: string; | ||
done: string; | ||
noData: string; | ||
placeholder: string; | ||
select: string; | ||
video: { | ||
export abstract class BaseLang { | ||
abstract save: string; | ||
abstract confirm: string; | ||
abstract cancel: string; | ||
abstract done: string; | ||
abstract noData: string; | ||
abstract placeholder: string; | ||
abstract select: string; | ||
abstract video: { | ||
errorTip: string; | ||
clickRetry: string; | ||
}; | ||
fixednav: { | ||
abstract fixednav: { | ||
activeText: string; | ||
unActiveText: string; | ||
}; | ||
pagination: { | ||
abstract pagination: { | ||
prev: string; | ||
next: string; | ||
}; | ||
calendaritem: { | ||
abstract calendaritem: { | ||
weekdays: Array<string>; | ||
end: string; | ||
start: string; | ||
title: string; | ||
monthTitle: Function; | ||
today: string; | ||
}; | ||
shortpassword: { | ||
abstract shortpassword: { | ||
title: string; | ||
desc: string; | ||
tips: string; | ||
}; | ||
uploader: { | ||
abstract uploader: { | ||
ready: string; | ||
readyUpload: string; | ||
waitingUpload: string; | ||
uploading: string; | ||
success: string; | ||
error: string; | ||
}; | ||
countdown: { | ||
abstract countdown: { | ||
day: string; | ||
hour: string; | ||
minute: string; | ||
second: string; | ||
}; | ||
address: { | ||
abstract address: { | ||
selectRegion: string; | ||
deliveryTo: string; | ||
chooseAnotherAddress: string; | ||
}; | ||
signature: { | ||
abstract signature: { | ||
reSign: string; | ||
unSupportTpl: string; | ||
}; | ||
ecard: { | ||
abstract ecard: { | ||
chooseText: string; | ||
otherValueText: string; | ||
placeholder: string; | ||
}; | ||
timeselect: { | ||
abstract timeselect: { | ||
pickupTime: string; | ||
}; | ||
sku: { | ||
abstract sku: { | ||
buyNow: string; | ||
buyNumber: string; | ||
addToCard: string; | ||
}; | ||
skuheader: { | ||
abstract skuheader: { | ||
skuId: string; | ||
}; | ||
addresslist: { | ||
abstract addresslist: { | ||
addAddress: string; | ||
}; | ||
comment: { | ||
abstract comment: { | ||
complaintsText: string; | ||
additionalReview: Function; | ||
additionalImages: Function; | ||
}; | ||
} | ||
export default BaseLang; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,83 @@ | ||
import { BaseLang } from './baseLang'; | ||
const lang: BaseLang = { | ||
save: 'Save', | ||
confirm: 'Confirm', | ||
cancel: 'Cancel', | ||
done: 'Done', | ||
noData: 'No Data', | ||
placeholder: 'Placeholder', | ||
select: 'Select', | ||
video: { | ||
class Lang extends BaseLang { | ||
save = 'Save'; | ||
confirm = 'Confirm'; | ||
cancel = 'Cancel'; | ||
done = 'Done'; | ||
noData = 'No Data'; | ||
placeholder = 'Placeholder'; | ||
select = 'Select'; | ||
video = { | ||
errorTip: 'Error Tip', | ||
clickRetry: 'Click Retry' | ||
}, | ||
fixednav: { | ||
}; | ||
fixednav = { | ||
activeText: 'Close Nav', | ||
unActiveText: 'Open Nav' | ||
}, | ||
pagination: { | ||
}; | ||
pagination = { | ||
prev: 'Previous', | ||
next: 'Next' | ||
}, | ||
calendaritem: { | ||
}; | ||
calendaritem = { | ||
weekdays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], | ||
end: 'End', | ||
start: 'Start', | ||
title: 'Calendar', | ||
monthTitle: (year: number, month: number) => `${year}/${month}`, | ||
today: 'Today' | ||
}, | ||
shortpassword: { | ||
}; | ||
shortpassword = { | ||
title: 'Please input a password', | ||
desc: 'Verify', | ||
tips: 'Forget password' | ||
}, | ||
uploader: { | ||
}; | ||
uploader = { | ||
ready: 'Ready', | ||
readyUpload: 'Ready to upload', | ||
waitingUpload: 'Waiting for upload', | ||
uploading: 'Uploading', | ||
success: 'Upload successful', | ||
error: 'Upload failed' | ||
}, | ||
countdown: { | ||
}; | ||
countdown = { | ||
day: ' Day ', | ||
hour: ' Hour ', | ||
minute: ' Minute ', | ||
second: ' Second ' | ||
}, | ||
address: { | ||
}; | ||
address = { | ||
selectRegion: 'Select Region', | ||
deliveryTo: 'Delivery To', | ||
chooseAnotherAddress: 'Choose Another Address' | ||
}, | ||
signature: { | ||
}; | ||
signature = { | ||
reSign: 'Re Sign', | ||
unSupportTpl: `Sorry, the current browser doesn't support canvas, so we can't use this control!` | ||
}, | ||
ecard: { | ||
}; | ||
ecard = { | ||
chooseText: 'Select', | ||
otherValueText: 'Other Value', | ||
placeholder: 'Placeholder' | ||
}, | ||
timeselect: { | ||
}; | ||
timeselect = { | ||
pickupTime: 'Pickup Time' | ||
}, | ||
sku: { | ||
}; | ||
sku = { | ||
buyNow: 'Buy Now', | ||
buyNumber: 'Buy Number', | ||
addToCard: 'Add to Card' | ||
}, | ||
skuheader: { | ||
}; | ||
skuheader = { | ||
skuId: 'Sku Number' | ||
}, | ||
addresslist: { | ||
}; | ||
addresslist = { | ||
addAddress: 'Add New Address' | ||
}, | ||
comment: { | ||
}; | ||
comment = { | ||
complaintsText: 'I have a complaint', | ||
additionalReview: (day: number) => `Review after ${day} days of purchase`, | ||
additionalImages: (length: number) => `There are ${length} follow-up comments` | ||
} | ||
}; | ||
export default lang; | ||
}; | ||
} | ||
export default Lang; |
Oops, something went wrong.