99designs / 99designs/smartling
feat: locale aliases
- 主要語言
- Go
- 星號
- 7
- 分支
- 2
- PR 合併指標
- 30 天內沒有已合併 PR
描述
It would be nice to have ability to map `smartling` to `application` locales like [repository-connector](https://docs.smartling.com/pages/Repository-Connector/Translation-Settings/) does:
`project.go`
``` go
func resolveLocale(locales map[string]string, locale string) string {
if val, ok := locales[locale]; ok {
return val
}
return locale
}
func localPullFilePath(p, locales map[string]string, locale string) string {
parts := FilenameParts{
Path: p,
Dir: path.Dir(p),
Base: path.Base(p),
Ext: path.Ext(p),
Locale: resolveLocale(locales, locale),
}
// ...
}
```
`smartling.yml`
``` yml
PullFilePath: '{{ .Dir }}/{{.Locale}}{{.Ext}}'
Locales:
en-US: en_US
ru-RU: ru
# etc
```
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。