mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-03-22 18:05:18 +01:00
1.1 KiB
1.1 KiB
Translations
Woodpecker uses Vue I18n as translation library, thus you can easily translate the web UI into your language. Therefore, copy the file web/src/assets/locales/en.json to the same path with your language's code and .json as name.
Then, translate content of this file, but only the values:
{
"dont_translate": "Only translate this text"
}
To add support for time formatting, import the language into two files:
web/src/compositions/useDate.ts: Just add a line likeimport 'dayjs/locale/en';to the first block ofimportstatements and replaceenwith your language's code.web/src/utils/timeAgo.ts: Add a line likeimport en from 'javascript-time-ago/locale/en.json';to the otherimport-statements and replace bothens with your language's code. Then, add the lineTimeAgo.addDefaultLocale(en);to the other lines of them, and replaceenwith your language's code.
Then, the web UI should be available in your language. You should open a pull request to our repository to get your changes into the next release.