Removed marwari (Rajasthan mostly speaks Hindi)
This commit is contained in:
@@ -33,7 +33,6 @@ type translationStruct struct {
|
|||||||
As string `db:"assamese" json:"as"`
|
As string `db:"assamese" json:"as"`
|
||||||
Pa string `db:"punjabi" json:"pa"`
|
Pa string `db:"punjabi" json:"pa"`
|
||||||
Mai string `db:"maithili" json:"mai"`
|
Mai string `db:"maithili" json:"mai"`
|
||||||
Mwr string `db:"marwari" json:"mwr"`
|
|
||||||
Sat string `db:"santali" json:"sat"`
|
Sat string `db:"santali" json:"sat"`
|
||||||
Ne string `db:"nepali" json:"ne"`
|
Ne string `db:"nepali" json:"ne"`
|
||||||
Gom string `db:"konkani" json:"gom"`
|
Gom string `db:"konkani" json:"gom"`
|
||||||
@@ -60,7 +59,6 @@ var lang_codes []string = []string{
|
|||||||
"as", // Assamese
|
"as", // Assamese
|
||||||
"pa", // Punjabi
|
"pa", // Punjabi
|
||||||
"mai", // Maithili
|
"mai", // Maithili
|
||||||
"mwr", // Marwari
|
|
||||||
"sat", // Santali
|
"sat", // Santali
|
||||||
"ne", // Nepali
|
"ne", // Nepali
|
||||||
"gom", // Konkani
|
"gom", // Konkani
|
||||||
@@ -99,7 +97,7 @@ func getCachedTranslation(data string) (bool, translationStruct) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func addToDatabase(translation translationStruct) {
|
func addToDatabase(translation translationStruct) {
|
||||||
_, err := db.NamedExec(`INSERT INTO translations VALUES (:english, :hindi, :bengali, :marathi, :tamil, :telugu, :kannada, :malayalam, :oriya, :gujarati, :marwari, :urdu, :mizo, :assamese, :punjabi, :maithili, :santali, :nepali, :konkani, :tulu, :bhojpuri, :dogri, :manipuri, :sindhi, :awadhi)`, &translation)
|
_, err := db.NamedExec(`INSERT INTO translations VALUES (:english, :hindi, :bengali, :marathi, :tamil, :telugu, :kannada, :malayalam, :oriya, :gujarati, :urdu, :mizo, :assamese, :punjabi, :maithili, :santali, :nepali, :konkani, :tulu, :bhojpuri, :dogri, :manipuri, :sindhi, :awadhi)`, &translation)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
@@ -157,10 +155,10 @@ func handler(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
langToTranslation[lang_code] = translation
|
langToTranslation[lang_code] = translation
|
||||||
}
|
}
|
||||||
|
langToTranslation["en"] = toTranslate
|
||||||
langToTranslationJson, _ := json.Marshal(langToTranslation)
|
langToTranslationJson, _ := json.Marshal(langToTranslation)
|
||||||
translation := translationStruct{}
|
translation := translationStruct{}
|
||||||
err := json.Unmarshal(langToTranslationJson, &translation)
|
err := json.Unmarshal(langToTranslationJson, &translation)
|
||||||
translation.En = toTranslate // langToTranslation doesn't contain the english value
|
|
||||||
addToDatabase(translation)
|
addToDatabase(translation)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
BIN
translations.db
BIN
translations.db
Binary file not shown.
Reference in New Issue
Block a user