more translation keys added for ecommerce, gitignore updated

This commit is contained in:
Shaz hemani 2020-06-19 11:48:17 +05:00
parent c5b6f842c9
commit 2bf475e148
No known key found for this signature in database
GPG key ID: 976B8B017678D5AC
4 changed files with 17 additions and 3 deletions

3
.gitignore vendored
View file

@ -24,6 +24,7 @@
# Icon must end with two \r # Icon must end with two \r
Icon Icon
# Thumbnails # Thumbnails
._* ._*
@ -42,4 +43,6 @@ Icon
Network Trash Folder Network Trash Folder
Temporary Items Temporary Items
.apdisk .apdisk
assets/

15
main.go
View file

@ -7,11 +7,14 @@ import (
"github.com/360EntSecGroup-Skylar/excelize/v2" "github.com/360EntSecGroup-Skylar/excelize/v2"
) )
var nameSheet string
func main() { func main() {
langHashMap := make(map[string]string) langHashMap := make(map[string]string)
populateLanguageHash(langHashMap) populateLanguageHash(langHashMap)
convertTurkeyToEngLabel("credit-card-transactions/Domestic-and-international-Usage.xlsx", nameSheet = "assets/e-commerce/e-commerce-transactions"
convertTurkeyToEngLabel(nameSheet+".xlsx",
"Sheet1", langHashMap) "Sheet1", langHashMap)
// exchangeHandler := initExhangeData() // exchangeHandler := initExhangeData()
@ -42,7 +45,7 @@ func convertTurkeyToEngLabel(fileName string, sheetName string, langHash map[str
// Set active sheet of the workbook. // Set active sheet of the workbook.
fileLabelConversion.SetActiveSheet(index) fileLabelConversion.SetActiveSheet(index)
// Save xlsx file by the given path. // Save xlsx file by the given path.
if err := fileLabelConversion.SaveAs("credit-card-transactions/Domestic-and-international-Usage-eng.xlsx"); err != nil { if err := fileLabelConversion.SaveAs(nameSheet + "-eng.xlsx"); err != nil {
fmt.Println(err) fmt.Println(err)
} }
} }
@ -88,5 +91,13 @@ func populateLanguageHash(langHash map[string]string) {
langHash["Alışveriş"] = "Purchase" langHash["Alışveriş"] = "Purchase"
langHash["Nakit Çekme"] = "Cash" langHash["Nakit Çekme"] = "Cash"
langHash["Toplam"] = "Total" langHash["Toplam"] = "Total"
langHash["Yerli Kartların Yurt İçi ve Yurtdışı Kullanımı"] = "Domestic and International Transactions with Domestic Cards"
langHash["Yerli ve Yabancı Kartların Yurt İçi Kullanımı"] = "Domestic Transactions with Domestic and International Cards"
langHash["Yerli Kartların Yurt İçi ve Yurtdışı Kullanımı"] = "Domestic and International Transactions with Domestic Cards"
langHash["Yerli ve Yabancı Kartların Yurt İçi Kullanımı"] = "Domestic Transactions with Domestic and International Cards"
langHash["Yurt İçi"] = "Domestic"
langHash["Yurtdışı"] = "Foreign"
langHash["Yerli Kart"] = "Domestic Card"
langHash["Yabancı Kart"] = "Foreign Card"
// langHash[""] = "" // langHash[""] = ""
} }