| @@ -4,7 +4,7 @@ import enMessages from '../translations/en.json'; | |||||
| import cnMessages from '../translations/zh-CN.json'; | import cnMessages from '../translations/zh-CN.json'; | ||||
| import hkMessages from '../translations/zh-HK.json'; | import hkMessages from '../translations/zh-HK.json'; | ||||
| import { POST_TERMS_N_CONDITIONS } from "utils/ApiPathConst"; | |||||
| import { GET_COMBO, POST_TERMS_N_CONDITIONS } from "utils/ApiPathConst"; | |||||
| import * as HttpUtils from "utils/HttpUtils"; | import * as HttpUtils from "utils/HttpUtils"; | ||||
| const LocaleContext = createContext(); | const LocaleContext = createContext(); | ||||
| @@ -30,6 +30,19 @@ export const I18nProvider = ({ children }) => { | |||||
| hkMessages["termsAndCon"]= responseData.zh; | hkMessages["termsAndCon"]= responseData.zh; | ||||
| } | } | ||||
| }); | }); | ||||
| HttpUtils.get({ | |||||
| url: GET_COMBO, | |||||
| onSuccess: (responseData) => { | |||||
| for(let i =0; i<responseData.length; i++){ | |||||
| let item = responseData[i]; | |||||
| enMessages[item.key]= item.en; | |||||
| cnMessages[item.key]= item.cn; | |||||
| hkMessages[item.key]= item.zh; | |||||
| } | |||||
| } | |||||
| }); | |||||
| } | } | ||||
| useEffect(() => { | useEffect(() => { | ||||
| @@ -283,27 +283,6 @@ | |||||
| "pwGood": "Good", | "pwGood": "Good", | ||||
| "pwStrong": "Strong", | "pwStrong": "Strong", | ||||
| "islandCombo": "Island District", | |||||
| "kwaiTsingCombo": "Kwai Tsing District", | |||||
| "northCombo": "North District", | |||||
| "saiKungCombo": "Sai Kung District", | |||||
| "shaTinCombo": "Sha Tin District", | |||||
| "taiPoCombo": "Tai Po District", | |||||
| "tsuenWanCombo": "Tsuen Wan District", | |||||
| "tuenMunCombo": "Tuen Mun District", | |||||
| "yuenLongCombo": "Yuen Long District", | |||||
| "kowloonCityCombo": "Kowloon City District", | |||||
| "kwunTongCombo": "Kwun Tong District", | |||||
| "shamShuiPoCombo": "Sham Shui Po District", | |||||
| "wongTaiSinCombo": "Wong Tai Sin District", | |||||
| "yauTsimMongCombo": "Yau Tsim Mong District", | |||||
| "centralAndWesternCombo": "Central and Western District", | |||||
| "easternCombo": "Eastern District", | |||||
| "southernCombo": "Southern District", | |||||
| "wanChaiCombo": "Wan Chai District", | |||||
| "lantauIslandCombo": "Lantau Island", | |||||
| "lammaIslandCombo": "Lamma Island District", | |||||
| "pengChauCombo": "Peng Chau District", | |||||
| "applyPublicNotice": "Apply for Public Notice", | "applyPublicNotice": "Apply for Public Notice", | ||||
| "attention": "attention", | "attention": "attention", | ||||
| @@ -277,28 +277,6 @@ | |||||
| "pwGood": "良好", | "pwGood": "良好", | ||||
| "pwStrong": "强", | "pwStrong": "强", | ||||
| "islandCombo": "离岛区", | |||||
| "kwaiTsingCombo": "葵青区", | |||||
| "northCombo": "北区", | |||||
| "saiKungCombo": "西贡区", | |||||
| "shaTinCombo": "沙田区", | |||||
| "taiPoCombo": "大埔区", | |||||
| "tsuenWanCombo": "荃湾区", | |||||
| "tuenMunCombo": "屯门区", | |||||
| "yuenLongCombo": "元朗区", | |||||
| "kowloonCityCombo": "九龙城区", | |||||
| "kwunTongCombo": "观塘区", | |||||
| "shamShuiPoCombo": "深水埗区", | |||||
| "wongTaiSinCombo": "黄大仙区", | |||||
| "yauTsimMongCombo": "油尖旺区", | |||||
| "centralAndWesternCombo": "中西区", | |||||
| "easternCombo": "东区", | |||||
| "southernCombo": "南区", | |||||
| "wanChaiCombo": "湾仔区", | |||||
| "lantauIslandCombo": "大屿山区", | |||||
| "lammaIslandCombo": "南丫岛区", | |||||
| "pengChauCombo": "坪洲区", | |||||
| "applyPublicNotice": "申请公共启事", | "applyPublicNotice": "申请公共启事", | ||||
| "attention": "注意", | "attention": "注意", | ||||
| "to": "到", | "to": "到", | ||||
| @@ -280,28 +280,6 @@ | |||||
| "pwGood": "良好", | "pwGood": "良好", | ||||
| "pwStrong": "強", | "pwStrong": "強", | ||||
| "islandCombo": "離島區", | |||||
| "kwaiTsingCombo": "葵青區", | |||||
| "northCombo": "北區", | |||||
| "saiKungCombo": "西貢區", | |||||
| "shaTinCombo": "沙田區", | |||||
| "taiPoCombo": "大埔區", | |||||
| "tsuenWanCombo": "荃灣區", | |||||
| "tuenMunCombo": "屯門區", | |||||
| "yuenLongCombo": "元朗區", | |||||
| "kowloonCityCombo": "九龍城區", | |||||
| "kwunTongCombo": "觀塘區", | |||||
| "shamShuiPoCombo": "深水埗區", | |||||
| "wongTaiSinCombo": "黃大仙區", | |||||
| "yauTsimMongCombo": "油尖旺區", | |||||
| "centralAndWesternCombo": "中西區", | |||||
| "easternCombo": "東區", | |||||
| "southernCombo": "南區", | |||||
| "wanChaiCombo": "灣仔區", | |||||
| "lantauIslandCombo": "大嶼山區", | |||||
| "lammaIslandCombo": "南丫島區", | |||||
| "pengChauCombo": "坪洲區", | |||||
| "applyPublicNotice": "申請公共啟事", | "applyPublicNotice": "申請公共啟事", | ||||
| "attention": "注意", | "attention": "注意", | ||||
| "to": "到", | "to": "到", | ||||
| @@ -79,6 +79,7 @@ export const POST_LOGIN = '/login'; | |||||
| export const POST_CAPTCHA = apiPath+'/captcha'; | export const POST_CAPTCHA = apiPath+'/captcha'; | ||||
| export const POST_TERMS_N_CONDITIONS = apiPath+'/termsAndConditions'; | export const POST_TERMS_N_CONDITIONS = apiPath+'/termsAndConditions'; | ||||
| export const POST_VERIFY_CAPTCHA = apiPath+'/verifyCaptcha'; | export const POST_VERIFY_CAPTCHA = apiPath+'/verifyCaptcha'; | ||||
| export const GET_COMBO = apiPath+'/combo-data'; | |||||
| //register | //register | ||||
| export const POST_PUBLIC_USER_REGISTER = apiPath+'/user/register'; | export const POST_PUBLIC_USER_REGISTER = apiPath+'/user/register'; | ||||