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

customRegex as object

未關閉
#73 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
question
主要語言
JavaScript
星號
90
分支
49
PR 合併指標
30 天內沒有已合併 PR

描述

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

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。