more translation keys added for ecommerce, gitignore updated #3

Merged
Ghost merged 1 commit from feature/e-commerce-trans into master 2020-06-19 08:54:24 +00:00
4 changed files with 17 additions and 3 deletions

5
.gitignore vendored
View file

@ -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/

15
main.go
View file

@ -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[""] = ""
}