index.ts 490 B

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