more translation keys added for ecommerce, gitignore updated
This commit is contained in:
parent
c5b6f842c9
commit
2bf475e148
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -22,7 +22,8 @@
|
||||||
.LSOverride
|
.LSOverride
|
||||||
|
|
||||||
# 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/
|
||||||
|
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
15
main.go
15
main.go
|
@ -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[""] = ""
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue