-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rosetta): expose the 'extract' API (#3161)
Expose parts of the `extract` API (cache reading and mass translating) to consumers, so that downstream tools can build example manipulators as well. * The original exposed `Rosetta` class is renamed to `RosettaTabletReader`, and is intended to be used by `pacmak` (or tools that primarily read tablets). * A new class is introduced, `RosettaTranslator`, which is intended to be used by tools that need to do mass translation. This new API exposes the worker-based caching and `translateAll` functionality. * The `extract` command is rewritten to use `RosettaTranslator` * The `translateAll` features are moved from `extract.ts` and `extract_worker.ts` to `translate_all.ts` and `translate_all_worker.ts`. * Add a function to build a snippet from source with `/// !show|!hide` directives, make it clear when each is supposed to be used. * Fix the `console.error()` suppression from the TypeScript compiler that was using an incorrect substring. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
- Loading branch information
Showing
18 changed files
with
554 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.