From: Sam Link Date: Fri, 1 Mar 2019 15:16:36 +0000 (-0500) Subject: LP1802593 - AngularJS Web Client Lang Attr X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fslink%2FLP1802593_angularjs_web_client_invalid_lang_attributes;p=working%2FEvergreen.git LP1802593 - AngularJS Web Client Lang Attr Fixed a typo in Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm on lines 231 and 289 where the default local was "en_us" Signed-off-by: Sam Link --- diff --git a/Open-ILS/src/edi_translator/data/test_output/perl_json2edi.tmp b/Open-ILS/src/edi_translator/data/test_output/perl_json2edi.tmp deleted file mode 100644 index a88c678f35..0000000000 --- a/Open-ILS/src/edi_translator/data/test_output/perl_json2edi.tmp +++ /dev/null @@ -1,79 +0,0 @@ - -{ - "msgtype: "ORDERS", - "msg": ["order", { - "po_number":6, - "date":"20100301", - "buyer":[ - {"id":"6666666", - "reference":{"API":"6666666"}} - ], - "vendor":[ "0672891", - {"id-qualifier":"91", "reference":{"IA":"1"}, "id":"0672891"} - ], - "currency":"USD", - "items":[ - - { - "identifiers":[ - {"id-qualifier":"SA","id":"38"}, - {"id-qualifier":"IB","id":""} - ], - "price":9.99, - "desc":[ - {"BTI":"Twilight zone/twilight tone / arr. Paul Jennings"}, - {"BPU":"Jenson Publications,"}, - {"BPD":"1982, c1979"}, - {"BPH":"1 score + parts"} - ], - "quantity":4 }, - - { - "identifiers":[ - {"id-qualifier":"SA","id":"40"}, - {"id-qualifier":"IB","id":"0393048799"} - ], - "price":16.44, - "desc":[ - {"BTI":"The twilight of American culture / Morris Berman."}, - {"BPU":"Norton,"}, - {"BPD":"c2000."}, - {"BPH":"xiv, 205 p. ;"} - ], - "quantity":3 }, - - { - "identifiers":[ - {"id-qualifier":"SA","id":"27"}, - {"id-qualifier":"IB","id":"0439139597"} - ], - "price":14.99, - "desc":[ - {"BTI":"Harry Potter and the goblet of fire / by J.K. Rowling ; illustrations by Mary GrandPr\u00e9."}, - {"BPU":"Arthur A. Levine Books,"}, - {"BPD":"c2000."}, - {"BPH":"xi, 734 p. :"} - ], - "quantity":19 }, - - { - "identifiers":[ - {"id-qualifier":"SA","id":"30"}, - {"id-qualifier":"IB","id":"0786222735"} - ], - "price":15.99, - "desc":[ - {"BTI":"Harry Potter and the Chamber of Secrets / J.K. Rowling ; illustrations by Mary GrandPr\u00e9."}, - {"BPU":"Thorndike Press,"}, - {"BPD":"1999."}, - {"BPH":"464 p. ; 22 cm."} - ], - "quantity":4 } - - ], - "line_items":4 - }], - "recipient":"0672891", - "sender":"6666666" -} - diff --git a/Open-ILS/src/edi_translator/data/test_output/ruby_json2edi.tmp b/Open-ILS/src/edi_translator/data/test_output/ruby_json2edi.tmp deleted file mode 100644 index fc0ee39a49..0000000000 --- a/Open-ILS/src/edi_translator/data/test_output/ruby_json2edi.tmp +++ /dev/null @@ -1,78 +0,0 @@ - -{ - "msg_type": "ORDERS", - "msg": ["order", { - "po_number":6, - "date":"20100301", - "buyer":[ - {"id":"6666666", - "reference":{"API":"6666666"}} - ], - "vendor":[ "0672891", - {"id-qualifier":"91", "reference":{"IA":"1"}, "id":"0672891"} - ], - "currency":"USD", - "items":[ - - { - "identifiers":[ - {"id-qualifier":"SA","id":"38"}, - {"id-qualifier":"IB","id":""} - ], - "price":9.99, - "desc":[ - {"BTI":"Twilight zone/twilight tone / arr. Paul Jennings"}, - {"BPU":"Jenson Publications,"}, - {"BPD":"1982, c1979"}, - {"BPH":"1 score + parts"} - ], - "quantity":4 }, - - { - "identifiers":[ - {"id-qualifier":"SA","id":"40"}, - {"id-qualifier":"IB","id":"0393048799"} - ], - "price":16.44, - "desc":[ - {"BTI":"The twilight of American culture / Morris Berman."}, - {"BPU":"Norton,"}, - {"BPD":"c2000."}, - {"BPH":"xiv, 205 p. ;"} - ], - "quantity":3 }, - - { - "identifiers":[ - {"id-qualifier":"SA","id":"27"}, - {"id-qualifier":"IB","id":"0439139597"} - ], - "price":14.99, - "desc":[ - {"BTI":"Harry Potter and the goblet of fire / by J.K. Rowling ; illustrations by Mary GrandPr\u00e9."}, - {"BPU":"Arthur A. Levine Books,"}, - {"BPD":"c2000."}, - {"BPH":"xi, 734 p. :"} - ], - "quantity":19 }, - - { - "identifiers":[ - {"id-qualifier":"SA","id":"30"}, - {"id-qualifier":"IB","id":"0786222735"} - ], - "price":15.99, - "desc":[ - {"BTI":"Harry Potter and the Chamber of Secrets / J.K. Rowling ; illustrations by Mary GrandPr\u00e9."}, - {"BPU":"Thorndike Press,"}, - {"BPD":"1999."}, - {"BPH":"464 p. ; 22 cm."} - ], - "quantity":4 } - - ], - "line_items":4 - }], - "recipient":"0672891", - "sender":"6666666" -} diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm index 0d2fe261b4..23fd78bce0 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm @@ -228,7 +228,7 @@ sub load_context { $ctx->{theme} = $cgi->cookie(OILS_HTTP_COOKIE_THEME) || 'default'; $ctx->{proto} = $cgi->https ? 'https' : 'http'; $ctx->{ext_proto} = $ctx->{proto}; - my $default_locale = $r->dir_config('OILSWebDefaultLocale') || 'en_us'; + my $default_locale = $r->dir_config('OILSWebDefaultLocale') || 'en-us'; my @template_paths = uniq $r->dir_config->get('OILSWebTemplatePath'); $ctx->{template_paths} = [ reverse @template_paths ]; @@ -286,7 +286,7 @@ sub parse_accept_lang { # internally uses 'en-US', 'fr-CA', 'fr-FR' (always with the 2 lowercase, # hyphen, 2 uppercase convention) sub parse_eg_locale { - my $ua_locale = shift || 'en_us'; + my $ua_locale = shift || 'en-us'; $ua_locale =~ m/^(..).?(..)?$/; my $lang_code = lc($1);