woodpecker/web/src/utils/timeAgo.ts
6543 716d55a370
Add German Translation (#997)
* Add German Translation

* Fix visibility description

* fix lint

* Registries or Registry

* Update web/src/assets/locales/de.json

* Apply suggestions from code review

Co-authored-by: Anbraten <anton@ju60.de>

* Update web/src/assets/locales/de.json

Co-authored-by: Anbraten <anton@ju60.de>

* Update web/src/assets/locales/de.json

Co-authored-by: Anbraten <anton@ju60.de>
2022-06-21 18:18:02 +02:00

15 lines
404 B
TypeScript

import TimeAgo from 'javascript-time-ago';
import de from 'javascript-time-ago/locale/de.json';
import en from 'javascript-time-ago/locale/en.json';
import lv from 'javascript-time-ago/locale/lv.json';
import { getUserLanguage } from '~/utils/locale';
TimeAgo.addDefaultLocale(en);
TimeAgo.addLocale(de);
TimeAgo.addLocale(lv);
const timeAgo = new TimeAgo(getUserLanguage());
export default timeAgo;