Go to file
Henrik Giesel dec0fbe845
Refactor i18n (#1405)
Merging note: the typing changes were fixed in a separate PR.

* Put rootDirs into subprojects

- typings do not work for any ts or svelte files
- if we set the 'rootDirs' in ts/tsconfig.json to '../bazel-bin/ts' and then inherit
  them from e.g. editor, the root will be changed to '../../bazel-bin/ts',
  however editor needs look in '../../bazel-bin/ts/editor' instead.

* Rename i18n and i18n_helpers to i18n-generated and i18n

- This way, we can restrict the awkwardness of importing files outside
  the ts directory within lib

* Fix missing typing of i18n and backend_proto by adding back symlinks

* Split up i18n-generated into i18n-{translate,modules}

* Change i18n from singleton to functions

* Revert "Put rootDirs into subprojects"

This partially reverts commit e1d4292ce3979e7b7ee21bf3951b8a462d45c29c.

It seems like this might not be necessary after all.
However some other change made on this branch seems to have fixed
the .svelte.d.ts imports

* Introduce i18n-bundles to remove circular import

There was a circular import i18n.ts <-> i18n-translate.ts

* Create own directory for i18n

* Move lib/i18n/translate to lib/translate

* This restores tree shaking

* Update tsconfig libs and module

* es2018-2020 have wide support on all modern browsers including

* Switch bundles and langs inside i18n to variables again

* Add missing copyright header

* Rename translate.ts to ftl.ts

* Remove the symlinks again

I added them to fix to have completion for tr, however this would have
also have meant to abandon the tree shaking.
As we want to have tree shaking, it's also not necessary to have the
symlinks anymore

* Revert "Update tsconfig libs and module"

This reverts commit 0a96776a475e9901c1f9f3407c726d1d002fb9ef.

* move withCollapsedWhitespace back to i18n/utils

* Add back /ts as in rootDirs
2021-10-07 23:31:49 +10:00
.buildkite move node_modules into root folder [action required] 2021-10-07 11:42:27 +10:00
.github/ISSUE_TEMPLATE add issue template config.yml 2021-02-19 14:11:21 +10:00
cargo update Rust deps 2021-10-02 20:42:03 +10:00
docs move node_modules into root folder [action required] 2021-10-07 11:42:27 +10:00
ftl Merge pull request #1399 from abdnh/addon-homepage-manifest-prop 2021-10-01 21:52:00 +10:00
pip strip extras from requirements.txt 2021-10-04 15:05:48 +10:00
platforms add linux_arm64 platform 2020-12-29 18:40:39 +10:00
proto replace the old stripHTML() methods with the backend implementation 2021-10-01 23:15:45 +10:00
pylib run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
qt add trailing newline to profiles readme 2021-10-07 13:31:44 +10:00
rslib handle AnkiDroid's two element new intervals 2021-10-07 23:15:51 +10:00
scripts move node_modules into root folder [action required] 2021-10-07 11:42:27 +10:00
ts Refactor i18n (#1405) 2021-10-07 23:31:49 +10:00
.bazelignore move node_modules into root folder [action required] 2021-10-07 11:42:27 +10:00
.bazelrc bump minimum Python to 3.9 2021-10-04 15:05:15 +10:00
.bazelversion update Bazel version 2021-10-01 20:54:48 +10:00
.gitattributes try again to improve GitHub's language stats 2021-01-20 13:20:45 +10:00
.gitignore move node_modules into root folder [action required] 2021-10-07 11:42:27 +10:00
bazel.bat initial Bazel conversion 2020-11-01 14:26:58 +10:00
BUILD.bazel move node_modules into root folder [action required] 2021-10-07 11:42:27 +10:00
Cargo.lock update Rust deps 2021-10-02 20:42:03 +10:00
Cargo.toml update Rust deps 2021-10-02 20:42:03 +10:00
CONTRIBUTORS Update CONTRIBUTORS 2021-09-24 13:46:01 +00:00
defs.bzl move node_modules into root folder [action required] 2021-10-07 11:42:27 +10:00
late_deps.bzl update to latest rules_nodejs & switch to ts_project 2021-10-01 12:52:53 +10:00
LICENSE move aqt_data into source folder; implement wheel building 2020-11-04 12:14:03 +10:00
package.json move node_modules into root folder [action required] 2021-10-07 11:42:27 +10:00
pkgkey.asc add public key for release signing 2018-09-18 10:40:45 +10:00
python.bzl bump minimum Python to 3.9 2021-10-04 15:05:15 +10:00
README.md fix build badge 2021-06-24 09:21:56 +10:00
repos.bzl update to the latest rules_rust 2021-10-02 15:13:37 +10:00
run proper fix for __pycache__ folders preventing remove on ./run 2021-01-12 18:47:08 +10:00
run.bat enable Python warnings when running 2020-12-16 14:59:04 +10:00
SECURITY.md add SECURITY.md 2021-09-22 22:55:19 +10:00
WORKSPACE move node_modules into root folder [action required] 2021-10-07 11:42:27 +10:00
yarn.lock move node_modules into root folder [action required] 2021-10-07 11:42:27 +10:00

Anki

Build status

This repo contains the source code for the computer version of Anki.

If you'd like to try development builds of Anki but don't feel comfortable building the code, please see https://betas.ankiweb.net/

For more information on building, please see Development.