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

Generating partial files

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

Beschreibung

Hi,

i´m using the angular-translate partialLoader for my project with the following file structure:

```
i18n
-- de
-- -- app.json
-- -- global.json
-- en
-- -- app.json
-- -- global.json
```

In my code the placeholder have the following naming:
`{{ 'app.title' | translate }}` or `{{ 'global.sitename' | translate }}`

I put all keys with the first notation in the representing json files, e.g. app.title is a translation entry of the file app.json:

**en:**
**app.json**

```
{
"app": {
"title": "My title",
"subname": "another translation"
}
}
```

**global.json**

```
{
"global": {
"sitename": "My sitename"
}
}
```

**de:**
**app.json**

```
{
"app": {
"title": "Mein Titel",
"subname": "eine weitere Übersetzung"
}
}
```

**global.json**

```
{
"global": {
"sitename": "Mein Seitenname"
}
}
```

And now the question: Is it possible with grunt-angular-translate to extract the first key of the naming, e.g. **app**.title.[...] and write (or update) the translation in the corresponding file (here **app**.json)? If there is no file with this name, create it. How is it possible?

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.