Commit Graph

36 Commits

Author SHA1 Message Date
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
2023-04-15 08:56:03 +08:00
boojack
8a33290722
chore: update user setting key convention (#1447)
* chore: update user settng key convention

* chore: update
2023-04-03 09:02:02 +08:00
boojack
0cddb358c1
chore: add Slovenian locale (#1437)
chore: add sl locale
2023-04-01 21:34:10 +08:00
Mehmet Altuğ Akgül
e062c9b4a7
feat: add Turkish Translation file (#1202)
* 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>
2023-03-02 10:05:15 +08:00
boojack
9577f6dbe8
feat: add resource visibility to user setting (#1190) 2023-02-27 22:16:33 +08:00
boojack
29124f56bb
chore: update memo service (#1138)
* chore: update memo service

* chore: update
2023-02-22 20:07:55 +08:00
_Jellen
29b5c393d1
feat: add Korean translation (#1127)
added Korean translation
2023-02-20 00:54:12 +00:00
WY-WY-W
930b54fabd
feat: update Traditional Chinese translation (#994) 2023-01-29 09:41:56 +08:00
Vincenzo Cardone
2e95f6824f
feat: add Italian Translation (#890) 2023-01-02 09:41:39 +08:00
Ivan
65e9fdead1
feat: add russian locale (#879) 2022-12-31 09:02:14 +08:00
boojack
3556ae4e65
fix: access control (#870) 2022-12-28 20:22:52 +08:00
Taras
c160bed403
fead: add ukrainian locale (#864) 2022-12-26 19:10:47 +08:00
boojack
7efa749c66
feat: customize system profile (#828) 2022-12-22 19:48:44 +08:00
PublicHer0
5520605ccc
feat: add spanish locale (#741) 2022-12-13 09:12:22 +08:00
Jasper Platenburg
79bf365d78
Dutch locale (#687) 2022-12-06 08:11:21 +08:00
Maurice Bauer
492a1370ab
feat: add German i18n item (#686) 2022-12-06 07:42:17 +08:00
boojack
4767ee3293
feat: support follow system appearance (#670) 2022-12-04 12:23:29 +08:00
Andreas Backström
53cf6ebb79
feat: add swedish/svenska translation (#668)
Add swedish / svenska translation
2022-12-03 21:38:25 +08:00
boojack
14f9f29348
chore: update user setting appearance (#654) 2022-12-02 20:00:34 +08:00
Zeng1998
54271c1598
chore: fix some typos (#587) 2022-11-26 06:23:29 +00:00
boojack
a0b35f7aa9
feat: add French i18n item (#547)
feat: add French i18n
2022-11-24 08:42:38 +08:00
boojack
db93710f85
chore: remove mobile editor style user setting (#455) 2022-11-12 21:01:34 +08:00
boojack
a142d975d7
feat: additional style system setting (#444)
* feat: additional style system setting

* feat: remove editor font setting
2022-11-11 23:42:44 +08:00
boojack
dc5d705f8c
feat: vacuum records manually (#420) 2022-11-06 04:21:58 +00:00
boojack
e6f376ae66
fix: user setting name (#331) 2022-10-21 15:06:15 +00:00
boojack
2a4fc7dcc3
chore: update memo display time (#327)
* chore: update memo display time

* chore: update
2022-10-21 20:26:00 +08:00
boojack
b68d6e2693
feat: update memo sort option setting (#326)
feat: add memo display ts
2022-10-21 11:57:57 +00:00
Zeng1998
bf5b7e747d
feat: customize memo list sorting rules (#312)
* 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>
2022-10-19 21:00:34 +08:00
f97
7a6eb53e0f
feat: float mobile editor (#234)
* feat: float mobile editor

* fix: fix pr comment

* lint: fix golangci-lint
2022-09-20 20:42:14 +08:00
f97
811f3340e9
feat: add vietnamese (#218) 2022-09-16 21:09:59 +08:00
boojack
e9d303326f
feat: set editor font style (#174)
feat: editor font style
2022-08-25 20:44:32 +08:00
Steven
7d0407013e chore: make golangci-lint happy 2022-08-24 21:53:12 +08:00
Steven
c60bb12424 chore: update user setting validator 2022-08-20 21:51:28 +08:00
Steven
d5b88775d9 chore: update user setting keys 2022-08-19 21:56:22 +08:00
Steven
ce390f3f79 chore: add memo visibility with user setting 2022-08-19 00:00:47 +08:00
boojack
90b881502d
feat: add user_setting model (#145)
* feat: add `user_setting` model

* chore: add global store

* chore: update settings in web

* chore: update `i18n` example
2022-08-13 14:35:33 +08:00