Commit Graph

23 Commits (c26417de70e55aa88c1b7e625d171be287d06df4)

Author SHA1 Message Date
Steven b6d1ded668 chore: adjust initial states 2 years ago
boojack 238f896907
feat: add system service (#2083)
* feat: add system service

* chore: update
2 years ago
boojack d114b630d2
feat: add prettier sort import plugin (#2058) 2 years ago
Lincoln Nogueira 557278fac0
feat: improve i18n support as a whole (#1526)
* feat: improve i18n support as a whole

- Remove dayjs in favor of /helpers/datetime.ts, which uses
Intl.DateTimeFormat and Date. Dayjs is not exactly i18n friendly
and has several locale related opened issues.

- Move/refactor date/time code from /helpers/utils.ts to
/helpers/datetime.ts.

- Fix Daily Review weekday not changing according to selected date.

- Localize Daily review weekday and month.

- Load i18n listed strings from /locales/{locale}.json in a dynamic way.
This makes much easier to add new locales, by just adding a properly
named json file and listing it only in /web/src/i18n.ts and
/api/user_setting.go.

- Fallback languages are now set in /web/src/i18n.ts.

- Full language codes are now preffered, but they fallback to 2-letter
codes when not available.

- The locale dropdown is now populated dynamically from the available
locales. Locale names are populated by the browser via
Intl.DisplayNames(locale).

- /web/src/i18n.ts now exports a type TLocale from availableLocales
array. This is used only by findNearestLanguageMatch(). As I was unable
to use this type in ".d.ts" files, I switched the Locale type from
/web/src/types/i18n.d.ts to string.

- Move pretty much all hardcoded text strings to i18n strings.

- Add pt-BR translation.

- Remove site.ts and move its content to a i18n string.

- Rename zh.json to zh-Hans.json to get the correct language name on
selector dropdown.

- Remove pt_BR.json and replace with pt-BR.json.

- Some minor layout spacing fixes to accommodate larger texts.

- Improve some error messages.

* Delete .yarnrc.yml

* Delete package-lock.json

* fix: 158:28  error  Insert `⏎`  prettier/prettier
2 years ago
boojack 89ab57d738
refactor: update import prefix with alias (#1433) 2 years ago
Dmitry Shemin b03778fa73
feat: update RU i18n locale (#1422)
* feat: Fix i18n and RU locale

* fix: eslint issues

* change the position of deps

---------

Co-authored-by: CorrectRoadH <a778917369@gmail.com>
2 years ago
boojack 5b0a54bfb7
chore: clean `package.json` (#993)
* chore: clean `package.json`

* chore: update
2 years ago
Stephen Zhou b7ab6f8e7e
fix: code highlight in dark mode (#702) 2 years ago
boojack 07f0c3f052
chore: update global css (#657) 2 years ago
boojack c5200ca31b
feat: dark mode for dialogs (#643) 2 years ago
boojack 9036bd478b
fix: image scrollbar (#494) 2 years ago
boojack eefd0444c8
feat: add highlight for code block (#291)
* feat: add highlight for code block

* chore: update test
3 years ago
Steven 366afdd1e4 feat: use `i18next` 3 years ago
Steven 307483e499 feat: use `react-router` 3 years ago
Steven 660908e436 chore: add `react-router` 3 years ago
boojack 646a41e931 chore: add `i18n` based with `useContext` 3 years ago
boojack 58e68f8f80 chore: update signin button in visitor mode 3 years ago
boojack 346d219cd5
chore: reorder imports manually (#106)
* chore: reorder imports manually

* chore: remove unused less
3 years ago
Steven 40680a5e0f
chore: update memo action buttons style (#80)
chore: update memo action btn style
3 years ago
boojack c2e5a1a524 refactor: use `redux` 3 years ago
email 9b0cf8af49 feat: upgrade react 18 3 years ago
boojack 3d8997a43a feat: use tailwindcss and show export btn 3 years ago
LeeShuang 06bffd0ba5 migrate frontend 3 years ago