Skip to content

Commit

Permalink
Merge pull request #56: Rename 'file' to 'faili'
Browse files Browse the repository at this point in the history
  • Loading branch information
AvicennaJr authored Sep 27, 2023
2 parents 7b79fad + 2ede1f9 commit 4e9be8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion evaluator/builtins.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ var builtins = map[string]*object.Builtin{

file, err := os.ReadFile(filename)
if err != nil {
return &object.Error{Message: "Tumeshinwa kusoma file"}
return &object.Error{Message: "Tumeshindwa kusoma faili"}
}
return &object.File{Filename: filename, Content: string(file)}
},
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func main() {
case "msaada", "-msaada", "--msaada", "help", "-help", "--help", "-h":
fmt.Println(styles.HelpStyle.Italic(false).Render(fmt.Sprintf(`💡 Namna ya kutumia Nuru:
%s: Kuanza programu ya Nuru
%s: Kurun file la Nuru
%s: Kuendesha faili la Nuru
%s: Kusoma nyaraka za Nuru
%s: Kufahamu toleo la Nuru
`,
Expand All @@ -60,21 +60,21 @@ func main() {
if strings.HasSuffix(file, "nr") || strings.HasSuffix(file, ".sw") {
contents, err := ioutil.ReadFile(file)
if err != nil {
fmt.Println(styles.ErrorStyle.Render("Error: Nimeshindwa kusoma file: ", args[1]))
fmt.Println(styles.ErrorStyle.Render("Error: Nuru imeshindwa kusoma faili: ", args[1]))
os.Exit(0)
}

repl.Read(string(contents))
} else {
fmt.Println(styles.ErrorStyle.Render("'"+file+"'", "sii file sahihi. Tumia file la '.nr' au '.sw'"))
fmt.Println(styles.ErrorStyle.Render("'"+file+"'", "sii faili sahihi. Tumia faili la '.nr' au '.sw'"))
os.Exit(0)
}

} else {
fmt.Println(styles.ErrorStyle.Render("Error: Operesheni imeshindikana boss."))
fmt.Println(styles.HelpStyle.Italic(false).Render(fmt.Sprintf(`💡 Namna ya kutumia Nuru:
%s: Kuanza programu ya Nuru
%s: Kurun file la Nuru
%s: Kuendesha faili la Nuru
%s: Kusoma nyaraka za Nuru
%s: Kufahamu toleo la Nuru
`,
Expand Down

0 comments on commit 4e9be8f

Please sign in to comment.