-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP 1844 Part 1: auto-generated human-IDs and aliases #2108
Merged
jldec
merged 168 commits into
main
from
1844-sdk-persistence-of-messages-in-project-direcory
Mar 12, 2024
Merged
WIP 1844 Part 1: auto-generated human-IDs and aliases #2108
jldec
merged 168 commits into
main
from
1844-sdk-persistence-of-messages-in-project-direcory
Mar 12, 2024
Conversation
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
…ded for class based fs implementations
…es to be stored in separate folders (like packages or git like hashbased distribution), fixes reactivitiy for message crud actions
…, adds alias to fink
…direcory # Conflicts: # inlang/source-code/sdk/src/loadProject.ts # inlang/source-code/website/messages.json
…d originally on save
…direcory # Conflicts: # inlang/source-code/paraglide/paraglide-js/src/compiler/compile.test.ts # inlang/source-code/paraglide/paraglide-js/src/compiler/compileMessage.test.ts # inlang/source-code/paraglide/paraglide-js/src/compiler/compileMessage.ts # inlang/source-code/sdk/src/loadProject.ts # lix/source-code/client/package.json
martin-lysk
commented
Mar 11, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some followup comments - but we are getting there
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces auto-generated human-IDs and aliases behind the
experimental: aliases
flag.For background, please see #1892 and #1844 (comment) and the message docs.
This PR also adds file-system-based locking to improve the behavior of concurrent message updates through the load/store plugin api. Most of these change are in loadProject.
In order to validate these changes, there is also a new sdk/load-test, and a mock machine translate api.
tasks
machine-translate
multiple new keys #1968)auto-generate human ids for new (e.g. extracted) messages...onward to 1844 Part 2: inlang message persistence
human ids (opral only)
Message ids from a plugin are replaced with human ids derived from the message id. The id becomes the default
alias
.Existing message references in code may continue to use the plugin id, now stored in the default alias. A new api
messages.getByDefaultAlias()
resolves aliases e.g. when matched by the ide-extension:In fink, the alias is shown alongside the human id
the ide-extension checks for aliases as well as ids when it matches references to messages
The
message.alias
is a non-optional property of the message api. NOTE: This change to the TypeScriptMessage
interface impacts a large number of tests. Additional modification was required in those tests which expect to be able to get() messages using the original message key.