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

customRegex as object

Aberta
#73 2 comentários 0 reações 0 responsáveis Ver no GitHub
question
Linguagem predominante
JavaScript
Estrelas
90
Forks
49
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.