Skip to content

Commit

Permalink
Merge pull request bootboxjs#425 from EmadOmar/master
Browse files Browse the repository at this point in the history
Added Arabic locale
  • Loading branch information
tarlepp committed May 2, 2015
2 parents 498fdff + c168f47 commit cb76634
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bootbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,11 @@
* unlikely to be required. If this gets too large it can be split out into separate JS files.
*/
var locales = {
ar : {
OK : "موافق",
CANCEL : "الغاء",
CONFIRM : "تأكيد"
},
bg_BG : {
OK : "Ок",
CANCEL : "Отказ",
Expand Down
13 changes: 13 additions & 0 deletions tests/locales.test.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ describe "bootbox locales", ->
it "shows the default CONFIRM translation", ->
expect(@labels.confirm).to.equal "OK"

describe "Arabic", ->
beforeEach ->
@setLocale "ar"

it "shows the correct OK translation", ->
expect(@labels.ok).to.equal "موافق"

it "shows the correct CANCEL translation", ->
expect(@labels.cancel).to.equal "الغاء"

it "shows the correct CONFIRM translation", ->
expect(@labels.confirm).to.equal "تأكيد"

describe "English", ->
beforeEach ->
@setLocale "en"
Expand Down

0 comments on commit cb76634

Please sign in to comment.