Commit Graph

21 Commits

Author SHA1 Message Date
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
af3d3c2c9b fix: daily review page & setting dialog style (#1392) 2023-03-21 09:55:53 +08:00
b145d8b8a2 chore: update setting dialog style (#1125) 2023-02-19 21:12:16 +08:00
c5200ca31b feat: dark mode for dialogs (#643) 2022-11-30 20:34:16 +08:00
b67a37453d feat: member management enhancement (#617)
* feat: member management enhancement

* update

* update

* update

* update
2022-11-28 19:59:11 +08:00
a24b885236 chore: update share memo image (#482) 2022-11-17 21:01:26 +08:00
f554e5a357 fix: close button z-index in setting dialog (#303) 2022-10-16 12:37:17 +08:00
5bdf7654fc chore: update detail styles 2022-08-27 08:57:29 +08:00
e9d303326f feat: set editor font style (#174)
feat: editor font style
2022-08-25 20:44:32 +08:00
3c5b0ea90a chore: update style 2022-07-22 23:31:25 +08:00
93ba2f4fab chore: fix icon style 2022-07-17 10:29:12 +08:00
0e8d3e6907 chore: fix memos amount 2022-07-05 22:09:11 +08:00
1b60180b79 chore: update setting dialog style 2022-07-01 19:32:42 +08:00
929f621be4 chore: add image uploading status 2022-06-24 20:01:02 +08:00
3be5ea34a4 chore: update popup button styles 2022-06-22 19:52:06 +08:00
cd7000da70 feat: responsive view (#75)
* chore: add license

* feat: mobile view
2022-06-19 11:32:49 +08:00
c492317ffe feat: member manage section in setting dialog 2022-05-16 22:19:39 +08:00
615cec3066 feat: import data from json (#53) 2022-05-15 22:21:13 +08:00
48a20c2b38 chore: update setting dialog 2022-05-04 12:05:50 +08:00
0fea2a86da chore: update styles 2022-03-24 21:39:58 +08:00
da1ccabd1e feat: use dialog instead of page 2022-03-20 23:53:50 +08:00