mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-25 19:31:05 +00:00
1c116daf08
and also fix / enhance some
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 ofimport
statements and replaceen
with 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 bothen
s with your language's code. Then, add the lineTimeAgo.addDefaultLocale(en);
to the other lines of them, and replaceen
with 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.