Commit Graph

34 Commits (7d6934d00c424b3faa55f76efb18134666f7ef9e)

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
2 years ago
boojack d71bfce1a0
chore: add usage into heatmap (#1443) 2 years ago
boojack 89ab57d738
refactor: update import prefix with alias (#1433) 2 years ago
boojack a9218ed5f0
refactor: filter store (#1331) 2 years ago
boojack 3a466ad2a1
chore: update style of home sidebar (#1311) 2 years ago
boojack f7cd039819
chore: rename common to base component (#1279) 2 years ago
boojack bf46a9af68
chore: add heat map to sidebar (#1255) 2 years ago
Jasper Platenburg 6596e6893e
feat: implement translation for days (#784)
implement trranslation for weekdays

Co-authored-by: boojack <stevenlgtm@gmail.com>
3 years ago
boojack ef621a444f
refactor: introducing `use{Module}Store` instead of service (#768)
* refactor: introducing `useEditorStore`

* refactor: update

* chore: update
3 years ago
M. Gschwandtner 1eec474007
fix: heatmap popup showing after logging out (#761)
* fix for heatmap popup showing after logging out

* moved node.remove to component unmount

* Update web/src/components/UsageHeatMap.tsx

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

Co-authored-by: M. Gschwandtner <84477901+OnlyPain-ctrl@users.noreply.github.com>
Co-authored-by: boojack <stevenlgtm@gmail.com>
3 years ago
apixandru 4d9857ce18
fix: update UsageHeatMap.tsx to account for daylight savings (#696) 3 years ago
Tiefseemonster 2fa01886da
fix: tooltip overlaps a window border (#599) 3 years ago
Zeng1998 54271c1598
chore: fix some typos (#587) 3 years ago
boojack 2042737004
feat: add username field (#544)
* feat: add username field

* chore: update
3 years ago
boojack 006cb56d28
fix: heatmap data (#394) 3 years ago
boojack ef5492074e
chore: update memo stats api (#387) 3 years ago
boojack 1c2998c4d8
feat: pagination for memo list (#330) 3 years ago
boojack 2a4fc7dcc3
chore: update memo display time (#327)
* chore: update memo display time

* chore: update
3 years ago
winwin2011 987bb80770
fix: heatmap popover blink (#195) 3 years ago
Steven b884327a53 chore: update eslint rules 3 years ago
boojack 0dc377550f chore: fix hover heatmap 3 years ago
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
3 years ago
boojack cad4db128b fix: mouse hover in heatmap 3 years ago
boojack 2e5b120986 chore: update store selector 3 years ago
boojack b52c16c43f chore: use `axios` instead of `fetch` 3 years ago
boojack a580df5c9f chore: update redux store and service 3 years ago
boojack c2e5a1a524 refactor: use `redux` 3 years ago
boojack 304df8674a chore: fix build 3 years ago
boojack 995ec34bf8 feat: pin/unpin memo 3 years ago
boojack 08682a822e chore: update layout styles 3 years ago
email da1ccabd1e feat: use dialog instead of page 3 years ago
email 2b5ee78397 feat: layout style(1) 3 years ago
email 8f7445c299 feat: remove mobile styles 3 years ago
LeeShuang 06bffd0ba5 migrate frontend 4 years ago