forked from toolshed/docs.coopcloud.tech
		
	docs: i18n fixups
This commit is contained in:
		@ -222,11 +222,13 @@ If you're running into issues and want to debug stuff, you can pass `-x` to `bat
 | 
			
		||||
 | 
			
		||||
## Internationalisation
 | 
			
		||||
 | 
			
		||||
`abra` can be translated into other languages. We use a combination of [`gettext`](https://www.gnu.org/software/gettext/), [`weblate`](https://translate.coopcloud.tech) and some [intermediate automation](https://git.coopcloud.tech/toolshed/abra/src/commit/20909695e0e05c6251029dba270b3d4741aeb7a8/.drone.yml#L10-L29) to help developers and translatorsto work together conveniently.
 | 
			
		||||
`abra` can be translated into other languages. We use a combination of [`gettext`](https://www.gnu.org/software/gettext/), [`weblate`](https://translate.coopcloud.tech) and some [intermediate automation](https://git.coopcloud.tech/toolshed/abra/src/commit/20909695e0e05c6251029dba270b3d4741aeb7a8/.drone.yml#L10-L29) to help developers and translators work together conveniently.
 | 
			
		||||
 | 
			
		||||
### Developer workflow
 | 
			
		||||
 | 
			
		||||
You just hack on `abra` as you normally would. If you need to add a string, use `i18n.G` to wrap it. See [`gotext`](https://github.com/leonelquinteros/gotext) for the full API.
 | 
			
		||||
You just hack on `abra` as you normally would.
 | 
			
		||||
 | 
			
		||||
If you need to add a string, use `i18n.G` to wrap it. See [`gotext`](https://github.com/leonelquinteros/gotext) for the full API.
 | 
			
		||||
 | 
			
		||||
For example.
 | 
			
		||||
 | 
			
		||||
@ -234,6 +236,7 @@ For example.
 | 
			
		||||
i18n.G("my string")
 | 
			
		||||
i18n.G("my string with err: %s", err)
 | 
			
		||||
log.Debug(i18n.G("my string"))
 | 
			
		||||
log.Info(i18n.G("my string with err: %s", err))  # N.B no log.Infof usage here
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Then you need to update the `pkg/i18n/locales/abra.pot` file with your new strings for the translators.
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user