diff --git a/.gitignore b/.gitignore index 4ca0a25..8e182aa 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,8 @@ .LSOverride # Icon must end with two \r -Icon +Icon + # Thumbnails ._* @@ -42,4 +43,6 @@ Icon Network Trash Folder Temporary Items .apdisk +assets/ + diff --git a/credit-card-transactions/Domestic-and-international-Usage-eng.xlsx b/credit-card-transactions/Domestic-and-international-Usage-eng.xlsx deleted file mode 100644 index 3f2f4c5..0000000 Binary files a/credit-card-transactions/Domestic-and-international-Usage-eng.xlsx and /dev/null differ diff --git a/credit-card-transactions/Domestic-and-international-Usage.xlsx b/credit-card-transactions/Domestic-and-international-Usage.xlsx deleted file mode 100644 index 6d0fb28..0000000 Binary files a/credit-card-transactions/Domestic-and-international-Usage.xlsx and /dev/null differ diff --git a/main.go b/main.go index ab594bc..02dc039 100644 --- a/main.go +++ b/main.go @@ -7,11 +7,14 @@ import ( "github.com/360EntSecGroup-Skylar/excelize/v2" ) +var nameSheet string + func main() { langHashMap := make(map[string]string) populateLanguageHash(langHashMap) - convertTurkeyToEngLabel("credit-card-transactions/Domestic-and-international-Usage.xlsx", + nameSheet = "assets/e-commerce/e-commerce-transactions" + convertTurkeyToEngLabel(nameSheet+".xlsx", "Sheet1", langHashMap) // exchangeHandler := initExhangeData() @@ -42,7 +45,7 @@ func convertTurkeyToEngLabel(fileName string, sheetName string, langHash map[str // Set active sheet of the workbook. fileLabelConversion.SetActiveSheet(index) // 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) } } @@ -88,5 +91,13 @@ func populateLanguageHash(langHash map[string]string) { langHash["Alışveriş"] = "Purchase" langHash["Nakit Çekme"] = "Cash" 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[""] = "" }