99designs / 99designs/smartling
feat: locale aliases
- Linguagem predominante
- Go
- Estrelas
- 7
- Forks
- 2
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
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
```
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Avaliação
Esta issue ainda não foi avaliada.