Remove Go i18n duplicates

This commit is contained in:
Gucheng Wang
2023-03-19 21:47:49 +08:00
parent 4c4ad8320d
commit c7b9a77b4a
18 changed files with 55 additions and 115 deletions

View File

@ -63,19 +63,19 @@ func getPermanentAvatarUrl(organization string, username string, url string, upl
uploadedFileUrl, _ := GetUploadFileUrl(defaultStorageProvider, fullFilePath, false)
if upload {
DownloadAndUpload(url, fullFilePath)
DownloadAndUpload(url, fullFilePath, "en")
}
return uploadedFileUrl
}
func DownloadAndUpload(url string, fullFilePath string) {
func DownloadAndUpload(url string, fullFilePath string, lang string) {
fileBuffer, err := downloadFile(url)
if err != nil {
panic(err)
}
_, _, err = UploadFileSafe(defaultStorageProvider, fullFilePath, fileBuffer)
_, _, err = UploadFileSafe(defaultStorageProvider, fullFilePath, fileBuffer, lang)
if err != nil {
panic(err)
}