Commit graph

39 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
d71bfce1a0
chore: add usage into heatmap (#1443) 2023-04-02 11:56:09 +08:00
boojack
89ab57d738
refactor: update import prefix with alias (#1433) 2023-04-01 16:03:14 +08:00
boojack
a9218ed5f0
refactor: filter store (#1331) 2023-03-11 09:13:54 +08:00
boojack
f86816fea2
feat: use react-hot-toast (#1321) 2023-03-09 08:54:14 +08:00
boojack
3a466ad2a1
chore: update style of home sidebar (#1311) 2023-03-08 21:56:28 +08:00
boojack
ef621a444f
refactor: introducing use{Module}Store instead of service (#768)
* refactor: introducing `useEditorStore`

* refactor: update

* chore: update
2022-12-18 15:25:18 +08:00
Wujiao233
f982e83d0a
fix: clear shortcut filter when delete this shortcut (#611) 2022-11-28 06:14:25 +08:00
boojack
0d6114e25e
feat: update sidebar mask styles (#287) 2022-10-14 07:26:43 +08:00
h2o2o
ce5a6fa3ac
chore: update sidebar styles in mobile view (#285)
* 添加移动端点击自动关闭侧边栏

* 添加移动端点击自动关闭侧边栏

* 添加移动端点击自动关闭侧边栏

* move closeSidebar function to utils

* move closeSidebar function to utils

* 侧边栏优化

* 移动端侧边栏优化

* 移动端侧边栏优化

* 移动端侧边栏优化
2022-10-13 22:56:42 +08:00
Steven
ffe145d436 chore: revert sidebar updates 2022-10-13 08:05:59 +08:00
h2o2o
315ab94c94
添加移动端点击自动关闭侧边栏 (#271) 2022-10-11 08:12:35 +08:00
Steven
366afdd1e4 feat: use i18next 2022-09-19 22:27:50 +08:00
ChasLui
7079faf2b9
chore: update i18n (#212)
* feat: 增加部分 i18n

* feat: 增加部分 i18n

* feat: 增加部分 i18n
2022-09-14 19:14:45 +08:00
Steven
b884327a53 chore: update eslint rules 2022-09-04 06:48:19 +08:00
Steven
f06a3d171b chore: update error message handler 2022-08-20 07:34:39 +08:00
Steven
a7a01df79a chore: update i18n 2022-08-19 21:30:31 +08:00
boojack
c703f281d9 chore: update feather icon 2022-07-30 00:29:20 +08:00
boojack
9417797b99 chore: use fontawesome instead of material icons 2022-07-17 09:58:56 +08:00
boojack
2e126c71f0 chore: update button elements 2022-07-10 12:02:36 +08:00
boojack
7418d2965d fix: visitor view in frontend 2022-07-09 08:32:46 +08:00
boojack
6f32643d7c
refactor: visitor view (#107)
* refactor: update api

* refactor: visitor view

* chore: update seed data
2022-07-07 23:11:20 +08:00
Hyoban
6b5d5e757e
feat: personal memos page (#105)
* feat: no need to log in to view memos

* chore: add a normal user to seed

* feat: page for other members

* fix: replace window.location

* fix: can not get username on home

* fix: check userID

* fix: can visit other user's page after login

* fix: do not redirect on wrong path

* fix: path error when clicked heatmap

* refactor: revise for review

* chore: remove unused import

* refactor: revise for review

* feat: update each user's route to /u/:userId.

* chore: eslint for import sort

* refactor: revise for review
2022-07-07 20:22:36 +08:00
boojack
17a61bb65f choe: update shortcut actived style 2022-07-04 21:45:54 +08:00
boojack
5dd6d505cc chore: use undefined instead of UNKNOWN_ID 2022-07-02 15:05:42 +08:00
boojack
2e5b120986 chore: update store selector 2022-05-22 12:41:15 +08:00
boojack
b52c16c43f chore: use axios instead of fetch 2022-05-22 12:02:58 +08:00
boojack
a580df5c9f chore: update redux store and service 2022-05-22 11:01:20 +08:00
boojack
c2e5a1a524 refactor: use redux 2022-05-21 12:21:06 +08:00
boojack
9a3afc56e7 fix: shortcutId in filter 2022-05-20 23:10:47 +08:00
boojack
6fe1db42b5 chore: update store types 2022-05-19 18:32:49 +08:00
boojack
72d36b964a chore: update styles 2022-05-03 12:15:47 +08:00
boojack
995ec34bf8 feat: pin/unpin memo 2022-05-02 10:57:20 +08:00
boojack
08682a822e chore: update layout styles 2022-05-02 09:32:45 +08:00
email
da1ccabd1e feat: use dialog instead of page 2022-03-20 23:53:50 +08:00
email
2b5ee78397 feat: layout style(1) 2022-03-20 20:02:48 +08:00
STEVEN
b597d40470
refactor: use tailwindcss in less (#34)
* reduce less
2022-03-11 04:54:11 +08:00
email
226e9c156a feat: change main language to english 2022-02-04 22:48:22 +08:00
email
3fa918169e refactor: sync frontend 2022-02-04 19:17:11 +08:00
Renamed from web/src/components/QueryList.tsx (Browse further)