mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-27 22:09:53 +02:00
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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user