An open source, lightweight note-taking service. Easily capture and share your great thoughts.
Go to file
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
.github feat: add e2e test (#1486) 2023-04-11 22:13:06 +08:00
.vscode feat(mode): add demo mode (#1121) 2023-02-19 13:36:45 +08:00
api feat: improve i18n support as a whole (#1526) 2023-04-15 08:56:03 +08:00
assets chore: update logo assets (#1407) 2023-03-24 08:43:26 +08:00
cmd feat: add test for user store (#1438) 2023-04-01 22:47:19 +08:00
common feat: implement sign in with SSO (#1119) 2023-02-19 09:50:30 +08:00
docs feat: add docs for memos setup after deploying (#1419) 2023-03-27 23:45:02 +08:00
plugin feat: add HostnameImmutable to aws endpoint config (#1230) 2023-04-15 00:17:48 +08:00
scripts chore: update code structure (#1139) 2023-02-23 00:07:16 +08:00
server chore: upgrade version to 0.12.1 (#1499) 2023-04-09 11:51:43 +08:00
setup feat: add test for user store (#1438) 2023-04-01 22:47:19 +08:00
store fix: return external link directly (#1465) 2023-04-04 08:31:11 +08:00
test feat: add resource backend unit test (#1521) 2023-04-13 19:55:18 +08:00
web feat: improve i18n support as a whole (#1526) 2023-04-15 08:56:03 +08:00
.dockerignore chore: update resource dialog style (#982) 2023-01-21 08:46:49 +08:00
.gitignore chore: setup project workspace for better DX (#1048) 2023-02-08 18:43:13 +08:00
.golangci.yaml chore: update golangci-lint config (#168) 2022-08-24 22:03:07 +08:00
CODEOWNERS chore: update readme (#1047) 2023-02-08 08:51:36 +08:00
docker-compose.uffizzi.yml feat(mode): add demo mode (#1121) 2023-02-19 13:36:45 +08:00
docker-compose.yaml chore: update readme 2022-09-03 18:46:16 +08:00
Dockerfile chore: add timezone env to dockerfile (#1490) 2023-04-08 17:57:00 +08:00
go.mod feat: add jwt auth (#1441) 2023-04-02 09:28:02 +08:00
go.sum feat: add jwt auth (#1441) 2023-04-02 09:28:02 +08:00
LICENSE feat: responsive view (#75) 2022-06-19 11:32:49 +08:00
main.go chore: update code structure (#1139) 2023-02-23 00:07:16 +08:00
README.md chore: update docker image source (#1511) 2023-04-10 23:39:46 +08:00
SECURITY.md chore: add SECURITY.md (#562) 2022-11-25 09:05:52 +08:00

memos

✍️ memos

A lightweight, self-hosted memo hub. Open Source and Free forever.

Live Demo • Discuss in Telegram / Discord

GitHub stars Discord

demo

Key points

  • Open source and free forever
  • Self-hosting with Docker in seconds
  • Markdown support
  • Customizable and sharable
  • RESTful API for self-service

Deploy with Docker in seconds

docker run -d --name memos -p 5230:5230 -v ~/.memos/:/var/opt/memos ghcr.io/usememos/memos:latest

The ~/.memos/ directory will be used as the data directory on your local machine, while /var/opt/memos is the directory of the volume in Docker and should not be modified.

Learn more about other installation methods.

Contribution

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. We greatly appreciate any contributions you make. Thank you for being a part of our community! 🥰


Acknowledgements

  • Thanks Uffizzi for sponsoring preview environments for PRs.

Star history

Star History Chart