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
Change Province Name To MultiLang Object #98
base: develop
Are you sure you want to change the base?
Change Province Name To MultiLang Object #98
Conversation
May you write a few samples of what did you do? and Do you know what is the side-effects of this function in production for users who already have used this function? |
@ali-master Actually it will be a really big change for users that use ProvinceName in their project, but I think it's better than prev format because in this change we can have multiple names for a single ProvinceCode but in the current version we have to have a single name for each ProvinceCode i change this: // Current plateInfo
{
"type": "Car",
"template": "PLATE_TEMPLATE",
"province": "مرکزی",
"category": "شخصی",
"details": {
"firstTwoDigits": "12",
"nextThreeDigits": "145",
"provinceCode": "47",
"plateCharacter": "ب"
}
} to: // New plateInfo
{
"type": "Car",
"template": "PLATE_TEMPLATE",
"province": {
"fa": "مرکزی",
"en": "Markazi",
},
"category": "شخصی",
"details": {
"firstTwoDigits": "12",
"nextThreeDigits": "145",
"provinceCode": "47",
"plateCharacter": "ب"
}
}
// New Format for More Than One Province
{
"type": "Car",
"template": "PLATE_TEMPLATE",
"province": {
"fa": ["تهران", "البرز"],
"en": ["Tehran", "Alborz"],
},
"category": "شخصی",
"details": {
"firstTwoDigits": "12",
"nextThreeDigits": "145",
"provinceCode": "21",
"plateCharacter": "ب"
}
} if we want to remove the side-effects we have to keep |
it would be better if we prevent changing the current API and add new properties as well as you want. |
According To the Previous Talk, I think it's better if we had an object instead of a single string to show the province name in numberPlate