angular-translate / angular-translate/grunt-angular-translate

customRegex as object

Offen
#73 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
question
Vorherrschende Sprache
JavaScript
Sterne
90
Forks
49
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hi,
I saw at master that I can use an object for customRegex. I was happy, because I searched a way to add prefix to some translation keys:

```
$stateProvider.state( /* i18nextract */ 'stateName', {
...
}
```

stateName should save as "navigation.state.statename".

So I added the following to the i18nextract options:

```
i18nextract: {
default_options: {
...
namespace: true,
customRegex: {
'\\/\\*\\s*i18nextract navigation-state\\s*\\*\\/\\s\'((?:\\\\.|[^\'\\\\])*)\': function(key) {
return 'navigation.state.' + key;
}
}
}
}
```

But that doesn't work. So I searched at the src of grunt-angular-translate, what I did wrong. So I found out, that this.data.customRegex is an empty object, when an object is set as customRegex.

I am not familiar with grunt task developing, so I can't find the failure. What do I do wrong?

When is it planed to build a tag with that new feature?

Thank you

edit:
I use windows 10,
node 4.4.0
grunt 0.4.5

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.