Conversation
…h gettext msgctxt base functionality on catalog, added attribute translate-context to directive and handled possibility of extra argument in the translate filter. Tests added for filter catalog and directive.
and translateContext properties and calls the appropriate catalog method This change allows more flexibility to accept functionality like #104
Previously the format of the catalog for translations with context was
[{ctxA: t1, ctxB: t2}, {ctxA: t1_plural, ctxB: t2_plural}] which was not
very clever (duplicate info, bad structure, sorry!).
Now the format is the more concise [{ctxA: [t1, t1_plural], ctxB: [t2, t2_plural]}].
The wrapping arrays in the context object values are mandatory even if
only one element is present (no plurals).
The external array wrapping is optional but allowed to achieve
consistency with how things were already done before context
translations were allowed.
No plural filter support yet.
Conflicts: dist/angular-gettext.js dist/angular-gettext.min.js src/catalog.js
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.
Work in progress, needs to be updated in accordance with what's added in tools (rubenv/angular-gettext-tools#55).
Catalog format here: rubenv/angular-gettext-tools#55 (comment)