Commit Graph

36 Commits (35efa927b6515643c2079f1394b93bb6523b1f4a)

Author SHA1 Message Date
Lincoln Nogueira 557278fac0
feat: improve i18n support as a whole ()
* 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
boojack 8a33290722
chore: update user setting key convention ()
* chore: update user settng key convention

* chore: update
boojack 0cddb358c1
chore: add Slovenian locale ()
chore: add sl locale
Mehmet Altuğ Akgül e062c9b4a7
feat: add Turkish Translation file ()
* Created tr.json for Turkish Translation

* updated file for trLocale

* Updated for Turkish Locale

* Update i18n.ts

* Update i18n.ts

* Update package.json

* Update package.json

* Update i18n.d.ts

* Update user_setting.go

* Update package.json

* Update web/src/components/LocaleSelect.tsx

Co-authored-by: boojack <stevenlgtm@gmail.com>

* Update package.json

* Update LocaleSelect.tsx

* Update LocaleSelect.tsx

* Update i18n.ts

* Update i18n.ts

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
boojack 9577f6dbe8
feat: add resource visibility to user setting ()
boojack 29124f56bb
chore: update memo service ()
* chore: update memo service

* chore: update
_Jellen 29b5c393d1
feat: add Korean translation ()
added Korean translation
WY-WY-W 930b54fabd
feat: update Traditional Chinese translation ()
Vincenzo Cardone 2e95f6824f
feat: add Italian Translation ()
Ivan 65e9fdead1
feat: add russian locale ()
boojack 3556ae4e65
fix: access control ()
Taras c160bed403
fead: add ukrainian locale ()
boojack 7efa749c66
feat: customize system profile ()
PublicHer0 5520605ccc
feat: add spanish locale ()
Jasper Platenburg 79bf365d78
Dutch locale ()
Maurice Bauer 492a1370ab
feat: add German i18n item ()
boojack 4767ee3293
feat: support follow system appearance ()
Andreas Backström 53cf6ebb79
feat: add swedish/svenska translation ()
Add swedish / svenska translation
boojack 14f9f29348
chore: update user setting appearance ()
Zeng1998 54271c1598
chore: fix some typos ()
boojack a0b35f7aa9
feat: add French i18n item ()
feat: add French i18n
boojack db93710f85
chore: remove mobile editor style user setting ()
boojack a142d975d7
feat: additional style system setting ()
* feat: additional style system setting

* feat: remove editor font setting
boojack dc5d705f8c
feat: vacuum records manually ()
boojack e6f376ae66
fix: user setting name ()
boojack 2a4fc7dcc3
chore: update memo display time ()
* chore: update memo display time

* chore: update
boojack b68d6e2693
feat: update memo sort option setting ()
feat: add memo display ts
Zeng1998 bf5b7e747d
feat: customize memo list sorting rules ()
* chore: update .gitignore

* feat: 添加Memo列表按更新时间排序

* fix go-static-checks

* update

* update

* update Memo.tsx/MemoList.tsx

* handle conflict

Co-authored-by: boojack <stevenlgtm@gmail.com>
f97 7a6eb53e0f
feat: float mobile editor ()
* feat: float mobile editor

* fix: fix pr comment

* lint: fix golangci-lint
f97 811f3340e9
feat: add vietnamese ()
boojack e9d303326f
feat: set editor font style ()
feat: editor font style
Steven 7d0407013e chore: make `golangci-lint` happy
Steven c60bb12424 chore: update user setting validator
Steven d5b88775d9 chore: update user setting keys
Steven ce390f3f79 chore: add memo visibility with user setting
boojack 90b881502d
feat: add `user_setting` model ()
* feat: add `user_setting` model

* chore: add global store

* chore: update settings in web

* chore: update `i18n` example