diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-08-09 12:41:56 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-09-06 18:32:19 +0300 |
commit | f1e1cdab3fd60e256a18149b4e39e6ba5980c803 (patch) | |
tree | a947c83be280751dd16187d2664abc915ec64f40 /docs | |
parent | 8da040342eb0a3098e54dc6ed2cb10bac6173230 (diff) |
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
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/content/multilingual.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/content/content/multilingual.md b/docs/content/content/multilingual.md index f23a6afcf..f5ff46f9c 100644 --- a/docs/content/content/multilingual.md +++ b/docs/content/content/multilingual.md @@ -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 |