Skip to content

Commit

Permalink
Fix Norwegian Bokmål (nb) locale
Browse files Browse the repository at this point in the history
  • Loading branch information
theodorton committed Oct 4, 2015
1 parent 0b59ed8 commit 5613114
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
9 changes: 9 additions & 0 deletions test/test_web.rb
Expand Up @@ -39,6 +39,15 @@ def perform(a, b)
rackenv = {'HTTP_ACCEPT_LANGUAGE' => 'en-us'}
get '/', {}, rackenv
assert_match(/Dashboard/, last_response.body)
rackenv = {'HTTP_ACCEPT_LANGUAGE' => 'zh-cn'}
get '/', {}, rackenv
assert_match(/信息板/, last_response.body)
rackenv = {'HTTP_ACCEPT_LANGUAGE' => 'zh-tw'}
get '/', {}, rackenv
assert_match(/資訊主頁/, last_response.body)
rackenv = {'HTTP_ACCEPT_LANGUAGE' => 'nb'}
get '/', {}, rackenv
assert_match(/Oversikt/, last_response.body)
end

describe 'busy' do
Expand Down
3 changes: 3 additions & 0 deletions test/test_web_helpers.rb
Expand Up @@ -41,6 +41,9 @@ def test_locale_determination
obj = Helpers.new('HTTP_ACCEPT_LANGUAGE' => 'zh-CN,zh;q=0.8,en-US;q=0.6,en;q=0.4,ru;q=0.2')
assert_equal 'zh-cn', obj.locale

obj = Helpers.new('HTTP_ACCEPT_LANGUAGE' => 'nb-NO,nb;q=0.2')
assert_equal 'nb', obj.locale

obj = Helpers.new('HTTP_ACCEPT_LANGUAGE' => 'en-us; *')
assert_equal 'en', obj.locale

Expand Down
12 changes: 10 additions & 2 deletions web/locales/no.yml → web/locales/nb.yml
@@ -1,5 +1,5 @@
# elements like %{queue} are variables and should not be translated
no:
nb:
Dashboard: Oversikt
Status: Status
Time: Tid
Expand Down Expand Up @@ -33,6 +33,7 @@ no:
NextRetry: Neste forsøk
RetryCount: Antall forsøk
RetryNow: Forsøk igjen nå
Kill: Kill
LastRetry: Forrige forsøk
OriginallyFailed: Feilet opprinnelig
AreYouSure: Er du sikker?
Expand All @@ -58,7 +59,6 @@ no:
OneMonth: 1 måned
ThreeMonths: 3 måneder
SixMonths: 6 måneder
Batches: Samlinger
Failures: Feil
DeadJobs: Døde jobber
NoDeadJobsFound: Ingen døde jobber funnet
Expand All @@ -67,3 +67,11 @@ no:
Thread: Tråd
Threads: Tråder
Jobs: Jobber
Paused: Pauset
Stop: Stopp
Quiet: Demp
StopAll: Stopp alle
QuietAll: Demp alle
PollingInterval: Oppdateringsintervall
Plugins: Innstikk
NotYetEnqueued: Ikke køet enda

0 comments on commit 5613114

Please sign in to comment.