Merge pull request 'more translation keys added for ecommerce, gitignore updated' (#3) from feature/e-commerce-trans into master
Reviewed-on: #3
This commit is contained in:
commit
833fe7daa7
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -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/
|
||||
|
||||
|
||||
|
|
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"
|
||||
)
|
||||
|
||||
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[""] = ""
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue