Improve i18n string handling

* Fall back to default language on missing translation file
* Add a i18n-warnings build flag
* If that flag is set, print a parseable and greppable string on missing translation strings

See #2303
This commit is contained in:
Bjørn Erik Pedersen committed 2016-09-06 18:32:19 +03:00
1 parent 648f597d67
commit c714d534f4
1 file changed
+6
+6
View File
@@ -136,6 +136,12 @@ This uses a definition like this one in `i18n/en-US.yaml`:
- id: wordCount
translation: "This article has {{ .WordCount }} words."
```
To track down missing translation strings, run Hugo with the `--i18n-warnings` flag:
```bash
hugo --i18n-warnings | grep i18n
i18n|MISSING_TRANSLATION|en|wordCount
```
### Multilingual Themes support