Skip to content

Contexts#144

Merged
rubenv merged 10 commits intomasterfrom
contexts
Dec 8, 2014
Merged

Contexts#144
rubenv merged 10 commits intomasterfrom
contexts

Conversation

@rubenv
Copy link
Copy Markdown
Owner

@rubenv rubenv commented Dec 8, 2014

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)

cristiano2lopes and others added 9 commits September 3, 2014 18:21
…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
@rubenv rubenv added this to the 2.0 - Contexts + IE8 milestone Dec 8, 2014
@rubenv rubenv self-assigned this Dec 8, 2014
@rubenv rubenv merged commit 5e6cb34 into master Dec 8, 2014
@rubenv rubenv deleted the contexts branch December 8, 2014 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants