index.ts 517 B

123456789101112131415161718192021
  1. /// <reference path="csv.d.ts" />
  2. import * as Messages from './message.csv';
  3. import * as UI from './ui.csv';
  4. import * as Errors from './error.csv';
  5. type Dict = {[id:string]:any};
  6. const MessagesObj = Messages as Dict;
  7. const UIObj = UI as Dict;
  8. const ErrorsObj = Errors as Dict;
  9. const i18n_data = {} as Dict;
  10. for(const key in UIObj) {
  11. const data = {} as Dict;
  12. data['error'] = ErrorsObj[key];
  13. data['message'] = MessagesObj[key];
  14. data['ui'] = UIObj[key];
  15. i18n_data[key] = data;
  16. }
  17. export default i18n_data;