Repository navigation
docs: drop the locale field and PUT ids from translation payloads - #99
Merged
Merged
Conversation
Since 2.0.0 (Locastic#81) the map key sets the locale of each translation entry (a `locale` field in the entry is ignored), and PUT and PATCH match the submitted translations to their rows by locale. The README, the Context7 rules and the agent skills still asked for a `locale` field in every entry and for the `id` of each translation in PUT payloads. Checked over HTTP on API Platform 3.4, 4.3 and 5.0.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Since 2.0.0 (#81), the locale of each translation entry comes from its map key (a
localefield in the entry is ignored), and PUT and PATCH match the submitted translations to the existing rows by locale. The README, the Context7 rules and the agent skills from #97 still say that each entry must repeat itslocalefield and that a PUT must send theidof each translation, so every example payload carries fields the bundle does not use. Checked over HTTP on API Platform 3.4, 4.3 and 5.0: entries withoutlocaleget the key as locale, a key that differs from the entry'slocalewins, and a PUT without ids keeps the row ids and removes the locales that are not in the payload.Changes
localefields and the PUT ids. The POST and PUT texts say that the key sets the locale and that rows keep their ids. The response example still showsidandlocale, because responses contain them.context7.json: the two rules are rewritten to match.api-translation-writesandapi-translation-resource: the same payload changes.